APK anti-compilation and repackaging

Source: Internet
Author: User

Recently with ANYSDK to connect Android, access a little trouble, but did bring a lot of convenience, access to new channels only need to set parameters can be, the only thing to note is that when the release of DebugMode closed.

However, the problem with Android ANYSDK is that all channels must use the same set of resources, and then use the parent package to generate the channel package, the package can not be differentiated, which is somewhat contradictory to our project. To solve this problem, there are two ways to think about it:

    1. The mother package will be a channel of the final resources into, and then generate channel package, this is really feasible, but it is too cumbersome, not maintenance, and make the convenience of anysdk greatly reduced.

    2. Generate all channel packages at once, then decompile them with tools such as Apktool, add the diff files, and re-sign them.

      Anti-compilation is no problem, there is a problem: need to download an additional Apktool.jar. Did not expect to re-sign the card for a long time, because the online command is Jarsigner-verbose-keystore xx.keystore-signedjar-pkg.apk pkg1.apk Xx.keystore, also did not say each parameter what meaning, uses the time is always wrong, has been engaged for a while to succeed.

      The following commands are explained below:

      JARSIGNER:JDK under a tool, suffix exe

      -verbose: Output Details

      -keystore: Secret key file

      -signedjar: Signature file, the first parameter is a signed file, equivalent to the output file, the second is an unsigned file, input file. began to make a reverse, thought the first is the input, the second output, was a hole.

      The last parameter, is keystore alias name, Online said really fraught, put two KeyStore file name has meaning, is it.


So the correct command should be: Jarsigner-verbose-keystore Xx.keystore-signedjar output.apk input.apk Alias

This article is from the "Mountain Heavy Water Complex" blog, please be sure to keep this source http://huanghaitao.blog.51cto.com/10005736/1762751

APK anti-compilation and repackaging

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.