Repository navigation
Conversation
…ings, tests, and docs
… toggle, and pairing notice suppression
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82ae2cd87f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (_paused) { | ||
| _status.value = BuiltinShellStatus.Paused | ||
| return@withLock |
There was a problem hiding this comment.
Stop helper handoffs that finish after Pause
If the user pauses while a wireless-debugging launch has passed this guard but has not handed its Binder to hub.shell, pause() can cancel the retry and call stopHelper() before a helper exists. The detached helper can then attach afterward, and the paused collector only updates the status and returns, leaving the helper alive while Banking mode reports Paused. Serialize pause with an in-flight launch or stop any helper that attaches after pause.
Useful? React with 👍 / 👎.
| allowed() && s.stuck && unlocked && h != BuiltinShellStatus.Paused && | ||
| (direct() || h == BuiltinShellStatus.Running) && consent().wants(RecoveryCapability.Accessibility) |
There was a problem hiding this comment.
Gate accessibility repair on the pause flag
If Shizuku becomes unavailable while Banking mode is paused, BuiltinShellEngine.shizukuChanged() can replace the Paused status with idleStatus(), so this check allows recovery to proceed even though the persisted pause flag is still true. When WRITE_SECURE_SETTINGS and accessibility recovery consent are enabled, AccessibilityRepair can then write Mika back into the enabled-services list while the user is trying to keep it off. Check the pause state directly or preserve Paused through status changes.
Useful? React with 👍 / 👎.
| var a11yOff = before.accessibility == AccessibilityState.Off | ||
| var a11yNeedsManual = false | ||
| if (!a11yOff) { | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { |
There was a problem hiding this comment.
Use
disableSelf() across the supported API range
On supported Android versions 29–32, this branch never calls disableSelf() and always requires the user to turn off accessibility manually, even when Mika's service is running. AccessibilityService.disableSelf() has been available since API 24, so these devices leave accessibility enabled after Pause instead of completing the one-tap flow. Use the method on the APIs where it is available.
Useful? React with 👍 / 👎.
Summary
Adds Banking mode ("Pause Mika") under Settings → Banking mode, allowing users to temporarily pause Mika so strict banking apps that block accessibility services or wireless debugging can open, and then resume Mika afterward without uninstalling, re-pairing, or losing data.
What it does
BuiltinShellStatus.Paused):BuiltinShellEngine.pause()stops the running phone helper and suppresses the watchdog,AccessibilityRepair,PairingScreenauto-pairing, and pairing notifications—while preserving the saved wireless-debugging pairing key and port cache (unpair()/forget()is never called).BankingMode.kt): Persists thepausedflag across restarts (re-applied onMikaApp.onCreate()), stops any running task first, disables the accessibility service viadisableSelf()on Android 13+, and turns off wireless debugging whenWRITE_SECURE_SETTINGSis held (falling back to clear manual instructions otherwise).BankingScreen.kt): Clearspaused, re-enables wireless debugging when permitted, reconnects the helper using the saved pairing, and lists any remaining manual steps (such as toggling Accessibility back on in system settings, which Android forbids an app from doing itself).Banking moderow under Capabilities inSettingsScreenand shows a non-error paused status banner that routes to Settings.Adaptations for upstream
mainmain(9c7aabd8) with all fork-specific code removed (noMika 2branding, noapp/build.gradle.ktsversion/package changes, nodocs/play-internal-testing.md).BuiltinShellStatus.Pausedalongside upstream's Shizuku transport checks inBuiltinShellEngineandPhoneSetupCopy, andFix.OpenPhoneOpsinMainActivity.strings_banking.xmlanddocs/banking-mode.mdwith generic banking-app wording.BuiltinShellEngineBankingTest.ktto avoid touchingBuiltinShellEngineTest.kt.How to test
Paused, accessibility turns off (Android 13+), wireless debugging turns off (ifWRITE_SECURE_SETTINGSis granted), and the home banner showsMika paused.