Building this App
May 2, 2025 ยท View on GitHub
There are 3 ways how you can build this app:
- Build the unsigned app locally (ideal for personal use).
- Build the unsigned app via GitHub Actions (ideal for personal use).
- Refer to the Personal Privacy Build documentation on how to do this.
- Build the app using GitHub Actions (ideal for production).
Except for the "Build the unsigned app via GitHub Actions" option, there are some prerequisites:
- Basic understanding of the command line.
- Have git installed and some knowledge of basic commands.
- Have Node.js installed.
- Have a Java Development Kit (JDK) and Android Studio installed.
- You can follow this quick start guide from Expo (follow all the instructions until the "Running your app on an Android device" section).
- A code editor such as VSCode.
- A USB Debugging enabled device.
(Unsigned) Local Build
This will build the app directly onto your connected device. In addition, you can find the "release" variants of the unsigned APKs generated in the mobile/android/app/build/outputs/apk/release directory. There will be different APK files, for modern Android devices, the app-arm64-v8a-release.apk is used.
-
Clone the repository.
git clone https://github.com/MissingCore/Music.git -
Navigate to the project directory.
cd Music/mobile -
Install dependencies (you need to use
pnpmdue to us patching packages).pnpm i -
Connect your Android device to your computer via a USB cable.
-
Run the following command to build the app locally on your computer via Expo, which will add the app to your phone upon completion.
pnpm android:prod
Note
You may receive a prompt on your device asking: "Allow USB debugging". Click OK to allow USB debugging on your PC. If you hit Cancel, the build command will fail. To allow USB debugging after canceling, reconnect your device with the USB cable and run the command again.
(Signed) GitHub Actions Build
Important
This section is mainly for documentation purposes and probably shouldn't be used as you cannot upload this app to the Play Console as this app id is already used.
This utilizes a GitHub Actions workflow to build the APKs (that can be published to other stores) along with an .aab file ready for the Play Console. Whenever a new tag is created of a certain format, the workflow will automatically run and build the APKs & .aab files and upload the .aab file to the Play Console if you have that set up.
-
Generate an upload key via
keytoolwhich comes with your installation of Java (which you should have if you installed Android Studio) by running the command below (which is referenced from a React Native guide). This will generate akeystore.jksfile in the directory wherekeytoolis located.sudo keytool -genkey -v -keystore keystore.jks -alias key-alias -keyalg RSA -keysize 2048 -validity 10000
Important
- You should change
key-aliasto be something unique if you plan on publishing this app. - Keep the password you inputted as that'll be important later on.
- Try to limit the use of certain characters (ie:
$,`,=) in the password as it breaks the behavior of the GitHub Actions script.
- Try to limit the use of certain characters (ie:
- You can move
keystore.jksto a more accessible location (ie: somewhere in the/Downloadsdirectory).
-
Open up
Git Bashwhen it was installed withgit. You want to go to the directory where thekeystore.jksfile is by runningcd "<directory>". Then run the following command to encodekeystore.jksinto a base64 file.openssl base64 < keystore.jks | tr -d '\n' | tee keystore.base64.txtWe want to encode
keystore.jksin base64 as we want to keep this file secret and prevent exposing it. By encoding it in base64, we can save this as a GitHub Actions secret and use it within the workflow. -
Clone or fork this repository on GitHub.
-
Now we need to add some secrets. When in the cloned repository, click:
Settings > Secrets and variables > Actions. ClickNew repository secret. We're going to create the following secrets:Name Secret RELEASE_CREDRemember to remove the angle brackets. RELEASE_KEYSTORE_PASSWORD=<UPLOAD_PASSWORD from Step 1> RELEASE_KEY_ALIAS=<unique key-alias from Step 1> RELEASE_KEY_PASSWORD=<UPLOAD_PASSWORD from Step 1>SENTRY_PROPERTIESRemember to remove the angle brackets. defaults.project=<Sentry project name> defaults.org=<Sentry organization name with this project> auth.token=<Sentry organization auth token (meant for CI)>KEYSTORE_BASE64Put the contents of keystore.base64.txt.MISSINGCORE_BOT_GITHUB_TOKENPut a Fine-Grained Personal Access Token. This token should have Read & Writepermissions for:Contents.GOOGLE_PLAY_SERVICE_ACCOUNT_JSONPaste the contents of the service account JSON file created by following the steps on the r0adkll/upload-google-play GitHub Actions Repository. You don't need to give the service account permissions (ie: you don't need to give it ownerpermissions).
Note
If you don't want to automatically upload the .aab to the Play Console, don't provide a value to the GOOGLE_PLAY_SERVICE_ACCOUNT_JSON secret.
- The
.aabfile can be manually downloaded for a limited time (usually up to 90 days) in the "Artifacts" section of the summary of the action. - Do note that this will result in the workflow to fail.
Manually Triggering a Build
You can manually trigger a build on the "Automatic Release" workflow.
-
In the "Actions" tab, click "Automatic Release" on the side bar on the left.
-
You should see in the middle of the screen, "This workflow has a
workflow_dispatchevent trigger.". Click "Run workflow" and change the "Branch: main" to a tag.
-
Then click the "Run workflow" in the dropdown. This will build the app for that specific version of the app.