Android Studio Emulator AMD Ryzen 5 not working - android-studio

I try to run an emulator after making so many configuration to work with an AMD cpu, I have a windows 10, already disabled Hyper-V and disabled Windows Hypervisor Platform, enabled Virtualization on bios, installed SDK tools on in SDK Manager, and even change graphics emulator to Hardware-GLES 2.0.
Finally, I can effectively had an emulator launches, but my flutter app is not installed.
I wanted to have a stacktrace so I run my emulator with command line and first of all, I have something like this :
Failed to open /qemu.conf, err: 2
GVM is operational
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
emulator: INFO: boot completed
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: Revoking microphone permissions for Google App.
After searches, I added an empty qemu.conf file at C:/
Then :
C:\Users\lucil\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe:/qemu.conf:1: no group defined
In event log I have this stuff :
Could someone help me please ? I need to run on emulator because I need to make a presentation (it works well on my android device also)

Related

Using Intel QSV in WSL2

I want to use Intel QSV in WSL2.
Based on the experience of using QSV on a native Ubuntu PC, I installed the same library, but it doesn't work.
ex) ffmpeg, libva, vainfo, intel Media SDK, gmmlib, media-driver ...
My CPU supports QSV, but I can't initialize it.
In vainfo it works like this:
$ ls /dev/dri
card0 renderD128
$ sudo vainfo
Trying display: wayland
error: XDG_RUNTIME_DIR not set in the environment.
Trying display: x11
libva info: VA-API version 1.16.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
vaInitialize failed with error code 18 (invalid parameter),exit
I want WSL to be initialized properly so I can use it in C.
Try changing the libva driver to i965 if it solves the error, Your error logs shows the call to i965 driver instead of iHD.
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
export LIBVA_DRIVER_NAME="i965"
export LIBVA_DRIVER_PATH="/usr/lib/x86_64-linux-gnu/dri"
Please make sure that the shared object files already exists in this path.
for more information you can visit. https://github.com/intel/media-driver/issues/195

WineBottler returning error message every time i try an open .exe file on Mac

I'm trying to open a plugin for SNAP (to process Sentinel-3 imagery) on my Mac - the plugin downloads as an .exe file which means I need to open it using WineBottler. Every time I try and open the file however, I get this error message:
###BOTTLING### default.sh
/var/folders/rz/rr6ytzhx5gl60f1v1tbc67xm0000gn/T/AppTranslocation/6CDA1855-FA78-4A2A-A976-2C1A539F36ED/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources/bottler.sh: line 39: /Applications/Wine.app/Contents/Resources/bin/wine: Bad CPU type in executable
###BOTTLING### Gathering debug Info...
Versions
OS...........................: darwin21
Wine.........................:
WineBottler..................: 1.8.6
Wineticks....................: 20220411-next - sha256sum: b6370f13c4dc410023f2a4e4e9a4385d2a0420031666c2f30befccc9b39c8f65
Environment
PWD..........................: '/Applications/Wine.app/Contents/Resources/bin'
PATH.........................: /Applications/Wine.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin
USER.........................: hannah
HOME.........................: /Users/hannah
COMPUTERNAME.................: hannahâs MacBook Air
BUNDLERESOURCEPATH...........: /var/folders/rz/rr6ytzhx5gl60f1v1tbc67xm0000gn/T/AppTranslocation/6CDA1855-FA78-4A2A-A976-2C1A539F36ED/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources
WINEPREFIX...................: /Applications/Wine.app/Contents/Resources
WINEPATH.....................: /Applications/Wine.app/Contents/Resources/bin
LD_LIBRARY_PATH..............: /Applications/Wine.app/Contents/Resources/lib:/opt/X11/lib:/usr/X11/lib
DYLD_FALLBACK_LIBRARY_PATH...: /Applications/Wine.app/Contents/Resources/lib:/usr/lib:/opt/X11/lib:/usr/X11/lib
SILENT.......................:
http_proxy...................:
https_proxy..................:
ftp_proxy....................:
socks5_proxy.................:
Bottle
TEMPLATE.....................:
BOTTLE.......................: /Users/hannah/Desktop/Untitled.app
INSTALLER_URL................: /Users/hannah/Desktop/iCOR_Setup_3.0.0.exe
INSTALLER_IS_ZIPPED..........: 0
INSTALLER_NAME...............: iCOR_Setup_3.0.0.exe
INSTALLER_ARGUMENTS..........:
REMOVE_MONO..................:
REMOVE_GECKO.................:
REMOVE_USERS.................:
REMOVE_INSTALLERS............:
WINETRICKS_ITEMS.............: winxp
DLL_OVERRIDES................:
EXECUTABLE_PATH..............: winefile
EXECUTABLE_ARGUMENTS.........:
EXECUTABLE_VERSION...........: 1.0.0
BUNDLE_COPYRIGHT.............: © Your Company
BUNDLE_IDENTIFIER............: com.yourcompany.yourapp
BUNDLE_CATEGORYTYPE..........: public.app-category.business
SILENT.......................:
Hardware:
Hardware Overview:
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Dual-Core Intel Core i5
Processor Speed: 1.6 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Hyper-Threading Technology: Enabled
Memory: 4 GB
System Firmware Version: 476.0.0.0.0
OS Loader Version: 540.120.3~22
SMC Version (system): 2.27f2
Serial Number (system): C02QM1XWG941
Hardware UUID: EE27242F-C2B2-59E6-AAED-D598D1D61044
Provisioning UDID: EE27242F-C2B2-59E6-AAED-D598D1D61044
###BOTTLING### Create .app...
###BOTTLING### Enabling CoreAudio, Colors, Antialiasing and flat menus...
/var/folders/rz/rr6ytzhx5gl60f1v1tbc67xm0000gn/T/AppTranslocation/6CDA1855-FA78-4A2A-A976-2C1A539F36ED/d/WineBottler.app/Contents/Frameworks/WBottler.framework/Resources/bottler.sh: line 134: /Applications/Wine.app/Contents/Resources/bin/wine: Bad CPU type in executable
### LOG ### Command '/Applications/Wine.app/Contents/Resources/bin/wine regedit /tmp/reg.reg' returned status 126.
###ERROR### Command '/Applications/Wine.app/Contents/Resources/bin/wine regedit /tmp/reg.reg' returned status 126.
Task returned with status 1.
I've tried downloading the 'stable' version of WineBottler, download and redownload it to no avail - it always returns this message. I can't seem to find any way of getting around this or recently posted question (a lot are from 2010-15 and are outdated in their solutions)
Does anyone know what I can do to get around this and open it? It's driving me insane!!!
Thanks!

Android Auto DHU failed to connect to android emulator

I tried to connected Android Auto DHU r1.1 in windows with the Android Emulator in Android Studio,but got this error.
In emulator:
Communication error 8.
In desktop head unit:
Shutting down connection due to authentication failure.
I have checked the time, time zone and got the newest android auto.
adb forward tcp:5277 tcp:5277 (set adb proper port)
Stop head unit -> Start head unit (on the phone)
Launch desktop-head-unit.exe
and read https://developer.android.com/training/cars/testing#running-dhu
Work fine for me

Emulator fails to Launch

I was using the emulator perfectly fine yesterday, but today I cannot open the emulator. I have read up on the android documentation and on other issues people have run into and I cannot find a solution. I have attempted to force the emulator to run through the terminal using both -gpu host and -gpu swiftshader_indirect and I was not successful. I have updated all SDK Platforms and SDK Tools with no success. I have deleted the emulator and installed a different emulator through the AVD manager to be certain the download was current. Here are also some of the trouble shooting commands I have tried with the error messages. I am not sure what to do now. If anyone has any advice, I would greatly appreciate it!
Here is what the Terminal shows:
emulator: WARNING: encryption is off
init: Could not find wglGetExtensionsString!
getGLES2ExtensionString: Could not find GLES 2.x config!
Failed to obtain GLES 2.x extensions string!
Could not initialize emulated framebuffer
emulator: WARNING: load_config.cpp:52: Could not parse verified boot config:
emulator: WARNING: load_config.cpp:54: 1:1: Invalid control characters encountered in text.
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\iante.android\emulator-grpc.cer security will be disa
bled.
Started GRPC server at 127.0.0.1:8554
emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
Make sure your GPU drivers are up to date.
Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" t
o "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/i
ssues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
Make sure your GPU drivers are up to date.
Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" t
o "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/i
ssues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
And this is what the event log reports:
1:30 PM Emulator: init: Could not find wglGetExtensionsString!
1:30 PM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
1:30 PM Emulator: Failed to obtain GLES 2.x extensions string!
1:30 PM Emulator: Could not initialize emulated framebuffer
1:30 PM Emulator: emulator: WARNING: load_config.cpp:52: Could not parse verified boot config:
1:30 PM Emulator: emulator: WARNING: load_config.cpp:54: 1:1: Invalid control characters encountered in text.
1:30 PM Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\iante.android\emulator-grpc.cer security will be disabled.
1:30 PM Emulator: Started GRPC server at 127.0.0.1:8554
1:30 PM Emulator: emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1:30 PM Emulator: crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1:30 PM Emulator:
1:30 PM Emulator: 1. Make sure your GPU drivers are up to date.
1:30 PM Emulator:
1:30 PM Emulator: 2. Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
1:30 PM Emulator:
1:30 PM Emulator: 3. Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader".
1:30 PM Emulator:
1:30 PM Emulator: Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/issues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
1:30 PM Emulator:
1:30 PM Emulator: Process finished with exit code -1073741819 (0xC0000005)
EDIT:
When I restarted my computer, I saw there was an update available for Android Studio, so I updated it accordingly. When I ran the main activity as I have done so previously with my preferred AVD selected the emulator failed to start. Then I attempted to run it through the terminal with both -gpu host and -gpu swiftshader_indirect commands and it still did not work.
SOLUTION TO MY ISSUE:
1. Restart computer.
2. Open Android Studio and run the emulator through the terminal using emulator -avd Pixel_2_API_29 -gpu host.
3. Now run the main activity.
It is beyond me why all of a sudden now this is the work around to run on the emulator when I have previously simply clicked run main activity with my preferred AVD and it would run without problems.
I hope this helps if anyone runs into this issue. I do not think this a complete solution, but I can live with this for the time being.
this from GUI
Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader". solution image

Chrome remote desktop AND android emulator

I remote(chrome remote) to my desktop which runs android studio. When I try to run the emulator from android studio, i see the window with the virtual device open. But the device doesn't power on. This is not the behavior when I use the desktop directly to run the android project. Could this behavior be because of the remoting? If so how do i change it?
My need is to work on android studio on a remote connection, if there is a way to achieve it, kindly advise.
This is the AVD log
C:\Users\xxx\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_21 -netspeed full -netdelay none
emulator: device fd:1228
HAX is working and emulator runs in fast virt mode
creating window 61 83 462 820
logcat
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 E/libprocessgroup﹕ failed to make and chown /acct/uid_10053: Read-only file system
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 W/Zygote﹕ createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
04-29 12:06:39.078 1966-1966/com.example.xxx.four4 I/art﹕ Not late-enabling -Xcheck:jni (already on)
04-29 12:06:39.183 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Render dirty regions requested: true
04-29 12:06:39.186 1966-1966/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607f4c0, tid 1966
04-29 12:06:39.319 1966-1966/com.example.xxx.four4 D/Atlas﹕ Validating map...
04-29 12:06:40.050 1966-1966/com.example.xxx.four4 I/Choreographer﹕ Skipped 42 frames! The application may be doing too much work on its main thread.
04-29 12:06:40.184 1966-1986/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607fa60, tid 1986
04-29 12:06:40.231 1966-1986/com.example.xxx.four4 I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-29 12:06:40.469 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Enabling debug mode 0
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/EGL_emulation﹕ eglSurfaceAttrib not implemented
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa6083580, error=EGL_SUCCESS
04-29 12:07:12.637 1966-1973/com.example.xxx.four4 W/art﹕ Suspending all threads took: 13.570ms
Thanks.
I have the same issue using a remote desktop. I solved it using another remote access application TeamViewer (http://teamviewer.com)
Using TeamViewer you can run any Android Emulator like x86, x86_64 or arm.
The Android emulator is not using all of your cpu capabilities but rather a single thread and my guess is that the remote desktop and the emulator are sharing the same thread thus preventing from your emulator to run while using the remote desktop. the solution is to use a stronger cpu or a different remote desktop as user2839592 said.

Resources