Skip to content

Instantly share code, notes, and snippets.

@rostegg
Created October 9, 2019 23:40
Show Gist options
  • Save rostegg/8d7a3e236021784de701fa7d4b36d4b1 to your computer and use it in GitHub Desktop.
Save rostegg/8d7a3e236021784de701fa7d4b36d4b1 to your computer and use it in GitHub Desktop.
Debug android device through TCP (root device required)
  1. Install terminal on android device (something like 'termux')

  2. From terminal:

$: su
$: setprop service.adb.tcp.port 5555
$: adb tcpip 5555
  1. Go to desktop (or dev machine). Find available devices through network:
$: ifconfig # check ip and mask
# if nmap installed
$: nmap -sn 192.168.1.0/24 #
# or with ping and arp
$: ping 192.168.1.255 -b # broadcast ip, wait few seconds 
$: arp -a
  1. Connect from dev machine:
$: adb connect 192.168.0.12:5555 # ip of android device (if you can't figure out which ip is your device, just try to connect to all of them)
  1. Go to AndroidStudio and open ADV manager, now your device should be available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment