[Video Tutorial]How to remove Google Ads from any APK - Android Software/Hacking General [Developers Only]

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!

Hello,
The tutorial doesn't have any sound. I tried the youtube link, there is still no sound.

tomasitoc said:
Hello,
The tutorial doesn't have any sound. I tried the youtube link, there is still no sound.
Click to expand...
Click to collapse
I know, there isn't supposed to be sound. I don't like talking in the mic when I have to speak english all the time ;p

It is dificult to understand the video with out the sound. Please post text instructions

tomasitoc said:
It is dificult to understand the video with out the sound. Please post text instructions
Click to expand...
Click to collapse
I did
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!

Ooops, sorry about that request.
What is the difference between this, and the adfree app from the play store?

It worked. This is very helpful. Thank you. I just use the apk tool. To compile and decompile the apk. Then use rom toolbox to paste it back.
Thank you again

Thanks bro, i will learn.. May GBU

bang.i said:
Thanks bro, i will learn.. May GBU
Click to expand...
Click to collapse
it's from 2012, almost 10 years have passed. Unfortunately it's way more complicated nowadays.

Related

[GUIDE] NBH Utility 0.92 and Windows 7 for beginners

I finally found a way to get it working.
This may also apply to Vista users, i havent tested it!
What you need:
- Windows 7
- NBH Utility 0.92
- patchsplashv0.1
- "Create a boot splash screen tools for Raphael" pack
HERE is everything in one pack. Exept Win 7
When downloaded, unpack and go into the "NBH Utility 0.92" folder, rightclick on the exe file and go down to properties. mark compatibility mode and set it to "Win XP SP2" also set "Run as Administrator", now press ok and we are ready.
Make your Picture 480x640 8 bit (i prefer to use Photoshop).
When done, save it as "yourname.bmp"
open up "Create a boot splash screen tools for Raphael" folder and then go into "bmp to rsb to nb" folder, start up "rsbbmp.exe" add your file and convert it to "RSB".
Now start "Splash-RSB Converter.exe" and convert the "RSB" to a "NB" file.
Now copy the NB file into "patchsplashv0.1" folder
Hit "Windows button + R"
or
go in to "Start -> Run" write "cmd" and press enter or click OK
Now you are in CMD aka Commandprompt
now navigate to the "patchsplashv0.1" folder using these commands:
cd foldername (go in to a folder)
cd.. (if you need to go a folder back)
X: press enter, where x is the drive letter (go to a new drive)
When you are in the "patchsplashv0.1" folder in cmd write the following line:
patchsplash.exe R yourname.nb yournamepatch.nb
Now open up NBH Utility 0.92 an in the dropdown menu, select Raphael.
Now on the right find splash, and press the button to choose the patched NB file, yournamepatch.nb
press "Build NBH!!!", in the save screen go in to the folder where "NBHUtil.exe" is, and select a name for it, REMEMBER TO PUT .nbh AT THE END OF THE NAME!
this works for me on Win 7, and this is the ONLY way it works for me. Hope some of you guys can use it.
*Reserved*
*Reserved*

Problem

Is there a way to allow unknown sources be installed?
Sent from my SCH-I500 using XDA App
DroiDAddicT14 said:
Is there a way to allow unknown sources be installed?
Sent from my SCH-I500 using XDA App
Click to expand...
Click to collapse
Please search on these forums before opening up new threads. Answer to this question has been posted multiple times. Search for "side loading" apps, that's the tech term used.
On stock ROMs, u would need to enable side loading.
On some custom ROMs, there is an option to allow for unknown sources. On those that don't have the option, u would need to enable side loading of apps.
Steps to side load (copied from existing thread/post):
What you’ll need:
* Android SDK
* BusyBox
o If you don’t have BusyBox, go search “BusyBox” on the Android Market
o Once installed, open up the BusyBox app and follow the full installation directions to enable it
* Samsung Captivate with root
* SQL Database Manager
o We suggest trying the SQLite plugin for Firefox, you can find it here.
Process:
1. Turn on USB debugging: Settings >> Applications >> Development
2. Plug in your Samsung Captivate
3. Open up Command Prompt on your computer (Windows: start, search, type “cmd”, right click cmd, Run as Administrator)
4. Type in: cd _____PATH TO ANDROID SDK FOLDER______\tools
Example:
cd C:\Users\USERNAME\Desktop\android-sdk-windows\tools
Press ENTER
5. Type in: adb shell
Press ENTER
6. Type in: su
Press ENTER
7. Type in: cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
Press ENTER
8. Type in: cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db.backup
Press ENTER
9. Type in: exit
Press ENTER
10. Type in: exit
Press ENTER
11. Type in: adb pull /sdcard/settings.db %userprofile%\desktop
Press ENTER
Leave Command Prompt open
12. Open SQLite Manager in Firefox by pressing Tools >> SQLite Manager
13. Click “Database”
14. Then click “Connect Database”
15. Navigate to “settings.db” on your Desktop
16. Expand the tables
17. Click “Secure” on the panel
18. Scroll down to ID 6, “install_non_market_apps”
19. Double click it and change “value” from 0 to 1.
20. Close SQLite Manager
21. Go back to the command prompt window, type in: adb push %userprofile%\desktop\settings.db /sdcard
Press ENTER
22. Type in: adb shell
Press ENTER
23. Type in: su
Press ENTER
24. Type in: cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings
Press ENTER
25. Type in: chmod 777 /dbdata/databases/com.android.providers.settings/settings.db
Press ENTER
26. Type in: reboot
Press ENTER
27. Disconnect your Captivate from your computer while your phone reboots.
Congratulations! You can now sideload non-market applications on your Samsung Captivate.

[GUIDE] JDK,SDK and ADB Installation

I originally did this for the Hero to help new users install ADB and the files required for Resigning and developing.Thought it would be handy here too!
If you have the Android drivers installed and just want ADB then download THIS FILE and extract the contents to /windows/system32 (32 bit windows) or /windows/sysWOW64 (64bit windows)
WINDOWS 7
Thought i would make a noob friendly guide on setting all these up..should make it easier foor noobs to have some fun
If you have user account control on you will need to run these as administrator! Or just turn off UAC
To make it more noob friendly i will include pictures
Download Java JDK HERE
Android SDK HERE
And Testsign.zip View attachment 330328
Install Java JDK by double clicking the JDK file you downloaded
Now goto My Computer > Local Disk (C:\) and create a folder called Android and open it.....Create another folder called androidSDK (NO SPACES!)
Extract the Android SDK you downloaded into the AndroidSDK folder there should now be 5 folders in there....)FIG(A)add-ons,docs,platform,usb_driver and tools...
Go into tools and keep it open...the top bar will say something like C:\Android\androidSDK click this top bar and copy it ALL!FIG(A)
Now you need to add the tools folder to your path....
Right click my computer > Properties > Advanced system settings > Enviroment variables
In the system variables box (the lower one) find the path it should be the 5th one down (under OS) highlight path and click edit....
Now go to the end of that line and put a ; there..Then paste the line you copied earlier..
Your path should now look like FIG(B)
now make a Tea/Coffee/Grab a beer or whatever
Back to your tools folder now...Remember that Testsign.zip? Well extract it into your tools folder please.
Next click start (win7 logo in your taskbar) and type CMD it should say command prompt.exe double click it!
Now is the test! Type autosign and hit enter (not hard obviously) If it says XDA in huge letters you are laughing! If not drag and drop Autosign.bat from your tools folder into the CMD window and press enter.
type 1 > enter > yes
2 > enter > yes
3 > enter > yes (enter means press enter not type it.just in case your such a noob you dont know your own keyboard)
You should now be able to resign .apk files by right clicking, if that doesnt work you can type autosign in a cmd window and do option (4) to manually sign.
To install drivers for your android device.......
Option a) Install HTC Sync
Option b) Use the files from the Android SDK
Check adb debugging is enabled on your phone and plug the bad boy in,go to device manager (right click my computer) find ADB (it will probably have a warning sign) right click that and direct the install to your USB_DRIVER (or Program Files\HTC\HTC Driver) folder
Open up Command prompt (CMD.EXE) type adb devices should say something like HT01GL902119 device
I will be installing linux this weekend so will do a tut for linux next week
Thnxx man very helpful
As wanted to point out that there's no fastboot option in sdk now. So might want to include the link for the file. I believe its from goo-inside.me
Great guide btw
Sent from my HTC Pyramid using Tapatalk
Any guide for ADB over wifi.
That will be nice.
Great job.
Sent from my HTC Sensation Z710e
I'll add adb WiFi in the morning when I'm sober also will add fastboot file! Thanks guys!
When picking option 2 in the Command prompt I get an error that the testsign is cannot be found. I've followed the instructions and pictures. When I look in the tools folder in the AndroidSdk folder I don't see all of the testsign zip in the folder.
Thanks Mate... I was looking for such a guide for Long... Will subscribe to the Thread so that I dont loose it...

[Guide] Enable mobile data\WiFi to login to gmail account after getting locked out

Okay, So just today my girlfriends room mate at uni decided it would be funny to lock her out of her Galaxy S II
I Tried every available method to me to try and get it unlocked but it wouldn't work.
After some time of scratching my head at this, I found the answer
These are the steps you have to follow in order to make this work
1.Make sure USB Debugging is on [Sorry to those of you who haven't got it turned on :\]
2. Make a folder called adb anywhere you like and place the files in the zip called adb (needs to be extracted) you can use WinRAR, 7zip
etc) attached to the bottom of this post.
3. Attach your phone to your PC and make sure all drivers are installed
4. Open up a command window (this can be done by pressing the start button on your keyboard and r together, then typing cmd) and navigate to the adb folder you created. The command : cd C;\Users\%userprofile%\%yourdirectory%\adb (replace userprofile with your username and yourdirectory with the directory you chose to place adb, don't forget to remove %!!)
5.Now type this command exactly and when done hit enter: adb pull /data/data/com.android.providers.settings/databases/settings.db
6.Don't close Command, but go to the folder where you extracted adb, there should be a new file there called settings.db
7. What I did was transferred the file to my Galaxy S3, and I used an SQlite editor
8.Using an SQlite Editior, go to the tab that says files and scroll down to your sdcard or external sdcard wherever you put it, open the settings.db.
9. There are 6 Options; android_metadata, bluetooth_devices, bookmarks, secure, sqlite_sequence, system. Go to the option that says secure and navigate down to mobile_data or wifi_on.
10. These options either have a 1 or a 0 under the value column, 0 for being off, 1 for being on. Let's assume both are 0. Now if you don't have mobile data, leave this at 0, if you do have it change it to 1, the same with wifi change it to one and you should save the changes you make when you exit.
11. Plug the device back to your computer and copy the new settings.db to the adb folder and overwrite any existing files.
12. Use the command and once done hit enter: adb push ./"settings.db" /data/data/com.android.providers.settings/databases
You should get an immediate response if not just reboot and then your data or wifi should be on and you are able to login to your gmail without a problem
Hope this helps anyone who gets stuck like this

GUIDE: [WAYNE][MIUI] How to enable Camera2API without root

A few things before:
This process worked to me and can work to you, however, I can not give any garantee of how you will understand it, so, if you follow these steps, do it at your own risk.
-----------------------------------------------------------------
Before getting into this, you must have USB debugging enabled, an unlocked bootloader, a converted MI A2 to MI 6X, TWRP recovery installed.
This guide includes a fix to "Can't connect to camera" bug.
-----------------------------------------------------------------
Requirements:
TWRP Wayne
ADB
Your phone must be in MIUI
USB Debugging, unlocked bootloader enabled in Developer options
Platform-tools
Compatible USB Cable
----------------------------------------------------
Install Platform-tools
Place TWRP boot image in adb folder
Inside ADB Folder, hold "Shift" key in your keyboard and click right button in your mouse and select "Open Command prompt here" or whatever it shows in your language.
In Command Prompt, type
Code:
fastboot devices
and Enter - you shall see your device's ID
In Command Prompt, type
Code:
fastboot boot twrp-[version here]-wayne.img
and Enter, your phone your restart and load TWRP Recovery.
Go to Advanced > Terminal and type:
Code:
setprop persist.camera.HAL3.enabled 1
Go to Mount and check "Data" and "System"
Go to Advanced > File Manager
In File Manager go to /system/etc/device_features
In "device_features", select "wayne.xml" and rename it to "whyred.xml"
Back to /system in "Up A Level", select build.prop > Copy File > navigate to /sdcard/Download and touch the folder icon (down right) and Swipe to confirm, then, reboot system.
In your computer's file manager, open the MI 6X and navigate to Download, copy the file build.prop to a computer's folder and open it with an advanced text editor (I recommend Notepad++).
(for security purposes, backup the original build.prop file in your computer and in your phone, just in case)
Find the line "ro.product.device=wayne" edit it to "ro.product.device=whyred" and save.
Copy build.prop back to phone's Download folder (you should replace it)
Restart phone in Fastboot mode and boot with TWRP again (steps 2, 3, 4).
Go to Mount and check "Data" and "System"
In File Manager go to /sdcard/Download, select build.prop > Copy File > Up A Level (twice) > /system, tap the folder in right down and Swipe to confirm.
In File Manager, in /system, select build.prop > chmod > Permission, change 0000 to 644, confirm
Back and reboot to system.
Voilà! You're now with Camera2API enable and with no root.
Enjoy Google CAM
This tutorial is based in akshayakakat guide, Andres Videla guide and it is a modified version of ARNOB XENON guide.
Thanks for your work, guys!
It doesn't work on my Redmi 6X with Xiaomi.eu rom.
APK file
Do you have Gcam apk file? Share with me.
Thanks it helped...

Categories

Resources