# Unstack libxposed (API 102) module that disables the stacked dual-SIM status bar icon introduced in Android 16 QPR1, bringing back separate per-SIM signal icons. | | Status bar | |---|---| | **Stock** | ![Stock stacked icon](screenshots/stock.jpg) | | **Unstack, data on SIM 1** | ![Data on SIM 1](screenshots/sim1_data.jpg) | | **Unstack, data on SIM 2** | ![Data on SIM 2](screenshots/sim2_data.jpg) | The stock stacked icon squeezes both SIMs into one glyph with a single `5G` label next to it, so the status bar no longer tells you which SIM is carrying mobile data. With Unstack, each SIM gets its own signal icon again and the network type label sits next to the SIM that's using data. ## What it changes Since Android 16 QPR1, when two SIMs are active SystemUI merges their signal bars into one stacked icon. Whether that happens is decided by a `Flow` named `isStackable` on the mobile icons interactor. Reconstructed from the decompiled `SystemUI.apk` (crDroid, Android 17), it looks roughly like this: ```kotlin // MobileIconsInteractorImpl val isStackable: Flow = icons.flatMapLatest { icons -> if (icons.isEmpty()) flowOf(false) else combine(icons.map { it.signalLevelIcon }) { levels -> /* true when both SIMs' cellular icons can be merged */ } } // MobileIconsViewModel val isStackable: StateFlow = combine(iconsAreAllVisible, interactor.isStackable) { visible, stackable -> visible && stackable }.stateIn(scope, SharingStarted.WhileSubscribed(), false) ``` The view model only shows the stacked icon when the interactor says the icons are stackable. Unstack hooks the interactor's `isStackable()` getter and makes it always return a flow of `false`: ```kotlin val falseFlow = MutableStateFlow(false) // created via SystemUI's own classloader module.hook(MobileIconsInteractorImpl::isStackable).intercept { falseFlow } module.hook(MobileIconsInteractorKairosAdapter::isStackable).intercept { falseFlow } ``` So `visible && stackable` is always `false`, and SystemUI falls back to drawing one signal icon per SIM. ### Why this hook point - **The getter, not the field.** The backing field is `final` and is built once in the constructor. The view model reads it through the `MobileIconsInteractor.isStackable()` interface method, so hooking the getter catches every consumer, with no need to touch the constructor or rewrite final fields. - **The flow is created in SystemUI's classloader.** The `Flow` type has to be SystemUI's own `kotlinx.coroutines` class. A flow built from the module's classes would be a different type and would fail when SystemUI collects it. - **Two implementations are hooked.** SystemUI has a second, Kairos-based mobile icons pipeline behind a flag. Its `Flow`-facing entry point is `MobileIconsInteractorKairosAdapter.isStackable()`. Hooking both covers whichever pipeline is active. A class that doesn't exist on a given build is logged and skipped. ## Build Requires `io.github.libxposed:api:102.0.0` in `mavenLocal()` (run `./gradlew publishToMavenLocal` in the [libxposed/api](https://github.com/libxposed/api) repo). ```bash ./gradlew assembleDebug adb install -r app/build/outputs/apk/debug/app-debug.apk ``` Vector discovers the module through `app/src/main/resources/META-INF/xposed/` (`java_init.list`, `module.prop`, `scope.list`). ## Usage 1. Enable **Unstack** in Vector. The scope is preset to System UI. 2. Restart SystemUI: `adb shell su -c 'pkill -f com.android.systemui'` 3. Check that the hooks attached: `adb logcat -s Unstack`