Skip to content

fix(controller): show real device arch on the dashboard#8

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/dashboard-real-device-arch
Jun 18, 2026
Merged

fix(controller): show real device arch on the dashboard#8
luisguzman-adfa merged 2 commits into
mainfrom
fix/dashboard-real-device-arch

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Problem

The dashboard "device architecture" field reported the app's own ABI (derived from nativeLibraryDir), so a 32-bit build running on a 64-bit device wrongly displayed 32-bit. We intentionally install the 32-bit app on 64-bit hardware to test the 32-bit path, so the device panel must report the hardware truth, not the app's ABI.

Fix

Adds a small layered org.iiab.controller.deviceinfo slice (refactor-by-feature):

  • domain/DeviceAbiProvider (port) + GetDeviceArchUseCase (rule: prefer the device's primary 64-bit ABI, else 32-bit, else generic). Pure JVM.
  • data/BuildDeviceAbiProvider reads device-level Build.SUPPORTED_*_ABIS, which are populated from device system properties and so report the real hardware arch even inside a 32-bit process.
  • DashboardFragment uses the use case for the device panel only. getTermuxArch() (app/content ABI) is unchanged for modules, termux and debian arch — those should follow the app.

Testing

  • GetDeviceArchUseCaseTest (pure JVM) covers the key case: 32-bit app on a 64-bit device → arm64-v8a, plus 32-bit-only device, generic fallback, and unknown.
  • ./gradlew :app:assembleDebug — compiles.
  • Manual: install the 32-bit build on a 64-bit phone → the device panel now shows arm64-v8a (was 32-bit); termux/debian/module arch still reflect the app's ABI.

Notes

Follows CLAUDE.md: domain pure JVM, data reads Android, wired by hand. Design map + TECH_DEBT_PLAN.md updated.

The dashboard "device architecture" field reported the app's own ABI
(derived from nativeLibraryDir), so a 32-bit build running on a 64-bit
device wrongly displayed 32-bit. We intentionally install the 32-bit app
on 64-bit hardware to test the 32-bit path, so the device panel must
report the hardware truth, not the app's ABI.

Add a small layered "deviceinfo" slice (refactor-by-feature):
- domain: DeviceAbiProvider port + GetDeviceArchUseCase (prefer the
  device's primary 64-bit ABI, else 32-bit, else generic). Pure JVM,
  unit-tested incl. the 32-bit-app-on-64-bit-device case.
- data: BuildDeviceAbiProvider reads device-level Build.SUPPORTED_*_ABIS
  (populated from device properties, so correct even in a 32-bit process).
- DashboardFragment uses the use case for the device panel; getTermuxArch()
  (app/content ABI) is unchanged for modules, termux and debian arch.

Docs: CLAUDE.md design map + controller/docs/TECH_DEBT_PLAN.md progress log.
@luisguzman-adfa luisguzman-adfa merged commit 2594dd5 into main Jun 18, 2026
1 of 2 checks passed
@luisguzman-adfa luisguzman-adfa deleted the fix/dashboard-real-device-arch branch June 18, 2026 06:45
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.

1 participant