Cross-compiling for Android

1

I'm trying to cross-compile dropbear for android. The files appear to compile find, but when executed give "program : not found." I did a find and the libraries marked NEEDED appear to be located in the cross-compile environment. I have compiled other programs with this toolchain.

arm-none-linux-gnueabi-readelf -d dropbear

Dynamic section at offset 0x1c158 contains 27 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libutil.so.1]
 0x00000001 (NEEDED)                     Shared library: [libcrypt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000c (INIT)                       0x9428
 0x0000000d (FINI)                       0x1e1b4
 0x00000019 (INIT_ARRAY)                 0x2c14c
 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
 0x0000001a (FINI_ARRAY)                 0x2c150
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x00000004 (HASH)                       0x8168
 0x00000005 (STRTAB)                     0x8ba0
 0x00000006 (SYMTAB)                     0x84b0
 0x0000000a (STRSZ)                      970 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x2c258
 0x00000002 (PLTRELSZ)                   848 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x90d8
 0x00000011 (REL)                        0x90c8
 0x00000012 (RELSZ)                      16 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x9048
 0x6fffffff (VERNEEDNUM)                 4
 0x6ffffff0 (VERSYM)                     0x8f6a
 0x00000000 (NULL)                       0x0
android
asked on Stack Overflow Jun 21, 2010 by Alan

2 Answers

0

Did you apply the "patch" to dropbear, because dropbear uses /etc/passwd and that does not exist on android.

Found this on Installing Dropbear - MyWiki

Dropbear needs to be patched to work with Android. Android does not use a ‘/etc/passwd’ file, so that needs to be patched together with some directory changes. This also adds a statically password. This password is located at the bottom of ‘debug.h’ in the dropbear directory. The default password is “password”. The patch can be found here: http://pastebin.com/f3dedc5e7

I know dropbear can compile and run on android because CyanogenMOD, along with most of the other ROMs I have used have it on the system.

answered on Stack Overflow Jun 21, 2010 by Ryan Conrad
0

I found the problem. I was compiling w/o the STATIC=1 flag. Thanks for the reply! Thanks for the reply! I got the patched source from cyanogen's github

answered on Stack Overflow Jun 21, 2010 by Alan

User contributions licensed under CC BY-SA 3.0