forked from APK-Multi-Tool/APK-Multi-Tool
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Setup.bat
325 lines (324 loc) · 17.1 KB
/
Setup.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
@ECHO off
setlocal enabledelayedexpansion
COLOR 0A
if (%1)==(0) goto skipme
if (%1) neq () goto skipme
ECHO *********************************************************************************** >> setuplog.log
ECHO ^* %date% -- %time%^ >> setuplog.log * >> setuplog.log
ECHO *********************************************************************************** >> setuplog.log
Setup 0 2>> setuplog.log
:error
:skipme
cd "%~dp0"
mode con:cols=85 lines=50
if errorlevel 1 goto erradb
cls
:RESTART
cd "%~dp0"
set menunr=GARBAGE
cls
ECHO ***********************************************************************************
ECHO * *
ECHO * APK MULTI-TOOL SETUP FILE *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 1. Check for update *
ECHO * This Will Check if there is a update to the main program *
ECHO * For this option is not functional please visit *
ECHO * http://apkmultitool.com for updates *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 2. Installing Framework-Res *
ECHO * This Will install one of the Framwork-Res Files for 1.x/2.x/3.x/4.x *
ECHO * This Feature also will install any of the other Dependencies needed *
ECHO * In order to use this feature make sure to drop all of the needed files *
ECHO * into the other Folder or else this script will not find them *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 3. Setup Directories *
ECHO * This will setup the appropriate directories needed by Apk Multi-Tools *
ECHO * (This script only needs to be ran for first time users do not use if your *
ECHO * Just updating from previous Version) *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * MISC Stuff *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 4 Read Log *
ECHO * 5 About / Tips *
ECHO * 00 Quit *
ECHO * *
ECHO ***********************************************************************************
SET /P menunr=Please make your decision:
IF %menunr%==1 (goto CHECKUPDATE)
IF %menunr%==2 (goto FRAMRES )
IF %menunr%==3 (goto SETDIR)
IF %menunr%==4 (goto LOGR)
IF %menunr%==5 (goto ABOUT)
IF %menunr%==00 (goto QUIT)
:WHAT
ECHO ************************************************************************************
ECHO * *
ECHO * You went crazy and entered something that wasn't part of the menu options *
ECHO * *
ECHO ************************************************************************************
PAUSE
goto RESTART
:ERRADB
cls
ECHO ************************************************************************************
ECHO * *
ECHO * Adb was not found, you will not be able to manipulate the files on your phone *
ECHO * *
ECHO ************************************************************************************
PAUSE
goto RESTART
:LOGR
cd other
Start "Read The Log - Main script is still running, close this to return" signer 4
goto RESTART
:CHECKUPDATE
ECHO Please Wait while we CHECK FOR UPDATES
IF EXIST apkver.txt (del apkver.txt)
other\wget http://update.apkmultitool.com/apkver.txt
cls
IF NOT EXIST apkver.txt (goto :RESTART)
set /a bool = 0
set info = ""
for /f "tokens=*" %%a in (apkver.txt) do (
if !bool!==0 set /a tmpv=%%a
if !bool!==1 set info=!info!%%a
set /a bool = 1
)
del apkver.txt
rem Apk Multi-tool version code
set /a ver = 1
if /I %tmpv% EQU %ver% (goto :NOUPDATE)
if /I %tmpv% GTR %ver% (
wget http://update.apkmultitool.com/updates.txt
cls
IF EXIST updates.txt (
ECHO ***********************************************************************************
ECHO * *
ECHO * NEW UPDATES FOUND *
ECHO * *
ECHO ***********************************************************************************
PAUSE
goto changed
:regoto
PAUSE
Start cmd /c other\signer 3
exit
)
)
:NOUPDATE
ECHO ***********************************************************************************
ECHO * *
ECHO * NO UPDATES FOUND *
ECHO * *
ECHO ***********************************************************************************
PAUSE
goto RESTART
:SETDIR
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating project folder *
ECHO * *
ECHO ***********************************************************************************
mkdir projects
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating place-apk-here-for-modding folder *
ECHO * *
ECHO ***********************************************************************************
mkdir place-apk-here-for-modding
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating place-ogg-here folder *
ECHO * *
ECHO ***********************************************************************************
mkdir place-ogg-here
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating place-apk-here-to-batch-optimize folder *
ECHO * *
ECHO ***********************************************************************************
mkdir place-apk-here-to-batch-optimize
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating place-apk-here-for-signing folder *
ECHO * *
ECHO ***********************************************************************************
mkdir place-apk-here-for-signing
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating moving to THEME PORTER to Setup Folders *
ECHO * *
ECHO ***********************************************************************************
cd themer
ECHO ***********************************************************************************
ECHO * *
ECHO * Creating transferred folder *
ECHO * *
ECHO ***********************************************************************************
mkdir transferred
cd "%~dp0"
ECHO ***********************************************************************************
ECHO * *
ECHO * DIRECTORIES SCRIPT COMPLETED *
ECHO * *
ECHO ***********************************************************************************
PAUSE
GOTO RESTART
:FRAMRES
set menunr=GARBAGE2
cls
ECHO ***********************************************************************************
ECHO * *
ECHO * APK MULTI-TOOL SETUP DEPENDENCY FILES *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 1. Install framework-res.apk ^| 2. Install twframework-res.apk *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 3. Install com.htc.resources.apk ^| 4. Install SystemUI.apk *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 5. Install SemcGenericUxpRes.apk ^| 6. Install lidroid-res.apk *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 7. Install mediatek-res.apk ^| 8. Install framework-miui.apk *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 9. Pull Dependencies from Phone *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 10. Return to Main Menu *
ECHO * *
ECHO ***********************************************************************************
ECHO * *
ECHO * 00 Quit *
ECHO * *
ECHO ***********************************************************************************
SET /P menunr=Please make your decision:
IF %menunr%==1 (goto FRAMRES1)
IF %menunr%==2 (goto FRAMRES2)
IF %menunr%==3 (goto FRAMRES3)
IF %menunr%==4 (goto FRAMRES4)
IF %menunr%==5 (goto FRAMRES5)
IF %menunr%==6 (goto FRAMRES6)
IF %menunr%==7 (goto FRAMRES7)
IF %menunr%==8 (goto FRAMRES8)
IF %menunr%==9 (goto SYSTEMPULL)
IF %menunr%==10 (goto RESTART)
IF %menunr%==00 (goto QUIT)
:WHAT
echo You went crazy and entered something that wasn't part of the menu options
PAUSE
goto FRAMRES
:FRAMRES1
cls
cd other
Start "Installation of framework-res.apk Starting" apkinstall 1
goto FRAMRES
:FRAMRES2
cls
cd other
Start "Installation of twframework-res.apk Starting" apkinstall 2
goto FRAMRES
:FRAMRES3
cls
cd other
Start "Installation of com.htc.resources.apk Starting" apkinstall 3
goto FRAMRES
:FRAMRES4
cls
cd other
Start "Installation of SystemUI.apk Starting" apkinstall 4
goto FRAMRES
:FRAMRES5
cls
cd other
Start "Installation of SemcGenericUxpRes.apk Starting" apkinstall 5
goto FRAMRES
:FRAMRES6
cls
cd other
Start "Installation of lidroid-res.apk Starting" apkinstall 6
goto FRAMRES
:FRAMRES7
cls
cd other
Start "Installation of mediatek-res.apk Starting" apkinstall 7
goto FRAMRES
:FRAMRES8
cls
cd other
Start "Installation of framework-miui.apk Starting" apkinstall 8
goto FRAMRES
:SYSTEMPULL
cd other
Start "Pulling of the Android Dependencies Starting" system
goto FRAMRES
:ABOUT
cls
ECHO *********************************************************************************
ECHO * *
ECHO * About *
ECHO * *
ECHO *********************************************************************************
ECHO * *
type other\version.txt
ECHO * *
ECHO *********************************************************************************
ECHO * *
ECHO * Tips *
ECHO * *
ECHO *********************************************************************************
ECHO * *
ECHO * (a) If you see errors while this script is running please make sure all that *
ECHO * files are in there proper location if not uninstall and try again *
ECHO * *
ECHO *********************************************************************************
ECHO * *
ECHO * (b) This tool was by no means created to hack or be used for piracy of apps *
ECHO * *
ECHO *********************************************************************************
ECHO * *
ECHO * If you are stuck and the log does not give you any indication as to what you *
ECHO * are doing wrong, then post in the thread *
ECHO * http://forum.xda-developers.com/showthread.php?t=1460400 *
ECHO * Make sure you include your setuplog.txt if available. *
ECHO * *
ECHO *********************************************************************************
PAUSE
goto RESTART
:CHANGED
echo The Following Was Updated :
echo.
set /a cc = 1
:recursive
for /f "tokens=%cc% delims=\" %%b in ('echo %info%') do (
echo %%b
set /a cc = %cc% + 1
goto recursive
)
echo.
goto recall
:endloop
goto quit
:QUIT
exit
:END
exit