wiki:AndroidBuildApp

Version 4 (modified by Joachim, 11 years ago) (diff)

update to new naming and build scripts in repo

How To Build BOINC Apps for BOINC on Android

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

Introduction

Naming convention

BOINC on Android - 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 BOINC on Android

Caution: BOINC on Android runs on all ARM based Android devices. The minimum requirement is therefore ARM ABIv5. Higher ABIs or specific CPU capabilities might only be available on a subset of volunteer's devices. It is the project's responsibility to ensure, that distributed BOINC apps meet these requirements. The client reports CPU capabilities, i.e. VFP and NEON support, to the project server. It is recommended to have a fallback version for ARM ABIv5, since not all devices might have higher ABIs available.

BOINC platform name

BOINC on Android uses BOINC platform identifier: "arm-android-linux-gnu"

Setup NDK toolchain

Setup NDK toolchain

To set up a custom cross compilation toolchain, see article at AndroidBuildClient

Build script

Take a look at the build scripts in the BOINC software repository. They give you an idea of what steps are required and which cross compilation tools to use.

There are also scripts available, which build required software components, i.e. curl and openSSL, or BOINC libs.

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.