本文整理汇总了Java中org.jf.dexlib2.analysis.InlineMethodResolver类的典型用法代码示例。如果您正苦于以下问题:Java InlineMethodResolver类的具体用法?Java InlineMethodResolver怎么用?Java InlineMethodResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InlineMethodResolver类属于org.jf.dexlib2.analysis包,在下文中一共展示了InlineMethodResolver类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: run
import org.jf.dexlib2.analysis.InlineMethodResolver; //导入依赖的package包/类
public Observable<File> run(App app, File outputDir) {
return Observable.fromCallable(() -> {
File apkFile = new File(app.sourceDir());
check(apkFile.exists(), "must provide valid .apk file for analysis");
if (!outputDir.exists()) {
check(outputDir.mkdirs(), "could not create .smali output directory");
}
baksmaliOptions options = getDefaultOptions();
options.outputDirectory = outputDir.getPath();
// Limit the max. used threads.
options.jobs = Runtime.getRuntime().availableProcessors();
if (options.jobs > 6) {
options.jobs = 6;
}
DexBackedDexFile dexFile =
DexFileFactory.loadDexFile(apkFile, "classes.dex", app.targetSdk(), false);
if (dexFile instanceof DexBackedOdexFile) {
options.inlineResolver = InlineMethodResolver.createInlineMethodResolver(
((DexBackedOdexFile) dexFile).getOdexVersion());
}
check(baksmali.disassembleDexFile(dexFile, options), "disassembling apk to smali failed");
return outputDir;
});
}
开发者ID:philipphager,项目名称:disclosure-android-app,代码行数:31,代码来源:DecompileApp.java
示例2: deOdex
import org.jf.dexlib2.analysis.InlineMethodResolver; //导入依赖的package包/类
@Override
public void deOdex(DexFile parentFile) {
if (!(parentFile instanceof DexBackedOdexFile))
throw new RuntimeException("ODEX instruction in non-ODEX file");
DexBackedOdexFile odexFile = (DexBackedOdexFile) parentFile;
InlineMethodResolver inlineMethodResolver = InlineMethodResolver.createInlineMethodResolver(
odexFile.getOdexVersion());
targetMethod = inlineMethodResolver.resolveExecuteInline(
new AnalyzedInstruction(instruction, -1, -1));
}
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:11,代码来源:ExecuteInlineInstruction.java
示例3: decode
import org.jf.dexlib2.analysis.InlineMethodResolver; //导入依赖的package包/类
private void decode() throws AndrolibException {
try {
baksmaliOptions options = new baksmaliOptions();
// options
options.deodex = false;
options.outputDirectory = mOutDir.toString();
options.noParameterRegisters = false;
options.useLocalsDirective = true;
options.useSequentialLabels = true;
options.outputDebugInfo = mBakDeb;
options.addCodeOffsets = false;
options.jobs = -1;
options.noAccessorComments = false;
options.registerInfo = 0;
options.ignoreErrors = false;
options.inlineResolver = null;
options.checkPackagePrivateAccess = false;
// set jobs automatically
options.jobs = Runtime.getRuntime().availableProcessors();
if (options.jobs > 6) {
options.jobs = 6;
}
// create the dex
DexBackedDexFile dexFile = DexFileFactory.loadDexFile(mApkFile, mDexFile, mApi, false);
if (dexFile.isOdexFile()) {
throw new AndrolibException("Warning: You are disassembling an odex file without deodexing it.");
}
if (dexFile instanceof DexBackedOdexFile) {
options.inlineResolver =
InlineMethodResolver.createInlineMethodResolver(((DexBackedOdexFile)dexFile).getOdexVersion());
}
baksmali.disassembleDexFile(dexFile, options);
} catch (IOException ex) {
throw new AndrolibException(ex);
}
}
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:43,代码来源:SmaliDecoder.java
示例4: dex2smali
import org.jf.dexlib2.analysis.InlineMethodResolver; //导入依赖的package包/类
/**
* .dex转换为smali
*
* @param dexFile dex/apk文件
* @param outDir smali文件输出目录
* @return 是否转换成功
*/
public static boolean dex2smali(File dexFile, File outDir){
if (dexFile == null || !dexFile.exists()){
LogUtils.w( "dex2smali dexFile is null or not exists : " + dexFile.getPath());
return false;
}
// dex文件的处理
BaksmaliOptions options = new BaksmaliOptions();
// options
options.deodex = false;
options.implicitReferences = false;
options.parameterRegisters = true;
options.localsDirective = true;
options.sequentialLabels = true;
options.debugInfo = true;
options.codeOffsets = false;
options.accessorComments = false;
options.registerInfo = 0;
options.inlineResolver = null;
// set jobs automatically
int jobs = Runtime.getRuntime().availableProcessors();
if (jobs > 6) {
jobs = 6;
}
try {
//brut/androlib/ApkDecoder.mApi default value is 15
// create the dex
DexBackedDexFile dexBackedDexFile = DexFileFactory.loadDexFile(dexFile, Opcodes.forApi(15));
if (dexBackedDexFile.isOdexFile()) {
LogUtils.w("Warning: You are disassembling an odex file without deodexing it.");
}
if (dexBackedDexFile instanceof DexBackedOdexFile) {
options.inlineResolver =
InlineMethodResolver.createInlineMethodResolver(((DexBackedOdexFile)dexBackedDexFile).getOdexVersion());
}
Baksmali.disassembleDexFile(dexBackedDexFile, outDir, jobs, options);
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
开发者ID:linchaolong,项目名称:ApkToolPlus,代码行数:56,代码来源:ApkToolPlus.java
注:本文中的org.jf.dexlib2.analysis.InlineMethodResolver类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论