QtScrcpy can connect to an Android device via USB(or via TCP/IP) and display and control. No root permission is required.

A single app can be connected to up to 16 Android devices simultaneously.

It also supports GNU/Linux, Windows and MacOS

It focuses on:

  • Exquisite (display device screen only)
  • Performance (30 ~ 60 FPS)
  • Mass (1920×1080 +)
  • Low latency (35 ~ 70 ms)
  • Fast startup (the first frame can be seen within 1s)
  • Non-invasive (do not install any software on the device)

Custom key mapping (windows&MacOS only)

You can write your own script to map the PC keyboard keys to the touch and click of the phone as needed. Write the rules here.

Default comes with elite mobile game against peace and trill keyboard mapping of scripts, can use the keyboard after open flat elite mobile game like played end game play peace elite mobile game, after open the trill mapping can use the up and down or so key direction of simulated slide up and down or so, you can also write in accordance with the rules to write other games in the mapping file, the default button mapping is as follows:

Here’s a video demo of playing Peace Elite

Perform the following operations to customize key mapping:

  • Write a custom script and place it in the KeyMap directory
  • Click Refresh to ensure that the script can be detected
  • Select the script you want
  • After connecting the phone and starting the service, click Apply script
  • Press the ~ key (left of number key 1) to switch to the custom mapping mode (the specific key depends on the switchKey defined by your key script).
  • Press ~ again to switch to normal control mode
  • To control wasD drive, set it to single joystick mode in vehicle Settings

Group control

You can control all your phones at once

Thank you

The scrCPY project based on Genymobile was copied and reconstructed. Thank you very much. The differences between QtScrcpy and original scrCPY are as follows:

The key point scrcpy QtScrcpy
interface sdl qt
Video decoding ffmpeg ffmpeg
Video rendering sdl opengl
Cross-platform infrastructure Their packaging Qt provides
A programming language C C++
programmatically synchronous asynchronous
The key mapping Customization is not supported Supports custom key mapping
Compile the way meson+gradle Qt Creator
  • Qt makes it very easy to customize your own interface
  • Qt-based asynchronous programming of signal slots improves performance
  • Convenient for beginners
  • Added multi-touch support

To learn it

If you are interested in it and want to learn its implementation principle but feel helpless, you can choose to buy the video course I recorded, which introduces the whole software development architecture and development process in detail, and takes you to develop from scratch:

Course introduction: blog.csdn.net/rankun1/art…

Or you can join my QtScrcpy QQ group to exchange technology with like-minded friends:

QQ group number: 901736468

requirements

At least API 21 (Android 5.0) is required for the Android portion.

Make sure you have ADB debugging enabled on your Android device.

Download the software

Windows

For Windows, you can directly use my compiled executable:

  • Domestic download
  • Foreign download

You can also compile it yourself

Mac OS

Mac OS platform, you can directly use my compiled executable:

  • Domestic download
  • Foreign download

You can also compile it yourself

Linux

Currently only Windows and MAC executables are available. If you need Linux executables,

You usually need to compile it yourself. Don’t worry, it’s not hard.

It’s only been tested on Ubuntu so far

run

Connect to an Android device on your computer, then run the program and click the following buttons in order to connect to the Android device

Wireless connection steps (make sure your phone and computer are on the same LAN) :

  1. Turn on USB debug in developer options on Android phones
  2. Connect your Android phone to your PC via USB
  3. Click refresh device, you will see the updated device number
  4. Click to obtain the device IP address
  5. Click to launch adBD
  6. A wireless connection
  7. Click Refresh device again, and the device starting with an IP address is found. Select this device
  8. Start the service

Note: After the ADBD is started, it is no longer connected to the USB cable, and it is no longer needed when the connection is disconnected, unless the Android ADBD is stopped and needs to be restarted

Interface button introduction:

  • Startup configuration: Set function parameters before starting the service

    You can set the local video bit rate, resolution, recording format, and video saving path.

    • Background recording only: Starting the service is not a realistic interface, just recording the Android device screen
    • Top window: Top display of video window on Android device
    • Automatic screen off: After starting the service, the screen of the Android device is automatically closed to save battery life
    • Reverse: a service startup failure occurs. More than one Device You can deselect this check to try to connect
  • Refresh device list: Refresh the currently connected devices
  • Start the service: Connect to an Android device
  • Stop service: Disconnect from the Android device
  • Stop all services: Disconnect all connected Android devices
  • Obtain device IP address: You have obtained the IP address of an Android device and updated it to the Wireless area for wireless connection
  • Enable ADBD: Enable the ADBD service of the Android device. This service must be enabled before wireless connection.
  • Wireless connection: Connect to an Android device in wireless mode
  • Wireless disconnect: Disconnect an Android device from a wireless connection
  • Adb command line: easy to execute custom ADB commands (blocking commands, such as shell, are not currently supported)

The main function

  • Display Android device screen in real time
  • Real-time keyboard and mouse control of Android devices
  • Screen recording
  • Screenshots for PNG
  • A wireless connection
  • Support a maximum of 16 device connections (PC performance allows the case can be increased, you need to compile)
  • Full screen
  • Window is placed at the top
  • Install APK: Drag apK to the video window to install it
  • Transferring files: Drag and drop files into the video window to send files to Android devices
  • Background recording: Records only, and no interface is displayed
  • Copy and paste

    Bidirectionally synchronize clipboard between computer and device:

    • Ctrl + cCopy the device clipboard to the computer clipboard
    • Ctrl + Shift + vCopy the computer clipboard to the device clipboard
    • Ctrl +vSends the computer clipboard to the device as a series of text events (non-ASCII characters are not supported).
  • Group control

shortcuts

| | function (Windows) | shortcuts (macOS) | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — – | : — — — — — — — — — — — — — — — — — — — — — — — — — — — — — | : — — — — — — — — — — — — — — — — — — — — — — — — — — — — – | full screen switch | | Cmd + Ctrl + f f | adjust the window size of 1:1 | | Ctrl + g, Cmd + g | adjust the window size to remove black side | Ctrl + x | | click click Cmd + x | click double-click | | click home page Ctrl + h | click the middle mouse button | | click the middle mouse button Ctrl + h | click BACK | | Ctrl + b right double-click | Cmd + b | right double-click | click APP_SWITCH | Ctrl + s | Cmd + s MENU | | click Ctrl + m | click Ctrl + m | VOLUME_UP | Ctrl + write (on) | Cmd + write (on) | click VOLUME_DOWN | Ctrl + left (below) | Cmd + left (under) POWER | | click Ctrl + p | Cmd + p | | open the POWER supply right double-click | right double-click | close the screen (screen) for keeping | | | Cmd + Ctrl + o o open a drop-down menu | Ctrl + n | Cmd + n | close a drop-down menu | | Cmd + Shift + Ctrl + Shift + n n | | copy equipment clipboard to computer Ctrl + c | Cmd + c | paste the clipboard to the computer equipment | | | Cmd + Ctrl + v v clipboard to copy computer | equipment | Ctrl + Shift + v Cmd+Shift+v

Double – click 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 to return

TODO

The late plan

FAQ

FAQ

developers

Developer related

You are welcome to help maintain the project and contribute your own code, but please follow the following guidelines:

  1. Pr please mention the dev branch, not the master branch
  2. Please rebase dev before mentioning PR
  3. Pr should be submitted in a small number of times (one PR is recommended for a small function point)
  4. Ensure that the code style is consistent with the existing code style

Why develop QtScrcpy?

There are several reasons for this, and the proportion is in descending order:

  1. Learning Qt in the process of a project to combat
  2. I have audio and video related skills and am interested in audio and video
  3. I have Android development skills. I have been out of practice for a long time. I need to consolidate it
  4. Discovered scrcpy and decided to reproduce it with a new technology stack (C++ Qt + Opengl + ffmpeg)

How to compile

Provides as many dependent resources as possible for foolproof compilation.

PC

  1. Build Qt development environment on target platform (Qt >= 5.12.0, VS >= 2017 (mingW is not supported)
  2. Clone the project
  3. Use QtCreator to open the project root directory all.pro
  4. Compile and run

Android (no need to modify the scrcpy-Server can be directly used)

  1. Build Android development environment on target platform
  2. Open the Server project in the project root directory using Android Studio
  3. If you open gradle for the first time, it will prompt you that you cannot find Gradle. Do you want to upgrade Gradle and create gradle? Select Cancel.
  4. You can edit the code as you want, or not
  5. After compiling apK, rename it scrcpy-server and replace third_party/scrcpy-server

Licence

Since it is a copy of scrCPy, respect its Licence

Copyright (C) 2020 Barry

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
Copy the code

Copy the code

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About the author

Barry’s CSDN

A common programmer, work mainly for the desktop client using c + + development, a graduation worked in shandong steel simulation education software, more than a year later to Shanghai successively engaged in security, online education related work, have been familiar with audio and video, such as the area of audio and video voice calls, live education, video conference and relevant solutions. Experience in android and Linux server development.