-1

I have recently been trying to compile dropbear for 64bit arch android devices. I got the program to compile and run, but when I log in to the server it kicks me off with an error.

I configured & compiled like so:

cp ../config.guess ../config.sub .
./configure --build=x86_64-windows --host=arm-linux-androideabi \
--disable-zlib --disable-largefile --disable-loginfunc \
--disable-shadow --disable-utmp --disable-utmpx --disable-wtmp \
--disable-wtmpx --disable-pututline --disable-pututxline --disable-lastlog \
CFLAGS='-Os -W -Wall -fPIE' LDFLAGS='-fPIE -pie'

make dropbear    

The error:

CANNOT LINK EXECUTABLE: "/system/lib/libc++.so" is 32-bit instead of 64-bit
page record for 0x7f800b8010 was not found (block_size=32)

I believe the error is caused by dropbear linking sh and other executables to the library in wrong location.

The device has two locations for libc++

  #1 /system/lib/libc++.so
  #2 /system/lib64/libc++.so

How can I tell/force the compiled binary to use the lib(s) in

/sytem/lib64

If giving an example please show me exactly what needs to be added, so I can apply the information correctly. I'm almost sure the fix is simple but I'm not a programmer. I do this stuff when I'm desperate.

Geofferey
  • 2,862
  • 6
  • 21
  • 24

1 Answers1

1

Turns out there was a hard link in srv-chansession.c that needed to be modified

From:

addnewvar("LD_LIBRARY_PATH", "/system/lib");

To:

addnewvar("LD_LIBRARY_PATH", "/system/lib64");

It may actually be better to comment out that line and let androids linkers take care of it.

Now I have working a working dropbear ssh server on my 64 bit android device.

Geofferey
  • 2,862
  • 6
  • 21
  • 24