diff --git a/build.py b/build.py index 2024e8c46..5cacda890 100755 --- a/build.py +++ b/build.py @@ -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!') diff --git a/scripts/avd_patch.sh b/scripts/avd_patch.sh index 9856ae9fa..bd8f686fb 100644 --- a/scripts/avd_patch.sh +++ b/scripts/avd_patch.sh @@ -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