2

I have Arch Linux installed on my laptop, I installed Android studio too. From this system I can almost develop anything I want

But I cannot boot android emulator either hardware accelerate or not.

When I get the emulator updated to the latest, it keep showing me the following message

Emulator: KVM: injection failed, MSI lost (Operation not permitted)

and I have no idea what's it talking about.

enter image description here

user158
  • 12,852
  • 7
  • 62
  • 94

1 Answers1

1

Please install qemu if not install

sudo packman -S qemu

sudo adduser $USER kvm

Then close the android studio and logout and log back in. After that open the android studio and open the emulator.

Reference: https://stackoverflow.com/a/45749003/7356355

user158
  • 12,852
  • 7
  • 62
  • 94
  • emm...there is no package named qemu-kvm, but got one named "qemu" https://www.archlinux.org/packages/extra/x86_64/qemu/ – BaoDingStyle Dec 07 '19 at 13:23
  • install it then – user158 Dec 07 '19 at 13:23
  • it doesn't work and when I shutdown the emulator it showing "handshake failed" – BaoDingStyle Dec 07 '19 at 13:38
  • "emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037 Warning: restoring GLES1 context from snapshot. App may need reloading. ^Cemulator: Saving state on exit with session uptime 71531 ms [3561:3743:1207/213645.959406:ERROR:ssl_client_socket_impl.cc(1050)] handshake failed; returned -1, SSL error code 1, net_error -101" – BaoDingStyle Dec 07 '19 at 13:38
  • I wipe it out and recreate avd again, then it works! – BaoDingStyle Dec 07 '19 at 13:43
  • glad it worked, I am using Linux Mint I thought qemu might be the issue since I also faced a kvm permission issue, [this](https://stackoverflow.com/a/45749003/7356355) fixed my issue. So I modified it for your needs.. I added a reference to that answer in my answer. – user158 Dec 07 '19 at 13:49