Friday, May 13, 2016

[Guide] AdAway for systemless hosts file

About the only reason I root my phone is to install AdAway. I'd prefer to not modify the system partition to help make OTA's easier to get and to allow Android Pay to work. AdAway has a flashable .zip file that preps the hosts file to use the systemless root structure that comes along with SuperSU. Unfortunately, that script depends on being able to access the /data partition inside of TWRP which isn't going to happen any time soon on the HTC 10. Fortunately, it is easy for us to manually replicate what the flashable .zip is trying to do.

This isn't a detailed how-to, but more of a set of guidelines. Don't blame me if your phone explodes.
  1. Root the phone with the latest SuperSU.
  2. Download the AdAway_systemless_hosts_v2.zip file from the Unofficial AdAway thread.
  3. Extract the files from inside the zip. We are only interested in two files in the support folder.
  4. Connect the phone to your PC and turn on file transfer mode.
  5. Copy "hosts" and "0000adaway.script" that you just extracted to the internal storage of your phone.
  6. Use a program file Root Explorer to move "hosts" into /su/etc and move "0000adaway.script" into /su/su.d (this probably could have been done with ADB push, but I got permission errors when I tried it that way and I'm impatient and lazy).
  7. Chmod 0755 /su/su.d/0000adaway.script (I used a root shell on the phone via ADB)
  8. Install AdAway (I used the link in the Unofficial AdAway thread.)
  9. Reboot the phone.
  10. Run AdAway like normal. By default it should use /system/etc/hosts which is what you want.
If something doesn't work, figure out why and fix it. I'm happy to answer questions to the best of my ability.


from xda-developers http://ift.tt/1Ta5c0O
via IFTTT

No comments:

Post a Comment