I'm trying to program a game for android phones. Anyway I have to check any of my minor changes on my code. But I have only 5MB of file and only using SurfaceView to draw not even GLSurfaceView(So I think because of I'm not using OpenGL:3D stuff and just drawing bitmaps it should be faster. I'm not sure because it wasn't fast in C/BorlandC 8D) and android emulator is that much slow It kills me of waiting. I tried to not use all of my bitmaps so it can upload and install faster. But how about FPS ????? I get 5-10 fps which I need 20 for my game. plus some times I can't get all the bitmap that should be drawn by emulator(Example: If I have 10 fps in 5 of that I can't see half of my bitmaps...) I can't check what's going on in my game! So if there is a better way please tell me. I read some peoples are using their android phone as emulator is that really faster? If so I'll get one. Some other says using windows XP is the best way, is there no FPS problem with it? In that case I have to use virtual machine. Thank you for any reply!
There is a fairly easy option. You can use VirtualBox to run a virtual machine and then install androidx86 (http://www.android-x86.org/) as an operating system. I have tried it myself and the performance is almost perfect.
There is a complete guide here http://androidspin.com/2011/01/24/howto-install-android-x86-2-2-in-virtualbox/
EDIT - once the VM is up and running, you will also need to connect to the VM. Press Alt-F1 and type netcfg to get the VM IP (should be 10.0 something). Then on your host machine cd to the android tools directory and type ./adb connect <VM IP>:5555
I have noticed that there is a software named "Bluestacks" it's even supports OpenGL ES and you get all the FPS you want. So it's perfect match for android developers. Of course it's free too:this is the web site you can download happy coding...
Related
Whenever I am trying to launch my emulator it launches but only the android logo is shown ,after waiting for many hrs also it does not work.
Device-3.2"QVGA(ADP2)320*480 (mdpi)
API Level-17
It's well known that the factory emulator is extremly slow. The trick here is that the factory emulator needs to run on an ARM machine, so it needs to convert the ARM calls to your your x86 (or 64 bits) processor calls. It's likely to never run fast at all. In this situation, you may want to trust on the factory x86 images that make use of Intel's HAXM drivers, not available to everyone, and I couldn't manage to make it work myself, but it's useful to know that.
However! Since a while ago, I started using Genymotion's emulators. They rely on an actual virtual machine, which is way way faster than anything a factory emulator could achieve. Even if I'm running it on the lowest Mac Mini out there, it's pretty smooth. I'd personally give it a try (well, precisely, I gave a try)
https://www.genymotion.com/
Try allocating more memory for it to use. The Android Emulator is super slow as it is, but if you are not giving it enough memory it has the ability to never load.
Google emulator uses ARM opcode, a kind of machine language. It must convert from ARM opcode to Intel opcode. That's why it's slow. The problem seems not to be RAM but CPU. Improving CPU will improve the emulator.
References to solve this issue:
Making the Android emulator run faster
If you are using your emulator in windows than you can use Microsoft Andriod Emulator.
Install microsoft android emulator in your windows os
If it is taking too much time in loading make sure you have installed the "HAXM installer" in SDK tools , Also make sure "Hyper V" option is also unchecked in "Turn Windows features on or off" in Control Panel --> Program and features.
Only After unchecking this feature you can install the HAXM installer.
After doing this the Emulator will not take time to load.
Try creating the Android virtual device with more RAM than usual. The usual is 1 GB. Even though I tried this on another lower end PC, it was still slow. I think it can be a problem with your hardware. Lower end hardware tends to have problems running emulators.
The problem seems not to be RAM but CPU. Improving CPU will improve the emulator.
I'm beginner on Android applications. I followed the steps in tutorial and prepared development environment on Vista (Eclipse Helios + Android SDK 12 + JDK6).
I created a minimal AVD with 32mb SD card and 128mb ram, enable snapshot.
and set current AVD in run configurations of application as automatically.
Emulator is extremely slow and CPU usage 100% shared by eclipse and emulator,
memory consume is also in limit.
Do you have any suggestion to optimize it? It's my first step in development android app, and i don't want to be discouraged.
Thanks a lot,
Semanur
You can use Bluestacks App player or Youwave For Android.
Those emulators are very much faster than eclipse emulators. You will find that they are most likely runnning your app on a real phone.
Emulators use significant resources but with a medium computer it should run ok.
Try creating a new emulator instance with default settings, HVGA and no snapshot and no sd card.
Use android 2.2 for this test.
This one should run pretty smoothly on a medium computer.
Let us know the results.
As everyone else has stated, the emulator is terrible for testing. I'd suggest debugging on a device, even if that means only being able to test one API and screen size.
Launching from a snapshot is also a way of cutting the loading time and resource load on the CPU. I found it to still take a considerate amount of time still, but it is less than half of what it took before.
you can download and install genymotion virtual device,, it is 3x faster then normal AVD
I keep wanting to use VitualBox for Mobile App Development, but I can't seem to get the emulator to run fast enough inside the already-emulated 32-bit machine.
Is there any way around this?
Now while it doesn't seem to me like there is an answer to this question, I figured I'd ask it anyway.
P.S. I have a 64-bit machine.
This should do the trick: 4 (or more) core CPU, plenty of ram (>4GB) and install the virtual operating system on a disk other than the one your main OS uses (e.g. firewire/esata external drive).
Another virtualization software might be faster too, but that I don't know.
You could use the x86 build of android in another virtual machine instead of the emulated arm of the current SDK one... (rumor is google is going to move in that direction anyway). Last I tried this, it booted/ran much faster than the arm emulator running on a physical machine, but the mouse emulation was painfully slow, maybe they've fixed that now.
(You have to set up adb over tcp manually or with your own script so that eclipse or whatever knows about this target)
I read on many other topics that the Android emulator starts really slow. Indeed, it takes +15 mins to start. However, on my machine is slow even after that.
The 'phone' responds with a 3-4 seconds delay and everything has a huge lag.
Is there any way to improve the performance of my laptop (Asus 1201N) is too rusty for the Android emulator?
PS: Tried in different emulator resolutions and the result is the same
Edit: My laptop has 2 cores with HyperThreading. And it shows as 4 CPU in Device Manager. However, when using the emulator, just one of the graphs is at 100%. Can I do something to make it work multi core?
Do you have "Disable Boot Animation" checked?
Also, if that doesn't fix it, one thing that helps is that you never actually have to close the emulator screen while you're coding. If you click debug when it's already open, your APK will get uploaded to the emulator and start pretty much immediately. For some reason it took me a while to figure out that I didn't have to manually close the emulator.
One thing I learned that helped me is that once the emulator is open from your first debug run you DO NOT have to close it. Leave it open, and on your next debug run it will be ready to go without any load up time like when you first open it.
In regards to your slowness after startup I suspect it's just your computer. It runs very fast for me. It starts up in about 20 seconds or less, and once it's open my subsequent debugs load very fast.
I hope at least my first tip helps to save some of your sanity.
Here's what you can try. It does speed up the emulator for me, especially during loading time.
I noticed the emulator is only using a single core of the available CPU. What I did is to set it to use all available processors.
I'm using Windows 7.
When the android emulator is starting, open up the Task Manager, look under the Process tab, look for "emulator-arm.exe" or "emulator-arm.exe *32" ...right click on it, select Processor Affinity and assign as much processor as you like to the emulator.
I think there is few ways to improve the performance of your Android Emulator like
Use Snapshot, this will improve the boot time for consecutive application running
Use x86 Intel Hardware Accelerator
Use 3rd Party Emulator like BlueStacks
Hopefully it will help you to improve the performance and resolve your problems.
Thanks
I had the same problem and in order to solve it I just disabled all the transition animation effects that are enabled under Spare Parts.
it is way too slow for me too.
(slow on both my Pentium 4 (ubuntu) and my dual core 64 laptop (Windows 7)
apparently it uses QEMU - could I perhaps look for the image file and try a different version of qemu?
Another thing I tried is this: http://www.android-x86.org/ (in vmware)
this seems MUCH faster but I can't get it to see the network!
(right now I just want to test some websites in the brower so seeing the network is a must - I'm not doing native apps just yet)
I discovered that instead of running the 'Debug' target, I just run the 'Run' target. The emulator runs a lot smoother when doing so. I only jump into debug mode if I really need it.
To connect to network from android-x86, you neek to manual setup ip manual by use this command in console mode (Alt + F1):
ifconfig eth0 netmask 255.255.255.0 up
after do that, you can check it by type : netcfg in console and you can see this ip is set at your local wmware
you can check it success by ping ip you had been set in command prompt, and after that, you can use adb connect to connect debugger to your virtual android
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