我有一个addon.d 脚本,可以在每次更新后删除不需要的应用程序,这样它们就不会回来了,但似乎每当我更新我的设备时,负责它的代码都不会执行。是不是没有执行恢复功能,所以也没有执行恢复后功能?我不知道出了什么问题。
#!/sbin/sh
#
# /system/addon.d/74-brs.sh
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
rm -rf /system/app/Calendar
rm -rf /system/app/Jelly
rm -rf /system/app/messaging
;;
esac
新的 :
#!/sbin/sh
. /tmp/backuptool.functions
list_files() {
cat <<EOF
/system/app/Calendar/Calendar.apk
/system/app/Jelly/Jelly.apk
/system/app/messaging/messaging.apk
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
rm -rf /system/app/Calendar
rm -rf /system/app/Jelly
rm -rf /system/app/messaging
;;
esac