[G4 General] Manh_IT:
[Test Script] Easy - Low Effort Root G4

Dev only!!!

I have an idea about a simple way to implement "Low Effort G4 Root method" and below are what I tried to do with my limited knowledge.

Everyone to please help me check it. Thank !!!

Easy - Low Effort Root G4 Script base on LG One Click Root Script by [MENTION=2200907]avicohh[/MENTION] and Low Effort Root G4 method by [MENTION=1157052]thecubed[/MENTION] with his Team :p

Sorry bad english

Download test files: http://xdaforums.com/attachment.php?attachmentid=3419879&stc=1&d=1437982097

Again: This is just a test !!!

Easy Low Effort Root G4 Script:

@echo off
color a
mode con lines=25 cols=85
title Easy Low Effort Root G4

set maintile1= ===========================================
set maintile2= = Easy Low Effort Root G4 =
set maintile3= = Created By ManhIT =
set maintile4= = All credit and thecubed with his Team =
set maintile5= ===========================================

set surecp=Make sure that you have copied the
set surecp2=to Internal storage of G4 !!!
set fileh811=system.rooted.H81110h.img
set fileVS986=system.rooted.vs98611a.img
set filehH815=system.rooted.H81510c-EU.img
set fileH810=system.rooted.h81010g.img
set filehLS991=system.rooted.LS991ZV5.img

set root_H811=TMB_H811
set root_VS986=VZW_VS986
set root_H815=H815_10c
set root_H810=H810_10G
set root_LS991=SP_LS991

:Start
cls
echo.
echo %maintile1%
echo %maintile2%
echo %maintile3%
echo %maintile4%
echo %maintile5%
echo.

echo. 1. T-Mobile H811 10H
echo. 2. VZW VS986 11A
echo. 3. International H815 10c
echo. 4. "AT&T" H810 10G
echo. 5. Sprint LS991 ZV5
echo. 6. More to come soon (exit)
echo. 7. Download system pre-root file and visit XDA Discussion topic
echo.
set /p set=Enter your G4 model (1-6):
if %set%==1 goto H811
if %set%==2 goto VS986
if %set%==3 goto H815
if %set%==4 goto H810
if %set%==5 goto LS991
if %set%==6 goto exit
if %set%==7 goto DW
goto Start

:DW
@echo off
start http://downloads.codefi.re/thecubed/lg_g4/lef/
start http://xdaforums.com/g4/orig-development/root-tmo-vzw-intl-variants-soon-root-lg-t3164765

:H811
cls
echo.
echo %maintile1%
echo %maintile2%
echo %maintile3%
echo %maintile4%
echo %maintile5%

echo.
echo %surecp% "%fileh811%"
echo %surecp2%
echo.
pause
echo.

echo Please make sure that USB debugging is enabled, and LG drivers are installed.
echo.
echo Starting adb server..
adb.exe kill-server > nul
adb.exe start-server > nul
echo.
echo Waiting for device..
adb.exe wait-for-device
echo.

echo Device detected!
echo Rebooting..
adb reboot
echo.

echo Looking for LG serial port..
echo.
adb.exe wait-for-device
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" (
echo Serial port not found, please insert the phone manually into Download mode.
echo.
echo Disconnect the USB cable and turn off the phone.
echo Then press and hold the Volume Up button, and while you're doing that connect the USB cable again.
echo.
echo Waiting for device..
echo.
) else (
echo Phone found at %comPath%!
echo.
echo Rebooting into Download mode..
echo.
Send_Command.exe \\.\%comPath% < enterDownload | echo off
echo Waiting for device..
echo.
ping 127.0.0.1 -n 15 | echo off
)

set comPath=
:wait-for-download
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" goto wait-for-download
echo Phone found at %comPath%!
echo.
echo Rooting phone..
echo.
ping 127.0.0.1 -n 15 | echo off
Send_Command.exe \\.\%comPath% < %root_H811%
echo.
echo Rebooting..
Send_Command.exe \\.\%comPath% < leaveDownload | echo off
echo.
echo Done!
pause > nul | echo Press any key to exit..

:VS986
cls
echo.
echo %maintile1%
echo %maintile2%
echo %maintile3%
echo %maintile4%
echo %maintile5%

echo.
echo %surecp% "%fileVS986%"
echo %surecp2%
echo.
pause
echo.

echo Please make sure that USB debugging is enabled, and LG drivers are installed.
echo.
echo Starting adb server..
adb.exe kill-server > nul
adb.exe start-server > nul
echo.
echo Waiting for device..
adb.exe wait-for-device
echo.

echo Device detected!
echo Rebooting..
adb reboot
echo.

echo Looking for LG serial port..
echo.
adb.exe wait-for-device
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" (
echo Serial port not found, please insert the phone manually into Download mode.
echo.
echo Disconnect the USB cable and turn off the phone.
echo Then press and hold the Volume Up button, and while you're doing that connect the USB cable again.
echo.
echo Waiting for device..
echo.
) else (
echo Phone found at %comPath%!
echo.
echo Rebooting into Download mode..
echo.
Send_Command.exe \\.\%comPath% < enterDownload | echo off
echo Waiting for device..
echo.
ping 127.0.0.1 -n 15 | echo off
)

set comPath=
:wait-for-download
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" goto wait-for-download
echo Phone found at %comPath%!
echo.
echo Rooting phone..
echo.
ping 127.0.0.1 -n 15 | echo off
Send_Command.exe \\.\%comPath% < %VZW_VS986_11A%
echo.
echo Rebooting..
Send_Command.exe \\.\%comPath% < leaveDownload | echo off
echo.
echo Done!
pause > nul | echo Press any key to exit..

:H815
cls
echo.
echo %maintile1%
echo %maintile2%
echo %maintile3%
echo %maintile4%
echo %maintile5%

echo.
echo %surecp% "%filehH815%"
echo %surecp2%
echo.
pause
echo.

echo Please make sure that USB debugging is enabled, and LG drivers are installed.
echo.
echo Starting adb server..
adb.exe kill-server > nul
adb.exe start-server > nul
echo.
echo Waiting for device..
adb.exe wait-for-device
echo.

echo Device detected!
echo Rebooting..
adb reboot
echo.

echo Looking for LG serial port..
echo.
adb.exe wait-for-device
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" (
echo Serial port not found, please insert the phone manually into Download mode.
echo.
echo Disconnect the USB cable and turn off the phone.
echo Then press and hold the Volume Up button, and while you're doing that connect the USB cable again.
echo.
echo Waiting for device..
echo.
) else (
echo Phone found at %comPath%!
echo.
echo Rebooting into Download mode..
echo.
Send_Command.exe \\.\%comPath% < enterDownload | echo off
echo Waiting for device..
echo.
ping 127.0.0.1 -n 15 | echo off
)

set comPath=
:wait-for-download
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" goto wait-for-download
echo Phone found at %comPath%!
echo.
echo Rooting phone..
echo.
ping 127.0.0.1 -n 15 | echo off
Send_Command.exe \\.\%comPath% < %H815_10c%
echo.
echo Rebooting..
Send_Command.exe \\.\%comPath% < leaveDownload | echo off
echo.
echo Done!
pause > nul | echo Press any key to exit..

:H810
cls
echo.
echo %maintile1%
echo %maintile2%
echo %maintile3%
echo %maintile4%
echo %maintile5%

echo.
echo %surecp% "%fileH810%"
echo %surecp2%
echo.
pause
echo.

echo Please make sure that USB debugging is enabled, and LG drivers are installed.
echo.
echo Starting adb server..
adb.exe kill-server > nul
adb.exe start-server > nul
echo.
echo Waiting for device..
adb.exe wait-for-device
echo.

echo Device detected!
echo Rebooting..
adb reboot
echo.

echo Looking for LG serial port..
echo.
adb.exe wait-for-device
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" (
echo Serial port not found, please insert the phone manually into Download mode.
echo.
echo Disconnect the USB cable and turn off the phone.
echo Then press and hold the Volume Up button, and while you're doing that connect the USB cable again.
echo.
echo Waiting for device..
echo.
) else (
echo Phone found at %comPath%!
echo.
echo Rebooting into Download mode..
echo.
Send_Command.exe \\.\%comPath% < enterDownload | echo off
echo Waiting for device..
echo.
ping 127.0.0.1 -n 15 | echo off
)

set comPath=
:wait-for-download
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" goto wait-for-download
echo Phone found at %comPath%!
echo.
echo Rooting phone..
echo.
ping 127.0.0.1 -n 15 | echo off
Send_Command.exe \\.\%comPath% < %H810_10G%
echo.
echo Rebooting..
Send_Command.exe \\.\%comPath% < leaveDownload | echo off
echo.
echo Done!
pause > nul | echo Press any key to exit..

:LS991
cls
echo.
echo %maintile1%
echo %maintile2%
echo %maintile3%
echo %maintile4%
echo %maintile5%

echo.
echo %surecp% "%filehLS991%"
echo %surecp2%
echo.
pause
echo.

echo Please make sure that USB debugging is enabled, and LG drivers are installed.
echo.
echo Starting adb server..
adb.exe kill-server > nul
adb.exe start-server > nul
echo.
echo Waiting for device..
adb.exe wait-for-device
echo.

echo Device detected!
echo Rebooting..
adb reboot
echo.

echo Looking for LG serial port..
echo.
adb.exe wait-for-device
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" (
echo Serial port not found, please insert the phone manually into Download mode.
echo.
echo Disconnect the USB cable and turn off the phone.
echo Then press and hold the Volume Up button, and while you're doing that connect the USB cable again.
echo.
echo Waiting for device..
echo.
) else (
echo Phone found at %comPath%!
echo.
echo Rebooting into Download mode..
echo.
Send_Command.exe \\.\%comPath% < enterDownload | echo off
echo Waiting for device..
echo.
ping 127.0.0.1 -n 15 | echo off
)

set comPath=
:wait-for-download
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" goto wait-for-download
echo Phone found at %comPath%!
echo.
echo Rooting phone..
echo.
ping 127.0.0.1 -n 15 | echo off
Send_Command.exe \\.\%comPath% < %LS991_ZV5%
echo.
echo Rebooting..
Send_Command.exe \\.\%comPath% < leaveDownload | echo off
echo.
echo Done!
pause > nul | echo Press any key to exit..