Google Play Store serves in different sections of Play Store such as home page of Games and Apps, when you search for apps/games and in the app listing pages in footer section but more ads appear on top when you hit the install buttons. 

Usually we do not pay much attention to them because they are implemented in a way that make them look like they are not ads but are usual suggestions as you see in homepage and app listings. But, ads are ads and nobody likes them once you notice them. Its not just Play Store, they are everywhere. For desktop browsers, ublock origin is the antidote but for Google Play Store there is nothing. You just can't disable them. Not even with DNS based adblockers such as Adguard. They works fine upto a certain level in mobile browsers depending on which adblocker you use or which method you are use.

If you have rooted Android, you can block ads in Google Play Store without depending on any adblocker. I actually stumbled upon this thing accidentally and I have shared this method in my telegram channel and Twitter (post deleted though). Since not everyone uses Twitter/telegram, so wanted to share the method on blog. 

I am going to share the method first, then I will try to explain a little bit about how it works because it's not your usual adblocker.

How to block ads? 

A rooted Android device is the first requirement. The two guys who say things like "who roots their phone nowadays" should notice what's possible with root, it's not about custom ROMs always. Anyways, the second thing you need is GappsMod app, read about it in detail if you are hearing it for first time. 

Steps -
  1. Download this specific GappsMod version (GitHub or Telegram) and Install. You need a specific version for this because the one provided on official GappsMod github repo will not work. (You can try lol). The specific version is built by the GappsMod dev himself and provided in his telegram channel, you can compare signatures if you don't trust me. 
  2. Open GappsMod app, open the sidebar drawer and tap on Boolean mods, then search for the following package -
  3. Now search for the following flag and turn it on -
  4. Now open Play Store and Force stop it once and open, you will see the old UI. Wait for 2 minutes and force stop it again, now you will see the new UI. If you don't see it, just wait a few minutes and force stop & open.
  5. Now go back to GappsMod app and turn off the flag which we enabled in step 3.
  6. Now repeat the same thing we did in step 4 and you will see no ads this time.

In my testing it showed ads at one place, but that's better than seeing ads everywhere. Also remember that this method is not permanent and once you clear data of Play Store, you have to do everything again. 

How it works

If you ever visited a phone store you may have seen the phones attached to a cable and the phone is in demo mode. This is retail thing. When phones are placed for users to interact with them and experience it, they are in retail mode or demo mode. It means that some features are limited. Google added this Retail demo mode in Android with Android 7.1.1.

As stated in demo mode page - "Devices are set up for retail demo using a device owner app to ensure that device usage is restricted to certain demo mode apps only. End users must not be able to add a personal account on a retail demo device". It just means functionality is limited when phone is in demo mode. Google Play Store has this demo mode support and we are using this loophole to disable ads because Play Store does not show ads in demo mode.

With the above flag which I said to turn on, we are just forcing the demo mode in Play Store. So the actual loophole is - when we turn off the flag, Play Store should reset everything back to normal, but it doesn't. It doesn't revert the things related to ads. So in normal user mode, we don't see the ads after turning off the flag.

That's all about it, for more interesting feature leaks, flags and information you can join my "Gapps Flags & Leaks" channel on telegram :)