Wireless ADB screen sharing with Scrcpy

Guide: LINUX 

HOW TO SHARE YOUR SCREEN IN LINUX WIRELESSLY

You may be familiar with the screencasting if you are windows or android user. Casting screen in windows is quite an easy task but in Linux it's a bit tricky, but don't worry it will be very simple once you understand how things work.
screen sharing

Things you need to get started with this guide:-

  • A laptop or desktop, but make sure that it has Wifi as we are gonna need it
  • A working internet connection for installing ADB and scrcpy 
  • A USB cable and an android device with USB debugging enabled

Step 1: Start by installing the required things  

Open terminal by using the Ctrl+Alt+t combination. Install ADB using 
sudo apt install adb

 After this proceed with the below command for installing scrcpy 

sudo apt install scrcpy 

 Step 2: setting up the client device (laptop/desktop) 

First, connect the android device to your client device using a USB cable and USB debugging should be enabled. You will mostly find it in your about settings, you can google for your specific device. When you connect the device for the first time you will see a prompt asking for allowing debugging access, tap allow.

If you followed every step mentioned above and received no errors, then you should probably see the output when you enter the command given bellow.
adb devices 

After this, we have to restart ADB in TCPIP mode

adb tcpip 5555

After entering this command you can disconnect the USB cable.

Step 3: connecting to the android device

go to the following path in your android device to get your IP address Settings > About tablet (or About phone) > Status > IP address
*The path may vary from device to device 

Now connect to the device using its IP which you found out just now 
adb connect device-ip-addrs:5555

To confirm that you have connected successfully,  use the below command

adb devices

Now that you have connected to the device, just start screen sharing with  

 scrcpy --max-size 2400 --max-fps 90 --turn-screen-off

This is the high-resolution setting, you can tweak the settings as your preference and network stability 

For any kind of command help, just type  

scrcpy --help 

I hope that this article has helped you in successfully sharing screen with ADB, if you face any kind of error leave me a comment, I will reply ASAP or you can search your query in stack overflow 

------------------------------------------------------------------------------------

Post a Comment

0 Comments

Close Menu
>