wiki:AndroidBuildApp

Version 2 (modified by Joachim, 12 years ago) (diff)

links added

How To Build BOINC Apps for AndroidBOINC

This document describes how to build BOINC scientific apps to be executed by AndroidBOINC on Android-powered devices.

Introduction

Naming convention

AndroidBOINC - Android application that bundles a cross compiled BOINC Client together with a Android-specific BOINC Manager (GUI).

BOINC apps - scientific applications to be distributed and calculated on participating devices.

Requirements

Used versions

Development target:

  • ARM architecture featuring ABI v5
  • NDK-level 4 (Android 1.6)

Tested with:

  • ARM ABI v7 device (Samsung Galaxy SII)
  • Android platform 2.3.4

Compatibility with AndroidBOINC

Caution: Verification whether volunteering Android devices meets the requirements is only done upon AndroidBOINC app installation. It is the project's responsibility to ensure, that distributed BOINC apps meet the requirements. If a higher minimum platform version is used for BOINC apps than for AndroidBOINC, they are likely to crash on some devices.

There are two approaches to this:

  • use the same toolchain and AndroidBOINC build script configuration for building the BOINC Client and BOINC apps.
  • make use of "BOINC platform" configuration of the AndroidBOINC build script to distinct versions with the scheduler.

Setup NDK toolchain

Setup NDK toolchain

Note: 0.3 Compatibility with AndroidBOINC

To set up a custom cross compilation toolchain, see article at http://boinc.berkeley.edu/trac/wiki/AndroidBuildClient

Invoke build script

It is recommended to use the same AndroidBOINC build script for compiling BOINC apps and the BOINC Client for AndroidBOINC.

It is possible to adapt the scripts routine, by un-setting the environment variables BUILDOPENSSL, BUILDCURL and BUILDBOINC.

Example

An example of how to adapt a BOINC app's Makefile to compile it for Android can be found in the BOINC sources at: https://github.com/novarow/AndroidBOINC/blob/master/native/diffs_android/uppercase/Makefile_android

Note that the AndroidBOINC build script sets up the required environment variables for the standard c++ library as well as the Android SYSROOT.

-llog refers to the library required to use Logcat from native code. Logcat is used for debugging purposes and is not required for the app's functionality.