SmaliUtils打包工具还是需要监听异常的。。。
This commit is contained in:
parent
ca4518724a
commit
d0404453ca
@ -5,13 +5,13 @@ import com.qy.ui.ApkSignUi;
|
|||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.BufferedReader;
|
import java.io.*;
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在广州梦娱网络科技有限公司工作时所用的打包工具
|
||||||
|
*/
|
||||||
public class AutoOutAPKTools {
|
public class AutoOutAPKTools {
|
||||||
private String gameId;
|
private String gameId;
|
||||||
private Map<String, String> channel;
|
private Map<String, String> channel;
|
||||||
@ -23,12 +23,15 @@ public class AutoOutAPKTools {
|
|||||||
this.gameId = gameId;
|
this.gameId = gameId;
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppPath(String path) {
|
public void setAppPath(String path) {
|
||||||
this.appPath = path;
|
this.appPath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setManifestMap(JSONObject map) {
|
public void setManifestMap(JSONObject map) {
|
||||||
this.manifestMap = map;
|
this.manifestMap = map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start(SmaliApkToolsPath inter) {
|
public void start(SmaliApkToolsPath inter) {
|
||||||
this.inter = inter;
|
this.inter = inter;
|
||||||
outLog("复制游戏文件夹");
|
outLog("复制游戏文件夹");
|
||||||
@ -49,9 +52,11 @@ public class AutoOutAPKTools {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
Tools.deleteFiles(appPath);
|
Tools.deleteFiles(appPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void alterManifest(File manifest) {
|
private void alterManifest(File manifest) {
|
||||||
String tmp;
|
String tmp;
|
||||||
StringBuilder str = new StringBuilder();
|
StringBuilder str = new StringBuilder();
|
||||||
@ -76,6 +81,7 @@ public class AutoOutAPKTools {
|
|||||||
System.out.println(str);
|
System.out.println(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void outAssets() {
|
private void outAssets() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append("GAME_ID=").append(gameId).append("\n");
|
builder.append("GAME_ID=").append(gameId).append("\n");
|
||||||
@ -85,6 +91,7 @@ public class AutoOutAPKTools {
|
|||||||
Tools.saveConfig(new File(appPath + File.separator + "assets" + File.separator + "kusdkconf.ini"),
|
Tools.saveConfig(new File(appPath + File.separator + "assets" + File.separator + "kusdkconf.ini"),
|
||||||
builder.toString());
|
builder.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void outLog(String log) {
|
private void outLog(String log) {
|
||||||
System.out.println(log);
|
System.out.println(log);
|
||||||
}
|
}
|
||||||
|
@ -287,8 +287,8 @@ public class SmaliUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
}).start();
|
||||||
//System.setSecurityManager(new NoExitSecurityManager());
|
System.setSecurityManager(new NoExitSecurityManager());
|
||||||
|
|
||||||
//Main.main(args);
|
//Main.main(args);
|
||||||
apktool_234.loadClass("brut.apktool.Main").getMethod("main",String[].class).invoke(null,new Object[]{args});
|
apktool_234.loadClass("brut.apktool.Main").getMethod("main",String[].class).invoke(null,new Object[]{args});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user