[Video Tutorial]How to remove Google Ads from any apk

Search This thread

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,153
Nijmegen
www.broodplank.net
How to remove Google Ads from any APK

This tutorial will learn you how to remove Google Ads from any APK (app), the ads are a specific part in the source code that can can be removed easily without damaging the app.
Any ways, I encourage you to keep supporting the app developers by buying their apps. The outcome of this tutorial is made personal use only and you may not share (or even sell) the apps you cleaned from ads.

Requirements:
- Java 6/7 (JRE or JDK)
- APK Multi Tools
- ADB

Youtube Video:

or http://www.youtube.com/watch?v=Pw-e2m_TBxA


Instructions:

Step 1. Download and install/extract all needed packages. (Install JRE/JDK 6/7 and unpack APK Multi Tool and ADB)


Step 2. Looking what apps you have installed on your phone to pull (make sure you're in debugging mode)

- In ADB folder, run adb.bat
- Enter: "cd data/app"
- Enter: "ls", now your apps will show up
- Copy an apk name by right clicking in the cmd window and click mark, then mark the text and right click again to copy
- Now terminate adb.bat by either pressing Control+C and enterying "y" or closing the window.


Step 3. Pulling the apk

- In ADB folder, hold shift and right click in an empty place in the folder (not on some file/folder) > Open Command window here
(or press windows key + r and enter cmd, now enter "cd C:\your\adb\folder\here")
- once in command prompt, enter: "adb pull /data/app/[right click > paste]"
- After pulling the apk it will appear in your ADB directory. Now copy the apk


Step 4. APK Multi Tools Setup

- In APK-Multi-Tool folder, open setup.bat
- Enter "3" and press enter
- Enter "00" and press enter to exit setup
- Browse to /place-apk-here-for-modding/ and press Control + V to paste your pulled apk


Step 5. APK-Multi-Tool Decompilation

- In APK-Multi-Tool folder, open script.bat and press enter
- Enter: "24" and press enter, now choose your apk, probably #1
- Enter: "9" and press enter to decompile your apk
- Browse to the /projects/apkname folder


Step 6. Removing the ads

- In APK-Multi-Tool\projects\apkname.apk folder, open the smali folder
- Then browse to the com folder and then to the google folder
- Now you will see a folder called ads. remove this folder.


Step 7. Compiling the apk

- In APK Multi Tool, enter: "12" to start compiling the apk
- When a new text dialog appears, enter: "3" and press enter
- When the "keep folder" question shows press enter
- Now your signed apk (without ads) can be found in the APK-Multi-Tool\place-apk-here-for-modding folder
- Copy the apk (with "signed" in front of the name) and paste it in the ADB directory


Step 8. Installing the result

- Select the apk and press F2 (or change name) to copy then name to the clipboard then press enter to discard the name change
- Now, hold shift and right click in an empty place in the folder (not on some file/folder) > Open Command window here
(or press windows key + r and enter cmd, now enter "cd C:\your\adb\folder\here")
- Enter "adb install [right-click > paste]"
- Now the app will successfully install! Enjoy!
 
Last edited:

jimsiv

Senior Member
Mar 24, 2012
306
110
Very good tutorial Brood!!! But what if there is no smali folder in the apk? I saw that in some apps after decompiling there is not such a folder although there is ads in the application! Any ideas?
 
Last edited:

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,153
Nijmegen
www.broodplank.net
Very good tutorial Brood!!! But what if there is no smali folder in the apk? I saw that in some apps after decompiling there is not such a folder although there is ads in the application! Any ideas?

Thanks, I just discovered that the ad (service) in wordfreud (free) exists in EVERY folder inside the smali folder. And the ads can also exist in the resources it seems, just got noticed that this apk is 100% overfilled with ads in every possible way, making it even more fun to do xd
 
  • Like
Reactions: Xetro84 and jimsiv

DualJoe

Senior Member
Oct 12, 2011
2,101
979
de
You're deleting the ads folder. Not every app might accept that without crashing or use the ad implementation like this. They could put the classes somewhere else as well.
The best way imho is still DroidWall (also available on Google Play) that simply disallows every app to connect to the internet. Also hosts files block these ads individually. I recommend mvps hosts file (search for "hosts.zip" on the site). Goes into /system/etc.

If you want to go even further you can install tcpdump on Android, capture the traffic (tcpdump -s 0 -w /sdcard/tcpdump.pcap) and eg. load it up with Wireshark to find any DNS requests you might want to manually add/insert into your hosts file. For long-time capturing you might want to limit tcpdump to port 53 or something similar.
 
Last edited:

chinkster

Senior Member
May 31, 2010
597
55
can you please make a video that shows how to do this process SLOWER and with AUDIO?

edit: im just going to follow your written directions lol
 
Last edited:

chinkster

Senior Member
May 31, 2010
597
55
Just use adaway. You can find it via google.

Gesendet von meinem GT-I9001 mit Tapatalk 2

I don't want to use adaway because that app also blocks redirect links like with the app slickdeals. So I am trying to learn how to take the ads out of the app instead of using adaway. I used lucky patcher last night and it seem to work but I just want to learn how to manually remove it as well.
 

XeLLaR*

Senior Member
Jun 25, 2012
2,942
4,669
DevConnection
I don't want to use adaway because that app also blocks redirect links like with the app slickdeals. So I am trying to learn how to take the ads out of the app instead of using adaway. I used lucky patcher last night and it seem to work but I just want to learn how to manually remove it as well.

The app has a whitlist, you can add websites you dont want to get blocked.

Gesendet von meinem GT-I9001 mit Tapatalk 2
 

Top Liked Posts

  • There are no posts matching your filters.
  • 62
    How to remove Google Ads from any APK

    This tutorial will learn you how to remove Google Ads from any APK (app), the ads are a specific part in the source code that can can be removed easily without damaging the app.
    Any ways, I encourage you to keep supporting the app developers by buying their apps. The outcome of this tutorial is made personal use only and you may not share (or even sell) the apps you cleaned from ads.

    Requirements:
    - Java 6/7 (JRE or JDK)
    - APK Multi Tools
    - ADB

    Youtube Video:

    or http://www.youtube.com/watch?v=Pw-e2m_TBxA


    Instructions:

    Step 1. Download and install/extract all needed packages. (Install JRE/JDK 6/7 and unpack APK Multi Tool and ADB)


    Step 2. Looking what apps you have installed on your phone to pull (make sure you're in debugging mode)

    - In ADB folder, run adb.bat
    - Enter: "cd data/app"
    - Enter: "ls", now your apps will show up
    - Copy an apk name by right clicking in the cmd window and click mark, then mark the text and right click again to copy
    - Now terminate adb.bat by either pressing Control+C and enterying "y" or closing the window.


    Step 3. Pulling the apk

    - In ADB folder, hold shift and right click in an empty place in the folder (not on some file/folder) > Open Command window here
    (or press windows key + r and enter cmd, now enter "cd C:\your\adb\folder\here")
    - once in command prompt, enter: "adb pull /data/app/[right click > paste]"
    - After pulling the apk it will appear in your ADB directory. Now copy the apk


    Step 4. APK Multi Tools Setup

    - In APK-Multi-Tool folder, open setup.bat
    - Enter "3" and press enter
    - Enter "00" and press enter to exit setup
    - Browse to /place-apk-here-for-modding/ and press Control + V to paste your pulled apk


    Step 5. APK-Multi-Tool Decompilation

    - In APK-Multi-Tool folder, open script.bat and press enter
    - Enter: "24" and press enter, now choose your apk, probably #1
    - Enter: "9" and press enter to decompile your apk
    - Browse to the /projects/apkname folder


    Step 6. Removing the ads

    - In APK-Multi-Tool\projects\apkname.apk folder, open the smali folder
    - Then browse to the com folder and then to the google folder
    - Now you will see a folder called ads. remove this folder.


    Step 7. Compiling the apk

    - In APK Multi Tool, enter: "12" to start compiling the apk
    - When a new text dialog appears, enter: "3" and press enter
    - When the "keep folder" question shows press enter
    - Now your signed apk (without ads) can be found in the APK-Multi-Tool\place-apk-here-for-modding folder
    - Copy the apk (with "signed" in front of the name) and paste it in the ADB directory


    Step 8. Installing the result

    - Select the apk and press F2 (or change name) to copy then name to the clipboard then press enter to discard the name change
    - Now, hold shift and right click in an empty place in the folder (not on some file/folder) > Open Command window here
    (or press windows key + r and enter cmd, now enter "cd C:\your\adb\folder\here")
    - Enter "adb install [right-click > paste]"
    - Now the app will successfully install! Enjoy!
    8
    Thanks guys, soon I will reupload a new video which is recorded a bit slower and with more instructions ;)
    2
    Very good tutorial Brood!!! But what if there is no smali folder in the apk? I saw that in some apps after decompiling there is not such a folder although there is ads in the application! Any ideas?

    Thanks, I just discovered that the ad (service) in wordfreud (free) exists in EVERY folder inside the smali folder. And the ads can also exist in the resources it seems, just got noticed that this apk is 100% overfilled with ads in every possible way, making it even more fun to do xd
    2
    Very good tutorial Brood!!! But what if there is no smali folder in the apk? I saw that in some apps after decompiling there is not such a folder although there is ads in the application! Any ideas?
    2
    Added instructions, will upload a new more extended video later today
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone