perf: Only enable ADB on request

This commit is contained in:
robshape 2023-05-28 21:06:50 +02:00
parent 5380fdf677
commit e1fbcb61fa

View file

@ -1,6 +1,9 @@
#!/system/bin/sh #!/system/bin/sh
/usbdbg.sh device # Enable Android Debug Bridge
if [ -f /misc/enableADB ]; then
/usbdbg.sh device
fi
TF1_PATH=/mnt/mmc # ROMS partition TF1_PATH=/mnt/mmc # ROMS partition
TF2_PATH=/mnt/sdcard TF2_PATH=/mnt/sdcard
@ -50,17 +53,17 @@ if [ -f $UPDATE_PATH ]; then
fi fi
# extract the zip file appended to the end of this script to tmp # extract the zip file appended to the end of this script to tmp
# and display one of the two images it contains # and display one of the two images it contains
CUT=$((`busybox grep -n '^BINARY' $0 | busybox cut -d ':' -f 1 | busybox tail -1` + 1)) CUT=$((`busybox grep -n '^BINARY' $0 | busybox cut -d ':' -f 1 | busybox tail -1` + 1))
busybox tail -n +$CUT "$0" | busybox uudecode -o /tmp/data busybox tail -n +$CUT "$0" | busybox uudecode -o /tmp/data
busybox unzip -o /tmp/data -d /tmp busybox unzip -o /tmp/data -d /tmp
busybox fbset -g 640 480 640 480 16 busybox fbset -g 640 480 640 480 16
dd if=/tmp/$ACTION of=/dev/fb0 dd if=/tmp/$ACTION of=/dev/fb0
sync sync
busybox unzip -o $UPDATE_PATH -d $SDCARD_PATH busybox unzip -o $UPDATE_PATH -d $SDCARD_PATH
rm -f $UPDATE_PATH rm -f $UPDATE_PATH
# the updated system finishes the install/update # the updated system finishes the install/update
$SYSTEM_PATH/bin/install.sh # &> $SDCARD_PATH/install.txt $SYSTEM_PATH/bin/install.sh # &> $SDCARD_PATH/install.txt
fi fi
@ -107,4 +110,3 @@ busybox losetup --detach $LOOPDEVICE
sync && reboot -p sync && reboot -p
exit 0 exit 0