APK anti-compilation to advertise big secret

Source: Internet
Author: User

apk anti-compilation go to adsSpecific steps:

1. Download Apktool

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

2. Decompile the APK with Apktool. On the command line, enter the following command: Apktool.bat d-f aaa.apk (apk Path) anti-compilation apk file

3. Start modifying the XML layout file

First, let's go to the anti-compiled folder, take my example

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

Open Activity_ad.xml with Notepad (note: Different program ads are located in the same file, you can view the other files, usually in the Res\layout directory in the XML file. )

You can see the following section of code

<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 the ads we can change to

<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"

>

So the ads are hidden.

4. Compile the modified code by Apktool apk, enter Apktool.bat b aaa (you compiled the folder)

5. Finally, remember to sign the new apk.

Sign apk file:jarsigner-keystore test.keystore-storepass password-verbose testapp-unsigned.apk Name_alias

Appendix

Jarsigner command Explanation

[-keystore <url>] KeyStore location

[-storepass < password;] Password for KeyStore integrity

[-storetype < type;] KeyStore type

[-keypass < password;] Password for private key (if different)

[-sigfile < documents;]. sf/. The name of the DSA file

[-signedjar < file;] Name of the signed JAR file

[-digestalg < algorithm;] The name of the digest algorithm

[-sigalg < algorithm;] The name of the signature algorithm

[-verify] Validating a signed JAR file

[-verbose] Output details when signing/validating

[-certs] Output details and certificate display when validating

[-tsa <url>] location of the timestamp mechanism

[-tsacert < aliases;] The public key certificate for the timestamp mechanism

[-altsigner <] class name of an alternative signature mechanism

[-altsignerpath < path list;] The location of the replacement signature mechanism

[-INTERNALSF] is contained within the signature block. SF file

[-sectionsonly] does not calculate the hash of the entire manifest

[-protected] KeyStore protected authentication Path

[-providername < name;] Provider Name

[-providerclass < class > name of the cryptographic service provider

[-providerarg < parameters;]] ... Main class file and constructor parameters

APK anti-compilation to advertise big secret

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.