Remove Ads From Apk

Remove Ads From Apk

Ready baksmali & smali

  1. Java, More Setup Detail
  2. The Repo in Github of Baksmali/Smali, Download Baksmali/Smali

Unpacking .dex file

  1. Unpacking .dex file using baksmali, and it will generate a folder called out:

    java -jar baksmali-2.2.5.jar d classes.dex
    
  2. Notepad++: File -> Open file in workspace -> Choose out folder

  3. Search in files for http://, and modifying all possible URL of ads.

    Notice: Do not delete or modify the ULR contained %s:%d/%s schemas.android.com/apk/res/android

  4. Packing the out folder to a .dex file using smali, and it will generate a file called out.dex:

    java -jar smali-2.2.5.jar a out
    
  5. Modify the filename of out.dex to classes.dex, and replace the out.dex in APK file. (open with WinRAR)

Resign your APK file

  1. Delete the signature in your APK: the folder called META-INF:

  2. Build certificate debug.keystore:

    keytool -genkey -alias androiddebugkey -keyalg RSA -validity 20000 -keystore debug.keystore -storepass android -keypass android
    
  3. Resign your APK:

    jarsigner -verbose -keystore debug.keystore -storepass android -signedjar YOURAPK_signed.apk -digestalg SHA1 -sigalg MD5withRSA YOURAPK.apk androiddebugkey
    

你可能感兴趣的:(随意的研究)