Changes between Version 13 and Version 14 of AndroidBuildClient
- Timestamp:
- Mar 31, 2017, 1:13:11 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AndroidBuildClient
v13 v14 14 14 == Requirements == 15 15 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) 19 17 * Android NDK: http://developer.android.com/tools/sdk/ndk/index.html 20 18 * BOINC Client source code: http://boinc.berkeley.edu/trac/wiki/SourceCodeGit … … 23 21 24 22 Development target: 25 * ARM architecture featuring ABI v526 * 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) 27 25 28 26 Tested with: 29 * ARM ABI v7 device ( Samsung Galaxy SII)30 * Android platform 2.3.427 * ARM ABI v7 device (HTC One X+) 28 * Android platform 4.2.2 31 29 32 30 = Building BOINC Client = … … 44 42 for more information see "Android NDK stable APIs"). 45 43 46 Our build scripts depend on the NDKROOTenvironment variable to point to the installed NDK.44 Our build scripts depend on the {{{NDK_ROOT}}} environment variable to point to the installed NDK. 47 45 Please make sure that environment variable is set before 48 executing the build_androidtc.sh shell script.46 executing any of the {{{build_androidtc_<ARCH>.sh}}} shell scripts. 49 47 50 Run the following command from the boinc/androiddirectory:48 Run on of the following commands from the {{{<BOINC_REPO>/android}}} directory: 51 49 {{{ 52 ./build_androidtc .sh50 ./build_androidtc_[arm|arm64|mips|mips64|x86|x86_64].sh 53 51 }}} 54 This will install a toolchain for ARM devices with minimum Android version 2.3 55 in the ~/android-tc directory.52 Alternatively you build the NDK toolchains together with the BOINC client itself 53 by running the {{{./build_all.sh}}} script as described in the next section. 56 54 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. 55 This will install a toolchain for the selected architecture with minimum Android version 4.1 56 in the directory defined by the {{{ANDROID_TC}}} environment variable (default: {{{~/android-tc}}}). 57 58 A map of NDK Android platform version (e.g. android-16) 59 to 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]]. 60 60 61 61 … … 66 66 which sets up the paths and invokes the building tools. 67 67 68 Before first execution, configure the build script with the following information:68 Before first execution, configure the build script via the following environment variables: 69 69 70 * OPENSSL(build_openssl.sh): location of openSSL sources, openSSL is required by70 * {{{OPENSSL_SRC}}}: location of OpenSSL sources, OpenSSL is required by 71 71 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. 73 73 (Tested with 7.27.0) 74 74 75 Run the following command from the boinc/android directory:75 Run the following command from the {{{<BOINC_REPO>/android}}} directory to build the NDK toolchains, the BOINC client and all its dependencies: 76 76 {{{ 77 77 ./build_all.sh 78 78 }}} 79 79 80 To build only the client, run the following command from the boinc/androiddirectory:80 To build the client, run the following command from the {{{<BOINC_REPO>/android}}} directory: 81 81 {{{ 82 ./build_boinc .sh82 ./build_boinc_all.sh 83 83 }}} 84 84 85 Verify that the "boinc" executable was created and copied to boinc/android/BOINC/assets.86 Note that itwill not run on your development machine.85 Verify that the {{{boinc}}} executables were created and copied to {{{<BOINC_REPO>/android/BOINC/app/src/main/assets}}} (per architecture). 86 Note that they will not run on your development machine. 87 87 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: 88 To build only the libraries, run one of the following commands from the {{{<BOINC_REPO>/android}}} directory. 89 Remember to define {{{OPENSSL_SRC}}} and let it point to the location of the OpenSSL sources. 91 90 {{{ 92 ./build_libraries .sh91 ./build_libraries_[arm|mips|x86].sh 93 92 }}} 94 93 … … 99 98 == Setup Android SDK == 100 99 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: 100 Step-by-step instructions on how to set up Android Studio, including Android SDKs, 101 development tools and Android platforms can be found here: 104 102 http://developer.android.com/sdk/installing/index.html 105 106 103 107 104 == Building the project == 108 105 109 Make sure that the cross compiled BOINC Client residesin your Android project's110 "assets"directory.111 Building the Android project in Eclipsewill bundle the Client's binaries106 Make sure that the cross compiled BOINC Client executables reside in your Android project's 107 {{{<BOINC_REPO>/android/BOINC/app/src/main/assets}}} directory. 108 Building the Android project in Android Studio will bundle the Client's binaries 112 109 into the Android application's APK file. 113 110 … … 117 114 use Logcat to write debugging messages. 118 115 119 If you are using an Android emulator (AVD) to debug your project, note the following:116 If you are using an Android Virtual Device emulator (AVD) to debug your project, note the following: 120 117 121 * AVD is by default ARM ABI v5.118 * Make sure you pick the right API level 122 119 * AVD does not support wifi; the data connection of the development machine 123 120 is tunneled to the cellular connection of the emulator. … … 127 124 * Internal memory and RAM are very small on an AVD. 128 125 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). 129 127 130 128 To adapt an AVD instance, in terms of available RAM, internal memory,