Related
I had this issue, where all apps would run fine, but web pages would freeze. Moreover, this would only happen when using 4G. Unfortunately, the problem is due to adfree replacing the hosts file. I am not sure why, and even more confused why it only affects 4G, but it is definitely the culprit. Currently, the only solution I have is to revert the hosts file and deal with the ads. So what it comes down to, is enjoy 4G in the browser, and have ads, or no ads and no 4G in the browser.
Here is the fix, courtesy of RyteSyde:
Open up adfree and choose custom ip, in the box enter
72.3.232.220
Then let adfree do its thing. That is all it takes to have 4G and no ads. If you appreciate this, give RyteSyde a thank you.
It could be one or several individual entries in your hosts. I don't use adfree but use a hosts file I compile myself and use on my win servers, clients etc. No probs on 3/4g or wireless. Have you tried replacing the hosts yourself...ie without adfree?
RyteSyde said:
It could be one or several individual entries in your hosts. I don't use adfree but use a hosts file I compile myself and use on my win servers, clients etc. No probs on 3/4g or wireless. Have you tried replacing the hosts yourself...ie without adfree?
Click to expand...
Click to collapse
I tried with some old hosts files I had, but still had issues. Could I trouble you to upload your hosts file? Thank you
cloverdale said:
I tried with some old hosts files I had, but still had issues. Could I trouble you to upload your hosts file? Thank you
Click to expand...
Click to collapse
Sure thing. Here's a zip with the hosts in unix and win formats. You can remove/add to the list but if you make changes to the unix list be sure to convert it back to unix format after saving so the carraige returns are correct. I use dos2unix for that. Also, if you open the unix in notepad they will all run together, but wordpad will line item them.
RyteSyde said:
Sure thing. Here's a zip with the hosts in unix and win formats. You can remove/add to the list but if you make changes to the unix list be sure to convert it back to unix format after saving so the carraige returns are correct. I use dos2unix for that. Also, if you open the unix in notepad they will all run together, but wordpad will line item them.
Click to expand...
Click to collapse
I appreciate it, thanks. (I run Linux, so format should not be an issue, but thanks for the warning).
also just in case anyone else reads this...
To copy the hosts yourself, though there are several ways, put the unix hosts file on you sd card. I typically just email it to myself since I'll get it right away via exchange and I don't have to USB the phone. Then I save the att to the sd card. From there I use root explorer and Mount R/W mode and navigate to the hosts file on the sd card and copy the hosts file. Then navigate to the /etc folder on the phone and paste the hosts file. If you only have the original hosts there is ony one line in it (127.0.0.1 localhost) so it's not super important to backup the original (I don't). You can always rename the original to hostsX or the like if you wish.
After you've copied it, reboot the phone and you're good to go.
The win version goes in windows\system32\drivers\etc and there's no need to reboot. Just do a command prompt "ipconfig /flushdns" and then "nbtstat -R" to clear the cache. The win hosts can also be merged with your current one with notepad or your flavor of text editor.
This will block a large majority of the ads out there on sites like drudge etc.
HTH
cloverdale said:
I appreciate it, thanks. (I run Linux, so format should not be an issue, but thanks for the warning).
Click to expand...
Click to collapse
Hey CD, just checking in to see if you've been able to resolve you 4g issue. Alls well?
RyteSyde said:
Hey CD, just checking in to see if you've been able to resolve you 4g issue. Alls well?
Click to expand...
Click to collapse
Unfortunately no, when I pushed your host file, my phone started boot looping. I did nothing else, just pushed the file, then rebooted. I am really confused by this, as it would have worked fine with my G1. I need to investigate further.
well that's really strange. Perhaps dos2unix didn't do it's job properly or something. Can you open the unix hosts file on your linux box, save it and then try?
Strange it's boot looping because hosts is pretty low on the resolution stack and should just bypass if it can't read/find a hosts and move on to DNS resolution.
RyteSyde said:
well that's really strange. Perhaps dos2unix didn't do it's job properly or something. Can you open the unix hosts file on your linux box, save it and then try?
Strange it's boot looping because hosts is pretty low on the resolution stack and should just bypass if it can't read/find a hosts and move on to DNS resolution.
Click to expand...
Click to collapse
That is what I was thinking. I will give it another shot after work tonight.
I got the same problem loading pages on 4G through the browser while using adfree. So I switched to Dolphin browser and that took care of it. That is a temp fix for now I guess but honestly Dolphin is a better browser to me anyway.
cloverdale said:
That is what I was thinking. I will give it another shot after work tonight.
Click to expand...
Click to collapse
I've confirmed this issue on my device as well and I'm about 99% sure I've confirmed what is causing it and it's not the structure or corruption of the hosts file but it has to do with it. Will post back when I have the update.
Okay got the fix for this. Sorry it took so long but my 4G at the moment won't hold a signal so I got in the truck, braved the 25degree temps and went and parked right next to my closest 4G tower so I could hold a signal and finally confirm this. It's not really a fix per-se, rather a correction. What AdFree does is use 127.0.0.1 to redirect domains away from their correct IP's. That's nothing new. When I modify hosts files, I never use 127.0.0.1 because it is an internal loopback designation. Will it work, yes but if 127.0.0.1 does not run a web server, your returns *can* be much slower vs. an actual web server that returns an immediate response, even if that response is "page not found" etc. Compare that to a simple wait for timeout for no response. So, for my setup here I have a domain controller, web/dns server etc. and all of my hosts files point to that server's LAN IP. Result...no ads (or very very few until I add them to the list) and pages are very fast to load. Actually, I just use the hosts file on the server and use that server as my primary DNS everywhere else so I don't have to update the hosts on multiple machines.
Obviously on the phone, it's not able to see my server's IP so I modified the hosts I uploaded to use 127.0.0.1, because we weren't having issues with timeouts. The problem comes with 4G and it's got to be because the 4G is going through a proxy server I'm not aware of yet (haven't investigated further) and when it tries to return back to 127.0.0.1, that is no longer *your* NIC. That's why some pages will load and others won't. If a page has content derived from any source that's listed in the hosts file, it will try to wait for the timeout before moving on to the remainder of the code. If you hit a page that doesn't have any references to anything in the hosts file, it'll load just fine.
So, the resolution is to modify the IP used in the hosts file. I decided to load up sprint.com and see what speeds I got from various derivatives and for *me* the fastest one was now.sprint.com, which resolves to 72.3.232.220. I replaced all of the 127.0.0.1 entries with 72.3.232.220 except for the first localhost, leaving that 127.0.0.1 and put that on the SD card. I went to the tower, fiddled around making sure it was doing the same thing and then loaded this hosts file. (FYI you don't need to reboot after replacing it). Now all the pages load like you'd expect.
So, I hope that drawn out explanation helps you and others. You can use really any IP you want for the hosts resolver, just try to make sure it's an actual web server to avoid the timeouts.
I'm uploading the hosts with the now.sprint.com IP for you and all to use. Let me know if it fixes your problem as it did mine.
Ryte
RyteSyde said:
Okay got the fix for this. Sorry it took so long but my 4G at the moment won't hold a signal so I got in the truck, braved the 25degree temps and went and parked right next to my closest 4G tower so I could hold a signal and finally confirm this. It's not really a fix per-se, rather a correction. What AdFree does is use 127.0.0.1 to redirect domains away from their correct IP's. That's nothing new. When I modify hosts files, I never use 127.0.0.1 because it is an internal loopback designation. Will it work, yes but if 127.0.0.1 does not run a web server, your returns *can* be much slower vs. an actual web server that returns an immediate response, even if that response is "page not found" etc. Compare that to a simple wait for timeout for no response. So, for my setup here I have a domain controller, web/dns server etc. and all of my hosts files point to that server's LAN IP. Result...no ads (or very very few until I add them to the list) and pages are very fast to load. Actually, I just use the hosts file on the server and use that server as my primary DNS everywhere else so I don't have to update the hosts on multiple machines.
Obviously on the phone, it's not able to see my server's IP so I modified the hosts I uploaded to use 127.0.0.1, because we weren't having issues with timeouts. The problem comes with 4G and it's got to be because the 4G is going through a proxy server I'm not aware of yet (haven't investigated further) and when it tries to return back to 127.0.0.1, that is no longer *your* NIC. That's why some pages will load and others won't. If a page has content derived from any source that's listed in the hosts file, it will try to wait for the timeout before moving on to the remainder of the code. If you hit a page that doesn't have any references to anything in the hosts file, it'll load just fine.
So, the resolution is to modify the IP used in the hosts file. I decided to load up sprint.com and see what speeds I got from various derivatives and for *me* the fastest one was now.sprint.com, which resolves to 72.3.232.220. I replaced all of the 127.0.0.1 entries with 72.3.232.220 except for the first localhost, leaving that 127.0.0.1 and put that on the SD card. I went to the tower, fiddled around making sure it was doing the same thing and then loaded this hosts file. (FYI you don't need to reboot after replacing it). Now all the pages load like you'd expect.
So, I hope that drawn out explanation helps you and others. You can use really any IP you want for the hosts resolver, just try to make sure it's an actual web server to avoid the timeouts.
I'm uploading the hosts with the now.sprint.com IP for you and all to use. Let me know if it fixes your problem as it did mine.
Ryte
Click to expand...
Click to collapse
Your idea worked perfectly. Rather than push the file, I was lazy and had adfree use the ip you gave, instead of 127.0.0.1, and everything works. Thank you very much.
cloverdale said:
Your idea worked perfectly. Rather than push the file, I was lazy and had adfree use the ip you gave, instead of 127.0.0.1, and everything works. Thank you very much.
Click to expand...
Click to collapse
My pleasure. I haven't used AdFree so didn't know it had the option to do that. Glad it worked for you.
RyteSyde said:
My pleasure. I haven't used AdFree so didn't know it had the option to do that. Glad it worked for you.
Click to expand...
Click to collapse
I know my Linux, but am fairly ignorant when it comes to networks. I really appreciate the help.
On the topic of adfree, I like to use it since it updates the hosts file with no effort on my part. I realize it is just downloading a list, then concatenating to the hosts file, but it is just one less thing I need to worry about.
I am a mathematician, so if that can ever be of help to you, please let me know.
cloverdale said:
Your idea worked perfectly. Rather than push the file, I was lazy and had adfree use the ip you gave, instead of 127.0.0.1, and everything works. Thank you very much.
Click to expand...
Click to collapse
This worked for me as well
Worked for me as well. Used adfree to push out the new IP.
Thanks, cloverdale and RyteSyde! Running Vin's Plutonium with cooked hosts file and this I needed this information. Wish I knew what makes me in the minority that needs a different IP, though.
solver404 said:
Thanks, cloverdale and RyteSyde! Running Vin's Plutonium with cooked hosts file and this I needed this information. Wish I knew what makes me in the minority that needs a different IP, though.
Click to expand...
Click to collapse
Glad this thread helped someone else. No ads makes such a difference.
AdFree was great.. thanks for all the fish and whatnot
however I have abandoned it in favor of the much more versatile, open source:
AdAway
Code:
http://code.google.com/p/ad-away
http://www.mediafire.com/?ntn284cyk5n52cf {1.07}
sadly the more recent builds seem to be only available in the market. find a friend willing to liberate it via dropbox or S3 [obviously not an eye patch crowd activity, GPL v3]
Added functionality of AdAway vs AdFree
+ select multiple sources of maintained HOSTS
+ white list
+ black list
+ user list
* also symlink
+ add host by scanning QR
CONS:
- downloads are concatenated and conformed in the foreground each update
- no loopback app to fix broken rendering ** although several suggestions stewing
PROS:
+ very clean UI
+ lightweight
+ only two permissions, essentials
+ ideology agnostic
both require root/SU
plays well with:
Droid X, CyanoGenmod 7, nightlies
Droid X, froyo OTA rooted
Droid X, froyo SBF rooted
Droid X, GB OTA rooted
if rooted please also consider adding to the security mix:
LBE Privacy Guard
Droid Wall
Permissions Denied
While there are builds of DroidWall in F-droid ( F-droid.org ) that repository is a little slow to update current builds from the google code project.
I would like a forensic type utility to simplify nailing down wayward ads hosts as Shark for droid is a bit cumbersome. But this is a great way to block the malware functions of TextPlus, Pinger, HeyWire et al... until there is a sensible client for alternatives to the cashcow of carrier sms (other than the awesomeness of jabber [xmpp]) ... appx $30 billion by verizon in 2007.
I only hang onto SMS for a few people. Everyone else I have 'sold' on dumping SMS (text messaging) for the huge improvement of jabber [xmpp]. For almost every phone using a jabber app is EXACTLY the same number of keystrokes (button mashes) from start to send as texting (SMS) is!! Encrypting jabber is much less arduous.
jappix.com
core.im
chatme.im
hot-chilli.net
jabber.org
excellent android jabber clients
yaxim
xabber
Stupid question but I can't find an answer anywhere.
Is it necessary to switch the webserver on in adaway for it to block adverts, or is that extra functionality which enables me to handle the blocked requests in a bespoke way if I so choose?
Thanks,
Jim
Thanks for the review on my app
@jimwo[email protected]:
The webserver is only an extra, you don't have to enable it!
Some apps refuse to work when the server that serve ads are not
reachable. In this case you can enable the local webserver to answer
these requests without serving real ads.
works great thanks for your work
When I rooted (straight out the box ) my Acer Iconia A501 installed Harkon firmware Ad-Free refused to to install the hosts file.. so Ive found Ad-Away that has worked.. although always had thought that Ad-Free must be better...
Now I run Taboonay 2.2 with Ad-Free having stumbled upon this thread I tried too get Ad-Away to install its hosts file.. of cource I reverted to stock with Ad-Free before installing hosts with Ad-Away.
Now the problem is the other way around Ad-Away says it has installed all fine... I reboot device checked the hosts file to find it empty... Ive tried numerous times..
Now im running the hosts installed with Ad-Free...
Edit: Fixed typo
Works much better than AdFree
bcvictory said:
Works much better than AdFree
Click to expand...
Click to collapse
Hmm Ill try to get it running correctly... for some reason it says that the hosts file are updated but when you check with root explorer it stays unchanged..
Ad-Away is now able to install its HOSTS file I see that its only 7XX Kb insize while Ad-Free HOSTS file is 9XX Kb so hencefor should eat more banners... hmmm
RiceDie said:
When I rooted (straight out the box ) my Acer Iconia A501 installed Harkon firmware Ad-Free refused to to install the hosts file.. so Ive found Ad-Away that has worked.. although always had thought that Ad-Free must be better...
Now I run Taboonay 2.2 with Ad-Free having stumbled upon this thread I tried too get Ad-Away to install its hosts file.. of cource I reverted to stock with Ad-Free before installing hosts with Ad-Away.
Now the problem is the other way around Ad-Away says it has installed all fine... I reboot device checked the hosts file to find it empty... Ive tried numerous times..
Now im running the hosts installed with Ad-Free...
Edit: Fixed typo
Click to expand...
Click to collapse
bcvictory said:
Works much better than AdFree
Click to expand...
Click to collapse
With `root explorer` Ive opened HOSTS with a text editor and added to the list next line
127.0.0.1 google-analytics.com as I know such lines could be found on some HOSTS file around the web for the PC's
So far everything is working... I guess this should help me stay incognito from Google some what
The permissions say that it can hold a wakelock. This is only for the option "Check for updates automatically" right? I don't need another wakelock to ruin my battery life...
P.S. I installed AdAway and it gave me an error that it could not modify the /sistem/etc/host file and could not even create a symlink /data/data/hosts... tried AdFree and worked flawlessly ... got to give it credit for Samsung Galaxy Ace compatibility
ybres said:
P.S. I installed AdAway and it gave me an error that it could not modify the /sistem/etc/host file and could not even create a symlink /data/data/hosts... tried AdFree and worked flawlessly ... got to give it credit for Samsung Galaxy Ace compatibility
Click to expand...
Click to collapse
on my galaxy ace is also the problem, only works adfree :\
sti83 said:
on my galaxy ace is also the problem, only works adfree :\
Click to expand...
Click to collapse
Maybe it depends on the ROM you are running...
Sorry for the necro(ish)-post, but I was wondering if running the webserver function in adaway uses an appreciable amount of battery draw over not using it?
running ics 4.0.4 stock (rooted results in trouble with adaway???
tnx
if i'd like to add adfree hosts sources, which urls i need to use?
thanks, great app!
Been using this for a while now, and would just like to say thanks for this. Does the job wonderfully.
I thought maybe someone might like my exported Ad-Away custom list.
This list adds more privacy and better ad blocking on Russian sites. You can of-course delete all the .ru sites if you think there ads/tracking wont ever come across the sites you visit.
I have compiled the list by my statistics, hit count to be precise on my PC in Firefox Ad-Block Plus.
Here are three mirrors of the same file.
http://www.sendspace.com/file/355vmj
http://depositfiles.com/files/r3913fnnv
http://www.2shared.com/file/DlH6FBV3/adaway-export.html
I think adaway is much better than adfree. but you can merge hosts source from adfree to adaway
. edit
When I tether, Adfree blocked the ads on my tethered device too, my laptop, or unrooted tablet, not so with AdAway Am i missing something?
Edited typo.
I can't post in the ICScrewD thread in the Development section yet... Is there a way to disable the AdBlocking?
I just switched to ICScrewD from UnNamed. I use the Medscape medical app for school/work constantly, but ad blocking doesn't allow the app to connect to the internet. Is there a way around this like disabling Ad Blocking all together?
derekbro said:
I can't post in the ICScrewD thread in the Development section yet... Is there a way to disable the AdBlocking?
I just switched to ICScrewD from UnNamed. I use the Medscape medical app for school/work constantly, but ad blocking doesn't allow the app to connect to the internet. Is there a way around this like disabling Ad Blocking all together?
Click to expand...
Click to collapse
Stuff like this is why I believe firmware developers should NEVER use ad blocking by default.
I believe most of them do so by using a custom /system/etc/hosts file. Check to see if yours has anything more than this:
Code:
127.0.0.1 localhost
Just checked mine for giggles and found exactly that... Just
127.0.0.1 localhost
Nothing more. So if it's ad blocking its doing it some other way.
I'm running the latest icscrewed with entropy DD.
Sent from my SGH-I777 using xda premium
Rename host to host.bk for backup restart couple times. Should be good.
Sent from my SAMSUNG-SGH-I777 using xda premium
Thank you, but I'm lost...
Thank you for looking into this for me and posting the replies. I 'm not sure what I'm supposed to do though. I don't know much about this stuff and really just cross my fingers and follow what ever directions I find on these forums.
So using the File Manager that comes with ICScrewD, I went to /system/etc and opened "hosts" with the Text Editor and found "127.0.0.1 local host" and a a bunch of lines starting with "127.0.0.1".
So now I should rename "hosts" to "hosts.bk" and reboot the phone?
Thanks again!
127.0.0.1 is a loopback address known as localhost that refers to the same device that you are using (ie. your phone). What the hosts file on your phone is doing is rerouting any connection attempt to known ad servers to localhost, which then returns nothing and effectively blocks the ads. If the hosts file isn't there (or, alternatively, only contains the line "127.0.0.1 localhost"), then the adblocking feature goes away.
What Haas360 suggested is to rename the file with a different extension so that the operating system doesn't recognize it as being the hosts file anymore. The reboot is probably just to clear the DNS cache. It should achieve your objective.
Thank you
Thank you everyone for the help. I renamed the file like suggested and now Medscape is able to connect to the internet.
Now, a further question since I have learned something today. If I figure out which one of the servers Medscape is using, and delete that line from the host file, could I still block other ad servers and allow Medscape to connect?
I didn't see anything listed containing Medscape and a google searched also turned up nothing.
A quick search through my hosts file turned these up:
127.0.0.1 ads.medscape.com
127.0.0.1 adv.medscape.com
127.0.0.1 as.medscape.com
127.0.0.1 bi.medscape.com
You can try finding and deleting those lines in your hosts file (now hosts.bk I assume), then removing the .bk extension and rebooting. There's no guarantee that this will work since it's possible that there are other strings that don't contain "medscape" that are contributing to the app being blocked, but it's worth a try if you want to keep the adblocking functionality.
Hi all, I've heard this is a helpful community and I've found nothing anywhere else so I thought I'd ask here.
I want to block my phone's access to a website, for productivity reasons. I find myself at work constantly opening a tab to a stupid "funny things on the internet" sites and scrolling through it when I should be paying attention or being productive. On my computer I activated a helpful chrome extension that denied access to specific sites and it works wonderfully, but I can find no such thing for my phone. All I can find is "explicit content" filters as well as an ad-block ap, "Block it!" that I was able to jerry-rig in to blocking the site, but it often caused other problems, like denying any internet access whatsoever.
So is there any other method to just block a single website? A friend mentioned doing something with IP addresses? I'm willing to try pretty much anything, and will root my phone if that is necessary (I've been looking for an excuse to do that anyways!)
Thanks much!
You can download "hosts editor" from play store.
You can block site by adding a new entry:
- IP address: 127.0.0.1
- hosts: addresses of sites that you would block divided by semicolon
Inviato dal mio GT-I9300 utilizzando Tapatalk
Hi all. Not sure if this is exactly the right spot, but I thought I'd try.
So I did the WTF upgrade on my V30+, and after having set everything up, I'm left with a REALLY annoying artifact/feature.
Every time I visit a page on MSN.com or on Reddit.com and scroll down the page to read more, these websites ask me to install their app. I've tried saying no. I've tried saying yes, but then not installing. I've tried cancelling out. I've tried reinstalling Chrome and then tried Chrome Dev. No matter what I do (short of installing the apps, which I did not try), the web pages will continue to suggest that I download the app on EVERY SINGLE PAGE I VISIT ON THEIR SITES.
Suffice to say, I"m really annoyed at this "feature" and was wondering if anyone knows how to either get rid of it or suppress it once and for all. If it doesn't stop, I'm considering changing my default browser to something else.
Firefox Nightly and Brave Browser are two full featured browsers that give you more control of what displays on your screen.
May I suggest Adaway ad blocker for rooted devices?? Your post made no mention if you are using any ad block software!! It looks like a "sponsored" ad, nasty buggers!!:fingers-crossed:
soundgirl101 said:
May I suggest Adaway ad blocker for rooted devices?? Your post made no mention if you are using any ad block software!! It looks like a "sponsored" ad, nasty buggers!!:fingers-crossed:
Click to expand...
Click to collapse
Yep. I have AdAway running.
I also get those when javascript is allowed ...
Use a browser which can disable javascript - such as "Naked Browser",
or use e.g. Firefox with UBlock Origin in +/-"advanced user" mode and disable java scripts globally, then case by case allow them - this should prevent these kind of incidences by default
zacharias.maladroit said:
I also get those when javascript is allowed ...
Use a browser which can disable javascript - such as "Naked Browser",
or use e.g. Firefox with UBlock Origin in +/-"advanced user" mode and disable java scripts globally, then case by case allow them - this should prevent these kind of incidences by default
Click to expand...
Click to collapse
I tried to disable javascript, but that somehow also disabled all of the images on webpages from loading!
my.ads0 said:
I tried to disable javascript, but that somehow also disabled all of the images on webpages from loading!
Click to expand...
Click to collapse
not sure which webbrowser you used - but yeah, the web nowadays is stupid - loading all stuff via external frames, external sites, etc.
you, of course, can circumvent those message via using e.g. reddit app or having it installed (not sure if merely installing it would make that message stop).
Another way would be to load the "desktop version" of the site, in that case, it shouldn't be displayed neither
Maybe I just miss my very out-of-date LG G3 experience where it didn't know how to deal with any of this. Heh.
Thanks for all of the suggestions, folks. I appreciate it. I'll keep playing around with Chrome and alternative browsers to see if there's a way to get it to where I want.