Skip to main content

Running Scrcpy client on an Android phone with Termux to remotely control another Android phone

Categories   Smartphone APP Review
Tags   Scrcpy Termux

中文版本

Scrcpy is a software that mirror the screen of an Android phone to your PC, and you can control the phone from your PC. Currently, Scrcpy is only available on Linux/Windows/macOS. Can we run Scrcpy client directly on an Android phone to control another Android phone?

Yes, but I’m not happy with the current solutions, there is no working open source app for Scrcpy for Android (the ones I found on Github are all abandoned), but there are third-party apps that integrate Scrcpy, for example: Duplila, 甲壳虫ADB助手, 魇·无界投屏

Although they are free to use, they are all proprietary software, and Duplila’s advanced features charge a monthly fee for $2? 甲壳虫ADB助手 only costs $1.

So I decided to use my open source solution: Using Termux X11 to run Scrcpy. There are ADB and Scrcpy packages in Termux’s official repository, so there’s no need to install a proot-distro to run Scrcpy.

Running Scrcpy in Termux X11 on an Android phone to remotely control another Android phone.

  1. Setup XFCE4 Desktop for Termux and install Termux X11.

  2. Install the following packages

pkg install scrcpy android-tools
  1. Pair with another Android phone via wireless ADB
# Enable wireless debugging in Developer Settings
adb pair <IP>

adb connect <IP>
  1. Launch XFCE4 in Termux.

  2. Start Scrcpy from Termux terminal:

GALLIUM_DRIVER=virpipe scrcpy -m 1080 -b 5M --audio-codec=aac --fullscreen
  1. The Scrcpy window will now appear in Termux X11! For better touch control, go to Termux X11 settings and enable Direct Touch mode.

Related

How to run Windows programs on Android with Box86 + Wine in Termux Proot
Categories   Smartphone Termux Tutorial
Tags   Box86 Box64 Wine Termux Raspberry Pi
How to use Termux X11 - The X server on Android phone
Categories   Smartphone Termux Tutorial
Tags   Termux
I run Kdenlive on my phone because there is no FOSS video editing apps on Android
Categories   Smartphone APP Review
Tags   Kdenlive Android Termux

Leave a comment

Choose the comment system you like. Giscus for codes, Disqus for anonymous comments.

Please login to your Github account to leave a comment. You can post codes here for discussion. For images, please upload to Imgur and copy links. Your comments would be visible to everyone on Github Discussions.

This comment system is provided by Disqus, you may see forcing Disqus ADs on this page. Sometimes your comment may need to be reviewed, resulting in delayed display. Thank you for your understanding.