Sorry Pixel 4 owners, this won't work on your phone
One of the most talked about features prior to the release of Android 10 was desktop mode. When we first heard that Google's next major Android OS would natively support desktop mode, we were hoping it would be something akin to Samsung DeX or Huawei Easy Projection. Sadly, it was anything but. Google built a barebones launcher for external displays so developers can test what their apps might look like on large displays, but they didn't even bother adding display out on the Pixel 4. Sadly, this means that Android 10's hidden desktop mode is unusable on the latest Pixel smartphone, but if you have the Essential Phone, OnePlus 7/7 Pro, OnePlus 7T / 7T Pro, or any other phone with video output over USB-C, then there's a way to make it more useful.
First, here are some requirements that you have to meet:
Next, here's how to set it up:
- Enable Developer Options on your phone. Go to Settings> About phone and tap on “build number” 7 times.
- Go to Settings> Developer options and scroll down until you reach the “APPS” section. Turn on “enable freeform windows” and “force desktop mode.”
- Reboot your phone.
- Install this APK. It's a customized version of the popular Lawnchair launcher with TaskBar integrated into it. This APK was made by XDA Senior Member farmerbb as a proof-of-concept to show custom launcher developers how they can add desktop mode support *.
- Go to Settings> Apps & notifications> Default apps and set Lawnchair as the default launcher.
- Plug your phone into your monitor / TV using the adapter.
- In a few seconds you should see the custom Android 10 desktop interface appear on the screen. You'll have to grant TaskBar permission to “display over other apps” as requested in order to show the bottom bar. If you also want TaskBar to show your recent apps in the bottom bar, you should also grant it the “usage access” permission as requested.
I would wager that everything looks way too big on your monitor / TV right now. That's because the default DPI for desktop mode in Android 10 is 320, which makes everything look huge. Also, the navigation bar / Android 10 gestural navigation pill probably looks unsightly on your display. There's a way to fix this, but it requires a one-time trick that isn't user-friendly to do.
- Disconnect your phone from your monitor / TV and connect it to your PC.
- Download and install ADB on your PC.
- Follow these instructions to enable wireless ADB.
- Once you have ADB access wirelessly, it's time to re-connect your phone to your monitor / TV.
- On your PC, run the following ADB shell command:
adb shell dumpsys display
- In your terminal / command prompt window, you should see a huge wall of text. Scroll up until you see the part of the output that lists the "Logical Displays." This will list the display information for all currently detected displays, including the built-in one on your phone as well as the externally connected one. For example, “Display 0” is the built-in display on my OnePlus 7 Pro while “Display 3” is the Vizio TV that I connected the OnePlus 7 Pro to. You'll want the display ID value for your external display, which in my case is 3. Note that this value may change when you re-connect your smartphone to a particular monitor / TV, but any UI display changes we're going to make in the next step (s) will be remembered!
- On your PC, you'll want to run the following ADB shell commands:
adb shell wm density [DENSITY] -d [ID] adb shell wm overscan 0,0,0,[OVERSCAN] -d [ID] adb shell wm size [RESOLUTION] -d [ID]
Onde [DENSITY] is a positive integer value, [OVERSCAN] is a negative integer value, [RESOLUTION] is the display resolution in widthxheight format, and [ID] is the display ID for your external monitor / TV. For example, I used the following commands to achieve the UI seen above:
adb shell wm density 120 -d 3 adb shell wm overscan 0,0,0, -125 -d 3 adb shell wm size 1920x1080 -d 3
- We're using the WindowManagerShellCommand to tweak the density to make UI elements appear smaller, overscan to hide the navigation bar, and / or resolution to match that of the external display. Play around with these values until you get something you're comfortable with.
That's it! Enjoy desktop mode on your Android 10 smartphone. We're not sure why Google disabled DisplayPort Alt Mode functionality on the Pixel 4, so we reached out for comment and will update you if we hear back.
If youre a custom launcher developer interested in integrating TaskBar into your launcher, you can find the instructions here.
Want more posts like this delivered to your inbox? Enter your email to subscribe to our newsletter.