Don't wipe ramdisk when A-only SAR

This commit is contained in:
topjohnwu 2019-09-22 06:17:54 -04:00
parent 0fcd0de0d1
commit cf2d02c0dd

View File

@ -115,13 +115,7 @@ case $((STATUS & 3)) in
# Find SHA1 of stock boot image # Find SHA1 of stock boot image
[ -z $SHA1 ] && SHA1=`./magiskboot cpio ramdisk.cpio sha1 2>/dev/null` [ -z $SHA1 ] && SHA1=`./magiskboot cpio ramdisk.cpio sha1 2>/dev/null`
./magiskboot cpio ramdisk.cpio restore ./magiskboot cpio ramdisk.cpio restore
if ./magiskboot cpio ramdisk.cpio "exists init.rc"; then cp -af ramdisk.cpio ramdisk.cpio.orig
# Normal boot image
cp -af ramdisk.cpio ramdisk.cpio.orig
else
# A only system-as-root
rm -f ramdisk.cpio
fi
;; ;;
2 ) # Unsupported 2 ) # Unsupported
ui_print "! Boot image patched by unsupported programs" ui_print "! Boot image patched by unsupported programs"