In order to contribute any changes to Substratum, you will need to know how to build the APK. This can be done in two ways: Android Studio or the command line.
A note about these APKs: these should only be used for testing purposes since they are debug APKs (i.e. not signed with the official keys, meaning that they cannot be installed over a Play Store version). They should not be included in ROMs unless you are willing to build every time there is a new commit. We will also not provide support for debug APKs.
https://developer.android.com/studio/index.html
Make sure you install the latest SDK and build tools.
- Open Android Studio
- Click "Checkout project from Version Control"
- Set up your Github credentials if you have not done so already
- Put https://github.com/substratum/substratum into the URL field and select where you want it cloned.
- Hit Clone.
- Hit Yes to opening the gradle file.
- Hit OK on the next window to select the default values.
Click on the Build menu and select "Build APK". There will be a message with an APK file once that is done.
This is perfect for people with build servers or those who just prefer to work from the command line.
NOTE: For the SDK and gradlew binary commands, Windows users will need to remove the ./
before the command.
-
Download the command line tools via wget or curl: https://developer.android.com/studio/index.html
-
Unzip the file
unzip -d <desired_folder_name> <zip_name>
-
Run the SDK manager to download the proper packages
cd <desired_folder_name> ./tools/android update sdk --no-ui ./tools/android update sdk -u -a -t #
Where as # is the number of the package you want to install. You will need the latest build tools (currently 25.0.3) and SDK (currently 25). You should be able to agree to the terms and conditions now, otherwise it will throw an error when attempting to build. If you need to download multiple packages, separate the numbers with a comma (1,2,3).
export ANDROID_HOME=<full_sdk_path>
git clone https://github.com/substratum/substratum
cd substratum
./gradlew assembleDebug
The finalized APK will be in the app/build/outputs/apk folder within the Substratum repo folder.