Best current Android emulation options - android-emulator

My Requirements
Run Android on an x86_64 CPU (x86/x86_64 binaries preferred)
Run inside KVM/Qemu or in an X session.
Fast (Best performance possible)
Install apps from Google play store
Reasonably stable, should not crash too often.
Not required: GPU acceleration (graphics intensive apps will not be used)
Android x86 has been around for quite some time, and the last build that they have is 4.4 and was from 1st Jan 2015. Seems older than I would have expected?
I see that the official android emulator now has accel-vm but I've not seen any performance comparisons between it and Android x86.
I've also seen other related projects mentioned
Genymotion
bluestacks
jar of beans
andy
In the case of ARM dependency
If I find that some app that I need will not run on x86, what is my 2nd best alternative that can emulate ARM with good performance on an x86_64 CPU?
Any recommendations to help with the above are welcome.

Related

What is Android mini_emulator image?

When building Android,
lunch
possible images are:
...
5. aosp_x86-eng
6. aosp_x86_64-eng
...
16. mini_emulator_x86-userdebug
17. mini_emulator_x86_64-userdebug
...
What is exactly mini_emulator? What is the difference between mini_emulator and aosp_x86?
You can find the configurations here:
build/make/target/product/aosp_x86.mk
build/make/target/product/aosp_x86_64.mk
device/generic/mini-emulator-x86/mini_emulator_x86.mk
device/generic/mini-emulator-x86/mini_emulator_x86_64.mk
The names of these configurations mean:
aosp means a full-featured Android. Sometimes also refered to as Generic System Images.
mini means a reduced Android.
emulator means that this Android is meant to be run in the qemu-emulator.
x86 and x86_64 describe the architecture.
eng means
Development configuration with additional debugging tools
userdebug means
Like user but with root access and debug capability; preferred for debugging

Unity aab not compliant with the Google Play 64-bit requirement

I have a Unity project that I'm switching from APKs to AABs (app bundles). Previously, when I was building it as an APK, the Google Play Console told me the APK was 64-bit compliant.
Now that I'm building an aab, I'm getting the warning:
This release is not compliant with the Google Play 64-bit requirement.
The following APKs or App Bundles are available to 64-bit devices, but
they only have 32-bit native code
I have both ARM7 and ARM64 architectures set.
I am excluding x86.
When I open the .aab in an archive viewer, the lib folder has all of
the .so's for both arm64-v8a and armabi-v7a.
I'm using IL2CPP, .NET 4.x
I'm using Unity 2018.3.7f1
My ndk version is 16b
My
Android Studio is up to 3.4.2 and gradle is 3.2
A lot of similar threads here talk about following the "Learn more" links, which I've done. I had already done all of the work to get my app 64-bit compliant before switching to app bundles.
Other threads talk about Android Studio solutions, which I can't use because my automated build process involves building with Unity from command line, so it has to be Unity configurations or bust.
My expectation was the app bundles were supposed to be the hot new way to let Google build better APKs for you, but it seems like it's getting confused on whether or not aabs are actually 64-bit compliant, which seems to defeat the whole purpose.
Is this a Unity problem, does Google have an error in their system with regards to app bundles, or is there some other step I'm missing?
For those who have this problem since yesterday (August 19, 2019):
In Player Settings > Other Settings you must now uncheck the x86 box (It is for the 32-bit Intel architecture).
You will now only have the following warning:
The device types on which your application can be installed will be more restricted.
But, in my case, it drops from 12392 devices to 12385 devices.
Here is the opinion of a Unity member on the issue:
x86 is used by less than 0.4% of all Android devices, so it shouldn't have any real impact.
x86 target will be removed completely in Unity 2019.3.
It looks that there was a bug in the Play Console where this message was displayed even when the AAB was compliant. This should have been fixed last Friday afternoon.
Try again now.

I have got an AMD Ryzen CPU and Android emulator doesn't work

I have got an AMD Ryzen CPU and Android emulator doesn't work.
It doesn't start the emulator becouse the CPU doesn't support the x86 emulator
Update - My previous answer is no longer true. Google has added AMD and Hyper-V support into their latest beta. Thanks to ReverseCold for letting me know. Please see his answer below.
Update 2 - I had to set this up today. To save some googling, here is the powershell command to enable Hyper-V. Pulled from Microsoft's Docs
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Make sure to run powershell as an administrator.
Update 3 - Turns out there's a difference between Windows Hypervisor Platform and Hyper-V. You'll need to enable the first one for Android emulation to work. Just click start and type Turn Windows features on or off until you see the control panel option of the same name. Then enable the feature from the menu that pops up after clicking that.
According to This answer, AMD virtualization for Android is only supported on Linux. If Ryzen becomes hugely popular, maybe they'll write one for Windows, but I won't be holding my breath.
The latest beta has support for Ryzen. Source
The following is from the google blog post: If you have an AMD processor in your computer you need the following setup requirements to be in place:
AMD Processor - Recommended: AMD® Ryzen™ processors
Android Studio 3.2 Beta or higher - download via Android Studio Preview page
Android Emulator v27.3.8+ - download via Android Studio SDK Manager
x86 Android Virtual Device (AVD) - Create AVD
Windows 10 with April 2018 Update
Enable via Windows Features: "Windows Hypervisor Platform"
Here is a list of ways to get around it:
genymotion personal is free but you need to register
Visual studio android emulator is also free and is fast. I had issues with it disconnecting on android studio
Physical device. You will have a hard time trying to see the sqlite database if it isn't rooted.
With the physical device you can download Vysor on play store and install the extension on google chrome. Then you can have the physical device on your monitor.
I managed to run the Android emulator on Windows 10 (AMD Ryzen 5 2600) after installing the KB4505903 update.
In my case, only two configuration requirements were needed:
Windows 10 May 2019 Update (1903), OS Build 18362.267
Enable via Windows Features: "Windows Hypervisor Platform" ("Платформа низкоуровневой оболочки Windows")
Gennymotion should work for amd users. I emailed them and they said yes it should work.
check here to see their specific requirements.
Yeah I have AMD CPU somehow it works now.
I don't have x86 installed by HAXM and it still works strange.
Gigabyte CPU/AMD Ryzen 7 ->
MIT Settings -> frequency settings -> advanced -> have SVM enabled
Go to windows turn on and off feature
-> if you're using windows home, not pro edition, then you need to find "windows Hypervision platform" then check mark it.
Create a new AVD virtual device, the newest version may or may not work. You have to do trial and error with different API versions like 25, 26, or newest one.
Somehow on SDK Tools, i don't have x86 intel HAXM installed, and it works fine? Does anyone know why it works without intel x86 on my AMD CPU? When i uninstalled it and did everything else again, it finally worked... Strange..
If you have an AMD processor in your computer you need the following setup requirements to be in place:
AMD Processor - Recommended: AMD® Ryzen™ processors
Android Studio 3.2 Beta or higher - download via Android Studio
Preview page
Android Emulator v27.3.8+ - download via Android Studio SDK Manager
x86 Android Virtual Device (AVD) - Create AVD
Windows 10 with April 2018 Update
Enable via Windows Features: "Windows Hypervisor Platform"
**Note:There is Hyper-V features... You should enable Windows Hypervisor Platform not Hyper-V. Windows Hypervisor Platform is at the bottom of features **
I know I am a bit late to answer this but after a few hours of research and verification, here is what I have found. As of July 2018, if you run AMD Ryzen CPU/APU, you should be able to run Android emulator. (see link). It does not work on my old AMD Phenom II X6 because the CPU needs to support SSSE3 and SSE4.1 features. I guess it's time for me to upgrade :) The toast message I received was "Emulator: emulator: WARNING: Host CPU is missing the following feature(s) required for x86_64 emulation: SSSE3 SSE4.1"
You can follow the instructions in the link above, although I also had to do these in my Android Studio.
In the Tools menu > Android SDK > SDK Tools (tab) > Uncheck the option "Intel x86 Emulator Eccelerator (HAXM installer)".
Go to Tools menu > AVD Manager > Ceate a new virtual device (choose an image for the x86-64 platform)
A related question was asked here - Ryzen 3 with VS android emulator - I've responded there and so thought to cross-link in case others missed it.
This might help you:
https://www.reddit.com/r/Amd/comments/cgpaq4/ryzen_android_emulator_whpx_fix_for_windows/
The issue seems to be to do with Windows and has been fixed in the insider builds - you can get it working by following the link above, and without having to become a Windows Insider.
--
Unfortunately After turning on Windows Hypervisor Platform I can not change the resolution window. It was fixed at non resolution recommended. I do not like at all. Here is my computer's information

Mismatch of CPU Architecture for the Crosswalk using Cordova

I have integrate crosswalk plugin in my Cordova application. When I publish this app to google play. I'm not able to open in my Asus gen phone 2 it throws following error
Error message:Mismatch of CPU Architecture for the Crosswalk
Cordova version - 6.0.0
Crosswalk Version - latest
Can any one help me for resolving this problem?
The Asus phones tend to use an Intel x86 chipset. When doing anything with native code, you need to account for the various chipsets used by devices. Crosswalk is built with native code. It sounds like you did not include builds for both the ARM and x86 chipsets to Google play.
The Cordava Crosswalk plugin out-of-the-box will give you 2 chipset builds, 1 for ARM and 1 for x86 CPU architectures. You should be uploading both APK output files to Google Play.
NOTE: Since Google play changed the max APK size from 50mb to 100mb, you now have the option of package both chipsets together. However, you may still want to consider having a separate build for each and uploading them separately.

How to improve the performance of emulator in Android studio?

Whenever I run my small application in Android studio it takes more time to boot in emulator .
My system config as follows
RAM 4GB
PROCESSOR dual core
GPU intel integrated graphics
Intel’s x86 Emulator Accelerator Manager allows developers to run an emulator which performs much faster than a typical emulator running on an ARM-based CPU architecture. It should be noted that this technology only works on Intel VT (Virtualization Technology) enabled systems.You can also enable your emulator to use your machine’s GPU which should make rendering of animations or graphics much faster than it would otherwise be.
Did you install the HAXM driver? This makes the emulator usable but even then there is room for performance improvements...
(Of course your graphic card driver should be installed properly)