I replaced the hosts file in /system/etc and i don't notice any difference at all, all ads are still there. This always worked on my previous phone (HTC Desire).
if I use terminal emulator to ping some addresses in my hosts file I can see it redirects to localhost, but I can still visit the addresses with my browser.
Any idea as to what I might have done wrong? or is it simply not possible to block ads in the stock browser?
It's working fine for me, my Note is rooted and I use adfree to block the ads.
neither adfree nor adaway does anything for mer. Both says they apllied it successfully though (and if I check the hosts file, they did). I still get all ads, it's like the system isn't using the hosts file for some reason.. but when I ping the ad sites with the terminal I can clearly see it redirects to 127.0.0.1 :s
Did you reboot the Note ? Maybe you should root your device again or update superuser.
Envoyé depuis mon GT-N7000 avec Tapatalk
yeah, i have rebooted, cleared all caches, reinstalled both rocket rom and checkrom, nothing works.
A gut feeling tells me that my browser doesn't have read-access to the hosts file for some reason..
Yeah maybe something is wrong with the roms. I'm using the kl8 deodexed by chris x, working fine.
Envoyé depuis mon GT-N7000 avec Tapatalk
figured it out. apparently the default APN provided had a proxy set for no reason. removed it and it now works as it should
Related
Can't update host file on this app. Error is unable to remove /system/etc/host. I've tried to Rm this file by terminal, ADB, and Astro. No go.
Thoughts?
Check the market for an update. I updated it on my phone yesterday and this morning there was another update. Maybe the developer had an issue with the first update.
DatterBoy said:
Can't update host file on this app. Error is unable to remove /system/etc/host. I've tried to Rm this file by terminal, ADB, and Astro. No go.
Thoughts?
Click to expand...
Click to collapse
Did you set the system partition as Read/Write? Instructions found HERE
GMPOWER said:
Did you set the system partition as Read/Write? Instructions found HERE
Click to expand...
Click to collapse
Not necessary when using the Adfree app, I suspect it does it for you, or the hosts file is really not on /system. I've never bothered to look.
I just updated the app on the market and had no problem.. "symlink" option disabled, I select the "BTC IP" but it really doesn't matter in terms of how the file is created.
No ads.
Not sur eif it is me or not, but I think Adfree is not workingon Nooks anymore. I just got a fresh nook from BN and rooted it, added Adfree and it gave me an EOF java error. After changing it to the "Use BTC IP" setting i get the you are now adfree message and sometimes it force quits and sometimes it does not, but the ads in Angry Bords and Wordfeud never go away.
Did this on a couple Nooks and same result. Have also noticed that there have been quite a few Adfree updates over the past week.
I have adfree on my DINC and no issues there whatsoever.
Thoughts?
DatterBoy said:
Not sur eif it is me or not, but I think Adfree is not workingon Nooks anymore. I just got a fresh nook from BN and rooted it, added Adfree and it gave me an EOF java error. After changing it to the "Use BTC IP" setting i get the you are now adfree message and sometimes it force quits and sometimes it does not, but the ads in Angry Bords and Wordfeud never go away.
Did this on a couple Nooks and same result. Have also noticed that there have been quite a few Adfree updates over the past week.
I have adfree on my DINC and no issues there whatsoever.
Thoughts?
Click to expand...
Click to collapse
It's just you or temporary. I've seen the "java EOF" error once when AdFree itself was having trouble downloading the hosts file..
Works fine here.
Ditto here .. works fine even w/o any program updates ...
I resolved the problem but I had to go and get a new history file that was ccreated by merging the lists from several host sites. Not sure why that would have mattered but it did fix the problem.
Is there another ad blocking app that you can use with being rooted? This one is just not working no matter what I do, and emails to the dev have gone unanswered.
NO, unless you block the servers tru a Firewall, you also have to be rooted for AdFree to work. if you are rooted, just download the hosts file and copy it to "/etc/hosts" via adb, root explorer or whatever you like to use.
Do you leave it zipped, or unzip it first before moving it?
edit: Thanks, but that did not work.
Are all ads showing up or just some? If it is just some then the adserver might be missing from the hosts file.
All of them are being shown. That's certainly why I was hoping to find an alternative app. I have been working with this since I rooted and nothing works.
So I often watch TV show episodes on the websites for CBS, ABC, and NBC and just today for the first time I tried doing so while tethering to my phone using the Mobile AP. When I clicked on an episode, however, I received an error telling me, "This video is either unavailable or is being blocked by an ad blocker installed in your browser." The thing is, I definitely don't have an ad blocker installed in my browser; and, when I disconnected from my phone and instead connected directly to my ethernet, the video worked fine right away. I tried it for shows on NBC.com as well as ABC.com and received similar errors all pointing towards Ad Blocking software. Has anyone else ever experienced this or does anyone know the relation between tethering to Mobile AP and an Ad Blocker detection? Any help would be greatly appreciated as I have two laptops and only one ethernet hookup, so I would like to be able to have good internet connected to both at once.
No one huh???
Sent from my SAMSUNG-SGH-I897 using XDA App
Install AdFree Android from the market, then choose revert.
do you have ad-blocking built into your rom? delete (or rename) the "hosts" file in system/etc
TRusselo said:
do you have ad-blocking built into your rom? delete (or rename) the "hosts" file in system/etc
Click to expand...
Click to collapse
Ohhh wow I didn't even realize that ad-blocking came built into ROMs. I just quickly checked in /system/etc and did see the hosts file, opened it up and checked out the text. I tried renaming it but it was read-only, and root explorer wouldn't let me remount as r/w. I guess I'll look into it more tomorrow. But I would imagine I wouldn't want to just straight delete it right, as whatever ads it was blocking would no longer be blocked? I could just rename it any time I encountered errors while tethering to my laptop?
Does reverting through Adfree simply delete that hosts file?
Sent from my SAMSUNG-SGH-I897 using XDA App
if root explorer wouldnt let you mount you might have lost root somehow. re root.
TRusselo said:
if root explorer wouldnt let you mount you might have lost root somehow. re root.
Click to expand...
Click to collapse
I don't think I did. I just updated the su binary and when I reopened root explorer, superuser asked me if I wanted to allow root access to root explorer. I've read that before somewhere of people having trouble remounting within the /system folder. It let's me remount on folders outside /system, just not inside it. I still haven't figured it out. I suppose I could use terminal emulator right?
Sent from my SAMSUNG-SGH-I897 using XDA App
TRusselo said:
do you have ad-blocking built into your rom? delete (or rename) the "hosts" file in system/etc
Click to expand...
Click to collapse
you were exactly right TR. i renamed the hosts file and re-tethered and i no longer received any errors about ad-blocking software. not to say the video is actually working too well tho - just keeps freezing. i guess streaming tv episodes while tethered to your phone isn't the best idea. anyway, thanks man!
*edit
seems like it no longer works with updated youtube apk.
but give it a go anyway
hi guys
this is a simple trick which uses editing of hosts file to block youtube ads. works on KK, CM, AOSP JB etc.
i know alot of people use xposed and adblock and what not to block ads in youtube or use alternative youtube apps
however if you hate using 3rd party programs then this thread is for you.
Requirements*
-rooted phone
- file manager with root access (ie Root explorer, ES, CM file Manager etc)
- either edit hosts file manually or download my hosts file and push it to system/etc
-reboot
copy and paste the following into the hosts file and reboot (please note hosts file has no extension so DO NOT rename it to .txt, or .doc or anything like that, jsut leave it without any extension)
Code:
127.0.0.1 https://googleads.g.doubleclick.net/*
127.0.0.1 https://pubads.g.doubleclick.net/*
127.0.0.1 https://ad.doubleclick.net/*
127.0.0.1 https://s0.2mdn.net/ads/*
127.0.0.1 http://pagead2.googlesyndication.com/pagead/*
127.0.0.1 http://stats.tubemogul.com/stats/*
127.0.0.1 http://pubads.g.doubleclick.net/*
127.0.0.1 http://googleads.g.doubleclick.net/*
127.0.0.1 ##div.video-ads html5-stop-propagation
127.0.0.1 ##div.pyv-afc-ads-inner
127.0.0.1 youtube.com###osd-id
or alternatively
downlaod and push https://mega.co.nz/#!Hsg2iTSI!pCNvYDEtoUQzoDWCGqwKjiSopsUBQLxgWVFet1npir8
this to system/etc
Click to expand...
Click to collapse
or simply install adaway ...
mrassol said:
or simply install adaway ...
Click to expand...
Click to collapse
Or simply read?
i know alot of people use xposed and adblock and what not to block ads in youtube or use alternative youtube apps
however if you hate using 3rd party programs then this thread is for you
Click to expand...
Click to collapse
So you have no problem with 3rd party apps so clearly this thread is not intended for you... Some people do or just want to learn how to do things manually, this is xda DEVELOPERS after all...
Not sure why I'm even bothering to reply to a troll
This is nice
It isnt easily detected from sites when you edit the hosts, nice work!
Sent from my D6503 using XDA Premium 4 mobile app
adamsmth663 said:
hi guys
this is a simple trick which uses editing of hosts file to block youtube ads. works on KK, CM, AOSP JB etc.
i know alot of people use xposed and adblock and what not to block ads in youtube or use alternative youtube apps
however if you hate using 3rd party programs then this thread is for you.
Requirements*
-rooted phone
- file manager with root access (ie Root explorer, ES, CM file Manager etc)
- either edit hosts file manually or download my hosts file and push it to system/etc
-reboot
copy and paste the following into the hosts file and reboot (please note hosts file has no extension so DO NOT rename it to .txt, or .doc or anything like that, jsut leave it without any extension)
Code:
127.0.0.1 #https://googleads.g.doubleclick.net/*
127.0.0.1 #https://pubads.g.doubleclick.net/*
127.0.0.1 #https://ad.doubleclick.net/*
127.0.0.1 #https://s0.2mdn.net/ads/*
127.0.0.1 #http://pagead2.googlesyndication.com/pagead/*
127.0.0.1 #http://stats.tubemogul.com/stats/*
127.0.0.1 #http://pubads.g.doubleclick.net/*
127.0.0.1 #http://googleads.g.doubleclick.net/*
127.0.0.1 ##div.video-ads html5-stop-propagation
127.0.0.1 ##div.pyv-afc-ads-inner
127.0.0.1 youtube.com###osd-id
or alternatively
downlaod and push https://mega.co.nz/#!244n0CTJ!SC3nPlmtmt1i2d4R2z9txPSM6aIYwASihoAqxKorFB8
this to system/etc
Click to expand...
Click to collapse
I went on etc/hosts file on ES File Manager and tried to edit it. Copied this and pasted on it but it won't save. I have root and ES File Manager has root permissions... This is weird.
V4LKyR said:
I went on etc/hosts file on ES File Manager and tried to edit it. Copied this and pasted on it but it won't save. I have root and ES File Manager has root permissions... This is weird.
Click to expand...
Click to collapse
if it wont save then it means you might not have full root, try running the latest easy root again..
adamsmth663 said:
if it wont save then it means you might not have full root, try running the latest easy root again..
Click to expand...
Click to collapse
But Root Checker says I have full root... :laugh: Really weird.
I downloaded host file push to system/etc
And reboot but it looks not working when I try to watch YouTube there still have ad
Do I need to change permission?
Sent from my D6503 using XDA Free mobile app
paullu said:
I downloaded host file push to system/etc
And reboot but it looks not working when I try to watch YouTube there still have ad
Do I need to change permission?
Sent from my D6503 using XDA Free mobile app
Click to expand...
Click to collapse
try removing the # infront of each address listed
if that dosent work
download this host file it has 1000's of adddresses listed
https://mega.co.nz/#!Hsg2iTSI!pCNvYDEtoUQzoDWCGqwKjiSopsUBQLxgWVFet1npir8
try pushing this to system/etc (its 1.3 mb, the old file is 20kb, so you should be able to tell now if it has been pushed to the correct folder)
mrassol said:
or simply install adaway ...
Click to expand...
Click to collapse
adaway doesn't seem to block ads from the updated version of YouTube apk.
I've event tried adding the http listed here in my blacklist in adaway, reboot and still didn't work.
had to open the host list and add this list in manually for it to finally block ads in the YouTube apk.
"#" cannot be read by system. You should remove them from links. Also last entry blocking directly Youtube.com
dilldoe said:
adaway doesn't seem to block ads from the updated version of YouTube apk.
I've event tried adding the http listed here in my blacklist in adaway, reboot and still didn't work.
had to open the host list and add this list in manually for it to finally block ads in the YouTube apk.
Click to expand...
Click to collapse
Does this mean it worked? I've tried using YouTube Adaway (Xposed Module) + Adaway and still had ads in the original YouTube application.
I manually added the hosts to d away black list (since the actual file is too large to edit with all the text editors I've tried) and have gotten a majority of the ads blocked. The problem with adding hosts to the blacklist is that they need to be in the form of just the server name. Including anything else results in adaway complaining about it not being a proper host name.
I don't know how adaway handles these blacklisted host names, meaning I have no clue if it adds a /* to the end, but doesn't blocking just a server result in everything being blocked to begin with ... Since adaway doesn't allow us to add directories after the server we can't really be too specific about what we block..
Therefore I wasn't able to block anything coming from YouTube.com itself or else I'd block the site completely.
It would he a good idea to move your download link to Box for example (Dropbox probably also works but just tested it with Box) so that people with Adaway can copy the Box URL and add it directly to AdAway's Host Sources list so it automatically updates when they press update, so they don't need to always check here to see if any changes were made.
Here's my test link that works, (as far as adding to Hosts Sources in AdAway...whether or not YouTube ads are blocked I've yet to test fully again). It's fine if anyone wants to use this one, but there's no guarantee I'll update the list if the OP updates their list.
Link Deleted
Rebooted and after a bunch of tries, I ended up catching an ad. I'm going to see if I can catch some of the new URLs. Btw, this was with adaway's default hosts sources plus the YouTube hosts you posted as well as the moab list that's posted here on xda (that's a lot of hosts getting blocked...that moab lost is huge and as the name says, Mother Of All Ad Blocking. It does seem to be blocking some of the ads as they seem less frequent but could be placebo.
Edit: Seems like the adaway final merged lost of my goat sources is getting malformed cause after a
PHP:
grep "120.0.0.1 youtube.com###osd-id" /etc/hosts
Nothing is returned. Lemme reboot and see of the updated link I provided fixes the issue after applying the list again...
-----------
Well I unchecked all sources except the YouTube hosts from the Box link and even though it says it successfully applied the changes..it didn't..so off to try other cloud storages...might have to just create a webpage and put it there as I know that works but I don't see why this isn't working.
# when applied only "YouTube.com" gets redirected ..also is duplicate entries and I guess not formatted correctly to automatically import into adaway....
Update: Used logcat and checked the ad URLs and they are correct as listed here. So, I parsed through a little more and found where YouTube was pinging for ads, and then found the code in smali. Pretty sure I've found the ad URL constants and doing a build now where I just set each one to 121.0.0.1 and have it redirect back just as if in the hosts file and leave the rest of the code intact to reduce chances of error.
---------------------
Seems like only ads from googleads.g.doubleclick.net are passing through. Oh, yeah I found another URL to add to the YouTube list to redirect or add to adaway blacklist.
Code:
csi.gstatic.com
Looking at the code, it appears that the app pings a request for an ad and then receives it and passes it on to the actual video playback classes, so the URLs may not even be hard coded. If I could find what framework I'm missing I could look and see, still working on that.
I tried a few variations last night on changing the source, which I can decompile. Tried removing all the ad request calls by just returning void and leaving the methods empty and not removing the actual classes. I could use search and try removing all references to the classes so the entire ad interface is removed but doing so cleanly will take a lot of time.
In the mean time I'll keep adding new URLs as I find them. I just need to figure out the flow more...there's a lot of code. If anyone can decompile the resources .. It would be helpful (or know what framework I'm missing...I need to try again and look at the error log and find out what jar/apk the class is in.
---------------------------------------
Finally got resources to decompile. Stupid apktool mobile is picky about imported framework naming. And I has to import them manually but got it straight .. Anyways can't find any host or proxies in there or URLs .. Time to check the /data folder for YouTube though. Guess I couldn't technically modify the XML there so that the ads aren't visible but that's not what im after right now.
----------------------
The Google Services Framework database contains tables which also contain booleans for controlling ads (both in /data/data and /data/0/user. The googleads.g.doubleclick.net host is also apparently controlled here and looks like the reasoning why this was passing by was due to it being enabled and therefore white listed. Use SQLLite Editor and you'll see what I mean. This has been mostly what I've been looking for. Several other ad switches can be turned on and off here.. Some ads are still fetched by youtube.com/whatever, but I haven't manually added that to my hosts yet as was looking for a way to maybe disable those as well elsewhere. There's a lot in gsf I probably looked right past and missed.
Since when hosts file can block elements? Hosts file can't read anything besides domain name. Guys don't waste your time adding this nonsense to your hosts file. It might even slow down your browsing because it won't read the hosts file and it will wait till it times out. If you wish then download a proper hosts file but don't add these lines manually.
---------- Post added at 06:18 AM ---------- Previous post was at 05:54 AM ----------
MidnightHarvester said:
Some ads are still fetched by youtube.com/whatever, but I haven't manually added that to my hosts yet as was looking for a way to maybe disable those as well elsewhere. There's a lot in gsf I probably looked right past and missed.
Click to expand...
Click to collapse
The easiest way to see all URLs by using your router if you have tomato or ddwrt installed. All you need is enable dnsmasq log and then you can see all urls requests. I didn't spend much time only about 15 minutes but I couldn't block ads using hosts file and I blocked most of the requests using hosts file. Maybe I missed something but anyway give it a go and don't use wildcards, slashes, divs, or http in hosts file. A proper hosts file must look like
127.0.0.1 domain.com
or
127.0.0.1 www.domain.com
Almazick said:
Since when hosts file can block elements? Hosts file can't read anything besides domain name. Guys don't waste your time adding this nonsense to your hosts file. It might even slow down your browsing because it won't read the hosts file and it will wait till it times out. If you wish then download a proper hosts file but don't add these lines manually.
---------- Post added at 06:18 AM ---------- Previous post was at 05:54 AM ----------
The easiest way to see all URLs by using your router if you have tomato or ddwrt installed. All you need is enable dnsmasq log and then you can see all urls requests. I didn't spend much time only about 15 minutes but I couldn't block ads using hosts file and I blocked most of the requests using hosts file. Maybe I missed something but anyway give it a go and don't use wildcards, slashes, divs, or http in hosts file. A proper hosts file must look like
127.0.0.1 domain.com
or
127.0.0.1 www.domain.com
Click to expand...
Click to collapse
Yeah I had to clean this up before even trying.. I have all ads blocked now anyways thankfully. Some ada are manages in Google Play Services and stored in one of the databases in the data file for that, and is most likely white listing these certain domains we can't block. My host file is formatted correctly ..been using them forever before uneven started using them to block ads.
Normal hosts I use blocks most the ads, blocked the g.googleads whatever it is domain via editing the play services database so other APS don't see them, then added my code in the smali eliminating YouTube from even pinging for ad servers...so all good
Thanks for the tips though in sure they'll be useful ')
This procedure works great!
I cannot post links for the moment. Try to search on Google this two keywords: "lolloland youtube"
The first link "TechNote: How to remove video ads from Youtube without ..." is a good procedure to configure your hosts files not to see pre-roll Youtube Ads.
Numerio said:
I cannot post links for the moment. Try to search on Google this two keywords: "lolloland youtube"
The first link "TechNote: How to remove video ads from Youtube without ..." is a good procedure to configure your hosts files not to see pre-roll Youtube Ads.
Click to expand...
Click to collapse
Really does not work I don't get why android's hosts file gets ignored if it is about the Youtube app.
Netflix only shows the red loading circle never plays the video, Hulu buffers then doesn't play the video just shows the time of the video. I tried Youtube thats fine, HBO Go is fine, Amazon Video works, these are the only two culprits that aren't working.....anybody know why? Please, and Thank you......
RighteousJoe said:
Netflix only shows the red loading circle never plays the video, Hulu buffers then doesn't play the video just shows the time of the video. I tried Youtube thats fine, HBO Go is fine, Amazon Video works, these are the only two culprits that aren't working.....anybody know why? Please, and Thank you......
Click to expand...
Click to collapse
assuming you're using a SM-N920T, i believe this issue is resolved using Arter97's kernel. his kernels have been very stable with the Note 5. hope it works for you.
Thanks, will try.
Nope didn't work problem still persists.
RighteousJoe said:
Nope didn't work problem still persists.
Click to expand...
Click to collapse
sorry to read this... what ROM are you using? did you also rename the /system/lib/liboemcrypto.so file? i've read that this file impacts streaming services as well.
cortez.i said:
sorry to read this... what ROM are you using? did you also rename the /system/lib/liboemcrypto.so file? i've read that this file impacts streaming services as well.
Click to expand...
Click to collapse
Im just using the stock rom that's rooted, and the stock modified kernel. what do you mean about renaming that particular file, and I'm sorry to be a pain, but where would I find that file and what would I use to accomplish it, would es file explorer do the trick?Thank you.
RighteousJoe said:
Im just using the stock rom that's rooted, and the stock modified kernel. what do you mean about renaming that particular file, and I'm sorry to be a pain, but where would I find that file and what would I use to accomplish it, would es file explorer do the trick?Thank you.
Click to expand...
Click to collapse
no worries bro... since i don't know your experience with Android and making these kinds of tweaks, make a nandroid/backup using TWRP or Philz recovery. you want to be able to recover in case there's an issue. the liboemcrypto.so file is located in the path/folder i listed: /system/lib/. and yes, you can use ES File Explorer as long as it has Root access to the /system folder. (i use a paid app called Root Explorer. in my opinion, it's easier to work with and has the same functionality as ES File Explorer, minus the pretty UI.) With ES File Explorer you'll be prompted by SuperSU to grant Root privileges (access) when trying to rename a file in the /system folder. once you have access, find the file /system/lib/liboemcrypto.so and rename to /system/lib/liboemcrypto.so.bak. you would reboot your device and then see if this fixed the issue.
Greatly appreciated.
I've got this problem on my Sprint phone and the rename of that file fixes netflix, not sure about Hulu. I'm having problems with Google movies not working...
Sent from my SM-N920P using Tapatalk
I had the same problem with my rooted SM-N920I. rooted with spacex V0.1. Netfix and Google Movie was not streaming. Renaming liboemcrypto.so to liboemcrypto.so.bak ( located in /system/lib) fixed Netflix. Google movie is still broken
Bump
I've tried to both delete and rename this file using two different file managers and I get an error both times.
You need an older version of Netflix. I'm using 3.7.1 build 1711. I haven't used hulu do not site on that one.
Sent from my SM-N920I using Tapatalk
If you cannot delete liboemcrypt
You cannot delete file because files stem is mounted in read only mode.
You need go to a terminal emulator. Then:
su -
mount -o remount,rw /system
rm path_to_file
mount -o remount,ro /system
Become a member of the world famous