Issue
Running the emulator on MacBook Air 2017 (Version 11.4 Beta)
The idea logs of emulator :
Emulator: /Users/gaurav12/Android_SDK/emulator/emulator -netdelay none -netspeed full -avd Pixel_2_API_30 Emulator: handleCpuAcceleration: feature check for hvf Emulator: cannot add library /Users/gaurav12/Android_SDK/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed Emulator: HVF error: HV_ERROR Emulator: qemu-system-x86_64: failed to initialize HVF: Invalid argument Emulator: Failed to open the hax module Emulator: No accelerator found. Emulator: qemu-system-x86_64: failed to initialize HAX: Operation not supported by device Emulator: added library /Users/gaurav12/Android_SDK/emulator/lib64/vulkan/libvulkan.dylib Emulator: cannot add library /Users/gaurav12/Android_SDK/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed Emulator: added library /Users/gaurav12/Android_SDK/emulator/lib64/vulkan/libMoltenVK.dylib 2021-04-26 14:53:28,526 [ 187258] WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
Solution
Navigate to folder containing qemu binary (e.g.
~/Library/Android/sdk/emulator/qemu/darwin-x86_64
)Create file
entitlements.xml
with the following content:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.hypervisor</key> <true/> </dict> </plist>
Make sure you have XCode command line tools installed
sudo xcode-select --install
Resign qemu binary:
codesign -s - --entitlements entitlements.xml --force ./qemu-system-x86_64
References:
- https://www.arthurkoziel.com/qemu-on-macos-big-sur/
- https://www.reddit.com/r/MacOS/comments/ltp77a/anyone_using_qemu_for_linux_on_macos_big_sur/
- https://www.reddit.com/r/VFIO/comments/kdhgni/qemu_hvf_support_for_mac_os_x_bug_sur_hv_error/
Answered By - danaimset
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.