[REQUEST] Wireless ADB

Search This thread

mikecyber

Member
Sep 15, 2009
45
0
The Barnes & Noble Nook uses adb over wifi. How can I setup my N1 to do the same? Ideally I would like to specify on the N1 to only allow connections over wifi, and if possible have some sort of password type security. Can this be done?
 

xkonni

Senior Member
Jan 16, 2010
377
1,041
berlin
why not use ssh?
the dropbear-client is included in most custom roms.

edit: i mean dropbear-server of course ;)
 
Last edited:

kaotikking

Senior Member
Apr 9, 2009
201
2
Bronx, NY
The Barnes & Noble Nook uses adb over wifi. How can I setup my N1 to do the same? Ideally I would like to specify on the N1 to only allow connections over wifi, and if possible have some sort of password type security. Can this be done?

+1 on this, but I would like it to be included within the ROM with a UI setting or maybe even an applicaion :D
 

packetlss

Senior Member
Aug 10, 2009
236
8
Getting adbd to listen to tcpip in the phone is quite easy.

Example below:
Code:
[I]# detach adbd from usb and tell it to listen to port tcp 2222
[/I]packetlss@wopr$ adb tcpip 2222
restarting in TCP mode port: 2222

[I]# tell your local adb command to use ip:port to connect through instead of usb (192.168.0.151 is my N1 on Wifi)
[/I]packetlss@wopr$ adb connect 192.168.0.151:2222
connected to 192.168.0.151:2222

[I]# connect over ip 
[/I]packetlss@wopr$ adb shell
# uname -a
Linux localhost 2.6.29.6-cyanogenmod #3 PREEMPT Wed Jan 27 07:21:12 EST 2010 armv7l GNU/Linux
# exit

[I]# tell adbd to go back to listen on usb
[/I]packetlss@wopr$ adb usb
restarting in USB mode
 

mikecyber

Member
Sep 15, 2009
45
0
Getting adbd to listen to tcpip in the phone is quite easy.

Thank you, your method works well.

With my nook all I need to do is "adb connect 192.168.1.x:5555" I don't have to put adb into tcpip mode or enter "uname -a" in shell.
I would love to see "Wireless Debugging" in Settings -> Applications -> Development, or really anywhere in Settings. I haven't voided my N1's warranty, so an app to add this functionality would be great.
 

packetlss

Senior Member
Aug 10, 2009
236
8
Thank you, your method works well.

With my nook all I need to do is "adb connect 192.168.1.x:5555" I don't have to put adb into tcpip mode or enter "uname -a" in shell.
I would love to see "Wireless Debugging" in Settings -> Applications -> Development, or really anywhere in Settings. I haven't voided my N1's warranty, so an app to add this functionality would be great.

That's because the nook adbd is configured to listen to tcp by default, on most other platforms it just listens to USB by default.

The 'uname -a' was just to show that I actually was connected to the phone. Nothing to do with the actual adb stuff at all, I was just lazy and copied from my terminal :)
 
  • Like
Reactions: OmarBizreh

paulobrien

Senior Member
Nov 6, 2003
5,276
7,321
Norwich
www.MoDaCo.com
MoDaCo Custom ROMs generally run dropbear by default with a password that is randomly generated on first startup.

I don't mind making an addon update zip for Cyanogen's ROM with this functionality if you want it? ;)

P
 

britoso

Senior Member
Jan 13, 2010
2,794
302
Orlando
bump

Found this really useful as my USB driver causes BSODs. thanks packetlss

1. connect device via usb
2. adb tcpip 2222
3. connect over wifi. adb connect 192.168.3.5:2222
4. adb commands as normal

can the OP remove [request] as this is now a [tip] or [howto]
 

tbirdguy

Senior Member
bump

Found this really useful as my USB driver causes BSODs. thanks packetlss

1. connect device via usb
2. adb tcpip 2222
3. connect over wifi. adb connect 192.168.3.5:2222
4. adb commands as normal

can the OP remove [request] as this is now a [tip] or [howto]


Does the USB have to be hooked up each time, or is it a 1 time then WIFI is good after that?
 

martin0285

Senior Member
Jan 11, 2010
466
6
Maine
Nice howto!!

bump

Found this really useful as my USB driver causes BSODs. thanks packetlss

1. connect device via usb
2. adb tcpip 2222
3. connect over wifi. adb connect 192.168.3.5:2222
4. adb commands as normal

can the OP remove [request] as this is now a [tip] or [howto]

Gotta say that is slick as sh**!!! How to get it to stay on tcpip via terminal on phone??
 
Last edited:

leonnib4

Senior Member
Mar 1, 2010
1,458
86
Paris
bump

Found this really useful as my USB driver causes BSODs. thanks packetlss

1. connect device via usb
2. adb tcpip 2222
3. connect over wifi. adb connect 192.168.3.5:2222
4. adb commands as normal

can the OP remove [request] as this is now a [tip] or [howto]

interesseting... thanks!
i'll try that

EDIT: worked so good - thx!
 
Last edited:

britoso

Senior Member
Jan 13, 2010
2,794
302
Orlando
Does the USB have to be hooked up each time, or is it a 1 time then WIFI is good after that?
Do it once and it stays...perhaps till you reboot the phone.
If your IP address on wifi you will need to run the connect command again. Also set the wifi-sleep mode to 'never', possibly install the wifi-keepalive app.

Its awesome to be able to run stuff on your phone straight from eclipse, unplugged; or install/push/pull files
 
Last edited:

prophetjinn

Senior Member
Nov 3, 2009
236
5
why not use ssh?
the dropbear-client is included in most custom roms.

edit: i mean dropbear-server of course ;)

Do you know what the default pw is for dropbear? when i try to ssh with my local ip and root, i get a connection refused on port 22. i'm using cm6, do i have to enable it somehow?
 

bohlool

Senior Member
Jun 21, 2010
100
12
TCPIP mode without connecting usb

Is it possible to enable ADBD tcpip mode without connecting device to USB port and use adb command? I mean maybe a command we can run in a Terminal Emulator?
 

bohlool

Senior Member
Jun 21, 2010
100
12
re,it's there any possible that get adb work over TCP/IP ,on all android devices(include non-rooted devices)?

I know how to enable it, just connect it with usb to computer and enter "adb connect tcpip <port>" then disconnect usb and connect phone to wifi, find the ip of phone and on your computer type "adb connect <ip>:<port>"

my problem is how can I do the first step without usb cable, i.e. using a terminal emulator. I have root access.
 

leonnib4

Senior Member
Mar 1, 2010
1,458
86
Paris
# adbd
As root on the device returns
Cannot bind tcp 5037
Im not home so i cant test but maybe this could work over tcp port 5037...

Sent from my Nexus One
 

wobiu

New member
Aug 11, 2010
2
0
I know how to enable it, just connect it with usb to computer and enter "adb connect tcpip <port>" then disconnect usb and connect phone to wifi, find the ip of phone and on your computer type "adb connect <ip>:<port>"

my problem is how can I do the first step without usb cable, i.e. using a terminal emulator. I have root access.

for rooted device。you can use"start adbd" command to start adb daemon ,instead of plug into usb.

What am i looking for is a way to use adb over wifi for all device including non-rooted.
 

bohlool

Senior Member
Jun 21, 2010
100
12
for rooted device。you can use"start adbd" command to start adb daemon ,instead of plug into usb.

What am i looking for is a way to use adb over wifi for all device including non-rooted.

What is the port number then? is it 5037? Can I set it somewhere? (for rooted devices of course)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Solved

    I finally solved the problem. these are the commands to enable adb over wifi:


    Code:
    setprop service.adb.tcp.port 5555
    stop adbd
    start adbd

    and to disable it:


    Code:
    setprop service.adb.tcp.port -1
    stop adbd
    start adbd


    I assume you need su access to run it. I tested it and its working.
    3
    Getting adbd to listen to tcpip in the phone is quite easy.

    Example below:
    Code:
    [I]# detach adbd from usb and tell it to listen to port tcp 2222
    [/I]packetlss@wopr$ adb tcpip 2222
    restarting in TCP mode port: 2222
    
    [I]# tell your local adb command to use ip:port to connect through instead of usb (192.168.0.151 is my N1 on Wifi)
    [/I]packetlss@wopr$ adb connect 192.168.0.151:2222
    connected to 192.168.0.151:2222
    
    [I]# connect over ip 
    [/I]packetlss@wopr$ adb shell
    # uname -a
    Linux localhost 2.6.29.6-cyanogenmod #3 PREEMPT Wed Jan 27 07:21:12 EST 2010 armv7l GNU/Linux
    # exit
    
    [I]# tell adbd to go back to listen on usb
    [/I]packetlss@wopr$ adb usb
    restarting in USB mode
    1
    Thank you, your method works well.

    With my nook all I need to do is "adb connect 192.168.1.x:5555" I don't have to put adb into tcpip mode or enter "uname -a" in shell.
    I would love to see "Wireless Debugging" in Settings -> Applications -> Development, or really anywhere in Settings. I haven't voided my N1's warranty, so an app to add this functionality would be great.

    That's because the nook adbd is configured to listen to tcp by default, on most other platforms it just listens to USB by default.

    The 'uname -a' was just to show that I actually was connected to the phone. Nothing to do with the actual adb stuff at all, I was just lazy and copied from my terminal :)