FAQ.md 5.2 KB
Newer Older
R
Romain Vimont 已提交
1 2 3 4 5
# Frequently Asked Questions

Here are the common reported problems and their status.


R
Romain Vimont 已提交
6
## `adb` issues
R
Romain Vimont 已提交
7

R
Romain Vimont 已提交
8 9
`scrcpy` execute `adb` commands to initialize the connection with the device. If
`adb` fails, then scrcpy will not work.
R
Romain Vimont 已提交
10

R
Romain Vimont 已提交
11
In that case, it will print this error:
R
Romain Vimont 已提交
12

R
Romain Vimont 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
>     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:

```bash
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-unauthorized].

[device-unauthorized]: https://stackoverflow.com/questions/23081263/adb-android-device-unauthorized


### Device not detected

If your device is not detected, you may need some [drivers] (on Windows).
R
Romain Vimont 已提交
41 42 43 44

[drivers]: https://developer.android.com/studio/run/oem-usb.html


R
Romain Vimont 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
### 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:

```bash
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.

[#5]: https://github.com/Genymobile/scrcpy/issues/5


### 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:

```bash
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].

[#281]: https://github.com/Genymobile/scrcpy/issues/281
[#283]: https://github.com/Genymobile/scrcpy/issues/283



## Control issues

### Mouse and keyboard do not work
102 103

On some devices, you may need to enable an option to allow [simulating input].
R
Romain Vimont 已提交
104 105 106 107
In developer options, enable:

> **USB debugging (Security settings)**  
> _Allow granting permissions and simulating input via USB debugging_
108 109 110 111

[simulating input]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323


R
Romain Vimont 已提交
112 113 114
### Mouse clicks at wrong location

On MacOS, with HiDPI support and multiple screens, input location are wrongly
R
Romain Vimont 已提交
115
scaled. See [#15].
R
Romain Vimont 已提交
116

R
Romain Vimont 已提交
117
[#15]: https://github.com/Genymobile/scrcpy/issues/15
R
Romain Vimont 已提交
118

R
Romain Vimont 已提交
119
Open _scrcpy_ directly on the monitor you use it.
R
Romain Vimont 已提交
120 121


R
Romain Vimont 已提交
122 123 124 125 126 127 128 129 130
### Special characters do not work

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

[text-input]: https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3Aunicode
[accented-characters]: https://blog.rom1v.com/2018/03/introducing-scrcpy/#handle-accented-characters
[#37]: https://github.com/Genymobile/scrcpy/issues/37
R
Romain Vimont 已提交
131 132


R
Romain Vimont 已提交
133 134
## Client issues

135
### The quality is low
R
Romain Vimont 已提交
136

R
Romain Vimont 已提交
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
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]).

[#40]: https://github.com/Genymobile/scrcpy/issues/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]:
R
Romain Vimont 已提交
152 153 154 155 156 157

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

[scaling behavior]: https://github.com/Genymobile/scrcpy/issues/40#issuecomment-424466723

R
Romain Vimont 已提交
158

R
Romain Vimont 已提交
159

R
Romain Vimont 已提交
160 161 162 163 164 165 166
### KWin compositor crashes

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

As a workaround, [disable "Block compositing"][kwin].

[kwin]: https://github.com/Genymobile/scrcpy/issues/114#issuecomment-378778613
R
Romain Vimont 已提交
167 168


R
Romain Vimont 已提交
169 170 171
## Crashes

### Exception
R
Romain Vimont 已提交
172 173 174 175

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:

R
Romain Vimont 已提交
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
> ```
> 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)
> ```
R
Romain Vimont 已提交
192 193 194 195 196 197 198 199

Just try with a lower definition:

```
scrcpy -m 1920
scrcpy -m 1024
scrcpy -m 800
```