How to share your mobile phone screen to Linux without data cable?
mr zlaam (admin)
Published: December 2nd, 2024
Image by : Lance whitney
Table of Contents
- Introduction
- Step 1: Install scrcpy
- Step 2: Verify scrcpy Installation
- Step 3: Enable USB Debugging on Your Android Device
- Step 4: Find Your Device's IP Address
- Step 5: Switch to Wireless Debugging
- Step 6: Connect to Your Device Wirelessly
- Step 7: Check Connected Devices
- Step 8: Start Screen Mirroring with scrcpy
Introduction
If you're a Linux user looking for an easy way to wirelessly mirror and control your Android device , scrcpy is a powerful open-source tool that can help you achieve this. It allows seamless casting and control of your Android screen via your PC. In this guide, we'll walk you through the steps to set up and use scrcpy wirelessly.Step 1: Install scrcpy
To get started, install scrcpy on your Linux system. Open a terminal and run:sudo apt update && sudo apt install scrcpy
This command updates your package list and installs scrcpy.
Step 2: Verify scrcpy Installation
Once installed, verify that scrcpy is working correctly by running the following command:scrcpy
If the installation was successful, this will launch scrcpy. If not, ensure all dependencies are properly installed.
Step 3: Enable USB Debugging on Your Android Device
To use scrcpy, you need to enable USB debugging on your Android phone. Follow these steps:- Go to your phone's Settings.
- Navigate to About phone and find the Build number.
- Tap on the Build number seven times to enable Developer options.
- Go back to the main settings menu, find Developer options, and turn on USB debugging.
Step 4: Find Your Device's IP Address
Make sure your Android device and PC are connected to the same Wi-Fi network. Then, find your device's IP address using the following command:adb shell ip route
This command will return your device's network details. Look for the IP address, which will look something like 192.168.x.x
.
Step 5: Switch to Wireless Debugging
Next, enable TCP/IP debugging on your Android device by running:adb tcpip 5555
This sets up your device to accept connections over a wireless network.
Step 6: Connect to Your Device Wirelessly
Using your device's IP address, connect wirelessly with the following command:adb connect <your-device-ip>:5555
Replace <your-device-ip>
with the actual IP address from Step 4. For example:
adb connect 192.168.1.101:5555
Step 7: Check Connected Devices
To verify the connection, list all connected devices by running:adb devices
Your Android device should now appear in the list.
Step 8: Start Screen Mirroring with scrcpy
Finally, start mirroring your Android device screen by running:scrcpy
At this point, you can disconnect the USB cable from your phone. Your device is now wirelessly mirrored to your Linux machine.