the Java code in the Android apk can be recompiled to what extent the APK is encrypted.
The first case: no obfuscation, no encryption, no packers.
Direct use of Dex2jar and Jd-gui can be the source from the APK, the code logic clear, basically can be reused, but the resource file reference needs to calculate.
The second case: confusion.
It is usually done with the protection of Proguard. Because it is an irreversible obfuscation of the jar (unless there is a mapping), it cannot be reverted to the original code. But the code structure, the code is consistent, as long as the code to comb the same time to find the core code, the decryption method is consistent with the first.
The third case: encryption.
Here take Dexguard as an example. For this method of code encryption, the program must be decrypted in the run, as long as the logic to extract its decryption. PS: I have done dexguard decryption, if you use Dex2jar anti-compiler to see the logic is wrong, must be seen from the Smali code. Later found that there have been people on the internet to do.
Decrypted script: A look inside Dexguard
Fourth case: Packers.
This is similar to the third kind of situation. No matter how you shell, the runtime must be Dalvik recognizable Odex code, it is recommended to dump it directly in memory. Xpose Zjdroid is recommended here.
Shelling Tutorial: Zjdroid Tool Introduction and shelling detailed example
Vince
Links: http://www.zhihu.com/question/30723538/answer/49382019
From for notes (Wiz)
Java code Anti-compilation in APK