Tuesday, October 2, 2018

Fix Android Studio /dev/kvm device: permission denied in Ubuntu

Linuxslaves.com - If you use Android Studio in Linux (Debian, Ubuntu, and its variants) you might be experiencing a /dev/kvm device: permission denied error when you try to create and/or run the emulator / Android Virtual Device (AVD).

The error message also shows a hint on what could be wrong: Grant current user access to /dev/kvm. Today, I'm gonna show you how to fix it!.

Suggested read :

How to Fix /dev/kvm Permission Denied

The easiest dan quickest way to fix the issue is installing qemu-kvm and add your user to kvm group. Ah ya, this solution should work in Debian and Ubuntu based distributions.

Android Virtual Device Linux

Let's get started!.

Step 1 - Install qemu-kvm package in Ubuntu :

sudo apt install qemu-kvm

Step 2 - Once installed, then use the adduser command to add your user to the kvm group.

sudo adduser [username] kvm

Output :

$ sudo adduser linuxslaves kvm
Adding user `linuxslaves' to group `kvm' ...
Adding user linuxslaves to group kvm
Done.

Step 3 - Log out and log back in or reboot your computer

Cheers, now the Android Emulator should work as expected. That's it folks!.

Related Post