1 Star 0 Fork 87

kcinz / scrcpy

forked from Gitee 极速下载 / scrcpy 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
FAQ.md 5.15 KB
一键复制 编辑 原始数据 按行查看 历史
Romain Vimont 提交于 2020-04-12 00:37 . Mention mipmapping in FAQ

Frequently Asked Questions

Here are the common reported problems and their status.

adb issues

scrcpy execute adb commands to initialize the connection with the device. If adb fails, then scrcpy will not work.

In that case, it will print this error:

ERROR: "adb push" returned with value 1

This is typically not a bug in scrcpy, but a problem in your environment.

To find out the cause, execute:

adb devices

adb not found

You need adb accessible from your PATH.

On Windows, the current directory is in your PATH, and adb.exe is included in the release, so it should work out-of-the-box.

Device unauthorized

Check stackoverflow.

Device not detected

If your device is not detected, you may need some drivers (on Windows).

Several devices connected

If several devices are connected, you will encounter this error:

adb: error: failed to get feature set: more than one device/emulator

the identifier of the device you want to mirror must be provided:

scrcpy -s 01234567890abcdef

Note that if your device is connected over TCP/IP, you'll get this message:

adb: error: more than one device/emulator
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'

This is expected (due to a bug on old Android versions, see #5), but in that case, scrcpy fallbacks to a different method, which should work.

Conflicts between adb versions

adb server version (41) doesn't match this client (39); killing...

This error occurs when you use several adb versions simultaneously. You must find the program using a different adb version, and use the same adb version everywhere.

You could overwrite the adb binary in the other program, or ask scrcpy to use a specific adb binary, by setting the ADB environment variable:

set ADB=/path/to/your/adb
scrcpy

Device disconnected

If scrcpy stops itself with the warning "Device disconnected", then the adb connection has been closed.

Try with another USB cable or plug it into another USB port. See #281 and #283.

Control issues

Mouse and keyboard do not work

On some devices, you may need to enable an option to allow simulating input. In developer options, enable:

USB debugging (Security settings)
Allow granting permissions and simulating input via USB debugging

Mouse clicks at wrong location

On MacOS, with HiDPI support and multiple screens, input location are wrongly scaled. See #15.

Open scrcpy directly on the monitor you use it.

Special characters do not work

Injecting text input is limited to ASCII characters. A trick allows to also inject some accented characters, but that's all. See #37.

Client issues

The quality is low

If the definition of your client window is smaller than that of your device screen, then you might get poor quality, especially visible on text (see #40).

To improve downscaling quality, trilinear filtering is enabled automatically if the renderer is OpenGL and if it supports mipmapping.

On Windows, you might want to force OpenGL:

scrcpy --render-driver=opengl

You may also need to configure the scaling behavior:

scrcpy.exe > Properties > Compatibility > Change high DPI settings > Override high DPI scaling behavior > Scaling performed by: Application.

KWin compositor crashes

On Plasma Desktop, compositor is disabled while scrcpy is running.

As a workaround, disable "Block compositing".

Crashes

Exception

There may be many reasons. One common cause is that the hardware encoder of your device is not able to encode at the given definition:

ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffc0e
...
Exit due to uncaughtException in main thread:
ERROR: Could not open video stream
INFO: Initial texture: 1080x2336

or

ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)

Just try with a lower definition:

scrcpy -m 1920
scrcpy -m 1024
scrcpy -m 800
C/C++
1
https://gitee.com/kcinz/scrcpy.git
git@gitee.com:kcinz/scrcpy.git
kcinz
scrcpy
scrcpy
master

搜索帮助