Jump to content

Getting AdAway working


Recommended Posts

Guest stringy2010
Posted

For those who have root+twrp and want to install AdAway.

After installing AdAway I found that it will not apply the hosts file and you need to create a symlink to /data/data/hosts or change permissions in system/etc/hosts to rw-rw-rw, the latter can't be done even with root as the system directory is protected.

Here is a zip file which can be flashed with TWRP which creates the symlink for you.

Once flashed you just need to go back into AdAway and change the target hosts file to /data/data/hosts and it will apply the hosts file without issue.

https://drive.google.com/file/d/0B1BG0sTVc6ikbGJZSnZZTVFUU3c/view?usp=docslist_api

Guest Frankish
Posted

I don't understand all this about system being protected. I've modified build.prop and deleted system files and disabled boot animation. This all survives multiple reboots..

Guest stringy2010
Posted

I don't understand all this about system being protected. I've modified build.prop and deleted system files and disabled boot animation. This all survives multiple reboots..



Maybe I've misunderstood as to what is protected.

When I tried to change permissions of the hosts file to rw-rw-rw it wouldn't let me.

So my other option was to create the symlink and rather than faff about with typing commands I thought I would flash something which would create the link for me which is what I've shared.

Sorry, I'm not a whizz when it comes to android, but I can flash stuff and what not, so just thought it would help people like me who aren't super confident with adb and typing commands.
Guest Frankish
Posted

I use es file explorer and first mount system partition as writable before making the changes. It sounds to me like maybe that step wasn't done in your case. I wasn't knocking what you have done its just an alternative method. If it works and helps others then its great.

Guest stringy2010
Posted

I use es file explorer and first mount system partition as writable before making the changes. It sounds to me like maybe that step wasn't done in your case. I wasn't knocking what you have done its just an alternative method. If it works and helps others then its great.



Yeah, thats what I didn't do. I too use es file explorer and it just wouldn't have any of it, lol.

I know you weren't having a go, that's not what people on here are like, its all about helping others.
Guest brackehill_mob
Posted

Easiest to do using the file manager in TWRP as then you know exactly what you're doing :)

Guest Umrtvovacz
Posted

I had the same problem and gave up. I did set hosts to rw-rw-rw (666) in TWRP and it does stay after reboot, but AdAway still can't change hosts file for some reason. I was wondering whether to try to mount system as writable but I was afraid I am gonna mess something up. Now I know. Thanks, people!

Guest Umrtvovacz
Posted

I still can't figure out how to mount system as rw.

 

Posted (edited)

Use root explorer.

 

 

Print from internet:

5c3vuNH85fygUfRlEuL7vHYs1Ej6-rHO9Nl4tLCs

Click on Mount R/W.

Edited by LiNe171
Posted

AdAway has been working fine on my wife's rooted SU6. I know it is working because she actually had to temporarily disable it at one point to check if it was breaking a certain site (and it was).

Guest Umrtvovacz
Posted (edited)

Use root explorer.

 

 

Print from internet:

5c3vuNH85fygUfRlEuL7vHYs1Ej6-rHO9Nl4tLCs

Click on Mount R/W.

It turns back into R/O after restart.

Edit: It doesn't actually change system to R/W. If I restart the app, it shows system as R/O, same with other apps with similar function.

Edited by Umrtvovacz
Guest Umrtvovacz
Posted

I don't understand all this about system being protected. I've modified build.prop and deleted system files and disabled boot animation. This all survives multiple reboots..

How did you mount system as R/W? I can't figure it out.

  • 3 weeks later...
Posted

Had the same issue of Adaway being disable after every reboot, flashed the zip you provided and now everything working great. Thanks!

Guest patient81
Posted

Well, as much as I appreciate you providing the zip and it does appear to setup AdAway correctly, I'm still seeing ads so doesn't seem to be working for me. Any thoughts?

Posted

Well, as much as I appreciate you providing the zip and it does appear to setup AdAway correctly, I'm still seeing ads so doesn't seem to be working for me. Any thoughts?

I had the exact same problem on mine. Using the ZIP from XDA everything looked good (hosts symlink appeared to be present, AdAway was working) but ads were still not blocked. In the end I ran the uninstall script and did the actions manually through ADB (delete system/etc/hosts, create symlink to data/data/hosts) and now it is definitely working. Not sure why the automated way didn't work because it does basically the same thing.

Posted

is there any way to get real root instead of needing to do this?

Posted

I had the exact same problem on mine. Using the ZIP from XDA everything looked good (hosts symlink appeared to be present, AdAway was working) but ads were still not blocked. In the end I ran the uninstall script and did the actions manually through ADB (delete system/etc/hosts, create symlink to data/data/hosts) and now it is definitely working. Not sure why the automated way didn't work because it does basically the same thing.

can you tell me how you did that? same thing happens to me, everything seems good, but ads are not blocked.

Posted

can you tell me how you did that? same thing happens to me, everything seems good, but ads are not blocked.

Assuming you have TWRP installed and a working ADB setup:

- Boot into TWRP
- Mount the System partition
- Connect phone to PC, open command prompt and run "adb shell"
- Enter these commands: "cd /system/etc", "rm hosts" & finally "ln -s /data/data/hosts hosts"
- Reboot, make sure AdAway is still happy and then check for ads

Obviously AdAway needs to be set to use /data/data/hosts for the above to work, and it's a good idea to check it is still working as well. I also made sure that the hosts file was definitely deleted before running the final ADB command, by looking in the TWRP file manager.

Posted (edited)

thanks for the help man, for some reason ads still don't get blocked this way. maybe i did something wrong, i'll try again when i come back home and edit this.

 

edit: i may be missing something but i can't get ads to be blocked like this. i changed adaway to read hosts on system/etc again and i'll just have to keep reactivating adaway every time i reboot

Edited by kunft
Guest Phaellow
Posted

I am having the same problem as kunft... On top of that, I really don't know how to use ADB so I can't try the other solution as suggested.

Posted (edited)

I am having the same problem as kunft... On top of that, I really don't know how to use ADB so I can't try the other solution as suggested.

If you're on Windows, install Minimal ADB & Fastboot, run it to get the command window and then enter the commands as listed.

Edited by PabUK
  • 2 weeks later...
Guest LiNe171
Posted

My adaway isnt working now.. He only worked one time.. I had to flash other country ROM (i had this ROM when adaway worked)

Tryed to flash zip and nothing.. With adb still nothing and my phone isnt one of the protected system..

Guest nhmanas
Posted

I recommend #NoChromo for non-root users. Download on xda

Guest LiNe171
Posted

I recommend #NoChromo for non-root users. Download on xda

I've try AdAway, AdBlockPlus, Lucky Patcher adblocker, L_SPEED AdBlocker when i had root and nothing worked.. Terraclicks.com ads always opening when i acess android games site..

Unrooted phone and etc.. Tried NoChromo and terraclicks still opens.. That ad is so annoying.. Only that crap ad opens..

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.