Android truncation and anti-compilation

Source: Internet
Author: User

Recently, due to learning needs, tried the next truncation and anti-compilation, found that the simple anti-compilation and truncation is actually very simple, and this article also mainly introduces the use of truncation and anti-compilation tools.

Cutting Bag

There are many tools to cut the package, I mainly introduce the simple and practical fiddler.
Official website: Http://www.telerik.com/fiddler
Open fiddler when download is complete
1. First, make sure to install Fiddler computer and your phone in the same LAN, because Fiddler is just a proxy, need to point the mobile phone agent to the PC, not to each other access is not possible.
2. Open the Tools>fiddler options in the menu bar to open the Fiddler Options dialog box.

In the Fiddler Options dialog box, switch to the Connections tab, and then tick the checkbox after allow romote computers to connect, then click the "OK" button to set the Allowed remote link.

3. Then enter the ipconfig command line on the native command line to find the local IP, because I here mobile phones and computers are connected to wireless network, so use the computer wireless network IP 192.168.0.102

4. Turn on phone set wireless network Proxy interface server set to PC wireless network IP port to fiddler listening port 8888

5. Now you can grab the bag. Open fiddler

6 You can also set the filter to filter out unwanted information

Anti-compilation

Apktool: It can decode resources close to the original form and make some modifications after rebuilding, can extract the picture files and layout files for use view
Download Link: http://download.csdn.net/detail/zly921112/9472996

Dex2jar: Decompile The APK to Java source (Classes.dex into a jar file)
Download Link: http://download.csdn.net/detail/zly921112/9473310

Jd-gui: View the jar files generated with the Dex2jar conversion, view the source code
Download Link: http://download.csdn.net/detail/zly921112/9473311

Apktool (decompile resource file)
Apktool the tool, extract the Aapt.exe,apktool.bat,apktool.jar, place the apk file that needs to be recompiled into the directory, and then switch the command-line directory to that directory. Enter Apktool d test.apk, The test.apk in the command refers to the full name of the APK file to be deserialized, and the anti-compilation generates the same file name as the APK filename

Although some of the resources here have not been decoded, most of the resources have been

Test file inside

If you want to repackage the finished file with the APK, you can enter Apktool B Test (compiled folder):

Two more file builds and Dist are found under the test file (it contains the packaged apk file)

For an example of an order on the official website
Decoding:

Build:

Dex2jar+jd-gui (decompile. dex file for Java source code)
The apk suffix that will be deserialized is changed to. rar Decompression, Get the amount of the Classes.dex file (which is the Java file compiled and packaged by the DX tool), put the acquired classes.dex into the tool dex2jar-0.0.9.15 folder that was extracted before, and then switch the command line directory to that directory. Input dex2jar.ba T Classes.dex

In this directory will generate a Classes_dex2jar.jar file, and then use the Jd-gui folder Jd-gui.exe, open the Classes_dex2jar.jar file generated before, you can see the source code, the effect is as follows:

Because the source code is confused so can only see ABC this, in fact, quite disgusting, I also specifically to check the anti-confusion hope to be able to restore but did not find a solution, if a friend can be anti-confusing welcome exchange Thank you.

Android truncation and anti-compilation

Related Article

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.