yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] francyesco:
Do we need to change the write dir of adway host file?

Seems magisk correctly catched the write to host file infact (with default settings on adaway, so write to /system/etc) i have the hosts file generated also under /magisk/.core the issue is that when turning off root on magisk will not unmount it from /system/etc

I'm little confused [emoji53]
[Android Apps and Games] matif525:
I don't know that exactly

, but I think it is because Magisk is turn off root, not change back the files which you edited in root under its mode, so turn on root and disable AdAway is the only way to change back host file if you still under Magisk mode.
[Android Apps and Games] :
Anyone using this on nougat with the phhusson superuser? I always get an error saying the app could not copy the hosts file.
[Android Apps and Games] Ja_som:
If you search this thred, it is mentioned so many times... Flash zip file from first post...
[Android Apps and Games] :
Does not work.
[Android Apps and Games] Pkt_Lnt:
Yes

Works perfectly
[Android Apps and Games] matif525:
Maybe you can try to use Magisk or wait for AdAway's update, you are using stock ROM, right?
[Android Apps and Games] Opticuhl:
System-less Adaway works great! If anyone is having trouble with it make sure to select a custom target hosts file under preferences. From there use /su/etc/hosts and you should be good to go.
[Android Apps and Games] sirxdroid:
So is Magidisk required for N or optional?
[Android Apps and Games] Opticuhl:
It isn't compatible with Magisk as it uses su.d. Someone will have to write a script for Magisk I think. I don't think Magisk is necessary on Android N anyways.
[Android Apps and Games] matif525:
If you can't still use AdAway after you flashed AdAway_systemless_hosts_v2.zip, maybe you can try Magisk, that is what I did and finally made AdAway work success in stock ROM.

---------- Post added at 10:31 PM ---------- Previous post was at 10:23 PM ----------

The author says that can remain /system/etc/hosts, so if you flashed success, you don't need change directory to /su/etc/hosts. (Did I misunderstand what you said?)
[Android Apps and Games] Opticuhl:
Both work either way, I just like the reassurance that it's not touching /system.
[Android Apps and Games] :
Still does not work even after pointing to su/etc/hosts. Still getting that"copying failed" error.
[Android Apps and Games] matif525:
If you flashed systemless success, it will not touch your system partition even you use /system/etc/hosts.
[Android Apps and Games] Opticuhl:
I'm aware of this, I just like it not pointed to /system either way in case there's some kind of weird error with su.d. I've posted this to let anyone with the same mindset as me know it works.
[Android Apps and Games] matif525:
That's why, :)
[Android Apps and Games] xabier-bo:
Hi

I am following the thread from quite a time, and not sure where I got lost...

AdAway is not working for me on Nexus 5X, Android 7, SuperSu 2.78, AdAway systemless flashed...

I have AdAway 3.1.2, but it also happened with the previous release, and just since upgraded to nougat.

I've cleared dalvik, removed every other adblocker, reinstalled AdAway, systemless AdAway... but ads keep on appearing within apps.

Does any of you have a clear step by step procedure on how to solve this?

And it case it was already written, could you please answer with the link?

Thanks in advance!
[Android Apps and Games] NLBeev:
Adaway writes a file called 'hosts' in system/etc.

That's not possible when there isn't enough space in the system partition.

You have 2 options:

A. Make space. Deleted files you don't use/need in the system partition. About 3Mb is needed.

B. Use the 'systemless' mode that redirects to a different folder. Mostly su/etc.

To see what's wrong you may navigate to the folders 'System/etc' and 'Su/etc' and check if the 'hosts' file of about 2-3Mb really exists.
[Android Apps and Games] xabier-bo:
Thanks for your answer, NLBeev.

Yes, I can see the hosts file in both folders (3,68 MB), but ads are still present
[Android Apps and Games] Nergal di Cuthah:
Ads in apps are very different from ads in browsers. Adaway works (and has always worked) better in the latter than the former. Apps usually use ad networks and often send ads via ip number as opposed to dns address.
[Android Apps and Games] githyanki:
Open the 3 dot menu in adaway, chose log DNS request. Enable TCP dump.

Open the app with ads, when ad loads, go back to adaway, and open log.

Long press any entries and chose black list.

Profit
[Android Apps and Games] NLBeev:
It means you have installed Adaway normal and a second time 'systemless'.

You need only 1 hosts file. Try to disable su/etc/hosts by renaming. Reboot and check. No result than the other way around.
[Android Apps and Games] xabier-bo:
That throws light!

When I'll try, I'll feedback.

Thanks!
[Android Apps and Games] xabier-bo:
Not lucky...

I've uninstalled AdAway, manually removed hosts file in /su/etc and /system/etc,

flashed AdAway systemless, boot, installed AdAway, and point hosts file to /su/etc/hosts

Now I see a 2MB hosts file in /su/etc/ and not in /system/etc

... but ads are still visible

Any idea of what could be wrong?
[Android Apps and Games] NLBeev:
You choosed for 'systemless' although you had space in the system partition. But nevertheless it should work.

When you use the free Tapatalk app and there are no ads then it's ok.

When there are ads in Tapatalk then there is something wrong.

things to check:

1. Be sure that Adaway AdBlock is enabled.

2. Check if the adaway-script file is installed.

( su/su.d/0000adaway.script); if not the 'systemless' bind mount is not or not completely installed.
[Android Apps and Games] theArhar:
Please help, galaxy s6 powers off when applying hosts file. It also powers off instantly when trying to edit hosts file from terminal, even from twrp. What is happening?
[Android Apps and Games] Ch3vr0n:
I've just ordered a new device (Nexus 6p) and while i'm waiting for it to arrive (normally later today), i'm grabbing all the tools again i need. Adaway is obviously one of them. Now, my question is. Do I NEED the new v2 zip file or can i use the AdAway_systemless_hosts.zip (603kb) file i still have on my PC harddrive?
[Android Apps and Games] TEFjLONjDON:
6

Sincerely thank you. :good:
[Android Apps and Games] xabier-bo:
Thanks for your support.

Every thing checked, but not working for me... :confused:

Forgive me if becoming repetitive. If I were installing AdAway from scratch on a systemless rooted device (Nexus 5X):

- flash AdAway systemless from twrp recovery or Flashfire

- install AdAway

- in the configuration menu point hosts file to /system/etc

- download hosts

- reboot

Is that the right way?
[Android Apps and Games] NLBeev:
The goal is to make it work; keep trying, Trial and Error may take some time.

You must have the latest TWRP; use this and not FlashFire because I have no experience with that app.

When you have a N5x rooted and install Adaway normally you will probably get an error that writing the hosts file failed.

If no error Adblocking should work.

I think you have Nougat installed and you need 'systemless' Adaway.

Uninstall Adaway and reboot Twrp-recovery.

Flash the systemless-Adaway-hosts-v2.zip.

Url is in the link below.

Than reboot and reinstall Adaway. Use the latest version.

http://xdaforums.com/showthread.php?p=39144524/
[Android Apps and Games] souljaboy:
Link for systemless hosts zip is broken, says no mirror. Why on earth is there not a single reputable mirror on the internet?
[Android Apps and Games] Ch3vr0n:
Worked fine for me yesterday.
[Android Apps and Games] Hannibal226:
AFH informed in last days about this problem.

Should be fixed, but maybe dev should reupload the file again.

PS: If he want me to, I can create mirrors, too.

CHEERS!
[Android Apps and Games] NLBeev:
https://www.androidfilehost.com/?fid=24438995911977059

This link works here in the Netherlands.
[Android Apps and Games] Lost Dog:
Same problem for me. On my Nexus 6 it worked fine with N beta and the previous version of phh-superuser (can't remember the exact version number). N beta also worked fine with phh-superuser-17-magisk and Magisk-v6. As soon as I went to the release version of N (tried both with and without Magisk), seamless AdAway stopped working (Copy failed).

I tried several different host locations including /su/etc/hosts. At this point the only reason I need root is for AdAway!
[Android Apps and Games] Hannibal226:
The Link itself isn't the problem.

It's the Download (finding mirror) function.

CHEERS!
[Android Apps and Games] NLBeev:
It's laggy but I tested the download. Worked here

Maybe this link will help you?

EDIT

Dropbox link removed, because of critical posts of [MENTION=255549]Hannibal[/MENTION] and [MENTION=4958579]Primokorn[/MENTION].

I expect they will remove the link from possible quotes.
[Android Apps and Games] Hannibal226:
I personally have it and could also share the file.

But I never share/public any file, which a dev didn't give his "ok" for.

CHEERS
[Android Apps and Games] NLBeev:
I think it's helpful!
[Android Apps and Games] Primokorn:
No matter what you think. Some devs don't accept mirrors so respect it. If devs stop posting their works, you will no longer have "useful" links to share.
[Android Apps and Games] NLBeev:
Let's hope this time the dev does not stop.
[Android Apps and Games] elreydenj:
Anyway to get systemless AdAway to work with PHH superuser?
[Android Apps and Games] mrRobinson:
I give "ok". :good:
[Android Apps and Games] rgraville:
I have tried the following (in the hidden content). This setup does not have a working AdAway, however everything else I have tried works. (including Pokemon Go while having root).

I have tried to use the systemless zip in the first post of this thread, then install AdAway apk, and attempt to download lists. It fails when it attempts to write. Next steps to try to get AdAway working?

Nexus 6

[ROM][Stock+][NBD90Z]Prerooted-Debloated-Deoxeded-Busybox-Fast & Stable

http://xdaforums.com/nexus-6/development/rom-rooted-deoxeded-fast-stable-t3252922

(edited to remove root.zip prior to flashing)

Nougat 7.0 NBD90Z

MD5:31b1ee4003a4b88fa4d655eacbd490b8

NBD90Z Radio & Bootloader flashable zip.

MD5:df4fb45a3e26bc8f1ead300678a71679

[KERNEL] [October 4] ElementalX-N6-4.08 (Nougat)

http://xdaforums.com/nexus-6/orig-development/kernel-elementalx-n6-0-01-alpha-t2954680

Android 7.0 (Nougat)

ElementalX-N6-4.08

phh's SuperUser/ OpenSource SELinux-capable SuperUser

http://xdaforums.com/android/software-hacking/wip-selinux-capable-superuser-t3216394

PHH Superuser 266

Allows root and PokemonGo/SafetyNet

http://xdaforums.com/showpost.php?p=68969947&postcount=1063

Superuser APK

http://xdaforums.com/showpost.php?p=68986998&postcount=1107
[Android Apps and Games] Hannibal226:
Download Mirrors

UPDATED

Alright, here is new

AFH mirror

and

Dev-Host

md5: "9e47908bfef67098cf4e017f5ade6a1f"

sha1: "1bbd9ce73adb0a433995e14c4642e75ae03a9bef"

CHEERS ;)
[Android Apps and Games] rgraville:
Seems stickmount isn't working either, but it wasn't working with the previous magisk.v6+phh systemless either. AdAway was. Now it's not.
[Android Apps and Games] NLBeev:
Nice to see you with OK-links ?
[Android Apps and Games] cooLopke:
Please get adaway working with phh superuser! Thanks!

I've tried binding the /data/hosts file to /system/etc/hosts, however with no results. I found someone who did this and worked for him, however it's not working for me:

Run "rm /data/su/binds" (as root). This deletes all binds.

Run "su --bind --ls" (non-root). Make sure it gives you no binds.

Make sure /data/hosts exist.

Run "su --bind /data/hosts:/system/etc/hosts" (non-root).

Run "su --bind --ls" again (non-root).

If only one bind, reboot and check "mount | grep hosts" (as root).

Am I doing something wrong? Thanks for the response!
[Android Apps and Games] rgraville:
I just got AdAway working with phh 266, and I still pass Safetynet

Configure adaway to custom location for hosts.

Set custom location to /data/etc/hosts

Boot to twrp 3.0.2

Mount system r/w

Go to advanced -> terminal in twrp

ln -sf /data/etc/hosts /system/etc/hosts

Reboot to system

Update host list in adaway
[Android Apps and Games] Pkt_Lnt:
http://xdaforums.com/showpost.php?p=69022330&postcount=1368
[Android Apps and Games] cooLopke:
Hello,

I tried this, but however it's not working for me either. I set adaway to /data/hosts then I mount system r/w, I create the symbolic link, if I do an output of the file, it looks good. However when I boot back into the system the /system/etc/hosts file is still the default one.

So then I boot back in TWRP and again do a cat on the /etc/system/hosts file and it still is the symbolic link one. This is really strange..

---------- Post added at 06:45 PM ---------- Previous post was at 06:37 PM ----------

This one worked for me! I've used the adb shell and now it works. Thanks a lot !
[Android Apps and Games] AliMusa:
Can't seem to get AdAway working on my N6P. I'm rooted and I've installed SuperSU using the most recent stable apk, but I'm still seeing ads. I'm also on 7.0, if that matters.
[Android Apps and Games] Dethfull:
All force i wish to Any Adblock!

If they want ad, the ad will OBLIGATION to come inside the respective server:

If i accessed site.com The ad wil load inside the site.com

If is third!

A WARNING for the plagues google inc, facebok inc, etc inc:

"Be the next AFTER 4CHAN IDIOTS!''"

HAHAHA!

NEVER STOP!
[Android Apps and Games] marek287:
Thx. Its working!
[Android Apps and Games] Hedied4me:
So I just recently updated my SuperSU from 2.78 to 2.78 SR1. Upon updating adaway I am seeing an error I've never seen before that says "Copy of hosts file failed." Is anybody else seeing this problem?
[Android Apps and Games] Ch3vr0n:
Works fine here

Verstuurd vanaf mijn Nexus 6P met Tapatalk
[Android Apps and Games] Hedied4me:
Apparently I needed to have read the op a little more. I havent the faintest idea what systemless is, but after flashing the systemless zip in the op adaway is working again. Yay1
[Android Apps and Games] digitalnasarma:
I do not know how it works but I installed this app. Advertisements are garbage of modern society.
[Android Apps and Games] pkelly517:
Intrusive ads are the garbage of modern society.

Ads are a necessary evil for those who want others to do stuff for free.

I generally whitelist sites I visit frequently, unless they are one of the 'overwhelming' sites.

The one conversation that still confuses me is the one I had with Wired.com. I actually subscribed to the magazine. Apparently, that's not enough to view their website unless you whitelist. After a couple emails, I got my unused subscription fee back when I canceled.

Refunds are preferable to people with ad blockers. I guess they ran the numbers.
[Android Apps and Games] Robert342:
What hosts I must add if I wanna block ads in Facebook app? Cherrs

Sending from Oukitel K10000 (Android 5.1)
[Android Apps and Games] ataraxist:
Apparently, some apps detected AdAway and asked you to disable it. Is there anyway to avoid disabling it?
[Android Apps and Games] shaqman89:
What app is that?

Are you sure that app is actually trustworthy? At least more trusted than adaway itself?
[Android Apps and Games] maybeme2:
Finally a useful response. Thank you.

I was not aware of QKSMS. Installed it and like it better than textra. Uninstalled textra.

I have donated voluntarily to numerous developers because I appreciate what they do. I just don't like being blackmailed into doing so. In a months time I will probably donate to QKSMS. Thanks for pointing me to it.
[Android Apps and Games] Pkt_Lnt:
Root Essentials is one

http://xdaforums.com/android/apps-games/app-root-essentials-1-5-3-t3359589

https://play.google.com/store/apps/details?id=com.superthomaslab.rootessentials
[Android Apps and Games] mitchdickson:
Yeah, buy the apps.
[Android Apps and Games] fhem:
[MENTION=3355398]mrRobinson[/MENTION] I would like to embed/flash your systemless host zip fix w/ my aosp rom build. Do you mind if I play w/ your zip and see if I can convert the update-binary to run embedded? I think it is above my pay grade and my old man's brain. LOL Of course all credits will remain with you.

Thanks for all your support and hard work. Much appreciated by all I am sure.
[Android Apps and Games] stephendt0:
Good question.

I only have two things whitelisted at the moment:

*.doubeclick.net

*.googleadservices.com

I had some trouble on a couple of sites and once I added these I've been fine. Unfortunately some ads in some apps have returned, so still trying to work out a way to block those banner ads without breaking google searches.
[Android Apps and Games] maybeme2:
WeatherBug app stops working when AdAway is enabled. Works when AdAway is disabled.

Added the above 2 to the white list plus

sgiv.api.earthnetworks.com

Did not help. WeatherBug detects adaway is running and will not run.

Ideas?
[Android Apps and Games] androcraze:
Forecastie:

https://f-droid.org/repository/browse/?fdfilter=forecastie&fdid=cz.martykan.forecastie

https://play.google.com/store/apps/details?id=com.casticalabs.forecastie

Open source, no ads, and a damn fine widget.
[Android Apps and Games] maybeme2:
Thank you. I will look into it.

I have uninstalled WeatherBug and am trying NOAA and Weather Underground apps.

Will keep one.

Choosing between Adaway and WeatherBug was a no brainer.
[Android Apps and Games] GuardianUSMC:
Doesn't Work on N (7.0)

I just flashed the new 7.0 image for Nexus 6 and rooted it.

Installed this like I always do and it immediately begins to fail during apply, saying FAILED but no reason, then you click on help and it takes you to the tab about the ethics of ad blocking, seriously? In the past it would say, can't put it here, want me to change it to this? and you'd say yes and it would be fine.

So I decided to manually change it from the default of /system/etc/hosts to /data/data/hosts which is what it has been forcing since "system-less" root was introduced. This time it went further and pops up to create symlinks, fine, normally does that and you say yeah and it will do it and reboot and done. But this time it fails and keeps harping and droning on and on about how this is a HTC s-on/s-off issue, seriously? I am on a Nexus 6 not an HTC and everything is unlocked, rooted and fine.

The only thing that has changed is being installed on 7 as opposed to 6 before, that's it. Anyone know what's going on? I didn't see a point in opening an issue ticket with them since I have over 11 that don't even have an acknowledgement or reply for almost a year, so I am not expecting them to be jumping to resolve this. TIA.

UPDATE: I just checked and it says the file exists, so why is it that Adaway saying its not there?
[Android Apps and Games] Deathmehr:
Yes, this bothers me a lot, too. I greatly prefered the 'old times' when root wasn't systemless.

I've been researching Adaway's problems with applying hosts and as far as I understand it's because /system is now in Read

Only mode. Thus, Adaway is unable to swap files. Am I right?

However, I've tried everything to temporary make the partition RW but it was never successful.

Is there any other way for Adaway to work rather than applying the zip file?
[Android Apps and Games] GuardianUSMC:
Well, there is some merit to using system less and not modifying the system, integrity wise, but that aside, I got the problem fixed thanks to something [MENTION=3355398]mrRobinson[/MENTION] posted, thank you. The package that he posted fixed the issue, I used TWRP to sideload it and reboot and it works fine now but they might want to update the packages they are distributing on F-droid to include this fix.
[Android Apps and Games] Deathmehr:
Oh, I get that some people want to be able to use i.e. Android Pay on custom roms and I belive there was a reason behind this shift.

However, it caused a lot of confusion for me at first. For example when it came to problem with Adaway.

There should definitely be an update on FDroid or Adaway's FAQ informing how to fix it.
[Android Apps and Games] jaibar:
For me the only way I succeed to write the hosts file is by using some root explorer, change the permissions of system/etc/hosts file from rw--r--r to rw--r-rw then it works fine. Just toggling system to r/w is not sufficient in my case.

After reboot the permissions revert back to default, so whenever updating hosts file need to rechange permissions..
[Android Apps and Games] Deathmehr:
I tried that also, using Solid Explorer with root permissions. The app was telling that RW attributes were assigned, but Adaway was still unable to apply.

I downloaded also Terminal Emulator and tried remounting /system but it also did nothing.
[Android Apps and Games] mrRobinson:
No problem.
[Android Apps and Games] GuardianUSMC:
That's among the reasons, but I personally don't use Android Pay and have no intention to use it. But honestly, even with the SYSTEM root, I was able to launch and load AP without issue, so not sure that's entirely the reason but its moot. Adway was working fine with system-less root on 6, so that itself is not the issue just that it seems Adaway is lagging behind stability updates. Right now, it doesn't work despite the [MENTION=3355398]mrRobinson[/MENTION] package stopping the "error whining" but functionality wise, it blocks nothing, it logs nothing and basically does nothing despite saying all is well.

No offense but I am not doing this, its entirely too idiotic and counterproductive.

It doesn't seem to matter what is going on with your system, it can be configured perfectly and yet Adaway refuses to function. It was working on 6 but on 7 its utterly and completely useless now.

For me, all files are there, all permissions are fine, all links are active and the app says all is fine but in reality its not blocking anything, not recording any tcp dump whatsoever, its in effect doing absolutely NOTHING. 7 has been out long enough that by now they should have had all their ducks in a row and made sure it works right and now this, its very disappointing to say the least. I guess when you have a kitchen with lots of cooks but no chef to own it, nothing gets done right - as evident by the lack of any response to the issues on Git.
[Android Apps and Games] mitchdickson:
It works great for me and for many others in this thread. I guess I don't understand what you're whining about. Are you sure this isn't user error?
[Android Apps and Games] mitchdickson:
Search the phh thread for "AdAway".
[Android Apps and Games] Pkt_Lnt:
I don't use Magisk, so I'm no help with Magisk implementation of PHH SuperUser. You likely need to use the Magisk thread. I now that it is different than the normal PHH SuperUser.
[Android Apps and Games] mitchdickson:
It's there..."custom target".
[Android Apps and Games] Nergal di Cuthah:
Target host
[Android Apps and Games] Pkt_Lnt:
You don't do it on the phone. It is run from a computer with the Android Debug Bridge installed with the USB drivers.
[Android Apps and Games] Nergal di Cuthah:
Fedora's site has a guide to setting up ADB. I can't vouch for the instructions as I only searched the web for

android adb fedora

it was my first hit (using duckduckgo)

'cause I'm nice here's the link

https://fedoraproject.org/wiki/HOWTO_Setup_Android_Development
[Android Apps and Games] Pkt_Lnt:
Did you try a Google Search? Many devs here use Linux. My Linux laptop died and I have not replaced it yet.