Android Studio 2.3 Using Emulator from Console, "/Dev/Kvm Device: Permission Denied" for Root User

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

Changed permissions in the /home/folder/Android/Sdk/emulator/ folder

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

Provide Additional command line options to AVD in Android Studio 2.3.3?

Passing the additional while launching avd from bash shell seems to be
working. I am entirely not sure though.

 nishon@nishon-Inspiron-5420 ~ $ emulator -avd [Enter AVD name] -qemu -m 2047 -enable-kvm

Before tying this command you need to setup path to ADB in your .bashrc(Ubuntu) or path(Windows)

Reference https://developer.android.com/studio/run/emulator-commandline.html

Running android emulator during jenkins build

I have managed to fix the problem.

  1. Install Qemu-KVM and cpu-checker:

    sudo apt install qemu-kvm cpu-checker
  2. Check if KVM is available (as jenkins user):

    $ kvm-ok
    INFO: /dev/kvm exists
    KVM acceleration can be used
  3. Create group kvm and add jenkins to this group:

    addgroup kvm
    usermod -a -G kvm jenkins
  4. Change group ownership for /dev/kvm:

    chgrp kvm /dev/kvm
  5. Create udev rule:

    $ sudo nano /etc/udev/rules.d/60-qemu-kvm.rules
    KERNEL=="kvm", GROUP="kvm", MODE="0660"
  6. Reboot


Related Topics



Leave a reply



Submit