2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-11-09 19:10:30 +00:00
NanoDroid/patcher/META-INF/com/google/android/update-binary

66 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-01-23 20:11:52 +00:00
#!/sbin/sh
umask 022
OUTFD=${2}
ZIP=${3}
2018-01-23 20:11:52 +00:00
mkdir /dev/tmp
2019-04-25 18:49:26 +00:00
unzip -oq "${ZIP}" CommonPatcher -d "/dev/tmp"
if [ ! -f /dev/tmp/CommonPatcher ]; then
echo " !! failed to load CommonPatcher"
2018-01-23 20:11:52 +00:00
exit 1
else
source "/dev/tmp/CommonPatcher"
fi
2018-01-23 20:11:52 +00:00
detect_bootmode
2018-01-23 20:11:52 +00:00
setup_environment
BASEDIR="${TMPDIR}/dexpatcher"
2018-01-23 20:11:52 +00:00
detect_outfd
show_banner
2018-01-23 20:11:52 +00:00
2018-03-21 18:30:22 +00:00
mount_partitions
2018-01-23 20:11:52 +00:00
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"
2018-01-23 20:11:52 +00:00
fi
setup_patcher
detect_sdk
detect_arch
if search_fake_package_signature; then
error " ROM has native signature spoofing already!"
fi
2018-01-23 20:11:52 +00:00
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
2018-01-23 20:11:52 +00:00
ui_print " "
ui_print " > Done!"
ui_print " "
ui_print "Thanks for using NanoDroid"
ui_print " "
exit 0