Active Topics

 


Reply
Thread Tools
Posts: 147 | Thanked: 228 times | Joined on Feb 2010 @ Toronto, Canada
#1
MOD EDIT: One-liner to achieve the same from this post:

Code:
wget -O ~/hosts http://winhelp2002.mvps.org/hosts.txt && echo "127.0.0.1" $(uname -n) "localhost" > /etc/hosts && tr -d '\015' < ~/hosts >> /etc/hosts
---Edit End---

One of the first things I installed on my N900 was adblock. Then when I briefly moved to Android I rooted each and every one of those phones just to install adfree. Notice a trend?

Thanks for all the replies below. Having tried Firefox (fennec), my opinion is that while it works, it is not ready for daily use on the N9. I feel the easiest way to block ads on the N9 is to implement a custom hosts file. It does not require flashing the open mode kernel, and it does survive reboots. This procedure also keeps the correct permissions and file type for the new hosts file (I just checked it on my N9)


I posted the guide in a later post, but here it is again:
_____________________________________________

I implemented an ad blocking hosts file. I've tested some of the sites I usually visit, and all the ads are gone.

Here is a step by step guide how to do it easily.

NOTE: This procedure ONLY works if you've rooted the N9 since you need terminal and root access to /etc.

PC part:

1. Download the latest version of the hosts file TO YOUR PC from:
There are a lot of other versions out there, but this one seems to be updated on a regular basis, the latest version is less than a month old.

2. Open the hosts file in Notepad++, or your favorite text editor. Make sure it is a pure text editor, as some will introduce formatting into the file and they will destroy the hosts file contents.

3. Replace the uncommented first line
127.0.0.1 localhost
with
127.0.0.1 RM696 localhost
This bit seems to be very important on the N9 as others pointed out.

4. Save the new hosts file.

5. Connect the N9 to your PC via USB Mass Storage and copy the new hosts file to it. When you disconnect the N9, the file will be located in
/home/user/MyDocs/
N9 part:

6. Open Terminal and gain root access. The default password is rootme.
devel-su
7. Rename the original N9 hosts file, and keep it as a backup:
mv /etc/hosts /etc/hosts.orig
8. Copy the new hosts file to /etc
cp /home/user/MyDocs/hosts /etc/
9. Enjoy a (mostly) ad free browsing experience on the N9. As I said, some ads may slip through and eventually your hosts file will become obsolete. Getting a new hosts file every once in a while will fix that.

I am sure there are dozens of ways to accomplish this, and the commands I listed use hard paths. That's so it works no matter which folder the Terminal is opened in.

Last edited by thedead1440; 2013-02-18 at 15:17.
 

The Following 13 Users Say Thank You to cr0c0 For This Useful Post:
HtheB's Avatar
Moderator | Posts: 3,718 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#2
You can add the adblock plugin using Firefox for harmattan.
That is the only way that we have for now afaik
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 

The Following 4 Users Say Thank You to HtheB For This Useful Post:
cddiede's Avatar
Posts: 1,034 | Thanked: 784 times | Joined on Dec 2007 @ Annapolis, MD
#3
There was also a great /etc/hosts file that I got for my N900 somwhere on these forums a while back.

It basically took a HUGE list of some of the worst web page banner ad domains and equated them with 127.0.0.1.

Worked like a charm on both my Linux desktop and my N900. Would be a good fit for any N9 owner looking to avoid ads since it would apply to all browsers on the phone and not just the buggy mobile Firefox.

If you're interested and can't find it with the powersearch, let me know and I can extract it from my old phone when I get home.
 

The Following 2 Users Say Thank You to cddiede For This Useful Post:
Posts: 56 | Thanked: 14 times | Joined on Jan 2012 @ Germany
#4
I investigated on this a while ago and editing hosts file would be my choice as well.

The thing is, that afaik AEGIS created a hash of that file so chances are when you modify it, AEGIS will block access to the system or so.

Sorry, I'm not that firm in Harmattan yet, so forgive me if I may have used the wrong terms.
 

The Following 3 Users Say Thank You to derliebewolf For This Useful Post:
cddiede's Avatar
Posts: 1,034 | Thanked: 784 times | Joined on Dec 2007 @ Annapolis, MD
#5
Originally Posted by derliebewolf View Post
I investigated on this a while ago and editing hosts file would be my choice as well.

The thing is, that afaik AEGIS created a hash of that file so chances are when you modify it, AEGIS will block access to the system or so.

Sorry, I'm not that firm in Harmattan yet, so forgive me if I may have used the wrong terms.
Only one way to find out. I'll edit my /etc/hosts tonight on the N9 and see if Aegis freaks out on me or not...
 

The Following 2 Users Say Thank You to cddiede For This Useful Post:
Posts: 147 | Thanked: 228 times | Joined on Feb 2010 @ Toronto, Canada
#6
I got Firefox (fennec 11.0) up and running with adblock. The good news is adblock does its job. Firefox's tabs and menu system is similar to Dolphin HD on Android, so I am familiar with the interface and like it. Although since it's combined swype, it can make life a little difficult. Rendering is also very quick, at least on par with the stock browser.

The bad news is that the menu system is very sluggish. A tap anywhere takes far too long to register, the menus are inconsistent (some are white, others are gray), and the text does not reflow on zoom even if the option is enabled. It also crashed a couple of times.

I am aware this is at best a beta version, so these kinds of issues are to be expected. But I think I'll stick with the stock browser for now. I will look into editing the hosts file, see if that gets me anywhere.

If anyone is wondering where to get Firefox for the N9, here's my source:

http://romaxa.info/fennec/
 

The Following 3 Users Say Thank You to cr0c0 For This Useful Post:
Posts: 278 | Thanked: 114 times | Joined on Jan 2010 @ SD, CA
#7
so cddiede...? did you try it?

<Rant>
umm so i think one of the reasons android and ios have been a hit with the developers is that they can make money even offereing their apps for free by showing ads. since both google and apple have monetary interests in their ad services (they own them), they protect what i feel they believe is their "right." offcourse i completely disagree with their policy and thats the reason i have always stuck with Nokia because they dont own an advertising company and dont use their platforms as ad selling platforms, like google and apple.
p.s. shouldnt someone sue apple for not allowing third parties to shows ads in ios apps. isnt that an antitrust issue?
</Rant>

Last edited by balisingh; 2012-02-09 at 05:32.
 

The Following 2 Users Say Thank You to balisingh For This Useful Post:
Posts: 150 | Thanked: 169 times | Joined on Nov 2011 @ Sweden
#8
Adblock? Seriously? That's what my grandma would use. The way any proficient user filters content on any system is with Privoxy. It's been in the Fremantle repos for ages, and I don't see why you couldn't build it for Harmattan if it hasn't been done already.
 

The Following User Says Thank You to bocephus For This Useful Post:
Posts: 64 | Thanked: 42 times | Joined on Jun 2009
#9
There is a more elegant solution -- and it almost, but not quite, works...

...unfortunately, to make it work, the abomination called Aegis must be purged from the system.

In short: Netfilter (a ring 0 firewall so feature-rich, flexible, and efficient that even Cisco started using it for its ASA-55x0 firewall/vpn/security devices) is
-installed
-active
-amenable to rule additions.

Unfortunately it doesn't look like it can be used. Apparently it has been "handicapped" (crippled) so that one of its most basic targets: REJECT doesn't work -- cannot work, because the underlying kernel module was renamed and therefore isn't found when needed.

It is not a kernel object, so cannot be loaded directly/manually. hard linking and soft linking don't work either (either because of aegis or losing kernel parameters). DROP apparently still works; but the solution really needs that icmp unreachable so the connection is closed immediately, rather than timing out.

Of course, without aegis it would be quite trivial to fix the broken package and make it work. And as its built for efficiency, it us a much more sensible solution than AdBlock -- a) because it works for all browsers and b) because it probably consumes an order of magnitude fewer resources (if not less), especially since its already active.
 

The Following 2 Users Say Thank You to zszabo For This Useful Post:
Posts: 64 | Thanked: 42 times | Joined on Jun 2009
#10
In fact, I've had enough.

I'm flashing to open mode.

The hell with this.
 

The Following User Says Thank You to zszabo For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:05.