更新自动打包程序到UI界面
反编译默认处理加密包
This commit is contained in:
parent
c310907a1b
commit
75fc8065c2
@ -30,15 +30,12 @@ import javax.swing.SwingConstants;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.border.LineBorder;
|
||||
|
||||
import com.qy.utils.*;
|
||||
import com.sun.javaws.exceptions.ExitException;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.qy.Interfaces.SmaliApkToolsPath;
|
||||
import com.qy.utils.EncryptJar;
|
||||
import com.qy.utils.JarToAJar;
|
||||
import com.qy.utils.JarToBase;
|
||||
import com.qy.utils.Tools;
|
||||
|
||||
public class AppMain extends JFrame {
|
||||
private JList<String> configList;
|
||||
@ -105,7 +102,7 @@ public class AppMain extends JFrame {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
}
|
||||
setTitle("\u8F6C\u6362\u5668v2.8");
|
||||
setTitle("\u8F6C\u6362\u5668v2.9");
|
||||
// TODO Auto-generated constructor stub
|
||||
setSize(900, 456);
|
||||
getContentPane().setLayout(null);
|
||||
@ -512,6 +509,29 @@ public class AppMain extends JFrame {
|
||||
});
|
||||
menu.add(csj);
|
||||
|
||||
JMenuItem autoSDK=new JMenuItem("自动生成SDK");
|
||||
autoSDK.addActionListener(new ActionListener() {
|
||||
String version;
|
||||
String packageName;
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new EditToDalog("提示", "请输入版本号", "", path -> {
|
||||
if(!Tools.stringIsNull(path)){
|
||||
version=path;
|
||||
new EditToDalog("提示", "请输入包名", "com.prujwk.jdyphn", path1 -> {
|
||||
if(!Tools.stringIsNull(path1)){
|
||||
packageName= path1;
|
||||
autoPackageSdk();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
public void autoPackageSdk(){
|
||||
new AutoPackageSDK(path -> new TextToDalog("提示",String.format("打包完成%s",path)),version,packageName);
|
||||
}
|
||||
});
|
||||
menu.add(autoSDK);
|
||||
|
||||
mnBasetools = new JMenu("Base64\u5DE5\u5177");
|
||||
menuBar.add(mnBasetools);
|
||||
|
@ -84,8 +84,9 @@ public class AutoPackageSDK {
|
||||
delete(qysdkPath,qysdk);
|
||||
outAssetsADS(path);
|
||||
copy();
|
||||
zip();
|
||||
System.out.println("制作SDK完成");
|
||||
File sdk=zip();
|
||||
System.out.println("制作SDK完成:");
|
||||
inter.smaliPath(sdk==null?"sdk打包失败":sdk.getAbsolutePath());
|
||||
}
|
||||
private void delete(File path,File sdk){
|
||||
for (File file : path.listFiles()) {
|
||||
@ -183,7 +184,7 @@ public class AutoPackageSDK {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
private void zip(File file) throws Exception {
|
||||
private File zip(File file) throws Exception {
|
||||
String cd = "cd " + new File("packageSDK").getAbsolutePath();
|
||||
File sdk = new File("packageSDK" + File.separator + "sdk.aar");
|
||||
File files=new File("packageSDK");
|
||||
@ -202,8 +203,10 @@ public class AutoPackageSDK {
|
||||
}
|
||||
|
||||
}
|
||||
return sdk;
|
||||
}
|
||||
private void zip() {
|
||||
private File zip() {
|
||||
File sdk=null;
|
||||
try {
|
||||
Tools.copyFile(new File("input" + File.separator + "Documents" + File.separator + "sdk.aar").getAbsolutePath(),
|
||||
new File("packageSDK").getAbsolutePath(), true);
|
||||
@ -214,7 +217,7 @@ public class AutoPackageSDK {
|
||||
stream.flush();
|
||||
stream.close();
|
||||
process.destroy();
|
||||
zip(new File("packageSDK"));
|
||||
sdk=zip(new File("packageSDK"));
|
||||
File copy=new File("packageSDK"+File.separator+"copy");
|
||||
if(copy.exists()){
|
||||
zip(copy);
|
||||
@ -223,7 +226,9 @@ public class AutoPackageSDK {
|
||||
process.destroy();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
return sdk;
|
||||
}
|
||||
private void copy(){
|
||||
try{
|
||||
@ -241,7 +246,8 @@ public class AutoPackageSDK {
|
||||
@Override
|
||||
public void smaliPath(String path) {
|
||||
//com.tanggttaxc.langtt.mi
|
||||
System.out.println(">"+path);
|
||||
}
|
||||
}, "5700", a==0?"com.luckyboy.mmxing":"com.prujwk.jdyphn");
|
||||
}, "5800", a==0?"com.luckyboy.mmxing":"com.prujwk.jdyphn");
|
||||
}
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ public class SmaliUtils {
|
||||
}
|
||||
return old;
|
||||
}
|
||||
private boolean isEncryption=false;
|
||||
private boolean isEncryption=true;
|
||||
public void unPack(String jarPath, SmaliApkToolsPath smaliApkToolsPath) {
|
||||
File path=new File(jarPath+".out");
|
||||
if(path.exists()&&path.isDirectory()) {
|
||||
|
Loading…
Reference in New Issue
Block a user