How can I change the ram amount that the android emulator is using?
Asked Answered
F

5

43

at the first setup, Android Studio asked me that how much ram does the emulator going to use. I entered 800M but it worked slowly. I need to make it a little bit bigger like 1.5GB. How can I do that? Is it editable after the first setup?

Floorman answered 16/10, 2016 at 8:22 Comment(1)
Possible duplicate of Why emulator is very slow in Android Studio?Jame
L
24

My answer seems to be old, so for recent versions check this answer

Go to Tools->Android->AVD Manager, there's something like pencil to edit your AVD click on that, then in the pop-up window click Show Advanced Settings and there you can change the RAM size.

Landed answered 16/10, 2016 at 8:30 Comment(6)
I was testing my app's on the virtual device instead of Note 5 that has samsung modified Android. It was running so slow. Thank you so much.Blacktop
Happy Coding :)Landed
As I check, the RAM size and vm size are disabled for modification.Anesthesiologist
That does'nt workedZebec
This should be acceptable answer, only this workedEstimable
@ZulqurnainJutt Glad it helped, since it's been a very long timeLanded
B
75

I generated a Pixel 2 image in the past and those values were locked to match the HW default of 1536 MB, so to edit them I had to "Show on disk" (from ADV manager) and edit the hw.ramSize keys in hardware-qemu.ini and config.ini

Bonesetter answered 12/1, 2021 at 14:3 Comment(4)
That was what I was looking for! ThanksNaomanaomi
Thanks for this solution.Weiler
Also need to delete hardware-qemu.ini.lock file and let it get generated automatically by running the emulator again.Deuteronomy
So weird that they don't let you edit the RAM of Google Play emulators in device manager, but this method works to increase the RAMRetrusion
L
24

My answer seems to be old, so for recent versions check this answer

Go to Tools->Android->AVD Manager, there's something like pencil to edit your AVD click on that, then in the pop-up window click Show Advanced Settings and there you can change the RAM size.

Landed answered 16/10, 2016 at 8:30 Comment(6)
I was testing my app's on the virtual device instead of Note 5 that has samsung modified Android. It was running so slow. Thank you so much.Blacktop
Happy Coding :)Landed
As I check, the RAM size and vm size are disabled for modification.Anesthesiologist
That does'nt workedZebec
This should be acceptable answer, only this workedEstimable
@ZulqurnainJutt Glad it helped, since it's been a very long timeLanded
H
23
  • Create a new virtual device from the AVD Manager.

  • Select New hardware profile(left-bottom corner) in the appearing window.

  • You can see an option Memory in the new secondly appeared window. Here you can change the ram size in the column RAM.

Hexachord answered 24/6, 2017 at 5:48 Comment(2)
The problem is already this. There is a minimum RAM setting in the emulator. I need to change this. Otherwise doing the thing you suggested with this answer is impossible. The first answer works.Blacktop
Please note if you make a new profile you won't be able to choose a device with google play servicesZebec
P
1

or you can create a new hardware profile, that allows you to choose the amount of ram avaliable. Also you can change the number of CPU cores in the hardware-quemu.ini and config.ini on the device files.

Prudi answered 16/3, 2021 at 3:12 Comment(0)
S
-2

For Mac Users,

Go to Android studio -> Tools -> Device Manager -> Select your AVD and click on 3 dots -> Edit -> Show Advance Setting -> Scroll down -> Memory and Storage -> Give the customize ram in Ram field -> click finish.

Also make sure to restart the device if its already running to reflect the changes!

Stock answered 23/2, 2024 at 7:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.