Access an Android device on my laptop¶
I want to access the screen of either my phone or my e-reader on my laptop, so that I can easily browse notes or work with apps.
This works for me in two parts:
- Use scrcpy as application to access an Android device attached via a USB cable.
- Enable developer mode on the Android device to allow connecting over USB.
I have also managed to have it work over wifi rather than USB.
scrcpy on my laptop¶
The scrcpy application can show the screen of an attached Android device on my Ubuntu desktop.
In October 2024, I decided to install version 2.7 from their git repository: the Debian package was still at version 1.25, and the snap package at version 2.0. I also couldn't get the Homebrew version working with adb services.
Enable developer mode on Android¶
To connect via USB, you need to enable developer mode on the Android device, and then enable USB debugging.
- go to Settings, and then to About device...
- tap the "build number" 7 times
- enter your PIN
- then under Settings, System, there are developer options
Then, when scrcpy attaches to the device, you need to allow USB debugging there, and then the device screen should be shown on the desktop, and you will be able to interact with it using mouse clicks and gestures.
Working over wifi¶
In 2024, it didn't seem to work over USB, but I got it working over wifi, using local IP addresses. As a sketch: