提交 fd4289aa 编写于 作者: N NeoSpb

fix save AndroidManifest.xml when jadx-gui used

上级 716db8b9
......@@ -108,7 +108,25 @@ public final class JadxDecompiler {
parse();
}
public void parseAndSaveXML() {
if (this.args.isXMLTest()) {
InputFile inf = inputFiles.get(0);
try {
byte[] buffer = InputFile.loadXMLBuffer(inf.getFile());
if (buffer != null) {
File out = new File(outDir, "AndroidManifest.xml");
BinaryXMLParser bxp = new BinaryXMLParser(root);
bxp.parse(buffer, out);
}
} catch (Exception e) {
LOG.info("Decompiling AndroidManifest.xml failed!", e);
}
}
}
public void save() {
parseAndSaveXML();
try {
ExecutorService ex = getSaveExecutor();
ex.shutdown();
......@@ -204,20 +222,6 @@ public final class JadxDecompiler {
root = new RootNode();
LOG.info("loading ...");
root.load(inputFiles);
if (this.args.isXMLTest()) {
InputFile inf = inputFiles.get(0);
try {
byte[] buffer = InputFile.loadXMLBuffer(inf.getFile());
if (buffer != null) {
File out = new File(args.getOutDir(), "AndroidManifest.xml");
BinaryXMLParser bxp = new BinaryXMLParser(root);
bxp.parse(buffer, out);
}
} catch (Exception e) {
LOG.info("Decompiling AndroidManifest.xml failed!", e);
}
}
}
void processClass(ClassNode cls) {
......
......@@ -42,6 +42,7 @@ public class JadxWrapper {
public void run() {
try {
decompiler.setOutputDir(dir);
decompiler.parseAndSaveXML();
ThreadPoolExecutor ex = (ThreadPoolExecutor) decompiler.getSaveExecutor();
ex.shutdown();
while (ex.isTerminating()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册