主要利用的jar包: apktool.jarjava
public static void main(String[] args) { baksmaliOptions options = new baksmaliOptions(); options.jobs = 100; //設置classes.dex文件轉化爲smali文件的目錄 options.outputDirectory = "D:\\report\\test\\smali"; DexFile dexFile = null; try { dexFile = DexFileFactory.loadDexFile( new File("D:\\report\\test\\classes.dex"), options.apiLevel); baksmali.disassembleDexFile(dexFile, options); } catch (IOException e) { e.printStackTrace(); } }