Android android APK decompilation reverse, Android android apk

Source: Internet
Author: User

Android android APK decompilation reverse, Android android apk

The reverse of the android APK program is much easier than that of the WindowsPE file.

1. the android APK program is actually a zip file that can be opened with winrar. After decompression, you will see the familiar directories, AndroidManifest. xml files, and various resources and images.

2. open xml in notepad and you will see garbled characters. Therefore, you need to use the AXMLPrinter2.jar tool for processing. The command is as follows:

Java-jar AXMLPrinter2.jar AndroidManifest. xml> AndroidManifest.txt

In this case, open androidmanifest.txt and you will see that it is similar to the source code, and there is no garbled code.

3. All. java code of APK is compiled into the classes. dex file. Therefore, if you want to know the operation process and specific functions of the program, you must decompile the file and use the baksmali. jar tool.

Java-jar baksmali. jar-o classout/classes. dex

After the execution is complete, generate a classout directory and find the android directory ,. smali. java code. Let's take a look. the code in small is enough. Although it is not a standard java code, it is easy to get used to it, at least much simpler than Windows assembly...

4. Finally, after decompiling, we can change the code to the resource. After the code is changed, we have to compile it back and use the smali. jar tool.

Java-jar smali. jar classout/-o classes. dex

After this is done, plug it into the apk so that the program can still run!

5. Sometimes AXMLPrinter2.jar may not be able to process xml well and an error will be reported. It is said that the minSdkVersion of the configuration file is greater than 7. We can use APKTool

Apktoolis very simple. Use three files (aapt.exe, apktool. bat, and apktool. jar)

Apktool d <file.apk> <dir> // Decompilation

Apktool d-f <file.apk> <dir> // recompile

It's over 12 o'clock, so sleepy. I'm asleep.

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.