Use magiskboot to patch avd

Fix #5421
This commit is contained in:
LoveSy 2022-02-11 04:34:26 +08:00 committed by John Wu
parent 605eae21bc
commit c849759682
2 changed files with 3 additions and 3 deletions

View File

@ -491,7 +491,7 @@ def patch_avd_ramdisk(args):
'scripts/avd_patch.sh', '/data/local/tmp'])
if proc.returncode != 0:
error('adb push failed!')
proc = execv([adb_path, 'push', backup, '/data/local/tmp/ramdisk.cpio.gz'])
proc = execv([adb_path, 'push', backup, '/data/local/tmp/ramdisk.cpio.tmp'])
if proc.returncode != 0:
error('adb push failed!')

View File

@ -57,7 +57,7 @@ for file in lib*.so; do
mv "$file" "${file:3:${#file}-6}"
done
gzip -d ramdisk.cpio.gz
./magiskboot decompress ramdisk.cpio.tmp ramdisk.cpio
cp ramdisk.cpio ramdisk.cpio.orig
touch config
@ -84,4 +84,4 @@ export KEEPFORCEENCRYPT=true
"add 000 .backup/.magisk config"
rm -f ramdisk.cpio.orig config magisk*.xz
gzip -9 ramdisk.cpio
./magiskboot compress=gzip ramdisk.cpio ramdisk.cpio.gz