Some devices crash in the framework code, but do not correspond to open source code, it is necessary to pull the framework inside the device and decompile the source code troubleshooting problems.
1. Get the Framework file:
ADB pull/system/framework
Get the content under the Framework folder, There may be framework.jar and Framework.odex, if the Framework.jar decompression out has Dex then decompile Dex can, if Framework.jar inside without Dex need to first decompile Framework.odex file to Dex file;
2. Decompile the Odex file:
Pull Framework folder when it is best to get it all, because there is a dependency on the anti-compilation, in the framework folder to get the anti-compilation do not worry about the lack of reliance on the problem;
Tools to decompile Odex files: Smali and Baksmali jar files
Https://github.com/JesusFreke/smali
https://bitbucket.org/JesusFreke/smali/downloads/
(1) decompile Odex file for Smali file:
Java-jar baksmali-2.2. 2 -jar baksmali-2.2. 2
After successful execution, will produce an out directory, which is placed in the intermediate files, find the corresponding Smali file can see the corresponding source code, you can find the corresponding line number codes, this is very useful!
(2) Generate Dex file
-jar smali-2.2. 2 -jar smali-2.2. 2. Jar Assemble out
(3) Generate JAR file
dex2jar-2.0 out.dex# use JD-gui to view Out-dex2jar.jar
Reference Documentation:
Https://www.cnblogs.com/ungshow/p/3511330.html
Http://blog.sina.com.cn/s/blog_4e1e357d0102yg5o.html
Android Framework Source Anti-compilation