How To Control Your Android Device from a PC Using Scrcpy - Tom's Hardware

2 years ago 50

Scrcpy (Screen Copy)  is a singular tool. At the astir basal leve,l it is simply a means to interact with an Android instrumentality from our computer. We tin motorboat applications, power cameras and play games utilizing our Android device, but implicit a USB oregon Wi-Fi connection. We archetypal came crossed Scrcpy successful 2020 and person been utilizing it arsenic a means to adhd a precocious prime 2nd camera to an OBS setup. 

This camera is successful world a 4 twelvemonth aged cellphone and we show the Android desktop arsenic an exertion model connected our desktop. We tin adjacent usage Scrcpy implicit a Wi-Fi connection, utile for roving video streams. If you person an aged Android compartment telephone oregon tablet successful a drawer, past scrcpy is the means to respire caller beingness into it and repurpose it arsenic portion of your streaming setup.

Android developers volition admit Scrcpy’s precocious features to grounds video from the watercourse and amusement wherever the idiosyncratic is touching. These 2 features tin beryllium utilized to debug issues successful applications.

In this however to, we shall larn however to setup scrcpy connected Windows, and larn much of its precocious commands.

Setting Up scrcpy

Scrcpy is remarkably elemental to setup. On Windows, each we request to bash is download a azygous archive and we are acceptable to go.

1. On your Android instrumentality spell to Settings >> About phone.

scrcpy

(Image credit: Tom's Hardware)

2. Scroll down to Build Number and pat it 7 times. This volition unlock developer mode.

scrcpy

(Image credit: Tom's Hardware)

3. Click backmost and  search for USB.

scrcpy

(Image credit: Tom's Hardware)

4. Scroll down to and enable USB debugging.

scrcpy

(Image credit: Tom's Hardware)

5. Connect your Android instrumentality to your machine utilizing a USB lead.

6. Download the pre-built archive for Windows. Linux and macOS users volition request to travel  the instructions for their OS.

7. Extract the archive to a folder connected your desktop.

8. Open a Command Prompt and navigate to the folder connected your desktop.

9. Run the scrcpy.exe command. If prompted, let the transportation connected your Android device.

scrcpy

(Image credit: Tom's Hardware)

We present person basal 2 mode connection betwixt our machine and the Android device. The model represents our Android device, and we tin spot and interact with the instrumentality arsenic if it were successful our hands. We tin usage our rodent to swipe and interact with applications and the keyboard to input text.  

Close the transportation by closing the exertion window. Let's observe much of scrcpy’s features.

Scaling the Application Window

scrcpy

(Image credit: Tom's Hardware)

The exertion window, our Android device’s screen, tin beryllium scaled utilizing the max-size argument. Our script is that we privation to standard the exertion model size for usage successful a video. We don’t privation the model to predominate the surface with the Android instrumentality window.

Run scrcpy from the bid punctual and usage the -m statement to acceptable the maximum size to 1024. The -m statement is abbreviated for –max_size and some tin beryllium used.

scrcpy.exe -m 1024

Lock Screen Rotation

scrcpy

(Image credit: Tom's Hardware)

By default, scrcpy volition tally with nary surface rotation lock. This means that erstwhile the Android instrumentality is rotated, the exertion model volition respond accordingly. This whitethorn not beryllium the desired effect, and truthful we tin fastener the rotation. We whitethorn privation to usage the instrumentality successful scenery mode arsenic a camera successful a analyzable OBS setup, oregon we whitethorn privation to play Candy Crush successful representation mode.

Via the Command Prompt unfastened scrcpy utilizing 1 of the pursuing options to fastener the rotation.

scrcpy --lock-video-orientation # archetypal (current) orientation scrcpy --lock-video-orientation=0 # earthy orientation scrcpy --lock-video-orientation=1 # 90° counterclockwise scrcpy --lock-video-orientation=2 # 180° scrcpy --lock-video-orientation=3 # 90° clockwise

Recording the Android Device

Recording the Android interface tin beryllium a utile tool. If you privation to grounds the steps to implicit a task, rise a bug oregon adhd the video to a YouTube tutorial, past signaling the surface via scrcpy is alternatively useful.

To grounds the surface we usage the -r argument, on with the sanction of the output file.

From the Command Prompt acceptable scrcpy to grounds the video watercourse to a record called demo.mp4.

scrcpy.exe -r demo.mp4

We tin premix the erstwhile arguments, to rotate the surface and acceptable the surface size. In this lawsuit we volition rotate the surface to landscape, acceptable the surface size to a maximum of 1080 pixels tall, and prevention the video to demo-1080.mp4.

scrcpy.exe --lock-video-orientation=1 -m 1080 -r demo-1080.mp4

Connecting Over Wi-Fi

USB provides the best, unchangeable transportation to our Android device, but determination are times wherever going wireless is the champion option. For illustration If you privation to adhd a wireless camera for an OBS stream, oregon grounds your crippled from the comfortableness of your sofa. The –tcpip statement is the cardinal to this step.

1. Ensure your Android instrumentality is connected via USB. For the archetypal transportation we request to usage USB successful bid to correctly setup the connection.

2. Ensure that your Android instrumentality is connected to the aforesaid web arsenic your computer.

3. Run scrcpy with –tcpip argument to observe the Android instrumentality and automatically link implicit the network.

scrcpy.exe –tcpip

4. Remove the USB transportation and the exertion model volition stay connected screen, enabling america to usage the instrumentality implicit Wi-Fi. Note that determination volition beryllium a somewhat longer hold betwixt an enactment and absorption owed to web latency.

Window Configuration Options

The scrcpy exertion model has its ain configuration options which we tin usage to tweak the exertion to our needs.

Window Title

scrcpy

(Image credit: Tom's Hardware)

We tin springiness the model a rubric utilizing the –window-title argument. In this illustration we acceptable the model size to 768 pixels tall.

scrcpy --window-title 'Tutorial’

Set the Window Position and Size

If you request the exertion model to beryllium successful an nonstop location, this tin beryllium specified utilizing an statement erstwhile moving scrcpy from the Command Prompt.

scrcpy --window-x 100 --window-y 100 --window-width 800 --window-height 600

Borderless Application Window

If you don’t privation oregon request the model decorations (minimize, maximize and close) past this statement volition fell them. Note that you volition request to property CTRL + C successful the Command Prompt to adjacent the window.

scrcpy --window-borderless

Always connected Top

This statement volition guarantee that the scrcpy Android instrumentality model is ever connected apical of each different model / application.

scrcpy --always-on-top

Fullscreen

To acceptable scrcpy to usage each of the disposable screen, usage the –fullscreen, shortened to -f, argument. You volition request to ALT-TAB and property CTRL + C successful the Command Prompt to adjacent the session.

scrcpy --fullscreen scrcpy -f # abbreviated version

Show Touches

scrcpy

(Image credit: Tom's Hardware)

This useful statement volition amusement wherever a idiosyncratic is pressing connected the screen. The statement tin beryllium called with a full, verbose option, oregon a shortened version.

scrcpy --show-touches scrcpy -t
Read Entire Article