LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   How does my browser's user agent include my phone's model? (https://www.linuxquestions.org/questions/linux-mobile-81/how-does-my-browsers-user-agent-include-my-phones-model-4175705017/)

JASlinux 12-16-2021 09:55 AM

How does my browser's user agent include my phone's model?
 
Are user agents created at the time of installation, or does each Android model have its own version of the major browsers?

enigma9o7 12-16-2021 10:21 AM

No and No.

teckk 12-16-2021 02:13 PM

https://user-agents.net/browsers/android
https://myip.ms/view/comp_browsers/8384/Android.html

If you want to change your user agent, then use a web browser that has that function.

If you want to see what your web browser is reporting
https://ipchicken.com/

I am using my own browser right now. And it reports
Code:

Browser: Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/78.0.257670029 Mobile/19A348 Safari/604.1
Because that is where I have it set. So I get smaller/lighter pages.

I use naked browser on the androids I have. It allows for user agent changing.

ondoho 12-18-2021 03:33 AM

With javascript enabled in your browser, the site you're visiting can find out much more about your system than what the user agent provides.

JASlinux 12-25-2021 05:43 AM

Quote:

Originally Posted by ondoho (Post 6310526)
With javascript enabled in your browser, the site you're visiting can find out much more about your system than what the user agent provides.

And you can't use most sites without it, so they gotcha.

Is there more known than what is available on: https://www.whatismybrowser.com/?

I use browsers in Linux and Android, and I would be happy to get my devices' models out of the user agent.

JASlinux 12-25-2021 06:09 AM

Are you stating you use a mobile user agent in your desktop browser?

I use builtin Chrome, Opera, and sometimes Firefox on Android and I want the phone's model out of the user agent.

Quote:

Originally Posted by teckk (Post 6310131)
https://user-agents.net/browsers/android
https://myip.ms/view/comp_browsers/8384/Android.html

If you want to change your user agent, then use a web browser that has that function.

If you want to see what your web browser is reporting
https://ipchicken.com/

I am using my own browser right now. And it reports
Code:

Browser: Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/78.0.257670029 Mobile/19A348 Safari/604.1
Because that is where I have it set. So I get smaller/lighter pages.

I use naked browser on the androids I have. It allows for user agent changing.


teckk 12-25-2021 06:23 AM

Quote:

Are you stating you use a mobile user agent in your desktop browser?
Yes of course. I built a couple of web browsers for myself that do what I want a browser to do.

iPhone

teckk 12-25-2021 06:24 AM

Win 10

teckk 12-25-2021 06:24 AM

Arch Linux

teckk 12-25-2021 06:33 AM

Maybe not as pretty as some, but it does what I want, not wants it wants. As I gain more knowledge on C and C++, perhaps I can do better.

Code:

curl -F'file=@testA.png' https://0x0.st
https://0x0.st/orcb.png

https://0x0.st/orcb.png

enigma9o7 12-25-2021 09:09 PM

1 Attachment(s)
Quote:

Originally Posted by JASlinux (Post 6312341)
I would be happy to get my devices' models out of the user agent.

What exactly do you mean device model? The device model is not normally in the user agent.

For example my useragent from Firefox on Lineage(Android); no mention of device model:

Mozilla/5.0 (Android 11; Mobile; rv:95.0) Gecko/95.0 Firefox/95.0

I also have an older motorola phone running stock oreo and basically the same but 8.0.0 for version...

JASlinux 12-26-2021 10:50 PM

Quote:

Originally Posted by enigma9o7 (Post 6312461)
What exactly do you mean device model? The device model is not normally in the user agent.

You're right for pc browsers.

Quote:

I also have an older motorola phone running stock oreo and basically the same but 8.0.0 for version...
My exact phone model is in my Android browsers' user agent.

I'm trying to understand how it got there and how to get it out.

teckk 12-27-2021 05:12 AM

Quote:

I'm trying to understand how it got there and how to get it out.
Those little android browsers report what they want. Unless you have one that has a user agent switcher.

Android is all proprietary the way the phone companies and device makers have them. You'll have to get the java source for the browser and look at it. That is if it is available. Otherwise, there is nothing that you can do about it. Some hardware makers like marvel won't even release the instruction set for their processors so that you can build a kernel for one.

Android is google. You can get a ROM and install it in the phone/tablet. That is if you can find one for your device, and your phone company allows it.

Or, use an open source web browser.

https://search.f-droid.org/?q=web+browser&lang=en

https://play.google.com/store/apps/d...er&hl=en&gl=US
https://play.google.com/store/apps/d...hl=en_US&gl=US

enigma9o7 12-27-2021 09:10 AM

https://f-droid.org/en/packages/org....fennec_fdroid/

That search above of Fdroid didn't show Fennec, which is firefox built from source (and signed by fdroid)...

But even firefox from aurora/playstore doesn't include any model number for my android devices. I'm still curious to see what your useragent from firefox/android shows... I pasted mine from two devices above and no device model...

ondoho 12-29-2021 07:23 AM

Quote:

Originally Posted by JASlinux (Post 6312618)
My exact phone model is in my Android browsers' user agent.

Show us. I've never seen that.


All times are GMT -5. The time now is 01:37 PM.