Android Project Package APK and APK anti-compilation

Source: Internet
Author: User

I. GENERAL principles and drawbacks of project packaging

(1) To develop a simple project, when published as an apk file, if we do not use the signature method, directly in the bin directory to find the *.apk file, it is convenient, but our users in use, it may be used by other programs to cover the installation, the specific explanation is as follows:


(2) We create a new project test directory structure as follows, and publish it to the emulator, to get our packaging files test.apk


(3) Then we look at the file directory information in the simulator, we install the application, will be on the Android computer data----Data---Specific installation folder, for example, my is: com.example.test



Here the com.example.test is in the project directory under the Androidmanifest.xml file, so we can modify his file name


(4) Here, if you encounter the same installation directory name, it is possible to overwrite our application, causing malicious damage!


Second, the packaging method with digital signature

(5) Then we need to use the way of signing, packaging our software, the steps are very simple, click the Project right button---android-tools---Export Android application--and then the back is not introduced! Follow your own needs!


Third, the APK's anti-compilation implementation process

(6) In the previous step, we have generated a signed apk file test.apk then we use decompression software, unzip,


is both the extracted directory, various configuration files are in, is missing our source files and R class, etc.

(7) Where Classes.dex file, is our project in the SRC directory under the source code compilation, two RESOURCES.ARSC is both our R class in the compilation file

(8) Now we start to decompile, to see the source files and R classes

(9) Preparation tools Dex2jar and Jd-gui These two tools online a lot, search download can (Http://yunpan.cn/cfpRvDD8QJcKi extract code c156)

(10) Start: Copy the Classes.dex file to our tool Dex2jar file directory:



(11) Then in the Address bar to delete the address and then typed cmd enter (so we can directly navigate to the directory!) Very good) or manually find the directory!


(12) Then execute the Dex2jar.bat followed by the copy of the file you want to decompile Calsses.dex


(13) A jar file is then generated under the Dex2jar tool (this jar is only a class file that requires the next tool to be used)


(14) Then drag the generated Class_dex2jar.jar file into the second tool Jd-gui and you will see the


(15) In addition, we can also click File--save all sources generate the source code of the file, this is not, the source code has the rest is to kill is scraping with you

(16) To this end, has completed the anti-compilation of software, so that we can easily and happily read someone else's source code!


Android Project Package APK and APK 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.