webview_shell on AOSP 7.1.2 emulator crashes, failed to create a pbuffer surface - android-emulator

I built an aosp_x64-eng emulator and want to test its webview, but it crashes immediately after launching. According to logcat, it says that [FATAL:gpu_info_collector_android.cc(193)] failed to create a pbuffer surface for fetching driver strings, EGL_SUCCESS (3000).
A link said the problem can be fixed by switching the CPU/ABI in the AVD from "Intel Atom (x86_64)" to "Google APIs Intel Atom (x86)". How can I change that in an AOSP emulator?
Any other suggestions? Thank you for your time:-)

Related

Android apps worked in usb debugging but not in android emulator (white screen)

I run "ionic cordova run android" using visual studio code.. but the apps shows white screen in the emulator.. it display properly if using USB debugging.. the device also display properly if install using the apk.. the reason why I want to use emulator because I want to debug "http://10.0.2.2".. this is my emulator setting..
Emulator setting
Things that I have done is as per below
Choose ANGLE (D3D11) for OpenGL ES Renderer at the emulator advance setting
Choose Software - GLES 2.0 graphic for the Emulated Performance during create emulator
Try both R and Q for the system image during create the virtual device
Update the SDK based on the system image set at the emulator
System image selection
Issue
I compile the source code at different laptop (Laptop A) and it manage to display error at the web console using google inspect
it display "newtrustedfunctionforjit fn.bind is not a function"..
Founding
the issue is related to the chrome version 83 and the browser need an upgrade to solve the issue
The emulator is not using a browser (it using web view) hence I cannot update the google version
Solution
download new skin for newer android model into laptop A
download same skin on the laptop B (the laptop that I initially come with this post)
Below is the explanation from GitHub for angular
Explanation about the chrome issue
Below is my new System Image
Release Name S
API Level 31
ABI x86_64
Target Android 12 (Google APIs)
New System Image

Flutter project debug is stopping in my Redmi note 9 phone

Launching lib\main.dart on M2003J15SC in debug mode...
lib\main.dart:1
Plugin project :firebase_core_web not found. Please update settings.gradle.
Invalid depfile: D:\Kampus\Alternative Internship\E-Butler FLutter\history-ebutler-main\.dart_tool\flutter_build\8db1b350320c9cfb508a70518c727e07\kernel_snapshot.d
Parameter format not correct -
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Error waiting for a debug connection: The log reader stopped unexpectedly
Error launching application on M2003J15SC.
Exited (sigterm)
when i press f5 on my vscode the build is success but in my phone only view white screen and then it exited
Just switch off the Turn on MIUI Optimization in your Developer options then run your app.
For some other fixes checkout this.
Your app is installed even if your phone stays on white screen, you can see that it worked by closing and reopening the app from your phone.
This Issue happens on most Xiaomi...Redmi note 10 pro as well this is only when it comes to flutter, if you launch project from root/android it will work fine,
If you use command line flutter run it will also work but you will not get input back from command line after install only difference app is launching
At the moment this is the only worked around
Make sure that your app meets the following requirements:
Targets API level 19 (KitKat) or higher Uses Android 4.4 or higher
https://firebase.google.com/docs/flutter/setup?platform=android
in some android devices not receiving firbase base responce because of its versions and api level
flutter clean, restart your devices, reconnect your devices to your pc and run again, this solution worked for me.

Visual Studio Code - Flutter : "Device emulator-5554 is offline"

I have just spent an hour reading through similar questions on Stack Overflow, and they are all for Android Studio, not Visual Studio Code. Also, I am doing Flutter development, so don't have access to adb commands, such as adb kill-server.
Everything was fine, unlike I clicked the power button on my emulated Android. Now, when I run/start debug and select active device, I get Failed to launch Nexus 5X API 29 x86: Error: Emulator didn't connect within 60 seconds.
How can I restart the emulated device? When it appears, clicking the power button does not seem to do anything. Is there a flutter terminal command?
Or can I somehow use a different emulator (if so, how)?
I faced the same issue with Android Virtual Device and Memu emulator so I switched to Genymotion.
I am using Genymotion personal edition which works amazingly and it's very light on resources too as compared to AVD and Memu.
You can download Genymotion Personal edition from Genymotion Personal Edition
Apart from Installing emulator Image you should also consider installing the GAPPS bundle in the emulator as it does not comes with it preinstalled. GAPPS will be needed in many apps requiring Google Play Services.
Here are the docs on how to install GAPPS in Genymotion emulator: GAAPS Docs
GAAPS Website
My Genymotion Emulator is Google Pixel 3a, 9.0 API 28.

Can not run my app on emulator - error while loading state for instance 0x0 of device 'goldfish_pipe'

Yesterday I've created Pixel 3 XL device to test my app on emulator. It was working yesterday but today I'm getting these errors when I try to run my app.
14:58 Emulator: C:\Users\Mert\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
14:58 Emulator: deleteSnapshot: for default_boot
14:58 Emulator: Process finished with exit code 0
for me, I have installed a newer version of HAXM and it worked perfectly
Deleting device from AVD Manager and creating a new one(I created the same one) worked for me
Download the google play version marked in yellow rather google API.
Creating emulator again with image from google play will also make sure reinstallation of HAXM.
I solve this issue within Android Studio SDK Manager, update to a newer version of Android SDK Build-Tools and Intel x86 Emulator Accelerator (HAXM installer), in the HAXM installer wizzard I put 4GB RAM size.
image
In my case I deleted the old devices and downloaded the Google Play play version image and manually changed adb.exe file.
Actually the working HAXM version isn't always the newests, as other answers suggest. I had HAXM version 7.8.0 (latest version ATM) installed on my Windows, but even though I was getting the question error (error while loading state for instance 0x0 of device 'goldfish_pipe'). I had it installed via its own installer, outside Android Studio, because I was getting error trying to install HAXM via Android Studio.
Then I had the idea to uninstall that latest version (7.8.0 ATM) and again try to install the version shown in Android Studio (7.6.5 ATM) via Android Studio itself, and it worked! So I realized the steps I needed to take in order to successfully install HAXM via installer (step 1 shown here) also fixed the problem trying to install it via Android Studio! And finally, after hours and hours of harrassment, I could successfully launch a virtual device on the emulator.
Below is the step for successfully installing HAXM (taken from here):
At last but not least, make sure you have no other virtual machine running! It would throw you at this thread's error.
My case is:
disable Intel x86 Emulator Accelerator (HAXM installer) in Android Studio SDK Manager
uninstall HAXM as a result
enable again Intel x86 Emulator Accelerator (HAXM installer) in Android Studio SDK Manager
install HAXM as a result
recreate emulated AVD
finally works for Me

Android Studio Emulator Error: "deleteSnapshot: for default_boot"

I installed Android Emulator and Google Play Intel x86 Atom System Image (API 28) and configured a AVD, then ran it for first time. The emulator window showed and closed immediately and in Event Log, I see this error:
5:48 PM Emulator: deleteSnapshot: for default_boot
5:48 PM Emulator: Process finished with exit code 0
This error occurs in both Cold and Quick Boot.
I already installed the Intel x86 Emulator Accelerator (HAXM).
I currently use Android Studio 3.1.4.
I tried using Wipe Data and recreating the AVD, but nothing became affected.
What's wrong and how to fix this problem?
Actualy I got similar error often:
`16:22 Emulator: D:\Data\Sdk\Android\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
16:22 Emulator: deleteSnapshot: for default_boot
16:22 Emulator: qemu: unsupported keyboard cmd=0x84
16:22 Emulator: Process finished with exit code 0`
I figured out it is good to make snapshot when you install new device(like google account etc.)
When the error occurrs again, then you need to edit device, Show advanced settings and select Boot from snapshot.
Dude I was having the same problem and solved doing the following:
I accessed Android Studio, went to the list of my AVDs and wiped the data with the "Wipe Data" function.
After that it went back to normal operation.
Hope this helps! = D
I think the problem was with my CPU. So I used Genymotion (that uses VirtualBox), it's much faster than AVD. I repeat it's very FAST. Now, I'm using Android 9 (Pie) on Genymotion.
I recommend Genymotion for those who have problems with AVD.
If there is unused AVD's remove them,then Try to increase RAM size of the emulator and restart your android studio.
In my case Avast was the cause of the problem, I'm solve it deactivating avast's shields for 10 minutes, run the emulator (It runs well again but deleted all the previous apps installed), closed it, close android studio, reactivate the Avast's shield again and run android studio and the emulator works fine again now.