Android Emulator: Failed to pull selection

2019-01-22 00:58发布

问题:

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?

回答1:

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.



回答2:

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



回答3:

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).



回答4:

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

Here more info.



回答5:

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)



回答6:

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



回答7:

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...



回答8:

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