Android code signing and confusing packaging

Source: Internet
Author: User

Researched the Android apk puzzle signature and code wrapper, assuming no clutter package. Then apk people can directly view the source code to decompile it, although the clutter package or can understand. But not so easy to understand, to require at least some time

Assumptions not confusing , the post-compilation code such as the following:

is basically the source code.

Assumptions after confusion, post-compilation The code for example is the following:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">

There are a lot of names in the code, such as a, B, C, so it is difficult to read.


Let's start by saying the APK signature:

1.APK signature must first get a key, how to generate key? Then use the JDK to build.

The JDK must first be configured in the system environment variable.

This is not much to say, this is the use of Java must be configured.

2. Generate KeyStore


Executes CMD. Then use the CD to enter C:\Program files\java\jdk1.6.0_10\bin> (that is, the location of your C-drive installation JDK) folder, and then enter Keytool-genkey-aliasandroid . keystore-keyalg rsa-validity 50000-keystoreandroid. KeyStore


Significance:-validity is mainly the validity of the certificate, written 50,000 days.


The red Android Word can be changed to its own name.



After the command runs, the Android.keystore file is generated under the C:\Program files\java\jdk1.6.0_10\bin> folder. For example, with:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">


watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">


After getting the APK, you can pack and bring your own signature.

We need to add something to confuse the code before packing. We can't see the code properly after we pack and then decompile.

Confusing code in fact is often simple. Locate the Project.Properties file under the item that needs to be packaged. Open and then add a sentence at the top to be OK, for example:

This is not the case with the low version of ADT. The higher version of this is OK, assuming that the lower version number is written as proguard.config=proguard.cfg. Just now generally do not use, are engaged in the version number. In the high version, this will be the last step in the package to report the error: The approximate content of the error is:

Invalid proguard configuration file path c:.../proguard.cfg dose not exist or was not regular file


After the addition, you will be able to sign and pack the APK.

Click on the file-"Export ..." in the Eclipse interface.



watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">


watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">


watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">


watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb3lpx3rky3e=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">


And then you can! Successful everywhere with the signature of the confusing code APK.



Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Android code signing and confusing packaging

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.