r/nexus5x•
Stroker

Adaway without root?

Help

After years of being rooted on Android I've finally decided to keep things stock with the 5x. The handiness of Android pay and the monthly security patches out weigh the benefits of root for me. The one thing I just can't get use to though are the ads.

Could I temporarily flash twrp then flash an Adaway host file without being rooted? Or better yet would flashing a systemless host file to link /system/etc/hosts to a partition AdAway can write to work without root and still allow me to periodically update host files?

Posted Feb 4, 2016, 9:00 PM UTC

1011
lunar_unit•

This might be the ticket.

8
StrokerOP•

Interesting. Thanks I'm gonna give this a shot

2
el_charlieNexus 5X - 32GB•

Can I ask why?

By temp booting twrp and pushing a modified hosts file, your system partition will be modified, so OTAs won't work.

You can, however, root with systemless supersu, then flash a script that links the /system/etc/hosts with /su/etc/hosts and use adaway like you always did. It won't touch the system partition and to flash an OTA, you just need to restore the stock boot.img and apply the OTA.

Or better yet, the new beta of Chainfire's FlashFire can apply your OTA for you and keep root. All that and systemless.

For android pay to work, you just need to disable su, make a payment and enable it again.

There's no reason not to root this way.

3
DeandreDeangelo•

Except having to disable and re-enable su every time you make a payment pretty much negates the convenience factor.

3
el_charlieNexus 5X - 32GB•

Understood, but by flashing a modified hosts file tampers the system partition so Android pay still won't work.

0
StrokerOP•

I normally just flash the full factory image when its released. After doing the Feb one I figured well while I'm already here hooked up to my pc why not push the adaway hosts file. Just asking if its doable to save myself the headache of troubleshooting later. For me Android has come far enough that I really don't need root anymore to fix those minor annoyances and keeping things stock is just easier, except the ad thing.

Is a modified hosts file really enough to mess up android pay?

1
el_charlieNexus 5X - 32GB•

Is a modified hosts file really enough to mess up android pay?

Yes,

Because the SafetyNet API required for Android Pay detects that the system partition has been modified.

1
wishka233•

I've compromised by just installing a browser with ad blocking

3
StrokerOP•

That's gonna be plan b

1
kneedeepinlife•

I've compromised by using AdGuard. It doesn't require root since it doesn't modify the hosts file. Instead, it runs a VPN server on your phone and loops back your traffic through that server, removing ads in the process.

The downside is that the free version only removes ads from the browsers. Luckily, I spend most of my time in Chrome, so it's been a good solution for me so far. I've found that I only have a handful of other apps that serve ads and I don't use them all that much.

2
scirio•

I am almost positive that the security don't require that you be unrooted.

1