47

Android 2.2 emulator. When I'm trying to pull a file from DDMS-file explorer, it says:

[2012-02-08 02:52:52] Failed to pull selection
[2012-02-08 02:52:52] (null)

Why and what to do with it?

sashoalm
  • 75,001
  • 122
  • 434
  • 781
Leaphyme
  • 471
  • 1
  • 4
  • 5

8 Answers8

150

You might have forgotten to re-select the device in the left pane. For some reason, it needs to be refreshed and the previous selection is invalid.

nbrooks
  • 18,126
  • 5
  • 54
  • 66
George Nguyen
  • 2,169
  • 1
  • 16
  • 7
32

Restart Eclipse (Close and open it again). That would be sufficient.

Ravi
  • 487
  • 5
  • 6
  • @Ravi This works, but restarting Eclipse for every occurrence is **REALLY** getting annoying. Why is this happening? – Roy Hinkley Oct 14 '13 at 14:36
  • 1
    @AndroidAddict You can use command line to do a Pull. Follow this: http://www.dreamincode.net/forums/topic/186210-pushpull-from-emulator-in-eclipse/page__p__1091995entry1091995 (Make sure that android sdk tools folder is in your environment variable). This will make it less annoying :) – Ravi Oct 16 '13 at 06:11
  • @Ravi thanks for the link - appreciate it! Just an FYI, this is happening with a device, not an emulator. – Roy Hinkley Oct 16 '13 at 20:18
16

If you are using DDMS from Eclipse IDE this can happen if the device is not selected in the Devices window in the left pane of the DDMS view.

It seems the IDE can show you a menu of files in the right hand 'file explorer' window even if you have not selected a device. This can happen, for example, if you previously were using DDMS and then return to the view (possibly having restarted or disconnect the device - have not tested it in depth).

To solve this simply select the device in the left 'Devices' pane within DDMS - no need to restart Eclipse (Eclipse Juno).

Mick
  • 24,231
  • 1
  • 54
  • 120
2

Maybe you don't have the permission to access the db file. E.g. you're working on a real device or androidx86 (I had this problem with androidx86 running on Virtaul Box)

One solution worked for me (on windows):

  1. open cmd
  2. browse to your adb folder with cd command (".../sdk/platform-tools/")
  3. type in:
    1. adb shell
    2. su
    3. chmod 777 data/.../database.db (folder containing the database file on your android device)

now it should work (maybe you have to restart ecplise)

user2311533
  • 63
  • 1
  • 8
2

Try to reboot your computer. Sometimes the DDMS File Explorer doesn't respond.

Here more info.

Community
  • 1
  • 1
Pelanes
  • 3,451
  • 1
  • 34
  • 32
1

I have got the same error, then i certainly find that this error was due to the incorrect name of database,in my case

private static String DATABASE_NAME = "vpmsn.db ";

as you can see there is a space after vpmsn.db what actually was happening is that the database was being created successfully but as there is a space after the database name so when you try to pull the database the above error occured,hope this will help any one who is suffering from same error

Muhammad Babar
  • 8,084
  • 5
  • 39
  • 56
0

just open your command prompt and navigate it to ur abd file location(D:\Apps\android\4.0.3\platform-tools) just type in the command prompt as adb install filename.apk it works fine without getting any errors... you should have to do this with ur emulator running otherwise it fails...

Abhinai
  • 1,082
  • 2
  • 13
  • 20
0

First, grant permission to acces your data folder , with cmd to your C:\Users\pcjava\AppData\Local\Android\sdk\platform-tools\adb.exe

In cmd Type 'adb shell'
su
Press 'Allow' on device
chmod 777 /data /data/data /data/data/com.yourapplication.package /data/data/com.yourapplication.package/*

Second, grant permission to your database.db that you are trying to pull

adb shell
su
root@android:/ # chmod 777 /data/data/com.ht.mt.siiv/databases/nameOfMyDatabase
diego matos - keke
  • 2,099
  • 1
  • 20
  • 11