Emulator: emulator: ERROR: Not enough space to create userdata partition - android-emulator

I have just changed my laptop. On the new laptop, android studio emulator give error when trying to run app:
"Emulator: emulator: ERROR: Not enough space to create userdata partition. Available: 6253.683594 MB at C:\Users\RAFIQ.android\avd\Nexus_5X_API_27_2.avd, need 7372.800000 MB"
I have 7 GB space still available in C drive. I have enabled virtualization but still get this error. Thanks in advance!

I have found a solution may be helpful to someone :
Just navigate to your avd image path in C:\Users\ashishs\.android\avd\
and delete some of the unused images.
I did the same and the above issue vanished
Good Luck :)

First of all, check your disk space and if you do not have enough space to delete some items, it worked for me.
If this method does not work then go to your advanced setting of AVD Emulator and increase SD card/studio-managed space.

First of all it has nothing to do with RAM of your virtual device. In your case your C:\Users\RAFIQ has only 6253.683594 MB of space but minimum required is 7372.800000 MB, try to free some space there and it will work fine.

1 - Create a directory for your emulators on a larger drive, example: "D:\emulators"
2 - Go to C:\Users<your_user>.android\avd<your_avd_name>
3 - Open the <your_avd_name>.ini file and edit the PATH line
4 - Change "C:\Users<your_user>.android\avd<your_avd_name>" to "D:\emulators<your_avd_name>"
5 - Copy your emulator folder to "D:\emulators"
6 - Run your Emulator

for linux user (ubuntu 20 lts)
Goto /home//.android/avd/<your_avd_name>
Delete the .img
file (for me it was userdata.img and sdcard.img,they are the 2 big
file for me)

Just go to "avd manager" then "wipe data"

I had the same issue and the problem was not the image files but the cache of deleted Virtual Devices. So, I deleted two VDs and I don't see them in the AVD but they were occupying space when I navigated to the avd folder. Deleting them fixed the issue for me.

This error message refers to YOUR disk space, not the emulated Android one. It just warns you that there is not enough disk space on your OS to create a virtual partition for Android User data. Empty some space on your system disk (or the one that holds the ADVs) and everything will work as expected.

Goto AVD device manager > Click New Hardware Profile > Change memory RAM: 8000 MB

Related

Not enough space to install Unity

I'm using Pop OS 20.4 and installed Unity Hub from its store (I think it just downloads the app image from the Unity website and installs it but I don't know).
I set a personal license and want to install the version 2020.1.15f1. As you can see on the next tab there is enough space to install it
Unfortunately I get this error message when trying to install it
at the bottom of the hub this toast message appears
Does someone know what's wrong here? I clearly have enough space on my disk.
I get the same error for other versions too.
Ok here is the solution that worked for me:
Instead of installing it from the Pop OS store I uninstalled this Unity hub version. I restarted my machine and installed the .appimage file from the official website. I copied that file into the root of my home directory. When executing this version there was no error for me.
The reason why it is showing this error is because there is not enough space in your root directory. Typically this happens when there is only a single partition (at least in my case). So a workaround for this is to create a folder in you HOME directory called tmp and running the UnityHub.AppImage file pointing to that tmp folder and the application gets ample amount of space to install. It looks something like this :
TEMP=~/tmp ./UnityHub.AppImage
You can go to this link for further details.

IntelliJ IDEA consuming lots of CPU

I upgraded from IntelliJ IDEA from 12 CE to 13 CE few days ago and it has been hogging up CPU. Every few minutes it'll peak to 450-500% and then come down to 100-200%. Also, I've upgraded my Scala plugin to 0.30.380. Not sure what's causing the issue!?
I'm posting this comment by K P as an answer, because K P does not have enough reputation.
It just needed some more memory to prevent repeated garbage collection. I found the file idea.vmoptions [aka idea64.exe.vmoptions] and increased the memory for InteiiJ to run (Xms = 512m and Xmx = 2048). The CPU usage has come down to 0.2 - 10% when nothing is being done on it.
Go to your home folder, then navigate to .IntelliJIdea13\config\options
Edit the file project.default.xml by changing the VM_PARAMETERS Xmx and Xms as follows:
<option name="VM_PARAMETERS" value="-Xmx2048m -Xms512m -XX:MaxPermSize=250m -ea" />
It decreased the CPU usage to 50%.
Try clean up cache and restart. In Intellij 14 go to menu File -> Invalidate Caches / Restart...
As other said,increasing memory heap of IDEA is work, my IDEA version is 2016.3.4, following is setting way
Do one of the following:
Use the main menu command Help | Edit Custom VM Options to create a copy of the idea.vmoptions file in the user home. Refer to Edit Custom VM Options for details.
Copy the existing file from the IntelliJ IDEA installation folder somewhere and save the path to this location in the environment variable IDEA_VM_OPTIONS.
Copy the existing file /bin/idea.exe.vmoptions or /bin/idea64.exe.vmoptions from the IntelliJ IDEA installation folder into the location under your user home.
If anyone's wondering the "right" way to edit the idea.vmoptions or idea64.vmoptions file, here it is: https://www.jetbrains.com/idea/help/tuning-intellij-idea.html
On *NIX, you want to copy
<IntelliJ IDEA installation folder>/bin/idea64.vmoptions
to:
$HOME/.IntelliJIdeaXX/idea64.vmoptions
and edit that file to increase the heap memory for IntelliJ IDEA
(OP's example settings: Xms = 512m and Xmx = 2048)

Unity PersistentManager.WriteFile error

I have recently upgraded Unity to the 4.2.x series and I have run into a workflow problem that I am lost with. I have also tried this with the newest version (4.3.3f1) and I am also getting the same problem.
Here are the specs for my computer:
CPU: Intel(R) Core(TM) i7-4770k CPU # 3.50GHz
Memory: 16GB RAM
OS: Windows 8.1 Pro
Hard drives:
Main: Samsung 120GB Solid State Drive
Secondary: WD 2TB Mechanical Drive x2 on RAID ONE
When creating a new 2D project I select nothing except the 2D option and set it to be in my Mechanical Drive. First Error that appears is the following:
Opening file G:/Projects/....../Temp/tempfile failed: The process cannot access the file because it is being used by another process.
Options:
Try Again|Force Quit|Cancel
I would press Try Again as nothing (not even file explorer was using that folder in anyway. It then loads up Unity with 2 errors:
GetPersistentManager ().WriteFile (i->path, BuildTargetSelection::NoTarget(), kDontReadObjectsFromDiskBeforeWriting)
and
container.begin () == container.end ()
UnityEditor.HandleUtility:BeginHandles()
This has only started happening recently and I have created two projects before this with none of these errors using 4.2.1f. Now every time I would want to create a folder it would output the GetPersistentManager error. Unity will also not allow me to drag any assets into a folder via editor (however I am able to right click and import asset and import them that way). When I try and put the asset into the folder via file explorer i receive the following error:
Fatal Error!
GetPersistentManager().WriteFileInternal(metaDataPath, metaDataFileIndex, writeData.begin(), writeData.size(), NULL, BuildTargetSelection::NoTarget(),0)
The asset I imported is a sprite sheet that I have used in the previous 2 projects stated above.
As a test I have also repeated this process on my primary hard drive and it still gives me the same results.
This has become a problem as now my other two projects are having the same issues as the three errors above. If anyone has any idea what might be causing this please let me know.
I found the problem. It was my anti-virus (Total Defense) I manually added permissions and it worked
Had the same problem, turned out to be Google Drive backup and sync syncing the project folder.
Switched over to git with a github repo for my backup purposes. Problem solved.
Quick tip: Google unity3d gitignore. There is a lot of temp stuff in unity projects that you do not need to back up or commit, so a good git ignore file will save a lot of disk space and time.
Hope this helps someone.

Android emulator with custom build does not accept keyboard entry

I have a custom Android image using a custom built goldfish kernel. I have been using the Emulator for SW development.
emulator -kernel out/target/product/atom/kernel
When I upgraded to SDK 20 I no longer get keyboard input from neither the host nor the graphic keyboard. This used to work. I have seen the comments about setting the hw.keyboard property=yes. I am not able to find a sequence of operations that work.
a) try and launch the emulator and force my hardware config
emulator -verbose -kernel out/target/product/atom/kernel -qemu -android-hw /home/jgrecco/work/ics-4.0.4/out/target/product/atom/hardware-qemu.ini
The hardware-qemu gets overwritten and the hw.keyboard option is no.
b) Create an AVD and have it load my custom kernel and image
ex: android create avd --force -b x86 -n aal_emul -t 3
emulator -kernel out/target/product/atom/kernel -show-kernel #aal_emul
But have not been able to get the AVD to boot my custom image. It seems to boot a default image. I've tried copying over the img files but no luck
c) Tried modifying the default hardware.ini settings
ics-4.0.4/external/qemu/android/avd/hardware-properties.ini with no effect.
many many other variants.
If someone could make any of the solutions above work or tell me one that will I would appreciate it. BTW this is for x86 atom.
TIA
After much experimentation, Googling, lots of cursing inaccurate (out of date) documentation and updating all of my sources (fighting with repo sync hangs – rant off), I’ve figured out a work around. I thought I would post this for the benefit of others.
The basic problem was that after upgrading to SDK 20 I no longer could input to an application using ANY means (real or emulator keyboard). This only occurred when loading my own custom image "lunch #; emulator -kernel out/target/product/...". None of the attempts to override the hw.keyboard property as described above worked for me.
The work around I’ve found is to change the setting in the emulator at runtime. Settings->Language & input->default_Hardware Physical keyboard (OFF). While I can’t use the host keyboard I can now use the emulator keyboard for input.
Try setting 'hw.keyboard=true' in the file config.ini which exists alongside hardware-qemu.ini.
This overrides the default value in hardware-qemu.ini and shouldn't be overwritten.

Waiting for HOME ('android.process.acore') to be launched

I tried working the Hello World application and the emulator freezes after it flashes the Android start screen. The home page is not shown. The last display on the console is
Waiting for HOME ('android.process.acore') to be launched...
I tried reinstalling Eclipse and Android again. It still did not work. Also the console does not show any errors. The log cat has the following errors:
06-18 20:39:11.543: ERROR/flash_image(544): can't find recovery partition
06-18 20:39:11.843: ERROR/vold(538): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
06-18 20:39:11.843: ERROR/vold(538): Error bootstrapping switch '/sys/class/switch/test2' (m)
06-18 20:39:11.843: ERROR/vold(538): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
06-18 20:39:11.843: ERROR/vold(538): Error bootstrapping switch '/sys/class/switch/test' (m)
06-18 20:46:31.842: ERROR/MemoryHeapBase(578): error opening /dev/pmem: No such file or directory
06-18 20:46:31.892: ERROR/SurfaceFlinger(578): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
06-18 20:46:32.313: ERROR/GLLogger(578): couldn't load library (Cannot find library)
06-18 20:46:33.634: ERROR/GLLogger(578): couldn't load library (Cannot find library)
The solution which worked for me is, when you get the message:
Waiting for HOME ('android.process.acore') to be launched...
Wait for few seconds and then right click on the project and click run as Android application once again.
I faced the same problem. However, it worked after i went to Project->Clean...
Don't know why it happened though.
Hope this helps
I get this problem all the time and have lost many hours of potential productivity and education while I try to fix it. The only thing that works for me is the combination of three other good answers:
Project -> Clean
Delete all the AVDs and create new ones
If an attempt to run still hangs too long on 'Waiting for HOME' (over two minutes) or the emulator keeps rebooting every minute or so, try Run as Android App several times, choosing the same existing emulator instance (I always choose runs manually).
It's odd that no one has a clue why this problem comes up, what causes it or what is going on internally. The only clue I can supply is that DDMS shows a few lines like "Class not found for preloading: libcore.base.CollectionUtils" during the 'Waiting for HOME' pause.
What worked for me was to delete the AVD from the AVD manager and create a new one. Then go to
Run >Run Configurations, select the target tab and choose the new AVD.
Following steps worked for me:
1. Goto Project -> Clean.
2. Delete your previous AVD and create a new one.
This problem occurs because while creating the AVD manager in the "Create new Android virtual device(AVD)" dialog window ,"Snapshot" was marked as "Enabled" by me.
Solution:
Create a new AVD manager with the "Enabled" checkbox not checked and then try running the project with the newly created AVD manager as "Target" , the problem will not occur anymore
I solved this issue by creating a new virtual device and launching it from the AVD manager. The device takes a few minutes to start, you just have to wait. Then you can run your application on the already started device.
Options:
Click on the HOME Button on the Emulator. Wait for may be 2
seconds....
This always works for me!!!
or
Go with Shreya's suggestion (one with most suggestions and edited by
Gray).
I had only 12 Mb for the SD Card in the AVD device.
Increasing it to 2 Gb solved the issue.
SOLUTION:
Run the emulator from the command line:
sdk/tools> ./emulator-x86 -avd <DeviceName> -partition-size 1024 -gpu on
Then I launched the app from the command line as well (using built-in Cordova/PhoneGap tools):
myapp/cordova> ./run
BACKGROUND
I believe this is some sort of hardware compatibility issue. I came across this problem when following the PhoneGap 2.4.0 Getting Started Instructions. I followed their advice to install the Intel Hardware Accelerated Execution Manager, and I think this is the source of my trouble. Eclipse uses the emulator64-x86 program (in the sdk/tools folder) to launch the emulator. I could not find any way inside of Eclipse to change this but I found by following the "Tips & Tricks" section of the Intel HAXM web page that I could get the emulator to run successfully from the command line by using the emulator-x86 program instead. I'm not sure why the emulator64-x86 program doesn't work on my system. I confirmed at the Apple website that I do have a 64-bit processor.
My system:
OSX 10.6.8
2x2.26 GHx Quad-core Intel Xeon
6 GB RAM
ADT v21.1.0-569685
Eclipse 3.8.0
My AVD:
Device: Nexus One
Target: Android 4.2.2 - API Level 17
CPU: Intel Atom (x86)
RAM: 512
Internal Storage: 256
SD Card: 128
I created a new device. Deleted the previous one.
None of these solutions worked for me. Instead, what worked was to go to a command line tool (or terminal in Mac), CD into the SDK/platform-tools directory, and then run this:
adb kill-server
then run this:
adb start-server
After I did this everything worked again. Why? Who knows.
On my MAC the path to the platform-tools folder was $HOME/Installations/adt-bundle-mac-x86_64-20130522/sdk/platform-tools
It will probably be somewhere else on your machine.
I also found this page that presents some helpful steps:
http://android.okhelp.cz/android-emulator-wont-run-application-started-from-eclipse/
What worked for me was enabling the checkbox "Use Host GPU" when creating or editing the AVD (Android Virtual Device). This checkbox was not enabled by default.
It worked for me when I selected 'Use Host GPU' option under 'Emulation Options:'.
You can find the option under Edit window of the virtual device.
I increased the virtual device SD card size from 500MB to 2GiB, the problem solved.
Following steps worked for me: 1. Goto Project -> Clean. 2. Delete your previous AVD and create a new one.
I noticed this is an old post. However I just ran into the same problem and found a solution. A) Make sure you have the CPU/ABI is atom
B)Ram is 2048
C)VM Heap is 256
D)Internal Storage is 200
E)Make sure to check the Use Host GPU
F)Device is Nexus 5 (My personal choice)
G)Android 4.4.2 API Level 19