Related
I just upgraded my phone to 4.2.2, but now i cannot use it in eclipse anymore.
I tried rebooting the device, reset my debug-settings but I cannot get it to work anymore.
I saw it is already a registered issue. There are some new security enhancements, so there should be a dialog (see here at bottom) but this dialog doesn't appear. I don't have several accounts on the phone, which is pointed out in the issue..
Anyone any suggestions?
EDIT: Look at accepted answer below, this should cover all cases. In my case, there were some packages missing, which weren't shown in the Android SDK Manager. I just found the Packages -> Reload in the Android SDK Manager... And I thought this happens automatically
You need three things in order to make sure this update goes smoothly:
Make sure your device is actually running 4.2.2 and the problem is not something else
Your SDK is updated to the latest tools. The adb binary in all but the latest version does not support the 4.2.2 security enhancements.
You are on the main account of your device in case of multiple user accounts.
Connect your Device to your computer and execute adb devices (make sure USB debugging is enabled). You should see something like this:
3tiu52839ry082j3 offline
Right about now, there should be a dialog on your device that looks something like:
Check the Always allow from this computer box if you want and click OK.
That's about it.
Some other things to check:
Make sure your USB cable isn't broken. Sometimes, the smaller cables break inside the main one, and your device may charge but have no data connection. Try with a different cable, or try accessing files on the device over USB (this will go fine if your cable is fine)
Make sure you're using the newest version of adb. Even after I updated my SDK tools, I couldn't get my device authorized when using adb. I eventually figured out that the Nvidia install of the NDK and SDK tools had updated my PATH variable to use the adb from that install, which wasn't the latest update. By using the adb in my newly updated install, I was able to get it all working.
For me it was solved by changing Nexus 7 tablet to "Camera(PTP)" mode.
Check out this blog post on how to do it.
After USB connection of Nexus 7 and confirming digest on Nexus 7, also connecting through TCP/IP with ADB worked.
Wierdly, unchecking and rechecking the "Allow USB Debugging" option popped me the window and selecting "ok" solved my problem.
If none of the solutions worked for you then Reset ADB.
Go to Devices ---Click the right most down arrow----Select Reset ADB from the list.
I had tried everything suggested here and suggested in every log/blog that I could find in google, but still no go. The USB cable is known to be good. ADB is version 1.0.31 (as shown with , USB Debugging is enabled in the Nexus 7 tablet, the SDK was updated to the very latest tools as available on 1-mar-2013 for 4.2.2/API 17. I had tried both Media and Camera modes for USB, rebooted windows, rebooted device over and over again, re-installed latest google USB driver, etc. etc. but ADB Devices still showed nothing.
I hard reset the Nexus 7 tablet thinking that maybe the screen to allow usb debugging had appeared but got hit with cancel. But that didn't work either.
What finally worked was:
going into windows control panel | Device Manager,
selecting NEXUS under Portable devices,
then in the Driver tab clicking on update and manually selecting the Google USB driver (the check feature said it was up to date). Previously, the date shown was in 2006, afterwards a date in 2012 (but more on this in a moment).
That didn't fix anything though.
So then I switched USB from MEDIA device to Camera device - THEN it wanted to install driver software, so I let it do that. Afterwards, I noticed that the driver for the Nexus was back with the 2006 version, BUT then ADB DEVICES FINALLY SHOWED OFFLINE!!!! HALLELUJAH AND the Nexus was displaying the Dialog to allow USB debugging, and it now all works.
What I am not sure of is what step actually solved the problem. I don't think it was necessary to hard reset the Tablet, but the fiddling with the device driver wasn't a very convincing solution either - I don't think the driver was corrupt - but maybe it had to be changed to get the right driver associated with the tablet when connected as a Camera Device. In any event, it is necessary to connect the tablet as a Camera device for ADB to work...
Restarting device or enabling USB debugging did not solve my problem.
However I changed USB PC Connection to "Camera(PTP)" mode and adb devices showed the device id of the phone.
After reading a lot post talking about this particular problem, I actually solved it by resetting user permissions on files (that were owned by root): ${HOME}/.android/adbkey and ${HOME}/.android/adbkey.pub
Go to Device Manager and uninstall your device and remove from USB
HAve you CMD opend and make sure you are at least in ADB Help.
Connect device to USB and continue with steps provided by Raghav Sood - few answers ahead of me.
Worked for me just fine
I tried with this custom build and it works for me. Now I can see my logcat in Eclipse again.
https://github.com/khaledev/ADT/releases
Download the zip file then in Eclipse menu Help > Install New Software... > Add > Archive... Just pick the downloaded zip and do the rest of the install process.
While debugging, my device frequently disconnects from my PC, usually after every debug session. The device still appears in the DDMS list but the status is "offline". The only way to fix it is to reconnect the USB cord, which becomes a pain after doing it 10 times every hour. There are no visible error messages when it happens.
I thought it was a physical connectivity problem with my USB cord or my device, but I recently upgraded to a brand-new Galaxy Nexus with a brand-new USB cord and it still happens. Now I'm convinced it's a software issue.
Is there any reason why my devices goes offline frequently? Are there any programs that are known to interfere with the Android/ADB connection?
Yup, you are right. It seems to be a software issue.I have faced this annoying thing many times, it happens now and then. I think what happens is that the adb's connection with the device/emulator breaks or becomes faulty, so android starts showing the device as offline. To correct this problem. Go to DDMS-->Devices Tab-->Click the option "Reset adb" (which is the last option, on clicking the dropdown arrow) . You will then see some error report in the console, but after a minute your emulator would be ready to be used without problems. I do it all the time and it works. Try this instead of manually plugging/unplugging the device.
Please check this answer https://stackoverflow.com/a/26425489/1200583 that is for mac but maybe is the same for other OSs
I find it faster to just plug/unplug, but doing the following in command-line should do the same thing:
adb kill-server
adb start-server
We feel your pain. In case you're using the command-line, you can do the same thing by typing "adb kill-server".
I was able to fix this problem for good by updating Samsung Kies, which installed an updated driver for my phone. I suggest you try reinstalling any device drivers.
Patiently, try fixing the USB cord by massaging it and reconnect it to the USB hub securly but not to tight. Also, do not connect with too many USB extended cables or hub or the connection between the device and Eclipse IDE will interfere the duration.
And one thing, do tried putting your device and the USB cord to any flat surface (e.g. table) to support the long cable?
I had the same problem with Galaxy Nexus running CM 10.1.
Updating KIES with latest version seems to have fixed the issue.
Connect your device through a powered USB hub. Some machines, including new apple macbooks, do not have enough power in the USB ports causing ADB to constantly disconnect.
If your device is rooted, you can connect it to adb via wifi. This is very comfortable, much more than wired USB. Of course you don't always have a rooted device.
I also faced this issue. Adb disconnect my Android device each time just after installing the app in android device from eclipse. The issue was with my USB Cable. I was using the USB cable of Blackberry Phone. To resolve this issue i just changed the USB Cable with Android's USB cable(The cable that comes with new Android Phone) and every thing started working fine.
If you are running on Mac OS Sierra and Android Studio 2.1.2 or 2.2.0 then just upgrade your SDK-Platform Tools to 24.0.4 and Restart Android Studio. This will fix it.
The following two solutions worked for me.
You can try either of the two or both of them.
Restart device.
Free some internal storage space (Works in most of the cases).
As title, I can't able to find my phone device into Eclipse.
I activated on the my phone, either Application/Unknown Source and Application/Development/Debug USB.
But into Eclipse not appear any device phone, why?
Thanks'
Go to the cmd prompt, and then take it to the platform-tools.
Then type the commands
adb kill-server
and then
adb start-server
Then to list the connected devices,
adb devices
you will see the list of active devices including the emulator. If the device is not present, continue the steps for some time..
After you get the device listed among the active ones, you can run it in debug mode.
Think, this will help you..! :)
I just had the same problem on 2 of my phones (Nexus 1 and Amaze 4G). After some research I found that people try to overcome this by restarting Eclipse and ADB (only Eclipse won't do) but it took me rebooting the system and phone to make it work again. If you can go to Eclipse->Window->Open Perspective->DDMS and see if your phone shows there with red bug icon next to your app. If so then try what I described above. If you don't see your device in DDMS perspective then it's your USB driver that is not working and needs to be reinstalled
Had a similar problem with my LG P520. In my case, the problem was as a result of me setting the minimum Android level to Android 2.3(9) while the phone was a Froyo/Android 2.2(8) phone. Hence, it was not a compatible device and would hence not be shown in list of compatible devices.
connect your PC with internet may be it will install some software to connect it with the phone debugger and make sure you enable the usb debugging on your phone.
I am developing for android on a linux machine and I have already created a udev rule for android and it works. After a while if I unplug the device and plug it back in again, adb doesn't recognize the device if I run lusb or dmesg to get information about the device. I tried reload the udev rules and it does not work, I even tried to kill the adb process but it still does not work.
Can someone help?
Anyway, thank you.
This appears to be a real problem on linux, at some point in time a device will no longer be seen by the ADB. What I should really say is almost never be seen by the ADB. In my case I have a Samsung Galaxy Tab 10.1 that was given to attendees of Google I/O 2011. My Ubuntu 10.10 development system was working just fine with this device. Sometime near September 19th the ADB stopped seeing the device! In fact there have been breif moments in time when the device was detected by the ADB. What needs to be made clear about the problem that I and I believe pharaoh are having is not the permissions issue where executing
$adb devices
returns ?????????? for a device. The device simply does not show up in the list. One more important fact is that at no point in time has this device not been detected on my Windows based development machines.
It appears to me that the mechanism that the ADB uses to determine if a device on the USB is in fact a adb_device is fragile and some change in either our devices or our development systems has broken this detection.
Due to some reason sometimes adb gets disconnected, so in that case you have to restart the adb.
Go to DDMS->Devices and you will see Reset adb option in View Menu besides Screen Capture option.
I usually have this problem due to I have installed the adb plugin on Chrome. If I close Chrome and re-connect the device, it appears listed with adb. Hope this helps.
I just had this problem as well with my OnePlus 2.
It was working the previous day. I had then set up port-forwarding using the 'device inspector' dialog in Chrome DevTools. It's supposed to be kept open for it to work, so I kept it open in a tab permanently.
The next day when I connected my device via USB, adb devices didn't list anything. I closed the device inspector dialog in my devtools and suddenly adb recognized my device again. I re-enabled port forwarding after this, but my device is stll being detected.
tl;dr: Close your port-forwarding dialog in Chrome DevTools if it had been kept open even after you removed your device.
I've had this happen before. I disable, and then re-enable debugging on the phone (Setting -> Applications -> Development -> USB debugging, uncheck, then re-check) to get it recognized by adb again.
Try adb kill-server to stop the adb and use another command 'adb devices' to restart it. It should work and it should detect your device again. ( For those who can edit my post: any other commands will start the server not just adb start-server, so don't edit without to leave a comment at least)
May be stupid, but I have been had similar problem right now and after an hour I noticed that the problem was that my USB hub, in which such devices are connected, were not actually connected to the PC.
In fact, the USB wire WAS connected, but they may not being doing good contact for some reason, so it failed randomly from time to time.
Same problem here, using mac os. However connected devices are recognized by Android File Transfer application. It all started with S3 phone (rooted), I thought something wrong with the phone, because Nexus 7 (stock) worked as intended. After 3 days of connecting/reconnecting it stopped being recognized by adb too. Tried to perform a hard reset - didn't help.
adb list - empty list
android file transfer - works perfectly
I'll run out of devices soon
Same problem observed on ubuntu, I tried the following and it worked:
Reference: link
Use the command udevadm from the above reference for ex:
"sudo udevadm test --action="SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="[vendor_id]", ENV{ID_MODEL_ID}=="[model_id]" MODE="0666", SYMLINK+="[Device_Name]"" $(udevadm info -q path -n /dev/bus/usb/001/[DevNum])"
This seems to fix some link files and that solved the problem of adb not detecting device after a while.
adb devices was working fine last year, but after upgrades and new software installs,
adb devices no longer recognizes USB attached Android devices.
Here is what I have tried:
adb kill-server
adb devices
adb usb
error: Device not found
If you have installed EasyTether on OS X, the EasyTetherUSBEthernet.kext can prevent adb from communicating with your mobile device.
If you use Easy Tether, BEFORE you plug in your phone run:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
(or unplug/plug your phone in after)
If you are done debugging and want to use EasyTether again, either restart or:
sudo kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If you want to remove the EasyTether kext so it never hassels you again:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext
Reference/Credit: http://www.intohand.com/post.php?s=2011-02-17-android-debug-bridge-not-just-working-on-mac
Having just connected a brand new Motorola Atrix 2 to my Mac running 10.6.8, I had to pull down the menu from the top of the screen, tap on "USB Connection", and change it from "Motorola Phone Portal" to "Charge Only" before it would show up in my list of devices from adb. Hope this helps!
Following the google bug submission... I set usb mode to Charge Only, and it detected the phone immediately. Pretty silly.
Another alternative: on modern Apple iMac's, the USB port closest to the outside edge of the machine never works with ADB, whereas all others work fine. I've seen this on two different iMacs, possibly those are USB 1.0 ports (or something equally stupid) - or it's a general manufacturing defect.
Plugging USB cables (new, old, high quality or cheap) into all other USB ports works fine, but plugging into that one fails ADB
NB: plugging into that port works for file-transfer, etc - it's only ADB that breaks.
If none of the above works for you just as it didn't for me, just try using a different cable. The cable I was using was my friend's cable but it was only meant to charge over USB, not to pass data over USB. I don't know how to tell the difference between micro USB cables that do or don't support data over USB but it's worth a try! Good luck!
I too am having this problem. However, it isn't just a problem with ADB, it's a problem with android devices in general on Mac OSX 10.6.6 Snow Leopard. Devices that used to work in 10.6.4 will no longer even mount the device as a USB drive. Googling to see if I can find the answers.
Change the USB connection type to 'Charge Only'. That was the only change I made it showed up on my device list. Weird.;)
I have seen another report of this bug. I have not been able to reproduce it myself yet.
The bug is:
MacOS X 10.6.6 [on some hardware] breaks adb [for some phones].
If anyone is able to reproduce the bug, feel free to add details of the exact hardware, build numbers and so on. I've asked the person who can reproduce the bug, to report it to google using the form at http://code.google.com/p/android/issues/entry
When he does that, I will add the bug report URL here, and people can add their hw/sw details to the bug report.
In the meantime, to be safe, I would recommend Apple users should NOT accept the snow leopard upgrade to 10.6.6, which was pushed on Jan 6 2011 (so it may already be too late for most).
Peter
I was having the same issue and tried connecting as charge only, but that didn't solve the problem, then unchecked the "Unknown sources" option to allow installation of non-market applications, tried it again and it recognized the device. I'm running android 2.2.3.
The bug report to Google is
http://code.google.com/p/android/issues/detail?id=15583
If you have encountered this bug (upgrade to MacOS 10.6.6 and adb no longer sees some phones on USB) please add a comment with any useful relevant info (like your exact hardware type).
I just ran into this problem using my HTC Inspire (Android 2.3.3) and Mac OS 10.6.8. The phone did not enter USB debugging mode when I connected it to my USB hub, but it did start USB debugging mode when I connected it directly to my MacBook Pro.
... and then, of course, it showed up in the list of devices attached.
The EasyTether fix worked for me, although first I had to load the kext file, then unload it. My Droidx popped up right away!
By the way, I'm running Snow Leopard 10.6.8 on my MacBookPro, so those who are having trouble with adb and connecting devices should check any USB applications, like EasyTether, for conflicts. Also be sure to follow all the above rules for
1. Application debugging (Settings->Applications->Development)
USB debugging: ON
2. USB connection (on notification bar).
Choose USB Mass Storage (altho Charge Only also works with my droidx and MacBookPro)
3. Unknown Sources (Settings->Applications->Unknown Sources = ON)
I have the same problem, I solved using an alternate install method.
First I put an sd card in my device.
Then I use a File Manager to transfer the .apk to the device, and I install it from the device
You can see a tutorial in
http://www.youtube.com/watch?v=7UOAw124y1s
I had this problem today with my HTC mytouch phone and OS 10.6.8. At the same time, the phone reported a damaged SD card. The solution was to remove the Micro SD card and erase/format it using disk utility as FAT 32. The name I gave the SD card volume appeared in the Finder when I tried connecting again (charge only). For some reason, Android reported the card as damaged but could not format it. I used a Micro SD USB adapter. My Macbook didn't see the card until I carefully slid it out and back into the adapter slot. This is a known problem with HTC android phones.
The last time I updated my tablet, it turned off "allow USB debugging", and I spent a half hour or so spinning my wheels. Double check that that is turned on in settings.
This thread is old but perhaps my answer will help somebody. Using a Motorola MB865 with OSX, ADB would recognize my phone only after I performed a factory reset.
I got the idea from this thread.
This was after I tried all the other tricks listed in other threads:
adb kill-server followed by adb start-server
Make sure USB Debugging is enabled
Make sure vendor USB ID listed in adb_usb.ini
Switching USB cables. For what it's worth, I did have to switch cables in order for the Mac to see the device. But this had no effect on ADB.
In the end, the factory reset did the trick.
in my case what worked:
disconnect device
exit android studio
run 'Activity Monitor' and kill adb
start android
studio reconnect device
For some devices running Android 4.4.2, you must enable tethering. You can do this in "Tethering and Mobile hotspot" and then check "USB tethering".
Try restarting the Mac in "Safe Mode". It worked for me (macos X.9.5)
Make sure that USB Debugging is enabled in Settings -> Application -> Developemnt, and also that the selected USB method is PTP and not MTP (not supported in OSX).
After connecting the device and enabling the USB debugging please go to the path of adb, which is now inside the android-sdk-->platform-tools and type the following command ./adb devices. I think this will list the devices connected.