Jump to content
stringy2010

Getting AdAway working

Recommended Posts

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

  • Upvote 2

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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.
  • Upvote 1

Share this post


Link to post
Share on other sites

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.

  • Upvote 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

  • Upvote 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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