Ever since 4.2.2 - Eclipse shows "unknown" for my device when I pull it in. Here is what I have done:
Updated Android SDK to newest release (21.1, 16.0.2 - Tools, ADB 1.0.29)
Attempted to turn the phone on and off again
Toggle Debug Mode on and off again
There is only profile on the phone
Different USB / Ports
Reboot numerous times.
Any luck here?
UPDATE:
Device ID: 014E1F310600E01D offline
you didn't specify your device name and model number. i think you didn't install driver for your mobile device. if you already installed it automatically detects your device. To allow app installs from non-Market apps, tap the menu button on your home screen, then choose Settings >> Applications >> Unknown sources.
I'd forget about ADB connections that use USB as a means of transport. I've had nothing but problems with it, using several devices from several different manufacturers. Look in the play store for 'ADB wireless' apps. Those allow you to set up the same connection using WIFI.
At the moment I'm developing an app and have three devices connected to ADB this way. Works like a charm and is much more reliable
I found out that the PATH was pointing to the old adb (before the update (1.0.29), but once I went to /platform-tools/adb (by running ./adb devices) - everything worked out and now the device is active.
Hope this helps others!
I changed USB port and it worked as well for me.
You have to restart ADB and if there is any notification on the device screen you have to accept it.
Resolution :
After opening eclipse and before debugging, open the cmd then run " adb kill-server "
then wait 2-3 seconds then run " adb start-server ", then try to run the program again you will find your device is online.
i hope that helps
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.
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 trying to enable USB Debugging on Android so that I don't need to use the emulator.
I did what all the posts all around the web say to do: I went to settings -> applications -> Developer -> USB debugging
It still does not turn on the notification sign that USB Debugging is enabled, and Eclipse does not recognize it, and uses the regular emulator.
Does anyone have any idea what is wrong?
You haven't specified what device you are using or what operating system you are using, so that could be helpful.
A few things to keep in mind:
1 Don't mount as USB storage.
2 You also need to make sure to install the drivers for your phone so that the Android Debug Bridge (ADB) can properly communicate. After these are installed, try the command "adb devices" and you should see an item in your list of devices.
Update based on your comment: You can download Kies from Samsung, which include the drivers (as well as other things): http://www.samsung.com/us/kies/
Or you can find unofficial driver-only packages, such as: http://forum.xda-developers.com/showthread.php?t=961956
I think you'll need the OEM USB dirvers.
Read this:
OEM USB Drivers
My experience with windows has been that you might need to un-install the USB drivers under device manager. Then disconnect the device (restart might be required). After plugging the device back in make sure you use the manufactures drivers if available
you have installed your device driver rite?then right click on your app name->run as->run configurations->target->select manual->apply.after that click on debug button then it will ask you to select the device.
If everything else is tested, try with another USB cable.
On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.
Fruthermore on some devices you will be asked to accept an RSA key, which allows debugging through your computer. This ensures that other adb commands cannot be executed unless you're able to unlock your device.
Detailed information can be found here:
http://developer.android.com/tools/help/adb.html It is the overview about adb commands (which is used to send data to your device) and it starts with the steps how to bring your phone to debug-mode.
I wish to add to Danation's answer with the following.
If you have installed KIES, and you've tried following instructions a couple of times (for the android SDK package) without success, here's what worked for me:
As a precaution, disconnect the device, and press 'Revoke USB Debugging authorizations'.
Now, go to kies, and reinstall the device driver as seen on the image below.
Connect the device.
For me, it was a routine, it usually works when installing kies, but I was stuck on this today for a little while, and I hope i can help others with my solution as well..
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.