Java code Anti-compilation in APK

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.