I have developed an application and i was planning to deploy it to my HTC Desire.
I have installed USB driver. I turned on USB debugging on the phone and choosed charge only when phone plugged-in. When I run application Android device chooser show my device offline.
I am stuck at this point. Any help would be appreciated.
I develop at Eclipse Helios on Windows 7 (64bit)
I’ve seen this happen a few times on my HTC Desire. I’ve never figured out whether the problem is in adb or the device but I usually do the following:
- Restart adb by issuing ‘adb kill-server’ followed by ‘adb start-server’ at a cmd prompt
- Disable and re-enable USB debugging on the phone
- Rebooting the phone if it still doesn’t work.
99% of my issues have been resolved with these steps.
I tried everything mutliple times in multiple orders, then stumbled across my particular answer:
Use a different USB cable – suddenly everything worked perfectly.
(Another potential answer for people that I found – make sure there is more than 15mb free space on the device.)
Go to DDMS->Devices->Click on View Menu Down arrow on right side -> select “reset adb” option it will work
In Android Studio: open the Android Device Monitor (Tools->Android) and click on the arrow on the ‘Devices’ tab to reset the adb
Faced same problem in Windows with Nexus 7 device.
Simply killing adb.exe process from Task Manager solved my problem.
I had the same problem several times – just rebooting solves this.
I also had a smilar problem, I had Samsung galaxy S (GT I9000). I had the drivers installed but the phone showed offline in Android Studio.
Restarting the device while connected to PC solved the issue.
Updated the Android SDK platform tools using SDK Manager (in Eclipse). Works for me.
I had the same issue and i solved it by resetting the adb on eclipse.
on eclipse Go to:
DDMS(top right corner) -> Devices -> reset adb
I can’t say for sure but after hours of random disconnections from my device (especially when trying to debug anything), I switched to a USB port that is NOT USB3.0 and that seem to solve the issue.
I have HTC wildfire and disabling and enabling the debugging worked fine for the “offline” problem. The error does not show up.
However I ran into a new problem when trying to import a python file with sl3a : “no moduled named android”
That being said, I still cannot run this
android.py file located somewhere on the SD Card/python folder.
I can connect with androidscreencast.jnlp and it works fine 🙂
I fixed it by deleting unwanted applications/games from my device–make sure there is more than 15mb free space on the device.). It will work 🙂
I had the same problem with my Galaxy S4, when connected to a Win 7 64 machine, not showing up as an available device in Eclipse. Tried rebooting phone, starting/restarting adb, switching from usb 3 to usb 2 port… none of which helped. Downloaded Samsung drivers from here: http://www.samsung.com/us/support/owners/product/SGH-I337ZWAATT
installed drivers and then when I reconnected my phone, windows installed the new drivers (took a min or so). I then restarted Eclipse and was able to see the phone and run the app.
I also tried this with the usb 3 port and it works as well.
I had a similar problem in Android Studio 0.2.2 (IntelliJ). On Windows 7 my Nexus 7 did not appear in device chooser although it was fine on my Mac. I could also browse my Nexus 7 in Windows Explorer.
In the end I needed to install the Asus USB drivers for the Nexus 7 (link):
After that ADB detected my Nexus and everything worked as expected.
Happened to me with a Motorola MZ 601 (Xoom). I tried everything suggested in other answers, but the only thing that fixed the issue for me in the end was to use a different USB port. Mind you, the same device had been connected to the other USB port before and it worked. So, if all else fails, consider using a different port.
I have a Windows 7 desktop with a Google Nexus 7 connected to that. I also had the ‘offline’ problem. Mine is resolved by revoking any previous authorization on Nexus. So now I get the prompt to authorize on Nexus–I am not saving the authorization for now at least–and I allow the authorization–and voila!–Android SDK correctly shows the device as ‘asus-nexus_7-xxxx’. HTH
I was trying to use a Nexus 10 to debug through eclipse. I’ve been struggling to get eclipse to recognize it. Finally I tried ‘adb kill server’ / ‘adb start server’ command, which at least got Eclipse to show the device, although still only offline.
Then I tried switching USB connection to one in the back of the PC, and it worked!
Note: after I switched to rear USB port, I was prompted on the Nexus to allow debugging from my PC, once I allowed, the app popped up.
I was having this problem and solved by activating the PTP Connection
This option will appears when you connect you cable into your phone.
Then you’ll see a prompt which will ask you how to you want to you your USB.
“Use USB for” :
Transferring media files
Connecting MIDI devices
I chose the second option (Transferring images). So, my phone has changed to ONLINE mode
When you attach your android with your PC, you will get couple of options mentioning the way you may connect with the computer. In my case, I am using HTC Wildfire and it displays
- Charge only
- HTC Sync
- Disk Drive
- USB Tethering
I was also facing the problem the Question states and I have tested the way David Caunt answered but yet device was showing offline. *
I rechecked the options and found I selected the Disk Drive option. Then I changed the option to Charge only mode and again follow David Caunt’s steps. I don’t know why, but this time it worked for me.
Yes, similar behavior on the Droid 2 Global. Seems as though you can get the USB recognized if you reboot out of recovery. But, otherwise once you are at console, adb devices shows the device as offline. Not sure how to remedy this problem.
But, as long as you aren’t hacking the phone, the I tried it with normal power supply with the battery dropped, and it powered up. So it is getting power. I am not sure if its CyanogenTeam that just forgot to put some sort of indicator.. or what but, don’t worry. Your battery is charging.
However, pushing .apks and other stuff is not easy anymore. But hey, when rooting a phone for a friend do you necessarily want them pushing anything.. Anywhere?
I found that my Pantech Burst had a problem similar to what you all described. After reading through many such posts everywhere I noticed many people reported having to use a USB cable that they got else where other than the phone manufacturer. What I decided to do was use a different USB port on my PC and the problem was fixed. My Pantech Burst does not go offline in the middle of a debug session any more. The port I used to use was the front port on my box, but it was wired to the motherboard without shielding inside the box. Now I use the port on the back of the box that is directly attached to the motherboard.
Had the same issue on my HTC Incredible S. The problem was that I used a third party docking station to connect. Connecting the phone directly solved the problem.
I’m running JellyBean. I noticed for the first time that there is a “Developer Options” slider at the top of the Developer Options menu. Note that I’m not talking about the USB Debugging checkbox – which is a different option. I slid the Developer Options checkbox to “on” and was back in business. Unfortunately, I’m not sure if this is the whole story because I also ran the adb kill/start commands that David Caunt pointed out above.
I have your same problem. I tried all the solutions I found on this site. At the end I found out that my PC front USB is the cause of the offline state of my phone. I know it’s dumb 🙂 but switching the USB cable from a front USB port to a back one worked for me.
Did you accept the fingerprint for your computer on the device ?
When you attach your PC a prompt will be displayed on your phone/device to add this fingerprint/token and trust it.
I’m on OSX and have a macbook retina. Switching the USB port that my device was plugged into, for some reason, fixed my issue.
I get the “Device offline” error a lot when debugging via wifi. Whenever I want to go back to debugging with usb, I have to type
adb usb, but this command only works if the device is connected to adb via wifi; if the device loses connection for some reason, then it has to be restarted, which is a pain. Simply resetting ADB doesn’t solve this issue either.
To work around this, I downloaded an adb terminal application from Google Play:
I then open up the terminal application on my device while my device is connected to my computer via USB, and type in:
adb kill-server adb start-server adb usb
I then unplug and replug my device from my computer, after which the issue is fixed. No annoying device restart needed!
On the Galaxy Note 3 in debugging mode with Windows 7 I had problems with the device “offline” in the Android ADT (Eclipse) DDMS “Devices” window.
By selecting USB 3.0 as USB connection in the Note 3 pull down control panel the device came online. Obviously applicable for a computer with USB3 ports.
Removing the USB cable for about 5 seconds and reconnecting also solves the problem. Maybe you have to try one or two times.
This was the solution for me. Connect as you would to debug via wifi:
Make sure your phone is connected by usb. Then open your command prompt as admin and navigate to
YourAndroidSdkLocation\platform-tools, and do:
adb tcpip 5555 adb connect YOUR_DEVICE_IP
At this point my device successfully came online, giving me the option to debug via both usb or wifi.
Mine was offline.
I unpluged and pluged again but with the mobile awake, a window opened asking permission.
So try to plug and unplug but with the phone awake.