How to : Remove ads on HTC Legend

Search This thread

cryshop

Senior Member
Feb 25, 2010
303
99
Ho Chi Minh
I know this tutorial is everywhere on this forum. But with HTC Legend, it's a little different.

Read the tutorial here : http://xdaforums.com/showthread.php?t=695411

Now I'll make it simple, just do this :

Your Legend must be rooted!

Step 1 : Download host file from the attach at the end of the post and unzip it to get the hosts file

Step 2 : Copy hosts to ADB folder (in my case : C:/android/tools) download Android SDK here

Step 3 : reboot your Legend to recovery mode (Install Rom manager on Market, Flash recovery, than reboot into Recovery mode)

Step 4 : Open Command window (Start menu > Run > cmd (windows xp) / Start menu > cmd (windows 7))

Step 5 : point to your adb folder
In my case :
cd\
C:\cd android\tools

Step 6 :
C:\android\tools\adb shell mount /system (Enter)
C:\android\tools\adb push hosts /system/etc/hosts (Enter)
C:\android\tools\adb reboot (Enter)

Step 7 : Done.

Note : This hosts file was updated long time ago, so it might not work with new apps. But it will disable most of the apps.
 

Attachments

  • hosts.zip
    270 KB · Views: 358
Last edited:

JonasDroid

Senior Member
Apr 12, 2010
423
50
Isn't our recovery just pressing volume down + power then go to recovery and wait for the "!" ? cause if I try adb shell then, it tells me:
Code:
-exec '/system/bin/sh' failed: no such file or directory (2)-

am I in the wrong recovery?

it is saying I'm in recovery when asking for the "adb devices" command

EDIT: found what I was doing wrong, didn't know you needed to run the recovery-windows.bat file first

EDIT 2: still having adds :( (in astro)
 
Last edited:

qzem

Senior Member
Jun 23, 2010
1,594
1,030
Does this thing removes adds out of free aplications, that usually have them?
 

cryshop

Senior Member
Feb 25, 2010
303
99
Ho Chi Minh
I updated the instruction, I hope it's easier for you to follow every steps.

Does this thing removes adds out of free aplications, that usually have them?

It blocks the apps from connecting to the ad server. And yes, it does remove every single ad from free applications.

@Jonas : please follow the new instruction.
 
Last edited:

BlaY0

Retired Recognized Developer
Sep 15, 2007
1,553
566
Medvode
If you would use this MOD, you would be able to write to system partition thus installing AdFree from market would be possible.
 

parker09

Senior Member
Apr 27, 2010
949
173
eparker.me
I get..

Code:
C:\Users\parker\Downloads\android-sdk_r06-windows\android-sdk-windows\tools>adb shell mount /system
- exec '/system/bin/sh' failed: No such file or directory (2) -

NVM read above posts; ran Windows-recovery.bat - pushes the host.txt to the phone, now rebooting to see if it removes ads.

edit II: removes ads out of Advanced Task Killer but it keeps trying to load the ads so would that mean that its still pinging a server because that could use up a lot of data couldn't it if it keeps running?
 
Last edited:

knnhzx

Senior Member
Jun 26, 2010
94
3
when i press C:\android\tools\adb push hosts.txt /system/etc/hosts (Enter)
it tells me theres no hosts.txt
the file i downloaded is just host there is no .txt
so what do i do?
 

knnhzx

Senior Member
Jun 26, 2010
94
3
This is what i did:

C:\>cd\androidsdk\tools

C:\AndroidSDK\tools>adb shell mount /system

C:\AndroidSDK\tools>adb push hosts.txt /system/etc/hosts
cannot stat 'hosts.txt': No such file or directory

C:\AndroidSDK\tools>adb push hosts /system/etc/hosts
1246 KB/s (0 bytes in 1236506.000s)

C:\AndroidSDK\tools>adb reboot


"host.txt" did not work so i tried just "host"
is it correct?
 

cryshop

Senior Member
Feb 25, 2010
303
99
Ho Chi Minh
This is what i did:

C:\>cd\androidsdk\tools

C:\AndroidSDK\tools>adb shell mount /system

C:\AndroidSDK\tools>adb push hosts.txt /system/etc/hosts
cannot stat 'hosts.txt': No such file or directory

C:\AndroidSDK\tools>adb push hosts /system/etc/hosts
1246 KB/s (0 bytes in 1236506.000s)

C:\AndroidSDK\tools>adb reboot


"host.txt" did not work so i tried just "host"
is it correct?

Yes, change hosts.txt to hosts. When I wrote this tutorial, the file was hosts.txt but then I changed a better one (block more ads) : hosts

how would i know whether i have succeeded or not?

Open the app with ads and see the difference...like Angry Birds or Advanced Task Manager,.etc...
 

Rapier

Forum Moderator
Staff member
What's the benefit in having ads removed besides them not showing up and less net traffic (even if the traffic is not so high due to this)? The apps still have that space for ads even if they're not showing up, plus I got frequent restarts of the application. After one day trying this, I've deleted the hosts file, at least now the apps ARE working. And finally if one doesn't like ads there's allways the option for buying/donate...that is also supporting development