Commit cf2d02c0 authored by topjohnwu's avatar topjohnwu

Don't wipe ramdisk when A-only SAR

parent 0fcd0de0
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment