A work in progress reimplementation of the scrcpy client in C#.
- Basic keyboard input support
- Basic touch and swiping
- Automatic screen rotation
- Window resizing
- No audio support
- Usually crash free
Before starting the program you need to manually start the ADB daemon.
You can do this by running adb devices in your terminal.
Make sure to also authorize the device by clicking "Accept" (or whatever) on your device.
This screenshot was taken before I clicked "Accept" on my phone, make sure to do that!
You'll need to manually install de ffmpeg binaries and the scrpy-server.jar file.
These files should be in the same folder as the ScrcpyNet.Avalonia.Sample.exe file.
You can download the ffmpeg binaries from here.
You need to download the ffmpeg-release-full-shared.7z file.
Extract all files .dll from the bin folder in the application root.
You'll need to download the scrcpy-server-v1.17 file from here.
Rename this file to scrcpy-server.jar and place it in the application root.
Example:
I couldn't fit all .dlls in this screenshot (e.g. swscale-5.dll), but you also need those.
So make sure to extract all *.dll files from the bin directory inside ffmpeg-release-full-shared.7z
This code (ab)uses unsafe code inside C#.
The Avalonia frontend is quite crappy, but I believe this is also because of some bugs inside Avalonia (frames don't feel 'smooth' and sometimes it crashes).
If you set the bitrate too high the videodecoder might not be able to keep up and lag. Or you'll get an timeout error which crashes the program.
- Genymobile/scrcpy - this code is based on their client implementation, and we use their scrcpy-server.jar
- The Android Open Source Project - for the input/keycodes