how to: get Adfree Android working on htc Incredible. :)


Last Updated:

  1. jasonb1985

    jasonb1985 Well-Known Member This Topic's Starter

    Joined:
    Jan 5, 2010
    Messages:
    987
    Likes Received:
    67
    i take no credit for this, just found it over on XDA.

    Here's how to get this working

    1. Search for Adfree Android on the market
    2. Install and run
    3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
    3a. Phone may reboot, this is fine, don't worry. if it doesn't reboot, check your SD card for a file simply named "hosts". if it's there, then continue on.
    4. Power off the phone and hold Volume Down and power.
    5. Use volume down to select recovery
    6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
    7. Select "mount /system", "mount /sdcard" and "mount /data"
    8. Plug in your usb cord and open a command line on your pc
    9. enter adb shell and type: cp /sdcard/hosts /data/data/hosts (This copies the AdFree hosts file from the SD Card to the /data partition, where it can be edited by AdFree)
    10. mv /system/etc/hosts /system/etc/hosts.bak (This renames the current hosts file, rather than deleting it, should you ever want to remove AdFree and return to the original hosts file)
    11. ln -s /data/data/hosts /system/etc/hosts (This creates a symbolic link, which allows AdFree to edit the hosts file stored in /data while allowing the OS to use the file as if it were stored in /system. You won't need to reboot into recovery each time you want to update the hosts file!)
    12. Reboot and enjoy.

    EDIT: updated with new method. just did this myself and it works great. it updates on it's own now.

    ANOTHER EDIT: I just had a guy PM me asking "what if the phone doesn't reboot on step 3?"

    it may or may not reboot. bottom line is that we want the "hosts" file to get downloaded from Adfree onto our SD card. so if the phone doesn't do an instant reboot when getting the hosts, just check your SD card for a file named "hosts". if it is there, then you are good to continue on and follow the rest of the steps. let me know if you need any further help. i did it the old way about a week or so ago, and then did it the new way last night so that i could have Adfree automatically update the hosts file on its own. the new method does work flawlessly. :)
     

    Advertisement
  2. opengeo

    opengeo Member

    Joined:
    May 18, 2010
    Messages:
    6
    Likes Received:
    0
    Thanks for forwarding along. I am now ad free!
     
  3. cortland1998

    cortland1998 Well-Known Member

    Joined:
    May 1, 2010
    Messages:
    192
    Likes Received:
    99
    What does ad free mean?
     
  4. ZombiBlanc

    ZombiBlanc Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    130
    Likes Received:
    63
    OMG seriously? OK, it means "to be free from ads." The ones that pop up in ad-driven apps, to be precise.
     
  5. akvtiger

    akvtiger Member

    Joined:
    May 13, 2010
    Messages:
    24
    Likes Received:
    2
    Worked like a charm. Thanks!
     
  6. kevinbakon

    kevinbakon Well-Known Member

    Joined:
    Mar 2, 2010
    Messages:
    216
    Likes Received:
    63
    FYI, before the question is asked, YES, your phone MUST be rooted (as the Market states) . . . I know this first hand
     
  7. Germwise

    Germwise Well-Known Member

    Joined:
    Nov 8, 2009
    Messages:
    406
    Likes Received:
    57
    this seems like something that would hurt the android platform. The reason why we have so many cheap and free apps is that developers are able to cover their costs by allowing small ads at the bottom.

    If you take these away you'll see more paid apps.

    Seems like they aren't very obstructive, why go out of your way to screw developers? If you don't like the ads then don't get the apps.
     
  8. FrozenIpaq

    FrozenIpaq Well-Known Member

    Joined:
    Apr 21, 2010
    Messages:
    153
    Likes Received:
    22
    More or less meant for browser ads if I'm not mistaken (is my reason for installing)
     
  9. Jonamerica

    Jonamerica Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    158
    Likes Received:
    193
    I'd like to suggest changing step 9 and adding a few more steps:

    9. cp /sdcard/hosts /data/data/hosts (This copies the AdFree hosts file from the SD Card to the /data partition, where it can be edited by AdFree)
    10. mv /system/etc/hosts /system/etc/hosts.bak (This renames the current hosts file, rather than deleting it, should you ever want to remove AdFree and return to the original hosts file)
    11. ln -s /data/data/hosts /system/etc/hosts (This creates a symbolic link, which allows AdFree to edit the hosts file stored in /data while allowing the OS to use the file as if it were stored in /system. You won't need to reboot into recovery each time you want to update the hosts file!)
    12. Reboot and enjoy.
     
  10. jasonb1985

    jasonb1985 Well-Known Member This Topic's Starter

    Joined:
    Jan 5, 2010
    Messages:
    987
    Likes Received:
    67
    yea, this is the updated method from XDA. i never edited my post to show this, and i actually haven't done the symlink yet. i still haven't seen one ad yet since doing it originally.

    one of these nights i'll add the symlink and also delete my htc mail apk.

    i will add this to my original post though. thanks.
     
  11. mindleak

    mindleak Member

    Joined:
    Apr 8, 2010
    Messages:
    13
    Likes Received:
    0
    I'd like to add on step 7, you also need to select "mount /data" if you're doing the modified steps, otherwise you'll get an error trying to copy to /data/data

    After that, works great!
     
  12. jasonb1985

    jasonb1985 Well-Known Member This Topic's Starter

    Joined:
    Jan 5, 2010
    Messages:
    987
    Likes Received:
    67

    very true! thanks.
     
  13. jasonb1985

    jasonb1985 Well-Known Member This Topic's Starter

    Joined:
    Jan 5, 2010
    Messages:
    987
    Likes Received:
    67
    edited the OP.
     
  14. Lefort1

    Lefort1 Well-Known Member

    Joined:
    Apr 23, 2010
    Messages:
    266
    Likes Received:
    26
    At first my phone did not reboot on step 3 and didn't create a host file. I found I had to restart my phone after installing AdFree and then attempt to update the hosts file for it to trigger the restart.

    After that, everything went smoothly as described :)
     
  15. ADR6300

    ADR6300 New Member

    Joined:
    May 8, 2010
    Messages:
    3
    Likes Received:
    1
    i Got the hosts file but
    I get cp: can't stat ' /sdcard/host': No such file or directory


    nvm i got, awesome!
     
  16. Neotericpiguy

    Neotericpiguy Member

    Joined:
    Jul 3, 2010
    Messages:
    7
    Likes Received:
    5
    I've upgraded to adfree 0.4.3 and it now gives me an error "Failed to link /data/data/hosts to /system/etc/hosts. Error message:" AND it doesn't download the hosts file to /sdcard/hosts.

    I've resorted to copying the hosts file directly to /system/etc/hosts in order to get adfree to work, but I miss not having to boot into recovery in order to update my /etc/hosts.

    any ideas?
     
  17. delta_foxtrot2

    delta_foxtrot2 New Member

    Joined:
    May 17, 2009
    Messages:
    2
    Likes Received:
    0
    0.4.3 update was specifically trying to address the issue on phones that needed the symlink in the first place, but no one is giving me any suitable information/help to try and fix it.

    What would be helpful is the output of 'adb logcat' while the app is being run.
     
  18. Smabbage

    Smabbage Well-Known Member

    Joined:
    May 1, 2010
    Messages:
    187
    Likes Received:
    24
    If we no longer need the symbolic link, we will need instructions on how to put things back the way they were. :)
     
  19. delta_foxtrot2

    delta_foxtrot2 New Member

    Joined:
    May 17, 2009
    Messages:
    2
    Likes Received:
    0
    It doesn't seem possible to modify the /system partition except in recovery mode on some phones, new version on market+slideme changes the behaviour back to how it was previously.
     
  20. Smabbage

    Smabbage Well-Known Member

    Joined:
    May 1, 2010
    Messages:
    187
    Likes Received:
    24
    Can someone please make their hosts.bak available for download. I inadvertently deleted mine. Would like to revert to the original if needed. Thanks.
     
  21. andreezy

    andreezy Well-Known Member

    Joined:
    May 8, 2010
    Messages:
    221
    Likes Received:
    35
    It should say...



    127.0.0.1 localhost



    that's a default hosts file on my system before adding the adfree. :)

    you could create a new hosts file in your sdk tools directory saying the 127 line shown above and then adb push it over..



     
  22. Smabbage

    Smabbage Well-Known Member

    Joined:
    May 1, 2010
    Messages:
    187
    Likes Received:
    24
    Worth a shot. :)
     
  23. tudmf

    tudmf Well-Known Member

    Joined:
    May 1, 2010
    Messages:
    104
    Likes Received:
    27
    anyone get this working?
     
  24. Jonamerica

    Jonamerica Well-Known Member

    Joined:
    Apr 30, 2010
    Messages:
    158
    Likes Received:
    193
    Yes. You having any particular difficulties?
     
  25. weizilla

    weizilla Active Member

    Joined:
    May 4, 2010
    Messages:
    33
    Likes Received:
    0
    Are we suppose to check the checkbox that says "symlink to /data/data/hosts"? What exactly does that do?
     

Share This Page

Loading...