/e/OS 15 fresh install on OnePlus 7t - System WebView User Agent Settings

Hi, I’ve been moving to /e/ from lineageOS and I’ve been loving the experience so far. However, there’s one issue I haven’t manged to sort out on my own.

I’ve been trying to setup Outlook on the phone, to access my work calendar (this is a must-have, because I am absolutely helpless without my calendar), but the login provider setup by my org refuses to log me in saying that my browser or operating system are too old.

I have checked the user agent of the system web view, and it seems to report a recent chromium version, but it reports to be running on a Pixel 4 with Android 10. I think this may be tripping the login portal off, because I can easily login through the browser in firefox with unchanged user agent.

Things I have tried to solve this:

  • open the login from Outlook in the browser, but couldn’t find an option for this from the webview opened by Outlook during account creation
  • install another system webview implementation, or update the webview, which doesn’t seem to work
  • open the webview devtool to override the user agent but couldn’t find any settings to do so
  • look for a config file or similar to configure the system webview browser settings
  • cry

this brings me here. Is there anything else I can do to tackle this? Ideally I would like the webview to just report the correct device and version information, but I understand that there’s privacy concerns with that. I would just turn that on for the Outlook login and then turn it back to default again.

Appreciate any tips or advice!

-drafty

I guess that is this patch (goes into both webview and browser, referenced in the eos fork here).

I think you went through all the options. By itself the app webview isn’t available to an adb tethered chrome://inspect. The system webview should be as configurable as the browser settings (that does surface user-agent options). Installing alternative webviews is root territory.

Worth a backlog issue entry to change that patch / up the version. murena folk take Microsoft compatibility seriously, it helps b2b sales.

I looked around a bit and I actually think it’s this patch forcing the user agent components to Android 10 and Pixel 4a

1 Like

yes, that is it, straightforward. Maybe tying this to the real android major wouldn’t hurt, more infobits, but reasonably so.

user-agent reduction is what cromite does that would possibly let you pass that login portal, less static, will return the Android major.

I think I found a possible way around this by rooting the phone and installing magisk, zygisk, lsposed and finally the anywebview module to enable the bromite system webview.

unfortunately I also have trouble rooting the phone :upside_down_face:
magisk seems to have installed successfully but I have neither root prompts in apps nor a su binary in adb… not sure what I’m doing wrong.

it’s slightly annoying that the supposedly “default” behaviour of the /e/ browser to spoof the user agent is impossible to turn off, even though the word default would imply the existence of a corresponding switch.

also I couldn’t create an issue on the gitlab, it refused to accept my email address to register an account.

finally! the method above almost worked, anywebview was just too old for my version of /e/, but using the mywebview module instead worked and allowed me to switch to bromite for authenticating to outlook. it’s a bit of a roundabout way, but at least it works!

1 Like

great feedback

If you still want to pursue this in the gitlab, I think the process is sending @manoj who is moderating the forum the email address you want to register with per DM.

Thanks for the suggestion! I’ll do that as soon as I find the time.

TIL (in v3.2) the browser will send out the reduced ‘(Linux; Android 10; K)’ UA string, while the webview will (as your link shows) ‘(Linux; Android 10; Pixel 4a Build/QD4A.200805.003)’. Cromite doesn’t enable kWebViewReduceUAAndroidVersionDeviceModel yet (there’s some adjacent keys too).

Android 16 will bring User-Agent Reduction to the Webview on stock too. The jucier infobits will move to Client Hints and behind a getHighEntropyValues() call - wonder what the login portal vendor you struggled with will do about that.

I’d probably abandon the hardcoded patch, enforce ua-reduction on the webview and report the Android major truthfully.