Where is the hardware acceleration in the ICS Emulator? - android

I thought this was on the way, anybody know how to enable it?
Seems that I can't get a GLES2.0 context inside the emulator either, but maybe that's just me. IllegalArgumentException: No configs match from the egl.
However, the GLES20 API Demo included seems to run.
Anyways, even so, none of it seems accelerated or fast then old emulators. Nice update though.

In Android SDK Tools R15 you can enable GPU emulation in 4.0.3 Image.
You need to create a new emulator virtual device and set GPU emulation to true in Hardware properties.

The emulator in ICS doesn't include hardware acceleration.
(The bug to provide that is still open: http://code.google.com/p/android/issues/detail?id=6816)
That said, it does allow hardware acceleration for apps when they're running on a phone. (This feature was actually introduced in Honeycomb for tablets.)

The Android SDK Add hw.gpu.enabled hardware property on August 26, 2011's commit.
"the emulator can (sort of) do emulation but you need a system image
that supports it. We haven't released any yet. If it was ready we would have announced it." said with Xavier Ducrohet On Oct 20, 2011.
Ice cream sandwich gpu emulation issue.
As of now, I can't find a system image supports it.

Related

Webgl supported but not enabled on Nexus 7

I have been trying to write an Android application which uses a Three.js WebGL renderer. For some reason, constructing the WebGL renderer caused an error on my Nexus 7, and after further investigation, I discovered that my device didn't seem to do get along with anything WebGL-related at all, and even Chrome didn't work with WebGL. When I visited get.webgl.org, it told me that WebGL seemed to be supported on my device, but wasn't enabled. I did some more research and found advice from several sources that told me that Nexus 7's do support WebGL, and that I should go to chrome://flags and select "Enable WebGL". Unfortunately, when I went to chrome://flags, there was no Enable WebGL option. Out of desperation, I tried enabling "WebGL 2.0 Prototype" and "WebGl draft extensions", hoping that this would fix the problem. Instead, Chrome ended up crashing and I ultimately had to reinstall the chrome app to get it working again. Anyway, the point is: What can I do to get WebGL working on my Nexus 7?
Firefox can render WebGL content on Nexus 7
You can try to override the software rendering list. Go to chrome://flags and Enable the Override software rendering list. It will solve the problem if your GPU is blacklisted by chrome.

Android emulator does not match hardware?

Obviously, there will be minor differences between the emulator and hardware, but I'm running across major issues and wondering if others have found any solutions.
I have an .apk of my application, which loads and starts fine on the 2 pieces of hardware I have on hand (both OS 4.1.2). It then freezes up on a screen switch inside the application. This has happened before and it was due to that exact version of the OS having a particular bug (which should be worked around). Anyways, those details are not terribly important, that's simply how I got to thinking I'd test other versions via the emulator. However, here's what I hit:
Newer versions (5+) of the OS have an "Intel" option and my .apk crashes immediately on start on those versions.
Newer versions (5+) the Google version and 4.x generic (including the very same 4.1.2 I have on 2 hardware devices) starts my .apk fine, except that all the graphics are missing!
No difference between architectures on any given OS/class (32/64 bit, mips, arm)
What's the difference between Intel and Google versions of Android that would cause such a huge difference? Also, why does my app have graphics on hardware, but graphics vanish on the very same OS on the emulator? Are there options I need to change somewhere?
First update your SDK.
Then install emulator system image you need.
In SDK Manager you can find that Intel/ARM Android images start from 4.0.3 . Google Intel/ARM start from 4.4.2 instead .
Make sure you have hardware virtualization enabled in PC BIOS because Intel images need that and they are much faster for that.
Try to reinstall Intel HAXM . You can find setup in <Android SDK Path>/extras/intel\Hardware_Accelerated_Execution_Manager
Intel/ARM images use different CPU architecture. Instead Google/Android images have only a different software configuration. Google images include Google services like Play,Maps,ecc. Android images haven't them
It appears to be due to timeouts. Differing versions and "equipment levels" of Android devices take varying times to respond. The difference is especially large in the emulator. By bumping up all the system timeouts in the code I'm able to avoid all of the avoid weird issues.

SKMaps eglChooseConfig IllegalArgumentException

I have searched and searched this one and cannot seem to solve. Im running OSX 10.9 on an iMac with a ATI RADEON 4670 and and trying to get Skobbler Scouts maps to run on an Android emulator. All I keep getting is the dreaded eglChooseConfig() returning false using the inbuilt Android Emulator with all the prescribed settings set by Skobbler (gpu on API level etc etc). Is this a hardware incompatibility issue or is the Emulator just not implemented with the attribute settings set by Skobbler? Alternatively does anyone know of a working emulator for this SDK?
Any help is much appreciated. Thanks
Andy
You can find a working configuration at http://developer.skobbler.com/getting-started/android#sec031 (I've tested with device = Nexus 5 and API level 20).
Unfortunately, due to the fact that the SDK relies heavily on OpenGL most emulators will exhibit weird behaviours - leaving only real devices as good testing options (the emulator's documentation also states that OpenGL support is "tricky": "OpenGLĀ® Graphics - Emulation of OpenGL ES graphics may not perform at the same level as an actual device")

Best Android Emulator settings?

I'm on Windows 7 with i7 processor and I'm trying to use Android SDK Emulator. However, when I set pixel density to 320 and turn GPU emulation on it starts to lag and freeze and its browser is almost not usable (it's like 1 frame or less per second).
So far with the below settings it's much, much better and I would qualify it as 5 to 10FPS which is usable but it's not 30FPS (smooth usage).
Abstracted LCD Density - 120
GPU Emulation - NO
Keyboard Support - YES
Can anything else be done to make it work smooth except moving to Linux? I noticed that GPU emulation impacted the performance the most.
The most important setting is your architecture, make sure you are using an Intel emulator. The speedup is tremendous!
A how-to is posted here: https://stackoverflow.com/a/10772162/1741111
If you are trying to achieve that 30FPS mark, forget Android emulator and switch to Genymotion.
I was working on Android emulators for 6 or more months before i discovered Genymotion emulator and what difference that has made to the speed of development.
If you are still developing on Android emulator - go and give Genymotion a try. You will thank me for that. Its a huge difference.
There is a free version for individual developers.
Even though this is an old post. I think this needs a mention here.
You don't need to buy a phone. The emulator is a great tool, however very slow. You can enable hardware acceleration to make it run smoothly. Follow the steps on the developers page and you'll notice a remarkable difference in the speed. AFAIK the settings you mentioned do no have that great influence on the speed.
I have wrote a short blog post on speeding up the emulator and adding Google map support:
the first part will be relevant to you. try the Hardware acceleration and tell us what you think:
here is the post:
Speeding Up the Emulator
The best emulator is to buy a simple Android Smartphone and debug/run your apps on this device. I'm doing this and it works wonderfully with no laggs

Android emulator is based on QEMU. Can I use KVM with it?

My laptop supports hardware virtualization (AMD SVM) and I know that:
QEMU can make use of hardware virtualization through KVM;
The Android emulator is very much based on QEMU
Natural question follows: can I combine the two (Android+KVM) to get improved performance in the emulator?
Yes, you can. Just download the appropriate Intel atom CPU packages in the Android SDK and have your AVD use an Intel atom CPU architecture. The android emulator can even use the host gpu. Here is a link on how to do it:
http://developer.android.com/tools/devices/emulator.html#acceleration
You can run Android-x86 in QEMU with KVM (or even in VirtualBox). I'm not sure how easy it would be to set up for development but it should run quite a bit faster. Also, Intel are working on getting Android on their x86 chips so this will hopefully become easier in the future.
Update: I managed to get it working in VirtualBox, except some sites crash the web browser. Since I was making a web app, this was not helpful. It was much faster than the standard Android emulator though,
You can try to use AndroidVM - http://androvm.org/blog/ ... In my testing you can have Hardware OpenGL and Rotation Support as well (this is slightly convoluted but everything is explained on the AndroidVM page).
In my experience this is miles better than the Android SDK Emulator, at least on Windows and Mac.
For Linux, you should be able to use VirtualBox for Linux to use AndroidVM. Since it is an OVA file mainly, you should be able to use other Virtualisation clients as needed.
What's interesting is that this is NOT emulating ARM, it is Android on x86... which has pros and cons, but definitely helps in not having to buy a ton of devices if you can do initial testing of various sorts on virtual machines, since Android 4.1 is generally not too heavily modified by manufacturers across ARM and x86 phones and tablets, etc (IMO).
Not closely related to the answer you are after, but
use Run when you work on your interface, or as much as possible while coding (it's a lot faster compared to Debug, even 10 times faster)
try to minimize the Debug runs, learn to code perfect, so use less Debug.
probably you already know, you don't need to close the Emulator for each run session, so keep it open.
restart Eclipse after hour of usage, but keep the Emulator open. It's faster to restart Eclipse than the Emulator.
set Eclipse to remember the last run project, so the launch is done via just one click
Google TV emulator which is targeted at x86 supports KVM mode virtualization.
ARM is not there yet. I believe it's currently work-in-progress.

Categories

Resources