-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fre3atlast
142 lines (142 loc) · 5.68 KB
/
Fre3atlast
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
@echo off
color 0c
rem This is being used so we can check the MD5 later on of misc.img so we dont brick the phone!
set md5=c88dd947eb3b36eec90503a3525ae0de
Echo verifying that your device is indeed an HTC Evo Shift
rem this is going to check the device codename so we dont run this on a non-HTC Shift device.
adb pull system/build.prop
find "ro.product.device=speedy" build.prop
if ERRORLEVEL==0 SET device=speedy
if ERRORLEVEL==1 goto oops
echo your phone is a %device% meaning we can continue!
echo have you temp rooted before using frere3vo?
:choice4
set /p C=(Y/N)?
for %%? in (Y N) do if /I "%C%"=="%%?" goto ok4
goto choice
set C4=%C%4
goto %C4%
:ok4
:N4
echo clearing out cache by rebooting to prevent issues while exploiting
adb reboot
adb wait-for-device
PING 1.1.1.1 -n 1 -w 5000 >NUL
rem this part is checking the image's MD5 sum using an external program called md5sum which is freeware.
md5sum misc.img > md5.txt
find "%md5%" md5.txt
if ERRORLEVEL==0 goto worked
if ERRORLEVEL==1 goto badmd5
:worked
adb shell getprop ro.bootloader
echo is your Hboot version
echo There are only 2 times this thing will stop.
echo - Right now to confirm you want to root and when you flash HBOOT.
echo This is just confirmation if you want to run it. Enter Y or N.
:choice1
set /p C=(Y/N)?
for %%? in (Y N) do if /I "%C%"=="%%?" goto ok1
goto choice1
:ok1
set C1=%C%1
goto %C1%
:Y1
if %C1%==Y1 set perms=yes
cls
rem now starting Fre3vo exploit
echo Starting
adb kill-server > NUL
adb push fre3vo /data/local/tmp
adb shell chmod 755 /data/local/tmp/fre3vo;/data/local/tmp/fre3vo -debug -start fbb58a00 -end FFFFFFFF
adb wait-for-device
adb push Superuser3-beta1.apk /data/app/
adb push su /data/local/tmp/
PING 1.1.1.1 -n 1 -w 5000 >NUL
adb wait-for-device
adb shell cd /data/local/tmp;chmod 777 /data/local/tmp/su;cd /;mount -o remount,rw -t rootfs rootfs /;rm vendor;adb shell mkdir vendor;adb shell mkdir vendor/bin
adb wait-for-device
adb push su /vendor/bin/su
adb shell chmod 4755 /vendor/bin/su
cls
echo if you want to continue just hit Y and you can continue if not, hit N.
echo this is happening if you want to flash Hboot misc.img to be able to downgrade. -this is from saying N to the first choice
:N1
:choice2
set /p C=(Y/N)?
for %%? in (Y N) do if /I "%C%"=="%%?" goto ok2
goto choice2
:ok2
set C2=%C%2
goto %C2%
:Y2
rem This is where it pushes misc.img then immediately checks md5 on the image just incase as this would cause a brick if bad!
echo now pushing misc.img!
adb push misc.img /sdcard/misc.img
adb shell dd if=/sdcard/misc.img of=/dev/block/mmcblk0p17
adb pull /sdcard/misc.img miscpulled.img
cls
md5sum miscpulled.img > md5.txt
find "%md5%" md5.txt
if ERRORLEVEL==0 goto successful
if ERRORLEVEL==1 goto badmd5
:successful
echo * signature has been changed sucessfully!
Echo congrats on gaining root access.
echo Be sure to say thanks to OTAking and Scary for finding this out.
echo Glad to see that this file worked. Please leave feedback on the thread!
PING 1.1.1.1 -n 1 -w 5000 >NUL
echo do you want to get the ZIP or the EXE to RUU down to froyo?
:choice5
set /p C=(ZIP/EXE)?
for %%? in (ZIP EXE) do if /I "%C%"=="%%?" goto ok5
goto choice
set C5=%C%5
cls
goto %C5%
:ok5
:EXE5
set method=exe
if %method%==exe set link=http://dl.dropbox.com/u/15069134/RUU_Speedy_Sprint_WWE_1.17.651.1_Radio_1.07.00.1129_NV_SPCS_1.52_1103_release_160079_signed.exe
echo %method% download link: %link% > %device%_%method%_link.txt
echo now just download and run the EXE *link included in %device%_%method%_link.txt
echo The install script included with this script will actually install the apks you need to root your phone while on froyo, just be sure to run it AFTER you downgrade!
echo echo *********************************** > install.bat
echo echo * Z4Root and Visionary install * >> install.bat
echo echo * Made by Indirect * >> install.bat
echo echo *********************************** >> install.bat
echo adb install z4rootz.apk >> install.bat
echo adb install visionaries.apk >> install.bat
echo echo remember to put it into Airplane Mode before running the perm root and if it freezes up, just do a battery pull then retry *may need to do this more than once. If one doesnt work, try the other. >>install.bat
echo ping 1.1.1.1 -n 1 -w 10000 >>install.bat
exit
:N2
wimax
exit
:N4
Fre3atlastreroot
:oops
Echo your device is not an HTC Evo Shift! Running a search to find out what phone it is!
adb pull /system/build.prop
find "ro.product.device=" build.prop
pause
exit
:badmd5
echo Downloading the proper misc.img file now!
wget http://dl.dropbox.com/u/15069134/misc.img && goto Y2
:ZIP5
set method=zip
if %method%==zip set link=http://dl.dropbox.com/u/41040697/PG06IMG.zip
echo %method% download link: %link% > %device%_%method%_link.txt
echo now just download and move the PG06IMG.zip to your sdcard and boot into bootloader! *link included in %device%_%method%_link.txt
echo it will be in the same folder as this when it's done downloading then you can just push to your sdcard then reboot into bootloader!
echo The install script will actually install the apks you need to root your phone while on froyo, just be sure to run it AFTER you downgrade!
ping 1.1.1.1 -n 1 -w 1000
echo echo *********************************** > install.bat
echo echo * Z4Root and Visionary install * >> install.bat
echo echo * Made by Indirect * >> install.bat
echo echo *********************************** >> install.bat
echo adb install z4rootz.apk >> install.bat
echo adb install visionaries.apk >> install.bat
echo echo remember to put it into Airplane Mode before running the perm root and if it freezes up, just do a battery pull then retry *may need to do this more than once. If one doesnt work, try the other. >>install.bat
echo ping 1.1.1.1 -n 1 -w 10000 >>install.bat
exit