János
János

Reputation: 35090

adb: error: remote object '/data/data/com.me.myproject' does not exist

1. Added adb path to ~/.bash_profile

export PATH="/Users/myname/Library/Android/sdk/platform-tools:$PATH"

2. Logged in to emulator

adb -s emulator-5554 shell

3. changed permission of the app folder and parent folder

chmod 777 /data/data/com.me.myproject
chmod 777 /data/data

4. Still can not get stuff from outside. Why?

adb -s emulator-5554 pull /data/data/com.me.myproject

Upvotes: 19

Views: 36272

Answers (5)

user19150515
user19150515

Reputation: 1

  1. connect mobile to laptop then open adb console a). cp msg-store.db /mnt/sdcard/ ==>inside /data/data/packagename/databases/ b). adb pull /mnt/sdcard/msg-store.db/ ===>This will stored in local computer.

Upvotes: 0

Meryan
Meryan

Reputation: 1483

prefixing the remote path with ./ or removing the leading / makes the whole difference for me ??? I guess because the system folder must be relative to root's home?

Darn it, those stupid Linux folks wasted my time again. I admit my whole life is about relative paths but this one got me good. Make sure you use \ for your target file, stupid Bill G. also decided to go backwards with his slashes and that created a whole mess. :)

PS. What's even weirder both files in my examples were pulled (copied) to the BASH shell current folder NOT c:\ That's stupid or what :)

FAILS
adb -s 192.168.1.120:5555 pull /system/media/bootanimation.zip c:\boot1.zip
SUCCEEDS
adb -s 192.168.1.120:5555 pull ./system/media/bootanimation.zip c:\boot1.zip
SUCCEEDS
adb -s 192.168.1.120:5555 pull system/media/bootanimation.zip c:\boot1.zip

enter image description here

enter image description here

Upvotes: -1

Ender
Ender

Reputation: 845

The reason is the file you wanted to copy needs root permission. It's better to copy the file to /mnt/sdcard/ where you have a right to interact with.

  1. cp <file> /mnt/sdcard/
  2. adb pull /mnt/sdcard/<file>

Upvotes: 2

oscarthecat
oscarthecat

Reputation: 1841

I had the same problem and I did this:

  1. adb shell
  2. run-as com.yourPackageName (not rooted device)
  3. cp 'database/file_you_want.db' '/sdcard/file_you_want.db'
  4. exit
  5. exit (now you will be back to main terminal window)
  6. adb pull /sdcard/xx.db

Upvotes: 27

NaturalBornCamper
NaturalBornCamper

Reputation: 3876

That's because your debugging Android device is not rooted.

If you have a physical rooted device or have an emulated device, try executing this before, to restart ADB in root mode. Then any command should work:

adb root

Upvotes: 17

Related Questions