其他分享
首页 > 其他分享> > apktool.bat 脚本

apktool.bat 脚本

作者:互联网

apktool.bat 无法下载的解决方案

创建一个apktool.bat的空文件

把下面的代码复制进去

保存 ,执行即可

 1 @echo off
 2 setlocal
 3 set BASENAME=apktool_
 4 chcp 65001 2>nul >nul
 5  
 6  
 7 set java_exe=java.exe
 8  
 9  
10 if defined JAVA_HOME (
11 set java_exe="%JAVA_HOME%\bin\java.exe"
12 )
13  
14  
15 rem Find the highest version .jar available in the same directory as the script
16 setlocal EnableDelayedExpansion
17 pushd "%~dp0"
18 if exist apktool.jar (
19 set BASENAME=apktool
20 goto skipversioned
21 )
22 set max=0
23 for /f "tokens=1* delims=-_.0" %%A in ('dir /b /a-d %BASENAME%*.jar') do if %%~B gtr !max! set max=%%~nB
24 :skipversioned
25 popd
26 setlocal DisableDelayedExpansion
27  
28  
29 rem Find out if the commandline is a parameterless .jar or directory, for fast unpack/repack
30 if "%~1"=="" goto load
31 if not "%~2"=="" goto load
32 set ATTR=%~a1
33 if "%ATTR:~0,1%"=="d" (
34 rem Directory, rebuild
35 set fastCommand=b
36 )
37 if "%ATTR:~0,1%"=="-" if "%~x1"==".apk" (
38 rem APK file, unpack
39 set fastCommand=d
40 )
41  
42  
43 :load
44 %java_exe% -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0%BASENAME%%max%.jar" %fastCommand% %*
45  
46  
47 rem Pause when ran non interactively
48 for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" pause

 

标签:脚本,bat,set,java,apktool,jar,exe,rem
来源: https://www.cnblogs.com/acheng1011/p/16377490.html