• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help How to change the User Agent String setting on stock Android Browser

Gambit

Newbie
Aug 13, 2009
29
12
Tampa, FL
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:
Just open stock browser and type "about:useragent" and select the one u want!!!:D:cool::cool::eek:

search terms: Android Browser Hidden Debug Settings Change User Agent String Identify Desktop Firefox iPhone about:debug UAString
 
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.
 
Upvote 0
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
 
Upvote 0
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...
 
Upvote 0
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)
 
Upvote 0
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
 
Upvote 0
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 ?
 
Upvote 0
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. ;)
 
Upvote 0
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 :p

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.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones