[APP][ROOT/NONROOT][OFFICIAL] AdAway v6.1.1

Search This thread

ktmom

Retired Forum Moderator
Apr 22, 2015
5,176
3,387
Deep Space Station K7
Hello
it's possible to add an application to the whitelist? If yes, how? Thank you.

Not as requested. That's not the way hosts files work.

What you can do is Log DNS requests from the app and whitelist those.

---------- Post added at 13:27 ---------- Previous post was at 13:20 ----------

AdAway does not work any more on my new phone (Motorola G7 Power, Android 9.0 Pie, Magisk 20.0). Systemless hosts are enabled in both Magisk Manager (with reboot, of course) and AdAway. Although AdAway displays the latest hosts file as activated without any error message, ads are still shown in apps.

Screenshots can be provided on request.
You indicated that you rebooted after enabling the systemless hosts module in Magisk. Did you reboot after applying Adaway?

If after a reboot ads are still appearing, then it's time to go back to basic troubleshooting. If you check the size of the /etc/hosts file, is it larger than just a few bytes? You can also check the text banner at the start of the /etc/hosts file, it should indicate it was built by Adaway.

If not, then the hosts is not applying correctly. Getting logs would help.

If the hosts file is properly updated, then what app(s) are you having trouble with? Have you checked on both mobile data and Wi-Fi?
 
Last edited:

frankenwald

New member
Oct 15, 2019
3
0
You indicated that you rebooted after enabling the systemless hosts module in Magisk. Did you reboot after applying Adaway?

If after a reboot ads are still appearing, then it's time to go back to basic troubleshooting. If you check the size of the /etc/hosts file, is it larger than just a few bytes? You can also check the text banner at the start of the /etc/hosts file, it should indicate it was built by Adaway.

If not, then the hosts is not applying correctly. Getting logs would help.

If the hosts file is properly updated, then what app(s) are you having trouble with? Have you checked on both mobile data and Wi-Fi?

Thanks for all the advice so far.

Yes, I did reboot after applying AdAway. The hosts file was definitely built by AdAway too (being a new user, I cannot post the links inside the hosts file here):

Code:
# This hosts file has been generated by AdAway on:
# 2019-10-15 15:23:53
# Please do not modify it directly, it will be overwritten when AdAway is applied again.
# This file is generated from the following sources:

I'm having trouble with every app that features ads (except for web pages in Firefox, thanks to uBlock Origin). I don't even have a mobile data plan, so I fully rely on WiFi.

What kind of logs should I provide?
 

ktmom

Retired Forum Moderator
Apr 22, 2015
5,176
3,387
Deep Space Station K7
Thanks for all the advice so far.

Yes, I did reboot after applying AdAway. The hosts file was definitely built by AdAway too (being a new user, I cannot post the links inside the hosts file here):

Code:
# This hosts file has been generated by AdAway on:
# 2019-10-15 15:23:53
# Please do not modify it directly, it will be overwritten when AdAway is applied again.
# This file is generated from the following sources:

I'm having trouble with every app that features ads (except for web pages in Firefox, thanks to uBlock Origin). I don't even have a mobile data plan, so I fully rely on WiFi.

What kind of logs should I provide?

A basic test would be to use a terminal app and "ping" an entry from the hosts file. It should return with localhost (127.0.0.1). If not, then there is something bypassing the hosts file.

Try these steps from the Adaway wiki.

There's also the issue that hosts files can not help when ads are bypassing DNS via the use of IP addresses, proxies, etc.
 
  • Like
Reactions: mrrocketdog

frankenwald

New member
Oct 15, 2019
3
0
A basic test would be to use a terminal app and "ping" an entry from the hosts file. It should return with localhost (127.0.0.1). If not, then there is something bypassing the hosts file.

Try these steps from the Adaway wiki.

There's also the issue that hosts files can not help when ads are bypassing DNS via the use of IP addresses, proxies, etc.

Please don't ask me why, but suddenly it works (I did neither change any settings nor reboot my phone nor restart any app—I just pinged some ad servers via Termux and got a localhost response). Must be some kind of magic. Thanks for all your help!
 

esgie

Senior Member
Feb 17, 2013
332
179
Figured it out! If anyone has the same problem, here's the answer: there's a "Hide Magisk" option in settings. If you click on it, it renames Magisk Manager app to just "Manager". It also seems to prevent apps not installed through Magisk itself from requesting root since the root checker app I downloaded also didn't work. The fix: uninstall Magisk Manager and reflash the zip through TWRP. Then you should be all set, just don't hit that "hide Magisk" button in settings or you'll need to repeat the steps above.
This happens when there is a mismatch between the signatures of su binary and magisk manager app, resulting in lack of control over the su permissions.
Hide magisk option repacks the apk with random package name. As the resulting apk is modified version of the genuine manager apk, it requires signing. Manager does it automatically.
But it seems that your Manager version does not use the proper signature when doing it.
What I feel is that you are flashing, for example, a stable magisk release and then update it via manager app to beta or canary. All those variants use different signatures and switching between them should be always performed by full uninstall and flashing from the scratch.
 

martyfender

Senior Member
Mar 9, 2017
3,391
1,860
Indianapolis, IN
Mod Edit: unnecessary comment deleted

His point is that xda rules state that one must search first, not be spoon fed.
He is also correct that with a brief search, one can find many mentions of Adaway not being able to block Youtube ads. It is not hard to find through a search.
 
Last edited by a moderator:

Az Biker

Sr. Mod / RC-RT Committees / Shred'r of MTBs
Staff member
* * * Thread Cleaned * * *

Let's go over a few reminders about posting in the forums.

1) Forum Rules are posted in the beginning of EVERY forum, section, fora and device for a reason; so members understand what is and isn't allowed . Please refresh your memories if you have forgotten these simple precepts.

2) Rule #1 is SEARCH before posting questions in the thread, in the event your question(s) have already been addressed. Use the SEARCH bar AND read through the OP before posting your question.

3) Rule #2 is Member Conduct; don't post rude, insulting, profane, disrespectful, attacking, off-topic, or racial comments. If your comment is NOT helpful, respectful, on directly related to the title of the thread, simply DON'T post it.

4) The unwritten Xda rule is DO NOT FEED THE TROLLS. If another member is creating trouble, don't engage them, argue with them, or add fuel to their fire. Just REPORT their comment and move along. Even "read the rules"...."use the search function" type comments only serve as food for the troll buffet. Simply REPORT them and let Moderation Staff take care of it.

This is a friendly (but serious) warning to all those involved in this latest back and forth; please don't continue. Follow the rules, disconnect your keyboard, go run 3 miles and burn off that extra energy; just don't violate the rules when you post in the threads, because your account will be reviewed for restriction or removal due to continued rules violations; ain't nobody got time for that :good:

So, now that Forum Rules class is over, let's all get back to helping out development of this Mod, and leave the drama llama stuff for social media sites.

If you have any questions about the above, feel free to PM me and I'll do my best to help it all make sense :D

Thanks for everyone's cooperation!
 

Rihy_

Member
Aug 15, 2016
18
2
Not working...
Android 10 Magisk20.0


---
Sorry. Systemless hosts not enabled....
 

Attachments

  • Screenshot_20191025-054508.png
    Screenshot_20191025-054508.png
    243.6 KB · Views: 1,608
Last edited:

valeriee

Senior Member
Oct 3, 2013
456
36
So just to be clear, do I need to update the hosts every few days and reboot my phone manually for this to work?
 

ktmom

Retired Forum Moderator
Apr 22, 2015
5,176
3,387
Deep Space Station K7
So just to be clear, do I need to update the hosts every few days and reboot my phone manually for this to work?
IMHO, there is an element of personal preference as to how often you need to update hosts. I use only Stephen Black's list and update when I think about it, maybe once every 4-6 weeks. Others feel it's necessary to update daily.

If you start experiencing ads that were blocked, it's time to update [emoji846]
 
  • Like
Reactions: Az Biker and ipdev

valeriee

Senior Member
Oct 3, 2013
456
36
IMHO, there is an element of personal preference as to how often you need to update hosts. I use only Stephen Black's list and update when I think about it, maybe once every 4-6 weeks. Others feel it's necessary to update daily.

If you start experiencing ads that were blocked, it's time to update [emoji846]

Sorry what is stephen blacks list? And thank you for your answer!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I use Adaway non-rooted via VPN on a xiaomi redmi note 13 pro+. It works fine, except that it does not automatically start after a reboot. Any ideas why not?

    I did:
    • Selected "Background autostart"
    • Set Battery saver to "No restrictions"
    • Set Always-on VPN in preferences
    • Set Block connections without VPN" in preferences
    Ever since I set the Always-on VPN, I get a message after reboot (before providing the unlock code for the first time): "Disconnected from always-on VPN — Change network or VPN settings".

    Adaway is supposed to start automatically after a reboot, right?

    Thanks for helping!
    Most probably an android problem. Maybe open an issue report on GitHub.
    1
    I have been using Adaway, both rooted and non root versions, for several years. My phone broke last week, and while I wait for a replacement I am using a borrowed stock Oneplus 9. It is running Android 14, with no other VPN apps. When I install Adaway, it installs the root version, so I get a systemless host error. It used to install the correct version automatically, is there any way to force it to install the non root version?
    It's always blatently (NEVER automatically )asks me on a data clear, just tried it and got
    Screenshot_20240415-164536.png
    Clear data and choose vpn if you want vpn
  • 3364
    icon.png
    AdAway

    AdAway is an open source ad blocker for Android using the hosts file.


    Google Play Store notice

    According the Google Play Developer Policy, especially the "Device and Network Abuse" section, ad blocker like AdAway violates the "Apps that block or interfere with another app displaying ads." rule and can't be distributed on distributed on the Play Store.
    As Free and Open Source Software, AdAway is available from F-Droid Store or this XDA thread :good:


    Requirements

    This application requires Android 8 or above and does no more require root.

    For older Android versions, a rooted device is required.


    Changelog

    If you don't want to read each announce post of this thread, you can:


    Downloads

    Stable versions are available on GitHub releases and F-Droid Store:
    Beta versions are available on GitHub releases only: AdAway 6.0.2b

    The app provides an in-app updater for both GitHub and F-Droid builds.
    Keep in mind beta channel is limited to GitHub builds, and F-Droid releases usually have a several days latency.


    Problem? Read this

    * If you use Chrome and still see ads on web pages, remember to disable the "data saver" or "reduced data usage" browser option.
    * Check your APN settings for any proxy, the proxy itself could be allowing ads. Disable the proxy.
    * After you install or make any change to AdAway, you must reboot for those changes to take effect.
    * If you are still having issues please read and understand all the info in the wiki before asking for help here.

    Otherwise, this is the right thread to discuss about it or file a bug report here.


    Contributors

    PerfectSlayer, Vankog, jawz101
    Source Code: https://github.com/AdAway/AdAway
    170
    Hi all,

    A new year is coming and I wish you all to have nice holidays :victory:

    Just few words about this ending year. There was about 12 releases in 2019 which brings you a new UI, a lot of bug fixes, Android 10 support, Gist and GitLab hosting support and better Magisk support.
    All of this is possible thanks to the community to help users to discover the app, learn how to use it and report any new bug and also your moral, nice words and thanks you can send to me, and financial support.
    Thanks a lot for all donators, GitHub sponsor and the Pixel 2 you sent me to test Android 10 support.

    For the next year, I hope to release the next version (V5), at least in beta to start. It's been 9 months since its first lines of code and things are working quite nicely.
    It aims to make the app simpler to use for the main use cases, support rooted and non rooted devices and remove old hacks/workaround which are no more needed on recent setups.

    But before this big next update, I still have time to fix current issue with a new release :p

    Changelog:
    • Fix GitLab hosting support (commit date parsing failed)
    • Translation update

    Thanks:

    Special thanks to @gallegonovato for its helpful bug report and @Vankog for translation update.

    Download:

    AdAway 4.3.2 on AndroidFileHost (md5: 78fde09a0e92044c45e901bb1cec8e2e)
    159
    Hi all,

    Long time no see! It's been more than two months since the last update.
    I can't say I was not active on the project as I start working on a new version (5.x.y) as a side project.
    I won't share the source code yet as it is not ready at all and I don't want to give an ETA but this new version targets the following goals:
    • 1. Revamp the UI
    • 2. Clean up old support
    • 3. Address one of the main drawback of the app

    1. The card based UI does not feel right. Welcome card takes too much space, update button / status has a lot of critic. I guess I can do better.
    I started a new simpler and lighter design which provide the most useful information on home screen and all main actions to trigger in one tap (no more burger menu).
    It is still under heavy development but I hopefully get a friend onboard, specialized in graphics and design, to help me :highfive:

    2. In order to simplify the development, I clean up the app and remove support for old features.
    I bump target SDK version so I finally get Java 8 language feature (it was released 5y ago…) and move to topjohnwu root library (instead of home made one). It means systemless support is now handled by Magisk and other root solutions will still work.

    3. Think of what prevent most of users to use AdAway? Now it's gone!
    It's not gone forever. It's still here but there will be a fallback to workaround it.
    I won't tell more until the first public beta but I guess you get the point :fingers-crossed:

    In the meanwhile, here is a new version!

    Feedback:

    Is anyone using a hosts list hosted on Gitlab? It keeps showing "Unknown update status".
    GitLab, like GitHub do not set LastModified HTTP header so update status is not supported... yet!

    Changelog:
    • Add Gist and GitLab hosting support for hosts file
    • Add option to set default IPv6 redirection
    • Improve reboot command
    • Improve UI for overlays
    • Update translations

    Thanks:

    Special thanks to @MSF Jarvis and ralayax for theirs contributions and @andy356 for its helpful bug report.

    Download:

    AdAway 4.2.5 on AndroidFileHost (md5: ab81225745afaaa7646024109de299c0)
    148
    Hi all,

    Feedback:

    Hmm, not working for me for this URL, v4.1.0 shows something like not updated in -360 days (some large negative value). Can you please see if you can reproduce?
    https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
    It works well here. I failed to reproduce as I change the HTTP client library and how I use it.
    But update date for the source you link definitely works now.

    All the F-Droid apps I know of have manual push updates to the store.

    Isn't automatic build basically for nightlies?
    Not really. You could choose a lot of different mode.
    For example, F-Droid server watches AdAway GitHub repository to find tags which match a specific versioning pattern.

    I exist still... do you know what i have to do to transfer ownership? if i edit project it doesn't let me change the primary author so i assume i have to PM some higher up to make this happen?
    Thank you so much! :highfive:

    This is now done, @PerfectSlayer is the OP of this thread.
    Thank you too!


    Changelog:
    • Add hosts source download cache
    • Add snackbar notification to update host from DNS request listing
    • Update UI from Material Design to Material Theming
    • Update gradle, plugins and dependencies
    • Fix crash parsing not defined host source last modified date
    • Fix native modules build script (required for F-Droid build server)
    • Fix Transifex issues

    Thanks:

    Special thanks to all recent donators! Your help is really appreciated :good:

    Download:

    AdAway 4.2.0 on AndroidFileHost (md5: 023169e7c345ef7297095793024f8478)
    144
    Hi all,

    I talked enough about it the past weeks and here it is: the first beta for the next version of AdAway.
    As you know, the main feature is the removal of root requirement but it also comes with a lot of improvements like an easier to use UI, a builtin updater, new cache and databases to improve reliability or even a quick pause/resume adblocking button that 3rd party apps can control.

    It took me literally a year and 330+ commits to build it (the first commit of this branch was April the 7th) and I hope it will be worth it.
    It should allow the app to be viable in the future with root being more and more difficult to achieve at each new Android release and Google hardening SafetyNet checks.

    I will try to answer to the most expected questions here so you still can post a link to this FAQ later to lost users.

    FAQ:

    Does this version replace the v4.x versions?
    No. This is still a preview version and does not replace the stable one.
    It is available to test it and report issues and feedback before being promoted to stable.

    Can I upgrade and revert safely?
    Yes. Both v4 and v5 use the same settings export format.

    Why does this version targets Android 8+ Oreo only?
    Like the v4, v5 is expected to offer support for latest devices.
    Android 8 and above represent more than 60% of device distribution and will grew through time.
    If you use an older device, root solutions work very well and v4 is here for you (like v2 and v3 stayed for legacy devices).

    How the hell does it work without root?
    This version provides two adblocking methods: the usual root one using hosts file and a new one using local VPN.
    The VPN solution allows to filter and alter connections of your devices without root access.

    Is using a VPN safe?
    In the case of AdAway, yes. It uses VPN API but does not connect to a VPN server.
    In the case of VPN client app, it depends.
    To give you more details, a VPN client app uses the VPN API to create a virtual network interface on your device and redirect all your traffic into it.
    If you imaginge the VPN like a pipe (the right word is tunnel), client VPN app outputs all your traffic on a VPN server which is able to check what you are doing on the Internet.
    With AdAway, your network is not redirected to a VPN server but your device internet connection (same as no VPN). VPN API is only used to get traffic into it to break the connections to ad servers.

    Is VPN use battery?
    Yes, like everything you do on device.
    Witouth root, a VPN service will be running permanently to filter your traffic.
    Good news is it will only filter DNS traffic. Not all traffic is redirected into it so it won't be as expensive as you can fear.

    Did you come up with this idea alone?
    Absolutely not! I spent a lot of hours trying to find altenatives to hosts based adblocking (like routes or private DNS). But nothing was better than VPN based adblocking.
    So we (MrRobinson and I) approched Julian Klode, developer of DNS66 more than three years ago to see if we can merge our apps. It wasn't that easy as we don't develop our apps the same way so I ended up by integrating the DNS66 adblocking method into AdAway. It is fine for Julian, his app is Open Source and he himself built it from the core code of AdBuster app (an VPN based adblocking app).

    Should we stop using DNS66 for AdAway?
    Not at all. DNS66 is a great app and provides some features that AdAway doesn't have (yet?), like DNS settings.
    DNS66 is a great app, keep using it if you like it!
    If both apps used the same adblocking method a year ago when I start this version, I keep adding feature to the VPN adblocking method and most of them won't be in DNS66.
    If Julian ports them back to DNS66, it's great if it can help his app and users!

    Is it me or the app put on weight?
    Yes, the app significantly grew due to new libraries like VPN related ones and Android Jetpack.
    It also stores more data on device: a http cache, a host database, a hosts copy, etc...
    I think 15~20mo of storage is still fine.

    Changelog:

    Without further ado, check the summarized changelog (it was hard to summarize a one year development)

    • Add new home screen
      • Provides all main controls from one screen
      • Displays currently blocked, allowed and redirected domains
      • Displays current hosts sources status and control to force apply
    • Add non root ad-blocking feature
      • Uses a builtin local VPN to filter DNS request to blocked domains
      • Based on the work of dns66 by julian-klode
      • Allows to excluded system applications and per user applications
    • Add builtin updater with changelog display
    • Add feature to quickly pause and resume ad-blocking
    • Add wizard screen for first run setup
    • Add feature to display and filter all blocked, allowed, redirect domains
    • Improve preferences screen
    • Add broadcast receiver to control ad-blocking from third party applications
    • Update Android target to Android 10
    • Improve root and shell support
    • Split translation files to easier understand their context
    • Add GitHub action test and build tasks

    Download:

    AdAway 5.0.0 beta (sha2: 200fd7789b174735d3af5925b4e568b09475bb3f39a79d24d6617af4b19cd19d)

    If you like my work, feel free to support me. Check my sign for donation links. Thanks all! :highfive: