This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

Run binary on Android

avoiding the painful JNI wrapper approach
Added by bronzeboyvn about 1 year ago


Comments

Added by bronzeboyvn about 1 year ago

Dynamically linked Hello, world! for Android

export MYNDK="/opt/android-ndk-r6b" 
$MYNDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -c hello.c -I$MYNDK/platforms/android-8/arch-arm/usr/include/
$MYNDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -c start.c
$MYNDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ld --entry=_start --dynamic-linker /system/bin/linker -nostdlib -rpath /system/lib -rpath $MYNDK/platforms/android-8/arch-arm/usr/lib/ -L $MYNDK/platforms/android-8/arch-arm/usr/lib/ -lc -o hello hello.o start.o