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

人走茶凉 提交于 2019-12-21 03:42:16

问题


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

回答1:


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



回答2:


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



回答3:


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>


来源:https://stackoverflow.com/questions/40488317/adb-error-remote-object-data-data-com-me-myproject-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!