Skip to content

Instantly share code, notes, and snippets.

@4sskick
Created November 9, 2021 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4sskick/6bac1485172155b9031e1a57cead073a to your computer and use it in GitHub Desktop.
Save 4sskick/6bac1485172155b9031e1a57cead073a to your computer and use it in GitHub Desktop.
this method could be usefull when you only have 1 cable to connect through device, but you wanna see log for more than one device. You are able to connect many devices in same time as long on same network.
- make sure you already define ADB to be called on terminal, type `adb device` to check what devices on list.
- connect you physical device with cable until their serial number appeared on command `adb devices`
- begin with command `adb -s <serial_num_physical> tcpip <port_you_wanna_use, ex: 1230>`
- terminal would log output `restarting in TCP mode port: 1230`, itrestarting connection through cable USB on physical device
- continue with looking for IP address physical device which connect on same network `adb -s <serial_num_physical> shell "ip addr show wlan0 | grep -e wlan0$"
- it gonna log output like, `inet 192.168.100.45/24 brd 192.168.100.255 scope global wlan0`
- begin to connect using IP address, `adb -s <serial_num_physical> connect <ip_address>:<port_you_defined>`
- if run well, terminal would log the output like `connected to 192.168.100.45:1230`
- make sure by check on `adb devices`, if column on right name with `device` then all run well
- but if named with `unauthorize` try with command `adb -s <serial_num_physical> disconnect <ip_address>:<port_you_defined>` then connect it again with cable USB doesn't plug out at all.
- device gonna reconnecting by asking permission if there some.
- check again with command `adb devices`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment