Mac Android APK anti-compilation

Source: Internet
Author: User

To decompile android apk on Mac OS system, the following 3 files need to be prepared first:

1, apktool:https://ibotpeaches.github.io/apktool/install/

2, Dex2jar:https://github.com/pxb1988/dex2jar

3, jd-gui:http://jd.benow.ca

Once downloaded, it's time to start our anti-compilation path:

1, install Apktool: Will download the Apktool.jar and apktool.txt (may not download the name can be modified), apktool.txt need to save the name of Apktool (do not need sh and txt suffix) can execute the following command:

Touch Apktool

Cat Apktool.txt >> Apktool on the line

Then move the shell scripts Apktool and Apktool.jar to the/usr/local/bin folder

Sudo-s

MV Source Files/usr/local/bin

Then execute the APKTOOL-V command: The following prompt indicates success

2, Dex2jar and Jd-gui decompression can be;

3. Execute command apktool d apk file: if

The following are the generated folders:

This folder can be seen in the APK resource files, tablets, XML files and so on, if you just need to get pictures and other resource files so here, to get further Java code, you need to use the Dex2jar and Jd-gui tools.

1, to get Java code will be back to compile (Apktoo can be decompile and back to compile), the main is to obtain the Classex.dex file.

Run command: Apktool B to decompile the generated folder

Such as:

The build folder is generated:

Where the Classes.dex file is what we need, different apk will generate a different number of classes.dex files, look at size and split up.

2. Now we need to use our Dex2jar tool.

D2j-dex2jar.sh and d2j_invoke.sh Add run permissions:

chmod +x d2j-dex2jar.sh

chmod +x d2j_invoke.sh

Then run the command./d2j-dex2jar.sh apk, such as

Then you can see the Classes-dex2jar.jar file in the Dex2jar folder, this is the final Java file, so what do we think, this will use the download of our Jd-gui.

3. Open the Jd-gui tool and drag the Classes-dex2jar.jar into it as shown below:

Finally finished!!

Mac Android APK anti-compilation

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.