adb: error: remote object 'xxx' does not exist

created at 08-16-2021 views: 72

Problem Description

Use adb pull to pull files, and the pull fails. Note: The specific package name and path name are not used in the demonstration here. Note: The specific package name and path name are not used in the demonstration here. Note: The specific package name and path name are not used in the demonstration here. Package name and path name

  • package: com.test
  • path: databases/test.db
> adb pull /data/data/com.test/databases/test.db .
adb: error: remote object '/data/data/com.test/databases/test.db' does not exist

Solution

Use adb to create a folder in the /sdcard directory, copy the files that need to be pulled down to this folder, and use the adb pull command to pull the files

Specific operation

# Enter adb shell
adb shell

# Switch to root user
angler:/ $ su
angler:/ # whoami
root

# Create a test file in the sdcard directory for transferring files
angler:/ # mkdir /sdcard/test

# Copy the required files to the transfer file directory test
angler:/ # cp /data/data/com.test/databases/*.db /sdcard/test/

# check the file
angler:/ # ls -l /sdcard/test/
total 280
-rw-rw---- 1 root sdcard_rw 1024 2021-08-11 16:03 1.db
-rw-rw---- 1 root sdcard_rw 23552 2021-08-11 16:03 2.db
-rw-rw---- 1 root sdcard_rw 20480 2021-08-11 16:03 3.db
-rw-rw---- 1 root sdcard_rw 20480 2021-08-11 16:03 4.db
-rw-rw---- 1 root sdcard_rw 24576 2021-08-11 16:03 5.db
-rw-rw---- 1 root sdcard_rw 24576 2021-08-11 16:03 6.db
-rw-rw---- 1 root sdcard_rw 24576 2021-08-11 16:03 7.db

# Exit adb shell
angler:/ # exit
angler:/ $ exit

# Pull files to local
adb pull /sdcard/test.
/sdcard/test/: 7 files pulled, 0 skipped. 1.1 MB/s (139264 bytes in 0.125s)

Check the test file in the current directory, the file has been pulled successfully.

created at:08-16-2021
edited at: 08-16-2021: