Search in sources :

Example 1 with BaksmaliDexFileVisitor

use of com.googlecode.d2j.smali.BaksmaliDexFileVisitor in project dex2jar by pxb1988.

the class BaksmaliTest method dotest.

private void dotest(Path f) throws Exception {
    Path smali0 = new File("target/" + f.getFileName() + "-smali0.zip").toPath();
    try (FileSystem fs0 = BaseCmd.createZip(smali0)) {
        Baksmali.from(f).to(fs0.getPath("/"));
    }
    Path smali1 = new File("target/" + f.getFileName() + "-smali1.zip").toPath();
    try (FileSystem fs0 = BaseCmd.openZip(smali0);
        FileSystem fs1 = BaseCmd.createZip(smali1)) {
        BaksmaliDumper baksmaliDumper = new BaksmaliDumper();
        BaksmaliDexFileVisitor v = new BaksmaliDexFileVisitor(fs1.getPath("/"), baksmaliDumper);
        Smali.smali(fs0.getPath("/"), v);
    }
}
Also used : Path(java.nio.file.Path) BaksmaliDumper(com.googlecode.d2j.smali.BaksmaliDumper) FileSystem(java.nio.file.FileSystem) BaksmaliDexFileVisitor(com.googlecode.d2j.smali.BaksmaliDexFileVisitor) File(java.io.File)

Aggregations

BaksmaliDexFileVisitor (com.googlecode.d2j.smali.BaksmaliDexFileVisitor)1 BaksmaliDumper (com.googlecode.d2j.smali.BaksmaliDumper)1 File (java.io.File)1 FileSystem (java.nio.file.FileSystem)1 Path (java.nio.file.Path)1