用代码复制Android虚拟机里的文件遇到system/bin/sh: adb: not found&system/bin/sh: pull: not found

用代码复制Android虚拟机里的文件遇到system/bin/sh: adb: not found&system/bin/sh: pull: not found

不想看我啰嗦请直接滑到横线那里,以上是我错误的尝试。
昨天利用Android虚拟机的GestureBuilder创建了一个手势文件gestures。然后打开DDMS后发现File Explorer中竟然没有任何东西!
这里写图片描述
尝试了多个方法未果,决定使用adb指令来复制;代码如下:

M:\Android\TheFirstLineCode\GestureDetectorTest>adb shell
adb server is out of date.  killing...
* daemon started successfully *
generic_x86_64:/ $ adb pull mnt/sdcard/gestures B:\
adb pull mnt/sdcard/gestures B:\
>
/system/bin/sh: adb: not found

报出这个/system/bin/sh: adb: not found
我了个c,这是什么鬼,于是开始百度说什么要权限设么的然后尝试:

generic_x86_64:/ $ chmod 777/data
chmod 777/data
usage: chmod [-R] MODE FILE...

Change mode of listed file[s] (recursively with -R).

MODE can be (comma-separated) stanzas: [ugoa][+-=][rwxstXugo]

Stanzas are applied in order: For each category (u = user,
g = group, o = other, a = all three, if none specified default is a),
set (+), clear (-), or copy (=), r = read, w = write, x = execute.
s = u+s = suid, g+s = sgid, o+s = sticky. (+t is an alias for o+s).
suid/sgid: execute as the user/group who owns the file.
sticky: can't delete files you don't own out of this directory
X = x for directories or if any category already has x set.

Or MODE can be an octal value up to 7777        ug uuugggooo    top +
bit 1 = o+x, bit 1<<8 = u+w, 1<<11 = g+1        sstrwxrwxrwx    bottom

Examples:
chmod u+w file - allow owner of "file" to write to it.
chmod 744 file - user can read/write/execute, everyone else read only

chmod: Need 2 arguments

结果又出来一大堆提示(好像更新了,使用chomd u+w file 才是获取读和写的);
然后继续百度:
有人说用adb shell进入Linux模式后就不需要在加adb了,那就再试一下:

127|generic_x86_64:/ $ pull /mnt/sdcard/gestures D://
pull /mnt/sdcard/gestures D://
/system/bin/sh: pull: not found

结果又出来/system/bin/sh: pull: not found
无语了,放弃百度尝试谷歌


点开第一条就发现了这个哥们遇到了和我一样的情况:
这里写图片描述
继续往下翻发现有人说是不能在adb shell下使用adb pull:
这里写图片描述
继续尝试(需要注意,在使用adb pull 的时候记得退出adb shell下):

M:\Android\TheFirstLineCode\GestureDetectorTest>adb pull /mnt/sdcard/gestures M://
adb server is out of date.  killing...
* daemon started successfully *
8 KB/s (488 bytes in 0.056s)

终于见到了梦寐以求的successfully了。
(先让我笑一会儿)哈哈哈哈。
本人功力尚浅,废话太多,找不到重点,还请包含。可能还有错误,请大家指出,谢谢,希望对同样遇到此问题的小伙伴有所帮助!
我是:今天周一呢。

  • 17
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 10
    评论
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值