试图用拉一个文件
adb pull /data/data/com.corp.appName/files/myFile.txt myFile.txt
失败,
failed to copy '/data/data/com.corp.appName/files/myFile.txt myFile.txt' to 'myFile.txt': Permission denied
尽管USB调试在设备上启用。
despite that USB debugging is enabled on the device.
我们可以去解决这个问题,通过古老的路线
We can go around the problem through the archaic route
adb shell
run-as com.corp.appName
cat files/myFile.txt > myFile.txt
但这是笨重的多个文件。
but this is unwieldy for more than one file.
我怎么能拉目录/data/data/com.corp.appName/files到我的MacBook?
How can I pull the directory /data/data/com.corp.appName/files to my MacBook?
直接或通过在'过境这样做要么/存储/ sdcard0 / MYDIR(从那里我可以继续使用Android的文件传输)的罚款。
Doing this either directly or through a transit in `/storage/sdcard0/myDir (from where I can continue with Android File Transfer) is fine.
其他评论
这可能是因为刚刚运行
adb backup -f myFiles com.corp.appName
会产生我要找的文件。在这种情况下,我正在寻找一种方式来解压/解压缩,生成的备份!
will generate the files I am looking for. In that case I am looking for a way to untar/unzip the resulting backup!
ADB备份会写一个Android特有的档案:
adb backup will write an Android-specific archive:
adb backup -f myAndroidBackup.ab com.corp.appName
这存档可以使用转换成tar格式:
This archive can be converted to tar format using:
dd if=myAndroidBackup.ab bs=1 skip=24|openssl zlib -d > myAndroidBackup.tar
参考:
http://nelenkov.blogspot.ca/2012/06/unpacking-android-backups.html
搜索,在该链接更新。
上一篇:如何使用静态Boost库为Android链接?如何使用、静态、链接、Boost
下一篇:优化使用BitmapFactory.Options.inSampleSize的速度速度、BitmapFactory、Options、inSampleSize