Back on 1.1.4, there was an application called AdBlock that disabled the ads in the iPhone’s Safari browser. This greatly reduced the time it took Safari to render web pages, especially in a situation without wifi. Well, AdBlock still isn’t ported to 2.0, but there is another way to manually disable ads in Safari. It requires SSH or USB access to your phone’s filesystem, but is pretty easy. Read inside for instructions.
First, we want to download the modified hosts file from here. Once the text file is saved to your computer, fire up your SSH client to access your phone. You may also use a USB program such as Total Commander or iPhoneBrowser.
Navigate to /etc/ and rename the “hosts” file that is there to “host.bk” without the quotes. Now, drag the modified hosts text file you downloaded over to your phone. Rename the new hosts file from “hosts.txt” to just “hosts”. Now reboot your phone and enjoy an ad-free Safari!
Note: If you have neutered Apple’s kill switch via BossPrefs, you will need to neuter it again after you’ve completed this process.
Here are some before and after screenshots:
Before:
After:
So as you can see, it works great. Leave comments below on how it works for you.
Thanks to James from http://jamesisbored.com for this!
September 15th, 2008 at 2:32 am
Wow this sounds great! I happen to be very good with my iPhone. Is there a way someone can zip this? That way I can just download it with MobileSafari then unzip it in MobileFinder. Use MobileFinder to implement the instructions above. And viola I’m sure it’ll work. I use my iPhone all the time to do SSH type things without the need for SSH or WinSCP. I also use MobileTerminal all the time when need be.
I don’t have access to a computer most of the time. And I don’t see any other way to get the Host file. I suppose I could wait until tomorrow though. Thanks anyway if there’s a way to get that file with my actual iPhone the way I mentioned above. If not I’ll just do it tomorrow.
This process sounds sweet!!!
September 15th, 2008 at 6:53 am
Just did it, worked like a charm. Thanks for the great tip, this’ll be invaluable when I’m browsing on Edge.
September 15th, 2008 at 8:54 am
…and now every visit to ebay.com leads you to a phishing site. Did one of you at least check the new hosts file? A very unsafe way to block ads. Sorry!
September 15th, 2008 at 9:04 am
i tried it. but ads are still there.
September 15th, 2008 at 11:15 am
@tony
Use wget in MobileTerminal and rename file.
September 15th, 2008 at 11:42 am
@tony
Just use wget within MobileTerminal.
September 15th, 2008 at 2:24 pm
Um, no it doesn’t. Ebay on my phone loads fine every time with the new hosts file.
September 15th, 2008 at 7:09 pm
Are you saying that a site that looks like ebay but isn’t loads instead? Because if that’s the case then it is very dangerous indeed.
September 16th, 2008 at 10:50 am
Nice!!!! Thanks for the goodwill in the community! Admob ads were starting to annoyme… but not anymore! YES!!!!
March 23rd, 2009 at 6:57 pm
Um…if you actually look at the hosts file, all it does is redirect banners.ebay.com to 127.0.0.1
Learn to read the files before accusing them of doing something that they don’t.