Rahul Mishra
Rahul Mishra

Reputation: 240

"/dev/kvm not found "error on windows in android studio

I have enabled the Virtualization in BIOS in windows and I have Intel HAXM installed as well but I still get the message when I run the application on the emulator. How to resolve this. I am stuck at the same error for last two days.

Upvotes: 24

Views: 58004

Answers (22)

Ayaz Alifov
Ayaz Alifov

Reputation: 8598

On Windows:

  1. Go to Control Panel\All Control Panel Items\Programs and Features
  2. Click on the Turn Windows features on or off link on the left panel:

enter image description here

  1. Find Hyper-V option and unmark it.

enter image description here

  1. Click OK and reboot your system.

Upvotes: 0

Zulqarnain
Zulqarnain

Reputation: 651

Disabling hyper-v from control panel worked for me.

Upvotes: 1

Amine Harbaoui
Amine Harbaoui

Reputation: 1295

try to disable your secure boot mode in your bios , it works for me

Upvotes: 1

Rahul Tiwari
Rahul Tiwari

Reputation: 6978

I faced this issue and after some investigation, I concluded that the problem lies with the installer for HAXM and the way it is used.

Following is how I got it to work:

  1. uninstall previous instance of HAXM from control panel if any.
  2. download HAXM from here.
  3. extract downloaded zip. "haxm-windows_v6_0_1.zip" in my case.

Step 4, 5, 6 can be skipped they just provide some data points for entire process

  1. try running intelhaxm-android.exe.

    At this step I got error "Failed to configure driver: unknown error. Failed to open driver" this seems to be issue with installer itself.

  2. now I tried running "silent_install.bat".

    this installs HAXM but original error "/dev/kvm not found" persist. I believe this is the file which android studio uses to install HAXM but this does not lead to a healthy installation as original installer have some issue.

  3. uninstall HAXM again.

  4. extract intelhaxm-android.exe using winzip or any other program.

  5. go to extracted folder ("intelhaxm-android" in my case) and locate "hax64.msi"

    now we need to extract this file, win zip does not support this so I went with command prompt, other programs such as 7zip may support this.

  6. run command prompt in administartor mode (go to start > type cmd in search box > right click on cmd.exe > select run as administrator)

  7. run following command :

    ##>msiexec /a <path\to\file>\hax64.msi /qb TARGETDIR=<path\to\target>\hax64

    in my case it looks like

    C:\Windows\system32>msiexec /a D:\Intel_HAXM\intelhaxm-android\hax64.msi /qb TARGETDIR=D:\Intel_HAXM\intelhaxm-android\hax64

    this will extract "hax64.msi"

  8. now open command prompt in admin mode (refer step 9) and navigate to <newly extracted folder>\Intel\HAXM

    in my case it is "D:\Intel_HAXM\intelhaxm-android\hax64\Intel\HAXM"

  9. now run following command:

    ##> HaxInst64.exe /i intelhaxm.inf 1

    this should result in a success message at the end, something like this:

    SUCCESS: installed package D:\Intel_HAXM\intelhaxm-android\hax64\Intel\HAXM\intelhaxm.inf.

  10. go back to folder we have extracted in step 7

    in my case : D:\Intel_HAXM\intelhaxm-android

  11. run setup.exe, setup should complete without any error this time.

additionally I had to delete the existing AVD and create a new one as existing one was acting weird.

References:

  1. HAXM installer issue
  2. Extracting msi package from command line
  3. Json's Answer

Upvotes: 11

ravindra
ravindra

Reputation: 45

I got an error like,

  1. Failed to configure driver: unknown error. Failed to open driver
  2. /dev/kvm error from Android Studio

So, I have a just simple solution Uninstall Intel haxm ver 7.2.0 may be its buggy and install haxm ver 7.1.0 its working fine for me and I have no any above error.

  1. Uninstall haxm version from the android studio
  2. Download haxm version 7.1.0 here: https://github.com/intel/haxm/releases
  3. Extract zip and paste here: C:\Users[username]\AppData\Local\Android\Sdk\extras\intel folder name "Hardware_Accelerated_Execution_Manager"
  4. Go inside the folder and double click on intelhaxm-android.exe

Hope, this help you :)

Upvotes: 1

Stack Fox
Stack Fox

Reputation: 1211

Here are 4 simple steps that should work:

  1. Uninstall Intel Hardware Accelerated Execution Manager version from Windows Control Panel

  2. Go to https://github.com/intel/haxm/releases

  3. Download older version (v7.1.0)

  4. Install from zip

Upvotes: 13

user9005738
user9005738

Reputation: 11

  1. download haxm
  2. install it
  3. restart android studio

Upvotes: -2

monkey D Mukul
monkey D Mukul

Reputation: 11

by mixing above answers ..i found the formula that my system accepted Prerequisite -- VT-x enabled in BIOS

  1. download the latest HAMX (zip) version from intel link
  2. unzip it to following location -- appData.../Local.../sdk/...extras...../intel/Hardware Accelerated Execution Manager ...
  3. unzip the exe contents of intelhaxm-android.exe
  4. go in that folder...unzip the hax64.msi
  5. open that hax64 folder and rename the files having .win7_64 extension by removing .win7_64 (3 files should be there)
  6. you will have 5 files in all .exe .inf .sys .cat .rtf
  7. click the exe file for installation (mine failed)
  8. come to previous folder and click hax64.msi for installation (if it fails) click on setup.exe for installation

good luck

Upvotes: 1

Relish Wang
Relish Wang

Reputation: 385

Work for me. macOS 10.12.6 Sierra. Android Studio 2.3.3

  1. enter the path. <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/
  2. run this command. ./HAXM installation -u
  3. re-intallation it. ./HAXM installation

Upvotes: 1

Eduard
Eduard

Reputation: 1474

Removing, reinstalling did not work. Running System File Checker(sfc tool) did help. It fixed some system files and after rebooting intelhaxm-android.exe from Android SDK installed the Intel HAXM driver successfully.

How to run:

sfc /scannow

Upvotes: 1

Paulo Norena
Paulo Norena

Reputation: 21

the command HaxInst64.exe must be executed as administrator and qith flag 16 (16 = DRIVER_PACKAGE_LEGACY: 0x00000010) to avoid unsigned cat warning, execute HaxInst64.exe stand alone from cmd console as admin to see the different flags available:

C:\Program Files\Intel\HAXM>HaxInst64.exe /i intelhaxm.inf 1
DIFXDRVINSTALL:
INFO: Install Option "/i"
INFO: Input file "C:\Program Files\Intel\HAXM\intelhaxm.inf"
INFO: Flags 0x1 (1)

DIFXDRVINSTALL: installing driver package.
LOG: 1, ENTER:  DriverPackageInstallW
LOG: 1, intelhaxm.inf: checking signature with catalog 'C:\Program Files\Intel\H
AXM\IntelHaxm_x64.cat' ...
LOG: 3, Error = 0x800B0109, Signature verification failed while checking integri
ty of driver package 'intelhaxm.inf' ('C:\Program Files\Intel\HAXM\intelhaxm.inf
').
LOG: 1, RETURN: DriverPackageInstallW  (0x800B0100)
ERROR: Driver package is not signed - 0x800B0100.  Use flag:4 to force install.

C:\Program Files\Intel\HAXM>HaxInst64.exe /i intelhaxm.inf 4
DIFXDRVINSTALL:
INFO: Install Option "/i"
INFO: Input file "C:\Program Files\Intel\HAXM\intelhaxm.inf"
INFO: Flags 0x4 (4)

DIFXDRVINSTALL: installing driver package.
LOG: 1, ENTER:  DriverPackageInstallW
LOG: 1, intelhaxm.inf: checking signature with catalog 'C:\Program Files\Intel\H
AXM\IntelHaxm_x64.cat' ...
LOG: 3, Error = 0x800B0109, Signature verification failed while checking integri
ty of driver package 'intelhaxm.inf' ('C:\Program Files\Intel\HAXM\intelhaxm.inf
').
LOG: 1, RETURN: DriverPackageInstallW  (0x800B0100)
ERROR: Driver package is not signed - 0x800B0100.  Use flag:4 to force install.


C:\Program Files\Intel\HAXM>HaxInst64.exe
DIFXDRVINSTALL:
USAGE: DIFXDRVINSTALL /p /i /u /g <inf-filename> [Flag(s)]
OPTIONS:
/p : preinstall driver package.
/i : install driver package.
/u : uninstall driver package.
/g : get driver package path.

<inf-filename> : must be in one of the following folders:
 - The directory where the DIFXDRVINSTALL application loaded.
 - The current directory.
 - The system directory, i.e. SYSTEM32.
 - The Windows directory.
 - The directories that are listed in the PATH environment variable.

Flags [1..32]:
 1 = DRIVER_PACKAGE_REPAIR:                 0x00000001
 2 = DRIVER_PACKAGE_SILENT:                 0x00000002
 4 = DRIVER_PACKAGE_FORCE:                  0x00000004
 8 = DRIVER_PACKAGE_ONLY_IF_DEVICE_PRESENT: 0x00000008
16 = DRIVER_PACKAGE_LEGACY:                 0x00000010
32 = DRIVER_PACKAGE_DELETE_FILES:           0x00000020
64 = DEBUG INSTALL FOR TESTING              0x00000040

Notes:
 See logs written to 'Windows\INF\SetupAPI.dev.log'

Use DRIVER_PACKAGE_LEGACY (16) for unsigned driver package
C:\Program Files\Intel\HAXM>HaxInst64.exe /i intelhaxm.inf 16
DIFXDRVINSTALL:
INFO: Install Option "/i"
INFO: Input file "C:\Program Files\Intel\HAXM\intelhaxm.inf"
INFO: Flags 0x10 (16)

DIFXDRVINSTALL: installing driver package.
LOG: 1, ENTER:  DriverPackageInstallW
LOG: 1, Copied 'intelhaxm.inf' to driver store...
LOG: 1, Copied 'IntelHaxm_x64.cat' to driver store...
LOG: 1, Commiting queue...
LOG: 1, Copied file: 'C:\Program Files\Intel\HAXM\IntelHaxm.sys' -> 'C:\Windows\
system32\DRVSTORE\intelhaxm_2F28A505469BC4BCFA4D41E310D76AD2C8C60DAD\IntelHaxm.s
ys'.
LOG: 1, Installing INF file "C:\Windows\system32\DRVSTORE\intelhaxm_2F28A505469B
C4BCFA4D41E310D76AD2C8C60DAD\intelhaxm.inf" of Type 1.
LOG: 1, Installing legacy driver 'C:\Windows\system32\DRVSTORE\intelhaxm_2F28A50
5469BC4BCFA4D41E310D76AD2C8C60DAD\intelhaxm.inf'
LOG: 1, Service 'IntelHaxm' was started
LOG: 0, Installation completed with code 0x0.
LOG: 1, RETURN: DriverPackageInstallW  (0x0)
SUCCESS: installed package C:\Program Files\Intel\HAXM\intelhaxm.inf.

Upvotes: 1

Brain Kovalski
Brain Kovalski

Reputation: 11

Worked for me.

Windows 7 32-bit.

After getting error during installation: 1) go to C:\Program Files\Intel\HAXM 2) launch command line (cmd) 3) type "HaxInst.exe /i intelhaxm.inf 16"

Looks like flag:16 for this command could be used for installing unsigned driver packages.

Upvotes: 1

WayneWZ
WayneWZ

Reputation: 31

i found some computer does not provide the Secrue Boot or signature sriver checking disable relate function on the BIOS, so you could not disable it from BIOS, I found a solution on the Intel forum, it works for me, the HAXM had been installed successfully, emulator is ok now.

https://software.intel.com/en-us/forums/android-applications-on-intel-architecture/topic/537144#comment-1846715

I. Preparing---------------------------------------------------------
(Optional: check or change your BIOS settings for Intel VT, disable hyper-v, ... as mentioned in other answers.)
1. download and extract the file to a folder
2. cmd -> sfc /SCANNOW
3. reboot
4. cmd -> Bcdedit -set TESTSIGNING ON
5. reboot
II. Installation-----------------------------------------------------
1. start install-android.exe in the folder of the extracted file and install
1.1 if you don't get an error the previous steps have handled the error - continue to III.
1.2 if you get an error DO NOT click OK when the error occurs
3. go to C:\Program Files\Intel\HAXM and copy all files, except *.tmp to a new folder
4. then continue/finish the setup (click OK and finish)
5. copy the files from the new folder to C:\Program Files\Intel\HAXM and delete *.tmp
6. go to C:\Program Files\Intel\HAXM, right-click on the inf-file and choose install
a window with driverinstallation should appear. install driver. it should says ok then..
hint: this is what made the difference for me!
Starting "HaxInst64.exe /i intelhaxm.inf 1" as well as with parameter 4 in the console did
not pop up the driverinstallation-window
III. Test------------------------------------------------------------
1. cmd -> sc query intelhaxm
it should show the service
2. reboot
3. cmd -> sc query intelhaxm
it should says service running..
IV. Reset------------------------------------------------------------
1. cmd -> Bcdedit -set TESTSIGNING OFF
2. reboot

Upvotes: 1

Nkosana Sukazi
Nkosana Sukazi

Reputation: 11

I uninstalled HAXM then downloaded directly from the android studio, and now I'm working smoothly.

Upvotes: 1

Saurabh Shubham
Saurabh Shubham

Reputation: 43

I was having the same problem and I had solved it by myself

Don,t worry here is the simple solution for you:

  1. Go to your standalone SDK Manager, and find for Intel_HAXM type of package in Extras section. In worst case if it is already ind=stalled then try to update or reinstall it.

  2. Select that package and then install it from the SDK Manager.

  3. Now here is the important part, Go to "C:\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager" and then open "intelhaxm-android.exe" .

  4. Install it. If it says that your computer already has this installed , do you want to update it, then go for the same.

  5. Restart your Android Studio, and now everything is fine.

Upvotes: 1

Pasha Pavel
Pasha Pavel

Reputation: 21

I had the same issue with 6.0.4. I tried all recommended here without success. found resolution that really help:

I. Preparing--------------------------------------------------------- (Optional: check or change your BIOS settings for Intel VT, disable hyper-v, ... as mentioned in other answers.)

  1. download and extract the file to a folder
  2. cmd -> sfc /SCANNOW
  3. reboot
  4. cmd -> Bcdedit -set TESTSIGNING ON
  5. reboot

II. Installation----------------------------------------------------- 1. start install-android.exe in the folder of the extracted file and install 1.1 if you don't get an error the previous steps have handled the error - continue to III. 1.2 if you get an error DO NOT click OK when the error occurs 3. go to C:\Program Files\Intel\HAXM and copy all files, except *.tmp to a new folder 4. then continue/finish the setup (click OK and finish) 5. copy the files from the new folder to C:\Program Files\Intel\HAXM and delete *.tmp 6. go to C:\Program Files\Intel\HAXM, right-click on the inf-file and choose install a window with driverinstallation should appear. install driver. it should says ok then..

hint: this is what made the difference for me! Starting "HaxInst64.exe /i intelhaxm.inf 1" as well as with parameter 4 in the console did not pop up the driverinstallation-window

III. Test------------------------------------------------------------ 1. cmd -> sc query intelhaxm it should show the service 2. reboot 3. cmd -> sc query intelhaxm it should says service running..

IV. Reset------------------------------------------------------------ 1. cmd -> Bcdedit -set TESTSIGNING OFF 2. reboot

original from: https://software.intel.com/en-us/forums/android-applications-on-intel-architecture/topic/537144

Upvotes: 1

Vikrant Fernandes
Vikrant Fernandes

Reputation: 11

I solved this problem on a windows 10 machine by first enabling VT-X in BIOS, uninstalling HAXM and then disabling the driver enforcement signature in windows and reinstalling HAXM from \Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager. Not sure if I did a redundant step but it worked fine.

Upvotes: 1

Hatem Saad
Hatem Saad

Reputation: 181

Follow Tiwari's answer here until step 11, you need to rename 3 files:

  • intelhaxm_x86.cat.win7_64 => IntelHaxm_x64.cat
  • intelhaxm.sys.win7_64 => intelhaxm.sys
  • intelhaxm.inf.win7_64 => intelhaxm.inf

Upvotes: 2

Eric Abreu
Eric Abreu

Reputation: 171

If you're using Windows and have secure boot on, you will not be able to install HAXM properly or use its driver since Intel didn't sign it. Secure boot prevents you from using unsigned drivers, so even if you managed to force it to install, you wouldn't be able to do anything with it, unless you restarted your computer and selected the option to load unsigned drivers (press F8 repeatedly then press F7). You'll need to do this every time, which can be annoying, so it's easier to just disable secure boot and reinstall HAXM.

Upvotes: 3

Sultan Dadakhanov
Sultan Dadakhanov

Reputation: 67

if you are always getting "The system cannot find the file specified." while service start then manually copying intelhaxm.sys to %windir%\system32\drivers folder via explorer helped for me

Upvotes: 1

Istiak Morsalin
Istiak Morsalin

Reputation: 11149

Remove intel haxm installer 6 from control panel>Add or remomve Program. And download manually from here. https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager

Then install it manually. And launch android studio again. This worked for me. Hope it helps.

Upvotes: 14

Related Questions