Android ADB connect to device with broken USB and no root
I’ve read through the thread below and come across 2 solutions for connecting a device with ADB. https://stackoverflow.com/questions/4893953/android-run-install-debug-applications-over-wifi/19940301#19940301 The first is to use USB, and this isn’t an option because the USB port is busted on my Droid Razr Maxx. The second is via wifi but using root permissions.. and I don’t really want to root my phone. Can’t I use strict WiFi without root to set up ADB?
I don’t believe you can. However, you can install applications from email attachments, websites which serve with the correct mime type, etc
@bughi The USB port is busted and it could have been fixed if under warranty, and then you don’t want to root. Is there a reason for not rooting the device?
@Michael of course there are other lesser reasons. But the literal name is «Android Debug Bridge» implying the primary use of installing and getting debug messages from apps being developed. A device with broken data connectivity on the USB port still retains the possibility of installing fresh builds of apps being developed by the other means of sideloading supported when «unkown sources» is enabled in settings.
3 Answers 3
I have not tried this myself, but there’s an app named ADB Wireless (no root) which, as the name suggests, claims to make this possible without involving root:
This app is for developers wanting adb access over WiFi without rooting your phone.
…
*** NO ROOT REQUIRED ***
Usage instructions can be found on the app’s playstore page – looks pretty easy and straight. And the permissions look phantastic: nothing that’s not necessary or explainable. In fact, just a single one to view WiFi connections. So no ads or spyware to be expected 😉
Same to be said for an app called ADB Wireless (no-root) (yes, same name – different dev), which seems no longer maintained though (last release was 6/2013):
the first android application in the Google Play store to provide a wireless ADB connection without root.
Asks a few more permissions (a.o. full network), though.
Note however that all those non-root solutions seem to require a (USB) cable connection for initial setup – so there’s probably nothing for your special case.
Conclusion:
No app for that if your USB port is busted. So unless you get your busted port repaired or root your device, I see no way to get ADB running wirelessly. As initialization requires more permission as any «standard user» on Android gets, there are no command-line tricks either unless you already have root access: the initialization via USB makes use of the ADB daemons elevated permissions, which are only accessible that way.
For other readers:
Initial phrasing of my answer omitted that fact, as the OP’s USB port is broken/unusable: If your USB port is in working order, and you can use an USB cable to connect to it, you won’t need any of those fancy enabler apps (see here for more) just to be able to use ADB wirelessly (though some might come in handy if they e.g. offer a tasker plugin, so you could enable wireless ADB in your home network automatically and turn it off when you leave it). As Firelord pointed out in his commend, and Lucky linked to a post on SO, steps to enable wireless ADB are easy then:
- enable usb-debugging on your device
- connect your device to your computer via USB cable
- run adb tcpip : (e.g. adb tcpip 192.168.1.50:5555 – find the correct IP address in the wireless properties of your Android device) on your computer
- still on your computer, run adb connect (e.g. adb connect 5555 )
- unplug your USB cable, it no longer needs to be attached – ADB now runs via WiFi
Adb over wireless without usb cable at all for not rooted phones [duplicate]
I want to debug Android APPs on my phone (LG nexus 4). I’m travelling and I forgot my USB cable. When I work at home I can do it just connecting the USB cable and executing the command ‘adb tcpip 5555’. Then I can unplug the USB cable and connect via ‘adb connect IP’. But now I cannot execute the first command because I don’t have a cable. I don’t understand why I have to do it every time, since I already execute the ‘adb tcpip’ command before. What I tried now: I installed a terminal application on my Android and tried to execute that command there, but I received a «device not found» error. Maybe he cannot see himself. I search for any reasonable option in «Android Development Options» and enabled everything seemed to have relation with Wifi. But nothing helped. I search StackOverflow, but all answers I found involving connect via USB cable before. Is there I way to do this connection without the need of a cable at all? Some info: My Nexus 4 isn’t rooted. The android version is 5.1.1.
When you get home, buy a bunch of micro USB cables on eBay or elsewhere. Scatter them liberally throughout your luggage. 🙂 With respect to your problem, though, AFAIK only certain devices (e.g., Fire TV) are set up to do adb-over-TCP/IP on a full-time basis, for developers that opt into this. I am not aware of any workaround for other devices. «I don’t understand why I have to do it every time» — security, I imagine.
None of them didn’t answer to your question, there is no way to use WiFi without USB cable in not-rooted devices. the marked answer works for you?
For those saying «just buy a cable», my USB port no longer responds (I charge wireless), I do not have that option, but still want to debug. Phone is fine apart from that, repairing is a bit expensive for just a USB port 🙂
7 Answers 7
The question is about a non rooted device but if it is rooted the simplest way would be to:
From the terminal on your phone, do this:
su setprop service.adb.tcp.port 5555 stop adbd start adbd
I cannot execute the su command. I received «command not found». Maybe cause it is not rooted? I execute the setprop command without su but I received «cannot set property».
Question states «for not rooted phones», this answer doesn’t meet that criteria. Why is it the most upvoted answer?
This is a good answer for readers brought here by search engines, who also missed the non rooted part of the question
Adb over wireless without USB cable at all for not rooted phones.
You need to connect your device to your computer via USB cable. Make sure USB debugging is working. You can check if it shows up when running adb devices .
Open cmd in . \AppData\Local\Android\sdk\platform-tools
Ex: C:\pathToSDK\platform-tools>adb devices
You can check if it shows up when running adb devices.
Ex: C:\pathToSDK\platform-tools>adb tcpip 5555
Disconnect your device (remove the USB cable).
Step3: Go to the Settings -> About phone -> Status to view the IP address of your phone.
Ex: C:\pathToSDK\platform-tools>adb connect 192.168.0.2
Step5: Run adb devices again, you should see your device.
Now you can execute adb commands or use your favorite IDE for android development — wireless!
Now you might ask, what do I have to do when I move into a different workspace and change WiFi networks? You do not have to repeat steps 1 to 3 (these set your phone into WiFi-debug mode). You do have to connect to your phone again by executing steps 4 to 6.
Unfortunately, the android phones lose the WiFi-debug mode when restarting. Thus, if your battery died, you have to start over. Otherwise, if you keep an eye on your battery and do not restart your phone, you can live without a cable for weeks!
If you set C:\pathToSDK\platform-tools this path in Environment variables then there is no need to repeat all steps, you can simply use only Step 4 that’s it, it will connect to your device.
To set a path: My Computer-> Right click—> properties -> Advanced system settings -> Environment variables -> edit path in System variables -> paste the platform-tools path in variable value -> ok -> ok -> ok
We can do it without a USB cable at all in the following ways.
NEW UPDATE 1: (Latest Answer without using USB cable at all)
Note: It will work only when your laptop and mobile should connect to the same WiFi.
NEW UPDATE 2: (Latest Answer without using USB cable at all)
Note: It will work only when your laptop and mobile should connect to the same WiFi.
Go to developer options from the mobile settings and enable Wireless Debugging
Debugging in Android device over wifi without rooting [duplicate]
Is there any possible way to debug or run android apps from eclipse to my Sony Tablet S over wifi rather than USB without rooting the device? There are ways to do it, if the device is rooted. However, I am seeking the solution in a device that is not rooted.
Unless Sony has published something specific for that device, you are limited to debugging over USB. The only non-rooted devices that support debugging over a network are Google TV devices, AFAIK.
4 Answers 4
restarting in TCP mode port: 4455
- connect to the device using a specified ip:port. my device is using wifi adb connect 192.168.1.103:4455
connected to 192.168.1.103:4455
- now do normal adb commands over tcp like adb shell
- when your done, you can put it back in USB mode adb usb restarting in USB mode
As stated in the other reply (and error mesage for that matter), the device needs to be connected via usb when using the first command.
After a bit of dabbling with testing I successfully managed to connect a Sony Tablet S over ADB following this procedure, when both the computer and the tablet were on the same wifi network. I used an Xperia T as a tethering point between a laptop and the Tablet S. I followed the same procedure on an Xperia Tablet S and an Xperia S as well.
- Connect the Sony Tablet S through USB to a computer, make sure you have ADB debugging enabled on the tablet.
- On the computer, execute «adb devices», verifying the tablet is showing up in the list of available devices.
- Execute «adb tcpip [port]» while the tablet is connected to the computer, verifying you get a response «restarting in TCP mode port: [port]»
- Disconnect from the device from the computer it was connected to.
- From a host located on the same wifi network, execute «adb connect [ip to device]:[port]», verifying you get a response «connected to [ip to device]:[port]»
In the end I launched Eclipse, created a test project and tried launching the project. The project installed and launched automatically from Eclipse. I also tested this for debugging and that worked equally well.
Finally After lots of search, here is the consolidated, short tutorial about «Wireless Debugging with Android without rooting» your android phone.
- Make sure your Phone and your PC/Laptop is connected in the same network.
- Find your Android Device’s IP Address: Go to Settings > About Phone > Status. Note down it.
- Ping Test: Lets first check if your phone is accessible from your PC/Laptop to do this ping your Android Device and check its response. See Notes if ping is unsuccessful.
- Connect your Android Device Via USB in USB Debugging Mode.
- Open command prompt and cd into \platform-tools directory and run the following commands.
adb tcpip 5555 adb connect DEVICE_IP_ADDRESS_HERE:5555
adb -s DEVICE_IP_ADDRESS_HERE:5555
Disconnect Android Device from USB. If everything is fine, you can Wirelessly debug your Android Apps!
- If ping is unsuccessful, Make sure Wireless (WiFi) devices and wired devices are not isolated. If Isolated, you need to disable isolation. Router Mfgrs calls it as AP Isolation. There will be a setting in Router’s Wireless Configuration page. I have D-Link Router, I unchecked the Enable MultiAP Isolation setting in Wireless Basic Setup Page.
- I personally felt this method of connecting is taking more time.. so, I configured my android device so it uses static IP like 192.168.1.55 to connect to my router and I made a windows batch file like below,
@echo off cd C:\AndroidSDK\platform-tools\ echo make sure your your Phone is connected in USB Debugging Mode. pause adb kill-server adb tcpip 5555 adb connect 192.168.1.55 pause
so, every time I have just need to plug in my device, and double click the batch file and all done automatic 😛 !