Easier control of the phone
There is several way to avoid having to type out every command with the phone touch keyboard, which can be cumbersome and prone to errors.
- Using an external bluetooth or USB keyboard with an adapter
- Remote connection via Open SSH
- Mirroring the phoneās screen on an other device with src-cpy
Mirroring phone screen via src-cpy
scr-cpy
scr-cpy is a command line tools that helps take control of an android smartphone by connecting to it via Wi-Fi or USB. Itās available on Mac, Windows and Linux.
Installation
Careful, the packaged versions below are obsolete, but will work with old devices. For latest version see build instructions.
For Linux:
$ apt install scrcpy
For Mac:
$ brew install scrcpy
Information
- Compatible with Android 5.0 and +.
- The documentation is available on Github here
Usage
1. Configure the phone
Your phone must be configured with enabled USB debugging.
- Enable Developer options:
- On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen
- Find the Build Number info. Go to Settings > About phone > Build number or similar. If you donāt find it: search ābuild numberā
- Tap the Build Number option seven times until you see the message
You are now a developer!This enables developer options on your device. - Return to the previous screen to find Developer options at the bottom.
- Enable USB debugging
- Go to: Settings > System > Advanced > Developer Options > USB debugging or similar. If you donāt find it: search ādebuggingā
- Toggle and confirm enabling USB debugging.
2. Mirror screen
- Connect you phone to your laptop with a USB cable that can transmit data (not just charging).
- Open the terminal, make sure you have scrcpy installed
- type
scrcpyand press enter. - Your computer screen should appear
3. Other options
Use scrcpy --otg for keyboard and mouse only