I have prepared a sample C code below to make it run on Android Operating System by following these procedures,
/*test.c file*/
#include <stdio.h>
int
main(int argc, char **argv)
{
printf("Android Test Application.\n");
return 0;
}
$ arm-none-linux-gnueabi-gcc -o test test.c -Wall
I copied the binary file --test-- into target device "/system/bin" directory.
When I attempt to make cross-compiled binary run on the target system, I am getting this error
$ pwd
/system/bin
$ ./test
bash: ./test: No such file or directory
$ ls -al | grep test
-rwxr-xr-x 1 0 0 8384 2011-12-22 15:26 test
although the binary file --test-- is already in "/system/bin" directory.
My cross-compiler is
$ arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q1-203) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Why I am getting this error?
bash: ./test: No such file or directory
readelf. Tryldd ./teston the device. Also try static-linking the exe to see if that at least works. - Matls -al | grep dateon my phone yieldslrwxrwxrwxas the permissions. Perhaps its a permissions issue? - Wesley Wiser