Go Back   Android Forums > Android Phones > HTC Hero (Sprint) > Sprint Hero - Support and Troubleshooting

test: Reply
 
LinkBack Thread Tools
Old December 18th, 2009, 10:27 AM   #1 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Aug 2009
Location: Tampa, FL
Posts: 29
 
Device(s): Sprint HTC Hero
Carrier: Not Provided

Thanks: 4
Thanked 12 Times in 2 Posts
Default How to change the User Agent String setting on stock Android Browser

A while ago I found a tip somewhere on how to get to some additional hidden android browser settings including how to change the user agent string so that the browser would identify itself as a desktop browser or iPhone browser while surfing.
This setting is reset between sessions, I didn't use it frequently and eventually forgot how to go about making the change.
Recently I had a need to access these hidden browser settings again and it took quite a long and frustrating search effort to finally locate this information which does not seem to be widely publicized. So, in an effort to save anyone else this trouble, I figured I would post the information on how to do this on a couple Android boards that I frequent and also include a few words that might be picked up as search terms for anyone else trying to find this info. The procedure is very simple. I currently have an HTC Sprint Hero running Android 1.5, so I'm not sure what other devices or builds this will work on...

Open the Android web browser. In the address bar enter 'about:debug' where you would normally enter a URL and hit enter or Go. Be sure to erase the 'http://www.' that the browser likes to leave in the address bar for you. No page will load and you may or may not get a pop-up message 'Debug mode'. But if you now go to Menu > More > Settings in the browser and scroll to the bottom of the list, you should see a new group of options under the 'Debug' heading. The bottom setting is 'UAString' and if selected will give you the option of enabling your browser to identify itself as Android, Desktop or iPhone. Results after making this switch have been mixed, but go ahead and give it a try if you have a need to. I'm not sure what the other options do, so use at your own risk.

Feel free to leave a reply if you found this information helpful, or if it does or does not work on your particular device / build.

EDIT: I Originally posted this in 2009 and have since switch handsets and flashed a custom ROM (CyanogenMod) that has the user agent setting for the stock browser. So I can not verify the tip below but big thanks to jaggu.004 for posting this updated method:
Quote:
Originally Posted by jaggu.004 View Post
Just open stock browser and type "about:useragent" and select the one u want!!!
search terms: Android Browser Hidden Debug Settings Change User Agent String Identify Desktop Firefox iPhone about:debug UAString

Advertisements
Gambit is offline  
Last edited by Gambit; August 16th, 2011 at 06:13 PM. Reason: about:useragent tip
Reply With Quote
The Following 11 Users Say Thank You to Gambit For This Useful Post:
ashlianne (January 3rd, 2011), damickens1 (January 30th, 2012), dukezone (April 6th, 2010), Dunebug (April 25th, 2010), kkeller87 (August 8th, 2011), Pad1 (November 20th, 2012), pwabbit (April 6th, 2010), Schwin97 (May 21st, 2010), tchall (November 29th, 2011), ThatNewAndroidGuy (August 15th, 2010), Tnext (August 2nd, 2011)
sponsored links
Old December 18th, 2009, 10:37 AM   #2 (permalink)
Senior Member
 
Join Date: Oct 2009
Posts: 502
 
Device(s): Whatever I haven't tired of.
Carrier: Not Provided

Thanks: 22
Thanked 60 Times in 47 Posts
Default

I am not sure about the method in the stock browser, but the Dolphin browser has a setting for that.
pwabbit is offline  
Reply With Quote
Old December 18th, 2009, 11:37 AM   #3 (permalink)
Member
 
meangreengdub's Avatar
 
Join Date: Oct 2009
Location: DFW, Texas
Posts: 328
 
Device(s): Sprint HTC Hero
Carrier: Not Provided

Thanks: 6
Thanked 5 Times in 4 Posts
Default

Maybe I missed it or just don't get it, but what are the advantages to this?
meangreengdub is offline  
Reply With Quote
Old December 18th, 2009, 01:30 PM   #4 (permalink)
Member
 
pking's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 156
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Maybe I missed it or just don't get it, but what are the advantages to this?
The Android WebKit browser is, for all intents and purposes, a fully-fledged web browser (with some minor quirks)

The advantage of changing your UA string to appear to be a different browser-type or device is that you don't get forced into viewing a 'mobile version' of a particular webpage. Mobile browsing is still very young, and these versions tend to be geared toward browsers that don't know about things like images, JavaScript, flash, etc. That is to say, very ugly and generally not very functional.

It should only really be necessary if the website you're viewing is overly-agressive about the UA string - I've had a few sites direct me to the 'mobile version' even when the 'Mobile View' option is disabled in the browser settings.
pking is offline  
Reply With Quote
Old December 18th, 2009, 07:04 PM   #5 (permalink)
Senior Member
 
Droidone's Avatar
 
Join Date: Dec 2009
Posts: 595
 
Device(s): Sprint HTC Evo
Carrier: Not Provided

Thanks: 30
Thanked 118 Times in 57 Posts
Default

I used to do this with a patch on my pre and it does help in rendering pages correctly. When I had it set to iphone, I could access special websites that are made to display correctly on that phone. I am gonna give it a shot and see what happens. Worst case if you choose desktop, you can avoid those mobile sites from coming up. Good find
Droidone is offline  
Reply With Quote
Old January 26th, 2010, 04:12 PM   #6 (permalink)
Member
 
MountainX's Avatar
 
Join Date: Nov 2009
Posts: 140
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 3 Times in 2 Posts
Default more user agents?

Is it possible to change the user agent to Palm Pre in any Android browser?

I'd like to use this:
Mozilla/5.0 (webOS/1.0; U; en-us) AppleWebKit/525.27.1
(KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0
MountainX is offline  
Reply With Quote
Old February 11th, 2010, 09:31 AM   #7 (permalink)
New Member
 
XanaduL's Avatar
 
Join Date: Jan 2010
Location: Western NY
Posts: 7
 
Device(s): Motorola Droid (insert robotic voice here)
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bump, Sticky!!!!!, please
XanaduL is offline  
Reply With Quote
Old April 6th, 2010, 01:17 AM   #8 (permalink)
New Member
 
Join Date: Apr 2010
Location: Perth, Australia
Posts: 1
 
Device(s): Google NexusONE Android 2.1 Unlocked & Unbranded
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Cool

Gambit thank you for the UA tute.. after trying various fixes on my N1 it worked like a treat ~yay~ !

Can you or anyone please explain any of the other 'Debug' settings [Tracing, rendering, wide viewport, light touch etc]??

Thank you in advance.
dukezone is offline  
Last edited by dukezone; April 6th, 2010 at 01:19 AM. Reason: fix spello and add question
Reply With Quote
Old June 19th, 2010, 04:51 AM   #9 (permalink)
New Member
 
Join Date: Jun 2010
Posts: 5
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 3 Times in 1 Post
Default

Bump
GriZlore is offline  
Reply With Quote
Old December 26th, 2010, 09:43 PM   #10 (permalink)
New Member
 
Join Date: Dec 2010
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

This reliably causes the browser to crash on my stock, several-days-old Samsung Captivate. Doesn't matter what site(s) are open, as soon as I select desktop and exit the menus, the browser crashes. Who knows why, but if others experience this, to reset the browser settings when the browser itself doesn't work, go to (home screen) Menu->Settings->Applications->Manage Applications->Menu->Filter-select All->Browser->Clear Data.

I'm surprised this isn't more streamlined...
mosey is offline  
Reply With Quote
sponsored links
Old January 3rd, 2011, 11:42 PM   #11 (permalink)
New Member
 
Join Date: Jan 2011
Posts: 5
 
Device(s): Huawei Ascend M860
Carrier: Not Provided

Thanks: 2
Thanked 0 Times in 0 Posts
Wink Success!!

yay!!! it worked on my LG Optimus M 2.2
** BUT I DID HAVE TO TURN MY POP UP BLOCKER OFF

my only problem now is it is not letting me view videos on certain sites... like on shufuni.com when I go on my desktop it lets me view it but on my phone it doesn't.


This did solve my problem that I had before though where it kept going to m.shufuni.com (which it wanted me to pay) since it was set in android view

**UPDATE** ...ahh well it was using Flash Player so that's why and I lost my Optimus M and had to get a new one (and it's 2.2.1 now so meh I guess I'm going to attempt to downgrade and root again)
ashlianne is offline  
Last edited by ashlianne; February 7th, 2011 at 04:55 PM.
Reply With Quote
Old February 3rd, 2011, 06:21 PM   #12 (permalink)
New Member
 
Join Date: Jan 2011
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

whoa
bestbuds86 is offline  
Last edited by bestbuds86; February 3rd, 2011 at 06:26 PM.
Reply With Quote
Old February 3rd, 2011, 06:27 PM   #13 (permalink)
New Member
 
Join Date: Jan 2011
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mosey View Post
This reliably causes the browser to crash on my stock, several-days-old Samsung Captivate. Doesn't matter what site(s) are open, as soon as I select desktop and exit the menus, the browser crashes. Who knows why, but if others experience this, to reset the browser settings when the browser itself doesn't work, go to (home screen) Menu->Settings->Applications->Manage Applications->Menu->Filter-select All->Browser->Clear Data.

I'm surprised this isn't more streamlined...
Thanks, I couldnt figure out how to get it back working. again THANKS. I like the stock android browser better than dolphin skyfire etc
bestbuds86 is offline  
Reply With Quote
Old August 2nd, 2011, 06:04 PM   #14 (permalink)
New Member
 
Join Date: Aug 2011
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default Thanks, this solved my problem of no mail option in webmail on phone

I could view emails but could not send emails or reply to emails in my webmail account from my phone browser. Changing the UAString setting to 'desktop' as described above fixed the problem. Thanks!

phone: droid2

Email type: Inotes Lotus notes webmail version
Tnext is offline  
Reply With Quote
Old August 8th, 2011, 08:47 PM   #15 (permalink)
New Member
 
Join Date: Aug 2011
Location: MN
Posts: 1
 
Device(s): Droid Charge
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Gambit View Post
A while ago I found a tip somewhere on how to get to some additional hidden android browser settings including how to change the user agent string so that the browser would identify itself as a desktop browser or iPhone browser while surfing.
This setting is reset between sessions, I didn't use it frequently and eventually forgot how to go about making the change.
Recently I had a need to access these hidden browser settings again and it took quite a long and frustrating search effort to finally locate this information which does not seem to be widely publicized. So, in an effort to save anyone else this trouble, I figured I would post the information on how to do this on a couple Android boards that I frequent and also include a few words that might be picked up as search terms for anyone else trying to find this info. The procedure is very simple. I currently have an HTC Sprint Hero running Android 1.5, so I'm not sure what other devices or builds this will work on...

Open the Android web browser. In the address bar enter 'about:debug' where you would normally enter a URL and hit enter or Go. Be sure to erase the 'http://www.' that the browser likes to leave in the address bar for you. No page will load and you may or may not get a pop-up message 'Debug mode'. But if you now go to Menu > More > Settings in the browser and scroll to the bottom of the list, you should see a new group of options under the 'Debug' heading. The bottom setting is 'UAString' and if selected will give you the option of enabling your browser to identify itself as Android, Desktop or iPhone. Results after making this switch have been mixed, but go ahead and give it a try if you have a need to. I'm not sure what the other options do, so use at your own risk.

Feel free to leave a reply if you found this information helpful, or if it does or does not work on your particular device / build.

search terms: Android Browser Hidden Debug Settings Change User Agent String Identify Desktop Firefox iPhone about:debug UAString


THANK YOU!!!!!!!!!!! Ive been going mad trying to figure out how to do this.

just got a Droid Charge and it had a user agent in the stock rom, just switched to gummy charge and it was gone. Was almost gonna unroot to get this option back. never liked skyfire much.

off topic but, does anyone know if firefox will ever support flash?

Gambit - I would gladly send you a beer for this tip. got a paypal button?



EDIT - It only worked and rendered the full site once. now nothing. Any thoughts ?
kkeller87 is offline  
Last edited by kkeller87; August 8th, 2011 at 09:05 PM.
Reply With Quote
Old August 8th, 2011, 10:55 PM   #16 (permalink)
Senior Member
 
LBPHeretic's Avatar
 
Join Date: May 2010
Location: Wilmington, Delaware
Posts: 2,368
 
Device(s): Sprint HTC Hero (OEM Android 2.1) [Rooted] B&N Nook Color
Carrier: Not Provided

Thanks: 46
Thanked 507 Times in 407 Posts
Default

Quote:
Originally Posted by kkeller87 View Post
THANK YOU!!!!!!!!!!! Ive been going mad trying to figure out how to do this.

just got a Droid Charge and it had a user agent in the stock rom, just switched to gummy charge and it was gone. Was almost gonna unroot to get this option back. never liked skyfire much.

off topic but, does anyone know if firefox will ever support flash?

Gambit - I would gladly send you a beer for this tip. got a paypal button?



EDIT - It only worked and rendered the full site once. now nothing. Any thoughts ?
You could try one of the Dolphin Browser apps from the Android Market. They they have the ability to change the user agent string.

I like Dolphin Browser Mini on the Sprint HTC Hero. I use Dolphin Browser HD on my B&N Nook Color.
__________________
Nokia 638 > Motorola Talkabout > Motorola V60t > Motorola V60i > Motorola V505 > Samsung Epix > HTC Hero & Barnes & Noble Nook Color

Tweet with me about Android on Twitter. (Please follow to see my tweets.)
LBPHeretic is offline  
Reply With Quote
Old August 9th, 2011, 07:24 AM   #17 (permalink)
New Member
 
jaggu.004's Avatar
 
Join Date: Jul 2011
Location: india
Posts: 2
 
Device(s): samsung galaxy ace
Carrier: Not Provided

Thanks: 1
Thanked 2 Times in 1 Post
Lightbulb Easiest way!!

Just open stock browser and type "about:useragent" and select the one u want!!!
jaggu.004 is offline  
Reply With Quote
The Following 2 Users Say Thank You to jaggu.004 For This Useful Post:
djudji (August 14th, 2011), Gambit (August 16th, 2011)
Old August 14th, 2011, 08:51 AM   #18 (permalink)
New Member
 
Join Date: Sep 2010
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Cool

Quote:
Originally Posted by jaggu.004 View Post
Just open stock browser and type "about:useragent" and select the one u want!!!
That my friends was dead cool simple .
djudji is offline  
Reply With Quote
Old November 29th, 2011, 12:07 PM   #19 (permalink)
New Member
 
Join Date: Nov 2011
Location: Bitterroot Valley MT
Posts: 1
 
Device(s): Droid X, Droid2, Droid
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tchall
Default

Works great on a Droid X...

Thanks, I was hating the "touch" or "M" site interfaces with a better than VGA screen!
tchall is offline  
Reply With Quote
Old September 22nd, 2012, 10:59 PM   #20 (permalink)
New Member
 
Join Date: Sep 2012
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 3 Times in 1 Post
Default MetroPCS not allowing

Quote:
Originally Posted by pwabbit View Post
I am not sure about the method in the stock browser, but the Dolphin browser has a setting for that.
Seemed like this was the answer for me. I've been trying to figure out how to be able to access a website requiring I.E. on my laptop (tethered to my phone). I've had to do the user-agent switch in I.E. so that MetroPCS would allow the internet to flow into laptop, but then the site won't work... because it thinks my I.E. is an android.

Didn't realize you could change user agent in droid browsers... but it didn't work anyway I used the Custom option in Dolphin (and used the string matching I.E. 9), and now get "MetroPCS does not allow tethering..." message on my phone

Think I'm going to have to suck it up and pay them for making my phone a hot spot so I can do the business I need.
BrokerJB is offline  
Reply With Quote
sponsored links
Reply
Tags
agent, android, browser, desktop, user


Go Back   Android Forums > Android Phones > HTC Hero (Sprint) > Sprint Hero - Support and Troubleshooting
Thread Tools

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://androidforums.com/sprint-hero-support-troubleshooting/28642-how-change-user-agent-string-setting-stock-android-browser.html
Posted By For Type Date
Change the web browser user agent to Internet Explorer (Android 2.0/2.1) - Android Help This thread Refback February 10th, 2011 05:59 PM


All times are GMT -5. The time now is 01:38 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.