APK software Anti-compilation go ads
Specific 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
1 <LinearLayout2 Android:id= "@+id/adlayout"3 Android:layout_width= "Fill_parent"4 Android:layout_height= "Wrap_content"5 Android:layout_alignparentbottom= "true"6 android:gravity= "Center_horizontal"7 android:orientation= "Horizontal"8 >
This code is used to display the ads we can change to
1 <LinearLayout2 Android:id= "@+id/adlayout"3 Android:layout_width= "Fill_parent"4 Android:layout_height= "Wrap_content"5 Android:layout_alignparentbottom= "true"6 android:gravity= "Center_horizontal"7 android:orientation= "Horizontal"8 android:visibility= "Gone"9 >
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
1 jarsigner Command Explanation2[-keystore<URL>] KeyStore Location3[-storepass<Password>] Password for KeyStore integrity4[-storetype<type>] KeyStore type5[-keypass<Password>] Password for the private key (if different)6[-sigfile<file>] . sf/. The name of the DSA file7[-signedjar<file>] The name of the signed JAR file8[-digestalg<algorithm>] The name of the digest algorithm9[-sigalg<algorithm>] Name of the signature algorithmTen [-verify] validating a signed JAR file One [-verbose] Output details when signing/validating A [-certs] Output details and certificate display when validating -[-tsa<URL>] The location of the timestamp mechanism -[-tsacert<aliases>] The timestamp mechanism's public key certificate the[-altsigner<class>] The class name of the replacement 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>the name of the cryptographic service provider A[-providerarg<Parameters>]] ... Main class file and constructor parameters
Android apk anti-compilation get Java source code (v)