Close Menu
    Facebook X (Twitter) Instagram Threads
    The Open Source Post
    • About
      • About FOSS Post
      • Donate
      • Privacy Policy
      • Services
    • Q&A
      • Take a Quiz
    • Linux
      • Ubuntu
    • AI
    • News
    • Statistics
    • Featured
      • Blog
    • How To
    • Software
    • Resources
      • Open Source Android Apps Series
    • Contact Us
    • Read More
      • Insights
    Facebook X (Twitter) YouTube
    The Open Source Post
    Home - Open Source on Android - Block Ads on Android in Apps and Games With AdAway
    Q&A

    Block Ads on Android in Apps and Games With AdAway

    M.Hanny SabbaghBy M.Hanny SabbaghApril 19, 2024Updated:May 21, 2026No Comments4 Mins Read193 Views

    Android is a very functional and extendable operating system, and at the end of the day, it remains a Linux distribution. Currently, it powers an estimated number of 3.9 billion phones around the world, or 70% of the smartphone market share.

    One annoying aspect you may find in it, however, is that many Android apps and Android games are loaded with annoying or intrusive ads. Ads that usually don’t respect your privacy and try to spy on your activities across your entire smartphone usage.

    Luckily, you can easily disable ads in all Android apps and games with this open-source application.

    Blocking Ads in Android Apps and Games

    AdAway is an open-source application available on the F-Droid store to block ads via the hosts file. F-Droid is a famously known open-source market application that only hosts open-source applications in its app catalog. If you don’t have F-Droid already, then you can download it as an .apk file from its official website and install it.

    AuroraStore is the Open Source Google Play Alternative

    The “hosts file” is a system-level file in Linux-based distributions that allows or blocks access to any domain name via DNS. By editing this file, one will be overwriting the default DNS rules to control access to any domain name they want.

    The way AdAway works is that its developers have already compiled a list of domain names that serve ads and other tracking scripts, so when you use the app, your system hosts file will be loaded with their lists so that these domain names get blocked. A dummy VPN connection is used to provide this functionality, although there is no real VPN connection used whatsoever.

    Once these domain names are blocked, ads will no longer be shown across all Android apps and games on your system because they can no longer establish a connection to their original websites to serve ads.

    It’s a very simple and effective idea.

    Once you have F-Droid installed, you can install AdAway from the following link or search for it from inside the app on your smartphone.

    The first window that appears when you launch the app will ask you about what approach you want to use to block ads. AdAway also supports using another method to block ads, but it will require a rooted device to work. Since most people don’t have rooted phones and don’t want to root their phones in order to avoid losing the smartphone vendor guarantee, we will just proceed with simple “VPN-based blocking”.

    Once the app finishes syncing its block lists, it will start working automatically across your Android system.

    Just make sure you go to the preferences of the app, and turn on the following option to make sure that the application remains working even if you get disconnected from the network and reconnect later on:

    AdAway is a DNS-based adblocker. You can add, remove or redirect any domain name you want from the main window of the app:

    That’s all there is to do.

    If you check some of your Android apps and games that used to contain ads, you will now see that they no longer show ads.

    Conclusion

    Purely using open-source applications, we have been successfully able to block intrusive and privacy-hijacking ads across our entire Android system. If there are certain websites or domain names that you want to whitelist, then you can easily do so from the application as well. You are in full control over your phone and what you want it to do.

    Remember, though, that AdAway only blocks advertisements and not tracking scripts. For blocking tracking scripts with AdAway, you need to load it with additional compiled lists from the community.

    AdAway can also be used to block pornography and mature websites by the way; you just have to load it with the needed block lists to do that. It could be a suitable way to help you secure your children’s smartphones, for example.

    AdAway is not by any means the only open-source app to block ads on Android. There are many others, and you can explore them by getting additional software channels as described in our series of blog posts below:

    Open Source Android Apps Series
    Open Source on Android
    M.Hanny Sabbagh
    • X (Twitter)

    With a B.Sc and M.Sc in Computer Science & Engineering, Hanny brings more than a decade of experience with Linux and open-source software. He has developed Linux distributions, desktop programs, web applications and much more. All of which attracted tens of thousands of users over many years. He additionally maintains other open-source related platforms to promote it in his local communities.Hanny is the founder of FOSS Post.

    Related Posts

    192 l.168.1.1 Admin Login

    May 29, 202612,693 Views

    Most Popular Linux Distros 2026: Market Share, User Base and Adoption Trends

    May 21, 20269,618 Views

    Top 7 Open Source CCTV/IP/Camera Monitoring Software

    August 8, 20245,522 Views

    Enable Zram on Linux For Better System Performance

    February 24, 20234,373 Views

    Make Your Linux Look Like Windows XP, 7 and 10

    March 26, 20203,932 Views
    The Open Source Post
    Facebook X (Twitter) YouTube
    • About
    • Privacy Policy
    • Take a Quiz
    • Write For Us
    • Services
    • Contact Us

    Type above and press Enter to search. Press Esc to cancel.