I install Windows 10 new version today (14393/1607) on My Surface Pro 4 . But When I install intel haxm to use x86/x64 android simulator, it can not start .
I uncheck hyper-v on the Control Panel -> Program. I restart my computer haxm start fail too. It give me this :
CPU acceleration status: Unable to open HAXM device: ERROR_FILE_NOT_FOUND
I try to run this script it reruen this : (sc query intelhaxm)
SERVICE_NAME: intelhaxm
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 577 (0x241)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
I run another script , it return this :
[SC] StartService: OpenService FAILED 5:
Access is denied.
Who can help me to solve this ? Thx !
PS : I have no any firewall in my computer . My device is Surface Pro 4
Since I clean installed my Windows 10 1607 last night during the haxm installation a windows popup tells me that the driver signature is rejected.
I suspect Intel must first update their driver signature for haxm to work again.
further reference: Windows Blog about driver signature changes in 1607
Checking the blog link you can see that disabling Secure Boot will disable this check. After I disabled Secure Boot the driver worked fine.
Related
When I try to use USB passthrough as described in https://androidstudio.googleblog.com/2020/08/emulator-30024-canary.html,
emulator -avd Pixel_3a_API_30_x86 -qemu -usb -device usb-host,vendorid=076B,productid=3821
I get the error message 'usb-host' is not a valid device model name. According to the Google link, USB passthrough should be supported from emulator version 30.0.24 and my emulator reports version 30.5.3.0 (build_id 7196367).
Has anyone succeeded in getting this to work?
No! Same with Android emulator version 30.5.4.0 (build_id 7243153).
If I look binary into the Linux version of the qemu emulator file,
I can still find the usb-host option. But it is totally left out
in the Windows Version.
So I guess Google must have switched the usb-host
support in Windows off.
Unfortunately the last Release Notes from the emulator is
from 30.4.5 (February 23, 2021)
Also I can't find any hint about this in the android-review AOSP
Don't know where else to look!?
[Update:]
I think I've found it, on the GitHub AOSP Mirror and android-review AOSP.
From Erwin Jansen committed on 3 Mar:
Revert "Enable usb host redirection for Windows"
# Libusb support on windows is not what we would like it to be
LIBUSB_FLAGS="--disable-libusb --disable-usb-redir"
It looks like the USB Pass Through Feature on Windows was just too buggy.
So, If one would get back to Version 30.5.2 (build_id 7175973) (Feb 27, 2021)
the usb-host will still be a valid device model name.
The DL was taking from a Canary Channel.
But it looks like Google is still working on it...
[Update 10.12.21]
Since Emulator Version 31.1.4 google implemented some new features and tools
to pass USB through.
I couldn't find the -list-usb parameter with emulator -help, but it works
if you run:
emulator -list-usb
VID:PID 058f:6387 (Bus 1, Port 5.1.1)
Manufacturer:
Product:
SerialNumber: 40A0FE0A
With this information, you can use the -usb-passthrough parameter
(-usb-passthrough vendorid=VID,productid=PID[,hostbus=BUS,hostport=PORT])
emulator -netdelay none -netspeed full -avd Pixel_4_API_31 -usb-passthrough vendorid=058f,productid=6387,hostbus=1,hostport=5.1.1
but it shows the error:
ERROR | Cannot load Android USB Assistant Driver for USB device "vendorid=058f". USB pass-through might not work.
Again a new tool Google added, with the prebuilt Windows drivers for USB passthrough one could try it again. Downloadable directly from the AOSP (tgz)
run as admin:
Install_Drivers.bat
Installing Android USB Assistant...
call Android_USB_Assistant_Install.bat
Microsoft PnP Utility
Processing inf : Android_USB_Assistant.inf
Successfully installed the driver.
Driver package added successfully.
Published name : oem89.inf
Total attempted: 1
Number successfully imported: 1
Installing Android Emulator USB Passthrough Assistance Driver
SERVICE_NAME: UsbAssist
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
[SC] DeleteService SUCCESS
SERVICE_NAME: UsbAssist
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 0
FLAGS :
But trying it again, still shows the same error.
[Update 13.12.21]
Now it is working. The correct syntax is with the 0x and without
the usbhost and usbport keyword:
-usb-passthrough vendorid=0x058f,productid=0x6387
It still shows an error message:
qemu-system-x86_64.exe: libusb_kernel_driver_active: -12 [NOT_SUPPORTED]
And the Device is not recognized in the AVD,
but as soon as you root the AVD (Magisk Canary) with my script rootAVD from Github
with the parameters PATCHFSTAB GetUSBHPmodZ
rootAVD.bat %LOCALAPPDATA%\Android\Sdk\system-images\android-32\google_apis_playstore\x86_64\ramdisk.img PATCHFSTAB GetUSBHPmodZ
and install my usbhostpermissions.zip Magisk Module, an USB drive will
appear as Drive system-wide and an USB Serial Device can be accessed
through a USB Serial Terminal Apk. The APK USB Device Info will also
now show the connected USB Devices. I will update my XDA Guide asap
accordingly.
In order to pass more USB Devices through, just add another one behind the first i.e:
emulator -netdelay none -netspeed full -avd Pixel_4_API_32 -usb-passthrough vendorid=0x058f,productid=0x6387 -usb-passthrough vendorid=0x067b,productid=0x2303
I have a HAXM enabled Pixel emulator that when I press run emulator in the AVD manager does nothing and returns no errors. Trying to run the avd manually with the commands yields:
C:\Users\Skyler\Desktop\AP>C:\Users\Skyler\AppData\Local\Android\sdk\emulator\emulator.exe -avd Pixel_API_25
[7604]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at C:\Users\Skyler\AppData\Local\Android\sdk\emulator\lib64\qt\lib
So far I just haven't been able to get any other errors, the emulator seems unresponsive, and the "Stop" button is greyed out. I've tried running Android Studio as an admin to no avail either.
Here is HAXM status:
C:\Users\Skyler>sc query intelhaxm
SERVICE_NAME: intelhaxm
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
EDIT: This error has disappeared, however now Windows 10 flags me with
This app cannot run on your PC
To find a version for your PC, check with the software publisher.
I have a problem with my AVD in android Studio. After I click the run button and start a new emulator it is very slow when the android starts, the app doesn't install on it. When it is finally running and I click the run button again, I can't find the running emulator in the choose device window.
I've got a MacBook Pro, so it is running on OSX 10.10
Maybe I couldn't set up correctly the intel acceleration, but I don't think so it causes the problem. Running emulator is not found. Sometimes it works, but most of the time it doesn't/
I don't use android studio (prefer eclipse) but maybe you can use a genymotion http://www.genymotion.com/ It's free for non commercial use. It's much more faster in eclipse than normal eclipse emulator. In my opinion it acts like real phone when eclipse symulator is always slow especially with hight resolution screen.
I 've already installed HAXM but It isn't better. I try to do it again. I followed the steps. I typed the terminal steps,but I had some problem.
After this command:
kextstat | grep intel
(got this message )
147 0 0xffffff7f82b0b000 0x14000 0x14000 com.intel.kext.intelhaxm (1.1.1) <7 5 4 3 1>
After that:
sudo kextload –b com.intel.kext.intelhaxm
(but I've got that)
/Users/mecseidani/–b failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Users/mecseidani/com.intel.kext.intelhaxm failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
Can be it a problem!?
I installed android studio and tried to run easy projects.
But I caught strange error message:
Waiting for device.
/usr/local/idea/android-studio/sdk/tools/emulator -avd Nexus-4-18-xhdpi -netspeed full -netdelay none
emulator: emulator window was out of view and was recentered
Device connected: emulator-5554
Device is online: emulator-5554
Target device: Nexus-4-18-xhdpi [emulator-5554]
Uploading file
local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk
remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld
Installing course.examples.HelloWorld.HelloWorld
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld"
Error: Could not access the Package Manager. Is the system running?
I couldn't figure out why this happen?
I installed sdk version and configured emulator. Any suggestions?
Here is emulator confiuration:
Update:
I tried to install Genymotion device and use few virtual devices, but caught:
Waiting for device.
Target device: genymotion-nexus_4___4_4_2___api_19___768x1280-192.168.56.101:5555
Uploading file
local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk
remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld
Installing course.examples.HelloWorld.HelloWorld
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld"
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
Error: Could not access the Package Manager. Is the system running?
How to solve this error?
First make sure you are running Android Studio version above 0.3.2 because there was some issue reported regarding the same in AS 0.3.2 . If it is not you can update it from Help >Check for update.
If you are already running AS above 0.3.2 :
Seems like issue is with your emulator not with Android Studio. It may happen that you are trying to install application before even the emulator started properly.
Wait till the home screen appears in the emulator before trying to install any application.
Also try to install any apk in Emulator from command line
Steps to install
Go to $Android_SDK_DIR\platform-tools, right click there keeping
shift key pressed and Chose "Open Command Window here".
Run command adb devices to make sure yout emulator is running
properly. It will show all your running emulators.
Now if emulators are showing properly, type the command adb install
YOUR_FULL_APK_PATH , YOUR_FULL_APK_PATH is of any .apk file path in
your system.
Please update if this works fine.
The most common cause of this error is simple: You have to manually unlock your Android Virtual Device by swiping the “lock” icon on the screen. Security measures prevent the emulator from letting you connect the debugger before doing this.
The problem is resolved:
In Android Studio
Start run/debug
if you see the message
Do not closed the AVD, just click on run/debug again, the Application will be running when you unlock the application.
The same problem but different solution, I modified my Virtual Device, I changed Memory option and Internal Storage, and it works fine.
RAM:512 , VM HEap: 192, Internal Storage=200, SD Card Size: 200 for Device Nexus 4 android 4.2.2.
In my case this error was caused by SELinux. I got to set SELinux to permissive.
adb shell su 0 setenforce 0
I had this issue, but I found that simply killing the emulator and restarting it worked. There seems to be some sort of race condition where the emulator has not initialized before Android Studio tries to launch the apk and so you get the package error.
I had this too, and using this config worked for me :
Device: Nexus One
Target: Android 4.2.2 -api level 17
CPU/ABI: ARM (armeabi-v7a)
Keyboard: Hardware keyboard present
Memory Options:
RAM: 512
VM Heap: 192
Iternal Storage: 200
SD Card:
Size:200
This Is Worked for me
1)Close Solution.
2)Close Emulator.
3)Run Emulator and Wait till it launch completely and shows Home Screen.
4)After that only Open Solution And Clean,Rebuild and Try to deploy Application.
The same happened to me right now. I don't know if there is another but for me the following worked:
Opened AVD (Android Virtual Device) Manager
Started virtual device
Hit the Run button again (that one at status bar)
Explanation: The problem happened because of timeout. Once device had started, the Android Studio could comunicate with him. (v 0.5.3)
Remove this emulator (in the AVD)
Install this emulator (in the AVD) :)
I've just reinstalled eclipse indigo (32bit) and the latest Android SDK. The Android Emulator crashes immediately after it is launched.
Here are my steps:
Create a new Adroid project. Target is Android 4.0, SDK 14.
Press the Run button in Eclipse.
See the Emulator launch and crash about 2 seconds later
Output of crash window:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
The Eclipse console complains about the following:
Warning once: This application, or a library it uses, is using NSQuickDrawView,
which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
goldfish_fb_load: framebuffer dimensions mismatch
savevm: unable to load section goldfish_fb
emulator-5554 disconnected!
Cancelling 'com.sparky1.HelloAnrdroidActivity activity launch'!
Any thoughts about how to get emulator to behave?
This has already been reported as a Bug: http://code.google.com/p/android/issues/detail?id=724
There are some workarounds presented in this post, too. But at this point, there seams to be no actual fix.
It looks like this happens when an external monitor is connected. Try disconnecting your external monitor and then start emulator. You can attach it back after the emulator starts.
I've seen this problem too. I've found that running emulator from command line and disabling snapshots help a lot.
I'm running:
$ emulator -no-snapshot-load #avd
If disable snapshot when create device, ok. Do not enable snapshot.
If enable snapshot, it's ok to check "save to snapshot" when launch device.
But check "launch from snapshot" is not ok. If already save snapshot, it will cause emulator-arm crash.
After emulator-arm crash by "launch from snapshot", disable snapshot with AVD manager does not work. But run config > target > additional command line option(-no-snapshot-load) works.
I had all these crashes as well and found this in my crash logs:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x97585bc1 CFStringGetLength + 17
1 com.apple.CoreFoundation 0x9759df63 CFStringCompareWithOptionsAndLocale + 35
2 com.apple.CoreFoundation 0x9759df2c CFStringCompare + 60
3 com.b-l-a-c-k-o-p.CamCamX5 0x03ff3b44 CoreBundleyes::IsMainMember() const + 48
4 com.b-l-a-c-k-o-p.CamCamX5 0x03ff11cc QVDigBaseClass::ClassFactory(ComponentInstanceRecord*) + 50
5 com.b-l-a-c-k-o-p.CamCamX5 0x03ff317b QVDIG_DATA_Open + 23
After spending only a couple of hours :-( on the net I found a tip to remove
/Library/Quicktime/CamCamX5.component
After that no more crashes :-)
An alternative is to switch to using AndroVM in Virtual Box which is an X86 Android image. The big advantage is that it is lightning fast compared to the ARM one. It boots in 2-3 secs. The downside is that you have to manually do the ADB connection and the capturing of the mouse by virtual box is a pain. Not all applications will run on the x86 as well.
To use it you have to configure the first Ethernet adapter as Host Only, run the androVM configuration utility to get the emulator's IP address, then use adb connect ip-address
Another tip is that if the screen times out you need to hit F1 to wake it up.