zoukankan      html  css  js  c++  java
  • android中:/system/bin/sh: : No such file or directory错误

    将一个raspberry下编译好的可执行文件放在android的system/bin下,修改为777权限,运行,出现下面的错误:

    /system/bin/sh: XXX: No such file or directory

    这一般是系统的动态链接器与XXX这个程序中的动态链接器的名字或路径不对,在raspberry下执行:

    readelf -l 可执行文件名

    输出:

    Elf file type is EXEC (Executable file)
    Entry point 0x9e3c
    There are 8 program headers, starting at offset 52
    
    Program Headers:
      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
      EXIDX          0x016420 0x0001e420 0x0001e420 0x00008 0x00008 R   0x4
      PHDR           0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
      INTERP         0x000134 0x00008134 0x00008134 0x00019 0x00019 R   0x1
          [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
      LOAD           0x000000 0x00008000 0x00008000 0x1642c 0x1642c R E 0x8000
      LOAD           0x017000 0x00027000 0x00027000 0x01464 0x03c38 RW  0x8000
      DYNAMIC        0x01700c 0x0002700c 0x0002700c 0x000f0 0x000f0 RW  0x4
      NOTE           0x000150 0x00008150 0x00008150 0x00044 0x00044 R   0x4
      GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
    
     Section to Segment mapping:
      Segment Sections...
       00     .ARM.exidx 
       01     
       02     .interp 
       03     .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 
       04     .init_array .fini_array .jcr .dynamic .got .data .bss 
       05     .dynamic 
       06     .note.ABI-tag .note.gnu.build-id 
       07     

    其中的

      INTERP         0x000134 0x00008134 0x00008134 0x00019 0x00019 R   0x1
          [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
    说明了缺少的文件,拷贝到android对应目录即可!
    参考:http://bbs.csdn.net/topics/390349057?page=1#post-393513107
  • 相关阅读:
    HDU 1058 Humble Numbers
    HDU 1421 搬寝室
    HDU 1176 免费馅饼
    七种排序算法的实现和总结
    算法纲要
    UVa401 回文词
    UVa 10361 Automatic Poetry
    UVa 537 Artificial Intelligence?
    UVa 409 Excuses, Excuses!
    UVa 10878 Decode the tape
  • 原文地址:https://www.cnblogs.com/albert1017/p/3566787.html
Copyright © 2011-2022 走看看