0

I compiled a code of hello world in C through gcc for ARM. I uploaded the resulting binary to my device and I tried to run it through adb shell. First I got an error about permissions and fixed that. Now it gives me the file not found error but I can see the file in the ls output.

Alex P.
  • 30,437
  • 17
  • 118
  • 169

1 Answers1

0

Your executable is missing a library. The most likely reason is that you just built a Linux ARM executable (not an Android one) which is linked against some libc version other than Android Bionic.

You could either learn how to build proper Android executables or a statically linked binary might just work for your purpose.

Alex P.
  • 30,437
  • 17
  • 118
  • 169
  • The only library there is stdio.h, I tried to link it statically using the --static argument and also the weight has increased, 8 kb before and 500 after, but I get the same error. – Chi non salta Pavarotti è Jul 26 '18 at 09:44
  • I do not want to compile it with the android libraries, I want to use static libraries in such a way that the application is also compatible with linux arm devices. – Chi non salta Pavarotti è Jul 26 '18 at 09:54