An all-in-one sample / smoke-test target for the boringdroid AOSP patchset. A single Kotlin Compose activity that exercises every distinctive boringdroid surface in one APK:
- Freeform window — opens in a freeform window by default on a boringdroid build (
config_freeformWindowManagement=true). Title bar, drag-to-move, resize handles, minimize/maximize/close caption buttons. - Peek caption — maximize the window to fullscreen and hover the top edge; the slim peek caption slides down with restore / close affordances. Gated by
persist.boringdroid.peek_caption=true(default on) and the legacy decor mode. - Taskbar context menu — long-press the app's running-app icon in the taskbar to open the Maximize / Minimize / Close popup.
- Material You themed icon — ships a
<monochrome>adaptive-icon layer, so when the user toggles Themed icons in Wallpaper & style (or viaadb shell settings put secure theme_customization_overlay_packages '{"android.theme.customization.themed_icon":"1"}'), this app's icon recolors withsystem_accent1_*everywhere BoringdroidSystemUI'sThemedIconLoaderis in play — the AllApps grid, the taskbar rail, the Overview chips, and the peek caption. - Material 3 dynamic color — the activity's body uses
dynamicLight/DarkColorScheme(context)on API 31+, so changing the wallpaper visibly retints all six color swatches in the Material You card without a rebuild.
The activity body itself is a vertical stack of cards: Hero (the big themed icon), Window State (multi-window mode, app bounds, density, orientation, SDK version), Material You (six color swatches + dynamic-color status), Boringdroid system properties (persist.sys.systemuiplugin.enabled, persist.boringdroid.peek_caption, persist.wm.debug.desktop_mode[_2], plus the Themed Icons setting), Try It (a manual checklist), and a Launch-another-instance button.
The sample is a Soong module — it builds against the AOSP tree, not via Gradle:
# From the AOSP root (parent of this `samples/` directory):
source build/envsetup.sh
lunch boringdroid_x86_64-userdebug
m HelloBoringdroidThe APK lands at out/target/product/boringdroid_x86_64/system/app/HelloBoringdroid/HelloBoringdroid.apk (or the equivalent for whatever lunch target you picked).
The sample is not part of PRODUCT_PACKAGES — it doesn't ship on the default boringdroid image. Install it manually onto a booted emulator or device after m:
adb install -r out/target/product/boringdroid_x86_64/system/app/HelloBoringdroid/HelloBoringdroid.apkIf the emulator has the BoringdroidSystemUI plugin loaded (it does on boringdroid_x86_64-userdebug), launching the app from the AllApps grid (Meta key) or directly via am start -n com.boringdroid.hello/.MainActivity opens it in a freeform window.
After install:
-
Freeform open + caption. Launch from AllApps; the window appears with a draggable title bar. Try the maximize / minimize / close buttons in the caption.
-
Peek caption. Maximize the window to fullscreen (click the maximize button or use the boringdroid keyboard shortcut). Move your cursor to the top edge of the screen — the peek caption slides down. Move away and it tucks back. Gated by:
adb shell setprop persist.boringdroid.peek_caption true # default
The legacy WMShell decor must also be active — peek skips arming on modern desktop-mode (
persist.wm.debug.desktop_mode/_2). -
Taskbar context menu. Long-press the Hello Boringdroid icon on the taskbar's running-app rail. A popup with Maximize / Minimize / Close appears (or just Close if the window is minimized).
-
Material You themed icon. Toggle the Themed Icons setting:
adb shell settings put secure theme_customization_overlay_packages \ '{"android.theme.customization.themed_icon":"1"}' adb shell killall com.android.systemui # forces ThemedIconLoader to re-read
The Hello Boringdroid icon now renders as a tinted monochrome silhouette on the AllApps grid, the taskbar rail, the Overview chips, and the peek caption. Toggle off (
"0") to revert — no SystemUI restart needed; theContentObserverclears the cache. -
Material You dynamic color. Change the wallpaper. The six color swatches in the activity's Material You card retint on the next configuration change.
samples/HelloBoringdroid/
├── Android.bp ← Soong module (android_app)
├── AndroidManifest.xml ← (in app/src/main/)
├── README.md
├── .gitignore
└── app/src/main/
├── AndroidManifest.xml ← LAUNCHER intent-filter, resizeableActivity
├── java/com/boringdroid/hello/
│ └── MainActivity.kt ← single-file Compose UI
└── res/
├── mipmap-anydpi-v26/ic_launcher.xml ← <adaptive-icon> with <monochrome>
├── drawable/
│ ├── ic_launcher_background.xml ← purple background
│ ├── ic_launcher_foreground.xml ← window-with-caption glyph
│ └── ic_launcher_monochrome.xml ← Material You tinted layer
└── values/
├── strings.xml
└── themes.xml ← transparent NoActionBar theme
Android.bp pulls AOSP-hosted Compose Material3 (1.2.0-alpha04 in this tree), Compose Foundation, Activity-Compose, and Lifecycle-Runtime-KTX. The sample stays on sdk_version: "current" — no platform_apis needed. System property reads (persist.boringdroid.*) go through android.os.SystemProperties via reflection so the SDK build still works.
Apache 2.0 — see LICENSE. Same as the rest of the boringdroid project.