Building from source - XaosWasHere/xaos-music-player GitHub Wiki
Building from source
Layout
| Folder | Content |
|---|---|
app |
Android app (Kotlin, Jetpack Compose, Media3) |
desktop |
Windows app (Kotlin, Compose Multiplatform, VLC through vlcj), its own Gradle project |
desktop/src/native |
XaosMedia.cs, the bridge to the Windows media controls |
desktop/installer |
Inno Setup script and installer artwork (make_images.py) |
Android
Open the root folder in Android Studio, or:
./gradlew :app:assembleDebug
The APKs are split by ABI; the one shipped is app-arm64-v8a-debug.apk.
Desktop
Needs a JDK 21 that includes jpackage (for example Eclipse Temurin).
cd desktop
./gradlew run # run from source
./gradlew createDistributable # app folder with its own Java runtime
./gradlew packageInstaller -PandroidApkDir=../app/build/outputs/apk/debug
packageInstaller needs Inno Setup 6.7 (winget install JRSoftware.InnoSetup). The build bundles:
- the Android APK found in
androidApkDir; - an audio-only subset of the VLC installed on the build machine (
-PvlcDirto point elsewhere); - adb from the Android SDK platform-tools;
- ffmpeg (LGPL build), Deno and yt-dlp, downloaded once and cached in the Gradle user folder;
- the media bridge, compiled with the C# compiler that ships with Windows.
Development switches
| Variable | Effect |
|---|---|
XAOS_HOME |
Use another data folder instead of ~/.xaos. Such an instance does not connect to the phone and can run next to the installed app. |
XAOS_START |
Open directly on a section: ALBUMS, SONGS, PLAYLISTS, SETTINGS, PHONE, FULLSCREEN, MINI... |
How the sync works
The phone app exposes a broadcast receiver, protected by the DUMP permission so that only adb can call it. The desktop app asks it to export favorites, playlists and history to its folder in /sdcard/Android/data, reads them, merges them with its own data against the state agreed at the previous sync, and pushes the result back. The phone applies it only if nothing changed in the meantime.