yashsingh1/xdaforums huggingface dataset:
[G1 Apps and Games] SiNJiN76:
Okay...so after many wipes...installs of multiple roms...a wipe of the delvik cache...

I no longer have Adfree installed. I get ads in the browser....but the ads in the apps that i previously used don't show ads. ??? confused ??? :confused:

Don't get me wrong...it's a good thing...but wondering why? Does it have something to do with the information stored in my SD card?
[G1 Apps and Games] Chahk:
The app itself doesn't block the ads. All it does is download a fresh copy of "hosts" file from the author's server to /system/etc/ directory on your phone. This hosts file has a list of addresses that are considered "bad" and re-directs them to a bogus page (127.0.0.1, for example). When Android OS reads this hosts file every time it tries to resolve an internet address, and if that address happens to be on the "bad" list, it just displays the error you saw instead of the ad. Here is more info on the hosts file.

All you had to do was either use the app's "Revert" button, or simply re-flash your current ROM to get the original hosts file back. The apps where ads are still blocked are probably using cached data. I suggest clearing it out via Menu -> Settings -> Applications -> Manage applications, and then under the ones you need use the "Clear cache" button.
[G1 Apps and Games] prophetic:
I upgraded my ROM from CM 4.2.13 to 4.2.14.1, and in the transition my Adfree seems to have stopped blocking ads. I tried checking for an updated hosts file, but it said mine was up to date. I also tried uninstalling the app, reinstalling it, then rebooting. That was a no go, too. Can anyone help me get this app working again? Thanks.
[G1 Apps and Games] bubbleflubber:
Extra hostnames to add

Here are 2 other hostnames to add to everyone's blocklist.

ads1.msads.net

core.ringleaderdigital.com

MSN Ad service used on mobile version of MSN pages, along with Ringleader Digital core ad service, also utilized by mobile MSN.
[G1 Apps and Games] Chahk:
When you install a new version of any ROM, it overwrites parts of the /system partition, including the hosts file. I guess the check for updated entries on the server gets confused when this happens. You should perform the update regardless.
[G1 Apps and Games] SiNJiN76:
Is there a way to stop getting the 'data connectivity problem' message to not appear when an ad is blocked? I tried unchecking the security messages in settings, but that didn't do it.

Also, I've asked about this on page 23, but I would prefer to use the BTC option (it doesn't display the green android when blocking ads), but it seems to hang the browser...I see the loading status at about 95% and it just stays there and keeps loading.
[G1 Apps and Games] TeeJay3800:
Is there any update on this? I really like hpHosts and would like to use it on my phone.
[G1 Apps and Games] TeeJay3800:
Is anyone else not getting updates in AdFree? It's been over a month since I received an update, and even though MVPS was updated yesterday, it still says no updates are available. I think something is wrong with it. Any ideas?
[G1 Apps and Games] Chahk:
Update the definitions anyway.
[G1 Apps and Games] TeeJay3800:
I know how to do that in Windows, but not in Android. How do you do it manually?
[G1 Apps and Games] malaeus:
bleargh i thought adfree did this nicely. when i have the java iO exception i just turn off wifi.
[G1 Apps and Games] madamson86:
Does not seam to block ads within my apps

I am not sure if I am doing something wrong but on Chompsms and Music Junk the adds are still displaying. Is there something that I have not done? I have checked for the latest updates and it says everything is fine.

Cheers

Miuke
[G1 Apps and Games] Chahk:
I meant via the app. Even though it tells you that you're up to date, you can still hit the "Download and Install Hosts" button and it will do that.
[G1 Apps and Games] TeeJay3800:
Ah, gotcha. Thanks!

I asked this a while back, but I'll try again. Is it possible to tell AdFree to use other sources for the hosts file? hpHosts is very popular for Windows, so I'd like to use it on my phone as well.
[G1 Apps and Games] stonedraider:
I got a problem with the adfree-app: Yesterday i wiped my phone and flashed the newest CM build... Everything smooth, but adfree doesn't work anymore. It installs the hosts-file successfully, but not a single ad in any app disappears. Also a reboot doesn't help. :(
[G1 Apps and Games] phaelox:
If you started apps before letting adfree install the new hosts file, then ads may be cached on your device. Try clearing the android browser cache, maybe they're cached there...:confused:
[G1 Apps and Games] nck4857:
I just flashed the latest 2.1 from Sprint on my hero and I'm not getting any ads blocked anymore.. Any suggestions???
[G1 Apps and Games] nck4857:
well I got it working, just had to redo the download..

Sent from my HERO200 using the XDA mobile application powered by Tapatalk
[G1 Apps and Games] Chahk:
You have to run the app and re-download the hosts file every time you flash a new ROM.
[G1 Apps and Games] loblaw:
So the results of installing AdFree and pushing hosts.txt to /system/etc (or is it to /etc/hosts?) are basically the same?
[G1 Apps and Games] phaelox:
Yes, with the exception that pushing my hosts file will protect against more admob servers, as well as tapjoy and a few mobile analytics servers such as flurry. You decide which is better.

/system/etc/hosts

/etc/hosts

...are both the same file, because /etc is a symlink to /system/etc.
[G1 Apps and Games] loblaw:
Understood. Thanks!
[G1 Apps and Games] loblaw:
Hm, I've just got two more questions:

1) Pushing hosts.txt to /system/etc will copy the same hosts.txt to /etc/hosts (and the other around)?

2)

C:\Users\[...]\>adb pull /system/etc/hosts.txt C:\Users\[...]\Desktop
remote object '/system/etc/hosts.txt' does not exist

C:\Users\[...]>adb pull /system/etc/hosts C:\Users\[...]\Desktop
1 KB/s (25 bytes in 0.015s)

How come the hosts-file to be pushed is a TXT-file and the one in /system/etc or /etc/hosts has no ending at all?
[G1 Apps and Games] phaelox:
1) if you push to /etc/hosts you are in effect pushing to /system/etc/hosts. It's not a copy, it's physically the same file. Have a look here for more info on how symbolic links work. (The hosts file is not a symlink, the path /etc is one pointing to a directory).

2) You need to push, not pull, because push sends to your device, while pull receives from your device. The file "hosts" indeed has no extension, but with the push command you can specify an input and output file, like this:

assuming the file you want to put on your device is named hosts.txt...

adb push hosts.txt /etc/hosts

That will send the file to your device and simultaneously overwrite the file /etc/hosts, thereby replacing it.
[G1 Apps and Games] loblaw:
Yeah, I know. I just wanted to pull the current hosts-file to see its contents. :cool: Anyhow, thank you for your answers!
[G1 Apps and Games] Chahk:
adb pull /etc/hosts c:\hosts.txt
[G1 Apps and Games] loblaw:
Just noticed that the app Apex Uninstaller have found out that I've modified the hosts-file, so now I get an error message each time I start the app saying: "We dont support 'AdFree' users!! Please revert and uninstall Adfree, or buy our ad-free premium app. Thank you". Darn! :p
[G1 Apps and Games] phaelox:
I noticed that too! Plenty of other uninstallers/app managers available though :-)

Sent from my HTC Hero using the XDA mobile application powered by Tapatalk
[G1 Apps and Games] Chahk:
I had a good laugh over this. Who do these guys think they are, Apple? I just had to install it just to comment on the Market. Also, have you seen their support site? What a joke!
[G1 Apps and Games] phaelox:
Haha, nice one. Looks like they upset quite a few users with their decision to block AdFree users. Check out the Market comments via AppBrain.

On the other hand, they're probably not really losing out, as those who stop using it over this never saw the ads anyway.

And everyone talking about them because of the block are providing free advertising (as we are doing now). Lots of people with non-rooted phones and consequently not using AdFree, might be tempted to give the app a try after all the commotion. (Don't by the way. :p Just get one of the 100s of alternative; Search market for "uninstaller")
[G1 Apps and Games] loblaw:
Lol, specially since they promote their app for root users, because of batch uninstall. They really "are not fit to be part of the rooted community", as a wise man put it. ;)
[G1 Apps and Games] phaelox:
I've posted an updated hosts file. The new Photobucket app's ads were still showing. I hope this takes care of that.

See new thread in Hero General forum:

Block ads on your Android phone (2010-04-15)
[G1 Apps and Games] eadred:
I have a problem with your app. I am running CaNNon202 Eclair ROM on my HTC Magic. If I try to update adfree, I get the following message: Error Failed to replace your hosts file. Error message:

And that's all. Is there anything I can do?
[G1 Apps and Games] TeeJay3800:
Have you installed Firerat's hosts patch? See the link in my sig if you need it.
[G1 Apps and Games] minijoe:
function to disable app

A function to disable block dunction would be good for testing some apps like sipdroid
[G1 Apps and Games] Chahk:
It's already there - it's called the "Revert" button.
[G1 Apps and Games] datajosh:
I haven't been getting updates on AdFree for a while so I decided to investigate it today and it won't update at all. I even deleted the hosts file and had it redownload and the hosts file shows the last update as 2/27. If I manually check the link from earlier in the thread I see it was just updated today. Anyone know what might be going wrong here?
[G1 Apps and Games] phaelox:
Simple, there have been no updates. Check this thread instead:

Block ads on your Android phone (2010-04-15)

As posted in that thread, any new ads popping up in apps/web, report them there and I'll update the hosts file.
[G1 Apps and Games] 1024k:
Get error with Weather forecast widget on G1 superd :

http://www.cyrket.com/p/android/org.koxx.forecast_weather.v2/

someone know how to solve?

Thanks
[G1 Apps and Games] SimonTuffGuy:
Anyone have this working for the Incredible yet? I get am error when trying to update the hosts file. Am rooted with instructions from the board here. :)
[G1 Apps and Games] turboyo:
Love the app have it on my g1.. Hoping you get it working on the Slide.. I know there lots of new phones out there now so.. The slide reboots after second attempt at d/l install host, first attempt give error
[G1 Apps and Games] androidworkz:
interesting that you post this on a developers forum... I was wondering why my ad views had dropped so dramatically until one of my users pointed out this app... I have made a complaint... :mad: thx for screwing over developers of free apps...
[G1 Apps and Games] InsightGoalie:
I'm having problems with AdFree and the help/FAQ sends me to this thread. When I go into AdFree it says there are new hosts and tells me to download them. When I hit download and install hosts I get this error:

java.io.FileNotFoundException: /sdcard/hosts

I have a Nexus One with CM 5.0.8. Any ideas? I was able to manually go through adb and move the hosts file from the website adfree uses and get that to work but, the app is far more convenient.
[G1 Apps and Games] corenojc:
flash issues

I am having some trouble and was hoping you could help. Ever since I downloaded the Adfree android app I cannot watch flash videos on many sites for example ESPN.com. i deleted the app and the problem remains. this is a huge problem. I love the basic idea of this app but I also want to see the videos. Can I do something to make them work and keep the app?
[G1 Apps and Games] beav_35:
Basically all that Adfree does is replaces the hosts file (/system/etc/hosts) on your device. You should be able to use adb to edit it like this:

http://xdaforums.com/showpost.php?p=6218480&postcount=8

and remove the sites if you can find out which ones they are. You could also just push back the original file from your ROM update.zip.
[G1 Apps and Games] jamesking420:
Hi,

At present the ads in Tweetcaster are not blocked. Is there anything that can be done about this?

Thanks!
[G1 Apps and Games] Jon8RFC:
Any chance that AdFree could have the option to specify a custom URL for grabbing the hosts file?
[G1 Apps and Games] androidworkz:
I see this app was removed from the market for violating the developer terms no doubt. I wonder how many other developers of ad supported apps complained besides me.
[G1 Apps and Games] jamesd86:
must have just been pulled...i downloaded it this morning o.O
[G1 Apps and Games] androidworkz:
I would have less of a problem with it if I hadn't seen a direct impact from it's release on the market. I am a self employed developer and have invested time and money in android development. The ads I was using use next to no bandwidth because it pulls less than 100 characters of text every 45-60 seconds or whatever and doesn't slow the app down at all. The day this app was released I started seeing a drop in ad views/clicks... it's not all this app... some ROMS block the ads as well (especially ones released recently). I know that some of you will say I am whiny or whatever... but let me come to your job and take a chunk of your check and see how much you whine. I don't make a ton from the Android apps yet... but it all adds up and even $100/month difference sucks. $100 pays my electric bill.

And... for the record. The release of this app on the market was a violation of the developer terms... because they say that no app can interfere with other applications and specifically can't block ads.

From the content policy
[G1 Apps and Games] tsnow247:
Please update this app to work with the mytouch slide. Thanks.
[G1 Apps and Games] dcheek4404:
adfree no longer updates?

notifies me of new update, when I try to download get message:

failed to remount system partition as read-write

???

used adb to get new hosts, works fine

rooted g1 running stock donut theme
[G1 Apps and Games] jamesd86:
Make your apps good enough to be bought and don't depend on adverts for money? Google could kill adsense program at any time, what would you do for money then?

Also, i don't see where adfree violates any of those terms. it does not affect your app. it affects your ads, it does not stop your application from running in any way, unless your application strictly views adverts(which would be the most pointless app ever, IMO.)

Want to go down the violation route, your apps violate the rules because showing advertisements interferes with this applications purpose, blocking adverts.

/rant.

everything is my opinion, we all have them.
[G1 Apps and Games] endolith:
AdFree says "Please wait while I determine..." and then does nothing. I'm guessing it's trying to access bigtincan.com, which doesn't respond in my browser, either.

Firefox can't find the server at www.bigtincan.com.

I changed my redirect to "BTC IP", because I didn't know what that meant, and now that I've realized it's probably going to bigtincan.com, which doesn't respond, so the app won't respond, so I can't change it back! This also might explain why my browser no longer works...

...

Oh wait, if I do "less /system/etc/hosts" every line starts with 127.0.0.1, so there shouldn't be any such problem...
[G1 Apps and Games] jamesd86:
Not sure why everyone is having a problem with this, I've flashed and reflashed a few roms since Monday and Adfree is one of the first things I install...and it always connects and always works.
[G1 Apps and Games] endolith:
The website's back up, the app now works, and my browser problem had nothing to do with it. The app should not depend on resolving a website, though. It should allow you to change the settings without it.
[G1 Apps and Games] chrisram88:
I was going to update some host names and it said the app was to old or something yet I can't update it thru the market. Any thoughts?
[G1 Apps and Games] Neejay:
I just got the same thing this morning.
[G1 Apps and Games] hagthor:
no problem

It still works. Here's what you do...

Install it, set the date on the phone back a few days, run the program, then reset your date to normal. It just updates your hosts file. You can uninstall if you want. your hosts file should stay intact. You can also update it manually. I recommend making a copy of hosts and saving on the SD just incase and for editing and updating.

Hope this helps!

p.s. i added my hosts file from today if anyone wants that instead. just unzip!
[G1 Apps and Games] Neejay:
sweet, I changed mine back 1 month and it updated like a charm. Guess this is the last update for a while then....
[G1 Apps and Games] TeeJay3800:
Normally I would sympathize with you, but in this case, I do not. There is so much advertising every where you turn in this world, that I block it whenever I can. I use a comprehensive and frequently updates hosts file on my computer too. I still can't believe that cable TV includes ads during programming, and that many networks air nothing but paid ads all night long. So essentially the consumer is paying to receive advertising! Am I the only one that sees anything wrong with that?

So in summary, if I have the opportunity to block a small percentage of the advertising I'm exposed to on a daily basis, I will.
[G1 Apps and Games] watercool:
Worked great on modaco froyo but not on cm6.0 for me :( just fyi
[G1 Apps and Games] delta_foxtrot2:
It's one of those catch 22's, if you don't check for updates people will whine about needing to do something else to check for updates, and for various reasons not all websites stay up all the time.
[G1 Apps and Games] delta_foxtrot2:
I haven't had time to load CM6 on my magic yet to do testing, but if someone can run 'adb logcat' and send me the errors and I'll try and do something about it.
[G1 Apps and Games] delta_foxtrot2:
I've heard this rant a million times before and I'm still not swayed by it :)

It also blocks tracking, not just ads, and well people can stick their tracking bugs some place else, I don't want to pay for them especially at the cost of mobile data.

Besides, this isn't just a app issue, I coded this app to also block browser ads since I don't want to waste mobile data on them either...
[G1 Apps and Games] delta_foxtrot2:
I just uploaded a new version of AdFree, it uses a symlink to /data/data/hosts instead of writing to /system/etc/hosts, although I was loath to do this since then anything able to write to /data/data/hosts can now modify the hosts file, it seems there was no additional/free space allocated to /system on some phones.
[G1 Apps and Games] Smabbage:
Can you make it where you can choose whether or not you want the symlink?
[G1 Apps and Games] delta_foxtrot2:
Originally I was going to make this optional, I changed my mind initially because I thought this would require less steps during update but on third thoughts I think I'll squeeze a check box in towards the bottom to make this optional, in any case it doesn't seem to work on Incredible handsets, which is what I was aiming to fix with this upgrade any way.
[G1 Apps and Games] Smabbage:
You caught me. I'm one of the Incredible users this isn't working for. :)
[G1 Apps and Games] delta_foxtrot2:
So far no one seems able to send me anything useful to fix this issue.
[G1 Apps and Games] elborak:
There's nothing you can do to fix it. The user has to manually set up a symlink in /system/etc in recovery mode; /system is write-locked (and can't be remounted rw) when booted normally.

So it works fine, but requires a bit of manual setup by the user.
[G1 Apps and Games] delta_foxtrot2:
So how come my app could remove the symlink?
[G1 Apps and Games] Smabbage:
Haven't figured that one out. I know that I can only set up a symlink while in recovery since the nand is locked while the OS is running. Not quite sure why adfree is able to remove the symlink but not establish a new one while the OS is running. Scratching head...
[G1 Apps and Games] elborak:
It can't. I had a manual symlink set up (to a different location) and the app simply failed trying to update. My symlink wasn't removed.
[G1 Apps and Games] delta_foxtrot2:
I've been emailing someone privately and came to the same conclusion, it doesn't appear that it can be set except in recovery mode.

New version is now on the market+slideme that makes the symlink optional. I'll leave it in for the time being but would appreciate to know it if anyone actually has a need for this.
[G1 Apps and Games] Smabbage:
Now that I'm home, this is my experience too. Don't know what has changed but it will not replace the host file that I've set a manual symlink to. Strange. It did two revisions ago...
[G1 Apps and Games] Smabbage:
Latest update put things right. Thanks.
[G1 Apps and Games] wraithdu:
Thanks for the fix for us EVO/Incredible users with locked NAND :)

I noticed one or two things though. I also have rooted Droid, so I never noticed the issue. But after the interim update with the symlink, even after updating to 0.4.8, the symlink to /data/data/hosts remained. Now this is OK, don't change it! Checking for or messing with the symlink (if it exists) could break EVO/Incredible support. However I think you should add a menu command (for NAND unlocked devices) to switch between the modes, otherwise it's a manual process to remove the symlink.

Also a suggestion, when setting up the symlink mode. Make sure the owner/group for /data/data/hosts is root, and

chmod 644 hosts

to deny write access to any user/app without root access. The user now has control via the Superuser app over who can modify /data/data/hosts. That should be just as safe as keeping hosts on the system partition.
[G1 Apps and Games] thephantom007:
problem with addfree app

Hello there, I just update adfree app (big mistake) and sudenly its not working, it keeps telling me that I don't have root, but I do have root my phone, what happened can some 1 explain me what can I do to fixed. Thanks a lot
[G1 Apps and Games] delta_foxtrot2:
It would help if you could tell me what phone you have and what rom you are running etc.
[G1 Apps and Games] delta_foxtrot2:
/data/data/hosts is a file, not a symlink, /system/etc/hosts is the symlink...

There is a checkbox now, which isn't enabled by default, is this what you mean?

The owner should default to root, and while I didn't check the mode, this should default to 644 I'll have to check later to be sure...
[G1 Apps and Games] wraithdu:
Right, which is why I said 'the symlink to /data/data/hosts remained'. The point is, if anyone used a version of AdFree that created that symlink, they are now stuck with it unless they know how to use a terminal to put things back the way they were before.

Not really. Even if you deselect the checkbox, the symlink is not removed. The hosts file remains at /data/data/hosts with the symlink at /system/etc/hosts. Like I said though, don't change that! It would break the EVO/Incredible setup like the previous version of AdFree. That's why I suggested you add a menu function to remove the symlink and move the real hosts file back to /system/etc/hosts. This should be an OPTIONAL step, so us EVO/Incredible users can keep our working setup. Leave the core functionality as it is now, it works perfectly.

I'm not 100% sure either, but I think it might default to chmod 666 actually.
[G1 Apps and Games] delta_foxtrot2:
No, the symlink will be removed now before dumping to /system/etc/hosts...

As per previous posts, it won't break the symlink since /system can't be made read/write except in recovery mode.

I just tested and this, and while the owner/group is root, you are right and it's set to 666, I'll add some additional code to fix this in the next update though.
[G1 Apps and Games] delta_foxtrot2:
Without an adb logcat dump I have no idea what caused this.

I just had this error due to low memory on the phone however, SU crashed preventing the app from getting root.
[G1 Apps and Games] bubbleflubber:
It's telling me the same thing. It says that it "Failure to change permissions of hosts file to root. Error Message"

Memory is fine, and no SU problems with the program.