Search in sources :

Example 1 with JadxArgs

use of jadx.api.JadxArgs in project jadx by skylot.

the class JadxVisitorsOrderTest method testOrder.

@Test
public void testOrder() {
    List<IDexTreeVisitor> passes = Jadx.getPassesList(new JadxArgs(), new File("out"));
    List<String> errors = check(passes);
    for (String str : errors) {
        LOG.error(str);
    }
    assertThat(errors, empty());
}
Also used : IDexTreeVisitor(jadx.core.dex.visitors.IDexTreeVisitor) JadxArgs(jadx.api.JadxArgs) File(java.io.File) Test(org.junit.Test)

Example 2 with JadxArgs

use of jadx.api.JadxArgs in project jadx by skylot.

the class ConvertToClsSet method main.

public static void main(String[] args) throws IOException, DecodeException {
    if (args.length < 2) {
        usage();
        System.exit(1);
    }
    File output = new File(args[0]);
    List<InputFile> inputFiles = new ArrayList<InputFile>(args.length - 1);
    for (int i = 1; i < args.length; i++) {
        File f = new File(args[i]);
        if (f.isDirectory()) {
            addFilesFromDirectory(f, inputFiles);
        } else {
            InputFile.addFilesFrom(f, inputFiles);
        }
    }
    for (InputFile inputFile : inputFiles) {
        LOG.info("Loaded: {}", inputFile.getFile());
    }
    RootNode root = new RootNode(new JadxArgs());
    root.load(inputFiles);
    ClsSet set = new ClsSet();
    set.load(root);
    set.save(output);
    LOG.info("Output: {}", output);
    LOG.info("done");
}
Also used : RootNode(jadx.core.dex.nodes.RootNode) ArrayList(java.util.ArrayList) JadxArgs(jadx.api.JadxArgs) InputFile(jadx.core.utils.files.InputFile) File(java.io.File) InputFile(jadx.core.utils.files.InputFile)

Aggregations

JadxArgs (jadx.api.JadxArgs)2 File (java.io.File)2 RootNode (jadx.core.dex.nodes.RootNode)1 IDexTreeVisitor (jadx.core.dex.visitors.IDexTreeVisitor)1 InputFile (jadx.core.utils.files.InputFile)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1