FORUMS

How to Root the LG G4 and Install TWRP Recovery – XDA TV

A rooting method has finally been found for the flagship LG G4. In this … more

New Xposed for Lollipop 5.0 Update Fixes Major Bugs

Senior Recognized Developer rovo89 has patched Xposed for Lollipop 5.0 to … more

Download Sony’s new AOSP-like concept for Xperia Z3

Over in our forums, Recognized Contributor Jozinek has posted a very … more

OnePlus 2 vs Moto X Style: Which is The Better Flagship?

Two big industry names have announced their newest flagship phones within the … more

Block ads on your Android phone (2010-04-15)

107 posts
Thanks Meter: 12
 
By phaelox, Senior Member on 15th April 2010, 10:52 PM
Post Reply Subscribe to Thread Email Thread
16th May 2010, 06:51 AM |#41  
Senior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Airbag888

A bit off topic, I have netcounter but sadly it only shows total data usage per period, I'm looking for an app that can tell me data usage PER application, cause not even browsing (only gmail sync, twitter sync (per 1hr), fb sync (per 3hrs) I get to about 90MB used per day. I want to know what app is using up my bw

SpareParts claims to do this but that is the one feature of it which has never worked for me on my gsm Hero running MCR 3.2. It does work for some people though, so probably relies on an OS or hardware feature I'm lacking.
 
 
16th May 2010, 08:15 AM |#42  
Senior Member
Thanks Meter: 58
 
More
It's working on my N1 Thanks. It seems to have it under battery usage but when you pick details of every app listed (I dont see a lot) it the amount of bytes in and out so I suppose that's a start.
It also seems that there's a record of what app's been using the network prior to install, so I suspect there's a sort of log somewhere. I wonder if it'd be possible to know where and get an app that reads it to give details.
16th May 2010, 12:44 PM |#43  
petsasj's Avatar
Retired Recognized Developer
Flag Athens
Thanks Meter: 1,566
 
Donate to Me
More
I know this question might sound stupid, but i'll ask it anyway.

Does this effect persist through ROM changes (+wipes)?

I believe the answer is no (pretty sure it is), but what the heck

Thanks!
20th May 2010, 10:19 PM |#44  
Member
Thanks Meter: 16
 
More
It might be worth while changing the default host from 127.0.0.1 to 0.0.0.0 (actually I think technically it's an 'any' address, but that only makes sense for binding a listening socket as you can connect to 'any' its dropped).

127.0.0.1 is the loopback address which means the browser will try to make a connection to the local system and waste some time. The latter is the null ip address which should just get nuked before any connection attempt.
Last edited by H3g3m0n; 20th May 2010 at 10:23 PM.
21st May 2010, 03:56 PM |#45  
OP Senior Member
Thanks Meter: 12
 
More
Quote:
Originally Posted by intronauta

Great!!

There is any possibility to apply the changes without rebooting?.
When adfree update the hosts file, reboot isn't necessary.

Well, what happens is same as with adfree: the hosts file is replaced. Just to be on the safe side, I said reboot. Very well possibly it will work straight off, without rebooting.
Quote:
Originally Posted by petsasj

I know this question might sound stupid, but i'll ask it anyway.

Does this effect persist through ROM changes (+wipes)?

I believe the answer is no (pretty sure it is), but what the heck

Thanks!

You are correct, it does not persist when factory resetting or flashing new rom. The /etc directory is part of the system volume which gets wiped.
Quote:
Originally Posted by H3g3m0n

It might be worth while changing the default host from 127.0.0.1 to 0.0.0.0 (actually I think technically it's an 'any' address, but that only makes sense for binding a listening socket as you can connect to 'any' its dropped).

127.0.0.1 is the loopback address which means the browser will try to make a connection to the local system and waste some time. The latter is the null ip address which should just get nuked before any connection attempt.

As I understand it, 0.0.0.0 is a special address for interfaces that are down, and received packets sent from a (local) source not expecting a reply. Could work, but never seen anyone use it in a hosts file, which makes me wonder. No idea how TCP/IP stack would handle it. If you try it, let us know.
Last edited by phaelox; 21st May 2010 at 03:59 PM.
26th May 2010, 02:26 PM |#46  
Senior Member
Thanks Meter: 152
 
More
will there be a new update soon
1st June 2010, 09:18 AM |#47  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by MilkPudding

It works SO well on those annoying ads. Thanks

Just in case anyone uses the terminal, the full command is as follow

Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system 
cp hosts.for.mobile.txt /etc/hosts
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system


it's working
i just change cp /sdcard/hosts.for.mobile.txt /etc/hosts
because i put txt on my sd card

thank you for the lecturing everyone
1st June 2010, 10:40 AM |#48  
Senior Member
Flag Milan
Thanks Meter: 51
 
More
sorry for my noobness...

using my rooted legend, with usb debug mode.
I enter the first ADB command (mount), it's ok, but the second one
adb push hosts.for.mobile.txt /etc/hosts
gives this error
failed to copy 'hosts.for.mobile.txt' to '/etc/hosts': Directory not empty

what can I do to copy this file?

btw the phone reboots itself after that error
2nd June 2010, 10:45 PM |#49  
Member
Thanks Meter: 4
 
More
same here... any ideas?
5th June 2010, 03:46 AM |#50  
cryshop's Avatar
Senior Member
Flag Ho Chi Minh
Thanks Meter: 100
 
Donate to Me
More
Quote:
Originally Posted by stegg

sorry for my noobness...

using my rooted legend, with usb debug mode.
I enter the first ADB command (mount), it's ok, but the second one
adb push hosts.for.mobile.txt /etc/hosts
gives this error
failed to copy 'hosts.for.mobile.txt' to '/etc/hosts': Directory not empty

what can I do to copy this file?

btw the phone reboots itself after that error

I got this message also, failed
5th June 2010, 08:15 PM |#51  
Senior Member
Flag Milan
Thanks Meter: 51
 
More
Talking done!
Quote:
Originally Posted by Igor02

same here... any ideas?

I successfully copied the hosts file on the legend.
OF COURSE you must be knowing rooting procedures and recovery and console command, and whatever happens it's not my fault.

instructions:

1) have your legend rooted, of course
2) put a suited hosts.txt file in the etc folder of your recovery directory, e.g. "C:\r4-legend-root\files\hosts.txt" --- in this way we 'll temporarily have the hosts.txt file into your phone
3) enter into recovery mode
4) in your administrator console on your pc, type:

Code:
adb shell mount -o rw -t yaffs2 /dev/block/mtdblock3 /system
adb shell cp /etc/hosts /system/etc/hosts 
adb shell mount -o ro -t yaffs2 /dev/block/mtdblock3 /system
(the latter command returns "system busy" to me, maybe yours won't)
5) wait a couple of seconds, just for sake, then reboot your phone

et voilą at next reboot, the new hosts file works!

cool people may want to set hosts file properties, but I didn't do.
after all, at the next reboot the system is still read-only so it shouldn't be necessary to set permissions
Last edited by stegg; 5th June 2010 at 08:17 PM.

Read More
Post Reply Subscribe to Thread

Tags
hosts block filter ads
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes