Friday , November 15 2019
Home / unitedkingdom / Make Android 10's Hidden Desktop Mode More Useful

Make Android 10's Hidden Desktop Mode More Useful



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:

Requirements:

  1. Your Android smartphone must be running Android 10.
  2. Your Android smartphone needs to support DisplayPort Alt Mode. Here's a partial list of phones with support. If you have a smartphone with the Qualcomm Snapdragon 835, Qualcomm Snapdragon 845, or Qualcomm Snapdragon 855 and a USB 3.1 Type-C port, then your smartphone should support DisplayPort Alt Mode unless your phone vendor deliberately disabled it. Google disabled it on the Pixel 4, for example.
  3. You need a USB 3.1 Type-C to HDMI adapter. I bought this one off of Amazon. You´ll also need a Bluetooth mouse and keyboard if you want a more pleasant experience.

Next, here's how to set it up:

  1. Enable Developer Options on your phone. Go to Settings> About phone and tap on “build number” 7 times.
  2. Go to Settings> Developer options and scroll down until you reach the “APPS” section. Turn on “enable freeform windows” and “force desktop mode.”
  3. Reboot your phone.
  4. 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 *.
  5. Go to Settings> Apps & notifications> Default apps and set Lawnchair as the default launcher.
  6. Plug your phone into your monitor / TV using the adapter.
  7. 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.

  1. Disconnect your phone from your monitor / TV and connect it to your PC.
  2. Download and install ADB on your PC.
  3. Follow these instructions to enable wireless ADB.
  4. Once you have ADB access wirelessly, it's time to re-connect your phone to your monitor / TV.
  5. On your PC, run the following ADB shell command:
    adb shell dumpsys display
  6. 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!
  7. 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
  8. 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.


Source link