更新apktool版本

SmaliUtils可设置解包是否需要用加密
This commit is contained in:
Yutousama 2020-04-30 17:07:34 +08:00
parent 256d724150
commit c310907a1b
4 changed files with 4 additions and 1 deletions

Binary file not shown.

Binary file not shown.

BIN
libs/apktool_2.4.1.jar Normal file

Binary file not shown.

View File

@ -190,13 +190,16 @@ public class SmaliUtils {
} }
return old; return old;
} }
private boolean isEncryption=false;
public void unPack(String jarPath, SmaliApkToolsPath smaliApkToolsPath) { public void unPack(String jarPath, SmaliApkToolsPath smaliApkToolsPath) {
File path=new File(jarPath+".out"); File path=new File(jarPath+".out");
if(path.exists()&&path.isDirectory()) { if(path.exists()&&path.isDirectory()) {
Tools.deleteFiles(path.getAbsolutePath()); Tools.deleteFiles(path.getAbsolutePath());
} }
String[] args =new String[] {"d","-f",jarPath}; String[] args =new String[] {"d","-f",jarPath};
if(isEncryption){
args =new String[] {"d","-f",jarPath,"--only-main-classes"};
}
try { try {
for (String arg : args) { for (String arg : args) {
System.out.print(arg+" "); System.out.print(arg+" ");