View, Hear, Control Your Android Device on Your Linux PC (Wireless, USB)
Prerequisites:
- Laptop/PC with a Linux distribution OS w/ PulseAudio and Bluetooth
- adb: Android Device Bridge (more info)
- scrcpy:
apt install scrcpy
(more info) USB Debugging
enabled on your device
Steps:
- Connect your Android device with
USB Debugging
enabled underDeveloper Options
(more info) - To use over WiFi, make
adb
on the device work over TCP/IP by running:adb tcpip 5555
(more info). Android 11 makes this process easier with a simple toggle
!! Note that this will create a giant security hole. Please ensure that you understand the risks. !!
If you're an Android developer, using adb over WiFi will probably save your device's battery from going kaput long before it's natural lifespan. - Ensure that the phone is unlocked, keep your screen awake longer using options in
Settings > Display
- Run
adb connect <DEVICE_IP_ADDRESS>
and ensure that the device is listed underadb devices
(or configureudev
rules - more info) - Run
scrcpy
in a terminal (more info). This should display a window with your device's screen, and you should be able to control it with your mouse and keyboard - Configure PulseAudio on your laptop as a Bluetooth receiver/speaker:
7. Pair Bluetooth on your device with the PC
8. You can also use sndcpy as an alternative to Bluetooth audio, but it's more restrictive
9. You can control and use your phone remotely even with it's screen turned off (CTRL + O in scrcpy)