::visit Rootjunky.com

::Set our Window Title
@title LG G Watch Tool

::Set our default parameters
@echo off
color 0b



:menuLOOP

	call:header
	::Print our header
	::call:header
	
	::Load up our menu selections
	echo.--------------------------------------------------------------------------------
	for /f "tokens=1,2,* delims=_ " %%A in ('"C:/Windows/system32/findstr.exe /b /c:":menu_" "%~f0""') do echo.  %%B  %%C
	
	call:printstatus

	set choice=
	echo.&set /p choice= Please make a selection or hit ENTER to exit: ||GOTO:EOF
	echo.&call:menu_%choice%
	
GOTO:menuLOOP

:menu_1    ADB & Fastboot Driver Test
cls
color 0b
echo [*] Press any key to check if your drivers are installed
echo [*] correctly. 
echo.--------------------------------------------------------------------------------
pause > nul
echo.--------------------------------------------------------------------------------
echo [*] Is there a device listed under list of devices attached?
echo [*] IF no then exit tool and reboot computer and run the driver  
echo [*] install option again then recheck
ehco [*] If yes then continue test
echo [*] press any key to continue
echo.--------------------------------------------------------------------------------
adb devices
pause > nul
adb reboot bootloader
echo.--------------------------------------------------------------------------------
echo [*] press any key to check fastboot drivers
pause > nul
echo.--------------------------------------------------------------------------------
echo [*] If you see a number with Fastboot after it your drivers are good
echo [*] IF no then reboot computer and run the driver install option 
echo.--------------------------------------------------------------------------------
timeout 4 > nul
fastboot.exe devices
echo [*] press any key to reboot device
echo.--------------------------------------------------------------------------------
pause > nul
fastboot.exe reboot
adb kill-server
echo [*] RootJunky OUT
	set choice=
	echo.&set /p choice= hit ENTER to return to start: ||GOTO:EOF
	echo.&call:bootsubmenu_%choice%
color 0b	
cls	
GOTO:EOF


:menu_2 Unlock Nexus Player Bootloader       (this will factory reset your device)
cls
color 0b
echo.--------------------------------------------------------------------------------
echo [*] Simple Nexus Player Tool
echo [*] Windows Version
echo [*] Created by RootJunky.com
echo.--------------------------------------------------------------------------------
echo [*] Before continuing, ensure USB debugging is enabled,
echo [*] (device settings/about then click on build number 10 times
echo [*] back to settings/developer options enable usb debugging) 
echo [*] have the Nexus Drivers installed and your Nexus Player
echo [*] connected via USB to the computer. Also recommend testing the 
echo [*] drivers first with option 1
echo [*] WARNING THIS WILL FACTORY RESET YOUR DEVICE
echo.--------------------------------------------------------------------------------
echo [*] Press any key to unlock your Nexus Player bootloader...
pause > nul
echo [*] Waiting for device...
adb wait-for-device
echo [*] Device found.
adb reboot bootloader
echo.--------------------------------------------------------------------------------
echo [*] Device is booting to bootlaoder mode
echo.--------------------------------------------------------------------------------
echo [*] Press any key to start the unlock process 
pause >nul
fastboot.exe oem unlock
fastboot.exe oem unlock
echo.--------------------------------------------------------------------------------
echo [*] First boot will take up to 10 minutes. once done go set up your 
echo [*] Newly unlock Nexus player then setup ADB again
echo.--------------------------------------------------------------------------------
echo [*] press any key to reboot the device once unlocked.
pause > nul
fastboot.exe reboot
adb kill-server
echo [*] RootJunky OUT
	set choice=
	echo.&set /p choice= hit ENTER to return to start: ||GOTO:EOF
	echo.&call:extrasubmenu_%choice%
color 0b	
cls
GOTO:EOF


:menu_3    Root your Nexus Player               (unlocked bootloader required)
cls
color 0b
echo.--------------------------------------------------------------------------------
echo [*] Big thanks to Chainfire for Modded boot image
echo [*] Make sure USB Debugging is enabled on your watch
echo [*] this will boot a root boot img and reboot 
echo [*] your device like normal
echo.--------------------------------------------------------------------------------
echo [*] press any key to start
pause > nul
echo [*]
echo [*] waiting for device
adb wait-for-device...
adb reboot bootloader
fastboot.exe boot root.img
echo.--------------------------------------------------------------------------------
echo [*] to test root on your Nexus Player 
echo [*] open supersu app and update the binaury
echo [*] then you will have root access
echo.--------------------------------------------------------------------------------
adb kill-server
echo [*] Press any key to finish this script. ROOTJUNKY OUT

	set choice=
	echo.&set /p choice= hit ENTER to return to start: ||GOTO:EOF
	echo.&call:bootsubmenu_%choice%
cls	
GOTO:EOF


:header  
cls        
color 0e
echo.[////////////////////////////      //////////            //////////////////////]                                                                           
echo.[///////////////////////////  ///   //////////////  ///////////////////////////]                                                                            
echo.[//////////////////////////  ////  //////////////  ////////////////////////////]                                                                    
echo.[/////////////////////////  //   ///////////////  /////////////////////////////]                                       
echo.[////////////////////////  ////  /////////  ///  //////////////////////////////]                                  
echo.[///////////////////////  //////  /////////    ////////////////////////////////]    
echo.                                   RootJunky.com
echo.			      Neuxs Player Super Tool
echo.			  Huge thanks to Chainfire for root
echo.--------------------------------------------------------------------------------
adb kill-server
adb start-server
echo.--------------------------------------------------------------------------------
adb devices
timeout 5 > nul
fastboot devices
timeout 5 > nul
cls	
color 0b
GOTO:EOF

:printstatus
echo.
echo. Time to unlock the Beast
echo.--------------------------------------------------------------------------------
GOTO:EOF

