Replace the jar package file in the APK

Source: Internet
Author: User
Tags android games

"QBoy"

December 21, 2014

These days, my first time to do Android games (we! Youth) will soon be online. Before you go online, you need to add the SDK for each channel to our game and connect with the channel. But business is very strong, and suddenly contacted more than 10 channels, let me overwhelmed. Fortunately, with the ANYSDK, you can pack one-click. But the problem is, the people who are too busy, and the Channel SDK update too fast. So there are times when the SDK version of any may be inconsistent with the version of the channel. So what? A contact ANYSDK update (as if not so fast), second, if it is just a change of resources and jar package, whether the tool can be used to decompile. Now I'm going to write this painful experience.

The main process is as follows:

  

Each tool is:

Apktool:v2.0.0-rc3

dex2jar:v0.0.9.15

smali:v2.0.3

jdk:1.7

Each command is:

1. Unpacking: Apktool D a.apk

2, Jar->dex:d2j-jar2dex.bat Xxx.jar

3, Java-jar baksmali.jar-o classoutput Xxx.dex

4. Packing: Apktool b A (folder)

5, signature, if there is no special requirements of the signature can use the Dex2jar collection of D2j-apk-sign to sign, if you have signed that use Jarsigner to sign.

Signed command line: Jarsigner-verbose-keystore (keystore file)-signedjar a.apk (signature output apk name)-digestalg sha1-sigalg Md5withrsa game.apk (enter apk) alias (alias).

PS: Pay special attention to the red part, if jdk7 need to add this, if not signed after the package can not be installed. JDK Plus does not make mistakes, so it is recommended to add.

Above, just my first time to the APK in a very preliminary unpacking unpacking process, I hope to help you a little bit.

Replace the jar package file in the APK

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.