Repository navigation
Building from source
Devesh Rai edited this page Oct 21, 2026
·
1 revision
- JDK 17 or later. Android Studio's bundled JDK works.
-
Android SDK with platform 37 (compile SDK) and build tools. Point
local.propertiesat it withsdk.dir=…; Android Studio does this for you. - Gradle comes with the wrapper; the build uses AGP 9.4 and Kotlin 2.4.
git clone https://github.com/deveshrai/Foldman.git
cd Foldman
./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/Foldman-*-debug.apkWith no extra setup, local music and YT Music work fully, and Apple Music runs by driving the Apple Music app. To stream Apple Music inside Foldman, see Apple Music and MusicKit.
Create a foldable emulator, then switch its hinge from the command line:
avdmanager create avd -n foldman_fold -k "system-images;android-36;google_apis;arm64-v8a" -d pixel_9_pro_fold
emulator -avd foldman_fold
adb shell cmd device_state state 0 # folded: the cover screen
adb shell cmd device_state state 2 # open
adb shell cmd device_state state 1 # half-open; rotate to landscape for Flex modeapp/src/main/java/dev/foldman/
MainActivity.kt hinge tracking, folder picker, sign-in launcher
deck/ DeckViewModel (transport state machine), shared models
playback/ local music: library scan, Media3 service, artwork, VU levels
remote/ other apps' media sessions (YT Music, Apple Music app)
apple/ MusicKit bridge, Apple Music API, crash-isolated player service
ui/ Compose UI: cassette, keys, gauges, panels, layouts
art/icon.svg launcher icon source
tools/ token and icon generators
docs/media/ README images and GIFs
Edit art/icon.svg (it's drawn on Android's 108-unit adaptive-icon grid), then run:
python3 tools/svg_to_icon.pyThis rewrites the foldman_icon_* layers in res/drawable/. They aren't named ic_launcher_* on purpose: MusicKit's auth AAR contains Android Studio's template robot under that name, and it would replace Foldman's icon.
Foldman · Apache 2.0 · © 2026 Devesh Rai · Not affiliated with Sony, Apple, Google or Samsung.