Android Emulator ultra slow on Linux - android

Yet another "slow emulator!" thread, but not quite. Ussualy people are complaining about boot time - for me it doesn't matter and I have snapshot option enabled. The problem with my emulator is that GUI is very unresponsive - by that I mean I have to wait around 3-4 seconds for emulator to register my click on a button for example. Since I don't have a physical device I am forced to work with this emulator.
The device I am emulating is Galaxy Tab 2 10.1, which means WXGA800 and large resolution (800x1280). I've set the device RAM size to 1024.
I am running Linux - if it makes any difference (because of crappy Graphics driver).
So what can I do to make it a bit more responsive? I can live with up to 1sec delay but not more.

I don't know any good solution for your problem but you can try to use Android on Virtualbox. Here you have site with .iso files:
http://www.android-x86.org/download

You can try the new x86 Emulators from Google.
http://android-developers.blogspot.de/2012/04/faster-emulator-with-better-hardware.html

Another option is to emulate devices using a Virtual Machine. I did a detailed tutorial (step by step) based in other tutorials:
http://edwindh.blogspot.com/2014/07/emular-uma-tablet-ou-smartphone-com.html

Related

How to decrease Eclipse AVD Load Time?

I am working on an android application, uing eclipse IDE. However it takes around 10-15 minutes to load my AVD and run the application.
My system Configuration:
RAM 8GB
intel Core2Duo Processor 2.53GHz.
OS: windows 7
Is their any alternative to increase our AVD's speed, without changing my systems hardware configurations.
You can setup an Android Virtual Machine using VirtualBox :
http://www.howtogeek.com/164570/how-to-install-android-in-virtualbox/
And to deploy to the virtual box :
android emulation on virtual box in eclipse
I tried this a while back and it was quite a performance improvement difference. I haven't done this in a while because I bought a pretty high end phone and I just use that now.
Is their any alternative to increase our AVD's speed
Using the x86 emulator will help.
That being said, your computer would appear to have issues. With that configuration, even the ARM emulator should take at most a minute or two, at least on Linux. Windows 7 perhaps adds some more overhead, but I would not expect it to be that much.
Also, bear in mind that you can usually keep your emulator open all day -- you do not have to exit and restart the emulator for most work.
GenyMotion have an Android Emulator that is pretty rapid. (not an AVD)
http://www.genymotion.com/
Genymotion is an emulator using x86 architecture virtualization,
making it much more efficient!
Taking advantage of OpenGL hardware acceleration, it allows you to
test your applications with amazing 3D performance.
It's free for personal use, has preconfigured devices (like N7 or Samsung GS3 etc).
I think you'll really like it.
You can select the snapshot options. On the first next start, a snapshot will be created. This will improve the launch speed of the emulator every other start...

Low FPS on Android emulator

First of all, you need to know that I have a very powerful computer so that's not the problem.
I tried making a black screen without anything on it but an FPS counter, with OpenGL and Canvas, but the app doesn't go over 10-11 FPS.
I am just lost, I don't know what the problem is, I checked and it's not the render or the update function...
thanks for the help.
I am on windows 7 64 bit BTW.
8 years later and i have the answer.
open the AVD manager, scroll down to emulated performance, change it from "Automatic" to "Hardware - GLES 2.0", if still not performing show the advanced settings and set it to "Cold boot" this changed it from like 8-12 fps to a solid 30 fps non stop.
I'm more inclined to say that it is a fault of the Emulator than your system. It is extremely slow for me as well, even doing general app debugging. Not surprised on your frame rate. The Intel x86 Image might make a difference, but I usually don't see much improvement even with that.
You can create x86 virtual machine.
See
Android-x86 - Porting Android to x86
ISO image
I've found that I get better performance out of the Emulator when I set the processor afinity to all through Windows Task Manager
Here are some tips which can speed up the emulator significantly :
Give 1GB of RAM (or even more) to your AVD. Don't try to emulate the amount of RAM of a real device, it is generally useless and can amazingly slow down the emulator.
Emulate Android 2.3.3, which boots and runs faster on the emulator than the previous and next versions (by the way, never emulate Android 2.1 or 2.2 if you use SQLite databases. The SQLite implementation was very slow even on real devices).
Don't use high screen resolutions and densities unless for final testing. Use the smallest resolution available and set the LCD density to something low (in the mdpi range).
Well, this might not be an alternative for everyone but for me it's perfect! Use the Bluestacks Player. it runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running
adb connect 127.0.0.1
(Its always the same IP adress)

Android SDK running slow

I have installed Android SDK on my computer. I have a intel i7-2600 processor and a Zotaxc 460 gtx fermi and 12 gb of ram. Basically saying, it shouldn't be running slow. Any suggestions on how to speed up the apis? or is it just slow?
Assuming you are referring to the Emulator and not Eclipse or something, you can speed up the Emulator a bit by choosing a smaller screen size for the virtual device, like HVGA instead of WVGA, etc. But that only goes so far. The emulator is just not very fast right now. They are working on it, however. I believe they show some of their early work in this Google I/O session.
If you mean the AVD (the android device emulator) is running slowly, then it is behaving as expected. Perhaps you have an android device you can plug in and run your app on? I would recommend you download developer drivers for whatever device your using instead of the bloated ones they try to get you to download.
Good luck.
Here is some usefull question that is about speed of android emulator:
Why is the Android emulator so slow? How can we speed up the Android emulator?
Eclipse performance can by improved by setting eclipse.ini. For example I have set -Xms512m
-Xmx2048m. Without this options, Eclipse has too few memory to open my project.
Disable the boot animation with -no-boot-anim, "Disabling the boot animation can speed the startup time for the emulator."

Is there any way to reduce the boot up time of Android Emulator provided with android SDK

On my system, i am using eclipse ganymede version along the Android SDK and ADT plugin installed. I have created an android AVD (target android 1.5) with 512MB of memory. Its quite frustrating to see the slow boot up of it. It takes around 4-5 mins to complete its boot-up. Is there any way or tweak to speed up this boot up process.
PC config:
P4 2.4 Ghz with 1 GB ram.
You can use the -no-boot-anim command line option which speeds up the boot process by not showing the boot animation while the emulator starts up. It makes an noticeable difference on my system reducing start up time from around 55 seconds to nearer 45 seconds. (In case you're interested this is on a laptop with a Mobile Core 2 Duo L9400 and 3GB of RAM.)
Use a command line like this to start the emulator:
emulator -no-boot-anim #YourAvdName
where YourAvdName is the name of the Android Virtual Device (AVD) image that you want to start.
There is now way of to speed up the boot process. This is the downside of having a real emulator not just a simulator like the Iphone kit offers.
You don't have to quit the emulator after a test run. Just start the emulator at the beginning of your work and close it after you are finished. If you want to test something very quick I often find it easier to just connect my actual device and run my app on the real device, without waiting for the emulator to start up.
There's no real way to cut the time down significantly, and it performs so poorly as a tablet device, it's barely usable. Bottom line, you need a real device to produce production apps. It's good for learning though.
The "emulator" is widely known for being a simulator. It does not:
come with device roms or known emulation for real world devices
off phone or SMS support
have the ability to open listening sockets for incoming requests
etc etc. It is not an emulator like mame. It's a simulator like the iPhone/iPad simulator.
i started off with the default settings on the AVD manager to create a new AVD and it started up kind of ok, about 1-2 mins. later i deleted that and created a new AVD with 8GB internal memory (like the real device i'm using) and startup didn't! i waited 30 mins but still nothing
so i reverted to the default memory (512MB) and it seems to start ok
but i also noticed, its a bad idea to unclick the hardware buttons options, that causes it to load slow too
install virtualbox and use androVM
much better than the emulator
The option that I select so far is to buy a cheap mobile from Kogan.com and use this is your app tester.
Otherwise you can also go and install Genymotion, which is definitely a ++ tool over AVD through Android Studio.
It is fast as well. However, keep in mind that there are many features that will be missing such as google play services. Thus, it is advisable that you buy a device. With Android supported mobile, you could basically do everything and simulate every events such as swipe shake etc...

Can I tweak my android emulator to make it fast?

I am using the android emulator to run my programs.
But its really slow.
It takes around 90 seconds to startup and show the home screen.
Can I tweak it so that I can reduce this time considerably?
Thanks
I was having a similar problem (thread here). However, mine was taking 10-15 mins. 90 seconds is blazing fast considering a lot of threads in the Android discussion groups. The emulator is slow by nature and the only recommendation I read was to keep the emulator open instead of closing it and rerunning it. However, as mentioned in my thread, if you have a physical Android device, you can just run it on that. It's what I'm doing at the moment and it was top-notch advice. No long waiting time. If you don't have a physical device, then I can only suggest you don't close the emulator between code changes, as the system will recognise the change.
use those 3 options.
emulator --cpu-delay 0 --no-boot-anim --cache ./cache --avd avd_name
the first two are obvious. the third one will make the memory of the emulator kind of persistent. you can point it to any file that does not get destroyed by boot (such happens with /tmp) it's like a always-on hibernating device.
If you absolutely cannot use a physical Android device, what you can do is run the Android OS on Virtualbox, and then get the IP address of the emulated Android. Then you'd connect ADB to the emulator using that IP address. That's the jist of it. I've written a more detailed guide to this approach on my blog. http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/
The -no-boot-anim parameter is good.
Don't turn the emulator off, just re-launch your app.
For further speedups, try the new snapshot feature, which is described here.
Scaling the emulator down made my emulator load faster...
emulator -cpu-delay 0 -no-boot-anim -cache ./cache -scale 0.8 -avd avd_name
actually these are all great answers, but have u thought of changing the ram from the default 96mb to something like 512? works for me :)
If you have the mobile device with you, it's much quicker (and more reliable) to compile it via USB to the device. It takes around 5 seconds to compile and install on your phone, I never use the emulator anymore - it's just to slow.
Not only is it slow but anything other than static widgets (animation) will struggle to run on the emulator and you will notice lag.
I recommend you to use Genymotion . It's a very fast emulator (less than 10 seconds to run in my case)
It has Google Apps installed also including Google Play App which give the chance to download any app. This is a good feature for testing apps with Maps Api.
You need to install Intel HAXM
open you SDK and install
Create a new AVD
Now when run it you should get this
if not then you will need to install Accelerated Execution Manager
See this Running the new Intel emulator for Android on how can you do this
see how much faster do you get Video
While developing my game, Elastic World, I was suffering from the same problem. After waiting minutes for the emulator to startup, the game was running at 20 FPS maximum. Even on low end android devices I could easily get 60 FPS.
So I moved to a VMWare Android machine, following the instructions from this site: http://www.android-x86.org/documents/installhowto/
The same game loop now runs at 250 FPS. (it's not playable at this speed and I have the game limited to max 60 FPS, but overriding this limitation it gives 250 FPS)
Try to use a smaller resolution for your emulator as for example HVGA. The emulator gets slower the more pixels its needs to render as it is using software rendering.
Also if you have sufficient memory on your computer, add at least 1 GB of memory to your emulator. This is the value "Device ram size" during the creation of the AVD.
Also set the flag "Enabled" for Snapshots. This will save the state of the emulator and let it start much faster.
Just enable "Snapshot" checkbox in your AVD Manager. It will save the state of your AVD when you close it. So, once you run the emulator again, that saved state will be loaded. Hence the boot up time of your AVD will be considerably reduced.
First I follow this introduction
Run emulation with command : emulator -cpu-delay 0 -no-boot-anim -cache ./cache -avd <adv-name> -gpu on (follow link and link)
results is run ~2-3x faster

Categories

Resources