yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] mrRobinson:
PiVPN.io

Friends of security, I completed my first (second'ish) pass of pivpn.io

It allows you to easily get openvpn running on a raspberry pi on your network.

Remember pi-hole.net I previously mentioned. Well if you run that and your own openvpn, you can point your openvpn clients to use pi-hole as their DNS server and... no Ads now.

Yes, yes, AdAway is still very much needed. When it comes to blocking ads on your phone, AdAway will be the most efficient.

But the trifecta of AdAway, a local pi-hole and your own openvpn mean that

1. your local android running AdAway is always protected

2. your local network where pi-hole is running is always protected

3. anything you use an openvpn client on (including an unrooted phone, iphone, desktop, etc) can now be protected

AdAway is easy to install, pi-hole is easy, and now with pivpn running your own openvpn is trivial as well.

Why do I use the word "protected" up above? I don't run AdAway for the sake of not seeing Ads. Its a good side effect but I have no problem buying apps and/or not using ones that are heavy into serving ads. My main reason is Ads are a great source of serving malware and virus's. (one example)

As well as blocking these completely untrusted domains, it speeds browsing and decreases bandwidth usage.

I assume many AdAway users share the same views/benefits and just want to bring to this community the nice little trifecta of protection that can be available to them, even if they aren't technical.

Note: Let's not discuss this here, I just felt this community was ideal to share this with, as an FYI. - there is a reddit thread

Back to your normal AdAway discussion....
[Android Apps and Games] mrRobinson:
I added to the OP that xda labs is the best way to get AdAway now. There have been over 7k downloads there so I think a lot of people are using it.
[MENTION=2637227]blk_jack[/MENTION] is there a way to link directly to AdAway within Xda labs? Like if it were in the play store i could link to it? No big deal if not just can't find it if it exists.
[Android Apps and Games] JohnCorleone:
It's definitely in the list of apps available to download on here! In fact, I just restored my stock Marshmallow backup because some of the Xposed mods are breaking Wi-Fi call and text feature on my T-Mobile HTC M9.

I just came back here to review the install instructions...I can't remember if the zip goes before the app or the other way around...I am pretty sure I saw what was best in the OP. THANKS for keeping this app alive and current! I can't tell you how many people are only rooting to have Ad Block and maybe lose some bloat..but it's the ads that really get irritating! Thanks again!
[Android Apps and Games] Mike B.:
I assume you mean AdAway since "AdBlock" is a completely different product. The AdAway_systemless_hosts_v2.zip in the OP is only for people who are running a "systemless" root that doesn't allow apps (including AdAway) to edit /system/etc/hosts. You can flash it from recovery before or after installing AdAway but just make sure that AdAway points to the default /system/etc/hosts to take advantage of it.
[Android Apps and Games] JohnCorleone:
Yeah, I wrote the wrong name and I have been using this one for years! Maybe it is because I passed by that one in XDA Labs as well. Yeah I have been flashing a syatemless root version of SuperSU but I am wrecking the setup either with a rooted app or by adding Xposed in to the mix just to take advantage of around 6-8,modules . I will dig in and see but I have been awake all night restoring my stock MM setup because one module broke Wi-Fi calling and texting. I THINK it may have been a build.prop tweak app ....at this point everything is getting blurry so a successful flash and boot is a win for me tonight! Thanks for pointing out that I wrote the wrong app name though...lol
[Android Apps and Games] Mike B.:
AdAway only needs temporary access to the hosts file while it's (optionally) updating it, has no bearing over the ability to boot, and has no impact on anything else in the system.

Xposed, on the other hand, is a much more potentially intrusive package since it replaces and optionally patches various system components, and is best first tested without any modules and only after making a dependable backup . Since this is unrelated to AdAway, you may want to seek assistance wherever your Xposed framework and/or preferred modules are supported.
[Android Apps and Games] Ozark_8125:
Just a quick moment to say thanks for keeping this app updated for us mrRobinson - I don't think I've ever got around to saying so, but this is the first app I've always installed right after supersu, like many here, I'm sure. Absolutely indispensable.
[Android Apps and Games] punkeroso:
Hi,

I just flashed the latest developer preview 2 NPC91K on my nexus 5x.

Got root working sideloading the latest supersu 2.71.

I've tried also sideloading the systemless zip in OP but, even if it installs fine, Adaway still doesn't work.

Someone got Adaway working on DP2?

Thanks
[Android Apps and Games] sqpp:
Same on Nexus 6 DP2
[Android Apps and Games] Ja_som:
Yes, same device, same SuperSu, AdAway works...
[Android Apps and Games] Mike B.:
Can you please explain

exactly

what "doesn't work" and what error, if any, you receive? The only thing AdAway really needs is rw access to the hosts file, which usually means a proper full root and sufficient permissions to write to /system or wherever that file (or its symlink) lives. Does AdAway install without errors? Is it able to fetch the source files you requested? Does your hosts file end up containing the expected entries? If you don't get an error message, does the log show any problems?

The reports we have seen so far suggest that AdAway is unable to copy the hosts file to its destination, pointing to yet another SuperSU root limitation. Chances are that anything trying to similarly edit the hosts file (easy to test from a Terminal emulator prompt), and not just simple innocent AdAway, would fail in the same manner. If you can, try under a different root method, assuming one is available for your device.

On a temporary basis, you could simply have AdAway build the hosts file you want under another configuration then copy that file in place from recovery (or adb shell) until "N" roots become a bit friendlier... ;)
[Android Apps and Games] sqpp:
Applying... Building Hosts file

Copy failed

Copying of hosts file failed..

even tried ln -s commands via adb shell

ln: cannot create symbolic link from '/data/hosts' to '/system/etc/hosts': File exists

Used the latest root of coruse, which is Beta Supersu -v2.71 for N version.

Edit: looks like i used bad linux command, however now used the right one ln -s /system/etc/hosts /data/hosts then selected the target hosts file, but still seems not working :(
[Android Apps and Games] Mike B.:
Thanks. This confirms that AdAway is simply not given sufficient permissions to do its job. I assume that your SuperSU only gave you a "systemless" root, in which case flashing the ZIP from the OP might allow AdAway and other apps to indirectly copy the hosts file. If you use that ZIP, can you then write to /system/etc/hosts (from AdAway, Terminal, etc.)? Make sure to point AdAway to that default location, and NOT to /data. As usual, try to look in your logs for clues!

<RANT>In general, there is very little AdAway can do until it receives proper access to the hosts file. Current "N" implementations may make it difficult, but historically every single Android version has eventually received proper root methods and allowed full access to system. There's no obvious reason to believe that the final NYC will be different but it might require time and something besides the increasingly cautious SuperSU and that disturbingly fashionable "systemless" silliness (gentlest term I can use, sorry). Those matters are probably best discussed in a SuperSU thread since AdAway is merely one of many innocent victims... </RANT>
[Android Apps and Games] punkeroso:
Could you please describe how you managed to do that?

Did you flash the systemless zip from recovery? Which one? Is your device encrypted?

Thanks
[Android Apps and Games] sqpp:
Example: adb shell then su, pop up the SuperSU windows, and i got superuser rights succesfully, so i assume this part works fine.

Also Adaway is also provided that windows, so got the rights (theory) but dont work.
[Android Apps and Games] Ja_som:
Flashed zip and is encrypted. If you search this thread, you can find my posts how I did that...
[Android Apps and Games] yanleites:
Sideload Adaway zip file from TWRP, then install the APK
[Android Apps and Games] mrRobinson:
The issue is probably that you have encrypted data partition. It'll have to be decrypted for the systemless zip to work cause remember it's actually modifying the data partition.

Did you sideload from recovery or booted?
[Android Apps and Games] Mike B.:
For the record and as mentioned previously, it doesn't really matter when and how you flash that ZIP. All it does is place a script executing "mount -o bind /su/etc/hosts /system/etc/hosts;" in the su image so that SuperSU executes it on boot, allowing anything that needs access to /system/etc/hosts (unavailable under SuperSU) to do so indirectly by equating that location to /su/etc/hosts (allowed by SuperSU). It's a simple yet convenient trickery that gets around those SuperSU "systemless" limitations

not only for AdAway but for anything that wants to edit the hosts file

. Flashing the script via recovery is by far the easiest. If your recovery doesn't support encryption (not all TWRP implementations do) , I suppose you could always decrypt, flash, then re-encrypt. Whether AdAway was installed before or after flashing, the important part is to keep the default location of /system/etc/hosts. Yes, all of this is a pain in the A(ndroid), but I guess that's the price you have to pay for being a pioneer willingly attempting to use a preview OS with a beta root... ;)
[Android Apps and Games] osm0sis:
You seem to have some misconceptions about what systemless root is and what it does..

- It does not limit apps' ability to access /system. At all.

- There were some changes to the mount command due to Android switching to toybox mount from toolbox mount, but this is unrelated to root, and can be easily worked around by apps to keep up with these changes to Android.

- Since Android M+ already required changes to sepolicy in the boot.img ramdisk, there was no reason the root procedure needed to modify both /system and boot.img, so it's entirely contained within boot.img instead.

This

is what makes it systemless.

- The cool side effect of /system being untouched by the rooting procedure is that

if

none of the root apps modify /system then OTAs can still be easily applied with Google's newer whole-block patching OTAs. This is why people care about trying to stay "systemless" with their root apps and modifications.

- The only cases of systemless root "interfering" with root apps directly are actually due to the apps' root calls being poorly coded to directly look for root in a specific location (like /system/xbin) where they should just call su and assume it's in the system $PATH (which it always will be).

It works quite well! :)
[Android Apps and Games] Mike B.:
Technically, I should have specified "SuperSU's systemless implementation". Oh, no misconceptions here, I assure you but this is not the place to get into the dirty details of how Android can be compiled and rooted in a variety of manners and include a variety of tools, some friendlier than others (including leaving the &^%$ boot image alone), one of the benefits of using a mostly open source OS. I'll merely point out the non-technical point that it's not clear at all that people who want a properly rooted OS and/or use "custom" ROMs care at all about OTAs, especially the Google-provided ones. I know it's a popular talking point, but not necessarily an overly "cool" or relevant one. Come to think of it, I don't recall ever using an OTA but I've compiled/patched/flashed a lot of things for our devices over the years.

We now return you to the ongoing saga of "why is AdAway not blocking this but blocking that"... ;)
[Android Apps and Games] blk_jack:
Hey sorry for not seeing this sooner! There is a way but we're currently working on it and it's not finished! THAT SAID...... you can sneak a peek here: https://labs.xda-developers.com/store/app/org.adaway. If you try to launch that URL in Labs you should get the details page for AdAway and in your browser a web version of that.

I'm not the one developing the web view, but if you have any feedback feel free to send me a PM and I'll pass it along to the team. Also, glad to see Labs is working out well for you and hopefully AdAway users ;)
[Android Apps and Games] TKruzze:
I have to agree with [MENTION=4544860]osm0sis[/MENTION]. You do not seem to have a proper understanding of root, especially with regard to stock ROM's. I'd encourage you to spend some time re-reading [MENTION=631273]Chainfire[/MENTION]'s posts.
[Android Apps and Games] Mike B.:
I appreciate the advice, but with all due respect, I might have a better grasp of root issues that you might think from merely glancing at a few casual comments here. With equally due respect for the dev known here as Chainfire, he didn't invent Linux root or the ability to access privileged OS subsystems under *nix, and his current approach is only one of various options. A "stock" ROM is usually simply the name given to a particular custom ROM distributed by a device manufacturer. That manufacturer's interests and requirements are different and typically much more restrictive that what Android itself requires. I apologize for having vented my frustration with recent SuperSU releases and their insistence on clobbering boot images in this AdAway thread. No need to respond. I'm done. ;)
[Android Apps and Games] Ultramanoid:
AdAway's thread is not the place to discuss "systemless root" versus other rooting methods, so my comment will be off-topic, sorry for that.

But since it seems Mike B. is alone against pretty much anyone else who posts about this, let me offer my view : the point of the Android OS for me is that I can customize it on a system level. I've never wanted an OTA update, I consider blocking such OTAs a most desirable feature. The moment I cannot compile my own binaries and stick them into /system on my own, Android is useless to me. So all this talk about "systemless root is the future" translates to "this OS will be useless" to me.

And as has been said many times, none of this has anything to do with AdAway.

Peace !
[Android Apps and Games] BettlePimp:
Using CloudyG2 on my LG2 and it was working fine. However when I tried to update the hosts file yesterday I got an error that "Unfortunately Adaway has stopped working" after a while of trying to parse and apply the hosts file. I tried removing and installing the apk again, rebooting the phone multiple times but that did not work. I found out that what causes it is the hosts adblock.mahakala.is If I remove it then it's working good again. Mayby that hosts file is way too big for my phone? How do I resolve this?
[Android Apps and Games] osm0sis:
Reread my post. Systemless root

doesn't

stop you from putting your binaries in /system.

At all

. It also gives you alternative places to put your binaries without modifying system (/su/bin and /su/xbin) which are just as effective. :)

Anyway, we should open another topic ("FAQ and FUD: Systemless root" ? :p) if we want to continue discussing this, so my apologies to mrRobinson. I won't reply further on this topic here. :good:
[Android Apps and Games] shoey63:
There's a lot of ranting about root here lately, so I'll chime in and then shut up.

- If you are rooted but still can't r/w system, there must be another protection mechanism in place (Sony's RIC for example)

- If you are on mm or above you MUST disable dm-verity in the boot ramdisk and either patch the sepolicy, or make the kernel permissive. From there you can go for systemless or system root.

- Root is root, no matter which way you do it.
[Android Apps and Games] DE52:
That file is not recommended as mentioned in the thread before. Way too big to be useful (especially on a phone) and yes, too big for some phones to handle. It's best to avoid it. Either way, as you'll notice, the normal adaway hosts already block a lot of ads. Try those for now and see how it goes.
[Android Apps and Games] wolfballz:
Need some assistance. I have this running on my Samsung Galaxy Tab 4 10.1 without issue. I also have an Nexus 6 running Pure Nexus. No xposed or mods or anything. App installs fine and it even downloads and installs the modified hosts file as I can see all the entries if I open the hosts file. However, it will not block any ad at all like my tablet does. Not sure where to look next.
[Android Apps and Games] BettlePimp:
Thanks for the reply. It was working before however. Are there any other custom lists recommended for phones?
[Android Apps and Games] Ultramanoid:
Check this reliable, well-known, and well maintained one ( which is not a monster-sized file ) :

http://someonewhocares.org/hosts/
[Android Apps and Games] BigBadBoy:
Why? Do you need more than the 4 suggested sources installed by default?

Are you getting many ads with these 4 applied?

As said many times in this thread, you can use the DNS request log and blacklist any url you may need... This will always be better than adding monster host files that will slow down your phone...
[Android Apps and Games] dex87xda:
[MENTION=3355398]mrRobinson[/MENTION] can u add themes for Adaway, at least black and classic (dark)? And material design in future ? :)
[Android Apps and Games] mrRobinson:
Won't come from me, I'm not a UI guy. It does already follow material guidelines. At least for pallete and icons. I believe settings menu is fine too.
[Android Apps and Games] Primokorn:
AdAway can be easily inverted through Material Design ressources.
[Android Apps and Games] Namoi:
There is already a dark theme in settings.

Edit: well no. It is dark by defaut so i didn't get the it.
[Android Apps and Games] IronTechmonkey:
In re themes; One person's visual gratification is another person's clutter. Whether I like the look of an app or not I would always favor such minimalism in the interest of very smallest possible resource footprint and maintenance overhead. Just one geek's opinion (and an admittedly absolute perspective).
[Android Apps and Games] adpsimpson:
Sorry for posting in what's maybe the wrong thread, but I'm really struggling since I got a new phone some 6 months ago. It's a Wileyfox Swift, which came with Cyanogen OS. I rooted it and installed Adaway, but it didn't work. I didn't put much effort into working out why but instead put Cyanogenmod on it. Now running CM 13 nightlies. I've tried pretty much every hosts file I can download, both manually and with Adaway. I'm fairly sure the permissions are set correctly. I've even created a minimal one line hand-crafted hosts file, just to test it. Nothing seems to have any effect - it's as though /system/etc/hosts is being ignored entirely.

I'm assuming this isn't broken across the whole install base of Cyanogenmod, or the internet would be screaming. I have some experience with Linux and Android, but I've run out of things to try to make this work. Can anyone suggest why the system (all apps, including Chrome) would be ignoring the hosts file, or what I might have set up wrong?

Andy
[Android Apps and Games] wolfballz:
I'm running a Nexus 6 with Pure Nexus ROM 6.0.1 MM and am having the same issue. Posted this same issue a few posts back also. Hoping someone can aide in helping me get this corrected.
[Android Apps and Games] jheide44:
@ last two posts... What version of supersu are you on (systemless root ?)... If so, did you flash the systemless root .zip prerequisite from twrp? See OP for details/links.
[Android Apps and Games] wolfballz:
I have SuperSU 2.65. Don't believe I have systemless root, just standard root.
[Android Apps and Games] jheide44:
If you are on android 6/M and using supersu v2.56 or later then you are systemless root... You must flash the prerequisite .zip file from twrp, read this thread post #1 for details.

And read up on your supersu version:

http://www.xda-developers.com/chainfire-releases-root-for-android-6-0-without-modifying-system/

&

http://xdaforums.com/showpost.php?p=23427824&postcount=3
[Android Apps and Games] JGradyO:
I don't think this is universally true. I'm on Nexus 6, PN 6.0.1, SU free 2.6.8, and I am not systemless root. I've never had to do anything special to make AdAway work, and my hosts file (3.69mb, made from the default sources) is in /system/etc. Been using AdAway since my original Droid, just updated to current with XDA labs. Flawless.

EDIT: according to the changelog in your second link, SuperSU detects when a ROM can reload SEPolicy from data and does NOT go systemless. Since 2.64 in December.
[Android Apps and Games] jwds1978:
Not necessarily.
[Android Apps and Games] IronTechmonkey:
Outside of attempts to resolve problems writing the hosts file, perhaps the discussion of how SuperSU works should go in one of the several the SuperSU threads.
[Android Apps and Games] blackholeredstar:
Does Adaway block ads in the results of google search? Becouse it does not work on my mobile. All other ads are properly blocked but when I search by google something like "hotel in Paris" it always show me several ads in the search results.
[Android Apps and Games] jheide44:
What happens when you click one of those? Does it get blocked?
[Android Apps and Games] blackholeredstar:
Good point. I tried to click one of those ads and I only got 'unable to connect' message.
[Android Apps and Games] Cookie Ninja:
It's the Google app. It tunnels/pipelines the ad into its app,but cannot read links externally/directly. Hence you get link not available errors....personally, I disable/uninstall all Google stuff except those needed to run my playstore account / playstore app. Just 4 com.google.*.apk stuff is left behind.

Dead Cookies leave no trails...
[Android Apps and Games] blackholeredstar:
Oh well, thanks. But I see the ads even after performing the search in firefox browser (using google as my search provider).
[Android Apps and Games] adpsimpson:
To be honest I don't know... I flashed CM 13, and enabled root through the system menu. I have not manually installed any SU binary, and there is nothing (eg supersu) in my apps list. I currently have it set to "Apps only", and it has worked fine for everything except Adaway.

Does this mean I need to flash the systemless root .zip file? If so I will do that this evening and report back.

What does this do? I can obviously alter the hosts file fine, but it doesn't appear to be used - what technical change does that flash make?

Thanks

Edit: Realise after a bit more reading that root is "cooked in" to Cyanogenmod, not systemless, therefore I shouldn't need to flash that zip. Therefore back to square one I guess?
[Android Apps and Games] wolfballz:
I don't believe Pure Nexus ROM for the Nexus 6 is systemless root.
[Android Apps and Games] ElwOOd_CbGp:
ay for yall having a hard time getting your hosts file to stick...try this. Its how I got it to work.

1. Use AdAway to to set your hosts file. Don't reboot yet. If your ROM has built in Ad blocker, Disable it.

2. Use a root file manager that can mount system r/w (I use MiXplorer) and navigate to system/etc and scroll down to "hosts"

3. Select and copy it to your sdcard. Also, if there are any host.bak or host.og or default whatever hosts, move them somewhere else or delete them

4. Then, select the hosts file that you just copied to your sdcard and copy it again or cut/move, doesn't matter.

5. Navigate back to system/etc and paste it, overwrite the one that's there. (the one you originally copied)

6. Set permissions 644, that is owner:root group:root -rw-r--r--

7. Reboot. It should stick.

For yall with systemless, I don't know what to tell you. I couldn't get it to work either. I had to root system for this and some other stuff. sorry Chainfire, I know you've been working hard on that.

Hope that helps someone.