Skip to content

1.4.3: root HID injection and Material 3 Expressive redesign - #46

Open
anasvhora284 wants to merge 12 commits into
masterfrom
feature/root-injection
Open

anasvhora284 wants to merge 12 commits into
masterfrom
feature/root-injection

Conversation

@anasvhora284

@anasvhora284 anasvhora284 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Overview

Release 1.4.3 does two things:

  • Root input path. On a rooted device, Input Leaf grants su through libsu and hosts the same input injector at uid 0, so HID injection no longer depends on Shizuku. The 1.4.2 keyboard and mouse behavior stays.
  • Material 3 Expressive redesign. Every screen moves to Material 3 Expressive, with dynamic color, edge-to-edge drawing, and new screenshots across the README.

Features Added

  • Root-backed HID injection

    • RootInputInjectorService hosts the existing IInputInjector stub at uid 0.
    • su is granted through Shell.getShell().
    • The root service category is v5, so a daemon left from the parked branch is not reused.
  • 1.4.2 HID behavior kept

    • OPEN readiness, deferred INPUT2, reader teardown, enter warp inside the injector, client-death destroy, and the mouse staying registered across Leave.
    • The parked branch's older START/CURSOR UHID rework is not restored.
  • Material 3 Expressive UI

    • MaterialExpressiveTheme with the expressive motion scheme, dynamic color on Android 12+, and a leaf-green fallback scheme on older versions.
    • Short navigation bar, large flexible top app bars, segmented list items for settings and server lists, connected toggle buttons for the theme choice, loading indicators, and Material shapes for status badges.
    • The connection status card uses color roles: primary when active, secondary when idle, tertiary while connecting, and error when disconnected.
    • The Shizuku, root, and Accessibility permission cards use Material 3 cards, shapes, and color roles for their Ready and Done states.
    • The app draws edge to edge, so the status and navigation bars show the theme surface instead of the old ocean blue window colors.
  • Docs and release notes

    • The README gallery is replaced with 25 screenshots of every screen and dialog, in dark and light themes (docs/screenshots/). The old docs/0*_*.jpg images are removed.
    • The README feature list and the in-app What's New notes for 1.4.3 mention the redesign.

Bug Fixes

  • Root grant handling
    • A su grant made at connect time is remembered.
    • Root that was never asked for stays off the Accessibility HID host.
    • A Shizuku restart is ignored only for the root injector itself.
    • An explicit root session is not recovered as a Shizuku session.
  • Coverage gate: Codecov has no setting for lines without JaCoCo probes, so the Android upload counted them as misses and failed the 100% patch gate. scripts/codecov_skip_unprobed.py uploads those lines as skipped. A missed instruction or a fully missed branch still counts.

Technical & Architectural Improvements

  • Host-agnostic injector: ShizukuInputInjector talks to PrivilegedUserServiceHost. Shizuku and root are two hosts for the same injector (PrivilegeSelector, RootAccess).
  • Theme in one place: ui/theme/Theme.kt owns the color and motion schemes. The inline scheme in MainActivity, Shape.kt, and GradientCard.kt are removed.
  • Settings primitives: SettingsGroup, SettingsRow, SettingsSwitchRow, and ConnectedChoiceRow build every settings section. The separate theme dialog is replaced by an inline choice row.
  • Dependency: androidx.compose.material3 is pinned to 1.5.0-alpha29 for the Expressive APIs.
  • Release bump: versionName 1.4.3 and versionCode 9.

Screenshots

Captured on a OnePlus Nord 4 (Android 16) with dynamic color. The README gallery uses the same images from docs/screenshots/.

Onboarding: welcome
Onboarding: welcome
Onboarding: input method
Onboarding: input method
Onboarding: Accessibility
Onboarding: Accessibility
Home: disconnected
Home: disconnected
Home: connecting
Home: connecting
Home: connected
Home: connected
Servers: discovered
Servers: discovered
Servers: favorites
Servers: favorites
Servers: connected
Servers: connected
Add server
Add server
Trust fingerprint
Trust fingerprint
Permissions: Shizuku
Permissions: Shizuku
Permissions: root
Permissions: root
Settings: connection & display
Settings: connection & display
Settings: security
Settings: security
Settings: about
Settings: about
Connection security dialog
Connection security dialog
Input method dialog
Input method dialog
Cursor style dialog
Cursor style dialog
Screen name dialog
Screen name dialog
Author dialog
Author dialog
Light: home
Light: home
Light: servers
Light: servers
Light: permissions
Light: permissions
Light: settings
Light: settings

Issues Closed & Resolved

No open issue is closed here. Android TV clicks (#45) stay a separate change.


Test Plan & Verification

  • Privilege unit tests cover root availability, the su grant, remembered grants, and the Shizuku and root service hosts.
  • The onboarding smoke test asserts the on-screen heading, "Choose an input method".
  • CI on 6fce719: fast-jvm, android-coverage, codecov/patch, and qlty check pass.
  • Unit tests pass locally after the Material 3 Expressive migration.
  • Device run on a OnePlus Nord 4 (Android 16): onboarding, all four tabs, every settings dialog, and dark and light themes. Connected to an InputLeap 1.8 server after trusting its fingerprint.
  • Rooted device: started via root, the injector runs at uid 0, and HID attaches on Enter and detaches on Leave.

Rebased onto master after 1.4.2. RootInputInjectorService hosts the same
IInputInjector stub at uid 0, and su is granted through Shell.getShell().
ShizukuInputInjector is host-agnostic behind PrivilegedUserServiceHost.

Master's 1.4.2 HID behavior stays: OPEN readiness, deferred INPUT2, reader
teardown, enter warp inside the injector, client-death destroy, and the mouse
staying registered across Leave. The parked branch's older START/CURSOR UHID
rework is not restored.

The root service category is v5 so a daemon left from the parked branch is not reused.
versionName 1.4.3 and versionCode 9. The changelog notes su-backed uid-0 HID injection.
The emulator smoke test clicked Next and then required "Non-root Accessibility"
to be displayed. That row is composed but below the fold, so assertIsDisplayed
failed android-coverage. The page heading is the visible proof Next advanced.
@codecov

codecov Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Codecov requires 100% of the diff. Exercise root availability, the su
grant, and the Shizuku and root service hosts that the new code adds.
JaCoCo never probed the try/catch and signature lines in the root
privilege diff, so Codecov marked them uncovered. Fold those lines
onto instructions the unit tests already execute, and cover the
cached-root branch that skips closing the shell.
JaCoCo does not probe the Shizuku try/catch or the root host and
factory signatures. Put those lines on instructions the unit tests
already run so the 100% patch gate can see them.
@cursor
cursor Bot force-pushed the feature/root-injection branch 2 times, most recently from 9da8ea1 to 92804ba Compare September 28, 2026 05:38
Remember a connect-time su grant, keep never-asked root off the
accessibility HID host, ignore a Shizuku restart only for the root
injector itself, and do not recover an explicit root session as
Shizuku. Restore the try/catch and signatures that were folded only
so JaCoCo would count them.
Codecov has no Jacoco setting for a line with no probes, so the Android
upload's miss on those lines fails the 100% patch gate. Upload skipped
coverage for lines the JVM report did not probe. A missed instruction
or a fully missed branch stays in the report.
@anasvhora284
anasvhora284 marked this pull request as ready for review September 28, 2026 14:55
Copilot AI lite review requested due to automatic review settings September 28, 2026 14:55

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @anasvhora284, your pull request is larger than the review limit of 150,000 diff characters

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@anasvhora284

Copy link
Copy Markdown
Owner Author

@guaje Can you please review this PR???

anasvhora284 and others added 4 commits September 29, 2026 06:00
The Shizuku, root, and accessibility cards were custom boxes with a
hardcoded corner and no card elevation. Use the theme's Material 3
Card, shape, and color roles. Layout and copy stay the same.
Theme the whole app with MaterialExpressiveTheme on material3 1.5.0-alpha29,
using dynamic color on Android 12+ and a leaf-green fallback scheme below it.
Screens use segmented list items, flexible top app bars, the short navigation
bar, connected toggle buttons, loading indicators and Material shapes.

Draw edge to edge so the system bars show the theme surface instead of the
old ocean blue window colors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Capture every screen and dialog, in dark and light themes, and group them
in the README gallery.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the redesign to the in-app What's New highlights and the README feature list.

Co-authored-by: Cursor <cursoragent@cursor.com>
@anasvhora284 anasvhora284 changed the title Root injection as the 1.4.3 start 1.4.3: root HID injection and Material 3 Expressive redesign Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants