I want to test Android Vulkan samples under Android Studio in MS WIndows 10
using this manual https://developer.android.com/ndk/guides/graphics/getting-started
I cannot do it because of the error
Device supports x86, but APK only supports armeabi-v7a
I have tried all options suggested here What is the reason for the error "Device supports x86, but APK only supports armeabi-v7a" but it does not work.
I have following Virtual Devices
Even if I use armeabi-v7a I cannot start app. And it is EXTREMLY slow.
Please help me to use clear steps to get working Vulkan samples under x86 images of Android. Thanks!
There are a couple different problems here:
First, the "device supports x86_64, x86, but APK only supports armeabi-v7a" means exactly what it sounds like: you've got an emulator that only supports 32-bit and 64-bit x86 instruction sets, but the native code in your APK is only compiled for 32-bit ARM. Emulating x86 devices is much faster since they can run in a virtual machine (the host CPU is actually executing emulator instructions directly, instead of having to translate them one by one in software). Configure your project to build native code for x86 in addition to armeabi-v7a.
Second, when using an ARM emulator, or if you fix the first problem and run on an x86 emulator, I don't think the Android emulator emulates a Vulkan-capable GPU yet. So you should be able to create a Vulkan instance, but vkEnumeratePhysicalDevices should return a count of zero available physical devices.
You don't give any details about "cannot start app": do you see anything in the log? Are you able to create an instance? Or is there some other completely unrelated problem before you even get to that point? Nobody can help you with that without more details.
Related
I am trying to setup a testing environment for the development of java apps.
I do not have any dedicated server right now and I am using one KVM VPS to write a code and on another one I am running Android x86 8.1 RC2 in Debug Mode to catch the contents of /data/log.txt. Everything works nice and smooth.
Yet right now I need to test the app on Android 9.0 Pie. There is no ISO images of Android x86-pie yet, only sources. So I wonder if I should try to build myself Android x86 9.0 from the sources or there is another option..?
(I tried to install Bliss OS, but failed: https://forum.xda-developers.com/showpost.php?p=80086490&postcount=1070 )
So apparently there is Android Emulator available: https://androidstudio.googleblog.com/2019/08/emulator-29110-canary-android-q-beta-6.html but it requires /dev/kvm (which means that I probably should run it on dedicated server?).
How this emulator works? Is it possible to make an ISO image and install it on VPS?
Edit:
This is the Android 28 system image that sdkmanager provides:
I wonder if it is possible to convert this one into ISO for installation on VPS.
Edit2:
Tried Android x86 9.0.0 r34... It doesn't work yet.
https://github.com/android-x86/android-x86.github.io/issues/52#issuecomment-524590033
I need to do a lot of android testing where the device I use has to be ARM based. While it is possible to create these devices in the default android emulator they are of course very slow on my x86 development machine.
A lot of this testing runs headless and automatically so I thought about setting up an ARM server and emulate the devices there in the hope that the performance would be better. While looking around I realized that there is nearly no information about this. Is it possible to run an android emulator (ether the one provided with the SDK or any other) on a ARM machine to get higher performance for the virtual devices?
This is actually a very good question.
Some cloud services like Amazon are providing the arm based machines. With those machines, we can run android emulators in cheap price.
Google doesn't provide the android emulator binary for arm.
But you can build those emulator binaries from AOSP. You have to do some work such as editing of cross-compile build files, adding target directories and building related third party libraries in arm architecture.
If you need any further information, I would attach detailed technical tips or step-by-step manuals.
Okey, BlueStacks is a bit slow on my pc, so I read somewhere in the internet that Genymotion is a bit faster then BlueStacks. Then I downloaded Genymotion and installed it. And after a lot of complex steps I finally understood that I need ARM translation and Google app for playing Android games. Now, I can understand that Google app is needed for getting the play store. But I am still in the dark about the 'ARM translation'. Why is it needed? what does it do? what happens if I don't use the ARM translation? And lastly, what does ARM stands for?
-Thanks in advance.
ARM is a processor architecture, you can read more about it here.
Android apps are sometimes designed with X86 architecture and sometimes with ARM.
You have to install the ARM translation in order to install on your emulator apps that use ARM architecture.
It's not a must have, but a lot of apps won't work without it.
Android games generally make use of OpenGL ES which is built from the ground up to work specifically with an ARM SoC. The Android NDK itself allows game developers to optimize their software by using C/C++ and even ARM assembly code.
The GenyMotion emulators are designed to work around an Intel x86 / x64 architecture, which is why they are faster than the Android emulators. But because of that, and because they have now decided to forgo ARM translation, they cannot run games.
A standard Android emulator actually compiles Java source to dex, and dex to ARM assembly, and these ARM instructions are run on an ARM emulation called QEMU. This makes the Android emulator incredibly slow, as it is in effect running an emulation of an ARM processor on top of an Intel-Windows machine. But it is able to run games.
The Android emulators emulate, while GenyMotion is more effectively a simulation.
This question has many parts.
Some info about my system:
64-bit Ubuntu Linux
I am wondering what the stock emulator is that comes with Android Studio (A.Studio) (if indeed it has a name).
A helpful answer would include comparing this emulator with other emulators. A list of pros and cons of using each different emulator would also be helpful.
Perhaps there is a more fundamental ~thing~ about using different emulators; information on that is welcome if anything comes to mind.
Finally, i have never used an emulator besides the one that has come with Eclipse or A.Studio. What do I need to know in order to plug any emulator into any IDE? I have had issues with IDEs being "fragile" and breaking frequently, FYI.
You can use genymotion, for fast speed the quality, both for the eclipse and Android studio, get it here.
Also you can set up the Google play service for using Google Maps and downloading apps from Google play store.
Get the package and how it use it , please refer to here.
The emulator used by Android Studio is the exact same one used with Eclipse. It is in fact included with the Android SDK (which is in turn included in Android Studio) and used by various development environments.
The way it works depends on what kind of system image you use it with. For most recent Android versions, there are 2-4 different system images - arm, arm 64-bit, x86, and x86 64-bit (the 64-bit ones are Lollipop only, and fairly experimental at this stage of the game [early 2015]).
There are also Google API versions of these images (they include various Google apps such as Google Play Services) which can be used if these components are needed by your app.
For development purposes, the x86 system images are your best bet as performance is vastly improved by the emulator not having to emulate the ARM architecture - you need to use HAXM (by intel, also available in the Android SDK) to get any real speed benefits with x86 images though. The emulator also provides GPU acceleration (it must be manually enabled for each emulator device) which allows it to use your physical GPU for rendering instead of emulating these operations in software.
The way the development environment (Android Studio) connects to the emulator is via ADB (Android Debug Bridge). This means that it can work with virtually any emulator (such as Genymotion, which runs via VirtualBox). However, there is native support for using the Android Emulator from within Android Studio (this is configured by selecting emulator in the Run/Debug configuration)...when using another emulator (such as Genymotion) you should select USB device (in Run/Debug configuration) and make sure that the ADB instance is connected to your emulator via TCP (Genymotion does this for you automatically at startup).
This should give you enough information and I will not re-post all the various instructions on how to do any of the above as they have been posted as answers to various questions here on SO.
I've seen that there are emulator images available for Android which can run on x86 virtual machines. I'd like to build my own x86 Android image from source, but I can't seem to find instructions online. Is it currently possible to build a custom x86 "ROM"? (not sure "ROM" is appropriate term for x86 systems, whatever)
Yes it's possible, but you still need a Linux machine to compile it (without going into a lot of troubles).
There are a lot of information on porting android to X86 platform in the net. I suggest you to start with this one: Android-x86 - Porting Android to x86 .
You can also have look at XDA forun. They do a lot of work on porting ROM's.
Regards.