mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
Uninstaller: actually use bundled busybox (before mounting partitions)
This commit is contained in:
parent
691c82c890
commit
ad8e6220b6
@ -62,38 +62,22 @@ set_perm_data () {
|
||||
|
||||
setup_busybox () {
|
||||
mkdir /dev/tmp
|
||||
unzip -oq "${ZIP}" busybox.arm -d "/dev/tmp"
|
||||
unzip -oq "${ZIP}" busybox.x86 -d "/dev/tmp"
|
||||
|
||||
ABI=$(grep_prop ro.product.cpu.abi | cut -c-3)
|
||||
ABI2=$(grep_prop ro.product.cpu.abi2 | cut -c-3)
|
||||
ABILONG=$(grep_prop ro.product.cpu.abi)
|
||||
if [[ "$(uname -m)" == a* ]]; then
|
||||
local bb_arch=arm
|
||||
else local bb_arch=x86
|
||||
fi
|
||||
|
||||
ARCH=arm
|
||||
mkdir -p /dev/tmp/busybox
|
||||
ln -s /dev/tmp/busybox.${bb_arch} /dev/tmp/busybox/busybox
|
||||
|
||||
[ "$ABI" = "x86" ] && ARCH=x86
|
||||
[ "$ABI2" = "x86" ] && ARCH=x86
|
||||
[ "$ABILONG" = "arm64-v8a" ] && ARCH=arm64
|
||||
[ "$ABILONG" = "x86_64" ] && ARCH=x86_64
|
||||
|
||||
case ${ARCH} in
|
||||
arm | arm64 )
|
||||
unzip -oq "${ZIP}" busybox.arm -d "/dev/tmp"
|
||||
BUSY=/dev/tmp/busybox.arm
|
||||
;;
|
||||
|
||||
x86 | x86_64 )
|
||||
unzip -oq "${ZIP}" busybox.x86 -d "/dev/tmp"
|
||||
BUSY=/dev/tmp/busybox.x86
|
||||
;;
|
||||
esac
|
||||
chmod 0755 /dev/tmp/busybox.${bb_arch}
|
||||
/dev/tmp/busybox.${bb_arch} --install -s /dev/tmp/busybox/
|
||||
|
||||
OLD_PATH=${PATH}
|
||||
|
||||
chmod 0755 ${BUSY}
|
||||
mkdir -p /dev/tmp/busybox
|
||||
ln -s ${BUSY} /dev/tmp/busybox/busybox
|
||||
${BUSY} --install -s /dev/tmp/busybox/
|
||||
|
||||
export PATH="/dev/tmp/busybox:${PATH}"
|
||||
export PATH=/dev/tmp/busybox:/system/bin:/vendor/bin
|
||||
}
|
||||
|
||||
error () {
|
||||
@ -312,6 +296,7 @@ ui_print "**********************"
|
||||
ui_print " "
|
||||
|
||||
detect_bootmode
|
||||
setup_busybox
|
||||
mount_partitions
|
||||
|
||||
ui_print " << Removing installation logs (if any)"
|
||||
|
Loading…
Reference in New Issue
Block a user