diff options
Diffstat (limited to 'prebuilt/common/bin')
-rwxr-xr-x | prebuilt/common/bin/backuptool.sh | 13 | ||||
-rw-r--r-- | prebuilt/common/bin/blacklist | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh index 68b1ff8..c576be3 100755 --- a/prebuilt/common/bin/backuptool.sh +++ b/prebuilt/common/bin/backuptool.sh @@ -28,6 +28,17 @@ if ( ! grep -q "^ro.cm.version=$V.*" /system/build.prop ); then fi } +check_blacklist() { + if [ -f /system/addon.d/blacklist ];then + ## Discard any known bad backup scripts + cd /$1/addon.d/ + for f in *sh; do + s=$(md5sum $f | awk {'print $1'}) + grep -q $s /system/addon.d/blacklist && rm -f $f + done + fi +} + # Execute /system/addon.d/*.sh scripts with $1 parameter run_stage() { for script in $(find /tmp/addon.d/ -name '*.sh' |sort -n); do @@ -39,6 +50,7 @@ case "$1" in backup) mkdir -p $C check_prereq + check_blacklist system preserve_addon_d run_stage pre-backup run_stage backup @@ -46,6 +58,7 @@ case "$1" in ;; restore) check_prereq + check_blacklist tmp run_stage pre-restore run_stage restore run_stage post-restore diff --git a/prebuilt/common/bin/blacklist b/prebuilt/common/bin/blacklist new file mode 100644 index 0000000..03c36c4 --- /dev/null +++ b/prebuilt/common/bin/blacklist @@ -0,0 +1,4 @@ +80f99c594f7b82c4cbe533e3f5447729 +29f4bab6bae5959458678869350dc888 +77d73f73da664f3592e712b7e7c107c1 +a5019b358023a3a6ae8be3f3380ba5ca |