How To - Load full desktop websites permanently in Chrome for Android

Search This thread

pop4xda

Senior Member
Oct 27, 2017
67
17
Thanks for sharing your tweak. It's great.

I'm using it now on my Nvidia Shield TV. I can browse Chrome with visible multiple tabs for switching back and forth easily.
 

yoga-user

Member
Feb 15, 2017
9
2
Thanks a lot! Works great on my Lenovo YB1-X90F with Android 7.1.1. Used UA-String: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.99 Safari/537.36 OPR/50.3.2426.136976
 

JinBridge

New member
May 23, 2018
1
0
Is there any way to load full desktop websites with the USB debug mode off?:confused::confused:
My device isn't root.:)
 

arddy1

Senior Member
Jun 18, 2016
175
191
Jakarta
Thank you, it works great. I hate google amp, so i have to change the user agent to firefox mobile. No more ugly amped page
 
Mar 24, 2011
32
4
This got my desktop style tabs back! I am so happy now, thank you so much! Think I can get it to work on Kiwi browser?

edit: It did work with kiwi browser just had to set it as the debug app
com.kiwibrowser.browser
I couldn't get the desktop style tabs to work with the bottom tool bar setting unfortunately
 
Last edited:

pop4xda

Senior Member
Oct 27, 2017
67
17
This got my desktop style tabs back! I am so happy now, thank you so much! Think I can get it to work on Kiwi browser?

edit: It did work with kiwi browser just had to set it as the debug app
com.kiwibrowser.browser
I couldn't get the desktop style tabs to work with the bottom tool bar setting unfortunately

How do you make Chrome showing desktop style tabs?
 
Mar 24, 2011
32
4
By following number 5 but setting the scale factor lower. I can't remember the number I used but its fairly easy to just experiment with different values. Id start low.
 

xmr73

New member
Dec 23, 2019
1
0
Thanks, it was very useful.
I used another configuration with the current last user agent and a scale factor of 1.

I share my experience in case it's useful for someone:
First the code I used for the "chrome-command-line" file:
Code:
chrome --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" --force-device-scale-factor=1
Then I placed the file on "data/local/tmp" with the app "Root Essentials" (and then I gave the 0755 permission). With the app "Root Browser" I could edit that file, trying different scale factors.
And finally, on a PC with a terminal and the following code I gave chrome beta the debug permission.
Code:
adb shell am set-debug-app --persistent com.chrome.beta

This setup gives me full view of the pages, and then I zoom wherever I want. For "mobile mode" I need factor>=1.85, but the zoom given is the same as without desktop mode for me.
 

JayBTV

Senior Member
Aug 26, 2010
59
10
Does this work in Android 11?

Trying to get it working today and after putting the TXT in /data/tmp w/ the proper permissions, and setting debugging mode, it's still not defaulting to desktop view.

Thanks for any suggestions, or confirmation that this is currently not working on Android 11.
 

andris155

Member
Nov 17, 2014
34
48

_MU

Senior Member
I've been using Brave Browser (which is based on Chrome) and it has a built in option to ask for desktop version of websites automatically in Settings > Advanced > Site Settings > Desktop mode > Prefer desktop version of websites. Before I was using Chrome with the method provider by OP and it had been great, but unfortunately at some point it stop working for me, so I found this alternative and I recommend testing it.
 

Attachments

  • Screenshot_20210101-224828_Brave.jpg
    Screenshot_20210101-224828_Brave.jpg
    55.9 KB · Views: 31
  • Like
Reactions: galaxys

satand

Senior Member
May 4, 2015
491
48
the how to works still perfectly with android 11. but recently amazon music and amazon photo stopped working because both apps are complaining that I'm using an old version of google chrome and an update is required. I'm using the latest chrome version, so the problem seems to occur because of the modified user agent.

what user agent setting do you currently recommend?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    -
    Welcome to the permanent desktop mode for chrome on android thread, previously I had been posting my work on the back of an older thread from 2012, but as the op had long abandoned it, i have decided to make my own thread so its less confusing for users to find the current version.

    The boring part:
    Firstly with android N (and i assume all future versions, this is the case with O) because of selinux permissions chrome can no longer read from /data/local however the fix for this is simple (rather than messing with selinux) this location needs to be changed to /data/local/tmp which it can read.

    However this is also not the end of the story, it appears recent versions of chrome and chromium wont actually even attempt to use the file (command line options) unless your running in debug mode.. most roms are not set as debug builds, however the fix for this is simple, in developer options set chrome into debug mode.

    Only google knows why they cant just let us have a permanent destkop mode on chrome for android after all this time, its an insane stance to take for so long.

    References:
    1. Change of location for file, here and here
    2. Change to requiring debugging application, here

    How to make it work:

    1. Installing the chrome command line file

    Use one of the attached flash'able zips (attached below) and flash with recovery, this is the far easier way to install it.

    Alternatively you can deploy manually with a root file explorer (and set permissions of the file to 755), the file must be placed into /data/local/tmp/.

    Finally if you dont have root you can use the attached txt file and then follow the adb instructions at this post (adjusting the location to /data/local/tmp), eg:

    adb push chrome-command-line /data/local/tmp/chrome-command-line

    *Note : If your using the manual deploy using a root file explorer or the adb method above, you will need to manually adjust the scale factor in the below text file and also rename it from "chrome-command-line.txt" to become "chrome-command-line" (obviously sans quote marks).

    2. Turning on developer options and setting chrome debug mode

    Enable developer options, open developer options menu under settings and scroll down until you see "select debugging app", select it and select chrome, next ensure that the option below "wait for debugger" is set to off.

    If however you discover the debugging app does not have chrome (or anything else) and just says none, you can still enable this over adb, first enable usb debugging and then run the command:

    adb shell am set-debug-app --persistent com.android.chrome

    After this chrome will be set into debugging mode, you can confirm this by entering the developer options menu again and you should now see chrome is now set.

    3. Forcing zoom

    In chrome go into the settings menu, then accessibility, and then at the bottom select "force enable zoom".

    4. Restarting chrome

    Close chrome (fully, ie kill application) and relaunch and enjoy desktop mode.

    Note: Ive set the user agent to the latest build of chrome for Linux, so your going to need to adjust this if you want to impersonate another browser.

    5. Scale Factors

    *IMPORTANT UPDATE* - Since the June 2018 build of chrome for android it appears they have made a fairly major change of how the android app decides which interface (tab switching) method is used, ie phone or tablet (ie similar to desktop chrome). Previously if you were on a phone you could set the scale factor to what ever you wanted and would still always get the mobile interface, however now it appears to make this decision after taking force-device-scale-factor into account. So if you set the force device scale factor to a number thats to low your going to end up with the tabbed tablet interface, some users may love this, but if your not one of these people your only choice at this stage is to increase the scale factor number until you get the mobile interface again. The other change here is previously scale factors needed to be in 0.25 increments, it does appear that now it will accept x.xx,so any faction. This means you can now fine tune things a little more to get a larger view port but keep the mobile interface (tab switching method).

    Years ago when i started to use this mod, there was no need to use a scale factor, but as our devices have started to have ever increasing resolution on smaller screens, it a worth while way to make things easier to read on the smaller screens, whilst still getting desktop mode on websites.

    Some websites will decide what version you get only by your user agent, however a lot of websites now (wordpress sites for example), do this either or also by looking at the available view port size (typically the width). So whilst using scale factor is a great idea for reducing the amount you need to zoom, set it to high and your still going to get the mobile version. You may also find that in portrait mode you will still get a mobile version of a website due to the restricted width, however the increased width in landscape mode should allow you to get the desktop version still.

    So what scale factor should you use, the below is a rough guide:

    Resolutions below 720p - Use a scale factor of 1 or maybe upto 1.25, but your most likely going to see mobile version of websites with 1.5 or above.

    Resolutions of 1080p - Use a scale factor of 1.5, 1.75 or 2, with a scale factor of 2 most websites will give you a desktop version, but you may find if you hold your device in portrait that you get the mobile version due to the width of the view port.

    Resolutions above 1080p, i would use a scale factor of 1.75 to 2 or maybe even higher if you have a 4k screen.

    But bear in mind the scale factor is very subjective, a 5" phone with a 1080p screen is not the same as 10" tablet with 1080p, my advice is try something from the above suggestions and see what works for you, scale factors will accept whole or 1/4 numbers (so in 0.25 increments). The higher the scale factor the larger things will be, essentially if you had say a view port width of 1000 and you used a scale factor of 2, your view port is now 500, but as your screen has not shrunk, stuff is basically displayed as if you have a lower resolution screen, (but you dont) so essentially stuff appears bigger.

    Personally I use a scale factor of 1.85, which on a 1080p 5" based device, if i go lower than 1.8 i will get lose the mobile tab switching method and get the tablet tab switching method/interface.

    Note: This method also has been tested and works with Chromium, Chrome Beta, Chrome Dev, Chrome Canary, set any one of these a the debug app and they will instead read the command line file.
    2
    Did some testing with this. It is a mix of force-device-scale-factor and user-agent.
    Some sites check your UA and some your screen size (scale).

    --force-device-scale-factor=x.x

    < 1.5 always loads pages like PC
    > 1.6 always loads pages like Mobile
    >2 uses no tabs, like phone (can combine with --enable-accessibility-tab-switcher)
    <2 always tabs, like tablet

    Playing with the scale sometimes need you to adjust font scale in Accessibility settings

    Content of the chrome-command-line (1280x1920):
    Code:
    chrome --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36" --force-device-scale-factor=1.5 --top-controls-hide-threshold=0.5 --top-controls-show-threshold=0.5 --no-referrers --disable-notifications --enable-async-dns --enable-vulkan


    For NON Rooted devices:

    adb push chrome-command-line /data/local/tmp
    adb shell chmod 755 /data/local/tmp/chrome-command-line
    type this in chrome: chrome://flags#enable-command-line-on-non-rooted-devices and enable
    (you get a warning that it is activated!)

    For Root devices:

    adb push chrome-command-line /data/local/tmp
    adb shell
    su
    mv /data/local/tmp/chrome-command-line /data/local/
    chmod 755 /data/local/chrome-command-line


    Command line options from Chrome Browser java code:
    Code:
    enable-crash-reporter-for-testing
    enable-idle-tracing
    renderer-wait-for-java-debugger
    trace-startup
    enable-test-intents
    force-show-update-menu-badge
    disable-fullscreen
    top-controls-hide-threshold
    top-controls-show-threshold
    open-custom-tabs-in-new-task
    no-touch-mode
    enable-vr-shell-dev
    disable-contextual-search
    enable-contextual-search
    webview-sandboxed-renderer
    enable-incognito-custom-tabs
    allow-incognito-custom-tabs-from-third-party
    enable-accessibility-tab-switcher
    enable-dom-distiller
    disable-reader-mode-bottom-bar
    webview-disable-safebrowsing-support
    enable-spdy-proxy-auth
    disable-external-intent-requests
    force-dump-upload
    disable-fre 							First Run Experience
    force-first-run-flow-complete
    enable-data-reduction-promo-infobar
    enable-data-reduction-proxy-savings-promo
    type
    strict-mode
    disable-domain-reliability
    always-extract-webapk-dex-on-startup
    survey_override_site_id
    force-enable-chrome-survey
    disable-instant
    ignore-background-tasks
    use-mobile-user-agent
    force-device-scale-factor=				<1.56 loads PC style pages, with tabs, set text to 150%! >2 uses no tabs like phone
    webview-safebrowsing-block-all-resources
    wallet-service-use-sandbox
    enable_partner_search_engine_promo
    enable_existing_user_search_engine_promo
    webview-sandboxed-renderer
    default-country-code
    enable-low-end-device-mode				
    disable-low-end-device-mode				
    log-native-library-residency
    dont-crash-on-view-main-intents
    no-restore-state
    enable-incognito-snapshots-in-android-recents
    enable-test-intents
    disable-digital-asset-link-verification-for-url
    custom-tabs-log-service-requests
    partner-homepage-for-testing
    disable-tab-merging
    check-for-web-manifest-update-on-startup


    Command line options from Chrome Browser lib file:

    https://peter.sh/experiments/chromium-command-line-switches/


    Have fun
    1
    This is awesome, I did it in a non-rooted nexus 5 but used chrome canary instead to not affect my regular chrome experience.
    The only difference was the following command:
    adb shell am set-debug-app --persistent com.chrome.canary
    1
    i flashed the zip but im having the same problem i.e. chrome doesnt show up in select debug app... im on a moto g5s plus and have an unofficial pixel experience 9 rom

    ---------- Post added at 06:08 PM ---------- Previous post was at 05:56 PM ----------

    i flashed the zip but im having the same problem i.e. chrome doesnt show up in select debug app... im on a moto g5s plus and have an unofficial pixel experience 9 rom
    okay i found the solution myself... paste that debug file in /data/local instead of /data/local/tmp and u should be good ?
    1
    I've been using Brave Browser (which is based on Chrome) and it has a built in option to ask for desktop version of websites automatically in Settings > Advanced > Site Settings > Desktop mode > Prefer desktop version of websites. Before I was using Chrome with the method provider by OP and it had been great, but unfortunately at some point it stop working for me, so I found this alternative and I recommend testing it.