APK anti-compilation usage on Mac Apktool

Source: Internet
Author: User

First, download the tools you need.

Link address: Link: http://pan.baidu.com/s/1gdIW2bh Password: 942d

Second, put the extracted files into a folder, you can also use the decompression command line tar -xvf apktool1. 5.2. Tar. bz2

go to the folder where the file is placed, execute the command ./Apktool

Third, anti-compilation apk file

Put the APK in the directory where the file is located and execute the command ./apktool D name . APK, and then generate an anti-compiled folder in the current directory, which is the extracted file

Four, new packaging, will be your current anti-compiled directory from new packaging,

Execute Command ./Apktool b name, the generated apk will be under name/dist

V.APK Signature-Create a. keystore file

Build APK is not signed with Android app, only apk containing valid app signature can be installed on Android.

You can use Keytool to generate. keystore files under Mac

Terminal input:

Keytool-genkey-keystore hxf.keystore-keyalg rsa-validity 10000-alias hxf.keystore

Here Hxf.keystore is the generated keystore certificate file name,-alias is the alias.

Next, under the terminal, enter the following information according to the process

Enter KeyStore Password:
Enter the new password again:
What is your first and last name?
[Unknown]: Kyokuhuang
What is the name of your organizational unit?
[Unknown]: Ssdut
What is your organization's name?
[Unknown]: Dlut
What is the name of your city or region?
[Unknown]: Dalian
What is the name of your state/province?
[Unknown]: Liaoning
What is the two-letter country/region code for this unit?
[Unknown]: CN
Cn=huangxufeng, Ou=dlut, O=ssdut, L=dalian, st=liaoning, C=china right?
[No]: Y

At this point, the security certificate is generated.

Six, sign the APK

Use Jarsigner signature app under Mac

Terminal input: Jarsigner-verbose-keystore Hxf.keystore-signedjar The name of the app after the signature. Apk-digestalg Sha1-sigalg md5withrsa the app name before signing. APK HXF . KeyStore.

Note that the last Hxf.keystore is the security certificate alias, which should be consistent with the parameters behind the-alias that created the certificate above.

This way, Jarsigner will sign the app with the certificate Hxf.keystore you generated.

At this point, your app can be installed and running properly on Android.

Seven,zipalign, if your app needs to upload Googleplaystore, it must be aligned.

Terminal command: ZIPALIGN-V 4 Enter the file name. apk output file name. apk

Viii. apktool Create Shortcut commands

Add the export path= $PATH on the. bash_profile file:/usr/local/bin, and then put the three files obtained in the second step into the/usr/local/bin, and then the command line to enter Apktool to see if the success

Welcome to learn and exchange qq:837138108 together

APK anti-compilation usage on Mac Apktool

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.