If you have docker installed, follow the directions at Docker.md
to set up a docker build environment. It includes all the dependencies needed for building DualBootPatcher. With docker, DualBootPatcher can also be built from Windows and Mac hosts. For building the Android app, you'll need to use the <version>-android
image.
If you don't have docker installed, the following packages are needed:
- Android SDK
- Android NDK
- cmake
- gtest
- JDK 1.8
- OpenSSL
- yaml-cpp
-
If you haven't cloned the repo and its submodules yet, follow the directions at
Git-Clone.md
. -
Set the environment variables for the Android SDK and NDK path. If you're using the docker image, this step is not needed as the environment variables are already set in the image.
export ANDROID_HOME=/path/to/android-sdk export ANDROID_NDK_HOME=/path/to/android-ndk export ANDROID_NDK=/path/to/android-ndk
-
If making a release build, make a copy of
cmake/SigningConfig.prop.in
and edit it to specify the keystore path, keystore passphrase, key alias, and key passphrase. -
Configure the build with CMake.
mkdir build && cd build cmake .. -DMBP_BUILD_TARGET=android
If you're making a release build, you'll need to pass the
-DMBP_BUILD_TYPE=release
and-DMBP_SIGN_CONFIG_PATH=<signing config path>
arguments. SeeCMake.md
for a complete listing of CMake options. -
Build the system components. This includes things like mbtool, odinupdater, and various native libraries used by the app. The build can be sped up by running things in parallel. Just pass
-j<number of cores>
(eg.-j4
) tomake
.make
-
Package the system components into a tarball.
rm -rf assets && cpack
-
Build the APK.
make apk
The resulting APK file will be in the
Android_GUI/build/outputs/apk
directory.