Skip to content

Secure Hardware Detection Fails on Android After Upgrading to Flutter 3.35.4 (onSecureHardwareNotAvailable Triggered Always) #188

@danielsotelotasgroup

Description

@danielsotelotasgroup

Describe the bug
After upgrading Flutter and freeRASP, the onSecureHardwareNotAvailable callback is triggered on all Android devices, even on hardware where it previously worked correctly.
With Flutter 3.7.9 and freeRASP 6.3.0, this callback was not triggered, and secure hardware was detected properly.
However, on Flutter 3.35.4 (or newer) with freeRASP 6.3.0 or 7.3.0, the callback always fires, indicating that secure hardware is missing even when the device actually has it.

To Reproduce

  1. Create or use a Flutter project using version 3.35.4.
  2. Install and configure freeRASP (tested with versions 6.3.0 and 7.3.0).
  3. Run the app on a physical Android device or emulator.
  4. Notice that onSecureHardwareNotAvailable is triggered every time.

Expected behavior
The expected behavior is that onSecureHardwareNotAvailable should only fire when the Android device truly lacks secure hardware.
In previous versions (Flutter 3.7.9 + freeRASP 6.3.0), detection worked correctly.
Consistent secure hardware detection is expected regardless of the Flutter version.

Screenshots
(Not applicable at the moment; the issue is visible in callback logs.)

Please complete the following information:
Device: Samsung SM-A256B, Xiaomi 22081212UG, Google Pixel 8 emulator (sdk_gphone64_arm64)
OS version: Android 12 / Android 14 / Android 15 / Android 16
Version of freeRASP: tested 6.3.0 and 7.3.0
Flutter version: 3.35.4 (problematic), 3.7.9 (working as expected)

Additional context
The issue occurs in Android devices and in both debug and release modes and is reproducible across multiple brands and models.
Even running older freeRASP versions on the new Flutter version still produces the issue, suggesting that a change in Flutter (possibly in the Android keystore/security APIs) may be affecting freeRASP’s secure hardware detection.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions