@echo off
echo.
echo **************************************************
echo Easy root for LG G Pad 8.3
echo Modified By Dalingrin
echo Originally By IOMonster (thecubed on XDA)
echo See http://tinyw.in/mXhw for details
echo **************************************************
echo.
echo Original root idea from http://optimusforums.com/threads/how-to-root-the-lg-g2-f320.8846/
echo.
echo Enable Developer Settings on the G Pad:
echo --Go to Settings^-^>About tablet^-^>Software information
echo --Tap on Build number until Developer Settings are unlocked
echo.
echo In Developer Settings:
echo --Enable USB debugging
echo.
echo Plug in the G Pad via USB to a PC.
echo.
pause
echo Looking for device...
.\adb.exe wait-for-device

echo.
echo.

echo Pushing g_security...
echo.
.\adb.exe push g_security /sdcard/g_security
GOTO RootStep2

:RootStep2
echo.
echo.
echo *******************************************************
echo Now, please unplug usb, go to developer options and 
echo disable USB debugging and re-enable it.
echo Once you've done that, re-plug your usb...
echo *******************************************************
pause
echo Waiting for device...
.\adb.exe wait-for-device
echo Now it's time to install su and superuser.
echo.
echo Please note! This will trip LG's rootchecker!
echo.
echo This means your phone will show ROOTED in the settings menu,
echo and in the LG Download mode.
echo.
echo If you do not want to possibly invalidate your warranty
echo press CTRL-C to stop this script.
echo You will have a rooted ADB, but no apps on the phone will be able
echo to access root functions.
echo.
pause
echo.
echo.
echo Mounting system RW and pushing SU, then remounting system RO again
.\adb.exe shell "mount -o remount,rw /system"
.\adb.exe push su /system/xbin/su
.\adb.exe shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
echo Installing superuser
.\adb.exe install superuser.apk
echo.
echo.
echo ***************************************************
echo                       Done.
echo ***************************************************
echo.
echo Please check the above for any errors and let me know if you run into any issues.
echo Enjoy your phone!
pause