Genymobile / Genymobile/scrcpy

Preparing scrcpy for local hardware

Open
#4,652 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
150k
Forks
13.7k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

- [X] I have checked that a similar [feature request](https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.

Some might be compatibile with this idea, but not directly

**Is your feature request related to a problem? Please describe.**
Perhaps we should call it "Reverse Desktop." In short as some people know Android ROMs have different kinds of Desktop Mode like Samsung DeX or Motorola Ready Now. AOSP / LineageOS also has something like this, but it is very weak and has bugs.

The best option in my opinion is to use Linux / Termux as Desktop Mode. On the other hand, Android itself has many very cool applications that can make our lives more interesting, for example, Nvidia Geforce Now.

Unfortunately, the procedure for running scrcpy on Termux is "complicated". It is not much different from running it on a normal system, but:
- ADB running locally cannot (maybe there is a solution) connect directly to itself. Instead, you have to set up an ADB server (ADB Wireless) and connect manually using Adb connect.
- Scrcpy uses h264 (or other) video encoding/decoding. The question is whether this is necessary for a locally running application, where rather bandwidth does not limit us (localhost). Maybe a good option would be to upload video "as fast as possible, without compression".
- I do not know if this has been implemented (I have read the issue, but have not found anything in the application) is virtual screen. From the dev tools there is an option to enable virtual screen. I wonder if scrcpy itself can already create a virtual screen and connect directly.

**Describe the solution you'd like**
- No ADB Required for Termux / Local Linux (Socket?)
- RAW screen transmission
- Virtual Desktop on demand

```
adb shell settings put global overlay_display_devices \"\"
adb shell settings put global overlay_display_devices 1915x998/225
VirtualExternalDisplay=`adb shell dumpsys display | grep -E 'Display [0-9]{1,2}' | tail -1 | sed s/\:// | awk '{print$2}'`
scrcpy -b24M --display-buffer=5 -S -w --display $VirtualExternalDisplay --encoder OMX.qcom.video.encoder.avc
```

**Describe alternatives you've considered**
Using Desktop Mode and Alt+Tabbing between Termux X11 and Android. It's not great, but works.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no source files, tests, or code entry points. Start by reproducing the described Termux workflow and investigating the separate ADB, video transport, and virtual-display requirements; done would require a defined, agreed scope and implementation plan for local hardware support.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c, linux
Domain
desktop-dev, mobile-dev, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.