从手机中获取文件:
解决adb pull远程权限
在使用adb pull时提示:
$ adb pull /data/tombstones/tombstone_09 /temp
adb: error: failed to copy '/data/tombstones/tombstone_09' to '/temp/tombstone_09': remote Permission denied
方法一:
$ adb shell //进入手机的shell
shell@hwChe2:/data/tombstones $ su
root@hwChe2:/data/tombstones # chmod -R 777 /data/tombstones //添加权限
root@hwChe2:/data/tombstones # exit //退出手机shell
$ adb pull /data/tombstones/tombstone_09 /temp
方法二:
先用 cp sourceDir targetDir 命令将cache下的文件复制到sdcard里,然后再用adb pull命令复制到电脑上或上传到网盘
方法三:命令run-as <package> command 访问自己应用程序包下目录的数据
$ adb exec-out run-as com.yourcompany.app ls -R /data/data/com.yourcompany.app/
网友评论