Play Android anti-compilation and code obfuscation

Source: Internet
Author: User
Tags custom name

This time to prepare the system to play the android from the export apk to Anti-compilation to code confusion and then re-compile the process, there is a picture of the truth of the record ~ ~

The first step is to export the non-confusing normal apk

First create a Fuckcode project, there is a basic activity:mainactivity one, the other class one, the code is very simple, in mainactivity call other static method Xx,xx method just output a string, The intended purpose is to see if the other can be decompile after the confusion. Figures:

OK, very amateur very simple Ah, mainactivity code is also very simple, as follows:

1 protected void onCreate (Bundle savedinstancestate) {2         Super . OnCreate (savedinstancestate); 3         Setcontentview (r.layout.activity_main); 4         other.xx (); 5     }

Simply finish, and then

Step two, Signature pack apk

First of all, you need to configure your Android to use the JDK, verification method cmd Java, Javac, and so on, do not say here, then you need to complete a signing certificate, this time can do:

That's when you get a test.keystore, and then you can export the signed apk with Eclipse.

Step: Select project in Eclipse, right click to select Export, select Android, select Export Android application-->next--> Path Select the path of the Test.keystore just generated, password fill in the password just entered-->next---Select the alias to fill in the password-->next--> select the path to export apk, and then finish.

At this point, the signed apk will be exported ~ ~ ~

The third step, try to decompile the previous apk

At this time we need to download some of the disassembly tools: there is a personal habit of a brain down, and then slowly toss ....

Now we first put the previously exported apk fella to zip, unzip to get Classes.dex, and then put Classes.dex before the Dex2jar-0.xxx folder, with Dex2jar.bat in a directory, and then open the whole ....

Howling ~ This time we got a Classes_dex2jar.jar

Now, let's open the Classex_dex2jar.jar file in the Jd-gui-xxxx-windows jd-gui.exe before downloading it ... Then we found out that we wrote the Android source strip ... Not a JB.

After reading the code, we now look at various documents ....

First download a apktool .... The latest version is here to find

Then put the Apktool.jar with the APK to be anti-compilation in a directory .... Execute Apktool22.jar d fuckcode.apk

Where Apktool22.jar is my custom name, you see the next jar file what to write ....

Then we will get a Fuckcode folder .... Open the inside ... Find pictures Ah, configuration files ah ... Everything has .... An apk that does not confuse encryption is stripped of the light ...

And then the third step ... Confusion and confusion ...

Drink saliva, eat a meal, wait to write again .....

Play Android anti-compilation and code obfuscation

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.