FORUMS
Remove All Ads from XDA

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

298 posts
Thanks Meter: 98
 
By plazma247, Senior Member on 1st April 2018, 10:58 PM
Post Reply Email Thread
-
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.
The Following 20 Users Say Thank You to plazma247 For This Useful Post: [ View ] Gift plazma247 Ad-Free
 
 
1st April 2018, 10:59 PM |#2  
OP Senior Member
Thanks Meter: 98
 
More
*** Reserved ***
2nd April 2018, 02:31 AM |#3  
bsg411's Avatar
Senior Member
Thanks Meter: 285
 
More
I was using this on Android O for a while then I realized I could no longer utilize the Google app. I use that to get my news feed. Google now almost exclusively uses amp which reroutes all webpages thru Google's servers to help expedite page loading. Unfortunately amp pages don't load in desktop mode. I wish they did because I love using chrome desktop mode full time.
2nd April 2018, 12:33 PM |#4  
OP Senior Member
Thanks Meter: 98
 
More
Hi bsg411, we had discussed your issue on the old thread, its hardly a surprise that when chrome is forced into desktop mode that an accelerated mobile page has an issue, as avoiding mobile pages is exactly what the change does, desktop chrome on the pc or mac wont view amp pages unless your using the developers tab or a plugin.

However as we discussed before, you can get both desktop mode and deal with amp pages (mobile mode) would to use a two browser solution, and to use chrome beta, dev, canary or chromium for amp pages or for desktop pages and then normal chrome for the opposite setup. Its likely you will need to set which ever browser that gets the amp feed as your default browser (or clear preferences and deal with being asked on each click). But this way you can still have a chrome... based desktop and amp browser.

*Update: However i think ive just found another way to make this work...

Open the main Google app, then open the settings pane, select accounts and privacy, and then at the bottom of the page uncheck "Open webpage in the Google app."

This will make the Google app open the links in your default browser, instead of a custom tab in the Google app. The only small side effect is you will may have a pre-page with a redirect notice, but click that and you get the full desktop news web page.

Tested it from the google assistant and the google app and it works in both.
26th April 2018, 02:16 PM |#5  
Senior Member
Thanks Meter: 8
 
More
I have an opposite request.

I'm using Chrome on a 1920x1209 8" tablet (Lenovo tab3 8 plus). I want to use Chrome in "mobile phone" mode rather than "tablet mode". It's there any back to do this.

Thanks
Kiwi

---------- Post added at 01:16 AM ---------- Previous post was at 01:15 AM ----------

I have an opposite request.

I'm using Chrome on a 1920x1209 8" tablet (Lenovo tab3 8 plus). I want to use Chrome in "mobile phone" mode rather than "tablet mode". It's there any back to do this.

Thanks
Kiwi
26th April 2018, 06:46 PM |#6  
OP Senior Member
Thanks Meter: 98
 
More
@kiwijunglist The only major difference between phone mode and tablet mode is in tablet mode you get tabs, sadly there is no way that ive seen to disable this and i suspect it is set by the build prop stating its a tablet (i believe, i could be wrong).

However if your issue is that you would just like stuff larger due to the fact your running at a higher resolution you should be able to use this method, You could technically omit the user agent part and just include "--force-device-scale-factor=x", with x being your desired scale factor. However your going to want to play with this to find something that renders as you want, a good start might be "--force-device-scale-factor=2" other than adjusting this in the command line file, the rest of the instructions will be the same depending on if your rooted or not.

Where as some websites do look at the user agent to serve different versions, some websites (typically wordpress) instead give you different views based on the screen real estate.

If you read here:
https://developer.chrome.com/multide...oid_user_agent

You will see that the only real difference between the two is a mobile will say "Mobile Safari/BUILDNO" where as a tablet will say "Safari/BUILDNO", so you could also include your user agent and then add in mobile and a space before safari.

To get your current user agent on the tablet visit this page on it before you start:
https://www.whoishostingthis.com/tools/user-agent/

Copy and paste it some place and then adjust the command line file to include your user agent + the word mobile before safari.

If you dont want to adjust the scale factor, just leave it out or set it to 1, which essentially does the same.

I would also be interested to know if making this adjustment then also hides the tabs at the top, i have to admit it something that ive not tried and have always assumed it decided this based on the buildprop, but it would be interesting to know if the user agent change has any effect on it, however i suspect it does not as i have this running on a tablet and whilst i get desktop mode, i still get tabs like on desktop chrome.

If your struggling post back your user agent as it stand as the moment, let me know if you want to up the scale factor (effectively text size for a simple explanation) and i will create you a custom command line file to use.
26th April 2018, 07:26 PM |#7  
Senior Member
Thanks Meter: 8
 
More
Thanks. I'll have a read through your post and reply and let you know.

I'm the interim this is my user agent at present.

Mozilla/5.0 (Linux; Android 8.0.0; MI 6 Build/OPR1.170623.027) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.126 Mobile Safari/537.36
26th April 2018, 07:57 PM |#8  
OP Senior Member
Thanks Meter: 98
 
More
Looks like you already have mobile in there so your command line file would need:

chrome --user-agent="Mozilla/5.0 (Linux; Android 8.0.0; MI 6 Build/OPR1.170623.027) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.126 Mobile Safari/537.36" --force-device-scale-factor=2

As i said you may need to adjust your scale factor, however if your goal is to make every thing a bit larger and effectively trick wordpress type websites into giving you a more mobile view, 2 is probably a good start, you will have to have a play.
2nd May 2018, 08:53 AM |#9  
Junior Member
Thanks Meter: 1
 
More
Thanks, this looks really useful
9th May 2018, 09:51 AM |#10  
Senior Member
Thanks Meter: 36
 
More
works great, thank you!!!
13th June 2018, 11:14 PM |#11  
Senior Member
Thanks Meter: 143
 
More
Perfect for using on my Planet Computers Gemini PDA. Made this so much more like a mini-laptop now, thank you!
Post Reply Subscribe to Thread

Tags
chrome desktop mode command line

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes