Android: Emulator control is disabled in the DDMS perspective - android

I'm now facing a problem with Eclipse on Ubuntu. My device is connected, list by "adb devices" command and I can see the list of processes running in the Devices view. But all controls in the Emulator Control are disabled.
Does anyone know what may be the reason for this?
Thanks

First, make sure that the device is selected in the Devices view. You cannot use Emulator Control unless the device or emulator is selected.
If that does not help, close Eclipse, and try running DDMS outside of Eclipse -- there's a ddms shell script in the tools/ directory of wherever you installed the Android SDK.
If that does not help, run adb kill-server, followed by adb start-server, where adb should be in your platform-tools/ directory of your SDK installation. Then, try DDMS again.
If that does not help, reboot, then try DDMS again.

i found this with try and error .. it worked ..
As the new emulator got a side bar with icons .. the last icon down this list (the hamburger icon) click it .. then u will have the location latitude and longitude available to send to device

After unplugging USB connection from real device Emulator Control start work properly with Virtual devices

You can't send locations to actual devices, only emulators. You can mock your devices location however, in your code.
http://developer.android.com/training/location/location-testing.html

Related

Eclipse and Kies don't find my mobile, but ADB does

I have been looking all over this place after some answers but with no luck. My problem is not like the others where the device doesn't even show up when you type:
adb devices
When I type that command in my terminal I get this:
List of devices attached
4df1162756ad7f0f device
But Eclipse doesn't find anything, and yes I have the checked the USB-debug, and every single solution on the web...
But something I think is suspicious is that ADB has no problem finding my device, and that seems to be a problem to everybody else.
If somebody has a clue what my problem is, please help me.
BTW, I'm running Mac Mountain Lion and a Samsung S3.
Occassionally, selecting the adb-reset button within eclipse from the drop-down in the DDMS window will do the trick, but you still need to unplug and replug the device in at that point.
Additionally, you can manually do it through the command line with adb kill-server and adb start-server.
Occassionally a reset of the physical device or a reset of the computer itself is necessary as well. But, we can assume that you have all the plugins added into your Eclipse, so it shouldn't be a problem such as that; I have an S4 and don't recall doing anything else on the Mac here to get it going other than that.
Try ADB Driver Installer. It detects and install drivers for majority of android devices.

emulator doesn't show in device view in ddms

When I try to debug using one of the configurations that I've set up (for example Android233), the emulator never actually launches. I just see a little green icon in my task bar that says "launching Android233," but it never launches. I've let it sit there for hours and it never does anything. I don't know if this is related, but my emulators don't show in device view in the DDMS perspective. I have a physical Android device, which shows up in device view. My question is, what is happenin' and how can I fix it?
Thanks for taking the time to read my question :)
I thought I had the problem figured out, but it stopped working again. Here's more information: When I run my debug configuration, in the lower right corner of my Ecplipse windows it says:
"Launching MyDebugConfig (100%)" and then there's a green icon next to it.
I looked in task manager and the emulator is not in there. I looked in DDMS and my AVD is not listed and there is nothing in the LogCat or Thread or anything else for that matter. I have my debug configuration set to prompt me to pick a device, but it never does that. It just loads my AVD, even if I have my phone connected (which is visible in DDMS). I'm so stumped. I've had this problem since I started using Eclipse and I don't know what to do.
Thanks.
Go to DDMS Perspective =>Click View menu=>reset adb
If Your genymotion virtual device is not seen in android device monitor then just try this.
1. start android studio
2. start Android Device Monitor
3. Lastly start the genymotion virtual device it will appear
The emulator won't show up in the DDMS section until its running.
The emulator won't lunch probably because you misconfigured it, currently the lunch dialog of the emulator doesn't support error messages, however you can get the lunch stack trace while you try to lunch the emulator via Eclipse.
Disconnect your physical device, run your project and select the emulator. you should see an error message on DDMS console.
If you in Windows try run (after starting emulator)
adb.exe kill-server
adb.exe start-server
and wait for restarting your adb

Android and Eclipse: I can't able to find my device LG-E720 from Run/Debug Configuration/Android Device

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.

Adb stops detecting my phone after a while

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.

Reconnecting Emulator to Eclipse

My main problem with developing in Android is that the emulator seems to continually get disconnected from eclipse. This always happens the 2-3 time I try to upload my .apk from eclipse without rebooting the emulator. Eclipse indicates this with an empty DDMS ->Device section and logcat stays blank - sometimes I'm not sure if the new code made it on the device.
The only fix I have for this is to shut down eclipse, and restart it. With the restarting of Eclipse, on top of the emulator boot time, I can't get any momentum going in my development.
Is there a way to reconnect the emulator to eclipse without having to restart Eclipse or even the Emulator?
Update: There were a couple of answers that helped, particularly "reset adb" or Kill-server -> connect adb. However, sometimes even that is troublesome.
I am going to try Pentium10's suggestion of hooking up my G1 and using it as an emulator, but for now, I have found that if I don't see my logcat going, and the emulator is working (This is my biggest problem, because I am outputting all my debugging messages to log) then I can open up CMD and type adb logcat. This streams the log into the command window. Not nicely color coded, but nice enough for me to find my problems...
In eclipse go to Window->Show View->Other->Android->Devices. When your application is run go to this tab and you will see the emulator. If your emulator becomes unresponsive, in the devices tab you will see a down arrow at the right. Click the arrow and a context menu shows up. Hit the option Reset adb.
Just had to do this and it worked beautifully, but it did require you to reset the emulator - though I didn't wait to see if it reconnected on its own.
Try to call 'Reset adb' menu item from DDMS > Devices tab. It helps me in this case.
At most of the time you don't need to restart the emulator.
AFAIK the only workaround for this is to restart Eclipse (I always use this), or use a real phone.
Try adb kill-server, followed by an adb connect
I've had luck reconnecting to the disconnected emulator by entering an adb-over-tcp command line which you can look up in the docs. I think the address and port to use are the ones in the title bar of the emulator window, if not try the next higher port. Once it's back in adb devices eclipse should use it.
in terminal:
$adb kill-server && adb start-server

Categories

Resources