New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
cryshop
Old
(Last edited by cryshop; 15th November 2010 at 01:58 PM.)
#1  
cryshop's Avatar
Senior Member - OP
Thanks Meter 95
Posts: 293
Join Date: Feb 2010
Location: Ho Chi Minh

 
DONATE TO ME
Question How to : Remove ads on HTC Legend

I know this tutorial is everywhere on this forum. But with HTC Legend, it's a little different.

Read the tutorial here : http://forum.xda-developers.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 :
Quote:
cd\
C:\cd android\tools
Step 6 :
Quote:
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.
Attached Files
File Type: zip hosts.zip - [Click for QR Code] (270.0 KB, 352 views)
 
snakehult
Old
#2  
snakehult's Avatar
Senior Member
Thanks Meter 60
Posts: 369
Join Date: Jun 2010
Very nice!
 
chinmoykanjilal
Old
#3  
Junior Member
Thanks Meter 0
Posts: 15
Join Date: May 2010
Location: Kolkata

 
DONATE TO ME
Does this work? It did not work on my Legend. I just cant get into shell when in recovery.
Precisely, "adb shell" gives an error!
 
stegg
Old
#4  
Senior Member
Thanks Meter 41
Posts: 401
Join Date: Aug 2008
Location: Milan
"an" error!

BTW the file hosts works for me, and not a single ad is shown on my cell
Samsung Galaxy Nexus: AOSP 4.2.2 Xylon 242 + Franco kernel 372
Ifive 8" IPS tablet from China
Nook Simple Touch rooted 1.21
 
JonasDroid
Old
(Last edited by JonasDroid; 6th September 2010 at 10:43 AM.)
#5  
JonasDroid's Avatar
Senior Member
Thanks Meter 46
Posts: 416
Join Date: Apr 2010
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)
Samsung Galaxy S3 GT-I9300, Latest leaked OTA (Fix for status 7 error)
HTC Legend S-OFF, CM7 nightlies @825MHz
Mods for Blay0's ROM: Trackpadwake / Stock Lockscreen / Wifi mod
HTC HD2, DL DesireZ v3.4 (NAND) RADIO: 2.15.50.14
 
qzem
Old
#6  
qzem's Avatar
Recognized Contributor
Thanks Meter 721
Posts: 1,160
Join Date: Jun 2010

 
DONATE TO ME
Does this thing removes adds out of free aplications, that usually have them?
 
cryshop
Old
(Last edited by cryshop; 11th September 2010 at 04:51 AM.)
#7  
cryshop's Avatar
Senior Member - OP
Thanks Meter 95
Posts: 293
Join Date: Feb 2010
Location: Ho Chi Minh

 
DONATE TO ME
I updated the instruction, I hope it's easier for you to follow every steps.

Quote:
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.
 
BlaY0
Old
#8  
BlaY0's Avatar
Recognized Developer
Thanks Meter 556
Posts: 1,551
Join Date: Sep 2007
Location: 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
Old
(Last edited by parker09; 19th September 2010 at 01:00 AM.)
#9  
parker09's Avatar
Senior Member
Thanks Meter 82
Posts: 680
Join Date: Apr 2010
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?
 
BlaY0
Old
#10  
BlaY0's Avatar
Recognized Developer
Thanks Meter 556
Posts: 1,551
Join Date: Sep 2007
Location: Medvode
Quote:
Originally Posted by parker09 View Post
...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?
Nope. Did you even look what's inside of that hosts file? There are adresses of ad servers pointing to localhost (that's your phone itself)...


XDA PORTAL POSTS

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more

Forum Added for the Samsung Galaxy Mega

What do you do when the Galaxy Note line is simply not big enough? You get theSamsung Galaxy Mega. … more

Voice Control Your Phone with Tasker and AutoVoice – XDA Developer TV

XDA Developer TV Producer Kevin set up his phone to respond to … more

Guide to Take Better Control of Your Volume Levels

Would you like to know one of the things that really annoys me on a daily basis? Tough, … more