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

流过昼夜 提交于 2019-12-03 11:11:45
oscarthecat

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

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

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