I have been trying to boot an emulator with user data from a real device. When we create an Android emulator, by default it uses the userdata.img file from AVD location. In my case, C:\Users\User.Android\avd\emulator.avd\userdata.img
I want to load my userdata such as pictures, music from my real phone into an emulator. I created a dd image of data partition(I named it userdata.img) from a real device and replaced the original userdata.img file from my emulator.avd location. I also made sure that there is enough disk space while creating this emulator(The size of the image taken from real device is 800MB and DISK SIZE given to emulator is 1000MB).
When I launch the emulator with these modifications, it is not loading with newly added image(It keeps loading for hours and hours but not reaching the home screen). Please guide what are the other steps I need to consider to load it.
Real device is SONY C1505 model running JellyBean(Android 4.1.1). Emulator is also created using JellyBean(Android 4.1).
It could be that the data partition doesn't have enough space - try running the emulator yourself with the option -partition-size 1024
You could also use -show-kernel to see kernel logs to identify the problem
Related
I just installed the latest Android Studio to get started off with Android app development. I have 2 GB of RAM running in my 32-bit laptop. As soon as I try to run the basic hello world program, it gives me the following error message. I don't understand this. Do I have all the necessary packages installed or is there something missing? Please tell me I don't have to update any hardware.
emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.
emulator: device fd:592
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this VM exceeds the driver limit.
Cannot set up guest memory 'pc.ram': Invalid argument
Error accepting connection, aborting
Well i think you have 3 options here
Number 1
Use Genymotion
Number 2
Start testing on a real android device
Number 3 (i like this more)
Edit the AVD that you are using and set the memory to 512 MB
will reducing to 800 mb help? If so? How do I do that?
First step
Window -> Android Virtual Device Manager
Second Step
Select your device and click Edit button in right part of window
Third Step
In Memory Options secton find RAM parameter and set it to 512. Click OK for saving option
Rerun the emulator and it should work.
Good luck
Click on AVD manager,it will open already created avd. Click on edit AVD icon which as right side (second last). after that click on show advance setting. from here you can reduce size of RAM to 512 MB. Good Luck
I am learning from the online tutorial to create a new Android Virtual Device. There isn't much written for the settings of the AVD.
Question 1) If I set the SD Card size to (say 2GB), does it literally "eats up" my computer's Harddisk space of 2GB by creating an image file of 2GB?
Question 2) If it does takes up my computer's HD space, in future when I create multiple AVDs, it will requires a lot of HD space am I right?
EDIT: So when I delete the created AVDs, does it free up my HD space immediately, or do I need to do a series of thing to do a "clean" AVD deletion?
Sorry for the addition question. Thank you for all your replies. I will undoubtedly vote up all your constructive solutions by tomorrow.
Yes, the harddisk space is immediately allocated.
# First, I created a new AVD device called 2gb-sdcard and an AVD
# device called no-sdcard (which uses the minimum size of 10MB)
# Both are same device type, SDK, skin, etc.
#
$ cd ~/.android/avd/2gb-sdcard.avd
$ du -h
2.4G .
$ cd ~/.android/avd/no-sdcard.avd
$ du -h
410M .
I checked the same even in Windows. I've Win7-64 and Confirm that the SDCard sizes mentioned for individual AVDs does occupy the hard disk space.
For e.g. I've created AVD NexusS_AVD19 with 100MB SD Card size and I've shown in the screen shot, the memory occupation.
Similarly I've created other AVDs with 1GB and 2GB SDCard sizes and similar details were available when I go to the respective path like : for e.g: C:\Users\RAMA\.android\avd\2GBSDcard.avd
and C:\Users\RAMA\.android\avd\1GBSDcard.avd...i could see the occupation.
In case, if you want single SDCard Image to be used for all the AVDs available to use your memory efficiently / smartly, please follow this link which guides you the steps to go through to achieve this with single SDCard Image
how-to-create-a-new-virtual-sd-card-in-emulator-in-android
Emulator uses .iso disk images to emulate SD card. So SD card consumes that space which you specified.
But in case you need a lot of emulators you can use for all of them a single image. Check this Loading an SD card image
Free internal memory is sparse on Android 4.0, because the system occupies quite some space. This limits the number of apps one can install.
So, how can we increase the internal memory?
In the dialog for creating new AVDs, I didn't see an option for it. What did I miss? I tried some of the partition size options, but it won't affect the internal memory or the emulator hangs during boot.
greenrobot
i couldn't find that option in the UI either.
but you can start the emulator from the command line and specify the size with a parameter.
e.g.:
emulator-arm.exe -partition-size 123 -avd myandroid4
for me the path to the emulator exe is "C:\Program Files (x86)\Android\android-sdk\tools\"
replace "123" with your desired partition size and "myandroid4" with the name of your AVD
after starting my avd the free space for apps showed the desired value.
but i didn't try to write data into it.
btw you can also create a shortcut to the emulator.exe so you dont need to start the SDK Manager every time you want to start an avd.
please tell me if that worked for you.
regards
erik
I am beginning android development using the latest versions of the android SDK and eclipse. I have followed the Hello Android Tutorial
and used every combination of targets available but the Emulator freezes on the load screen with the flashing "android" title.
I have checked the other related question and DID wait about 15 minutes. but still no change. Any help with this would be great. Thanks.
I had a similar issue, and still do sometimes today. Have you tried deleting the AVD and then re-creating it?
Also try changing some of the AVD's values, give it more ram, larger SD card. You can do this through Window > Android SDK and AVD Manager > Edit the AVD, and then add values / modify the SD card size.
EDIT: Also - just for reference, I have a Intel Core i7 with 16gb of RAM and AVD's STILL take forever to load.
EDIT: Another handy thing to know is that if you check the "Snapshot" option when editing the AVD, it will save the last state and load that instead of a full [slow] boot. Kind of like putting your computer to sleep.
Adding values / modify the SD card size may be better .
Try not to close the Android Emulator , to avoid re-open .
Yah android emulator takes time to start up, but it should start within 2-3 mins. Check your RAM and processor. The RAM must be atleast 1GB (preferably more) to speed up loading emulator.
Does anyone know how to create a 1:1 disk image of an Android phone? I am taking a forensics course and our final project involves creating tools to recover information from a suspect's Android based phone, however to do this we need to be able to create a 1:1 image of the phone's disk for baseline comparisons. Also would the image be loadable into AVD?
Take a look at nandroid — it will take a full image of each of an Android phone's partitions and return them to you as yaffs2 image files.
I haven't tried it personally, but you should be able to drop these directly into an AVD directory. I can imagine you may have some issues with the hardware suddenly "changing" between a physical device and emulator, but it's worth a try...
Check nandroid.
I have backed up my SDcard and mount it on AVD, but I am not completely sure you can mount the internal mem that nandroid backs up.