Add jadx-gui, restructure src directory
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package jadx;
|
||||
package jadx.cli;
|
||||
|
||||
import jadx.utils.exceptions.JadxException;
|
||||
import jadx.utils.files.InputFile;
|
||||
import jadx.core.Consts;
|
||||
import jadx.api.IJadxArgs;
|
||||
import jadx.core.utils.exceptions.JadxException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
@@ -21,7 +21,7 @@ import com.beust.jcommander.ParameterException;
|
||||
public class JadxArgs implements IJadxArgs {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JadxArgs.class);
|
||||
|
||||
@Parameter(description = "<input files> (.dex, .apk, .jar or .class)", required = true)
|
||||
@Parameter(description = "<input files> (.dex, .apk, .jar or .class)")
|
||||
protected List<String> files;
|
||||
|
||||
@Parameter(names = {"-d", "--output-dir"}, description = "output directory")
|
||||
@@ -45,10 +45,18 @@ public class JadxArgs implements IJadxArgs {
|
||||
@Parameter(names = {"-h", "--help"}, description = "print this help", help = true)
|
||||
protected boolean printHelp = false;
|
||||
|
||||
private final List<InputFile> input = new ArrayList<InputFile>();
|
||||
private final List<File> input = new ArrayList<File>();
|
||||
private File outputDir;
|
||||
|
||||
public void parse(String[] args) {
|
||||
private final boolean inputRequired;
|
||||
|
||||
public JadxArgs(String[] args, boolean inputRequired) {
|
||||
this.inputRequired = inputRequired;
|
||||
parse(args);
|
||||
checkArguments();
|
||||
}
|
||||
|
||||
private void parse(String[] args) {
|
||||
try {
|
||||
new JCommander(this, args);
|
||||
} catch (ParameterException e) {
|
||||
@@ -58,30 +66,47 @@ public class JadxArgs implements IJadxArgs {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkArguments() {
|
||||
if (isPrintHelp()) {
|
||||
printUsage();
|
||||
System.exit(0);
|
||||
}
|
||||
if (isVerbose()) {
|
||||
ch.qos.logback.classic.Logger rootLogger =
|
||||
(ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
rootLogger.setLevel(ch.qos.logback.classic.Level.DEBUG);
|
||||
}
|
||||
try {
|
||||
processArgs();
|
||||
} catch (JadxException e) {
|
||||
LOG.error(e.getMessage());
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public void processArgs() throws JadxException {
|
||||
if (printHelp)
|
||||
return;
|
||||
|
||||
if (files == null || files.isEmpty())
|
||||
throw new JadxException("Please specify at least one input file");
|
||||
if (threadsCount <= 0)
|
||||
throw new JadxException("Threads count must be positive");
|
||||
|
||||
for (String fileName : files) {
|
||||
File file = new File(fileName);
|
||||
if (!file.exists())
|
||||
throw new JadxException("File not found: " + file);
|
||||
|
||||
try {
|
||||
input.add(new InputFile(file));
|
||||
} catch (IOException e) {
|
||||
throw new JadxException("File processing error: " + file, e);
|
||||
if (files != null) {
|
||||
for (String fileName : files) {
|
||||
File file = new File(fileName);
|
||||
if (file.exists())
|
||||
input.add(file);
|
||||
else
|
||||
throw new JadxException("File not found: " + file);
|
||||
}
|
||||
}
|
||||
|
||||
if (input.isEmpty())
|
||||
throw new JadxException("No files with correct extension (must be '.dex', '.class' or '.jar')");
|
||||
|
||||
if (threadsCount <= 0)
|
||||
throw new JadxException("Threads count must be positive");
|
||||
if (input.isEmpty()) {
|
||||
if (inputRequired)
|
||||
throw new JadxException("Please specify at least one input file");
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if (outDirName == null) {
|
||||
File file = new File(files.get(0));
|
||||
@@ -123,13 +148,15 @@ public class JadxArgs implements IJadxArgs {
|
||||
Field[] fields = this.getClass().getDeclaredFields();
|
||||
for (Field f : fields) {
|
||||
for (ParameterDescription p : params) {
|
||||
if (f.getName().equals(p.getParameterized().getName())) {
|
||||
String name = f.getName();
|
||||
if (name.equals(p.getParameterized().getName())) {
|
||||
StringBuilder opt = new StringBuilder();
|
||||
opt.append(' ').append(p.getNames());
|
||||
addSpaces(opt, maxNamesLen - opt.length() + 2);
|
||||
opt.append("- ").append(p.getDescription());
|
||||
if (p.getParameter().required())
|
||||
if (inputRequired && name.equals("files")) {
|
||||
opt.append(" [required]");
|
||||
}
|
||||
out.println(opt.toString());
|
||||
break;
|
||||
}
|
||||
@@ -165,7 +192,7 @@ public class JadxArgs implements IJadxArgs {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InputFile> getInput() {
|
||||
public List<File> getInput() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package jadx.cli;
|
||||
|
||||
import jadx.api.Decompiler;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class JadxCLI {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JadxCLI.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
JadxArgs jadxArgs = new JadxArgs(args, true);
|
||||
Decompiler jadx = new Decompiler(jadxArgs);
|
||||
jadx.processAndSaveAll();
|
||||
LOG.info("done");
|
||||
System.exit(jadx.getErrorsCount());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package jadx.api;
|
||||
|
||||
import jadx.core.Jadx;
|
||||
import jadx.core.ProcessClass;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.RootNode;
|
||||
import jadx.core.dex.visitors.IDexTreeVisitor;
|
||||
import jadx.core.dex.visitors.SaveCode;
|
||||
import jadx.core.utils.ErrorsCounter;
|
||||
import jadx.core.utils.exceptions.CodegenException;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
import jadx.core.utils.files.InputFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public final class Decompiler {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Decompiler.class);
|
||||
|
||||
private final IJadxArgs args;
|
||||
private final List<InputFile> inputFiles = new ArrayList<InputFile>();
|
||||
|
||||
private RootNode root;
|
||||
private List<IDexTreeVisitor> passes;
|
||||
private int errorsCount;
|
||||
|
||||
public Decompiler(IJadxArgs jadxArgs) {
|
||||
this.args = jadxArgs;
|
||||
this.passes = Jadx.getPassesList(args);
|
||||
}
|
||||
|
||||
public void processAndSaveAll() {
|
||||
try {
|
||||
loadInput();
|
||||
parseDex();
|
||||
saveAll();
|
||||
} catch (Throwable e) {
|
||||
LOG.error("jadx error:", e);
|
||||
} finally {
|
||||
errorsCount = ErrorsCounter.getErrorCount();
|
||||
if (errorsCount != 0)
|
||||
ErrorsCounter.printReport();
|
||||
}
|
||||
}
|
||||
|
||||
public void loadFile(File file) throws IOException, DecodeException {
|
||||
List<File> files = args.getInput();
|
||||
files.clear();
|
||||
files.add(file);
|
||||
|
||||
loadInput();
|
||||
parseDex();
|
||||
}
|
||||
|
||||
public List<JavaClass> getClasses() {
|
||||
List<JavaClass> classes = new ArrayList<JavaClass>(root.getClasses().size());
|
||||
for (ClassNode classNode : root.getClasses()) {
|
||||
classes.add(new JavaClass(this, classNode));
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
|
||||
public List<JavaPackage> getPackages() {
|
||||
List<JavaClass> classes = getClasses();
|
||||
Map<String, List<JavaClass>> map = new HashMap<String, List<JavaClass>>();
|
||||
for (JavaClass javaClass : classes) {
|
||||
String pkg = javaClass.getPackage();
|
||||
List<JavaClass> clsList = map.get(pkg);
|
||||
if (clsList == null) {
|
||||
clsList = new ArrayList<JavaClass>();
|
||||
map.put(pkg, clsList);
|
||||
}
|
||||
clsList.add(javaClass);
|
||||
}
|
||||
List<JavaPackage> packages = new ArrayList<JavaPackage>(map.size());
|
||||
for (Map.Entry<String, List<JavaClass>> entry : map.entrySet()) {
|
||||
packages.add(new JavaPackage(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
Collections.sort(packages);
|
||||
return packages;
|
||||
}
|
||||
|
||||
public void saveAll() throws InterruptedException {
|
||||
int threadsCount = args.getThreadsCount();
|
||||
LOG.debug("processing threads count: {}", threadsCount);
|
||||
|
||||
ArrayList<IDexTreeVisitor> passList = new ArrayList<IDexTreeVisitor>(passes);
|
||||
SaveCode savePass = new SaveCode(args);
|
||||
passList.add(savePass);
|
||||
|
||||
LOG.info("processing ...");
|
||||
ExecutorService executor = Executors.newFixedThreadPool(threadsCount);
|
||||
for (ClassNode cls : root.getClasses()) {
|
||||
if (cls.getCode() == null) {
|
||||
ProcessClass job = new ProcessClass(cls, passList);
|
||||
executor.execute(job);
|
||||
} else {
|
||||
try {
|
||||
savePass.visit(cls);
|
||||
} catch (CodegenException e) {
|
||||
LOG.error("Can't save class {}", cls, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
executor.shutdown();
|
||||
executor.awaitTermination(100, TimeUnit.DAYS);
|
||||
}
|
||||
|
||||
private void loadInput() throws IOException, DecodeException {
|
||||
for (File file : args.getInput()) {
|
||||
inputFiles.add(new InputFile(file));
|
||||
}
|
||||
}
|
||||
|
||||
private void parseDex() throws DecodeException {
|
||||
ClassInfo.clearCache();
|
||||
ErrorsCounter.reset();
|
||||
|
||||
root = new RootNode(args, inputFiles);
|
||||
LOG.info("loading ...");
|
||||
root.load();
|
||||
root.init();
|
||||
}
|
||||
|
||||
void processClass(ClassNode cls) {
|
||||
try {
|
||||
ProcessClass job = new ProcessClass(cls, passes);
|
||||
LOG.info("processing class {} ...", cls);
|
||||
job.run();
|
||||
} catch (Throwable e) {
|
||||
LOG.error("Process class error", e);
|
||||
}
|
||||
}
|
||||
|
||||
public int getErrorsCount() {
|
||||
return errorsCount;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package jadx;
|
||||
|
||||
import jadx.utils.files.InputFile;
|
||||
package jadx.api;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public interface IJadxArgs {
|
||||
List<File> getInput();
|
||||
|
||||
File getOutDir();
|
||||
|
||||
int getThreadsCount();
|
||||
@@ -14,8 +14,6 @@ public interface IJadxArgs {
|
||||
|
||||
boolean isRawCFGOutput();
|
||||
|
||||
List<InputFile> getInput();
|
||||
|
||||
boolean isFallbackMode();
|
||||
|
||||
boolean isVerbose();
|
||||
@@ -0,0 +1,41 @@
|
||||
package jadx.api;
|
||||
|
||||
import jadx.core.codegen.CodeWriter;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
|
||||
public final class JavaClass {
|
||||
|
||||
private final Decompiler decompiler;
|
||||
private final ClassNode cls;
|
||||
|
||||
JavaClass(Decompiler decompiler, ClassNode classNode) {
|
||||
this.decompiler = decompiler;
|
||||
this.cls = classNode;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
CodeWriter code = cls.getCode();
|
||||
if(code == null) {
|
||||
decompiler.processClass(cls);
|
||||
code = cls.getCode();
|
||||
}
|
||||
return code != null ? code.toString() : "error processing class";
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return cls.getFullName();
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return cls.getShortName();
|
||||
}
|
||||
|
||||
public String getPackage() {
|
||||
return cls.getPackage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getFullName();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package jadx.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class JavaPackage implements Comparable<JavaPackage> {
|
||||
private final String name;
|
||||
private final List<JavaClass> classes;
|
||||
|
||||
JavaPackage(String name, List<JavaClass> classes) {
|
||||
this.name = name;
|
||||
this.classes = classes;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<JavaClass> getClasses() {
|
||||
return classes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(JavaPackage o) {
|
||||
return name.compareTo(o.name);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package jadx;
|
||||
package jadx.core;
|
||||
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
public class Consts {
|
||||
public static final String JADX_VERSION = Utils.getJadxVersion();
|
||||
@@ -0,0 +1,75 @@
|
||||
package jadx.core;
|
||||
|
||||
import jadx.api.IJadxArgs;
|
||||
import jadx.core.codegen.CodeGen;
|
||||
import jadx.core.dex.visitors.BlockMakerVisitor;
|
||||
import jadx.core.dex.visitors.ClassModifier;
|
||||
import jadx.core.dex.visitors.CodeShrinker;
|
||||
import jadx.core.dex.visitors.ConstInlinerVisitor;
|
||||
import jadx.core.dex.visitors.DotGraphVisitor;
|
||||
import jadx.core.dex.visitors.EnumVisitor;
|
||||
import jadx.core.dex.visitors.FallbackModeVisitor;
|
||||
import jadx.core.dex.visitors.IDexTreeVisitor;
|
||||
import jadx.core.dex.visitors.MethodInlinerVisitor;
|
||||
import jadx.core.dex.visitors.ModVisitor;
|
||||
import jadx.core.dex.visitors.regions.CheckRegions;
|
||||
import jadx.core.dex.visitors.regions.CleanRegions;
|
||||
import jadx.core.dex.visitors.regions.PostRegionVisitor;
|
||||
import jadx.core.dex.visitors.regions.ProcessVariables;
|
||||
import jadx.core.dex.visitors.regions.RegionMakerVisitor;
|
||||
import jadx.core.dex.visitors.typeresolver.FinishTypeResolver;
|
||||
import jadx.core.dex.visitors.typeresolver.TypeResolver;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class Jadx {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Jadx.class);
|
||||
|
||||
static {
|
||||
if (Consts.DEBUG)
|
||||
LOG.info("debug enabled");
|
||||
if (Jadx.class.desiredAssertionStatus())
|
||||
LOG.info("assertions enabled");
|
||||
}
|
||||
|
||||
public static List<IDexTreeVisitor> getPassesList(IJadxArgs args) {
|
||||
List<IDexTreeVisitor> passes = new ArrayList<IDexTreeVisitor>();
|
||||
if (args.isFallbackMode()) {
|
||||
passes.add(new FallbackModeVisitor());
|
||||
} else {
|
||||
passes.add(new BlockMakerVisitor());
|
||||
|
||||
passes.add(new TypeResolver());
|
||||
passes.add(new ConstInlinerVisitor());
|
||||
passes.add(new FinishTypeResolver());
|
||||
|
||||
if (args.isRawCFGOutput())
|
||||
passes.add(new DotGraphVisitor(args.getOutDir(), false, true));
|
||||
|
||||
passes.add(new ModVisitor());
|
||||
passes.add(new EnumVisitor());
|
||||
|
||||
if (args.isCFGOutput())
|
||||
passes.add(new DotGraphVisitor(args.getOutDir(), false));
|
||||
|
||||
passes.add(new RegionMakerVisitor());
|
||||
passes.add(new PostRegionVisitor());
|
||||
|
||||
passes.add(new CodeShrinker());
|
||||
passes.add(new ProcessVariables());
|
||||
passes.add(new CheckRegions());
|
||||
if (args.isCFGOutput())
|
||||
passes.add(new DotGraphVisitor(args.getOutDir(), true));
|
||||
|
||||
passes.add(new MethodInlinerVisitor());
|
||||
passes.add(new ClassModifier());
|
||||
passes.add(new CleanRegions());
|
||||
}
|
||||
passes.add(new CodeGen(args));
|
||||
return passes;
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -1,22 +1,22 @@
|
||||
package jadx;
|
||||
package jadx.core;
|
||||
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.visitors.DepthTraverser;
|
||||
import jadx.dex.visitors.IDexTreeVisitor;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.visitors.DepthTraverser;
|
||||
import jadx.core.dex.visitors.IDexTreeVisitor;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
class ProcessClass implements Runnable {
|
||||
public final class ProcessClass implements Runnable {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ProcessClass.class);
|
||||
|
||||
private final ClassNode cls;
|
||||
private final List<IDexTreeVisitor> passes;
|
||||
|
||||
ProcessClass(ClassNode cls, List<IDexTreeVisitor> passes) {
|
||||
public ProcessClass(ClassNode cls, List<IDexTreeVisitor> passes) {
|
||||
this.cls = cls;
|
||||
this.passes = passes;
|
||||
}
|
||||
+14
-14
@@ -1,18 +1,18 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttributeNode;
|
||||
import jadx.dex.attributes.annotations.Annotation;
|
||||
import jadx.dex.attributes.annotations.AnnotationsList;
|
||||
import jadx.dex.attributes.annotations.MethodParameters;
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.FieldNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.StringUtils;
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttributeNode;
|
||||
import jadx.core.dex.attributes.annotations.Annotation;
|
||||
import jadx.core.dex.attributes.annotations.AnnotationsList;
|
||||
import jadx.core.dex.attributes.annotations.MethodParameters;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.FieldNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.StringUtils;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
+20
-20
@@ -1,24 +1,24 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.attributes.AttributeFlag;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.EnumClassAttr;
|
||||
import jadx.dex.attributes.EnumClassAttr.EnumField;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.dex.attributes.SourceFileAttr;
|
||||
import jadx.dex.info.AccessInfo;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.FieldNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.nodes.parser.FieldValueAttr;
|
||||
import jadx.utils.ErrorsCounter;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.utils.exceptions.CodegenException;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.attributes.AttributeFlag;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.EnumClassAttr;
|
||||
import jadx.core.dex.attributes.EnumClassAttr.EnumField;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.attributes.SourceFileAttr;
|
||||
import jadx.core.dex.info.AccessInfo;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.FieldNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.nodes.parser.FieldValueAttr;
|
||||
import jadx.core.utils.ErrorsCounter;
|
||||
import jadx.core.utils.Utils;
|
||||
import jadx.core.utils.exceptions.CodegenException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+13
-9
@@ -1,9 +1,9 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.IJadxArgs;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.visitors.AbstractVisitor;
|
||||
import jadx.utils.exceptions.CodegenException;
|
||||
import jadx.api.IJadxArgs;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.visitors.AbstractVisitor;
|
||||
import jadx.core.utils.exceptions.CodegenException;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -21,10 +21,14 @@ public class CodeGen extends AbstractVisitor {
|
||||
public boolean visit(ClassNode cls) throws CodegenException {
|
||||
ClassGen clsGen = new ClassGen(cls, null, isFallbackMode());
|
||||
CodeWriter clsCode = clsGen.makeClass();
|
||||
String fileName = cls.getClassInfo().getFullPath() + ".java";
|
||||
if (isFallbackMode())
|
||||
fileName += ".jadx";
|
||||
clsCode.save(dir, fileName);
|
||||
|
||||
cls.setCode(clsCode);
|
||||
|
||||
// String fileName = cls.getClassInfo().getFullPath() + ".java";
|
||||
// if (isFallbackMode())
|
||||
// fileName += ".jadx";
|
||||
// clsCode.save(dir, fileName);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
+29
-29
@@ -1,33 +1,33 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.dex.attributes.MethodInlineAttr;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.ArithNode;
|
||||
import jadx.dex.instructions.ArithOp;
|
||||
import jadx.dex.instructions.FillArrayOp;
|
||||
import jadx.dex.instructions.GotoNode;
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.IndexInsnNode;
|
||||
import jadx.dex.instructions.InvokeNode;
|
||||
import jadx.dex.instructions.InvokeType;
|
||||
import jadx.dex.instructions.SwitchNode;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.dex.instructions.args.LiteralArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.instructions.mods.ConstructorInsn;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.FieldNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.nodes.RootNode;
|
||||
import jadx.utils.StringUtils;
|
||||
import jadx.utils.exceptions.CodegenException;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.attributes.MethodInlineAttr;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.ArithNode;
|
||||
import jadx.core.dex.instructions.ArithOp;
|
||||
import jadx.core.dex.instructions.FillArrayOp;
|
||||
import jadx.core.dex.instructions.GotoNode;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.IndexInsnNode;
|
||||
import jadx.core.dex.instructions.InvokeNode;
|
||||
import jadx.core.dex.instructions.InvokeType;
|
||||
import jadx.core.dex.instructions.SwitchNode;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.core.dex.instructions.args.LiteralArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.instructions.mods.ConstructorInsn;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.FieldNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.nodes.RootNode;
|
||||
import jadx.core.utils.StringUtils;
|
||||
import jadx.core.utils.exceptions.CodegenException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
+23
-23
@@ -1,24 +1,24 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.attributes.AttributeFlag;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.AttributesList;
|
||||
import jadx.dex.attributes.JadxErrorAttr;
|
||||
import jadx.dex.attributes.annotations.MethodParameters;
|
||||
import jadx.dex.info.AccessInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.trycatch.CatchAttr;
|
||||
import jadx.dex.visitors.DepthTraverser;
|
||||
import jadx.dex.visitors.FallbackModeVisitor;
|
||||
import jadx.utils.ErrorsCounter;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.utils.exceptions.CodegenException;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.dex.attributes.AttributeFlag;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.AttributesList;
|
||||
import jadx.core.dex.attributes.JadxErrorAttr;
|
||||
import jadx.core.dex.attributes.annotations.MethodParameters;
|
||||
import jadx.core.dex.info.AccessInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.trycatch.CatchAttr;
|
||||
import jadx.core.dex.visitors.DepthTraverser;
|
||||
import jadx.core.dex.visitors.FallbackModeVisitor;
|
||||
import jadx.core.utils.ErrorsCounter;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
import jadx.core.utils.Utils;
|
||||
import jadx.core.utils.exceptions.CodegenException;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -177,7 +177,7 @@ public class MethodGen {
|
||||
|
||||
/**
|
||||
* Put variable declaration and return variable name (used for assignments)
|
||||
*
|
||||
*
|
||||
* @param arg
|
||||
* register variable
|
||||
* @return variable name
|
||||
@@ -264,13 +264,13 @@ public class MethodGen {
|
||||
|
||||
private void makeFallbackMethod(CodeWriter code, MethodNode mth) {
|
||||
if (mth.getInstructions() == null) {
|
||||
// load original instructions
|
||||
// loadFile original instructions
|
||||
try {
|
||||
mth.load();
|
||||
DepthTraverser.visit(new FallbackModeVisitor(), mth);
|
||||
} catch (DecodeException e) {
|
||||
// ignore
|
||||
code.startLine("Can't load method instructions");
|
||||
code.startLine("Can't loadFile method instructions");
|
||||
return;
|
||||
}
|
||||
}
|
||||
+29
-29
@@ -1,33 +1,33 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.dex.attributes.AttributeFlag;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.DeclareVariableAttr;
|
||||
import jadx.dex.attributes.ForceReturnAttr;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.dex.instructions.IfOp;
|
||||
import jadx.dex.instructions.SwitchNode;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.LiteralArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.IBlock;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.regions.IfCondition;
|
||||
import jadx.dex.regions.IfRegion;
|
||||
import jadx.dex.regions.LoopRegion;
|
||||
import jadx.dex.regions.Region;
|
||||
import jadx.dex.regions.SwitchRegion;
|
||||
import jadx.dex.regions.SynchronizedRegion;
|
||||
import jadx.dex.trycatch.CatchAttr;
|
||||
import jadx.dex.trycatch.ExceptionHandler;
|
||||
import jadx.dex.trycatch.TryCatchBlock;
|
||||
import jadx.utils.ErrorsCounter;
|
||||
import jadx.utils.RegionUtils;
|
||||
import jadx.utils.exceptions.CodegenException;
|
||||
import jadx.core.dex.attributes.AttributeFlag;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.DeclareVariableAttr;
|
||||
import jadx.core.dex.attributes.ForceReturnAttr;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.instructions.IfOp;
|
||||
import jadx.core.dex.instructions.SwitchNode;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.LiteralArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.IBlock;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.regions.IfCondition;
|
||||
import jadx.core.dex.regions.IfRegion;
|
||||
import jadx.core.dex.regions.LoopRegion;
|
||||
import jadx.core.dex.regions.Region;
|
||||
import jadx.core.dex.regions.SwitchRegion;
|
||||
import jadx.core.dex.regions.SynchronizedRegion;
|
||||
import jadx.core.dex.trycatch.CatchAttr;
|
||||
import jadx.core.dex.trycatch.ExceptionHandler;
|
||||
import jadx.core.dex.trycatch.TryCatchBlock;
|
||||
import jadx.core.utils.ErrorsCounter;
|
||||
import jadx.core.utils.RegionUtils;
|
||||
import jadx.core.utils.exceptions.CodegenException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+7
-7
@@ -1,10 +1,10 @@
|
||||
package jadx.codegen;
|
||||
package jadx.core.codegen;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.PrimitiveType;
|
||||
import jadx.utils.StringUtils;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.PrimitiveType;
|
||||
import jadx.core.utils.StringUtils;
|
||||
import jadx.core.utils.Utils;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
public class TypeGen {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class TypeGen {
|
||||
|
||||
/**
|
||||
* Convert literal value to string according to value type
|
||||
*
|
||||
*
|
||||
* @throws JadxRuntimeException
|
||||
* for incorrect type or literal value
|
||||
*/
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.deobf;
|
||||
package jadx.core.deobf;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
public abstract class AttrNode implements IAttributeNode {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
public enum AttributeFlag {
|
||||
TRY_ENTER,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
public enum AttributeType {
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.attributes.annotations.Annotation;
|
||||
import jadx.dex.attributes.annotations.AnnotationsList;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.attributes.annotations.Annotation;
|
||||
import jadx.core.dex.attributes.annotations.AnnotationsList;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.instructions.args.TypedVar;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.instructions.args.TypedVar;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
|
||||
public final class BlockRegState {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
public class ForceReturnAttr implements IAttribute {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
public interface IAttribute {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
public interface IAttributeNode {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
public class JadxErrorAttr implements IAttribute {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
public class JumpAttribute implements IAttribute {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.utils.BlockUtils;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.utils.BlockUtils;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
|
||||
public class MethodInlineAttr implements IAttribute {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.attributes;
|
||||
package jadx.core.dex.attributes;
|
||||
|
||||
public class SourceFileAttr implements IAttribute {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.attributes.annotations;
|
||||
package jadx.core.dex.attributes.annotations;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.attributes.annotations;
|
||||
package jadx.core.dex.attributes.annotations;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.attributes.annotations;
|
||||
package jadx.core.dex.attributes.annotations;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.info;
|
||||
package jadx.core.dex.info;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.core.Consts;
|
||||
|
||||
import com.android.dx.rop.code.AccessFlags;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.info;
|
||||
package jadx.core.dex.info;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.deobf.NameMapper;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.deobf.NameMapper;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.info;
|
||||
package jadx.core.dex.info;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
|
||||
import com.android.dx.io.FieldId;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.info;
|
||||
package jadx.core.dex.info;
|
||||
|
||||
import jadx.codegen.TypeGen;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.codegen.TypeGen;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
import com.android.dx.io.instructions.DecodedInstruction;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
public enum ArithOp {
|
||||
ADD("+"),
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.PrimitiveType;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.PrimitiveType;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
|
||||
import com.android.dx.io.instructions.FillArrayDataPayloadDecodedInstruction;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
public class GotoNode extends InsnNode {
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.LiteralArg;
|
||||
import jadx.dex.instructions.args.PrimitiveType;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.LiteralArg;
|
||||
import jadx.core.dex.instructions.args.PrimitiveType;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
import com.android.dx.io.instructions.DecodedInstruction;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
public enum IfOp {
|
||||
EQ("=="),
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
public class IndexInsnNode extends InsnNode {
|
||||
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.PrimitiveType;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.PrimitiveType;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import com.android.dx.io.Code;
|
||||
import com.android.dx.io.OpcodeInfo;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
public enum InsnType {
|
||||
NOP, // replacement for removed instructions
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import com.android.dx.io.instructions.DecodedInstruction;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
public enum InvokeType {
|
||||
STATIC,
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.instructions;
|
||||
package jadx.core.dex.instructions;
|
||||
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
import com.android.dx.io.instructions.DecodedInstruction;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
|
||||
public class InsnWrapArg extends InsnArg {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
import jadx.codegen.TypeGen;
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.codegen.TypeGen;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
public class LiteralArg extends InsnArg {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
public enum PrimitiveType {
|
||||
BOOLEAN("Z", "boolean"),
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
import jadx.dex.instructions.IndexInsnNode;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.visitors.InstructionRemover;
|
||||
import jadx.core.dex.instructions.IndexInsnNode;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.visitors.InstructionRemover;
|
||||
|
||||
public class RegisterArg extends InsnArg {
|
||||
protected final int regNum;
|
||||
@@ -42,7 +42,7 @@ public class RegisterArg extends InsnArg {
|
||||
|
||||
/**
|
||||
* Return constant value from register assign or null if not constant
|
||||
*
|
||||
*
|
||||
* @return LiteralArg, String or ArgType
|
||||
*/
|
||||
public Object getConstValue() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
public abstract class Typed {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.instructions.args;
|
||||
package jadx.core.dex.instructions.args;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+8
-8
@@ -1,12 +1,12 @@
|
||||
package jadx.dex.instructions.mods;
|
||||
package jadx.core.dex.instructions.mods;
|
||||
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.InvokeNode;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.InvokeNode;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
|
||||
public class ConstructorInsn extends InsnNode {
|
||||
|
||||
+8
-8
@@ -1,12 +1,12 @@
|
||||
package jadx.dex.instructions.mods;
|
||||
package jadx.core.dex.instructions.mods;
|
||||
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.IfOp;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.IfOp;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
public class TernaryInsn extends IfNode {
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.BlockRegState;
|
||||
import jadx.dex.attributes.LoopAttr;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.BlockRegState;
|
||||
import jadx.core.dex.attributes.LoopAttr;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
+29
-18
@@ -1,21 +1,22 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.SourceFileAttr;
|
||||
import jadx.dex.attributes.annotations.Annotation;
|
||||
import jadx.dex.info.AccessInfo;
|
||||
import jadx.dex.info.AccessInfo.AFType;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.nodes.parser.AnnotationsParser;
|
||||
import jadx.dex.nodes.parser.FieldValueAttr;
|
||||
import jadx.dex.nodes.parser.StaticValuesParser;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.codegen.CodeWriter;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.SourceFileAttr;
|
||||
import jadx.core.dex.attributes.annotations.Annotation;
|
||||
import jadx.core.dex.info.AccessInfo;
|
||||
import jadx.core.dex.info.AccessInfo.AFType;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.nodes.parser.AnnotationsParser;
|
||||
import jadx.core.dex.nodes.parser.FieldValueAttr;
|
||||
import jadx.core.dex.nodes.parser.StaticValuesParser;
|
||||
import jadx.core.utils.Utils;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -48,6 +49,8 @@ public class ClassNode extends AttrNode implements ILoadable {
|
||||
|
||||
private final Map<Object, FieldNode> constFields = new HashMap<Object, FieldNode>();
|
||||
|
||||
private CodeWriter code; // generated code
|
||||
|
||||
public ClassNode(DexNode dex, ClassDef cls) throws DecodeException {
|
||||
this.dex = dex;
|
||||
this.clsInfo = ClassInfo.fromDex(dex, cls.getTypeIndex());
|
||||
@@ -62,7 +65,7 @@ public class ClassNode extends AttrNode implements ILoadable {
|
||||
}
|
||||
|
||||
if (cls.getClassDataOffset() == 0) {
|
||||
// nothing to load
|
||||
// nothing to loadFile
|
||||
} else {
|
||||
ClassData clsData = dex.readClassData(cls);
|
||||
|
||||
@@ -326,6 +329,14 @@ public class ClassNode extends AttrNode implements ILoadable {
|
||||
return clsInfo.getPackage();
|
||||
}
|
||||
|
||||
public void setCode(CodeWriter code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public CodeWriter getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getFullName();
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.utils.files.InputFile;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
import jadx.core.utils.files.InputFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.info.AccessInfo;
|
||||
import jadx.dex.info.AccessInfo.AFType;
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.info.AccessInfo;
|
||||
import jadx.core.dex.info.AccessInfo.AFType;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
|
||||
import com.android.dx.io.ClassData.Field;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.core.dex.attributes.AttributesList;
|
||||
import jadx.core.dex.attributes.IAttributeNode;
|
||||
|
||||
public interface IContainer extends IAttributeNode {
|
||||
|
||||
@Override
|
||||
public AttributesList getAttributes();
|
||||
|
||||
}
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
public interface ILoadable {
|
||||
|
||||
/**
|
||||
* On demand loading
|
||||
*
|
||||
*
|
||||
* @throws DecodeException
|
||||
*/
|
||||
public void load() throws DecodeException;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+9
-9
@@ -1,13 +1,13 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+25
-25
@@ -1,29 +1,29 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.attributes.AttributeFlag;
|
||||
import jadx.dex.attributes.JumpAttribute;
|
||||
import jadx.dex.attributes.LoopAttr;
|
||||
import jadx.dex.attributes.annotations.Annotation;
|
||||
import jadx.dex.info.AccessInfo;
|
||||
import jadx.dex.info.AccessInfo.AFType;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.GotoNode;
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.InsnDecoder;
|
||||
import jadx.dex.instructions.SwitchNode;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.instructions.mods.ConstructorInsn;
|
||||
import jadx.dex.nodes.parser.DebugInfoParser;
|
||||
import jadx.dex.trycatch.ExcHandlerAttr;
|
||||
import jadx.dex.trycatch.ExceptionHandler;
|
||||
import jadx.dex.trycatch.TryCatchBlock;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.attributes.AttributeFlag;
|
||||
import jadx.core.dex.attributes.JumpAttribute;
|
||||
import jadx.core.dex.attributes.LoopAttr;
|
||||
import jadx.core.dex.attributes.annotations.Annotation;
|
||||
import jadx.core.dex.info.AccessInfo;
|
||||
import jadx.core.dex.info.AccessInfo.AFType;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.GotoNode;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.InsnDecoder;
|
||||
import jadx.core.dex.instructions.SwitchNode;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.instructions.mods.ConstructorInsn;
|
||||
import jadx.core.dex.nodes.parser.DebugInfoParser;
|
||||
import jadx.core.dex.trycatch.ExcHandlerAttr;
|
||||
import jadx.core.dex.trycatch.ExceptionHandler;
|
||||
import jadx.core.dex.trycatch.TryCatchBlock;
|
||||
import jadx.core.utils.Utils;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+11
-10
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.nodes;
|
||||
package jadx.core.dex.nodes;
|
||||
|
||||
import jadx.IJadxArgs;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.utils.files.InputFile;
|
||||
import jadx.api.IJadxArgs;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
import jadx.core.utils.files.InputFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -16,18 +16,19 @@ import org.slf4j.LoggerFactory;
|
||||
public class RootNode {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RootNode.class);
|
||||
|
||||
private final IJadxArgs IJadxArgs;
|
||||
private final IJadxArgs args;
|
||||
private final List<InputFile> dexFiles;
|
||||
|
||||
private List<DexNode> dexNodes;
|
||||
private final List<ClassNode> classes = new ArrayList<ClassNode>();
|
||||
private final Map<String, ClassNode> names = new HashMap<String, ClassNode>();
|
||||
|
||||
public RootNode(IJadxArgs args) {
|
||||
this.IJadxArgs = args;
|
||||
public RootNode(IJadxArgs args, List<InputFile> dexFiles) {
|
||||
this.args = args;
|
||||
this.dexFiles =dexFiles;
|
||||
}
|
||||
|
||||
public void load() throws DecodeException {
|
||||
List<InputFile> dexFiles = IJadxArgs.getInput();
|
||||
dexNodes = new ArrayList<DexNode>(dexFiles.size());
|
||||
for (InputFile dex : dexFiles) {
|
||||
DexNode dexNode;
|
||||
@@ -87,6 +88,6 @@ public class RootNode {
|
||||
}
|
||||
|
||||
public IJadxArgs getJadxArgs() {
|
||||
return IJadxArgs;
|
||||
return args;
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -1,14 +1,14 @@
|
||||
package jadx.dex.nodes.parser;
|
||||
package jadx.core.dex.nodes.parser;
|
||||
|
||||
import jadx.dex.attributes.annotations.Annotation;
|
||||
import jadx.dex.attributes.annotations.Annotation.Visibility;
|
||||
import jadx.dex.attributes.annotations.AnnotationsList;
|
||||
import jadx.dex.attributes.annotations.MethodParameters;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.dex.nodes.FieldNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.dex.attributes.annotations.Annotation;
|
||||
import jadx.core.dex.attributes.annotations.Annotation.Visibility;
|
||||
import jadx.core.dex.attributes.annotations.AnnotationsList;
|
||||
import jadx.core.dex.attributes.annotations.MethodParameters;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.dex.nodes.FieldNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
+8
-8
@@ -1,12 +1,12 @@
|
||||
package jadx.dex.nodes.parser;
|
||||
package jadx.core.dex.nodes.parser;
|
||||
|
||||
import jadx.dex.attributes.SourceFileAttr;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.dex.attributes.SourceFileAttr;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.nodes.parser;
|
||||
package jadx.core.dex.nodes.parser;
|
||||
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.nodes.parser;
|
||||
package jadx.core.dex.nodes.parser;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
|
||||
public class FieldValueAttr implements IAttribute {
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package jadx.dex.nodes.parser;
|
||||
package jadx.core.dex.nodes.parser;
|
||||
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.instructions.args.TypedVar;
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.instructions.args.TypedVar;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
final class LocalVar extends RegisterArg {
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.nodes.parser;
|
||||
package jadx.core.dex.nodes.parser;
|
||||
|
||||
import jadx.dex.nodes.DexNode;
|
||||
import jadx.dex.nodes.FieldNode;
|
||||
import jadx.utils.exceptions.DecodeException;
|
||||
import jadx.core.dex.nodes.DexNode;
|
||||
import jadx.core.dex.nodes.FieldNode;
|
||||
import jadx.core.utils.exceptions.DecodeException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.attributes.AttrNode;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.core.dex.attributes.AttrNode;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
|
||||
public abstract class AbstractRegion extends AttrNode implements IRegion {
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.IfOp;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.IfOp;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.regions;
|
||||
package jadx.core.dex.regions;
|
||||
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.trycatch;
|
||||
package jadx.core.dex.trycatch;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
|
||||
public class CatchAttr implements IAttribute {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package jadx.dex.trycatch;
|
||||
package jadx.core.dex.trycatch;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
|
||||
public class ExcHandlerAttr implements IAttribute {
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package jadx.dex.trycatch;
|
||||
package jadx.core.dex.trycatch;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.trycatch;
|
||||
package jadx.core.dex.trycatch;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
|
||||
public class SplitterBlockAttr implements IAttribute {
|
||||
|
||||
+12
-12
@@ -1,16 +1,16 @@
|
||||
package jadx.dex.trycatch;
|
||||
package jadx.core.dex.trycatch;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.dex.info.ClassInfo;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IBlock;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.InsnContainer;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.visitors.InstructionRemover;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.info.ClassInfo;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IBlock;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.InsnContainer;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.visitors.InstructionRemover;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.exceptions.JadxException;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.exceptions.JadxException;
|
||||
|
||||
public class AbstractVisitor implements IDexTreeVisitor {
|
||||
|
||||
+18
-18
@@ -1,22 +1,22 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.dex.attributes.AttributeFlag;
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.attributes.AttributesList;
|
||||
import jadx.dex.attributes.IAttribute;
|
||||
import jadx.dex.attributes.JumpAttribute;
|
||||
import jadx.dex.attributes.LoopAttr;
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.trycatch.CatchAttr;
|
||||
import jadx.dex.trycatch.ExceptionHandler;
|
||||
import jadx.dex.trycatch.SplitterBlockAttr;
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.dex.attributes.AttributeFlag;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.attributes.AttributesList;
|
||||
import jadx.core.dex.attributes.IAttribute;
|
||||
import jadx.core.dex.attributes.JumpAttribute;
|
||||
import jadx.core.dex.attributes.LoopAttr;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.trycatch.CatchAttr;
|
||||
import jadx.core.dex.trycatch.ExceptionHandler;
|
||||
import jadx.core.dex.trycatch.SplitterBlockAttr;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.dex.attributes.AttributeType;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.trycatch.CatchAttr;
|
||||
import jadx.dex.trycatch.ExcHandlerAttr;
|
||||
import jadx.dex.trycatch.ExceptionHandler;
|
||||
import jadx.dex.trycatch.TryCatchBlock;
|
||||
import jadx.utils.BlockUtils;
|
||||
import jadx.core.dex.attributes.AttributeType;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.trycatch.CatchAttr;
|
||||
import jadx.core.dex.trycatch.ExcHandlerAttr;
|
||||
import jadx.core.dex.trycatch.ExceptionHandler;
|
||||
import jadx.core.dex.trycatch.TryCatchBlock;
|
||||
import jadx.core.utils.BlockUtils;
|
||||
|
||||
public class BlockProcessingHelper {
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.dex.info.AccessInfo;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.exceptions.JadxException;
|
||||
import jadx.core.dex.info.AccessInfo;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.exceptions.JadxException;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
+19
-19
@@ -1,23 +1,23 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.Consts;
|
||||
import jadx.dex.attributes.AttributeFlag;
|
||||
import jadx.dex.info.MethodInfo;
|
||||
import jadx.dex.instructions.ArithNode;
|
||||
import jadx.dex.instructions.ArithOp;
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.InvokeNode;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.dex.instructions.args.LiteralArg;
|
||||
import jadx.dex.instructions.args.RegisterArg;
|
||||
import jadx.dex.instructions.mods.ConstructorInsn;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.BlockUtils;
|
||||
import jadx.utils.exceptions.JadxRuntimeException;
|
||||
import jadx.core.Consts;
|
||||
import jadx.core.dex.attributes.AttributeFlag;
|
||||
import jadx.core.dex.info.MethodInfo;
|
||||
import jadx.core.dex.instructions.ArithNode;
|
||||
import jadx.core.dex.instructions.ArithOp;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.InvokeNode;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.InsnWrapArg;
|
||||
import jadx.core.dex.instructions.args.LiteralArg;
|
||||
import jadx.core.dex.instructions.args.RegisterArg;
|
||||
import jadx.core.dex.instructions.mods.ConstructorInsn;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.BlockUtils;
|
||||
import jadx.core.utils.exceptions.JadxRuntimeException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+14
-14
@@ -1,18 +1,18 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.dex.info.FieldInfo;
|
||||
import jadx.dex.instructions.IfNode;
|
||||
import jadx.dex.instructions.IndexInsnNode;
|
||||
import jadx.dex.instructions.InsnType;
|
||||
import jadx.dex.instructions.InvokeNode;
|
||||
import jadx.dex.instructions.args.ArgType;
|
||||
import jadx.dex.instructions.args.InsnArg;
|
||||
import jadx.dex.instructions.args.LiteralArg;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.BlockUtils;
|
||||
import jadx.utils.exceptions.JadxException;
|
||||
import jadx.core.dex.info.FieldInfo;
|
||||
import jadx.core.dex.instructions.IfNode;
|
||||
import jadx.core.dex.instructions.IndexInsnNode;
|
||||
import jadx.core.dex.instructions.InsnType;
|
||||
import jadx.core.dex.instructions.InvokeNode;
|
||||
import jadx.core.dex.instructions.args.ArgType;
|
||||
import jadx.core.dex.instructions.args.InsnArg;
|
||||
import jadx.core.dex.instructions.args.LiteralArg;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.BlockUtils;
|
||||
import jadx.core.utils.exceptions.JadxException;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.dex.nodes.ClassNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.utils.ErrorsCounter;
|
||||
import jadx.core.dex.nodes.ClassNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.utils.ErrorsCounter;
|
||||
|
||||
public class DepthTraverser {
|
||||
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
package jadx.dex.visitors;
|
||||
package jadx.core.dex.visitors;
|
||||
|
||||
import jadx.codegen.CodeWriter;
|
||||
import jadx.codegen.MethodGen;
|
||||
import jadx.dex.attributes.IAttributeNode;
|
||||
import jadx.dex.nodes.BlockNode;
|
||||
import jadx.dex.nodes.IContainer;
|
||||
import jadx.dex.nodes.IRegion;
|
||||
import jadx.dex.nodes.InsnNode;
|
||||
import jadx.dex.nodes.MethodNode;
|
||||
import jadx.dex.trycatch.ExceptionHandler;
|
||||
import jadx.utils.BlockUtils;
|
||||
import jadx.utils.InsnUtils;
|
||||
import jadx.utils.Utils;
|
||||
import jadx.core.codegen.CodeWriter;
|
||||
import jadx.core.codegen.MethodGen;
|
||||
import jadx.core.dex.attributes.IAttributeNode;
|
||||
import jadx.core.dex.nodes.BlockNode;
|
||||
import jadx.core.dex.nodes.IContainer;
|
||||
import jadx.core.dex.nodes.IRegion;
|
||||
import jadx.core.dex.nodes.InsnNode;
|
||||
import jadx.core.dex.nodes.MethodNode;
|
||||
import jadx.core.dex.trycatch.ExceptionHandler;
|
||||
import jadx.core.utils.BlockUtils;
|
||||
import jadx.core.utils.InsnUtils;
|
||||
import jadx.core.utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user