提取系统apk:
下载jar:
https://bitbucket.org/JesusFreke/smali/downloads/
smali.jar和baksmali.jar
1.执行:1.java -jar baksmali.jar de temp.odex
会报错,把系统framework文件夹的东西pull出来
- Error occurred while loading class path files. Aborting.
- org.jf.dexlib2.analysis.ClassPathResolver$ResolveException: Error while loading oat file boot.oat
- at org.jf.dexlib2.analysis.ClassPathResolver.loadEntry(ClassPathResolver.java:250)
- at org.jf.dexlib2.analysis.ClassPathResolver.loadLocalClassPathEntry(ClassPathResolver.java:179)
- at org.jf.dexlib2.analysis.ClassPathResolver.loadLocalOrDeviceBootClassPathEntry(ClassPathResolver.java:191)
- at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:120)
- at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:105)
- at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:129)
- at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:86)
- at org.jf.baksmali.DisassembleCommand.getOptions(DisassembleCommand.java:207)
- at org.jf.baksmali.DeodexCommand.getOptions(DeodexCommand.java:71)
- at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:181)
- at org.jf.baksmali.Main.main(Main.java:102)
- Caused by: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Cannot find dependency boot-core-libart.oat in null
- at org.jf.dexlib2.analysis.ClassPathResolver.loadOatDependencies(ClassPathResolver.java:270)
- at org.jf.dexlib2.analysis.ClassPathResolver.loadEntry(ClassPathResolver.java:248)
- ... 10 more
复制代码
把arm里面的文件拷贝到上一层目录(其实应该不用也可以,因为我不熟悉baksmali的其它参数)
再次执行第一步命令就可以看到out目录下有smali文件了
2.java -jar smali.jar a out -o temp.dex
在当前目录会生成dex文件
接下来就转jar看代码了。
整个下来工作并不多,但是这里面很多坑。
第二种方法:
从官网下载rom包,然后dat解包,SVADeodexerForArt工具合并apk,这个简单方便
链接: