Slow uploads to running Android emulator

19,763

Solution 1

As others have posted, just clicking around in the emulator while uploading drastically improves the upload speed. I had the same problem and Googled for an answer, and trying out this trick helped me. I'm running a 2.3.3 AVD.

Solution 2

My new discovery is a small "hack" how you can make your upload faster. I realized that the cases when the upload was faster were caused by my interaction. So when I upload new app without active working with emulator, it is slow. But when I work with it (testing my application, exiting, opening applications list, etc.), the upload is MUCH faster - in my case approx. 15seconds instead nearly 2 minutes.

So I think, that the problem is somehow in performance settings of the emulator. When I do nothing, it thinks no big performance is needed, emulator is switched to some economic state, so also my upload is slow.

Solution 3

A better solution:

Go to Run -> Run Configurations... -> Target Tab -> Additional Emulator Command Line Options. Add there:

-netspeed full -netdelay none

Now close the emulator and run it again.

After doing this the time for uploading went from 2 minutes to 8 seconds.


Edit: I have also found that quitting Skype makes my emulator upload much faster.

Solution 4

Play with the emulator while uploading your application. I totally agree with teepee. It reduced my waiting time from 4 minutes to 30 secs.

Solution 5

I have the same problem, I'm developing an android application which is like 4,6MB and it takes me like maybe 50-60 seconds to upload it on emulator and run it.I don't think this is a problem with the communication. The JVM is slow, that's why you need a time to upload your apk and run it.I don't think you can do anything about it, except you start testing your application on a device.

Share:
19,763
jfielding
Author by

jfielding

Updated on June 06, 2022

Comments

  • jfielding
    jfielding almost 2 years

    I have searched but not found any queries or answers for my specific circumstance. I have a fast new machine with plenty of memory running Windows 7. I'm using the latest Eclipse and Android SDK.

    When I run an app the emulator takes about 45 seconds to start (blazingly fast for the emulator!) from run initiation to running my app.

    If I then change the app and re-run it on the still-running emulator, the time increases to 70+ seconds! As opposed to all other complaints people have, in my case restarting the emulator is faster than using the existing instance. I don't like that.

    Here are the times:

    2011-09-29 13:07:13 - hello Uploading hello.apk onto device 'emulator-5554'
    2011-09-29 13:07:18 - hello Installing hello.apk...
    2011-09-29 13:07:37 - hello Success!
    

    on rerunning after changing the app to get it to reload:

    2011-09-29 13:08:18 - hello Uploading hello.apk onto device 'emulator-5554'
    2011-09-29 13:09:16 - hello Installing hello.apk...
    2011-09-29 13:09:24 - hello Success!
    

    As you can see, the upload to the emulator takes a mere 5 seconds when the emulator is freshly started. It takes nearly a minute with a running emulator! This is the cause of the extended re-running time. This doesn't change even when I uninstall the app on the emulator before re-running it.

    Any ideas on what I could try to solve this? It appears to be some kind of communication problem, possibly with adb.

  • jfielding
    jfielding over 12 years
    Do you find you get faster response on the initial emulator start? My application, I forgot to add, is of the "hello world" type - so not very large!
  • Android-Droid
    Android-Droid over 12 years
    I didn't try,but I think it's faster because emulator initialization and uploading your application are done at the same time.That's why it's a little faster.
  • jfielding
    jfielding over 12 years
    I don't think that is how it works. The emulator has to finish initialising before an apk can be uploaded and installed - just as if you were booting a real device; nothing happens until Android is running.
  • peter.bartos
    peter.bartos over 12 years
    I have the same problem with slow upload to android 3.0 emulator. Interesting is that sometimes I have luck with uploading app in 15 seconds also to running emulator. But most of the time, it takes something more than 1 minute. Strange behaviour...
  • Android-Droid
    Android-Droid over 12 years
    Android emulator is still too buggy. Especially if you create with the new version 4.0. Mine get closed too often and still slow. My application is 1,3MB and I'm waiting like 30 seconds to upload it. That's why I'm using it only when I want to be sure that my databases are ok and see what I insert into them.
  • peter.bartos
    peter.bartos over 12 years
    It's a pity that it uploads so slowly. My computer uses just 3% of performance while uploading. So I think it is not caused by the emulation of different architecture. Must be some bug...
  • Android-Droid
    Android-Droid over 12 years
    That's why I just prefer to test my applications on device. Another strange thing which I fount it is that in some cases my application is crashing in emulator, but when I upload it on device there is no problem with it. It's really strange...
  • conny
    conny almost 11 years
    that's cuh-rayzee. will try it next time :-D
  • pocorall
    pocorall over 10 years
    Is there any automated method to speed up?
  • xverges
    xverges over 9 years
    In case you have a hard time finding the netry field (I had!), look for the scroll bar
  • Uriel Frankel
    Uriel Frankel about 9 years
    BTW: I am running an Android with api 18, with 8000 Mb internal ram and 2000 Mb sdcard
  • Uriel Frankel
    Uriel Frankel over 8 years
    With python on Mac or Linux it is very simple -> go to app/build/outputs/apk folder, and there type sudo python -m SimpleHTTPServer