Changes between Version 13 and Version 14 of AndroidBuildClient


Ignore:
Timestamp:
Mar 31, 2017, 1:13:11 AM (8 years ago)
Author:
brevilo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AndroidBuildClient

    v13 v14  
    1414== Requirements ==
    1515
    16  * The recommended IDE for Android development is Eclipse with ADT plugin
    17  * Android SDK: http://developer.android.com/sdk/
    18    (not needed for building science apps)
     16 * The recommended IDE for Android development is [[https://developer.android.com/studio/index.html|Android Studio]] (incl. the Android SDK)
    1917 * Android NDK: http://developer.android.com/tools/sdk/ndk/index.html
    2018 * BOINC Client source code: http://boinc.berkeley.edu/trac/wiki/SourceCodeGit
     
    2321
    2422Development target:
    25  * ARM architecture featuring ABI v5
    26  * NDK-level 9 (Android 2.3)
     23 * ARM architecture featuring [[https://developer.android.com/ndk/guides/abis.html#v7a|ABI v7a]] (with VFP and/or NEON support)
     24 * NDK-level 16 (Android 4.1)
    2725
    2826Tested with:
    29  * ARM ABI v7 device (Samsung Galaxy SII)
    30  * Android platform 2.3.4
     27 * ARM ABI v7 device (HTC One X+)
     28 * Android platform 4.2.2
    3129
    3230= Building BOINC Client =
     
    4442for more information see "Android NDK stable APIs").
    4543
    46 Our build scripts depend on the NDKROOT environment variable to point to the installed NDK.
     44Our build scripts depend on the {{{NDK_ROOT}}} environment variable to point to the installed NDK.
    4745Please make sure that environment variable is set before
    48 executing the build_androidtc.sh shell script.
     46executing any of the {{{build_androidtc_<ARCH>.sh}}} shell scripts.
    4947
    50 Run the following command from the boinc/android directory:
     48Run on of the following commands from the {{{<BOINC_REPO>/android}}} directory:
    5149{{{
    52 ./build_androidtc.sh
     50./build_androidtc_[arm|arm64|mips|mips64|x86|x86_64].sh
    5351}}}
    54 This will install a toolchain for ARM devices with minimum Android version 2.3
    55 in the ~/android-tc directory.
     52Alternatively you build the NDK toolchains together with the BOINC client itself
     53by running the {{{./build_all.sh}}} script as described in the next section.
    5654
    57 A map of NDK Android platform version (e.g. android-9)
    58 to common Android versions (e.g. Android 2.3) can be found in under "Stable APIs"
    59 in the Android NDK documentation.
     55This will install a toolchain for the selected architecture with minimum Android version 4.1
     56in the directory defined by the {{{ANDROID_TC}}} environment variable (default: {{{~/android-tc}}}).
     57
     58A map of NDK Android platform version (e.g. android-16)
     59to common Android versions (e.g. Android 4.1) can be found in Android [[https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels|API Guides]].
    6060
    6161
     
    6666which sets up the paths and invokes the building tools.
    6767
    68 Before first execution, configure the build script with the following information:
     68Before first execution, configure the build script via the following environment variables:
    6969
    70  * OPENSSL(build_openssl.sh): location of openSSL sources, openSSL is required by
     70 * {{{OPENSSL_SRC}}}: location of OpenSSL sources, OpenSSL is required by
    7171   BOINC Client. (Tested with version 1.0.0d)
    72  * CURL(build_curl.sh): location of CURL sources, Curl is required by BOINC Client.
     72 * {{{CURL_SRC}}}: location of cURL sources, cURLl is required by BOINC Client.
    7373  (Tested with 7.27.0)
    7474
    75 Run the following command from the boinc/android directory:
     75Run the following command from the {{{<BOINC_REPO>/android}}} directory to build the NDK toolchains, the BOINC client and all its dependencies:
    7676{{{
    7777./build_all.sh
    7878}}}
    7979
    80 To build only the client, run the following command from the boinc/android directory:
     80To build the client, run the following command from the {{{<BOINC_REPO>/android}}} directory:
    8181{{{
    82 ./build_boinc.sh
     82./build_boinc_all.sh
    8383}}}
    8484
    85 Verify that the "boinc" executable was created and copied to boinc/android/BOINC/assets.
    86 Note that it will not run on your development machine.
     85Verify that the {{{boinc}}} executables were created and copied to {{{<BOINC_REPO>/android/BOINC/app/src/main/assets}}} (per architecture).
     86Note that they will not run on your development machine.
    8787
    88 To build only the libraries, run the following command from the boinc/android directory.
    89 You need build openssl before and adapt the build_libraries.sh to point to your openssl.
    90 Curl is not needed:
     88To build only the libraries, run one of the following commands from the {{{<BOINC_REPO>/android}}} directory.
     89Remember to define {{{OPENSSL_SRC}}} and let it point to the location of the OpenSSL sources.
    9190{{{
    92 ./build_libraries.sh
     91./build_libraries_[arm|mips|x86].sh
    9392}}}
    9493
     
    9998== Setup Android SDK ==
    10099
    101 Step-by-step instructions on how to set up the Android development environment,
    102 including Android SDK, development tools, Android platforms,
    103 Eclipse and ADT plugin can be found here:
     100Step-by-step instructions on how to set up Android Studio, including Android SDKs,
     101development tools and Android platforms can be found here:
    104102http://developer.android.com/sdk/installing/index.html
    105 
    106103
    107104== Building the project ==
    108105
    109 Make sure that the cross compiled BOINC Client resides in your Android project's
    110 "assets" directory.
    111 Building the Android project in Eclipse will bundle the Client's binaries
     106Make sure that the cross compiled BOINC Client executables reside in your Android project's
     107{{{<BOINC_REPO>/android/BOINC/app/src/main/assets}}} directory.
     108Building the Android project in Android Studio will bundle the Client's binaries
    112109into the Android application's APK file.
    113110
     
    117114use Logcat to write debugging messages.
    118115
    119 If you are using an Android emulator (AVD) to debug your project, note the following:
     116If you are using an Android Virtual Device emulator (AVD) to debug your project, note the following:
    120117
    121  * AVD is by default ARM ABI v5.
     118 * Make sure you pick the right API level
    122119 * AVD does not support wifi; the data connection of the development machine
    123120  is tunneled to the cellular connection of the emulator.
     
    127124 * Internal memory and RAM are very small on an AVD.
    128125  Note that most common Android smartphones have higher capabilities.
     126 * The AVD might not run within a virtual machine since it uses virtualization itself (which can't be nested).
    129127
    130128To adapt an AVD instance, in terms of available RAM, internal memory,