@iluhin

0 %
Ilya Anisimov
Front-end Development
Soft/Hard Repair
  • City:
    Murmansk
  • Age:
    40 years
  • Education:
    Higher
  • Family:
    Single
  • Kids:
    No
WordPress
PHP / JS
HTML / CSS
Microsoft 365
Bitrix24
1C:Enterprise
Skills
  • Personnel management
  • Staff training
  • Sales techniques
  • Cash discipline
  • Inventory

Scrcpy

29.11.2023

Controlling your phone without holding it is easy. Just set up Scrcpy and then just launch the app.

The function of controlling your smartphone from a PC has been tested for quite some time by owners of Samsung devices, but what about if you have a gadget from another manufacturer? Very unfortunate, but even my reference Google Pixel doesn't support such a feature without the use of third-party software. Well, let the cooperation between Microsoft and Samsung continue, and you and I will use an alternative solution to this interesting problem.

Hard to believe, but you and I won't have to install any apps on our smartphone, it doesn't even need to have Root access!

Scrcpy - An open-source program from a GitHub developer that not only allows you to stream an image from your Android smartphone display to your PC, but also to Control your smartphone directly from your computerTo which the image is transferred. Transferring a file and installing applications with a simple drag and drop is very convenient!

Installing and running scrcpy

To install the program, you need to do the following steps:

1. Download the latest version:


2. Create a folder "scrcpy“.

3. Copy the contents of the archive there.

This completes the installation of the program! Before using it you need to configure the smartphone from which you will broadcast the picture:

  1. Go to "About phone" and enable developer mode there. To do this, press 7 times either on assembly number device if you have "pure" Android, or to the MIUI version if you have MIUI.
  2. In the developer menu, you need to enable the "USB debugging", "USB Debugging (Security Settings)" and "USB Installation" (if you need sound).
  3. Connect your smartphone to your computer using a USB cable.
  4. Be sure to check the box "Always allow debugging from this computer" and press "Authorize“.

Now the device is ready to broadcast the picture to the PC. Now let's make sure that the PC can communicate with the smartphone:

  1. Launch "Command Prompt" by pressing Win+R and entering "cmd"..
  2. Go to the folder scrcpyby entering "cd c:/scrcpy."if the folder is in the root of the c:/ drive and run the command "adb shell ip route to get the IP address of the device, press Enter.
  3. Enter adb tcpip 5555, press again Enter.

You can now disconnect the smartphone cable from the computer. Connect to the device using the command adb connect DEVICE_IP:5555 (where DEVICE_IP is the IP address of the device. The result should be something like: "adb connect 192.168.0.2:5555“).

Finally, start the broadcast with the command "scrcpyPress Enter on the keyboard again.

If done correctly, a window should appear with the contents of your smartphone's display in the same orientation as the smartphone itself.

Full list of keyboard shortcuts
ActionKey combination
Switching full screen modeLeft Alt+f
Turn the display to the leftLeft Alt+← (left)
Turn the display to the rightLeft Alt+→ (right)
Resize window to 1:1 (pixel-perfect)Left Alt+g
Resize window to remove black bordersLeft Alt+w | Double-left-click
Press the HOME buttonLeft Alt+h | Middle-click
Press the BACK buttonLeft Alt+b | Right-click
Click on APP_SWITCHLeft Alt+s | 4th-click
Click on MENU (unlock screen)Left Alt+m
Click on VOLUME_UPLeft Alt+↑ (up)
Click on VOLUME_DOWNLeft Alt+↓ (down)
Click on POWERLeft Alt+p
Power onRight-click
Turn device screen off (keep mirroring)Left Alt+o
Turn on the device screenLeft Alt+Shift+o
Rotating the device screenLeft Alt+r
Expand the notification panelLeft Alt+n | 5th-click
Expand the settings panelLeft Alt+n+n | Double-5th-click
Collapse panelsLeft Alt+Shift+n
Copy to clipboardLeft Alt+c
Cut to clipboardLeft Alt+x
Synchronize clipboards and pasteLeft Alt+v
Inject computer clipboard textLeft Alt+Shift+v
Enable/disable FPS counter (on stdout)Left Alt+i
Pinch-to-zoomCtrl+click-and-move
Drag & drop APK fileInstall the APK from your computer
Drag & drop non-APK fileTransferring a file to a device
Configuring broadcast parameters

The program allows you to set some parameters for the transmitted image. Let's touch the main ones:

  • Changing the resolution: scrcpy -m 1024. After -m If you specify the number of vertical pixels, the program will automatically adjust the number of horizontal pixels according to the aspect ratio of your device.
  • Bitrate change: "scrcpy -b 2M". After -b sets the required bitrate, which is 8 Mbit by default.
  • Limiting the number of frames: scrcpy -max-fps 15". After -max-fps sets the required number of frames.

To apply several parameters at once, you need to write them sequentially, for example, as follows: "scrcpy -m 1024 -b 2M -max-fps 15“.

A complete list of parameters can be viewed at GitHub page

Audio broadcasting

To transmit sound, you need to install and run the program sndcpywhich can also be downloaded from GitHub (you need to download the archive called "sndcpy-with-adb-windows"). It is worth specifying that for sound transmission you need Android 10 and installed on the computer VLC player.

  1. Install sndcpy in a manner similar to scrcpy.
  2. Connect your smartphone to your computer using a USB cable
  3. Click Win+R and in the window that opens, type cmd", press OK.
  4. At the command prompt, type "cd c:/sndcpy", click Enter.
  5. Then enter "sndcpy", press again Enter.
  6. A program will be installed on your smartphone that will ask for permission to broadcast audio, click "Start".
  7. At the command prompt, press Enter. VLC may generate an error, just ignore it.

The sound will continue to play from your smartphone, to get rid of it, just turn the volume down to zero. It is adjusted on the two devices independently of each other. To stop the sound transmission, you need to either disconnect the cable from the device or press the corresponding button on the notification panel of your smartphone.

After the opening Scrcpy you can also use keyboard shortcuts to control screen rotation. Simply press the left Alt + arrow key to rotate the screen in that direction.

Difficult?

If you are a big fan of SCRCPY, but you don't really like using the command line for all the custom options and features of the application, then I suggest you use the SCRCPY GUI solution, which will make using SCRCPY a much simpler process.

SCRCPY is one of the most popular ways to view and control Android devices on Windows, Linux and macOS PCs. It's easy to set up, easy to use and works great both in the wiredand in wireless modes. The only real problem with SCRCPY is the way you enter options and commands. Because it requires the Command Line and a list of commands, most people can't either don't want to take full advantage of SCRCPY.

Fortunately, there is an alternative to using SCRCPY exclusively from the Command line. It will give you a full graphical user interface with most of the basic functions and commands that people use in SCRCPY. This means that you can simply click a button to enable or disable certain features in SCRCPY. The only drawback is that not all commands are available.

Scrcpy-Plus

As mentioned above, Scrcpy-Plus is the easiest tool to use with the SCRCPY GUI. Just make sure you pre-configure SCRCPY and then run Scrcpy-Plus. The best part is that it comes in two variants: standard Windows installation and portable Version. It is necessary to link PC and Android device!

In developer mode on your Android On your device, select "Debug via Wi-Fi" and then "Connect your device using the connection code". In the app Scrcpy+and click [su_icon_text color="#8867c0″ icon="icon: link" icon_color="#886767c0″ icon_size="20″] CONNECT WIRELESSLY[/su_icon_text]

Next, you need to enter the "Wi-Fi connection code" and the "IP address and port". Press the "CONNECT" button, and then you will need to specify the "IP address and port" again (it may not have changed). Success!

[su_image_carousel source="media: 6978,6979,6980,6981″ limit="4″ slides_style="photo" crop="none" align="center" max_width="50%" dots="none" link="lightbox" target="self" image_size="thumbnail"]

It's done! In the "Device" section, information about your Android device appears. Scroll down and press "START SCRCPY".

Рубрика: СофтМетки:
Написать комментарий

en_USEN