当前位置:   article > 正文

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

/system/bin/sh: pull: inaccessible or 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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

报出这个/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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25

结果又出来一大堆提示(好像更新了,使用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
  • 1
  • 2
  • 3

结果又出来/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)
  • 1
  • 2
  • 3
  • 4
  • 5

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/350159
推荐阅读
相关标签
  

闽ICP备14008679号