The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone > iPhone News
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-18-2008, 03:34 AM
MMi Writer
 
Join Date: Jul 2007
Device + Firmware: iphone, pwned 3g
Operating System: leopard
Location: chicago
Posts: 131
Thanks: 4
Thanked 34 Times in 7 Posts
Send a message via AIM to ajustcircle
[How To] Block Ads in MobilSafari

Click the image to open in full size.

I don't know about most of the over 300,000 of you registered members, but I live in Chicago and spend a lot of time in transit to and fro via Chicago's public transportation system – CTA. Now, there are a lot of things I could be doing during this time – blogging for MMi (hey, that's actually the full name now – how cute), colorizing comics for my other job, or, God forbid, some homework, but more often than not I'm reading different websites, following the almighty Obama, or worshiping at the feet of Steve. Even with my Mach Five-esque 16GB on 3G there is one thing that always slows me down – ads.

While I was digging around today on the tubes that are the web, I found James's blog post about ad blocking in MobileSafari, 2.0+. Then I found a couple of guys (on a forum we can't link to for legal reasons) who've found out how to block A LOT more ads you'll encounter while surfing with your phone. The process to get this going is ridiculously easy and should be completely painless:

Step One
SSH over to your iPhone (this may work on an iPod Touch as well, but I do not have one to test with, nor do the people who edited this file) and navigate to /etc

Step Two
copy the file called hosts over to your computer for safekeeping (I recommend sticking it right next to your backed up MobileInstallation file and your custom firmware)

Step Three
replace the hosts file on your iPhone with the one provided here – the permissions should already be set right, assuming whatever you decompress the zip with doesn't jack with them. If you'd like to be very sure, chmod 644 the file before you replace the original on the phone.

Step Four
reboot

Step Five
Surf ad-free until Apple updates the firmware again, at which point you'll probably have to do this again.

For those curious to how this works, a very extensive list of address to block have been added to the hosts file and when MobileSafari is instructed to load them when you visit a page it, well, doesn't.

If you find some other address to block, follow the format in the file and add them.
Attached Thumbnails
[How To] Block Ads in MobilSafari-adfree.png  
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 24 Users Say Thank You to ajustcircle For This Useful Post:
461am (09-19-2008), creolesoul (10-04-2008), elr0y7 (09-18-2008), jrentzke (09-18-2008), KelvinalF (09-23-2008), KingLuc (09-19-2008), Knolly (09-18-2008), koolksmart (09-18-2008), lehighkid (01-18-2009), Marecki (09-18-2008), mlsaint78 (10-03-2008), NakedFaerie (09-18-2008), number johnny 5 (01-17-2009), OneRing2Rule (10-01-2008), oo3 (09-18-2008), oscar25 (09-18-2008), ProjectGSX (09-18-2008), qnc (09-19-2008), redeyez69 (09-18-2008), SharpieBandit (09-20-2008), Sixtey7 (09-18-2008), tattoojack (09-18-2008), uvbisani (09-19-2008), Zimoxx (01-03-2009)
  #2  
Old 09-18-2008, 03:41 AM
What's Jailbreak?
 
Join Date: Sep 2007
Posts: 13
Thanks: 2
Thanked 1 Time in 1 Post

awesome! thankx
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to warfa For This Useful Post:
koolksmart (09-18-2008)
  #3  
Old 09-18-2008, 04:28 AM
Imahottguy's Avatar
Livin the iPhone Life
 
Join Date: Jul 2007
Device + Firmware: 3G[s] JB redsn0w 0.8
Operating System: Win XP
Location: Lansing, MI, USA
Posts: 1,203
Thanks: 42
Thanked 78 Times in 63 Posts
Send a message via MSN to Imahottguy

Sweet...
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to Imahottguy For This Useful Post:
koolksmart (09-18-2008)
  #4  
Old 09-18-2008, 04:37 AM
jrentzke's Avatar
iPhoneaholic
 
Join Date: Sep 2007
Device + Firmware: iPhone 3GS 3.1.2 32G
Operating System: Mac 10.5.8
Posts: 410
Thanks: 72
Thanked 54 Times in 39 Posts

That's a nice extensive list - thanks!

[edit]
Well, it seems BigBoss doesn't like this new adblock host file. If you now try & load Categories, it stops with a screen complaining :

Permissions Error

Admob blocking has been detected in your hosts file. I have worked many hours on this app. It cannot run with this block in place.

I tried commenting the line out that contained admob, but categories still wouldn't load. I had to delete that line.

This is the line: 127.0.0.1 mm.admob.com

So even though we thought this fix was only for ads in Safari, it also seems to effect anyone using ads in their apps...and bigboss won't have that!

Last edited by jrentzke; 09-18-2008 at 05:37 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 2 Users Say Thank You to jrentzke For This Useful Post:
elr0y7 (09-18-2008), koolksmart (09-18-2008)
  #5  
Old 09-18-2008, 07:25 AM
Nefarious's Avatar
iPhone? More like MyPhone
 
Join Date: Nov 2007
Device + Firmware: Iphone 3G 16GB White
Operating System: Windows 7 Ultimate
Posts: 239
Thanks: 23
Thanked 18 Times in 17 Posts

Been doing this for over a week now. Had to remove admon.com line from host for categories.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to Nefarious For This Useful Post:
koolksmart (09-18-2008)
  #6  
Old 09-18-2008, 08:15 AM
bbplayer5's Avatar
iPhone? More like MyPhone
 
Join Date: Sep 2007
Posts: 279
Thanks: 4
Thanked 23 Times in 17 Posts

BigBoss is one of the best devs on Cydia. I respect his choice and erased the line.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to bbplayer5 For This Useful Post:
koolksmart (09-18-2008)
  #7  
Old 09-18-2008, 08:24 AM
My iPhone is a Part of Me
 
Join Date: Nov 2007
Device + Firmware: Black 3Gs 16gb 3.1.2
Operating System: Black Macbook 2.0 Core 2 Duo Snow Leopard
Location: Los Angeles
Posts: 813
Thanks: 412
Thanked 108 Times in 80 Posts

good job, great write up. thanks given!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to tattoojack For This Useful Post:
koolksmart (09-18-2008)
  #8  
Old 09-18-2008, 08:31 AM
iPhone? More like MyPhone
 
Join Date: Jul 2008
Device + Firmware: 2g iphone, os3.0
Operating System: XP
Location: right in the middle of the US
Posts: 136
Thanks: 4
Thanked 7 Times in 5 Posts

so does this affect other programs, like cycorder?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to ksiphone For This Useful Post:
koolksmart (09-18-2008)
  #9  
Old 09-18-2008, 08:36 AM
exNavy's Avatar
iPhone? More like MyPhone
 
Join Date: Jun 2007
Device + Firmware: 2G, 3G and 3GS
Operating System: OS X 10.6 intel
Location: Arizona
Posts: 282
Thanks: 18
Thanked 35 Times in 28 Posts

almighty Obama
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 3 Users Say Thank You to exNavy For This Useful Post:
koolksmart (09-18-2008), Kyle Matthews (09-18-2008), SharpieBandit (09-20-2008)
  #10  
Old 09-18-2008, 09:14 AM
What's Jailbreak?
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 2 Times in 1 Post

Quote:
Originally Posted by ksiphone View Post
so does this affect other programs, like cycorder?
This will effect any program that uses the hosts file which means anything that does HTTP connections. You can add these to your computers hosts file and block ads in any browser. On a PC it did strange things to IE when accessing CNN though.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 2 Users Say Thank You to smoketx For This Useful Post:
koolksmart (09-18-2008), uvbisani (09-19-2008)
  #11  
Old 09-18-2008, 09:36 AM
Eurisko's Avatar
Livin the iPhone Life
 
Join Date: Aug 2007
Device + Firmware: 3G iPhone, FW3.0
Operating System: OSX Leopard
Location: Toronto, Canada
Posts: 3,312
Thanks: 11
Thanked 554 Times in 482 Posts
Send a message via Yahoo to Eurisko

Quote:
Originally Posted by bbplayer5 View Post
bigboss is one of the best devs on cydia. I respect his choice and erased the line.
lol
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to Eurisko For This Useful Post:
koolksmart (09-18-2008)
  #12  
Old 09-18-2008, 09:52 AM
iPhone? More like MyPhone
 
Join Date: Nov 2007
Device + Firmware: iPhone 8 GB 2G 3.0 Pwned
Operating System: Mac OSX 10.5.7
Posts: 263
Thanks: 21
Thanked 16 Times in 16 Posts

Quote:
Originally Posted by smoketx View Post
This will effect any program that uses the hosts file which means anything that does HTTP connections. You can add these to your computers hosts file and block ads in any browser. On a PC it did strange things to IE when accessing CNN though.
Where is hosts on a Mac? I looked for it and could not find it

EDIT: never mind, found it, it's obviously in /etc

Last edited by marcoiac; 09-18-2008 at 10:00 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to marcoiac For This Useful Post:
koolksmart (09-18-2008)
  #13  
Old 09-18-2008, 10:36 AM
Green Apple
 
Join Date: Dec 2007
Posts: 84
Thanks: 0
Thanked 9 Times in 7 Posts

Quote:
Originally Posted by jrentzke View Post
That's a nice extensive list - thanks!

[edit]
Well, it seems BigBoss doesn't like this new adblock host file. If you now try & load Categories, it stops with a screen complaining :

Permissions Error

Admob blocking has been detected in your hosts file. I have worked many hours on this app. It cannot run with this block in place.

I tried commenting the line out that contained admob, but categories still wouldn't load. I had to delete that line.

This is the line: 127.0.0.1 mm.admob.com

So even though we thought this fix was only for ads in Safari, it also seems to effect anyone using ads in their apps...and bigboss won't have that!
Thats because he has ads in his app now.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to jimbeam4581 For This Useful Post:
koolksmart (09-18-2008)
  #14  
Old 09-18-2008, 11:01 AM
What's Jailbreak?
 
Join Date: Apr 2008
Device + Firmware: iPhone 1.1.4
Operating System: Mac OSX Leopard
Posts: 26
Thanks: 1
Thanked 3 Times in 3 Posts

hell yeah obama ftw

anyway, thanks for the great tip
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to skatertrash For This Useful Post:
koolksmart (09-18-2008)
  #15  
Old 09-18-2008, 11:19 AM
oo3's Avatar
oo3 oo3 is offline
iPhoneaholic
 
Join Date: May 2008
Device + Firmware: White iPhone 3G 3.1.2
Operating System: OSX Snow Leopard & Windows 7 Ultimate
Location: Beaverton, OR
Posts: 375
Thanks: 71
Thanked 52 Times in 43 Posts

Not sure why, but I don't see any ads being blocked after doing this.

*EDIT*

nvm...i guess it depends on what sites i go to.

Last edited by oo3; 09-18-2008 at 11:23 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to oo3 For This Useful Post:
koolksmart (09-18-2008)
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone > iPhone News

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 11:48 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top