Skip to content

Rewrite ADB Manager: Rust core with native macOS, Windows and Linux apps - #2

Closed
oss96 wants to merge 5 commits into
masterfrom
claude/companion-app-redesign-acrb8e
Closed

oss96 wants to merge 5 commits into
masterfrom
claude/companion-app-redesign-acrb8e

Conversation

@oss96

@oss96 oss96 commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Replaces the Windows-only WinForms app (it stays in git history) with a cross-platform desktop companion for Android devices.

What's in it

  • Core (crates/adbm-core, Rust): talks the adb host protocol directly (device tracking, shell with exit codes, file sync, reboot, connect) and drives fastboot. Reads APK manifests itself, without aapt. Every action runs as a cancellable job across the selected devices in parallel, with a concurrency limit and a result per device. A device that reboots keeps its row and name.
  • C interface (crates/adbm-ffi): seven functions, JSON in and out (include/adbm.h), used by the Swift and C# apps.
  • Linux: GTK 4 + libadwaita 1.5, uses the core directly.
  • macOS: SwiftUI Swift package that links the core as a static library.
  • Windows: WinUI 3, unpackaged. The UI is built in C#, so the whole app type-checks on any OS. UI-independent logic lives in AdbManager.Core.
  • Design: design/ has the design language, colour tokens (all WCAG AA), an icon map and a mockup. The reviewed plan and its trade-offs are in docs/PLAN.md.
  • Routines: ordered steps with wait-for steps. The old app's "Boot TWRP and push folder" flow is a built-in template.

Testing

  • 37 Rust tests, run against an in-process fake adb server that speaks the real protocol, plus an FFI contract test and an opt-in test against a real adb server.
  • scripts/check-bridges.sh runs the Swift and C# bridges against the real core.
  • CI builds all three apps on their own OS. It passes on this PR.
  • The Linux app was run under Xvfb against the fake server (screenshots in docs/screenshots/).
  • Not yet done: the macOS and Windows apps have not been run on real machines, and none of the apps has been tested with physical Android devices. The README says so too.

Notes for review

  • adb and fastboot are not bundled. The app finds an installed Android platform-tools, or you set the paths in Settings.
  • Building the Windows app needs Visual Studio's MSBuild. dotnet build alone is missing WinUI's resource tasks.

🤖 Generated with Claude Code

https://claude.ai/code/session_0117v8buDuPb1HHuxdbtPBzG

The old .NET Framework/WinForms app is removed (it remains in history).
docs/PLAN.md holds the reviewed rewrite plan: a Rust core with a JSON C ABI
and native UIs (SwiftUI, WinUI 3, GTK4/libadwaita). design/ holds the
shared design language, tokens, icon map and a Devices screen mockup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117v8buDuPb1HHuxdbtPBzG
adbm-core: native ADB host-protocol client (track-devices, transport,
shell v1/v2, sync LIST/STAT/SEND/RECV, reboot, connect), fastboot via
platform-tools, APK manifest (AXML) reader, device registry that keeps a
row per device across adb/fastboot/reboots, and a job engine with
per-device fan-out, concurrency limit, progress, cancellation and
routines (including the old TWRP flow as a template).

adbm-ffi: seven-function C ABI with JSON messages for the Swift and C#
apps, header in include/adbm.h, and a contract test that drives it the
way the apps do.

Tested against an in-process fake adb server and, opt-in, a real one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117v8buDuPb1HHuxdbtPBzG
Links adbm-core directly and pumps its events on the GLib main loop.
Implements the shared design: device table with multi-select targets,
state chips, inspector, empty and adb-missing states; Apps (install with
drag and drop, package list, uninstall), Files (browse, push, pull, new
folder, delete), Shell (per-device output), Routines (templates with file
pickers), Activity (per-device progress, cancel, log) and Preferences.
Uses the Bridge teal tokens in light and dark.

Also: a runnable fake_adb example for UI work without hardware, per-device
models in the fake server, clearer routine step titles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117v8buDuPb1HHuxdbtPBzG
macOS: Swift package linking the core's static library through a
module map over adbm.h. Implements the design with NavigationSplitView,
Table multi-select, inspector, toolbar, banners and all sections.

Windows: WinUI 3 unpackaged app built in C# (no XAML markup), so the
whole app type-checks on any OS. UI-independent logic lives in
AdbManager.Core (bridge, models, view models) with a smoke test.

scripts/check-bridges.sh runs the Swift and C# bridges against the real
core and the fake adb server; CI builds all three apps on their own OS.
README states what has and has not been run on each platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117v8buDuPb1HHuxdbtPBzG
dotnet publish failed on the WinUI PRI resource task, which ships only
with Visual Studio's MSBuild, not the .NET CLI SDK. Build with msbuild
(setup-msbuild) instead, and update the README's Windows instructions to
match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117v8buDuPb1HHuxdbtPBzG
@oss96 oss96 changed the title Start rewrite: remove WinForms app, add plan and design language Rewrite ADB Manager: Rust core with native macOS, Windows and Linux apps Sep 26, 2026
@oss96 oss96 closed this Oct 31, 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