[APP] If you want to decompile

Source: Internet
Author: User

Anti-compilation, mainly use two kinds of tools, one is to get the APK package name (apppackage) and class name (appactivity) tool, in fact, is to decompile the Java source code, Dex2jar and Jd-gui One is to add an APK package decompile and then add their own signature, modify some parameters, so that it better for the apptoools of automated testing, the following is a brief introduction to the use of these two tools:

First, Dex2jar and Jd-gui

1, download apk, modify the apk suffix named zip and unzip the zip file;

2. Open the folder to find the Classes.dex file, and copy it to the Dex2jar folder, execute the dex2jar.bat classes.dex command in the cmd command line, get the Classes_dex2jar.jar file;

3, open Jd-gui, select Open file to find the Classes_dex2jar.jar, you can get the package name and class name

Second, Apptool

Anti-compile command: apptool.bat-d-o e:/test/test.apk decompile test.apk file to e:test directory

Back to compile command: apptool.bat-b-o e:/test/test1.apk back to compile e:/test directory under file for test1.apk

After the anti-compilation is based on smaile modify the underlying source code

Res is the APK related resources, after repackaging the signature or original, for automation is not possible, so also need to re-sign.

Third, re-signing

1. Generate a signature file yourself with Eclipse Debug.keystore

You can also generate a signature yourself, with the following command: Keytool-genkey-v-keystore debug.keystore-alias androiddebugkey-keyalg rsa-validity 10000

2, follow the two, and then delete the manifest folder;

3. Re-sign:

Jarsigner-verbose-keystore%keystore_name%-storepass%keystore_storepass%%temp_prefix%%%i%KEYSTORE_ALIAS%- Keypass%keystore_keypass%-digestalg sha1-sigalg Md5withrsa

Iv. Other

View thin Information Apkhelper

View signature information Keytool-list-v-keystore apkname

[APP] If you want to decompile

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.