17

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

  • Checkout this answer. It worked for me. https://stackoverflow.com/a/45749003/9384511 – ABN Apr 18 '20 at 11:07

6 Answers6

34

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.

  • 5
    this will remove all restrictions for /dev/kvm for all users on your machine. I'd recommend [Jerin's answer](https://stackoverflow.com/a/51693686/11359707). – ideam May 09 '19 at 21:20
24

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
Jerin A Mathews
  • 8,572
  • 4
  • 26
  • 49
  • I would suggest informing that the user may need to logout and login again after the command "sudo adduser kvm" – LRMAAX Feb 11 '19 at 01:49
6

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
nifCody
  • 2,394
  • 3
  • 34
  • 54
2

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.

Nevdev
  • 31
  • 3
1

/dev/kvm permission denied android studio [Motherboard]Set VT(Virtualization Technology) in BIOS and install Virtual Machine https://www.asus.com/in/support/FAQ/1045141/#A

enter image description here

Yogesh Bangar
  • 480
  • 4
  • 12
0

Ut worked for me:

sudo apt install qemu-kvm

Re-start terminal and execute the following command:

sudo chmod 777 -R /dev/kvm
Waqar UlHaq
  • 6,144
  • 2
  • 34
  • 42