Building onecourse is a two-step process:
- Compiling the desired version of the onecouse app.
- Building AOSP for the Pixel C, integrating the onecourse app and generating a set of filesystem images.
-
Ensure you have Android Studio installed. You can follow the steps in this helpful guide.
-
Configure the
ROOT_FOLDER
environment variable and clone the onecourse source repository:export ROOT_FOLDER=onecourse git clone https://github.com/XPRIZE/GLEXP-Team-onebillion.git $ROOT_FOLDER/
-
Configure the
ANDROID_HOME
environment variable based on the location of the Android SDK:export ANDROID_HOME=[PATH/TO/ANDROID_SDK]
-
In the
ROOT_FOLDER
buildgradle
tasks./gradlew tasks
-
Build the desired onecourse
.apk
:onecourse Swahili:
./gradlew assembleSw_community_release -Pandroid.injected.signing.store.file=$ROOT_FOLDER/platform.keystore -Pandroid.injected.signing.store.password=android -Pandroid.injected.signing.key.alias=onebillion_platform -Pandroid.injected.signing.key.password=android
onecourse English:
./gradlew assembleEnGB_community_release -Pandroid.injected.signing.store.file=$ROOT_FOLDER/platform.keystore -Pandroid.injected.signing.store.password=android -Pandroid.injected.signing.key.alias=onebillion_platform -Pandroid.injected.signing.key.password=android
-
Establish a Build environment for Android Open Source Project. This guide will show you how.
-
Download ASOP source. When initializing your repo client, checkout branch
android-6.0.1_r63
(buildMXC89L
):repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r63
-
You will need to download and install the required hardware-specific binaries:
-
Apply the
AOSP/onecourse-AOSP.patch
from the onecourse source repository to the AOSP source tree (current working folder). -
On building for the first time, clean the build folders. This is not required for subsequent builds:
make clobber
-
Copy the following files and folders from the onecourse source repository to your AOSP folder:
rm -rf packages/apps/onebillion mkdir -p packages/apps/onebillion cp $ROOT_FOLDER/AOSP/bootanimation.zip packages/apps/onebillion/
-
Copy the makefile from the onecourse source repository to your AOSP folder:
cp $ROOT_FOLDER/AOSP/Android.mk packages/apps/onebillion/Android.mk
-
Copy the the desired onecourse
.apk
to your AOSP folder:onecourse Swahili:
cp $ROOT_FOLDER/app/build/outputs/apk/sw_community_/release/app-sw_community_-release.apk packages/apps/onebillion/app-release.apk
onecourse English:
cp $ROOT_FOLDER/app/build/outputs/apk/enGB_community_/release/app-enGB_community_-release.apk packages/apps/onebillion/app-release.apk
-
Download and join part 1 and part 2 of the onecourse assets, then extract into your AOSP folder:
cat onecourse-assets-v3.0.1.tar.gz.aa onecourse-assets-v3.0.1.tar.gz.ab > assets.tar.gz tar xf assets.tar.gz -C packages/apps/onebillion/
-
Build the filesystem images. This will take several hours:
source build/envsetup.sh lunch aosp_dragon-userdebug make -j4
-
The filesytem images will be placed in:
/out/target/product/dragon/
-
You can now install onecourse onto a device.