Check block dev ro status

magisk is shared object, use static busybox instead
This commit is contained in:
vvb2060
2020-12-19 14:12:12 -08:00
committed by topjohnwu
parent 13a8820603
commit 6ce9225f52
2 changed files with 28 additions and 13 deletions

View File

@@ -30,10 +30,16 @@ direct_install() {
rm -f $MAGISKBIN/new-boot.img
echo "- Flashing new boot image"
flash_image $1/new-boot.img $2
if [ $? -ne 0 ]; then
echo "! Insufficient partition size"
return 1
fi
case $? in
1)
echo "! Insufficient partition size"
return 1
;;
2)
echo "! $2 is read only"
return 2
;;
esac
rm -rf $1
return 0
}