@Override protected BaksmaliOptions getOptions() { BaksmaliOptions options = super.getOptions(); options.deodex = true; if (dexFile instanceof DexBackedOdexFile) { if (inlineTable == null) { options.inlineResolver = InlineMethodResolver.createInlineMethodResolver( ((DexBackedOdexFile)dexFile).getOdexVersion()); } else { File inlineTableFile = new File(inlineTable); if (!inlineTableFile.exists()) { System.err.println(String.format("Could not find file: %s", inlineTable)); System.exit(-1); } try { options.inlineResolver = new CustomInlineMethodResolver(options.classPath, inlineTableFile); } catch (IOException ex) { System.err.println(String.format("Error while reading file: %s", inlineTableFile)); ex.printStackTrace(System.err); System.exit(-1); } } } return options; }
@Override public void deOdex(DexFile parentFile, Method method, ClassPath cp) { if (!(parentFile instanceof DexBackedOdexFile)) { throw new RuntimeException("ODEX instruction in non-ODEX file"); } DexBackedOdexFile odexFile = (DexBackedOdexFile) parentFile; InlineMethodResolver inlineMethodResolver = InlineMethodResolver.createInlineMethodResolver(odexFile.getOdexVersion()); MethodAnalyzer analyzer = new MethodAnalyzer(cp, method, inlineMethodResolver, false); targetMethod = inlineMethodResolver.resolveExecuteInline(new AnalyzedInstruction(analyzer, instruction, -1, -1)); }
InlineMethodResolver.createInlineMethodResolver(((DexBackedOdexFile)dexFile).getOdexVersion());
@Override protected BaksmaliOptions getOptions() { BaksmaliOptions options = super.getOptions(); options.deodex = true; if (dexFile instanceof DexBackedOdexFile) { if (inlineTable == null) { options.inlineResolver = InlineMethodResolver.createInlineMethodResolver( ((DexBackedOdexFile)dexFile).getOdexVersion()); } else { File inlineTableFile = new File(inlineTable); if (!inlineTableFile.exists()) { System.err.println(String.format("Could not find file: %s", inlineTable)); System.exit(-1); } try { options.inlineResolver = new CustomInlineMethodResolver(options.classPath, inlineTableFile); } catch (IOException ex) { System.err.println(String.format("Error while reading file: %s", inlineTableFile)); ex.printStackTrace(System.err); System.exit(-1); } } } return options; }
InlineMethodResolver.createInlineMethodResolver(((DexBackedOdexFile)dexFile).getOdexVersion());