My device is not showing up in "Android Device Chooser" suddenly - android

i am using my samsung galaxy3 device for testing my apps from last two months. It is working fine.
But suddenly from this morning when i connected my device to my system it is not showing up in the "Android Device chooser" window.
I have checked, USB debug mode is in checked state only in my device.
Can anybody guess the problem. It is little urgent.
Thanks,
Nehatha

Use a shell of some sort (Run -> cmd) and browse to the /platform-tools/ directory inside the place you installed the Android SDK Tools.
Shut down Eclipse, unplug your device and try running:
adb kill-server
adb start-server
Plug it back in and run
adb devices
If you can see it, good. Now run:
adb logcat -c
adb logcat
This will flush the current logcat output and then show the logcat output in the shell as it updates (do something on the device and the log will update). Stop it with Ctrl-C and restart Eclipse.
This has helped for me sometimes.
Also, rebooting helps.
I have another similar issue over here which I haven't found an answer to yet: Device going offline randomly (and appearing multiple times as offline) in Eclipse - fixes?
Hope some of it helps.

I have the same problem and I figured out the solution for me.
On the home screen of your device choose Menu > Settings > Applications > Development.
Make sure that ‘USB debugging’ is checked.
Hope it will help someone :)

close the emulator then restart eclipse.

Finally my device is working after "Factory data Reset".
Thanks you all for your suggestions, even those suggestions not worked for me, I came to know about other useful.
Thank You.

I had similar issue, what worked for me was switching to "connected as camera" mode instead of "connected as media device" from the USB options menu, then performing Klaus's solution (kill server, start server).

Related

LogCat for Android Device in Eclipse not showing

repeatedly my LogCat in Eclipse seems to stuck.
reproducible when creating/modifying a filter.
switching to DDMS and selecting my device doesn't help as suggested in other answers in stackoverflow.
Only a restart of eclipse helps, but this is not usable that way.
Any hints ?
Yes there is a smart way for doing this, what you need to do is to refresh your debug bridge, most of the time ddms loose conncetion hence logs are not shown. Just perform the following when this happenes next.
Open CMD,
Navigate to Android SDK, Platform Tools
Write ADB KILL-SERVER, enter, ADB START-SERVER
this will open debug bridge in new port, after doing this just open ddms and select your device

Android LogCat device disconnected

I'm struggling a bit with Logcat. The phone disconnects from LogCat with the message "Device Disconnected" every time I push a button changing intents in my program.
What can cause this? And Why? Could it be my code throwing a error disconnecting LogCat? Or is this a LogCat issue?
I'v tried to restart eclipse, and stop the adb.exe process with no luck.
: E/(): Device disconnected
There may be some sync problem in DDMS. Just restart the eclipse it will work fine.
This is a real problem in Eclipse DDMS. If you run adb logcat at the same time that Eclipse shows "device disconnected" you will most likely still see logcat output (this is what happens in my case). Only real explanation I can see is that DDMS has a bug.
My solution? Switch to IntelliJ. It doesn't have the same problem, or any similar problems that Eclipse DDMS has connecting to devices which are recognized by adb.
Here is commented a solution that works for me, Clear Log:
LogCat Stops Running in Eclipse Needs Restart
I restarted my device, closed eclipse, used a command prompt opened at android-sdk/platform-tools to run adb kill-server, reopened eclipse, and then used that same command prompt to run adb logcat.
My problem was then fixed, though I'm not sure which step fixed it.
Just Type This Command In Terminal
adb devices
u should see this log:
List of devices attached
adb server version (40) doesn't match this client (36); killing...
* daemon started successfully *
FA57NY900383 device
And Run Again, Your application starts to run on your device
So I resolved the issue. I'm not sure what part did the trick, but I noticed javaw.exe was running on the computer even though eclipse was closed. So I forced closed this one, unfortunately I also re-installed my Jelly Bean ROM. So I'm not sure what exactly did the trick. I bet it was the phone though.
I had this same problem where it kept saying "Device Disconnected" when I could clearly hit Debug and select my phone, but for some reason I was expecting the LogCat to already be going.
But it will not be going if the phone is locked (facepalm).. After unlocking it seems fine.
Hope this helps someone else that doesn't realize their phone is locked when trying to debug / use LogCat.

'adb devices' showing dummy device

I have been facing this problem for quite sometime now. Running 'adb devices' shows me an additional dummy device although its named as emulator-5554. FYI, I don't have any emulator running as well.
adb devices
List of devices attached:
xxxxxxx device (Actual device)
emulator-5554 device (Dummy thingy shown as device).
How do I clean up this mess?
Same problem for me but I don't see any Bluestacks service in my services list. after
adb devices shows emulators I didn't have, I usually just type the command
adb kill-server
and running the
adb devices
once more shows only the devices that are connected.
I had the same issue. I did this and now everything is ok
click Windows+R
type services.msc
stop BlueStacks Android Service
I have figured out the issue. I had installed Bluestacks for Mac for trying out Android apps on Mac. This was running an emulator with a different name.
Figured it out by taking a screenshot of the emulator and it showed the launch screen of Bluestacks. Uninstalled Bluestacks and all is well now.
the adb server is scanning for emulators on all even local ports from 5555 to 5555+128 (5683). If you have a custom service which use one of these ports... You are stuck with the "adb -d command" requirement
pls check in task manager whether emulator-arm.exe is running. If so, try stopping both adb.exe and emulator-arm.exe
I had the same problem and non of these answers helped. So I figured out that my system didn't shut down properly and that's the reason I have a dummy emulator-5554. The solution was to create a new emulator with a name then launch it? While it's launching kill the server using cmd until when the emulator powers on and you can see its name under Devices in DDMS. After this shut the emulator...emulator-5554 is gone, Now you can start Bluestacks and connect
I was facing the same issue, and that due to BlueStacks too. In case you have Windows and you don't want to remove it, then you can stop its service "BlueStacks Android Service."
To do that click Windows+R, type services.msc then stop "BlueStacks Android Service"
Reference:
http://forum.xda-developers.com/showthread.php?t=2612389
Eclipse emulator NOT BlueStacks:
In the case of the eclipse emulator running in the background and you don't know how to close it, just go to devices tab and choose the dropdown menu on the right, then Reset adb. OR, just reset the adb using adb console.
Just open task manager and end task bluestacks
I also meet the same problem.Here is my answer to solve this problem.
in Windows system.
1.in cmd terminal,usr cmd netstat -aon|findstr "5555"
2.use cmd tasklist|find "PID",the PID para should be a process number which is the result of the first step .
3.changed the Port No. to other ,which should not be "5555"
That's done.
After trying:
adb kill-server
stopping adb.exe in task manager
adb usb
and a few other stuff I can't even remember. . .
I restarted my computer and the dummy-device was gone!

Constantly getting ...DeviceMonitor] Failed to start monitoring

I find that after running or debugging my application a few times using eclipse, that I get the above output in my console (in red) and I get no feedback from Dalvik as to the connection status to my phone is going. My application will still debug etc. I just get nothing useful in my Console.
Any ideas how to fix this? It appears intermittent. It starts doing it after a few minutes, continues to do it for quite a while and occasionally goes away again. This has happened on my last laptop and now on my new laptop with a completely fresh install etc.
I'm on Windows 7 64 bit; but maybe 2 or 3 times during the day I get this same error. I tried the reboot thing, which sometimes worked, sometimes didn't.
I have found the fix to be:
Close Eclipse
Unplug USB
Open task manager and find the "adb.exe *32" and End Task
Open Eclipse (not done yet)
"Clean All" (not just project)
Then build the project (for me, just building the project works)
Plug USB back in and there ya go!
Always works for me. If anyone knows of an update to something I can download to avoid doing this all the time, I'd love to know!
I had the same problem -
Try to use a different USB port.
From my experience, the USB connections on the PC front are not recommended.
Year almost 2018 I just had same problem which doubled my gray hairs. It turned out my test phone Samsung Galaxy S6 does not like the USB ports on my Apple Thunderbolt Display. I just plugged the USB cable directly to my Mac Pro and it worked right away. Funny thing is my Google Pixel Phone never complains about the USB port on Thunderbolt.
To keep the error message from showing up I did the following on Eclipse 3.7:
Window->Preferences
On the left side tree select Android->DDMS
In the DDMS settings window choose logging level "Assert"
Click "Apply"
You may have to kill the deamon and restart it. Following are the steps;
open a command prompt and locate the SDK's platform tools folder. E.g.:- cd c:\android-sdk-windows\platform-tools
then execute "adb kill-server" command. You will see the disconnected icon in run configuration panel is now cleared.
then again execute "adb start-server" command.
Then try running the device, if it doesn't work try restarting the eclipse.
restart your dev machine, worked for me :)
I was using a USB 3.0 port too and a device Xoom with ics 4.0.
To solve my problem, I needed to restart my Windows, because in the DDMS my device was showed twice.
After the restart, I needed to change the USB port to a 2.0 USB port and it work for me.
problem causes bay USB bug
1- save your work
2- Close Eclipse
3- restart your computer
4- Open Eclipse and enjoy ^^
it works for me
good luck

Android adb "Unable to open sync connection!"

I can run and debug my Android app on my phone just fine, most of the time. Then, seemingly randomly, when I try to run or debug my app from Eclipse, the Console in Eclipse says:
[2010-10-12 09:36:48 - myapp] Android Launch!
[2010-10-12 09:36:48 - myapp] adb is running normally.
[2010-10-12 09:36:48 - myapp] Performing com.mycompany.myapp.MyActivity activity launch
[2010-10-12 09:36:48 - myapp] Automatic Target Mode: using device 'HT01TP800561'
[2010-10-12 09:36:48 - myapp] Uploading myapp.apk onto device 'HT01TP800561'
[2010-10-12 09:36:48 - myapp] Failed to upload myapp.apk on device 'HT01TP800561'
[2010-10-12 09:36:48 - myapp] java.io.IOException: Unable to open sync connection!
[2010-10-12 09:36:48 - myapp] Launch canceled!
Retry: doesn't help, same messages.
Restart Eclipse: doesn't help.
Restart adb (adb kill-server && adb start-server): no errors, doesn't help.
Reconnect the phone: sometimes helps.
Reboot the computer: kind of drastic, haven't tried this yet.
Using Ubuntu 10.4, Eclipse Galileo 3.5.2, Android SDK 7, ADT plugin 0.9.6, Nexus One, Android 2.2.1.
Any bright ideas?
I was having exactly the same problem, but I already had my phone connected to the computer's USB port. Sometimes disconnecting and reconnecting the cord worked but then it stopped working completely.
However, disabling USB debugging on the phone and then re-enabling it has worked so far. Hopefully it keeps working! These fixes really seem like silly hacks.. I'm not sure what the underlying problem is.
I was able to clear this only by cycling the USB Debugging option on the phone.
This may also be related to a "too many open files" issue. I manually tried to install the app when getting the "sync" error above and that's when I got the "too many open files" clue. one brute workaround, based on some old posts, seems to be to restart the phone, and one google engineer suggested doing it twice, the second time before it goes into sleep mode the first time (details on why in the post).
That was a few years ago, and maybe they've fixed it, or just did some things to get around it in the usual cases and the reinstall-as-part-of-development is not a case that it addresses.
Nexus One here, CyanogenMod 7 (Android 2.3.7)... disable and reenable:
Settings > Applications > Development > USB debugging
And everything works now on Eclipse and Mac OS X 10.7.3.
I have been having the same problem when I have the phone connected through my keyboard's USB hub. IT went away when I connected straight to the computer's USB port.
I have had the same problem and restarting ADB wouldn't work for me. Sometimes rebooting my phone worked but not always, I was unable to program for about a week because of this glitch and I think I finally found a workaround! :-D
First of all, kill every program running on your phone. Having some kind of taskmanager makes this a quick task, otherwise you'll have to manually kill them all one at a time.
If that doesn't fix it, you will need to go to your phone settings, then go to "Applications", then go to "Running services", and kill every service in there. I'm using a Droid Incredible and I have yet to have this not work for me. :-)
So, the short answer is, kill all apps, and all services.
Also, keep in mind, you will need to close, and re-open eclipse to see if this fix has worked for you. I hope this works for you, I know it did for me! :-D
When this happens on the Kindle Fire I just power it off and back on again.
I fixed it just by disabling and enabling the debugging configuration on my device (SonyEricsson Xperia)
This error occurs when somehow the Android Debug Bridge , which is the tool to send data from our computer to the connected device, disconnects. As we know, there are some layers to get connected like the adb itself and of course, the last layer is the USB cable, so when you already tried to restart your adb script and seem not working, you just need to reconnect your cable.
I see this problem regularly in both attached devices (Phone or Tablet) and even the emulators. I noticed that the problem often follows periods of inactivity (after a lunch break for example). It may be that the Operating System on the development machine is trying to conserve resources and adb just isn't all that JIT friendly.
On windows I have to close the IDE and open Task Manager and force stop (kill) adb, then relaunch Eclipse. This always works for me...
I noticed if I set a higher priority in task manager for adb, this problem is greatly reduced--although it can still happen.
Restarting the phone has also fixed this problem for me whenever reseting the usb cable didnt fix it
The solution is likely to run on your android phone (on local terminal or ssh terminal):
$ stop adbd; start adb
I don't like overkill solutions like rebooting hte phone... and this is usually not needed under Linux. I experienced the same problem when connecting over Wifi, so USB is maybe not responsible at all. Reading the answer from user655489, I got the idea to run lsof, and then lsof | grep adbd | wc -l => I think I had over many sockets open with all FD from 0 to 1023 in use... how suspicious.
I ran killall adbd, then restarted adbd per How can I connect to Android with ADB over TCP? And the problem was gone.
The cause is that, at least when debugging and having to kill my non-working apps, that several of the sockets never get closed.
What helps for me is the following:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If you are debugging on AndroidX86 (or otherwise have root access to your Android developer machine)
Kill the "adbd" process.. and let it restart.
e.g.
[On Android VM]
kill adbd (e.g. kill `ps a| grep adbd | awk ' { print $2 } ' `)
/sbin/adbd will restart automatically
[On DEV station]
[dev station] ./adb disconnect
[dev station] ./adb connect
If you don't have root, probably toggling USB debugging, rebooting, etc could also help.
As it also restarts adbd
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I have been experiencing this problem very often (I mean like every second time I launched Debug). I was using a rather long USB cable. I switched to the original HTC USB cable which is short and the problem was gone!
I experienced this problem when my USB cable was connected to PC via keyboard USB :O. When I connected it to PC directly my problem solved.
I hope this works.
Enjoy!
As per Maven Explanation I tried this solution. but I was getting the same problem. So I restarted the device. And it started working perfectly.
Try this,
Disabling USB debugging on the phone and then re-enabling under
Settings -> Applications -> Development -> USB debugging
its works fine.
This solution worked for me
Click Revoke USB debugging authorizations.
Click OK.
Reattach USB.
Click OK for Permissions.

Categories

Resources