[Q] Dalvik User Agent Change - Android Q&A, Help & Troubleshooting

Hello and good morning to all,
I'd like to ask a maybe quite detailed question:
Does anybody know a way to change the user agent which is put out by the Dalvik VM?
The idea is to mask the Android handset to look like something else...;
My handset connetcs via WiFi using a permanently changed MAC address ('borrowed' from my ages-old Commodore Amiga Ethernet Card) to look like a Commodore International Device and displays a host name "HAL 9000" (instead normal android-43289.....).
Fennec's user agent is also altered; but apps requesting information from the net seem to use the Dalvik VM, so I'd like to change the user-agent of the Dalvik VM as well...
Above explanation given, I'd like to change lines like the ones below:
Dalvik/1.4.0 (Linux; U; Android 2.3.6; GT-S5830i Build/GINGERBREAD)
Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9301 I Build/KOT49H)
I am quite sure that a different user-agent string for the Dalvik VM would not do much difference (if any) to the sending/requesting app, or would it?
Any ideas and/or help would be greatly appreciated!
Greetz, Frizz

I just found this post as I recently became frustrated with not having an infallible means to change the user-agent of my phone.
Although i change my user-agent frequently in Windows and Linux, I never investigated the means to change it on my Android.
Your post above however seems to imply that, at least with browsers, any user-agent string you might be able to change, would be overridden by the identification of the device from the MAC of the wireless NIC (which is how I typically access the internet). Unfortunately, even though I'm rooted, there does not seem to be a way to spoof the MAC address on my HTC One m8 (our at least no one had figured out how to do this).
Regarding apps, although I never thought about it, I could see the Dalvik VM being responsible for identifying the user agent.
Either way, I'm going to research this further and take a stab at writing an app that changes the MAC on my phone and will see how you could change the Dalvik user-agent, because I do think that there should be some way of changing the user-agent universally for your phone.
Anyway...I'll post here after I've done some research.

Related

[Q] Internet Surfing

Hi This my name is Camillo.
i have a question about my Hd2.
The problem is that if i am on the internet i always been directed to the mobile page, but isnt there a way so that i can go to the normal webpage. i wil really make things a lot easyer. sorry about my inglish. thank you in advance.
Your browser identifies itself as beeing a mobile device.
It is a service of the site to direct you to theit mobile version: less data transfer, less use of flash, silverlight and that kind of stuff.
Mostly those sites have a button to see the original site often at the top or at the bottom of the page.
Other possibility is to change your User Agent string (opera:config) to "Opera/9.64(Windows NT 5.1; U; en) Presto/2.1.1" (without quotes) note original user agent string before changing, so you can revert.
This identifies as a windows opera browser, but possibly websites will not be full functioning.
Also from the settings of the browser
tank you, but can you explain how to.do this to change the string
Just do what I do. Keep Google as a homepage and at the bottom of the page there is a mobile and 'classic' option, click the Classic and you are sorted.
There are registry fixes, but I can never be bothered to change the values and strings.
i have used the google option and it worked like a charm. tank you all for your time and answers.

[REQ] Opera Mobile 9.7 User Agent Cab

I found this intersting topic
http://forum.xda-developers.com/showthread.php?p=5786377#post5786377
"I've figured out how to get Opera Mobile 10 Beta 3 to only display websites in desktop view without getting redirected to a mobile version of the site. UPDATE: Works in Opera 10 Final too!
The first 2 steps are pretty common knowledge, but they don't work for all sites. It's the 3rd step that makes every website work for me.
Step 1: Set a custom user agent string
This tells websites what kind of device you are using to browse the site (desktop computer, smartphone, etc).
Goto opera:config -> User Prefs -> Custom User-Agent
Find a desktop user agent string, type it in, and save. I'm using the one from my Firefox browser on my home desktop (it can be found by clicking Help -> About Mozilla Firefox). Mine looks like this:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
You can use whatever string you can find that works. I've even seen people use an iPhone user agent to get iPhone versions of websites.
Step 2: Spoof a user agent ID
This tells websites what client you are using.
Goto opera:config -> User Agent -> Spoof User Agent ID
Type in the number corresponding to a browser to identify as that browser
Global values:
1 = Opera
2 = Mozilla
3 = Internet Explorer
Site-specific values:
4 = Mozilla, Opera not mentioned
5 = Internet Explorer, Opera not mentioned
Don't forget to save. I have mine set to 2, so websites think I'm using Firefox
Step 3: Set custom HTTP_Accept parameters
This one is hard to explain, but it basically tells the website which versions (i.e. desktop or mobile) are acceptable for viewing.
Goto opera:config -> Network -> HTTP Accept
Type this in exactly:
text/html, application/xml;q=0.9, application/xhtml+xml, application/x-obml2d, multipart/mixed, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Please note that this is just the default entry minus the one element that allows for mobile/wap viewing.
Also in the Network section, go to HostName Expansion Prefix and delete wap from the list. Remember to save. Exit the browser and everything should work like a desktop from now on! You can go to www.whatsmyuseragent.com to check and see if everything is right. If you still want to view mobile versions of sites, you'll have to type in the specific mobile URL for that site (I keep mobile versions of my bookmarks just in case I get stuck on EDGE or a slow connection).
Hope this helps! If anyone with web-coding experience would like to explain further or correct anything I did wrong, please be my guest!"
by Eman3000; thx!
It's really useful and it does work everywhere.
However it takes ages to do it everytime.. can anyone make this process a lot faster? like write a .cab and/or a .reg?
Thanks
Loved it!
Been looking for alternative browser for this sole reason. Nice and easy workaround (with proper credits given and a link to the source... you rock). Thanks for the share.
The opera repo thread is riddled with so much "spam" posts that I'm sure I'd have never found it. Definitely the most useful hack I read in quite a while.
EDIT: I used this in Opera 9.5. Did some digging and this info seems to be stored in opera.ini (stored in Application Data in Opera's folder... don't know if this is a constant over versions) which somewhat makes the cab method unfeasable (considering that it would affect all of the other user settings...). Also compared complete registry dumps and nothing was changed so the reg method is out. Would be however possible to Mortscript this (may need to be adapted according to Opera version which could be a pain).
EDIT2: Searched xda and found this. Took a peek with MSCEInf and found these cabs just change a few lines in the registry (no files). No for my version but may interest you.
you also can use my free software "UA_Change" :
http://www.i900playeraddict.com/corwin.php?soft=evb_ua_change
or here :
http://forum.xda-developers.com/showthread.php?t=848812
All Opera Mobile/Mini versions: Official thread
Yes, there is great information collected in here, have a deep read to 1st page
frmariam said:
Been looking for alternative browser for this sole reason. Nice and easy workaround (with proper credits given and a link to the source... you rock). Thanks for the share.
The opera repo thread is riddled with so much "spam" posts that I'm sure I'd have never found it. Definitely the most useful hack I read in quite a while.
EDIT: I used this in Opera 9.5. Did some digging and this info seems to be stored in opera.ini (stored in Application Data in Opera's folder... don't know if this is a constant over versions) which somewhat makes the cab method unfeasable (considering that it would affect all of the other user settings...). Also compared complete registry dumps and nothing was changed so the reg method is out. Would be however possible to Mortscript this (may need to be adapted according to Opera version which could be a pain).
EDIT2: Searched xda and found this. Took a peek with MSCEInf and found these cabs just change a few lines in the registry (no files). No for my version but may interest you.
Click to expand...
Click to collapse
Glad it helped!
the setting are stored in "opera.ini" you said..
how about a banal copy-paste from the old ROM to the new one of this file?
I also use opera 9.7, latest build. Are the setting still stored in the opera.ini file?
EDIT: Someone says yes.. someone no.. mhmhm... Anyone has a proven answer pls?
What's Mortscript?
Corwin9S said:
you also can use my free software "UA_Change" :
http://www.i900playeraddict.com/corwin.php?soft=evb_ua_change
or here :
http://forum.xda-developers.com/showthread.php?t=848812
Click to expand...
Click to collapse
What you said changes only the UA
In the process I wrote in the first post there's other tricks not related to the UA setting. Also I don't speak french
but thx.
orb3000 said:
Yes, there is great information collected in here, have a deep read to 1st page
Click to expand...
Click to collapse
looked as deep as I could.. didn't find anything answering my question.. lol
So, opera is the best brower for android. I solved the problem by this way too. Thanks you for your tip, and opera too.
you the man
you are freaking awesome.. i would need a degree in networking to be able to do those stuffs
thank you

Getting android tablets on a windows environment

Hey there XDA.
i'm in the IT department for a big-time company, and we (obviously) have specific security parameters on our network.
Recently, with all of the talk about android tablets because of CES and other factors (i personally own a Viewsonic G-Tablet running VEGAn 5.1b) the team and i have come to wonder if we would be able to put an android tablet onto the domain the same way we would a regular old Windows PC/Laptop or a Blackberry phone onto the exchange server.
We use Citrix clients/servers as well as pc/laptops, and so far, as i've been scouring the market, i've been able to find a Citrix app, and a Wyse terminal app, which could be used to open VPN sessions on the server, as well as another app which allows an android device to be connected completely with Microsoft Exchange Server. ( touchdown http://www.nitrodesk.com/TouchDown.aspx )
So, i figured, where else would i go but here, to the most well versed android development website on the interwebs, to ask if you guys might know of anything at all, or if something could be done.
Any ideas?
Sent from my X10a using XDA App
Hi,
I'm kind of unclear about what you're looking for, from your post, I guess because there could be any number of interpretations, e.g.:
- Are you asking if an Android device could be joined to your Windows domain?
- Are you asking if you can "see" shares on your Windows machines from Android?
- Are you asking if you can RDP to a Windows machine from Android?
- Etc.?
Probably (I think) #1 above is "no", at least as far as I can see now (plus I don't know if it'd make sense).
The answer to the 2nd and 3rd are "yes".
For #2, either you can use something like ES File Explorer, or you can use CIFS Manager on an Android machine that has CIFS support.
For #3, Pocketcloud can do that (the one from Wyse), and there are a few more.
Jim
jimcpl said:
Hi,
I'm kind of unclear about what you're looking for, from your post, I guess because there could be any number of interpretations, e.g.:
- Are you asking if an Android device could be joined to your Windows domain?
- Are you asking if you can "see" shares on your Windows machines from Android?
- Are you asking if you can RDP to a Windows machine from Android?
- Etc.?
Probably (I think) #1 above is "no", at least as far as I can see now (plus I don't know if it'd make sense).
The answer to the 2nd and 3rd are "yes".
For #2, either you can use something like ES File Explorer, or you can use CIFS Manager on an Android machine that has CIFS support.
For #3, Pocketcloud can do that (the one from Wyse), and there are a few more.
Jim
Click to expand...
Click to collapse
Thanks for the reply, and yes i was looking to concentrate more around number 1. If number 1 were to be solved, number 2 would end up working out perfectly, with no security risks (becuase the shared files are only available to domain devices or thin clients using the VPN/RDP services we have setup). I guess looking at it from another angle, we would probably be able to (theoretically) limit a user's access capabilities on the tablet so that a general user could still be able to access the file shares using VPN without creating a security risk...
as you can see i currently have a whole lot running around in my head, and i'm not even sure if i'm mkaing it sound like english... T_T
I use my Zpad for work, the business apps I use:
Touchdown (for exchange, would like spell checker though)
File Expert (access shares)
Xtralogic Remote Desktop (works VERY well, better than PocketCloud and worth the $25)
mortician10101 said:
Thanks for the reply, and yes i was looking to concentrate more around number 1. If number 1 were to be solved, number 2 would end up working out perfectly, with no security risks (becuase the shared files are only available to domain devices or thin clients using the VPN/RDP services we have setup). I guess looking at it from another angle, we would probably be able to (theoretically) limit a user's access capabilities on the tablet so that a general user could still be able to access the file shares using VPN without creating a security risk...
as you can see i currently have a whole lot running around in my head, and i'm not even sure if i'm mkaing it sound like english... T_T
Click to expand...
Click to collapse
It sounds like you're looking for something like PAM authentication capability from the Gtab. I know that there are products that do that for *nix, but I'm not aware of anything specifically for Android. Then again I think that there are public domain implementations, so it might be possible. Sorry that I can't be more help ...
Jim
mortician10101 said:
Hey there XDA.
i'm in the IT department for a big-time company, and we (obviously) have specific security parameters on our network.
Recently, with all of the talk about android tablets because of CES and other factors (i personally own a Viewsonic G-Tablet running VEGAn 5.1b) the team and i have come to wonder if we would be able to put an android tablet onto the domain the same way we would a regular old Windows PC/Laptop or a Blackberry phone onto the exchange server.
We use Citrix clients/servers as well as pc/laptops, and so far, as i've been scouring the market, i've been able to find a Citrix app, and a Wyse terminal app, which could be used to open VPN sessions on the server, as well as another app which allows an android device to be connected completely with Microsoft Exchange Server. ( touchdown http://www.nitrodesk.com/TouchDown.aspx )
So, i figured, where else would i go but here, to the most well versed android development website on the interwebs, to ask if you guys might know of anything at all, or if something could be done.
Any ideas?
Sent from my X10a using XDA App
Click to expand...
Click to collapse
Did you ever figure out anything more on this? We are looking at the same thing right now, and it'd be great if you found any more info out

[Q] SGS2 and 'mobile' websites

Hi Guys,
So, I've been Googling and forum-browsing for about two weeks now trying to find a solution to my problem but haven't been able to find, specifically, what I wanted so I thought I'd try my luck here to see if anyone else has experienced this:
For about a month, give or take, my SGS2 no longer uses 'mobile' versions of websites and I can't work out why (as in, what's changed) – because it used to before.
In case there's any confusion, what I mean is when I go to www[dot]google[dot]com for example, it loads the normal google homepage, not the smaller, optimised mobile google home page. This applies to Facebook, Wikipedia and a bunch of other, unrelated, websites that I browse on my phone that no longer auto-detect my phone and switch me to the mobile site. Which is what I want it to do (switch me to the mobile version of the site, that is).
Anyone else experiencing this and know of a solution?
My SGS2 is unlocked/unbadged, and I am running a custom ROM (Litening 2.2) although I was on 2.2, and previous versions of Litening, without this happening - so I don't think it's the ROM (plus I've searched it's thread).
I've also tried other, non-stock browsers (such as opera and FF) and they have the same issue. I've also tried clearing caches.
I've checked just about every damn setting on the phone that I can find, and Ive even removed almost every non-stock app but nothing seems to fix the issue.
Any help would be appreciated.
they probably forced the useragent of the internet app.
try to tape : about:useragent in the adress bar.
for opera and FF , if i remember, you can manage this in the settings.
Ok it was set to Custom and the code was:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us)
AppleWebKit/530.17 (KHTML, like Gecko)
Version/4.0
Safari/530.17
No idea what that is or what it means, but it seams odd to have so many references to Mac. Anyways I changed it to 'Galaxy S' and now it's working again! Thank you so much!
if i remember, there is a thread in the "theme and apps" section, about managing the useragent to be sure it won't revert to the "default" useragent(the mac one in your custom rom case ^^ ) after closing the app or rebooting the phone .
just in case it reverts again to the Mac one after a reboot
[edit] my bad it was in the android original dev section
http://forum.xda-developers.com/showthread.php?t=1126826&highlight=browser
that's probably how he modifies it, so it will revert to the mac one after a boot :/ (modified framework-res.apk, so you will need to learn to use apk manager if you want a "stock" behaviour).
Or just never reboot! (jokes )
Thanks for your diligence mate, very much appreciated

[Q] Q: How to hide the Android ID to Websites/Server ?

Dear all,
hoping you can help me I would like to ask you, if you know how to change Android´s behaviour to identify itself against websites or the Exchange server ?
I don´t want to let anybody on the server side know, what device I do have/use.
Anybody an idea how to let my Android phone look like e.g. an Microsoft device to the exchange server ?
Thx,
Tequila
I am not sure I got what you're asking for...
I suppose you mean how to change the useragent, that is the string which tells the webserver who you are or, at least, what kind of browser you're using.
If you use opera mobile and turn the useragent into "desktop" the php code will drive you to the desktop version of the webpage, instead of the mobile one.
But still you'll be identified as one who's surfing the net with an android phone.
If you really want to turn yourself into something else and let the webserver believe that you're on windows explore or firefox for desktop or whatever you like, it's just a little bit more difficult.
You just have to write, instead of the URL,
opera: config
then you'll get a config-mask and look for
User Agent
tap on it a fill the "Spoof UserAgent ID" with the appropriate string, that you can easily find via a google search.

Categories

Resources