Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux Grant Android Studio (AVD) permissions /dev/kvm (Permissions Denied)

I'm confused with how to give permissions to Android Studio to install Virtual Devices through AVD manager.

I tired to add permissions to the folder and relogged-in without success. I'm also confused with commands regarding group and username; am I suppose to substitute username with name of user.

Currently if I do theses commands I get

ls -al /dev/kvm
crw-rw---- 1 root root 10, 232 May  7 20:23 /dev/kvm

grep kvm /etc/group
I get nothing printed

So, I know there is no group. I don't want to give privilages to root just the user name for example "blade".

I also checked with the device supports KVM

egrep -c '(vmx|svm)' /proc/cpuinfo
8
kvm-ok 
8

Thanks!

like image 668
ConnectionistSystems Avatar asked May 07 '18 21:05

ConnectionistSystems


1 Answers

First, you'll need to install the qemu-kvm package. For Debian/Ubuntu:

sudo apt install qemu-kvm

Next, add your user to the kvm group:

sudo adduser <username_here> kvm

Finally, log out and log back in or reboot your computer for the changes to take effect.

See complete tutorial at https://www.linuxslaves.com/2018/10/fix-android-studio-devkvm-device-permission-denied-ubuntu.html

like image 64
Fawwaz Yusran Avatar answered Sep 21 '22 11:09

Fawwaz Yusran