How to Cold Boot Emulators Running API 27+ on Android Studio?
Asked Answered
S

2

6

While working with emulators in Android Studio, I prefer to have them always cold-boot because:

1) I like it when the emulator window closes immediately after clicking "X-close" rather than beginning a new "saving state" procedure.

2) I find that many-a-bugaboo occurs when returning to a "saved state" with these emulators (connection timeout on bootup, weird graphics behavior, loss of logcat connection, garbled data retrieved from shared prefs)

So... what I have always done is to go into AVD manager and change the settings like this:

enter image description here

However, when I attempt this with an emulator running API 27 or higher:

enter image description here

...there appears to be no cold boot option:

enter image description here

I have googled to try to find how to configure cold boot on these newer API emulators but can't find anything.

Is it possible to cold boot emulators running API 27+ on Android Studio?

Spoil answered 18/5, 2018 at 23:24 Comment(10)
Do you have an option of Cold Boot Now in AVD manager when you click on an arrow next to the settings button?Egyptian
Nope. Android Studio 3.1.2 on mac.Spoil
I have a Mac too, I'll see if I have itEgyptian
Can't you shut down your AVD when you're done with it? When you need to use it again, it will cold boot.Lanchow
Wanted to get back to you because I finally checked with Android Studio 3.1 having the same emulator that you mentioned API 27. It's true there is no Cold Boot in Settings, but in the AVD manager, where all Emulators are listed, if I click on the arrow button which is next to the settings (pencil button) I have an option of Cold Boot Now.Egyptian
Thanks for getting back. That's wierd, mine just starts without asking me anything.Spoil
And when you click on the arrow which options do you have?Egyptian
None, it just starts the emulator without asking anything. :SSpoil
Oh crap I'm sorry I realized you meant the down arrow... not "play" arrow. DERP! Thanks!Spoil
no problem :) glad I could help :) good luck!Egyptian
S
16

Change config in:

%path_to_home%/.android/avd/%your_avd_image%/config.ini

Instead of

fastboot.forceColdBoot=no

you should set

fastboot.forceColdBoot=yes
Subset answered 21/9, 2018 at 11:23 Comment(1)
Adding to Max's Solution,path of config.ini is changed.Please find below path where we can find config file. C:\Users**YourName**\.android\avd\"Select your AVD" After going to above path, we can see config.ini file.Right click and open with notepad++ and search for below parameter and change it to yes. fastboot.forceColdBoot=yesPteridophyte
A
0

You can find the option if you show advance settings and scroll down. It is in the section: "Emulated Performance"

Affirm answered 26/12, 2023 at 13:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.