Skip to content

Instantly share code, notes, and snippets.

@SMUsamaShah
Last active April 26, 2025 11:34
Show Gist options
  • Save SMUsamaShah/3d5c42797da1d575355386d165a04990 to your computer and use it in GitHub Desktop.
Save SMUsamaShah/3d5c42797da1d575355386d165a04990 to your computer and use it in GitHub Desktop.
Use Android phone like a computer, on your computer

(INCOMPLETE -- NOT FOUND A GOOD DESKTOP MODE PROCESS)

My Pixel phone does not support USB video output. Which means I can't connect my phone to my display via USB-to-HDMI (or any other) cable and expect it to work. Scrcpy supports Virtual Display and wireless connection now. Which means I can view my android in 1920x1080 on my monitor in desktop mode. And if installed Termux https://termux.dev/en/ I can use it like a Linux system that I always have in my pocket.

  1. Download scrcpy https://github.com/Genymobile/scrcpy and extract
  2. Open a terminal/cmd in scrcpy folder
  3. Establish a connection between your computer and android phone
    1. Using USB cable
      1. Connect phone to PC with USB
      2. PC: adb tcpip 5555
      3. Unplug USB
      4. PC: adb connect YOUR_ANDROID_IP:5555
    2. Using pairing code (without USB cable, Android 11+ https://developer.android.com/tools/adb#wireless-android11-command-line)
      1. Android: Enable wireless debugging
      2. Android: "Pair device with pairing code"
      3. PC: adb pair IP:PAIR_PORT where IP:PAIR_PORT is in pairing code popup box
      4. PC: adb connect IP:PORT where a different port is shown in the wireless debugging screen
  4. Connect to phone as Virtual Display using scrcpy https://github.com/Genymobile/scrcpy/blob/master/doc/virtual_display.md scrcpy.exe --new-display=1920x1080

This unfortunately does not show a taskbar though image

Setup desktop mode

If in developer options you set the DPI very high using Smallest width e.g. 700 it makes the display desktop like. I don't yet how to replicate this built in desktop mode to this virtual display. image

  1. Install the Taskbar app https://github.com/farmerbb/Taskbar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment