From 47c897126758ed016881bdf51b2eb643c4a5fe07 Mon Sep 17 00:00:00 2001 From: "SamBe.ng" Date: Mon, 30 Nov 2020 10:16:50 +0100 Subject: [PATCH] Document shell command to get the device IP PR #1944 Signed-off-by: Romain Vimont --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d10aaa74..67f2c14c 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,13 @@ _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). +2. 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`)_.