-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconvert.bat
More file actions
23 lines (23 loc) · 1.1 KB
/
convert.bat
File metadata and controls
23 lines (23 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@echo off
del /q baseapk.apk
"tools\7z.exe" x "baseapk.7z" -o%~dp0tmp_convert
echo ^<Converter^>[92m Successfully extracted the 7z archive. [0m
"tools\7z.exe" a -tzip "baseapk.apk" "%~dp0tmp_convert\*" -mx9 -aoa
echo ^<Converter^>[92m Successfully converted the 7z archive to an apk. [0m
rd /s /q %~dp0tmp_convert
echo ^<Converter^>[92m Successfully deleted the temporary directory. [0m
echo ^<Converter^>[92m Checking if the converted apk is OK. [0m
for /f "tokens=2 delims=: " %%a in ('tools\aapt.exe dump badging baseapk.apk ^| findstr "package"') do (
set "PACKAGE_NAME=%%a"
)
for /f "tokens=4 delims=: " %%a in ('tools\aapt.exe dump badging baseapk.apk ^| findstr "package"') do (
set "VERSION_NAME=%%a"
)
echo ^<Compiler^>[92m %PACKAGE_NAME% [0m
echo ^<Compiler^>[92m %VERSION_NAME% [0m
if "%PACKAGE_NAME%"=="name='com.homy.graffiti.uc'" if "%VERSION_NAME%"=="versionName='1.0.6'" (
echo ^<Compiler^>[92m Correct APK! You can now compile... [0m
) else (
echo ^<Compiler^>[91m Wrong APK! Please find the correct apk. Correct Package Name: com.homy.graffiti.uc, Correct Version: 1.0.6. [0m
)
pause