Compile in Fedora and run on Android
Is it possible to compile a c code in Fedora and to run it on Android with gcc? I tried to compile using gcc file.c -o f1 and it didn't work. Any seggustions? I was unable to execute it with ADB tool.
If your c code is run in terminal, you can simple cross compile it and push the executable file to your phone by using ADB tools.
get a cross compiler
download a cross compiler, for example: http://www.mentor.com/embedded-software/sourcery-tools/sourcery- codebench/editions/lite-edition/
you can build android develop environment from: http://source.android.com/source/building.html
use arm-eabi-gcc for compiling your c code , generate executable file ie. a.out
- adb push a.out /sdcard, chmod 777, then you can run it from adb shell