Problem Pushing Large File to Emulator/SDcard with Eclipse DDMS

10,861

Solution 1

Here is the way you fix it. I had a large file about 160M so what was happening it was most likely timing out. So to fix this I went to the Eclipse Windows -> Preferences -> Android -> DDMS then I set the ADB connection time out to 500000 and checked "Thread updates enabled" and checked Heap updates enabled". I was then able to push any file size up to the sdcard. I got the idea after reading this thread

Restart the IDE in some cases in mine I didn't need to.

enter image description here

Solution 2

I know the question is already answered and accepted - but I solved this problem a different way. Sometimes, I'm not quite sure "why" but the ADB needs to be reset.

When your emulator is running, do the following:

  1. Go to DDMS
  2. Go to Devices under DDMS
  3. Select your running emulator so that its highlighted.
  4. In the top right hand corner of your devices screen there's a little "down arrow". Click it
  5. Hit the reset ADB option and do not be alarmed by the force quit red text in console window.

You should now be able to push files onto the system fine, as long as your SD card is set to a size that can handle it.

Hope this helps someone!

Share:
10,861
JPM
Author by

JPM

Java Programmer for 6 years and seasoned Android developer, some C#, slightly new Windows Mobile developer. Member of the Bluetooth SIG Naming and Version Committee Musically inclined, play guitar and singer/songwriter, band investor among many other titles in the music biz. I am nerdier than 95% of all people. Are you a nerd? Click here to take the Nerd Test, get nerdy images and jokes, and talk on the nerd forum! http://www.nerdtests.com/images/ft/nq/a287f5ee0b.gif

Updated on June 04, 2022

Comments

  • JPM
    JPM almost 2 years

    I am using Eclipse DDMS to push a file over onto my Android Emulator sdcard. I select the file and press Open, a dialog pops up and starts pushing the file. In the view "File Explorer" in the DDMS perspective I can see the sdcard directory and can see my file created in it. Then in the popup the progress meter gets halfway then I get this error in the Console window:

    [2011-09-22 15:15:56] Failed to push the item(s).
    [2011-09-22 15:15:56] (null)
    

    Then the File Explorer completely refreshes and the file disappears. I know the sdcard is setup for 1G of space and the file I am pushing is only 9M.

    Here are images during push and after fail.

    Start of Push After failure Notification

    So what am I doing wrong or what do I need to do to fix this?

  • JPM
    JPM over 12 years
    Works with the ADB tool using command line but I want to get it to work with Eclipse as I hate command line. Whats the point of having it in Eclipse if it doesn't work? Tried the server kill and restart already too. So this is looking more like an Eclipse bug in the DDMS perspective.
  • NujnaH
    NujnaH over 12 years
    I think so. Try closing and opening eclipse I guess. It sounds silly but it tends to fix problems sometimes.
  • JPM
    JPM over 12 years
    Yeah restarted everything then even tried restart of computer. Looks like its an Eclipse bug...anything I try to push over 9M it has issues with and fails, but smaller like 1.5M it worked fine.
  • JPM
    JPM over 11 years
    Yeah sometimes the ADB gets in a wonky state and the only resort is to reset it.
  • Mahm00d
    Mahm00d about 11 years
    Thanks a lot! This answer also solved my problem with error in pushing any files into SD.
  • JPM
    JPM about 11 years
    Glad I could be of some help, Cheers!
  • Sreekanth Karumanaghat
    Sreekanth Karumanaghat almost 11 years
    This worked.Though it later on gave me a "Failed to push selection: Read-only file system" Though that totally is an unrelated problem.
  • Vahid Ghadiri
    Vahid Ghadiri almost 11 years
    After hours searching and scratching my head, my problem was solved by your solution. thank u
  • Sisay
    Sisay almost 10 years
    I just did this.It wasn't working at first but after i restarted my IDE(a plus), it then worked fine.Cheers!
  • JPM
    JPM over 9 years
    If file is large enough then the default timeout comes into play, no amount of restarting your IDE will fix this.