forked from johnnyapol/RootMyValet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-windows.bat
88 lines (69 loc) · 2.24 KB
/
install-windows.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
:init
@Echo off
cd /d %~dp0
set ANDROID_HOME=
goto disclaimer
rem This initializes the script
:disclaimer
echo RootMyValet installer v1.0 by Unkn0wn0ne
echo.
echo Please read the README before using this program
echo.
echo RootMyValet is licensed under the GPLv3 license. For the license information,
echo see the LICENSE file
echo.
echo RootMyValet Developers ARE NOT RESPONSIBLE FOR ANYTHING THE HAPPENS DURING THE
echo USAGE OF THIS PROGRAM.
echo.
pause
goto setpath
rem This reads the disclaimer and liscense for use of this product.
:setpath
cls
echo Please enter the path to your android sdk folder then press enter.
echo E.G. C:\name of your folder\sdk
echo Do not append the "\sdk" to the folder name.
set /p ANDROID_HOME=
cls
echo You have set:
echo %ANDROID_HOME%
echo as the path to the android sdk.
echo Are you shure this the correct path?
echo.
choice /M "Press Y for yes and N for no:"
if %errorlevel%==1 goto root
if %errorlevel%==2 goto setpath
rem Asks for user input on where the Android SDK is stored.
:root
cls
echo Killing ADB server
"%ANDROID_HOME%\platform-tools\adb" kill-server
echo Preparing to install RootMyValet.
echo Please connect the device to your computer.
echo.
pause
cls
"%ANDROID_HOME%\platform-tools\adb" wait-for-device
"%ANDROID_HOME%\platform-tools\adb" push su /data/local/tmp
"%ANDROID_HOME%\platform-tools\adb" push roothandler /data/local/tmp
"%ANDROID_HOME%\platform-tools\adb" push installsu.sh /data/local/tmp
"%ANDROID_HOME%\platform-tools\adb" shell chmod 755 /data/local/tmp/installsu.sh
"%ANDROID_HOME%\platform-tools\adb" shell chmod 0755 /data/local/tmp/roothandler
"%ANDROID_HOME%\platform-tools\adb" install RootMyValet.apk
echo Rebooting device...
"%ANDROID_HOME%\platform-tools\adb" reboot
"%ANDROID_HOME%\platform-tools\adb" wait-for-device
echo.
echo Root process finished. Press any key to continue... | pause
goto end
rem The above code roots the phone
:end
cls
echo Thank you for using RootMyValet, your device should now be rooted.
echo If you are using a ZTE Valet phone, you cannot delete the application
echo or it's files because the root will be uninstalled.
echo.
pause
exit
rem Gives the ending credits/warning(s) and closes the program
rem This batch file was updated by Elliot Labs (www.elliot-labs.com)