Want AdBlock on 2.0? Look no further!

Discussion in 'iPod touch Firmware 2.X Jailbreak' started by SkaterGOD/DOOD23, Sep 24, 2008.

  1. SkaterGOD/DOOD23

    SkaterGOD/DOOD23 New Member

    Joined:
    Dec 20, 2007
    Messages:
    686
    Likes Received:
    5
    Device:
    iPod touch
    Now I know "everyone probably knows about this" but I'm going to post it anyway.

    If you're jailbroken, you'll just need to replace your /etc/hosts file with this file:

    http://www.zshare.net/download/18830797ab1732d2/

    NOTE: I am currently working on a new and improved hosts file, it will block practically everything (as you can see, this old host file is 44 kilobytes, the new one (currently) is nearing 800 kilobytes, so you should be excited. For now, I'm having problems because Cydia sources are not refreshing on it, it MAY be an admob problem, I am troubleshooting right now. I will update when it gets released and notify all of you.

    Please Register or Log in to view images



    If you'd like to play around with that ~800 kilobyte file, here it is:
    http://www.[PIRACY.mf].com/download.php?xke5mzy8jth

    [I've already updated it with new ones, I just need to figure out which one(s) is/are preventing Cydia from downloading the database].


    INSTRUCTIONS:

    For Mac/Linux/UNIX users [this will work in Windows if you have PuTTy]:

    1.) Download the hosts file (know where it is, for Mac users if it's on the Desktop, it would be "/Users/<username>/Desktop/hosts", Linux (on Desktop): "/home/<user>/Desktop" <<LINUX AND UNIX USERS, THIS DIRECTORY MAY VARY DEPENDING ON YOUR DESKTOP ENVIRONMENT>> Windows users: I don't know the directory for the Desktop

    Please Register or Log in to view images

    sorry [or how to navigate the darn file system at all (it's that bad

    Please Register or Log in to view images

    )].
    2.) Start up Terminal/log in to your console.
    3.) Find out your iPod/iPhone's IP Address.
    4.) Run this command in Terminal/Console:

    Code:
    ssh root@<IP ADDRESS>
    
    EXAMPLE: ssh root@192.168.1.103
    5.) When prompted for password, the default one is 'alpine' (no '). If you changed it, you should know.
    6.) Open up another shell/log in to another console (this will be for your local file system).
    7.) On the Terminal/Console that you're logged into as root on your iPod as run these commands:

    Code:
    cd /etc/
    mv hosts OLDhosts
    8.) You have now successfully changed the name of your old host file.
    9.) Now upload the new hosts file into this directory by running this command [run this on your local Terminal/Console] (fill in the <>!)

    Code:
    scp <DIRECTORY TO HOSTS FILE> root@<IP ADDRESS>:/etc/
    
    EXAMPLE (MAC): scp /Users/Gabe/Desktop/hosts root@192.168.1.103:/etc/
    
    EXAMPLE (LINUX/UNIX - GNOME environment): scp /home/Gabe/Desktop/hosts root@192.168.1.103:/etc/
    If prompted for any passwords, the default is 'alpine' (no ') and if you changed it, you should know what it is.

    10.) On the SSHed Terminal/Console (the one on the iPod) you can now verify that the file is there by doing this:

    Code:
    cd /etc
    ls | grep hosts
    OPTIONAL: Once in the /etc/ directory, you can run this command to ensure that your hosts file will work (otherwise skip this and check that your output [of ls | grep hosts] is correct [look below]):

    Code:
    chmod 777 /etc/hosts
    Your output should show something similar to this:

    hosts
    OLDhosts


    If this is true, then the file is there.

    11.) You can now run the following command and then go see if it works!

    Code:
    reboot
    If you use my [PIRACY.mf] file, you will certainly get more Ad Sites blocked, but Cydia will not refresh.

    Please Register or Log in to view images



    Enjoy your Ad Free browsing!

    For Windows Users:


    I apologize that I am horrible at Windows. Wait, that's actually a good thing.

    Please Register or Log in to view images



    BSD wins.

    Anyways... What we were basically doing was:

    - Download the hosts file.
    - SSHing to the iPod/iPhone.
    - Renaming the old hosts file (in /etc/) to OLDhosts.
    - Transferring the downloaded hosts file to the iPod in the directory /etc/ [to ensure it will work you can also chmod the file to 777].
    - Reboot the iPod and have AdBlock.

    Please Register or Log in to view images



    P.S. If you have Widnows + PuTTy, it shouldn't be THAT hard to follow along.

    Please Register or Log in to view images

  2. spoonforknife

    spoonforknife Retired Moderator

    Joined:
    Nov 15, 2007
    Messages:
    6,896
    Likes Received:
    317
    WHO ARE DPOONY?
    I ARE DPOONY!
    And Gabe is awesome.

    Please Register or Log in to view images

  3. normanloco

    normanloco New Member

    Joined:
    Dec 24, 2007
    Messages:
    85
    Likes Received:
    0
    Device:
    iPod touch
    I don't know why but the hosts file was detected as a virus on my Windows Vista.
    Care to explain

    Also here are screenies

    Please Register or Log in to view images


    Please Register or Log in to view images

  4. SkaterGOD/DOOD23

    SkaterGOD/DOOD23 New Member

    Joined:
    Dec 20, 2007
    Messages:
    686
    Likes Received:
    5
    Device:
    iPod touch
    O: Hi Dpoony! Sorry I haven't been on the IRC in a while.

    Please Register or Log in to view images



    The hosts file should only block connections from from those servers, not "alert" you of anything.

    Umm... I don't know much about how Windows works (UNIX for life), sorry.

    Please Register or Log in to view images



    Thanks for screenshots by the way.

    (the host file is only text btw, open it up in text editor)
  5. xxhorseriderxxx

    xxhorseriderxxx Banned

    Joined:
    Jan 9, 2008
    Messages:
    544
    Likes Received:
    0
    Device:
    iPod touch
    does this work on 2.1?
  6. SkaterGOD/DOOD23

    SkaterGOD/DOOD23 New Member

    Joined:
    Dec 20, 2007
    Messages:
    686
    Likes Received:
    5
    Device:
    iPod touch
    Yes. The hosts file will work on any firmware.
  7. murphmanny

    murphmanny Banned

    Joined:
    Sep 19, 2007
    Messages:
    5,250
    Likes Received:
    3
    nice
    will do this
    tired right now
    for tomarrow morning
  8. Blaze_Blaster

    Blaze_Blaster Member

    Joined:
    Jan 17, 2008
    Messages:
    557
    Likes Received:
    1
    Device:
    iPod touch
    wait so now we cant update cydia :/
  9. SkaterGOD/DOOD23

    SkaterGOD/DOOD23 New Member

    Joined:
    Dec 20, 2007
    Messages:
    686
    Likes Received:
    5
    Device:
    iPod touch
    Im still working on it... the computer I have the file is on is somewhere else for the weekend, I'm working on it though!
  10. dieselboy27

    dieselboy27 New Member

    Joined:
    Apr 8, 2008
    Messages:
    339
    Likes Received:
    1
    This only kind of works. You can no longer use Categories and some other apps because the application can recognize that admob is installed

    Please Register or Log in to view images

    Maybe in the futures?

Share This Page