wireless adbù code example

Example: wireless adb

#ANDROID 10 OR LOWER
# 1. Connect your Android device and adb host computer to a common Wi-Fi network.
# 2. Connect the device to the host computer with a USB cable.
# 3. Set the target device to listen for a TCP/IP connection on port 5555.
$ adb tcpip 5555
# 4. Get the IP of the target device
# Run the following command in the devices shell and copy the IP address after
# the "inet" until the "/"
$ adb shell
$ ip addr show wlan0
# 5. Disconnect the USB cable from the target device.
# 6. Connect to the device by its IP address.
$ adb connect <device_ip>
# 7. Confirm that your host computer is connected to the target device:
$ adb devices
List of devices attached
<device_ip>:5555 device

# if there are multiple devices attached
# specify which device to communicate with using the -s option
$ adb -s <device_ip> <command>

Tags:

Misc Example