Looking for a way to change Android's default User Agent string

Hey there,

I am trying to modify Android’s default User Agent string, which I assume is obtained via WebView.

Recently I have tried out Fauxx, a tracking and data poisoning app. It can fetch the system’s default UA to use for queries. I assume this uses WebView to send the queries to Google and such.

It works as you would expect, but this left me wondering:

How would I modify Android’s default UA?

I guess it is either baked into Chromium WebView (I am on vanilla LineageOS, Android 15), or it is dynamically constructed with some parameters from build.prop or so. (Or something completely different. :sweat_smile: )

Does anyone have any experience with this?

I should mention the goal, before anyone asks:

I am aware that modifying it could make me stand out, and it is probably best to set it to Brave’s, which I actually browse with, so it mixes with the poisoned data.

However, I want to modify the system one, so no app can fetch the default UA, which on LineageOS 22.2 contains the phone model and exact build.

(Note: Newer versions may already use a reduced string, see below.)

Some additional info:

WebView’s dev settings can be invoked with any activity launcher. However, you can only set flags there.

Fun Fact: In 2024 Google of all companies decided to use a default reduced UA string starting with Android 17 for more privacy.

What’s the goal of this? Changing UA is likely worse for privacy when combined with TLS fingerprinting techniques.