Android Learning experience (Android code obfuscation) (1)

Source: Internet
Author: User

I am on the blog to publish some of my Android learning experience, I hope that everyone can help.
This article tells us about how to confuse Android in the latest ADT environment.

在新版本号的ADT创建项目时。混码的文件不再是proguard.cfg。 而是project.properties和proguard-project.txt。 我们把之前配置都配置好了。proguard已经在包括在sdk中了。

Environment Configuration Reference Android learning experience (1)---Android environment under Mac build

假设须要对项目进行全局混码,仅仅须要进行一步操作:将project.properties的中“#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt”把“#”去掉就能够了。


 因为apk文件的混淆往往是伴随着文件的压缩和代码的优化问题,混淆的apk文件解压转换为jar文件。  使用ju-gui打开以后有一个不太引人注意的细节问题---当中找不到资源文件类。

利用这一特性。我们能够直接利用apktool解压apk文件。对其smali文件的文件名称进行分析。 假设存在一个或以上的资源的smali文件,就能够证明该apk文件没有混淆,反之。则说明已经是混淆过了的文件。 我们将没有混淆和混淆过的apk分别使用Eclipse导出并签名

Learn about Android---APK signature KeyStore

分别通过dex2jar和jd-gui查看源码


明显的发现,第二个显示的源码已经被混淆过了,产生了a,b,c三个类。R.class已经不见了。

另外一个明显的差别是,混淆过后的apk大小是未混淆的apk三分之中的一个,代码往往经过压缩和优化。

Android Learning experience (Android code obfuscation) (1)

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.