APK decompilation goes beyond advertising secrets, and apk decompilation secrets

Source: Internet
Author: User

APK decompilation goes beyond advertising secrets, and apk decompilation secrets
Decompile APK to Advertisement
Procedure:

1. Download apktool

: Https://code.google.com/p/android-apktool/downloads/list

2. decompile the apk using apktool. Enter the following command in the command line: apktool. bat d-f aaa.apk (apk path) decompile the APK File

3. start modifying the XML layout File

First, we enter the decompiled folder.

Go to the C: \ apk \ com. youmi. android. sample \ res \ layout directory.

Open activity_ad.xml in Notepad (Note: Different program advertisements are in different files. You can check that other files are in xml files under the res \ layout directory .)

The following code is displayed:

<LinearLayout

Android: id = "@ + id/adLayout"

Android: layout_width = "fill_parent"

Android: layout_height = "wrap_content"

Android: layout_alignParentBottom = "true"

Android: gravity = "center_horizontal"

Android: orientation = "horizontal"

>

This code is used to display advertisements. We can change it

<LinearLayout

Android: id = "@ + id/adLayout"

Android: layout_width = "fill_parent"

Android: layout_height = "wrap_content"

Android: layout_alignParentBottom = "true"

Android: gravity = "center_horizontal"

Android: orientation = "horizontal"

Android: visibility = "gone"

>

In this way, the advertisement is hidden.

4. Use apktool to compile the modified Code into APK and enter apktool. bat B aaa (the folder you compiled)

5. Remember to sign the new APK.

Sign apk file: jarsigner-keystore test. keystore-storepass password-verbose TestApp-unsigned.apk name_alias

 

Appendix

Jarsigner command details

[-Keystore <url>] keystore location

[-Storepass <password>] password used for keystore integrity

[-Storetype <type>] keystore type

[-Keypass <password>] private key password (if different)

[-Sigfile <File>]. SF/. DSA file name

[-Signedjar <File>] Name of the signed JAR File

[-Digestalg <algorithm>] Name of the digest algorithm

[-Sigalg <algorithm>] signature algorithm name

[-Verify] verify the signed JAR File

[-Verbose] Output details during signature/Verification

[-Certs] outputs details and displays the certificate during verification

[-Tsa <url>] Location of the timestamp Mechanism

[-Tsacert <alias>] Public Key Certificate of the time stamp organization

[-Altsigner <class>] Class Name of the alternative signature mechanism

[-Altsignerpath <path list>] Location of the alternative signature mechanism

[-Internalsf] contains the. SF file in the signature block.

[-Sectionsonly] does not calculate the hash of the entire list

[-Protected] keystore protected authentication path

[-ProviderName <Name>] provider name

[-ProviderClass <class> name of the encryption service provider

[-ProviderArg <parameter>]... main class file and constructor Parameters

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.