DDMS showing empty file explorer for online emulator - android

I am facing this problem from many day,i searched a lot but not found any convenient answer.
Whenever I start a emulator ,after some time when I see DDMS its show the emulator online but its File Explorer is show nothing . Its visible again when I restart my emulator again or restart Eclipse .but I dont want this ,I want a quick solution.
One more thing I have already set the device timeout to a higher value but its also not working. Here is Screen Shot of my DDMS .Can anyone have a Quick Solution.Thanks in advance.

I see that the question was posted back in 2013 so there was probably some other problem at play then... but for those seeing this problem today it's probably because of an issue with Emulators targeting Android 24 or 25. Currently it appears that the Android Device Monitor is not able to display the file contents for Emulators targeting Android 24 or 25. It is however able to show file contents for Emulators targeting Android 23. Try launching an Emulator targeting Android 23 and you should see the Emulator's file contents in the File Explorer tab as expected.
I've created an Android bug report here.
Edit: a couple more bug reports about this here and here.

from command prompt move to \sdk\platform-tools\
and type
adb kill-server
and then
adb start-server

I fixed it by the following steps: 1. Open windows task manager and kill adb.exe process. 2. Close eclipse and restart it. Then it works.
Hope it helps.
But i cant understand about online emulators. Do you mean virtual devices ?

What you have to do is first launch the emulator ,then go the Window->show view -> other -> Android -> devices.Then you will be able to select the device that is online,now go the file explorer,which which will show all the files related to that specific device.Another point need to be noted here is ,the files in the file explorer varies from device to device

You have to keep the device selected in the devices view.

Related

Android emulator "Timed out after 300 seconds waiting for emulator to come online" error

First of all, I know that the title is similar to the other questions that asked here, but my problem is a bit different, and I couldn't find a solution.
The thing is, I've created an emulator and used it with no problem, but after I entered a Gmail account to the emulator, set the PIN for lockscreen and turned the emulator off after using it for a while, I can't turn it on back. It is stuck on black screen and after some time, it gives
"Timed out after 300 seconds waiting for emulator to come online"
error.
I know that wiping data solves the problem, but I don't want to wipe data because I don't want to enter an account and do the same process again and again. My other emulators are working fine because they have no Gmail account.
(Android Studio Dolphin 2021.3.1 Patch 1 running on Windows 11 22H2)
Things that I have tried:
1- Wipe data (it works but I don't want to do the entire process again, I need that account)
2- Change Graphics settings from Automatic to Software (didn't work)
3- Delete *.lock files in avd folder (didn't work)
4- Update emulator (I'm using the latest version and I believe maybe it's because of the update)
5- Update Android Studio (using the latest version)
6- Use the power button (not working)
7- Invalidate cached (not working)
this what solved my problem.
try the following steps:
Make sure that you have administrator privileges on your computer. Navigate to the directory "C:\Users\username.android" Right-click on the this file folder, and choose "Properties." In the Properties window, go to the "Security" tab. Check if your user account has the necessary permissions to access the file. If not, click "Edit" and give yourself full control. Try restarting ADB and see if the issue is resolved.
I hope this will work.

Android Emulator "Allow USB Debugging" dialog close right after showing

I'm trying to debug with Android R in Pixel emulated devices w/ PlayServices but the "Allow USB Debugging" dialog instantly close right after showing, so I can't click in "Allow" to AS connect to the AVD. I went to Developer options in Android to switch off and on again the USB debugging, but again the dialog close imediatelly right after showing. I tried kill/star ADB and unistalling all AS/user configs/etc and reinstalling again but didn't solve. Anyone has a clue?
Seems like this issue is related to your emulator's API version, after some testing I found that Pixel 4 API 30 have your problem, while others don't.
Another odd thing about the box is that it will ask you again for permission when you start a new session, even though I clicked the "always allow this device" button.
Wipe data and it will pop up and stay. Check the "always allow debugging on this device" box and you should be good to go.
get your public key from ~/.android/adbkey.pub
append it to /data/misc/adb/adb_keys of emulator (create it if not exist)
restart emulator
then you should connect directly.
ref:
How to solve ADB device unauthorized in Android ADB host device?
Try remove files adbkey and adbkey.pub in:
~/.android/adbkey/ on Linux
%UserProfile%\.android on Windows
%ANDROID_SDK_HOME%\.android on Windows, if set
adb kill-server
adb devices
Restart the emulator after wiping its data. Then the permission for "USB Debugging" should be given and it should show up as debuggable device.
The problem should only appear with google_apis_playstore devices, see here. Reason I think is, that the key files are only copied by adb, if no other keys already exist on the emulator. So may deleting the files on the emulator may also work.
I had the same issue. I tried to click "Allow" in time, but it was too fast on my PC. However, I noticed that after a cold boot this popup pops and doesn't hide for some time (may be due to load lag), so I managed to click it this way.
If someone still has this problem and the goal is to upload some file or apk, better upload it to google drive and download it by link in the emulator.
This problem occurs with Pixel emulators on API level 30, so choosing 31 instead will solve the issue.
I solved this problem by following steps:
Wipe emulator data
Start emulator again
Above steps resulted in no dialog at all, weird, then I looked at the Android Studio, the emulator was already connected.
After some experiments I found that x86 apis were showing this error so simply switching to x86_64 apis solved the problem :

Android Virtual Device/ Android Emulator - Decryption Unsuccessful

I just installed Android Studio, and I am very new with this program.
So when I run the Android Emulator it says: "To Start Android, enter your password", although I have never set a password. When I just enter a word with 4 letters it says "The Password you entered is correct, but unfortunately your data is corrupt".
After that, I have to Reset the Phone, but when I do that the same menu with "To Start Android, enter your password" appears.
Maybe it is just an easy mistake, but as I said I am new with this. I also did some research on the internet but I did not find anything useful.
this is the 2 images that it showe me:
1)
2)
and after i clicked on reset phone, nothing happened.
I would be very glad if someone has an answer for this.
This is a late response, but thought this simple fix might help anyone else who comes across this problem in the future. What worked for me is the following:
In VS2017 ==> Tools ==> Android ==> Select: Android Device Manager
In the Android Device Manager window, you'll see your Android Emulator.
Make sure the far right column contains the button "Start" (if "Stop" appears, click "Stop")
Right Click the device, and select the "Factory Reset" option in the menu.
Your emulator should now be working. Good luck.
open AVD and right click on the emulator choose ->Wipe data option.
Check that your avd folder path doesn't include national symbols (in my case it looked like C:\Users\Пользователь\.android).
After I changed this path everything is working.
See this post of how to change path:
Possible to change where Android Virtual Devices are saved?
Check out "Viewing and managing your Avds" part. Try wiping data of your emulator or create a new emulator for yourself.
https://developer.android.com/studio/run/managing-avds.html
enable GoogleAPIs and Google Play Store
Change the Android version. I was creating an emulator with Oreo 8.1 and got stuck in with the same issue.
I created another with Marshmallows 6.0 and no more asking for password.
Then if you are using Oreo 8.1 try with antoher.
I created a virtual device, and after, I had to reinstall the emulator.
When I booted the virtual device, I got this issue.
I deleted it and made a new one, and it worked fine.
Just go the AVD Manager and Wipe Data. The problem will be solved.
Here are the steps I followed after my device corrupted.
Close your emulator
Open AVD manager, right click on your device and click "Cold Boot Now" button.
Sorry for a very Late Answer. But you can't create a x64 Virtual Device on x64 System. Your device needs to be x86.
Just a warning to anyone getting this error on an emulator instance that was working and you cold booted or something. I got this error and just stopped and cold booted again and it was gone! So try that first before wiping your emulator instance unnecessarily.
Deleted the device in the Device Manager and created a new one with a higher OS version (Oreo -> Pie). The error disappeared. Did not find the real reason yet.

AVD not able to create a device

I opened AVD,clicked on create a virtual device then I choose nexus 5 ,clicked next and selected KitKat and pressed next,and then clicked finished. But then it just takes me to the home window of AVD which was there when I opened AVD. I cant know for sure if the device was created or not even. Can any one help me out please.If its generaring any error message where could I see it?
avd takes lot of time to open, so you will have to wait sometime
i will suggest you to use your android mobile for running your project that way you dont have to wait.
follow this tutorial
https://www.youtube.com/watch?v=Qb2olFyoMV4
What i did was opened android studio from my terminal,then did the whole process again.the error was dumped to my terminal and it was the problem of so many files in my /home/kirubel/android/sdk/tools/ directory didn't have the read-write permission.so when i changed that it worked.
As alternative you can use Genymotion or droi4x or Nox app player for me it's better than AVD ( you can debug your app directly to droid4x or Nox app player like you are using your android phone via usb )

why eclipse open another emulator?

Why does Eclipse open an new emulator while there is already an emulator opened ?
Sometime it happens, sometime it's not. Does someone knows why ? I hate when it doesn't that and i would like to fix this "problem"
This is caused when your project properties are not setup to run manually and for whatever reason (SDK or Target version) the emulator opens in a new instance.
To Solve: Right Click your Project --> Run As --> Run Configurations
Then, make sure the Project in question is the one selected on the left and the Name is on the top.
You will then see 'Target' at the top:
Choosing Manual should allow you to choose the running emulator. If not, make sure your project SDK is set with an SDK version you have installed or a range that is compliant:
<uses-sdk android:minSdkVersion="3" />
<uses-sdk android:targetSdkVersion="14" />
or whatever range you plan on supporting and AVDs/Emulators you have setup.
Hope that helps!
Yeah, it's annoying. I don't know how to fix it per se either, but instead I set it to always let me manually select the device to debug on. Then at least you can choose the correct device/emulator. Right click your project, select Run, Run configurations..., then select the Target tab. Change the Deployment Target Selection Mode to manual. Automatic with a selected device is supposed to work, but I find once in a while it'll launch something else. If that's not set you can try that and see if it works for you.
its according to your project.
if you are running normal AVD and you are trying to run google api project then it will automatically open the google avd that its suits.
and also your api level.
if your project is 2.3 and you are running android 2.1 API then its will try to open 2.3 avd from your AVD list.
Usually this happens because of two things:
adb crashed
Yeah that happens, adb crashes in some way and loses track of devices/emulators. In this case close the second emulator and restart adb, e.g. via the ddms app or on the command line by using adb kill-server followed by adb start-server. Then relaunch and it should be fine.
You try to launch an app with a higher/different api than the emulator
If you run a 3.0 app and you have an 2.3. emulator open, the plugin will start a higher api level emulator for you. Or if you need the Google APIs and the emulator doesn't have them, the same thing will happen. Sometimes you get a dialog to select what you'd like to do, but not always. Not sure when that happens exactly actually.
I have faced this annoying thing many times, it happens occasionally. and I think I know the way to correct it. I think what happens is that the adb's connection with the emulator breaks or becomes faulty, so android launches a new emulator although you have already an existing emulator for the same platform running. To correct this problem.
Go to DDMS-->Devices Tab-->Click the option "Reset adb" (which is the last option) .
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.

Categories

Resources