[REQUEST] Wireless ADB

Search This thread

bohlool

Senior Member
Jun 21, 2010
100
12
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.
 

lostinbeta

Senior Member
Oct 13, 2008
313
27
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.


Thank you for this. I used GScript to put these into shell scripts that are now shortcut icons on my Android homescreen. If I were a better programmer I'd figure out how to build a toggle widget instead. Which if I had some free time I'd do it, but free time is non-existent for me :(
 

bohlool

Senior Member
Jun 21, 2010
100
12
Useless app

search adbwireless in market - there is a app

:D

i can´t post links :-/

I say that but it need root access and I don't know why?! the commands I posted here do not want root access and using an script app you can create two scripts to use enable/disable it without (I believe) root access.
 

bohlool

Senior Member
Jun 21, 2010
100
12
no need su

Aehm... you said in an earlier post that it needs su and thats basically root... (su = super user)

I said I assume it needed because I always use su and I stored my scripts on /system partition, but now when I am using gscript or simply terminal, I don't need su (super user the same as root, I know that much dude ;) )
 

rac2030

Senior Member
Jun 9, 2007
213
3
www.2030.tk
Ok but thats strange that you are able to stop and start services and write to systemvariables as normal user... have to take a closer look ;-)
 

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
I say that but it need root access and I don't know why?! the commands I posted here do not want root access and using an script app you can create two scripts to use enable/disable it without (I believe) root access.

It works perfectly and you have already rooted your phone according to your sig so why bother complaining and stating that it's "useless" when in fact you're wrong?
 

rac2030

Senior Member
Jun 9, 2007
213
3
www.2030.tk
It works perfectly and you have already rooted your phone according to your sig so why bother complaining and stating that it's "useless" when in fact you're wrong?
He wasn't complaining that the app isn't working or is useless, he just questions that it needs root and there's nothing wrong if a user doesn't just allow every app SU access.
I mostly prefer open source apps (don't know if the above app is OS) in this case because I can check what its doing and compile it myself or I have the tools and knowledge to see what exactly closed source app do but most users have not and a trust all policy isn't good (even the app is on the Google Market).

@bohlool
I just tested it and it doesn't work (like I thought) without requesting su access.
The part with the setprop command doesn't do anything if it's not executed from root user.

You can check it with:
Code:
setprop service.adb.tcp.port 7896
getprop service.adb.tcp.port
Second command should give back the number you entered above.

The setprop command doesn't return anything if it succeeds or fails, that's why you need to use the getprop to verify the value.
 

bohlool

Senior Member
Jun 21, 2010
100
12
He wasn't complaining that the app isn't working or is useless, he just questions that it needs root and there's nothing wrong if a user doesn't just allow every app SU access.
I mostly prefer open source apps (don't know if the above app is OS) in this case because I can check what its doing and compile it myself or I have the tools and knowledge to see what exactly closed source app do but most users have not and a trust all policy isn't good (even the app is on the Google Market).

@bohlool
I just tested it and it doesn't work (like I thought) without requesting su access.
The part with the setprop command doesn't do anything if it's not executed from root user.

You can check it with:
Code:
setprop service.adb.tcp.port 7896
getprop service.adb.tcp.port
Second command should give back the number you entered above.

The setprop command doesn't return anything if it succeeds or fails, that's why you need to use the getprop to verify the value.

Interesting, because it work for me without su, I tested your command and it return the port number. I used gscript to run scripts without su and it worked. I should test it on an unrooted phone.

Sorry about the title, but an application that need more permission that it really need is useless to me, I cannot trust app, giving su permission to an unknown app specially while it doesn't need it.
 

eViL D:

Retired Recognized Developer
Jun 14, 2006
4,479
1,338
Interesting, because it work for me without su, I tested your command and it return the port number. I used gscript to run scripts without su and it worked. I should test it on an unrooted phone.

Sorry about the title, but an application that need more permission that it really need is useless to me, I cannot trust app, giving su permission to an unknown app specially while it doesn't need it.

Gscript will only request su once. ;)
 

leonnib4

Senior Member
Mar 1, 2010
1,458
86
Paris
Test it in a Terminal but it shouldnt work without root... otherwise it is a security issue on android/your ROM.

Not really...

I agree that giving root acces with adb over wifi like ssh might be a security issue.

BUT you need to be on the same wifi network plus activate usb debugging.

By that I mean that if it happens then you should be aware of what you did with your development settings.
 

rac2030

Senior Member
Jun 9, 2007
213
3
www.2030.tk
Not really...

I agree that giving root acces with adb over wifi like ssh might be a security issue.

BUT you need to be on the same wifi network plus activate usb debugging.

By that I mean that if it happens then you should be aware of what you did with your development settings.
I was not talking about giving root access (this is a security hole a user opens because he wants to) but he was talking about that this is working without granting SU access and if this would be (but isn't from my testing) it would be a major security issue (not regarding exactly this but overwritting system properties with setprop from any app without root access).
 

bohlool

Senior Member
Jun 21, 2010
100
12
Widget for ADB over WIFI

OK. I created a widget to beautifully do this. On my ROOTED phone, it doesn't need SU access but I add it as an option (default is off) in case of it didn't work on your phone. It will also show IP and port information on the icon when enabled and can be easily disabled.

Again, on my phone it doesn't need SU access but my phone is rooted and I don't know about other phones, thus for now, the rooted phone is a requirement.

Other features of the widget:
- Info on the icon can be enabled/disabled.
- The label under the icon can be customized or completely disabled
- You can specify port number
- you can set SU mode, please note that this feature is experimental and will slow down the widget operations a little.

Take a look here: http://xdaforums.com/showthread.php?p=7881237#post7881237

And I am sorry that I said the other application is useless, the only thing is he didn't give credit to us in this forum that make this working and his app still need SU access.
 

bohlool

Senior Member
Jun 21, 2010
100
12
App is free now!

I decided to make the widget free. download and enjoy. I will add some cool features soon.
 

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 :)