mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 13:35:27 +00:00
Uninstaller bump support
This commit is contained in:
parent
e33f5996f3
commit
f894e6b4ea
@ -131,6 +131,11 @@ repack_boot() {
|
|||||||
echo -n "SEANDROIDENFORCE" >> new-boot.img
|
echo -n "SEANDROIDENFORCE" >> new-boot.img
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if ($LGE_G); then
|
||||||
|
# Prevent secure boot error on LG G2/G3.
|
||||||
|
# Just for know, It's a pattern which bootloader verifies at boot. Thanks to LG hackers.
|
||||||
|
echo -n -e "\x41\xa9\xe4\x67\x74\x4d\x1d\x1b\xa4\x29\xf2\xec\xea\x65\x52\x79" >> new-boot.img
|
||||||
|
fi
|
||||||
mv new-boot.img $NEWBOOT
|
mv new-boot.img $NEWBOOT
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +193,19 @@ if [ $? -eq 0 ]; then
|
|||||||
SAMSUNG=true
|
SAMSUNG=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
LGE_G=false
|
||||||
|
RBRAND=$(grep_prop ro.product.brand)
|
||||||
|
RMODEL=$(grep_prop ro.product.device)
|
||||||
|
if [ "$RBRAND" = "lge" ] || [ "$RBRAND" = "LGE" ]; then
|
||||||
|
if [ "$RMODEL" = "*D80*" ] ||
|
||||||
|
[ "$RMODEL" = "*S98*" ] ||
|
||||||
|
[ "$RMODEL" = "*D85*" ] ||
|
||||||
|
[ "$RMODEL" = "*F40*" ]; then
|
||||||
|
LGE_G=true
|
||||||
|
ui_print "! Bump device detected"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
API=$(grep_prop ro.build.version.sdk)
|
API=$(grep_prop ro.build.version.sdk)
|
||||||
ABI=$(grep_prop ro.product.cpu.abi | cut -c-3)
|
ABI=$(grep_prop ro.product.cpu.abi | cut -c-3)
|
||||||
ABI2=$(grep_prop ro.product.cpu.abi2 | cut -c-3)
|
ABI2=$(grep_prop ro.product.cpu.abi2 | cut -c-3)
|
||||||
@ -228,6 +246,11 @@ if (is_mounted /data); then
|
|||||||
if [ -f "/data/stock_boot.img" ]; then
|
if [ -f "/data/stock_boot.img" ]; then
|
||||||
ui_print "- Boot image backup found!"
|
ui_print "- Boot image backup found!"
|
||||||
NEWBOOT=/data/stock_boot.img
|
NEWBOOT=/data/stock_boot.img
|
||||||
|
if ($LGE_G); then
|
||||||
|
# Prevent secure boot error on LG G2/G3.
|
||||||
|
# Just for know, It's a pattern which bootloader verifies at boot. Thanks to LG hackers.
|
||||||
|
echo -n -e "\x41\xa9\xe4\x67\x74\x4d\x1d\x1b\xa4\x29\xf2\xec\xea\x65\x52\x79" >> $NEWBOOT
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ui_print "! Boot image backup unavalible, try using ramdisk backup"
|
ui_print "! Boot image backup unavalible, try using ramdisk backup"
|
||||||
revert_boot
|
revert_boot
|
||||||
|
Loading…
Reference in New Issue
Block a user