• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP][ROOT/NONROOT][OFFICIAL] AdAway v5.8.0

Search This thread

zgfg

Senior Member
Oct 10, 2016
5,730
3,181
Thanks @PerfectSlayer but getting the error "App not installed" :S
You can't install XDA version over the F-Droid or vice versa. You can only update XDA over XDA (or F-Droid over F-Droid), because of different packages names.
E.g., uninstall F-Droid and download/install from XDA.
There was previously an issue with updating from F-Droid, IDK was it fixed or not (I don't use F-Droid) - to make it simpler, use only the XDA version.
Updated my XDA 5.3 to 5.4 with no problem.
 

Utini

Senior Member
Dec 25, 2010
1,000
146
www.whymacsucks.com
www.whymacsucks.com
You are not alone. I add an "monitor connection" option in the VPN settings to check if the connection dropped and automatically restart the VPN. Please check this option and try if it is better.

I am using the root based adblocker so I do not have this VPN settings available?

Also is it recommended to use the webserver option or not? What is the difference for me as endpoint user?
 

zgfg

Senior Member
Oct 10, 2016
5,730
3,181
I am using the root based adblocker so I do not have this VPN settings available?

Also is it recommended to use the webserver option or not? What is the difference for me as endpoint user?
The idea with Webserver is to avoid an empty space reserved to show the blocked adds but some apps like XDA or Amazon do not work with the Web server option enabled (although, Amazon can be whitelisted instead) - please search and read hrough the thread, it was discussed more than once and AFAIK more apps were mentioned as affected by the Webserver option
 

gallegonovato

Senior Member
Feb 25, 2021
67
14
Good afternoon @PerfectSlayer

Adaway that will happen to download only from github, its official website and from xda?

I comment because I use the version that uploads to Fdroid. And I don't know if you are planning to stop uploading your great app to fdroid.

Because then the new versions I would not be able to install them . And then I install it (before uninstalling the other version), from one of the other places.

Best regards
 

shah22

Senior Member
The idea with Webserver is to avoid an empty space reserved to show the blocked adds but some apps like XDA or Amazon do not work with the Web server option enabled (although, Amazon can be whitelisted instead) - please search and read hrough the thread, it was discussed more than once and AFAIK more apps were mentioned as affected by the Webserver option
I don't know about amazon but xda app is working fine here on my end with webserver option enabled ..
Also if I mis-understood what you tried to say, accept my apology
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,558
5,309
Sydney
...snip...
When importing a source, I insert it to the database. As the primary key is the URL (or the file path) and conflicts are ignored, a renamed source will be ignored during the import. Do you think it must be changed?
...snip...
NO, you do need to change it. There are less than 60 (only 3 by default, but I now have 54 NB some are only a few lines/hosts long). Its good to now how it works, and I can now work to that, and would not expect anything else from someone else's app. Especially when it works.

That's a lot! Good thing is the database should be performant enough when growing but it's still big.
I use the Room Android framework to manage the database. I don't know if the framework cleans up from time to time. Could you try to call vacuum and see what size it takes? Do you manipulate the database by yourself or is it just the app that populates it?
So, now I am actually around 718K! and the dB is almost 178MB. I copied the dB to another location, and did some admin stuff on it:
Code:
Vacuuming /data/media/0/app.db

Before:
-rw-rw-r-- 1 media_rw media_rw 177725440 2021-02-28 13:59 /data/media/0/app.db
===================================================
===================================================
After:
-rw-rw-r-- 1 media_rw media_rw 177725440 2021-02-28 13:59 /data/media/0/app.db
So vacuuming made no difference. Neither did a re-index or an optimize.

I'll zip it up and send you a link via PM, just in case you wish to see my dB; or ignore it of course.

Another weird thing is that I had the permissions bug / crash again. I simply resolved it by re-selecting the file again using the UI. But it had been working by itself, as is, as it was for a few days now.
 

tomdot

Senior Member
Mar 23, 2007
277
33
Thanks for 5.4.0. Despite enabling Monitor Connection, I still have problem transitioning from Mobile --> Wifi (always require disabling and re-enabling)
Wifi --> Mobile is always fine
 
Last edited:

PerfectSlayer

Senior Member
So, now I am actually around 718K! and the dB is almost 178MB. I copied the dB to another location, and did some admin stuff on it:
Code:
Vacuuming /data/media/0/app.db

Before:
-rw-rw-r-- 1 media_rw media_rw 177725440 2021-02-28 13:59 /data/media/0/app.db
===================================================
===================================================
After:
-rw-rw-r-- 1 media_rw media_rw 177725440 2021-02-28 13:59 /data/media/0/app.db
So vacuuming made no difference. Neither did a re-index or an optimize.

I'll zip it up and send you a link via PM, just in case you wish to see my dB; or ignore it of course.
Thanks, I download it. I will have a quick look when I find time to see what is taking the most space and if it's normal or not (can't promise I will do quick though ^^')

Another weird thing is that I had the permissions bug / crash again. I simply resolved it by re-selecting the file again using the UI. But it had been working by itself, as is, as it was for a few days now.
Hum, that's weird... The app requests to keep the right to open the file you selected.
Did you remove SAF permission from the app? Do you move or replace the file the app reads?
I am trying to narrow down the source of the permission denied error.

thanks for your work. how about changing thread title to reflect the new release?
Done! Thanks 👍
 
  • Like
Reactions: mauam and kost7

MaXAiRO

Senior Member
What could be some possible reasons that the AdAway local web server stopped working? I think it happened either when I updated to 5.4.0 or when I upgraded to Magisk 22 from 21.4. "Local web server not active"

-OnePlus 5 on OxygenOS 10.0.1 (Android 10)
-Magisk 22
-Systemless hosts module enabled
-No VPN
-It's set to 127.0.0.1 and ::1 as always
-The AdAway certificate is installed
-Tried with both WiFi and data.
-Did several reboots

It had been working fine since the early releases of version 5 and I noticed that it stopped working yesterday because the AdAway logo doesn't appear in sites instead of the broken sad faces.

I searched the last 10 pages and used the search function too but couldn't find anything similar except for the usual questions about Amazon.
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,558
5,309
Sydney
Thanks, I download it. I will have a quick look when I find time to see what is taking the most space and if it's normal or not (can't promise I will do quick though ^^')
An extra FYI. I have an app that estimates the table to file size contribution, and I ran it on my large adaway database.
adaway.PNG


I also ran it on my other phone, which has the default host sources:
adaway_default_hosts.PNG


Interesting that the percentage totals were within the same ballpark between both. But it obviously comes down to the two big two tables which are very much related and I guess would differ more if one had a lot more duplication between host sources.
 
Last edited:

cognitivedissonance

Senior Member
Jan 11, 2012
622
193
Anyone know what I need to whitelist to enable "Messages for web" using Google's Messages app? It blocks it until I stop Adaway. I tried running the DNS logger and it's pretty clearly not logging the actual requests b/c I whitelist what comes up and it still is failing until I again stop Adaway.

Side note: the built-in DNS logger doesn't really seem to show all the traffic. Does anyone have any suggestions about an app that does? It's frustrating not being able to figure out what to whitelist.
 

celestialspring

Senior Member
Sep 19, 2010
179
35
Anyone know what I need to whitelist to enable "Messages for web" using Google's Messages app? It blocks it until I stop Adaway. I tried running the DNS logger and it's pretty clearly not logging the actual requests b/c I whitelist what comes up and it still is failing until I again stop Adaway.

Side note: the built-in DNS logger doesn't really seem to show all the traffic. Does anyone have any suggestions about an app that does? It's frustrating not being able to figure out what to whitelist.

I sometimes find it helpful to switch on / off airplane mode after performing such actions.

Force closing the app and restarting adaway is also helpful.
 

celestialspring

Senior Member
Sep 19, 2010
179
35
Strange behaviour with tTorrent app

The automatic VPN connection is killed as soon as I start the ttorrent app and the VPN connection does not come back until I kill the ttorrent app.

Anyone faced similar issues with tTorrent or other apps?
 

zgfg

Senior Member
Oct 10, 2016
5,730
3,181
Strange behaviour with tTorrent app

The automatic VPN connection is killed as soon as I start the ttorrent app and the VPN connection does not come back until I kill the ttorrent app.

Anyone faced similar issues with tTorrent or other apps?
Did you configure AdAway to whitelist iTorrent for VPN - Android allows only one VPN connection at a time
 

celestialspring

Senior Member
Sep 19, 2010
179
35
Did you configure AdAway to whitelist iTorrent for VPN - Android allows only one VPN connection at a time

Thank you.

The torrent app is not whitelisted because it displays ads. I was not aware that the torrent app needs it own vpn?

While we are on the topic, flud torrent app also has the same behaviour.

Never had this issue with other vpn based ad blockers.
 

yuruyuri

Member
Dec 30, 2019
21
8
Tokyo
Xiaomi Redmi Note 5 Pro
What could be some possible reasons that the AdAway local web server stopped working? I think it happened either when I updated to 5.4.0 or when I upgraded to Magisk 22 from 21.4. "Local web server not active"

-OnePlus 5 on OxygenOS 10.0.1 (Android 10)
-Magisk 22
-Systemless hosts module enabled
-No VPN
-It's set to 127.0.0.1 and ::1 as always
-The AdAway certificate is installed
-Tried with both WiFi and data.
-Did several reboots

It had been working fine since the early releases of version 5 and I noticed that it stopped working yesterday because the AdAway logo doesn't appear in sites instead of the broken sad faces.

I searched the last 10 pages and used the search function too but couldn't find anything similar except for the usual questions about Amazon.

Same on my device.
It may be reproducible bug on v5.4.0
 

MaXAiRO

Senior Member
Same on my device.
It may be reproducible bug on v5.4.0
Still the same. Web server not running. Also, today I even downgraded from Magisk 22 to 21.4 to check if it's 22's fault but no. Probably 5.4.0's fault as you said.
 

PerfectSlayer

Senior Member
Hi all,

Thanks for the feedback.

I can confirm there is an issue with TLS connection of the web server. It started from AdAway 5.4.0 version with the upgrade of mongoose from 7.0 to 7.1. There is a regression in mongoose that will be fixed in the next mongoose version.

Once released, I will update it to restore the TLS feature of the web server. In the meanwhile, you can read the full details and track the progress here: https://github.com/AdAway/AdAway/issues/2588
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    @PerfectSlayer : As it is asked over and over again here in the thread I would recommend putting a sticky to the OP about the need of activating systemless hosts in Magisk and also to mention it in the wiki.
    (Yeah, I know not many people seem to read OP's these days....)
    Better a toast in the app (IMO, the app should know and can check if /data/adb/modules/hosts/system/etc/hosts file exists) to warn the user to enable Systemless hosts - maybe only when it fails to write to the /system/etc/hosts (i.e., in case when it is really needed)
    5
    In Magisk app Settings!

    And you must reboot then. Then go back to AdAway and let it sync.
    Then reboot again
    @PerfectSlayer : As it is asked over and over again here in the thread I would recommend putting a sticky to the OP about the need of activating systemless hosts in Magisk and also to mention it in the wiki.
    (Yeah, I know not many people seem to read OP's these days....)
    4
    FYI: and slightly OT for the AdAway dev thread.

    I have been testing host building, and have kept on seeing the same host source downloading a fresh version every single time! So I looked into why and what was possibly failing.

    Turns out it was working correctly. This one host source gets updated every 5 minutes!!!

    They also have a lot of stats. I think they mostly aim to block malware. In testing, with over 2.5M hosts being blocked, from over 47 URL sources, they still manage to get 11 hosts not in any of the other 46 sources.
    3
    It doesn't block the showing of the google search ads but should block the clicking on it. That's the best you can ask for in a hosts blocker, the text of the ad comes straight from the search engine and blocking their display would block the search itself. I switched to duckduckgo because you can turn ads of in the search settings.
    2
    Good afternoon @DiamondJohn

    Thank you very much for your help and for the tremendous list of hosts you have given me. I now have a few to look at so I can look at the ones I have in Adaway. And change for the better.

    By the way the deny coinblocker link that you put in your previous post, do you have it?

    I don't know how to thank you for your help. Thanks a lot mate.

    By the way, I think I have some bad news. I was reading that the creator of Magisk now works for Google. So I think he is going to leave Magisk. I read it https://topjohnwu.medium.com/state-of-magisk-2021-fe29fdaee458

    I hope some developer is still with him. Because if not he can give us a hard time for Adaway.

    Best regards
    Sorry to all, I know lists are basically OT, as this thread is about AdAway.And source lists are contentions at best. So this will be the last OT post on host sources. At least for now. ;)

    But here are ALL my local file lists. To be clear, a lot would be more targeted for desktops than android devices, and are also quite old. The attached Zip of a report shows the unique hosts in each source, and as such, you can see that most of the hosts in my static files must be covered by another web source. But not all the files add nothing, and I do have a LOT of web sourced hosts list; ie drop a few, and the files will become more prevalent. The fact that current web sources do have the same hosts, gives me some confidence they are still active/valid, even though I saved them off a while ago. Also, not all my host sources are compatible with adaway. Some are simply only lists of host names.
  • 3306
    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 F-Droid Store and below:


    Beta versions are available on XDA development thread only:

    AdAway 5.0.10


    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)
    143
    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: