From cf2d02c0dddbaaaa2b50b71369f8c8e5aa143b55 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 22 Sep 2019 06:17:54 -0400 Subject: [PATCH] Don't wipe ramdisk when A-only SAR --- scripts/boot_patch.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/boot_patch.sh b/scripts/boot_patch.sh index 575fbf5ed..2d00c2934 100644 --- a/scripts/boot_patch.sh +++ b/scripts/boot_patch.sh @@ -115,13 +115,7 @@ case $((STATUS & 3)) in # Find SHA1 of stock boot image [ -z $SHA1 ] && SHA1=`./magiskboot cpio ramdisk.cpio sha1 2>/dev/null` ./magiskboot cpio ramdisk.cpio restore - if ./magiskboot cpio ramdisk.cpio "exists init.rc"; then - # Normal boot image - cp -af ramdisk.cpio ramdisk.cpio.orig - else - # A only system-as-root - rm -f ramdisk.cpio - fi + cp -af ramdisk.cpio ramdisk.cpio.orig ;; 2 ) # Unsupported ui_print "! Boot image patched by unsupported programs"