Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions zipstatic/_all/META-INF/com/google/android/flash-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down