Wednesday 23 May 2018

Android Studio: /dev/kvm device permission denied

I installed my Android Studio in my Home directory rather than /. So at first I thought I need to somehow do sudo. Then I tried sudo ./studio.sh but it ask me to install the AS again.

This worked for me:

To check the ownership of /dev/kvm use
ls -al /dev/kvm
The user was root, the group kvm. To check which users are in the kvm group, use
grep kvm /etc/group
This returned
kvm:x:some_number:
on my system: as there is nothing left to the final :, there are no users in the kvm group.
To add the user username to the kvm group, you could use
sudo adduser username kvm
which adds the user to the group, and check once again with grep kvm /etc/group.
Log out and back in (or restart), for the permissions to take effect. If you get the message
adduser: The group kvm does not exist.
On Ubuntu 18.04 you need to additionally sudo apt install qemu-kvm.


ref:
https://stackoverflow.com/questions/37300811/android-studio-dev-kvm-device-permission-denied

No comments:

Post a Comment