If you are based without a dedicated development Board practiced hand, then yourAndroidmobile phones can also develop mostCapplication, compile after installationCthe compiler. This article only writes aHello Worldthe running process. The advantages are:no need for Eclipse, no Android Source code, no android.mk, no need NDK 。 OneCprogrammers can use them very well.Android, you need a compiler and aadbto put the program inAndroidthe system.
1. Installationadb
sudo apt-get install android-tools-adb
2. Installing the cross-tool chain
sudo apt-get install Gcc-arm-linux-gnueabi
3.compilingHello Worldprogram
ARM-LINUX-GNUEABI-GCC hello.c-static
Note : This is a static link, otherwise the library file will not be found.
4.will bea.outpush toAndroidon
ADB push a.out/data/
5.RunHello World
ADB shell/data/a.out
Results:
$ adb shell/data/a.out
Hello world!
$
End: Here is just a Hello world, In fact, many programs can be developed in this area , such as framebuffer or whatever. To play with the Android There are a lot of things to be familiar with, various tools. If you use only one aspect, you can use the other as little as possible.