@ECHO OFF


:: - CHECK ROOT PERMISSIONS

files\adb-windows.exe shell su -c "cat /dev/block/mmcblk0p4 > /data/local/tmp/check-root"
files\adb-windows.exe pull /data/local/tmp/check-root check-root
files\adb-windows.exe shell rm /data/local/tmp/check-root
IF NOT EXIST check-root (
echo. && echo ERROR: Check ROOT permissions.
echo. && echo Press ENTER to close this window...
pause > nul
exit
)
del /f check-root


:: - INSTALL B176 BOOT.IMG

files\adb-windows.exe push files/boot.img /data/local/tmp/boot.img
files\adb-windows.exe shell su -c "dd if=/data/local/tmp/boot.img of=/dev/block/mmcblk0p12"
files\adb-windows.exe shell rm /data/local/tmp/boot.img
echo. && echo B176 boot.img installed.
echo. && echo Restarting system...
files\adb-windows.exe reboot
files\adb-windows.exe kill-server
