| | 1 | [[PageOutline]] |
| | 2 | = How To Build BOINC Apps for AndroidBOINC = |
| | 3 | |
| | 4 | This document describes how to build BOINC scientific apps |
| | 5 | to be executed by AndroidBOINC on Android-powered devices. |
| | 6 | |
| | 7 | |
| | 8 | = Introduction = |
| | 9 | |
| | 10 | == Naming convention == |
| | 11 | |
| | 12 | '''AndroidBOINC''' - Android application that bundles a cross compiled BOINC |
| | 13 | Client together with a Android-specific BOINC Manager (GUI). |
| | 14 | |
| | 15 | '''BOINC apps''' - scientific applications to be distributed |
| | 16 | and calculated on participating devices. |
| | 17 | |
| | 18 | |
| | 19 | == Requirements == |
| | 20 | |
| | 21 | * Android NKD: http://developer.android.com/tools/sdk/ndk/index.html |
| | 22 | * AndroidBOINC build script: *link* |
| | 23 | |
| | 24 | |
| | 25 | == Used versions == |
| | 26 | |
| | 27 | Development target: |
| | 28 | * ARM architecture featuring ABI v5 |
| | 29 | * NDK-level 4 (Android 1.6) |
| | 30 | |
| | 31 | Tested with: |
| | 32 | * ARM ABI v7 device (Samsung Galaxy SII) |
| | 33 | * Android platform 2.3.4 |
| | 34 | |
| | 35 | |
| | 36 | == Compatibility with AndroidBOINC == |
| | 37 | |
| | 38 | Caution: Verification whether volunteering Android devices meets the requirements |
| | 39 | is only done upon AndroidBOINC app installation. |
| | 40 | It is the project's responsibility to ensure, |
| | 41 | that distributed BOINC apps meet the requirements. |
| | 42 | If a higher minimum platform version is used for BOINC apps than for AndroidBOINC, |
| | 43 | they are likely to crash on some devices. |
| | 44 | |
| | 45 | There are two approaches to this: |
| | 46 | * use the same toolchain and AndroidBOINC build script configuration for |
| | 47 | building the BOINC Client and BOINC apps. |
| | 48 | * make use of "BOINC platform" configuration of the AndroidBOINC |
| | 49 | build script to distinct versions with the scheduler. |
| | 50 | |
| | 51 | |
| | 52 | = Setup NDK toolchain = |
| | 53 | |
| | 54 | == Setup NDK toolchain == |
| | 55 | |
| | 56 | Note: 0.3 Compatibility with AndroidBOINC |
| | 57 | |
| | 58 | To set up a custom cross compilation toolchain, |
| | 59 | see section 1.1 of "HowTo Build AndroidBOINC" at: *link* |
| | 60 | |
| | 61 | |
| | 62 | = Invoke build script = |
| | 63 | |
| | 64 | It is recommended to use the same AndroidBOINC build script for compiling BOINC apps |
| | 65 | and the BOINC Client for AndroidBOINC. |
| | 66 | |
| | 67 | It is possible to adapt the scripts routine, |
| | 68 | by un-setting the environment variables BUILDOPENSSL, BUILDCURL and BUILDBOINC. |
| | 69 | |
| | 70 | |
| | 71 | = Example = |
| | 72 | |
| | 73 | An example of how to adapt a BOINC app's Makefile to compile it for Android |
| | 74 | can be found in the BOINC sources at: |
| | 75 | "/samples/example_app/Makefile_android" |
| | 76 | |
| | 77 | Note that the AndroidBOINC build script sets up the required environment |
| | 78 | variables for the standard c++ library as well as the Android SYSROOT. |
| | 79 | |
| | 80 | -llog refers to the library required to use Logcat from native code. |
| | 81 | Logcat is used for debugging purposes and is not required for the app's functionality. |