Skip to content

Instantly share code, notes, and snippets.

@abidzk01
Created July 11, 2025 02:42
Show Gist options
  • Select an option

  • Save abidzk01/fb2453c81bb770c3368ad75a0e9f03d7 to your computer and use it in GitHub Desktop.

Select an option

Save abidzk01/fb2453c81bb770c3368ad75a0e9f03d7 to your computer and use it in GitHub Desktop.

How to Connect ADB over Ethernet

Requirement

  • root
  • termux

tutorial

  • make sure your device is rooted
  • open termux
  • write su end enter it will give you root permission
  • write
    setprop service.adb.tcp.port 7777
    and enter, you can change 7777 to whathever (make sure your port not used)
  • for now you have done change port adb but you need restart the adb
  • for that write
    ps -ef | grep adbd 
    it will give you output like this
    shell        11566     1 10 09:11:55 ?    00:02:03 adbd --root_seclabel=u:r:su:s0
    root         12958 12937 28 09:32:11 /debug_ramdisk/.magisk/pts/0 00:00:00 grep adbd
    for example my adb process id is 11566
  • write
    kill 11566
    to terminate adb
  • from now you can try access adb via ethernet
  • if you don't know your ip address you can write
    ifconfig
    you can see eth0
  • and now you can try connect your device using command like this
    adb connect xxx.xxx.xxx.xxx:7777
    and boom done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment