-
Close all Google Chrome instances and shutdown your antivirus.
-
Better create ARMv7 image without Google APIs.
-
Fix "cannot add library /usr/local/android-sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed":
λ ln -s ${ANDROID_SDK_ROOT}/emulator/lib64 ${ANDROID_SDK_ROOT}/emulator/qemu/darwin-x86_64/lib64
-
λ ${ANDROID_SDK_ROOT}/emulator/emulator @NAME -no-snapshot -no-boot-anim -gpu host -qemu -icount auto -smp 4,sockets=1,cores=2,threads=2,maxcpus=4
maxcpus
must be a half of your real CPU cores for the best performance but i usually set all 4
sockets
*cores
*threads
must be not greater thanmaxcpus
smp
must be not greater thanmaxcpus
-
You should wait for 15-60 minutes even if you have the latest MacBook Pro.
-
After successful booting press
...
button,Snapshots
,Take snapshot
. It will save your time if something goes wrong. To start the emulator next time use the same command without-no-snapshot
option:
λ ${ANDROID_SDK_ROOT}/emulator/emulator @NAME -no-boot-anim -gpu host -qemu -icount auto -smp 4,sockets=1,cores=2,threads=2,maxcpus=4
-
Install Intel HAXM.
-
Fix "cannot add library /usr/local/android-sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed":
λ ln -s ${ANDROID_SDK_ROOT}/emulator/lib64 ${ANDROID_SDK_ROOT}/emulator/qemu/darwin-x86_64/lib64
-
λ ${ANDROID_SDK_ROOT}/emulator/emulator @NAME -no-boot-anim -gpu host -qemu -smp 4,sockets=1,cores=2,threads=2,maxcpus=4
maxcpus
must be a half of your real CPU cores for the best performance but i usually set all 4
sockets
*cores
*threads
must be not greater thanmaxcpus
smp
must be not greater thanmaxcpus
More information: https://developer.android.com/studio/run/emulator-acceleration