用代码复制Android虚拟机里的文件遇到system/bin/sh: adb: not found&system/bin/sh: pull: not found
2017-03-11 10:33
411 查看
用代码复制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了。
(先让我笑一会儿)哈哈哈哈。
本人功力尚浅,废话太多,找不到重点,还请包含。可能还有错误,请大家指出,谢谢,希望对同样遇到此问题的小伙伴有所帮助!
我是:今天周一呢。
相关文章推荐
- 安卓代码迁移:Program "sh" not found in PATH
- 安装Android的Eclipse插件ADT遇到错误“requires 'org.eclipse.gef 0.0.0' but it could not be found”
- 安装Android的Eclipse插件ADT遇到错误“requires 'org.eclipse.gef 0.0.0' but it could not be found”
- 安装Android的Eclipse插件ADT遇到错误“requires 'org.eclipse.gef 0.0.0' but it could not be found”
- /bin/sh: 1: aeon-gcc: not found & error while loading shared libraries: libgcc_s.so.1问题的原因以及解决办法
- 安装Android的Eclipse插件ADT遇到错误“requires 'org.eclipse.gef 0.0.0' but it could not be found”
- 在adb shell下执行sqlite3访问数据库出现/system/bin/sh: sqlite3: not found
- android c成代码编译出来的bin(system/bin/目录下)文件 ,在代码中增加打印的方法
- -/bin/sh: XXX: not found
- 【zz】安装Android的Eclipse插件ADT遇到错误“requires 'org.eclipse.gef 0.0.0' but it could not be found”
- -bin/sh ./hello not found,程序运行不了,库文件不对应
- n unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.Additional information: 未能加载文件或程序集“..
- ok6410中搭建linux/Android开发环境遇到reading u-boot.bin error found:0010、tftp传送文件遇到问题
- Android—adb shell—/system/bin/sh: ./executer: No such file or directory
- 我在linux主机用arm-linux-gcc编译后,复制到开发板根目录运行,出现/bin/sh: ./hello not found
- bin/sh:&nbsp;hello&nbsp;:not&nbsp;found
- Fixing "The following VMware kernal modules have been found on your system that were not installed by the VMware installer."
- exec '/system/bin/sh' failed: Bad address (14)
- Windows7卸载ORACLE11G 遇到'perl58.dll was not found'
- 服务 在初始化安装时发生异常:System.IO.FileNotFoundException: 未能加载文件或******