Attempting to pull a single file using
adb pull /data/data/com.corp.appName/files/myFile.txt myFile.txt
fails with
failed
Similar to Tamas's answer, here is a one-liner for Mac OS X to fetch all of the files for app with your.app.id
from your device and save them to (in this case) ~/Desktop/your.app.id
:
(
id=your.app.id &&
dest=~/Desktop &&
adb shell "run-as $id cp -r /data/data/$id /sdcard" &&
adb -d pull "/sdcard/$id" "$dest" &&
if [ -n "$id" ]; then adb shell "rm -rf /sdcard/$id"; fi
)
-d
to pull from emulator