Compare commits

...

6 Commits

Author SHA1 Message Date
b75873ce45 Mention adb wireless option for Android 11+
Add a paragraph about toggling an option to bypass having to physically
connect the device to the user's computer.

Signed-off-by: Romain Vimont <rom@rom1v.com>
2021-08-12 19:05:25 +02:00
bcc6354e99 Make step more explicit in wireless section
Signed-off-by: Romain Vimont <rom@rom1v.com>
2021-08-12 19:05:18 +02:00
d8a72c7134 Add troubleshooting in wireless section
Add a small troubleshooting section since wireless might add some
complexity, and to lessen incoming relevant issue posts.

Signed-off-by: Romain Vimont <rom@rom1v.com>
2021-08-12 18:53:53 +02:00
cbc72e417c Improve phrasing in wireless section
Signed-off-by: Romain Vimont <rom@rom1v.com>
2021-08-12 18:46:07 +02:00
bafa535425 Renumber steps in wireless section
The actual numbers are ignored by markdown, but start at 1 for
consistency.

Signed-off-by: Romain Vimont <rom@rom1v.com>
2021-08-12 18:45:07 +02:00
cc3b6f4d58 Add an explicit first step in wireless section
Mention that the device must be plugged via USB before configuring
TCP/IP connections.

It wasn't obvious that the device should be first plugged before scrcpy
wirelessly, especially to those who aren't very familiar with adb.

Note from committer: add this new step with index 0 to make the diff
readable, the next commit will renumber all the steps.

Signed-off-by: Romain Vimont <rom@rom1v.com>
2021-08-12 18:43:07 +02:00

View File

@ -328,18 +328,30 @@ For example, you could capture the video within [OBS].
_Scrcpy_ uses `adb` to communicate with the device, and `adb` can [connect] to a
device over TCP/IP:
1. Connect the device to the same Wi-Fi as your computer.
2. Get your device IP address, in Settings → About phone → Status, or by
1. Plug the device into a USB port on your computer.
2. Connect the device to the same Wi-Fi network as your computer.
3. Get your device IP address, in Settings → About phone → Status, or by
executing this command:
```bash
adb shell ip route | awk '{print $9}'
```
3. Enable adb over TCP/IP on your device: `adb tcpip 5555`.
4. Unplug your device.
5. Connect to your device: `adb connect DEVICE_IP:5555` _(replace `DEVICE_IP`)_.
6. Run `scrcpy` as usual.
4. Enable adb over TCP/IP on your device: `adb tcpip 5555`.
5. Unplug your device.
6. Connect to your device: `adb connect DEVICE_IP:5555` _(replace `DEVICE_IP`
with the device IP address you found)_.
7. Run `scrcpy` as usual.
Since Android 11, a [Wireless debugging option][adb-wireless] allows to bypass
having to physically connect your device directly to your computer.
[adb-wireless]: https://developer.android.com/studio/command-line/adb#connect-to-a-device-over-wi-fi-android-11+
If the connection randomly drops, run your `scrcpy` command to reconnect. If it
says there are no devices/emulators found, try running `adb connect
DEVICE_IP:5555` again, and then `scrcpy` as usual. If it still says there are
none found, try running `adb disconnect` and then run those two commands again.
It may be useful to decrease the bit-rate and the definition: