Linuxslaves.com - A lot of people sit and work at computers all day, but they still have to check their phone for certain things. Thanks, there's scrcpy that lets you to display the Android screen on Linux without any root access.
So you can check the phone without having to constantly reach for your phone. You just need a USB connection (or over TCP/IP) and install ADB in Ubuntu.
Scrcpy runs on Windows, Mac, and GNU/Linux. It focuses on :
- Lightness : Native, displays only the device screen
- Performance : 30~60fps
- Quality : 1920×1080 or above
- Low latency : 35~70ms
- Low startup time : ~1 second to display the first image
- Non-intrusiveness : Nothing is left installed on the device
Main Features
- Control Android devices from Linux, Windows or macOS
- Works over USB and Wifi (same network as your computer only)
- Record the Android screen while mirroring
- Reduce size resolution to increase performance
- The device screen can be cropped
- Mirror multi-devices in the same time
- Drag and drop any APK to install any app
- Disable interacting using input keys, mouse events
Installing Scrcpy on Linux
Please ensure that your Android phone is running at least API 21 (Android 5.0 Lollipop) or higher and don't forget to enable adb debugging on your device. The settings is placed in Developer options.
Scrcpy is available as snap. So you can run the following to install it :
sudo apt install snapd
snap install scrcpy
Once installed, you can now connect the Android device using USB cable and simpy run scrcpy in Terminal window to start mirroring.
Ubuntu 20.04 LTS and Higher
For those who use Debian Sid, Ubuntu Focal, Linux Mint 20, and its derivatives, scrcpy is available in universe repository. So you just need to enable supported repository and install it as shown in the video below :
Shortcuts
ACTION | SHORTCUT |
---|---|
Switch fullscreen mode | Alt+f |
Resize window to 1:1 | Alt+g |
Resize window to remove black borders | Alt+x |
Click on HOME | Alt+h / Middle-click |
Click on BACK | Alt+b / Right-click |
Click on APP_SWITCH | Alt+s |
Click on MENU | Alt+m |
Click on VOLUME_UP | Alt+Arrow Up |
Click on VOLUME_DOWN | Alt+Arrow Down |
Click on POWER | Alt+p |
Turn device screen off | Alt+o |
Expand notification panel | Alt+n |
Collapse notification panel | Alt+Shift+n |
Copy device clipboard | Alt+c |
Paste PC clipboard | Alt+v |
Copy PC clipboard | Alt+Shift+v |
Enable/disable FPS counter | Alt+i |
These were all how to mirror and Control Android phone from the Ubuntu Desktop. Please share you find this post helpful. Thank you!.