# screenCopy **Repository Path**: hzqhml/screen-copy ## Basic Information - **Project Name**: screenCopy - **Description**: 上班摸鱼神器,手机投屏软件 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-31 - **Last Updated**: 2025-12-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ScreenCopy A simple Android screen mirroring and control application using Qt 6, FFmpeg, and ADB. ## Features - Mirror Android screen to Windows. - Control Android device using mouse (Click). - Hardware decoding using FFmpeg. ## Prerequisites 1. **Qt 6**: Make sure you have Qt 6 installed with CMake support. 2. **FFmpeg**: You need the development libraries (headers and .lib files). - Download "Shared" and "Dev" builds from [gyan.dev](https://www.gyan.dev/ffmpeg/builds/) or [BtbN](https://github.com/BtbN/FFmpeg-Builds/releases). - Extract them to a folder (e.g., `C:\ffmpeg`). 3. **ADB**: Android Debug Bridge must be installed and added to your system PATH. ## Build Instructions 1. Open the project in Qt Creator or use CMake directly. 2. If using CMake command line: ```bash mkdir build cd build cmake -DFFMPEG_ROOT="C:/path/to/ffmpeg" .. cmake --build . ``` Replace `C:/path/to/ffmpeg` with your actual FFmpeg directory containing `include` and `lib` folders. 3. **Important**: When running the executable, ensure that `avcodec-*.dll`, `avutil-*.dll`, `swscale-*.dll`, etc., are in the same directory as the executable or in your system PATH. ## Usage 1. Connect your Android device via USB. 2. Enable **USB Debugging** in Developer Options on your phone. 3. Run `ScreenCopy.exe`. 4. Click **Refresh** to detect devices. 5. Select your device and click **Start**. 6. Click on the video feed to simulate taps on the phone. ## Troubleshooting - **No video**: Check if `adb exec-out screenrecord` works in your terminal. - **Black screen**: Ensure FFmpeg DLLs are accessible. - **Crash**: Check if the FFmpeg version matches the headers used during compilation. - **Input not working**: Ensure "USB Debugging (Security Settings)" is enabled on some devices (like Xiaomi) to allow simulating input via ADB. ## Architecture - **AdbController**: Manages `adb` process to get raw H.264 stream. - **VideoDecoder**: Uses FFmpeg to parse and decode H.264 stream to frames. - **VideoWidget**: Renders the frames using QPainter.