Skip to main content
  1. Posts/

Avoid Ads At Any Cost

1653 words·8 mins
ads
Malvru
Author
Malvru
Love C!
Table of Contents

In this article I will guide you through all the steps I take in order to avoid every single ad one could encounter while using your web browser, phone, tablet et cetera.

It is important to note that using a blocker is NOT theft. Do not fall for this creepy idea. The ultimate logical consequence of blocking = theft is the criminalization of the inalienable right to privacy. Ads, “unintrusive” or not, are just the visible portion of the privacy-invading means entering your browser when you visit most sites. uBO’s primary goal is to help users neutralize these privacy-invading methods in a way that welcomes those users who do not wish to use more technical, involved means (such as uMatrix). — Raymond Hill1

Android Phones
#

Note: As of December 9 2022, the Revanced-Patches repository is closed due to a DMCA takedown notice from two of the patcheable applications, whose devs (or marketing/sales guys should I say) got butthurt their app wasn’t really that hard to patch and avoid paying premiums. I hope this will be resolved soon and

It’s no secret that Android phones offer a greater level of customizability when comparing to iPhones. That’s why I have always chosen not to go the Apple route. Even though I love a nice designed UI and system-wide coherent desings, something that Apple has managed to do for years now, and hate the undecisiveness of Android designers throughout the years (switching UI desings every other major release), the customizability that Android offers has always managed to make me stay.

When Android users online refer to this famous customizability, they often talk about the design customizations that let you further personalize your phone to your liking (Launchers, Icon Packs, Themes…). When I speak about customizability, I talk about the freedom of an “open” platform like Android. This openness lets everybody develop apps and release them freely without a company like Apple gatekeeping every move on their appstore.

This freedom often manifests itself as letting users sideload applications previously not approved by Google, something that Apple disallows for obvious monetary reasons.

Revanced
#

Revanced

The Revanced project is a “reimagination” of the famous Vanced project which abruptly ended a few months ago. The previously mentioned sideloading allows us to install modified apps with functionality that the developers didn’t plan on adding or straight up removing obnoxious features that nobody likes.

And on that note, let’s talk about what the Revanced project does: Revanced developed an application decompiler/recompiler called revanced-patcher using Apktool, aapt2 and multidexlib2. As the name implies, this app can patch applications with custom patches that “apply” on top of the decomplied code and then recompile it as an installable .apk file.

But, what patches?

Note: The number of patches and their relative minimum version requirement are the ones currently available at the time of writing

If we apply the general-ads and video-ads patches we will get rid of all ads across the entire app

YouTube
#

📦 com.google.android.youtube

💊 Patch 📜 Description 🏹 Target Version
...
general-ads Removes general ads. 17.45.36
video-ads Removes ads in the video player. 17.45.36
...

YouTube Music
#

📦 com.google.android.apps.youtube.music

💊 Patch 📜 Description 🏹 Target Version
...
music-video-ads Removes ads in the music player. 5.31.50
...

TikTok
#

📦 com.ss.android.ugc.trill

💊 Patch 📜 Description 🏹 Target Version
...
hide-ads Removes ads from TikTok. all
...

Twitter
#

📦 com.twitter.android

💊 Patch 📜 Description 🏹 Target Version
...
timeline-ads Removes ads from the Twitter timeline. all
...

Twitch
#

📦 tv.twitch.android.app

💊 Patch 📜 Description 🏹 Target Version
...
block-audio-ads Blocks audio ads in streams and VODs. all
block-video-ads Blocks video ads in streams and VODs. all
...

Reddit
#

📦 com.reddit.frontpage

💊 Patch 📜 Description 🏹 Target Version
...
general-reddit-ads Removes general ads from the Reddit frontpage and subreddits. all
...

Ads and more
#

Even though I ommited lots of patches for the sake of readability, there are more patches that not only let users recompile these apps without ads but also add QOL improvements that really improve the application usability and customization.

So, how do I do all that?
#

Currently, the easiest way is to get these applications is to use revanced-builder. With this prgram we can patch and build the previously mentioned (plus many others too) apps. Let’s start by doing it on a computer, and in my case, an Arch Linux machine.

Computer
#

For this example I’ll download it from their Github releases pages since it is easier and cleaner in terms of depencencies.

Github release

Here I’ll download the linux version even though you can get the Windows or MacOS version too. Don’t worry, it should be the same.

After running it, a new page will open on our default browser:

Next, we click on start patching:

Here we can see all the applications that the builder currently supports. Due to limitations with split-apk installations, this builder will not show many other apps that can be patched. So, now, we select any of the applications we want to patch and the hit continue. In this case I will select YouTube because of how bothering their ads are on mobile:

Note: The YouTube and YouTube Music apps require an special patch to simulate google services unless our phone is rooted.

Now we must select the patches we want:

Note: Unless we have a rooted Android phone, we need to select the patches flagged as “Needed for Non-Root Building”

When we are done selecting the patches we can simply hit continue:

I always go with the version which says recomended for the sake of compatibility.

Finally, clicking Continue will download the app. I won’t bother putting an screenshot of this last step because it’s just another Continue button for letting us know that the download was successfull and take us to the decompilation-patching-compilation process.

In the final screen the builder will do the patching and if everything goes right, we should get a message like this:

Now it lets me keep patching or simply quit. Since I ran the program on my Downloads folder, the revanced folder got created there too. So, in order to get the apks we need to find the files ending in “.apk” that match in name with the name it gave us on the page. For example, since I patched YouTube, I will search for “ReVanced-YouTube-v17.45.36-cli_v2.16.1-patches_v2.140.0.apk”.

Dont get distracted with the files with names like youtube.apk etc. Those apps are the original apps the builder downloads to patch, so ignore them.

Finally, we can copy these apks to our phone or tablet and then install them there.

Note: Since my device isn’t rooted I will copy the VancedMicroG apk that we got because we need to simulate the google services.

Once we are on the target device, we need to find the files we transfered and install them. Dont panic if the apps don’t isntall on the first try, it is normal. Since we recompiled the apps localy, the apps were signed with another keystore, which obviously isn’t Google’s, so the signature missmatch will throw an uncompatible application error of the sort.

To fix this simply uninstall the previous application and try again. Also install MicroG if you need (I know I do). Now, if I open the YouTube application, I will see the default YouTube “Landig page”. We can use the app normaly already but the point of using the app is to log in and see recomendations and subscriptions, so in order to do that we simply click on the top right icon and log in as if it was another regular google app. If using MicroG services, this will take us to the app and log in through there.

Other apps (except YouTube Music) don’t require all this MicroG services. so the installation will be the same except the last step.

Device
#

If we don’t have a computer handy or we just rather do everything on our device, good news, we can!

For this we will need FDroid’s Termux app. And yes, it HAS to be the FDroid one since the Google Play version doesn’t work for this use case.

Once we have installed it, we can follow the steps on reisxd’s Github on how to do it, but for the sake of clarity I will explain how here too:

Copy this text

curl -sLo revanced-builder.sh https://raw.githubusercontent.com/reisxd/revanced-builder/main/android-interface.sh
chmod +x revanced-builder.sh
./revanced-builder.sh

And paste it on Termux. Then hit enter and the program will open a web page on your default web browser just like on PC.

After that, the steps are all the same except for the location of the apks once patched, which on android will be the root directory of your phone file system (not the /root but the main directory, you get me).

Browsers
#

Firefox

Honestly, this is easy and simple to do compared to the previous steps. Avoiding ads on PC is way easier than in phones because all the pages we see, we see through a browser, so a regular ad-blocker would be enough.

For both computers and phones I recomend using Firefox since both support ad-blockers through extensions, something that chrome for phones doesn’t.

uBO

From all the ad blockers I only recomend using Ublock Origin since it is the most famous blocker that doesn’t sell user information nor shows ads on pages that paid them to not work like adblock does on twitch, for example.

uBlock Origin works on almost everything you can imagine: YouTube, Twitter, Amazon, Spotify…

Twitch
#

For Twitch we have an exception because uBlock Origin doesn’t work on stream or video ads. To fix this I use the TTV.lol extension which is open source and has worked for me until now.


  1. The above quote is excerpted from Raymond Hill’s Github page ↩︎