I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now.
Here is what I do to produce the problem.
I Connect phone to USB
This is what the ADB log says at that point
PropertyFetcher: AdbCommandRejectedException getting properties for
device c9c2d39f: device offline PropertyFetcher:
AdbCommandRejectedException getting properties for device c9c2d39f:
device unauthorized. Please check the confirmation dialog on your
device. DeviceMonitor: ExecutionException getting info for device
c9c2d39f
Please not that the phone actually connects -and that I can see the logcat etc on my device after I connect. I have tried to revoke debugging rights from the developer menu, and re-authorized the computer.
Start my app, that I want to debug
Press the "Attach debugger to process" icon (to the right of the regular "debug" icon)
At this point, the "Choose process" dialog appears with no running processes. The phone also disconnects the debugging session, and do not show up when running
Adb devices
At this point a restart of adb has no effect. The only way to get debugging back is to reconnect the phone to the USB port.
As I said, this only happens on one of my USB ports, it works on another. Does anyone have an Idea of what is going on here?
I had a similar issue on an older computer when the computer's motherboard was on its way out. Just as a precaution, you should back-up all of your work and try to determine if this is hardware or software related. From my experience, when USB ports start acting weird, it is usually hardware related.
When mine started to act up, it would connect and acknowledge a connected device, but the computer would throw all sorts of errors regarding reading the device files and even allowing the connection to remain. I tried re-installing software, resets, firmware re-installs, etc. I could not figure out what was going on, so I had my friend check it out (he has around 30+ years experience in computer engineering) and he determined it was my computer's motherboard that was on its way out. He said the only thing that would correct it was to replace the motherboard or get a new computer.
My S5 active showed 'offline' to ADB despite enabling/disabling debugging, updating the driver, and restarting the phone and computer. Finally - I move the USB plug from a HUB, and plugged it in directly from the phone to the PC - and it finally worked.
I had a similar issue too.
Try these steps:
Unplug the usb cable. Reboot your computer and samsung s5
In S5' Developer options, click "Revoke USB debugging authorizations" and press OK
In Android Studio, check "Tools | Android | Enable ADB intergration", if already checked, uncheck it, and then check it again.
Plug your samsung s5, and follow the dialogues instructions to allow this computer ...
Run your app
These steps should fix the problem.
Related
My Galaxy S9 device keeps appearing as "Offline" when I try to debug. It was working with the same application previously, and nothing changed. I receive this error: Session 'app': Error Installing APK
and
com.android.ddmlib.AdbCommandRejectedException: device offline
Error while Installing APK
Things I've tried:
I updated Android studio
All combinations of cleaning/rebuilding my project
Rebuilding APK
Double checking that I have the most up to date drive on my pc
Emulating didn't work either, but I was able to fix that by installing the Intel HAXM installer. Is there another set of developer tools I need to debug on hardware?
just today I've been through a similar situation with my MOTO G5: Everything was working just fine a few weeks ago and somehow it stopped working (maybe some windows update messed with something), device was always "offline" when using "adb devices". I've tried lots of different suggestions (reinstall drivers, disable/enable usb debug, adb kill/restart-server, change cable, change USB port, restart PC, restart phone, just revoke usb auth (see below) with no success.
Then I realized: what if I delete the RSA keys, and just then revoke the USB debug authorization? And finally, it worked!
Thanks to this website I've quickly found the location of the keys: Refresh Android Debug Bridge Keys.
On Windows, they are on folder C:\Users\{username}\.android\
After that, next time I plugged the phone and performed a "adb devices" finally, it showed "unauthorized" instead of "offline". Then on the phone screen there was a popup requesting authorization. Once authorized again, voila: everything working!
Since I didn't find this suggestion on any other forum before, I decided to post here my personal solution. Maybe I could help some other fellows with same issue.
Disable and re-enable adb debugging in your device's Developer options. Also, when you connect the device to your computer, you will get a prompt in the device asking if you want to trust the computer, Click ok.
try adb kill-server && adb start-server && adb devices
besides, this is no emulation, but debug on physical hardware.
one could also define this script as "external tool" in Android Studio.
This may be a late answer, but this is what worked for me.
When prompted on the computer to choose what happens when the device is plugged in, choose "Do Nothing" or simply ignore it.
On the Device, When asked "Allow Access to phone data?" tap AllOW.
This is what you should see when you swipe down from top.
In the options above, select charge this phone
wait for a few seconds and then again select either Transfer Files or Connect a MIDI Device
The device should show up in your list after some time.
If it doesn't, disable and then re-enable USB debugging from the developer options.
I have tried EVERYTHING I could find on this but still no solution.
I have a Samsung s6 edge Plus 32 GB. I am trying to deploy an app on Android Studio but it always shows the device as offline. What I have tried
Unplugging and plugging back
Restarting device
Enabling debugging on device
Shuffled and tried different transfer protocols
Installing and Uninstalling Samsung drivers
Checking 'Enable ADB integration' under Tools -- Android
Checking android studio & driver updates
Any help will be greatly appreciated
This happens sometime, even when USB Debugging is on. Try this:
Go to Settings->Developer Options
Search for Revoke USB Debugging Devices
Revoke all existing devices
Disable USB Debugging and enable it
Now connect your phone to system with USB cable
Wait, and a dialog will appear on your phone, for permission to allow for USB Debugging. Click on checkbox and press Allow.
Now the device should appear online in Android Studio.
If problem still persists, then problem is with your phone drivers installed on system.
This happens to me regularly (I use multiple devices) and one of these two things always fixes it:
Make sure your device has "only charge" selected in the dropdown menu entry that appears when you connect your phone. Instead select "transfer files".
Disable and enable usb debugging.
Change your device cable or change your connection USB port on PC. I think this problem is hardware problem. Try other hardware problem possibilities.
When I plug my phone into my computer with USB Debugging enabled, literally nothing happens. The computer does not even detect a device has been plugged in and the phone does not show the charging LED.
When USB Debugging is turned off, without disconnecting my phone my computer detects it.
I think there's an issue with ADB on the phone as the error occurred after trying to patch ADBD using Chainfire's ADBD insecure.
So long without a reasonable answer?
Vivo Y55A, but your solution is probably similar, because this is a pretty generic issue. With platform-tools installed, using "adb devices" I saw nothing attached. Developer Options was of course activated (via tapping Build Number 8 times), and USB Debugging was set to "on." Below those options are "USB Debugging Mode" which I had forgotten to set to MTP (it was on Picture Mode or something). Still no device.
I changed the USB cable and that solved the problem. Aside from being faulty, some cables may have only the power connectors wired, and the serial lines may not have any connection. Do try at least a couple of other cables, as well as a couple of other USB ports (sometimes the driver pointing to a particular port may be faulty).
USB debugging can sometimes be hectic. I've faced similar issues without any reasons. The best thing you can do is, root your phone using any popular rooting software and then download WIFI ADB. Its pretty simple and decent to use.
When I run adb devices there are no devices showing as connected. My device is a LG Optimus Exceed 2 running 4.4.2
There are many of these posts around, so here's what I've done:
I'm using the cord that came with the phone. It charges and tries to sync photos, so it isn't an issue here. Switching usb ports and trying a powered usb hub doesn't affect it either.
I've added the vendor id (0x1004) to ~/.android/adb_usb.ini
Restarted and unplugged any combination of things you can think of
USB Debugging is on. And has been restarted. Same with Unknown sources.
I have never used EasyTether, nor is it installed anywhere on my computer.
Updated adb, updated my sdk.
Restarted adb server
Tried installing LG's drivers: http://www.lg.com/us/support-mobile/lg-VS450PP (They say they don't support Mac S/W upgrade, yet they have a package to install. No help there)
I have a Nexus S running 4.1 that works, and an old LG phone running Gingerbread that connect.
Any wizards out there who've already struggled with this who have advice?
I tried all of the connection types (charge, MTP, PTP) but perhaps not "Internet Connnection, modem"? You can change it by pulling down the system-wide drop down menu and touching "USB connection".
This is how I fixed it, but I thought I'd tried this already, so I can't guarantee it wasn't this in conjunction with one of the things done above.
PTP seemed to do the trick. Never had to do that on any other device...
I had the exact same problem. Selectin Internet Connection and then Ethernet as the USB connection type fixed it and everything is working as expected now.
I know this sounds like a stupid answer, but the same thing happened to me. It turns out the micro USB cord was just bad - which is weird, because it still charged the phone perfectly fine. After testing the bad cable unsuccessfully on a phone that had been recognized on my mac before, I switched to a different micro USB cable, and that made all the difference.
This is late in the game but I had an additional step to all the other suggestions. The phone was showing up in the System Profiler after I switched the usb mode to 'MTP' mode, but I didn't see any usb tethering options. After adding the phone's vendor ID to the usb ini file, enabling the developer and usb debugging, killing and restarting adb, I still didn't see my device in adb devices.
I finally had to download the Mac driver for the phone directly from LG.com. After installing and rebooting on the computer, the device showed up in adb devices.
I'm having an issue with my Galaxy S2. I typically leave it in Debug mode, up until a few days ago it has worked great. I've successfully loaded APK's for testing through eclipse previously.
I tried to load a prototype of a new app im working on and when I plugged in the S2 nothing happened, Windows didn't beep like usual and when I tried to view running devices it did not show up.
When I look at the device manager under universal serial bus controllers, it doesn't show any 'unknown devices'
I've tried reinstalling drivers through kies, and third party sources (as well as removing all drivers and letting windows install them again for me.
I've tried connecting as Mass Storage Device, with debug mode on and off.
I've restarted both my computer and phone many times.
When my phone is off and plugged in Windows will beep and say that a device was connected but not recognized (which is more then what I get when the phone is on)
And sometimes when I "troubleshoot connection issues" in Kies it will reinstall the drivers and after the process is complete windows will report "Drivers were not successfully installed"
I've tried plugging it into my Windows XP laptop and it will show up as "Unrecognized device" even after I installed Kies on the laptop, and tried the driver installation it with the same results.
Posting here is my last resort as I've spent close to 5 hours troubleshooting this issue, and searching for answers. My biggest concern is that when I do plug my phone in it will beep to say that it is charging, but windows 7 doesnt even see it!
I appreciate all suggestions & help!
EDIT: Also I installed the Samsung Android USB Driver for Windows and windows reports that the drivers were not successfully installed
Thanks
Jon
Try to key in dialer:
*#7284#
It has 4 options:
UART
MODEM
PDA
USB
MODEM
PDA
In USB section, select the PDA. If it already selected to PDA then reselect it by selecting MODEM and then PDA again.
Only change the USB setting and then press back and try reconnect to kies again.
Hope it helps..
I had the same problem and JUST as i was about to give up, i realized that I had replaced my usb cord with a generic one from the store. I happened to still have the old one around still and that ended up being my issue -.-; Hope this helps someone else!
This really sucks, I know I've had this happen a few times and it's really annoying to have to deal with. I had luck with this post where they suggest:
... they suggested removing battery from hero with usb pluged in and
then putting battery back in, so i did this thinking it wouldn't work
and hey presto, mounting option became available. I was then able to
follow your first set of intructions to install the drivers through
devices and sync is now working!
If that doesn't work there are a few suggestions and helpful driver websites on there for you to follow :-D
I know I would:
Uninstall all drivers related to your device
Restart Computer without connected
Pull battery on device, plug it in, and once detected put battery back in.
If driver doesn't install correctly, or "unknown device", go to the website on that forum to get the CORRECT driver for your device and Windows OS
Go to Control Panel->Device Manager->(unknown device)->Update Driver
Locate downloaded driver, install
Make sure that when connected, the device says "USB Connected" in it's notification area
Click "Turn on USB storage", or "USB Debugging -> USB debugging"
.. this will at least show you that you have the right drivers.
IF you did all of this and you still can't get it to debug through eclipse, you either have conflicting drivers somehow, or your eclipse IDE isn't setup properly. Maybe update Eclipse, and Android SDK and try again?
Sorry can't give you exact details but this problem could be ANYTHING lol
I had the same problem while using a generic cord.
Don't use for usb transfert
I think they are made only for charging.
Solve by using a stock cord not a generic one.
Okay, so after talking to Samsung they informed me that there is a small defect with the female usb connection, and that it can sometimes be loose.
Only solution, mail it to them...
This fix works on all my computers that "don't recognize" my rooted Samsung Android. Plug the phone into the computer and restart phone. When it comes up again, the computer recognizes it.
My method is KIES AIR.
Open Kies Air
Go to settings > Bluetooth off set.
More settings > Tethering and portable hot spot > Bluetooth tethering check true and portable Wi-Fi hotspot check true.
Now KIES air open on your device and start button click. copy IP address to browser
Your s2 is connected your computer.
Open browser, and copied ip then click paste.
I have two Win XP SP3 workstations that would not connect to my Galaxy. Finally fixed it by installing this particular Intel driver and installing Windows Media Player 11.
if you are running a custom kernel on your phone, you may want to check too if you have "force fast charge" turned on or not. I thought my phone and computer would never talk to each other again but it turned out I had fast charge enabled. Turning that off solved the problem for me.
It might be an issue with USB 3.0 ports. I was tormented by this issue too and I was at the point where I was so ready to burn this device to kingdom come. Before I did that, I decided to use my never-used 2.0 port and guess what, IT WORKED! If your PC doesn't have a 2.0, good luck with that.
punch in code *#7284#, (UART set to PDA) and (USB set to PDA)
solved my problem