su#Set the port number for adbdsetprop service.adb.tcp.port 5555
#Run the adbd daemon *again* instead of doing stop/start, so there#are two instances of adbd running.adbd &
#Set the port back to USB, so the next time ADB is started it's#on USB again.setprop service.adb.tcp.port -1
exit
on property:service.adb.tcp.port=*restart adbd
on property:service.adb.tcp.enable=1setprop service.adb.tcp.port 5555
on property:service.adb.tcp.enable=0setprop service.adb.tcp.port -1
@echo offsetlocal
REM Use a default env variable to find adb if possibleif NOT "%AndroidSDK%" == "" set PATH=%PATH%;%AndroidSDK%\platform-tools
REM If off is first parameter then we turn off the tcp connection.if "%1%" == "off" goto off
REM Set varsset port=%1set int=%2if "%port%" == "" set port=5557if "%int%" == "" set int=wlan0
REM Enable TCPadb -d wait-for-device tcpip %port%
REM Get IP Address from deviceset shellCmd="ip addr show %int% | grep 'inet [0-9]{1,3}(\.[0-9]{1,3}){3}' -oE | grep '[0-9]{1,3}(\.[0-9]{1,3}){3}' -oE"for /f %%i in ('adb wait-for-device shell %shellCmd%') do set IP=%%i
REM Connect ADB to deviceadb connect %IP%:%port%
goto end
:failecho adbWifi [port] [interface]echo adbWifi offgoto end
:offadb wait-for-device usb
:end
$ sudo apt-get install blueman$ blueman-managerPair them: Search devices after enabling Bluetoothon your phone and making it visible$ blueman-servicesNetwork > [X] Network Access Point (NAP)Your Phone > Settings > Bluetooth > Paired Device > [X] Internet access
Use the Bluetooth network for ADB commands:
$ adb tcpip 5555$ adb connect $(adb shell ip -f inet addr show bt-pan | egrep -o '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n1):5555