LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 12-16-2021, 09:55 AM   #1
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Rep: Reputation: Disabled
Question 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?
 
Old 12-16-2021, 10:21 AM   #2
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
No and No.
 
Old 12-16-2021, 02:13 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
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.
 
Old 12-18-2021, 03:33 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
Old 12-25-2021, 05:43 AM   #5
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.
 
Old 12-25-2021, 06:09 AM   #6
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
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 View Post
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.
 
Old 12-25-2021, 06:23 AM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
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
 
Old 12-25-2021, 06:24 AM   #8
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Win 10
 
Old 12-25-2021, 06:24 AM   #9
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Arch Linux
 
Old 12-25-2021, 06:33 AM   #10
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
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
 
Old 12-25-2021, 09:09 PM   #11
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Quote:
Originally Posted by JASlinux View Post
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...
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20211225-190548.png
Views:	14
Size:	184.0 KB
ID:	37925  
 
Old 12-26-2021, 10:50 PM   #12
JASlinux
Member
 
Registered: Oct 2020
Posts: 380

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by enigma9o7 View Post
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.
 
Old 12-27-2021, 05:12 AM   #13
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
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
 
Old 12-27-2021, 09:10 AM   #14
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
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...
 
Old 12-29-2021, 07:23 AM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by JASlinux View Post
My exact phone model is in my Android browsers' user agent.
Show us. I've never seen that.
 
  


Reply

Tags
android, browsers, user agent



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Puppet agent gives 500 error access denied using master/agent model AlanRaczek CentOS 3 03-21-2019 07:16 AM
bash: all --user-agent for "wget --user-agent " frenchn00b Programming 1 07-07-2009 05:25 AM
Error: Agent Configuration Agent (use Oracle with Linux) shipon_97 Linux - Enterprise 0 02-02-2007 12:11 AM
can't find ide.agent & block.agent for hotplug for 2.6 jg167 Linux - Newbie 1 06-23-2004 05:20 PM
Hotplug problems: RH 9, 2.6.6, PCMCIA-CS 3.2.7 (missing ide.agent & block.agent) jg167 Red Hat 1 06-23-2004 05:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 09:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration