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.
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.