Useful Tools Issue 1: QtScrcpy on the same screen as mobile and computer

QtScrcpy can connect Android devices via USB / network, and display and control them. No root access required.

At the same time, it supports GNU/Linux, Windows and MacOS three mainstream desktop platforms.

QtScrcpy is an open source project, the project address is:

https://github.com/barry-ran/QtScrcpy

It focuses on:

  • Refined (displays device screen only)
  • Performance (30~60fps)
  • Quality (above 1920×1080)
  • Low latency (35~70ms low latency)
  • Quick start (you can see the first frame image within 1s)
  • Non-intrusive (does not install any software on the device)

win

mac

linux

Custom key mapping

You can write your own script to map the keyboard keys to the touch and click of the mobile phone according to your needs. The writing rules are here .

By default, it comes with a mapping script for keyboard and mouse mapping for the Peace Elite mobile game and Douyin. After opening the Peace Elite mobile game, you can use the keyboard and mouse to play the Peace Elite mobile game like a client game. After opening the Douyin mapping, you can use up, down, left, and right The arrow keys simulate sliding up, down, left, and right. You can also write mapping files for other games according to the writing rules . The default key mapping is as follows:

game

Here is a video demonstration of playing Peace Elite

The operation method of custom key mapping is as follows:

  • Write a custom script and put it in the keymap directory
  • Click Refresh Script to make sure the script can be detected
  • Select the desired script
  • After connecting the phone and starting the service, click Apply Script
  • Press ~(that is, the SwitchKey defined in the script) to switch to the custom mapping mode to enable
  • Press ~ key again to switch to normal control mode
  • (For games such as Peace Elite) If you want to use the steering wheel to control the vehicle, remember to set it to single joystick mode in the vehicle settings

group control

You can control all phones at the same time

gc

Require

The Android part requires at least API 21 (Android 5.0).

You need to make sure that adb debugging is enabled on your Android device, as follows:

https://developer.android.com/studio/command-line/adb.html#Enabling

download

Windows & Mac

On the Windows platform, you can directly use the compiled executable program:

On the Mac OS platform, you can directly use the compiled executable program:

Linux

For Arch Linux users, you can use AUR to install: yay -Syu qtscrcpy(maybe not the latest version; maintainer: yochananmarqos )

Users of other distributions can directly use my compiled executable program:

You can also get the latest auto-compiled software from GitHub Actions

Of course, you can also compile it yourself (not recommended, you need to prepare the environment)

The compilation process has only been tested on Ubuntu and Arch Linux so far

run

Connect the Android device on your computer, then run the program, click 一键USB连接or一键WIFI连接

Wireless connection steps

  1. Connect your phone and computer to the same LAN
  2. Turn on USB debugging in the developer options on the Android phone
  3. Connect Android phone to computer via USB
  4. Click to refresh the device, you will see that the device number is updated
  5. Click to get device IP
  6. Click to start adbd
  7. Wireless connections
  8. Click Refresh Device again, and find that there is an extra device starting with the IP address, select this device
  9. start service

Remarks: After starting adbd, there is no need to continue to connect the USB cable, and it is no longer necessary to disconnect the connection in the future, unless adbd stops running

interface explanation

  • Startup configuration: function parameter settings before starting the service

    The bit rate, resolution, recording format, recording save path, etc. of the locally recorded video can be set respectively.

    • Background recording only: start the service without displaying the interface, only record the screen of the Android device
    • Window on top: Android devices display window on top
    • Automatic screen off: After starting the service, automatically turn off the screen of the Android device to save power
    • Use Reverse: service startup mode, and the service startup fails to report an error "more than one device". You can remove this check and try to connect
  • Refresh device list: refresh the currently connected device

  • Start service: connect to Android device

  • Stop service: Disconnect from Android device

  • Stop all services: Disconnect all connected Android devices

  • Obtain device ip: Obtain the IP address of the Android device and update it to the wireless area to facilitate wireless connection

  • Start adbd: start the adbd service of the Android device, it must be started before the wireless connection

  • Wireless connection: connect your Android device wirelessly

  • Wireless Disconnect: Disconnect Android devices that are connected wirelessly

  • Command line: Execute custom adb commands (blocking commands, such as shells are currently not supported)

Function

  • Display Android device screen in real time
  • Real-time keyboard and mouse control Android devices
  • screen recording
  • screenshot
  • Wireless connections
  • Multi-device connection and group control
  • full-screen display
  • window on top
  • Install apk: drag apk to the display window to install
  • Transfer files: Drag and drop files to the display window to send files to Android devices
  • Background recording: only record the screen without displaying the interface
  • Clipboard Sync:
    Sync clipboard between computer and device:
    • Ctrl + cCopy device clipboard to computer clipboard;
    • Ctrl + Shift + vCopy computer clipboard to device clipboard;
    • Ctrl + vSend the computer clipboard to the device as a series of text events (no support for non-ASCII characters)
  • Synchronize device speaker sound to computer (based on sndcpy , only supports Android 10 and above, currently not recommended, you can use Bluetooth instead)

hot key

Function shortcut keys (Windows) shortcut keys (macOS)
Toggle full screen Ctrl+f Cmd+f
Adjust the window size to 1:1 Ctrl+g Cmd+g
Resize the window to remove black borders Ctrl+ wor left double click Cmd+ wor left double click
click主页 Ctrl+ hor click the middle mouse button Ctrl+ hor click the middle mouse button
clickBACK Ctrl+ bor right double click Cmd+ bor right double click
clickAPP_SWITCH Ctrl+s Cmd+s
clickMENU Ctrl+m Ctrl+m
clickVOLUME_UP Ctrl+ (up) Cmd+ (up)
clickVOLUME_DOWN Ctrl+ (down) Cmd+ (down)
clickPOWER Ctrl+p Cmd+p
Turn on the power right double click right double click
Turn off the screen (keep mirroring) Ctrl+o Cmd+o
open drop down menu Ctrl+n Cmd+n
close drop down menu Ctrl+Shift+n Cmd+Shift+n
copy to clipboard Ctrl+c Cmd+c
cut to clipboard Ctrl+x Cmd+x
Sync clipboard and paste Ctrl+v Cmd+v
Inject computer clipboard text Ctrl+Shift+v Cmd+Shift+v

Double-click the black area with the left mouse button to remove the black area

If the power is off, double-click the right mouse button to turn on the power; if the power is on, double-click the right mouse button is equivalent to return

Welcome to pay attention to my public account and get the latest articles

Guess you like

Origin blog.csdn.net/DevWiki/article/details/130621000