yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Nergal di Cuthah:
How do you update hosts. This is likely why you have background data as adaway is trying to update runs into Afwall and keeps trying even though it won't be allowed. Typically a host update takes a few seconds or a couple minutes and the app goes back to being dormant. (this is just an educated guess but nonetheless )
[Android Apps and Games] gallegonovato:
Good afternoon:

First of all thank you very much for your reply @Nergal di Cuthah.

It seems to me that I did not explain myself well.

After Adaway have finished the whole process (upgrade, create host, copy host), I always reboot the mobile. Since I have checked as if it settles better the Adaway process. That's why they always recommend to reboot from older versions. But I still leave the permissions enabled in Afwall, for Adaway.

But it happens to me even if I have not used Adaway or data (neither from my operator or wifi). And for example the battery runs out, and I charge the phone. Or sometimes in meetings they tell you to turn off the phone. I see that Adaway is running when I turn the phone back on. Without having active Adaway to update itself or other options.

I noticed that in sd maid, Adaway has permissions:

Power disconnected, power connected, action power disconnected and action power connected.

Then start with timezone changed and time set.

Then boot org.adaway.broadcast.BootReceiver

Which allows you to disable these options. As in app manader run in background or run any in background.

Or even in autostart it appears that adaway starts:

After startup , connectivity changed, bateria low or ok, storage ok, time changed y timezone changed, power connected y disconnected

So it may be due to the power and time permission.

Best regards
[Android Apps and Games] zgfg:
If you run AdAway in non-root, then VPN must be always active (or you have to turn it manually on/off).

Also, for non-root mode, reboots are not needed

However, for the root mode (with Systemless hosts), reboots are needed whenever you make changes

But for the root mode AdAway does not need to be active (when updating hosts sources it writes to /data/adb/hosts/system/etc/hosts file, on reboot Magisk mounts that to /system/etc/hosts and later Java DNS resolver reads from there).

Ie, if using AdAway in the root- mode, my suggestions:

- disable all its automatic updates

- do not forget to manually open AdAway every few days or so and to trigger Updating

Then, make sure that AdAway is not enabled in your native Settings for Auto Start and that Battery optimization for AdAway is enabled - in that case AdAway (again, it applies to root mode only) will not run in the background and will definitely not consume any battery or connections
[Android Apps and Games] m0han:
how to do that? through some 3rd party app? which one?
[Android Apps and Games] zgfg:
No idea how native Settings look like and work on your phone (and/or your custom ROM).

You should investigate or maybe ask in its own thread, TG group, etc

My screenshots attached
[Android Apps and Games] gallegonovato:
Good afternoon @zgfg

Thanks for your help and time

I use adaway in root mode. And in adaway settings, I have disabled all options.

When I upgrade the host with adaway, I always reboot. And there I understand that adaway works to reset the host.

But without using Adaway. And without using the mobile without anything that uses data. It is normal that when shutting down (and turning it back on), or rebooting. Is it normal for adaway to boot up with the system and run.

Sorry for the inconvenience but not entiwndo well what you say.

Since I don't have the battery activated. Then I will try to remove in autostart (from fdroid) permissions. As well as the run permissions in app manager and sd maid.

Best regards
[Android Apps and Games] m0han:
'AutoStart' settings not available on my custom rom. Maybe I should look to some app to get the job done.
[Android Apps and Games] gallegonovato:
Good afternoon @m0han

If you have the phone rooted and with Magisk.

You can give superuser permissions. And use:

Sd maid: https://github.com/d4rken-org/sdmaid there you can download it from http://sdmaid.darken.eu/download

Autostarts: https://f-droid.org/es/packages/com.elsdoerfer.android.autostarts/ or https://github.com/MuntashirAkon/android-autostarts

App manager: https://f-droid.org/es/packages/io.github.muntashirakon.AppManager/

In App manager is more complete you can remove trackers. But open the application, select Adaway. And go to App operations. And there is to remove the two that put start.

Sd maid, is to go to application control. Give it search. Then select Adaway. And go to Receiver Manager. And it would be to uncheck what you get in brown (boot_completed).

And Autostarts is to search in the Adaway application search engine. And uncheck or disable what you get.

If I'm not mistaken I think there are no more options in some rooms.

Best regards
[Android Apps and Games] m0han:
I have App Manager and SD Maid. I couldn't find/understand what you mentioned in App Manager (See 1,2,3). I found what you said in SD Maid; I have disabled both the brown entries I saw. Can you confirm whether this is enough? Should I also try Autostarts? And, thanks a lot for your detailed help.

Edit: Could you throw some more light on this?
[Android Apps and Games] gallegonovato:
Good morning @m0han

First of all I apologize since you catch me with the phone charging. But I will try to explain myself, otherwise I will upload screenshots later.

In app manager, there is the version 3.0.2 in https://f-droid.org/es/packages/io.github.muntashirakon.AppManager/

It would be to open app manager. Then search for Adaway. And press twice on it. Until you get something like this: https://raw.githubusercontent.com/M...a/android/en-US/images/phoneScreenshots/2.png (with adaway of course). In that screen you can remove the trackers, and so on. Then it would be to scroll to the right and see the tab that says App operations. And there you can remove the permissions you want to the applications. Bluetooth, etc... See if you put something home, if so is to uncheck the box. Then if there is one that says run I think it is running in the background. But the other is not fixed.

And in autostar would be to open the app. And you will get a screen like the first image that comes out in https://f-droid.org/es/packages/com.elsdoerfer.android.autostarts/. At the top in the magnifying glass is to write Adaway. And it already looks for the entries where it comes out. And it is to go one by one clicking on it and you get the screen 2 of the previous link. You give it to disable and ready.

But if you removed it in sd maid. Check that after turning off or restarting the phone does not leave you in Adaway, running. If not you would already be out.

But some applications are stubborn and you have to remove them in other applications.

Also check in the terminal settings. In applications and then Adaway. Do not have activated background data. If so disable it. But check in the settings inside Adaway. That you do not have any option to check for updates activated. If so, uncheck all the boxes. And then whenever you want you can manually update the hosts in Adaway's main screen.

Let's see if it loads and I can upload some screenshots. But you caught me without battery because tonight I had to go to the hospital for emergencies with a family member. And I was running low on battery until it turned itself off.

As soon as I can I will try to upload screenshots as it should.

Best regards
[Android Apps and Games] m0han:
79, 0, 1, 101, 100, 67, 28, 29, 102, 106, 115, 70, 63, 76, - Can these be disabled? 😄

View attachment 5733699View attachment 5733701View attachment 5733703

Anything else?
[Android Apps and Games] zgfg:
Test and you will see if it still works.

But most of them have nothing with AutoStart or running in background, and they don't look like being really used in the app (camera, calls, pip and so on)

Btw, I also don't see why would AdAway need (fine) location - eg hosts sources are not made to be location dependent

However, I would not disable Clipboard because sooner or later you might need to copy/paste some host to Allow or Block list, or to copy/paste a new hosts source - if you disable reading clipboard, you won't be able to paste in (you'll always have to carefully type in letter by letter)

Hence think twice what is really necessary or not and do you need to pin-point every single permission for this app, and similarly for any other app you find on your phone.

Besides, you might need to check all those permissions again upon the app's updates
[Android Apps and Games] Popletenec:
Hi. I have added some hosts to Adaway but it doesn't show how many hosts it has, also blocked number on home screen doesn't change whether the list is enabled or not, it is normal?
[Android Apps and Games] zgfg:
What exactly you added?

If it was hosts source, provide its url - and you first had to check yourself is that hosts source file I'n the proper format for AdAway

If it's not the right format, obviously AdAway won't read and could not show the number of blocked sources

And of course, if you entered the wrong URL (eg, if you have after your pasting two times https:/ at the beginning), it won't open.

Etc, etc

From your not precise description, without screenshots, etc - I can only say: yes, bit normal but no idea what is wrong
[Android Apps and Games] daywalk3r666:
If you mean this hosts . This isn't for adaway
[Android Apps and Games] Popletenec:
I added list from this git: https://github.com/bogachenko
[Android Apps and Games] zgfg:
Please give URL that will directly open the list in browser

URL above is link to someone's GitHub project and obviously cannot work (AdAway will not search through to find where might be a host file there) if you added that URL to the hosts sources list

Copy any working (preconfigured - coming with AdAway) URL from your Hosts sources list, paste to browser and you will see how it opens a hosts file, like with these URLs:

https://adaway.org/hosts.txt

https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardDNS.txt

See also the attached screenshot how that URL is then added to the Hosts source list in Adaway - provide the screenshot from your AdAway, for your Hosts source file

And see the screenshot how it looks when you paste that URL to the browser and open

If you are adding your own hosts sources, you must make sure that browser similarly opens a hosts source file with that link, from Internet
[Android Apps and Games] Popletenec:
I can't because it has profanity in it, it will get removed. But I added the link in format like this:

https://raw.githack.com/bogachenko/f*ckf*ckadblock/master/f*ckf*ckadblock.txt

Just add "u" in place of asterisk.
[Android Apps and Games] zgfg:
This is not a proper format for a hosts source file - compare the screenshot (when browser opens your link against the screenshot in my previous post when it opens a proper hosts source file)

Instead of eg (in your file):

#@##ad-frame

It should look like (as in the proper hosts sources files):

0.0.0.0 ad-frame

or:

127.0.0.1 ad-frame

AdAway does not find any properly formatted domain to block in 'your' file
[Android Apps and Games] Popletenec:
Ok, thanks for clarification. Could you recommend some good lists that for example you yourself use?
[Android Apps and Games] zgfg:
On the Energized Protection site:

GitHub - EnergizedProtection/block: Let's make an annoyance free, better open internet, altogether!

Let's make an annoyance free, better open internet, altogether! - EnergizedProtection/block

github.com

you can find various packs (different sizes/number of blocked domains and different types of domains to be blocked - ads, malware, stats, porn, social media, etc)

For AdAway take a link to the Hosts Raw format
[Android Apps and Games] m@r3k:
Hello. I have a private dns adguard set up. When turned on, adaway shows no connection to the private dns network. Is it related to my use of adaway?
[Android Apps and Games] Nergal di Cuthah:
Are you using adaway as a vpn or rooted?
[Android Apps and Games] m@r3k:
using as a vpn

no root
[Android Apps and Games] zgfg:
Android allows only one VPN at a time

If AdGuard uses VPN, AdAway cannot use
[Android Apps and Games] m@r3k:
Adguard apk is disabled. Setting the network as private dns: dns.adguard-dns.com
[Android Apps and Games] zgfg:
I use adAway in the root mode hence cannot comment further

But check the Google Issue Tracker, #141674015, might be related:

Google Issue Tracker

issuetracker.google.com
[Android Apps and Games] m@r3k:
Myślę, że masz rację, że nie możesz vpn adaway i prywatnego adguarda. Dziękuję za pomoc.

Mod translation: I think you are right not to vpn adaway and private adguard. Thank you for your help.
[Android Apps and Games] DiamondJohn:
FYI: Not specific to AdAway.

I have a ludicrously large host file, which I update often. This host blocking blocks every ad... except in two apps!:mad: One of them is very aggressive, with a confirmation box on every action, raising a dialogue for an ad possibility. That app also has a nasty habit of first displaying the confirmation dialogue without an add, then as my finger moves to click the "OK", the ad appears, moving the "OK" button physically down and placing the clickable ad right where I was about to press the OK button! and hence its too late to draw back and I inadvertently click the ad.:poop:

Previously to resolve this issue, I do the whole DNS logging to find the host, check and its not in my current blocked hosts, add it to the next host build, and rebuild, reboot, wait a couple of days, and do the whole process again.

The thing to note with these two specific apps, there is no real reason for them to access the internet. ie not a browser or online app, such as live navigation (in my case one is a simple calculator and the other is a file editor, which I only edit local files with; it probably can edit network files, but thats not my usage).

I tried using a rooted shell to remove the internet permissions (there were two slightly different ways, both worked for other permissions such as "vibrate", but both came back with an error message telling me I could not remove the internet permission (obviously Google protecting their ad revenue), and the network permission does not show up as something that can be allowed or denied in the general "permissions" section of the apps setting.

HOWEVER, in the app settings, on both my daily A11 Bliss ROM and a spare Oreo Havoc ROM, I have a specific setting to turn off network/internet access😁

View attachment 5750337 View attachment 5750339

For the first few days/week, it would sometimes randomly show an outline of where an add would be expected, BUT after a week, all the ads are gone on these two apps. I am guessing for the first week it was falling back to a cache, but these have all now expired, and the apps are now ad free! Its been like this for around 3 weeks now, without needing to DNS log and adding new hosts to my blocking.🤟
[Android Apps and Games] Evo400:
Can someone please help and tell me how to completely remove and clean AdAway.

I have imported a few other hosts and also added some of my own hosts that is actually amazing as I can block not only intrusive adds but also stop cookie tracking.

The problem I have that some of the hosts have messed up some of my apps that will not load nor work. One example is Google maps. Harsh hosts blocking will make the app slow and unresponsive till you disable the Adaway.

So I want to do a clean install. But every single time I uninstall the app and then reinstall, it automatically imports all of my old host!!

I don't have any backup saved on the phone that I know of.

Can someone please help on how to fully do a clean install

Thanks
[Android Apps and Games] zgfg:
Nothing easier

Go to the Hosts Sources 'page' and disable the ones you don't like.

Make sure that you confirm APPLY CHANGES (wait till it finishes) and REBOOT (always reboot when you make any change - rebooting is not mandatory only if you work in the non-root/vpn mode)

To completely disable AdAway, use the button on the main page and also REBOOT

See the screenshots

---

Why rebooting if using AdAway in the root/hosts mode?

If you have a newer phone, your /system is not writable and you have to use Systemless hosts in Magisk

That means that AdAway does not write directly to /system/etc/hosts file, ie. whatever change you make by AdAway (even if it only updates the hosts sources from Net), that would only take effect on the next reboot, when Magisk will mount the changes from the AdAway's

/data/adb/modules/hosts/system/etc/hosts file to the 'real' /system/etc/hosts file

Even on the older phones where AdAway can write directly to the /system/etc/hosts, you still cannot count that the internal DNS resolver in Android would re-read the hosts file immediately (or soon) upon the AdAway applies its changes

Hence again, without reboot, you don't know if internal DNS resolver uses the newly changed hosts file or it continued to use its buffered copy of the old hosts file, from before the changes were applied by AdAway
[Android Apps and Games] theMartyMcfly:
Since I updated to 6.0.3 the app regulary stopps. I have to manually push the the adaway button in the middle bottom to restart it. I did not have this issue with the previous version. I let the app autostart and I deactivated the energy savings in the control panel and I cannot keep the app running.

I have Android 12, Miui 13.0.8.0 on a rooted xiaomi 11T with Magisk. The app runs in root modus.
[Android Apps and Games] Wolfcity:
I've got a similar issue with the non root variant on a Xiaomi Mi 9T since I changed from stock to MIUI 12.5.2 xiaomi.eu (Android 11) Maybe it's something related to Xiaomi devices?
[Android Apps and Games] Evo400:
Mine was the same . Xiaomi 12Pro.

I just reinstalled the app and cleared the cache. Hasn't happened since
[Android Apps and Games] Wolfcity:
Did the same several times, changed version from 6.03 down to 5.0.

It was working on stock ROM but on xiaomi.eu Adaway (non root) is off most of the time.
[Android Apps and Games] theMartyMcfly:
I just found the solution for my problem. I activated systemless hosts-file in the control panel of Magisk manager
[Android Apps and Games] zgfg:
Ok, but that's not applicable to the users running AdAway in the non-root/VPN mode (not-rooted phones)

For them, the problem must be in the VPN connection, that sometimes does not survive switching the bearers (mobile data to WiFi or vice versa, or from one WiFi to another)

That problems with VPN have been discussed here in the past. People report that it happens sporadically. AFAIK, there were ticket(s) opened on AdAway GitHub for that VPN problem

---

Case with your phone is completely different. You have the rooted phone and AdAway needs to write to the System etc/hosts file (in VPN mode,AdAway does not mess with the system's hosts file)

However, on your A12, System is NOT WRITABLE, hence AdAway CANNOT make any real change to the system's hosts file.

To make it working you MUST enable Systemless hosts in Magisk

In that case Magisk takes care to dynamically mount the AdAway's 'copy' of the hosts file over the system's hosts file on every reboot (see eg my yesterday's post, to somebody else, describing why in the root mode, with Systemless hosts, he must always REBOOT upon any change, that his changes in eg Hosts sources will be taken to effect)

That is, your whole System, and therefore also the hosts file can never be changed by AdAway (root does not help, read-only restriction is on the file system level)

That's the reason why Magisk provides the so-called systemless rooting: (real/hard) changes are never made on the System files. Instead, on every reboot, Magisk mounts the copies of those files (saved by the corresponding Magisk modules) to /data/adb over the 'real' System files

You disable/uninstall a module, (and reboot) there are will be no more mounting and Android will use the original System file(s) that have never been affected

When you enable Systemless hosts option in Magisk, it actually works as a Magisk module for mounting the changes to the system's hosts file.

Hard changes are never done, Magisk only mounts the copy of the hosts file over the original (never affected) hosts file, on every reboot.

Without the Systemles hosts, Android uses the orinal hosts file and you can not block any site (AdAway will be of no use)

If you upgraded your ROM or you previously had an older phone with an older Android, then your System was read-write and AdAway did not requure Systemles hosts.

Some custom ROMs (although based on the newer Android versions) may also be exceptional - allowing the read-write System (and hence not requiring Systemless rooting, ie Systemless hosts for AdAway)

--

Ie, on the new phones, with AdAway in the root mode, Systemless hosts is not a fix for some sporadic problems with AdAway - it's a MUST to make AdAway working at all
[Android Apps and Games] Wolfcity:
Much needed information for a lot of users, thanks for that.

Talking about VPN based adblocking:

I tried a lot of Adaway builds (It's the best adblocker for me) and I remember that @PerfectSlayer had some fixes for holding VPN connection in the release notes of Adaway 6.0.3.

Strange thing for me is that this and former versions were working on stock MIUI (A11) but stopped after installing last Xiaomi.eu firmware for my device (MIUI 12.5.2 (A11). It seems to be some kind of setting but until now I couldn't figure out what it is.

The behavior is the same with DNS66, only app that stays alive is Blokada 5.
[Android Apps and Games] amn1987:
How to unblock t.co (Twitter's link shortener)? AdAway 6.0.3 in root mode. Poco F1 running crDroid 8.10. Disabling AdAway altogether doesn't help. I have whitelisted global.albtls.t.co, t.co and www.t.co as suggested in a Github page but no joy. I am using Twitter exclusively in web browsers, Kiwi and Chrome.
[Android Apps and Games] zgfg:
If you disable AdAway and REBOOT, AdAway will not block anything

If still blocking, it's then something else
[Android Apps and Games] amn1987:
Rebooting after disabling AdAway does the trick. Is reboot also necessary after adding something to the whitelist? Thanks.
[Android Apps and Games] zgfg:
Of course. I'm sure I posted here two times about in the last couple of days
[Android Apps and Games] amn1987:
Yes it does work. I have using AdAway for several years but never knew that sometimes a reboot is required for the changes to apply.
[Android Apps and Games] m0han:
not sometimes. it's a MUST to make AdAway working. read that post well; it'd do you good.
[Android Apps and Games] tamamma:
Is there any plan to support Shizuku since root is becoming always unsupported from some functions by android?
[Android Apps and Games] miimaa:
I've been using Adaway for many years. Now on my Pixel 7 if I enable Systemless hosts my device will freeze and will be unusable.

Is there anyway to fix this? Adaway is the best adblocker but I can't use it.