2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-11-07 15:20:36 +00:00
NanoDroid/patcher/META-INF/com/google/android/update-binary
2019-06-08 22:55:16 +02:00

73 lines
1.5 KiB
Bash

#!/sbin/sh
umask 022
OUTFD=${2}
ZIP=${3}
mkdir /dev/tmp
unzip -oq "${ZIP}" CommonPatcher -d "/dev/tmp"
if [ ! -f /dev/tmp/CommonPatcher ]; then
echo " !! failed to load CommonPatcher"
exit 1
else
source "/dev/tmp/CommonPatcher"
fi
detect_bootmode
setup_environment
BASEDIR="${TMPDIR}/dexpatcher"
detect_outfd
ui_print " "
ui_print "********************************"
ui_print " NanoDroid 21.0.90.99999999 "
ui_print " created by @Nanolx "
ui_print " Framework Patcher "
ui_print "Powered by DexPatcher (@lanchon)"
ui_print "********************************"
ui_print " "
mount_partitions
if [ -f /data/adb/.nanodroid-patcher ]; then
ui_print " !! /data/adb/.nanodroid-patcher exists"
ui_print " !! if you want to force patching, then"
error " remove this file and try again"
elif [ -f /data/adb/NanoDroid_Patched ]; then
ui_print " !! /data/adb/NanoDroid_Patched exists"
ui_print " !! if you want to force patching, then"
error " remove this file and try again"
fi
setup_patcher
detect_sdk
detect_arch
if search_fake_package_signature; then
error " ROM has native signature spoofing already!"
fi
detect_odex
patch_services
install_services
install_addond
if ! ${BOOTMODE} ; then
umount -l /system_root 2>/dev/null
umount -l /system 2>/dev/null
umount -l /vendor 2>/dev/null
umount -l /dev/random 2>/dev/null
fi
ui_print " "
ui_print " > Done!"
ui_print " "
ui_print "Thanks for using NanoDroid"
ui_print " "
exit 0