If your Android phone’s screen is broken or unresponsive, you might think you need a computer to control it remotely. And it is true, with a computer is a whole lot easier, however that does not mean that is impossible with a mobile phone. You can control one Android device from another using only free and open-source software—no PC or paid apps required.
We’ll use scrcpy for screen mirroring and control, wireless USB debugging to connect the devices, and Termux with Termux:X11 to run everything directly on your phone.
What you’ll need:
- Two Android phones (one with a broken screen, one working)
- Both devices connected to the same Wi-Fi network
- Some patience and a bit of command-line work
You only need to install these tools on the controller device, the device to be controlled should only have usb (wireless) debugging
1. Install Termux and Termux:X11
First, grab Termux and Termux:X11 from F-Droid on your working phone. These are your Linux terminal and X11 display server for Android.
Open Termux and update your packages:
pkg update && pkg upgradeNow install some essentials:
pkg install git wget proot tarAnd install Termux:X11 (just open the app once so it sets up).
2. Install scrcpy in Termux
scrcpy is the magic sauce for controlling Android screens. We’ll build it from source, but don’t worry, it’s not as scary as it sounds.
First, install dependencies:
pkg install ffmpeg meson ninja pkg-config clang pythonpkg install libusb libusb-dev sdl2 sdl2-devClone the scrcpy repo:
git clone https://github.com/Genymobile/scrcpy.gitcd scrcpy./install_release.shIf you get errors, check the official instructions or try installing via a prebuilt binary if available for your architecture.
3. Enable Wireless Debugging on the Broken Phone
This is the trickiest part if your screen is dead. If you already had USB debugging enabled, you’re golden. If not, you might need an OTG mouse or a USB keyboard to enable it.
- Go to Settings > About phone > Tap Build number 7 times to enable Developer Options.
- In Developer Options, enable USB debugging and Wireless debugging.
If you can’t see the screen, try plugging in a mouse via OTG and navigating blind (it’s possible!).
4. Connect Both Phones via Wireless ADB
On your working phone (with Termux), connect to the broken phone over Wi-Fi:
- Find the IP address of the broken phone (Settings > About > Status).
- In Termux, run:
adb connect <BROKEN_PHONE_IP>:5555If you get a prompt on the broken phone to allow USB debugging, approve it (again, OTG mouse helps).
5. Start scrcpy and Control the Broken Phone
Now, with both phones on the same Wi-Fi and ADB connected, launch Termux:X11 on your working phone.
In Termux, run:
export DISPLAY=:0scrcpyThe screen of the broken phone should pop up in Termux:X11, fully interactive! You can now use your working phone to control the other one, recover files, send messages, or just use it like normal.
Troubleshooting
- ADB not connecting? Double-check both phones are on the same Wi-Fi and wireless debugging is enabled.
- scrcpy errors? Make sure all dependencies are installed and Termux:X11 is running.
- No USB debugging? Try an OTG mouse or keyboard to enable it.
Wrapping Up
That’s it! You’ve just turned your Android phone into a rescue tool for another Android, all without touching a PC. This setup is a lifesaver for data recovery or just getting back into a phone with a dead screen.
If you want to code on the go or turn your phone into a full Linux workstation, check out my other article: Code on The Go.
That’s all,