> arm-linux-androideabi-gcc --sysroot=$NDK_ROOT/platforms/android-8/arch-arm/ -lz -lm -I../zlib -I../lpng -W -Wall -o fbgrab fbgrab.c ../zlib/libz.a ../lpng/libpng.a
Why do you specify both -lz and libz.a?
> but it is dynamicly linked
Have you checked which libraries it links to dynamically? (Using arm-linux-androideabi-readelf -d .) There are no static versions of the system libraries like libc as far as I know, you will always link to those dynamically.
As such, I am not sure if what you are doing, executing a "normal" executable file from your app's Java code, is supported and works for normal users on normal devices. ( (You presumably want to unpack and chmod that executable from your app's .apk in its startup code.)
> I dont now how to install shared libraries on device
Put them in libs/armeabi-v7a (or libs/armeabi, I think the other one is), and ant will include them in the .apk, and they will be unpacked into your application's /data/data/foo/.bar.zap/lib directory when the app is installed. You can then dlopen() them as long as you do it in the right order. Do not expect run-time linker to be able to do it automatically. (But for separate executables, it might actually work, as long as you set LD_LIBRARY_PATH for the process before execing the executable.)
In general, I would say you need to learn that Android is quite far from normal Linux, and stop trying to do things as you would on Linux...
--tml