diff --git a/zipstatic/_all/META-INF/com/google/android/flash-script.sh b/zipstatic/_all/META-INF/com/google/android/flash-script.sh index 3cce8a0..bc697fd 100644 --- a/zipstatic/_all/META-INF/com/google/android/flash-script.sh +++ b/zipstatic/_all/META-INF/com/google/android/flash-script.sh @@ -71,15 +71,11 @@ install_overwrite() { return fi BACKUP="${1}.orig" - NO_ORIG="${1}.no_orig" - if [ ! -f $TARGET ]; then - touch $NO_ORIG || exit 1 - set_perm $NO_ORIG 0 0 600 - elif [ -f $BACKUP ]; then + if [ -f $BACKUP ]; then rm -f $TARGET gzip $BACKUP || exit 1 set_perm "${BACKUP}.gz" 0 0 600 - elif [ ! -f "${BACKUP}.gz" -a ! -f $NO_ORIG ]; then + elif [ ! -f "${BACKUP}.gz" ]; then mv $TARGET $BACKUP || exit 1 gzip $BACKUP || exit 1 set_perm "${BACKUP}.gz" 0 0 600 @@ -181,7 +177,7 @@ if [ $IS64BIT ]; then install_overwrite /system/lib64/libart-compiler.so 0 0 0644 install_overwrite /system/lib64/libart-disassembler.so 0 0 0644 install_overwrite /system/lib64/libsigchain.so 0 0 0644 - install_overwrite /system/lib64/libxposed_art.so 0 0 0644 + install_nobackup /system/lib64/libxposed_art.so 0 0 0644 fi if [ "$API" -ge "22" ]; then diff --git a/zipstatic/_uninstaller/META-INF/com/google/android/flash-script.sh b/zipstatic/_uninstaller/META-INF/com/google/android/flash-script.sh index f15ab16..012b876 100644 --- a/zipstatic/_uninstaller/META-INF/com/google/android/flash-script.sh +++ b/zipstatic/_uninstaller/META-INF/com/google/android/flash-script.sh @@ -47,16 +47,12 @@ restore_link() { restore_backup() { TARGET=$1 BACKUP="${1}.orig" - NO_ORIG="${1}.no_orig" if [ -f $BACKUP ]; then mv_perm $BACKUP $TARGET $2 $3 $4 $5 - rm -f $NO_ORIG elif [ -f "${BACKUP}.gz" ]; then - rm -f $TARGET $NO_ORIG + rm -f $TARGET gunzip "${BACKUP}.gz" mv_perm $BACKUP $TARGET $2 $3 $4 $5 - elif [ -f $NO_ORIG ]; then - rm -f $TARGET $NO_ORIG fi } @@ -108,14 +104,14 @@ restore_backup /system/lib/libart.so 0 0 0644 restore_backup /system/lib/libart-compiler.so 0 0 0644 restore_backup /system/lib/libart-disassembler.so 0 0 0644 restore_backup /system/lib/libsigchain.so 0 0 0644 -restore_backup /system/lib/libxposed_art.so 0 0 0644 +rm -f /system/lib/libxposed_art.so /system/lib/libxposed_art.so.no_orig if [ $IS64BIT ]; then restore_link /system/bin/app_process64 0 2000 0755 u:object_r:zygote_exec:s0 restore_backup /system/lib64/libart.so 0 0 0644 restore_backup /system/lib64/libart-compiler.so 0 0 0644 restore_backup /system/lib64/libart-disassembler.so 0 0 0644 restore_backup /system/lib64/libsigchain.so 0 0 0644 - restore_backup /system/lib64/libxposed_art.so 0 0 0644 + rm -f /system/lib64/libxposed_art.so /system/lib64/libxposed_art.so.no_orig fi if [ "$API" -ge "22" ]; then