16
votes

hi i install android stdio on Ubuntu 18.0 then i try to start android emulator i got error

/dev/kvm permission denied

i try some stackoverflow question but its not solve my problem those question links are

1.Android Studio: /dev/kvm device permission denied

2.KVM is required to run this AVD. Unknown Error! Please file a bug against Android Studio

3.Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

t tried all this but its not solve my problem and i give chmod 777 permission also

chmod 777 -R /home/halfix/Android/Sdk/emulator/

still i have /de/kvm permission divided

5
Checkout this answer. It worked for me. stackoverflow.com/a/45749003/9384511 - ABN

5 Answers

31
votes

Android studio can't access /dev/kvm directory. To allow access run

sudo chmod 777 -R /dev/kvm

It will ask for your password. After that restart android studio.

23
votes

I followed these steps to make it work in Ubuntu 18.04

Step 1: Install qemu-kvm

sudo apt install qemu-kvm

Step 2:

Add user to kvm group using:

sudo adduser <username> kvm

Step 3: If it still showing permission denied:

sudo chown <username> /dev/kvm
6
votes

No need to give whole permission to the kvm. you can give owner access for the kvm is fine like as follow

sudo chown <username>:<username> /dev/kvm
2
votes

This is a realistic error message related to permission but mine happened to be the same message when java was not installed and ran the app. Hope this will help if would be my case.

0
votes

Ut worked for me:

sudo apt install qemu-kvm

Re-start terminal and execute the following command:

sudo chmod 777 -R /dev/kvm