-
Notifications
You must be signed in to change notification settings - Fork 13
Offline AI integration failing on Pixel 9a (Android 16) - Possible 16KB Page Alignment Issue #53
Description
Description:
Hi, I am experiencing a persistent issue with the Offline version of LeanType (v3.7.5) on a Google Pixel 9a running Android 16.
Behavior:
Despite correctly selecting the ONNX model files (Encoder, Decoder Merged, and Tokenizer), the AI functions do not produce any output. Specifically:
When I select text and press the "Proofread" button, the text highlights for about 1.5 seconds, then the highlight disappears and no changes are applied.
After the first failure, subsequent attempts cause the highlight to flash for only a micro-second before cancelling.
In the "AI Integration" settings, the files show as "Selected", but the UI often fails to display the actual filename for the Decoder and Tokenizer (see attached screenshots).
Environment:
Device: Google Pixel 9a (Tensor G4)
OS: Android 16
App Version: 2-LeanType_3.7.5-offline-release.apk
Models used: Both Flan-T5-Base and Flan-T5-Small (Xenova quantized versions).
Troubleshooting already performed:
Granted "Access to all files" permission via Special App Access.
Set Battery usage to "Unrestricted".
Enabled "Keep model loaded" in AI settings.
Moved .onnx and .json files to a custom folder in internal storage to bypass Scoped Storage restrictions.
Cleared app cache and performed "Force Stop" multiple times.
Tested in simple text editors like Google Keep with no success.
Technical Hypothesis:
Given that this is a Pixel 9a on Android 16, I suspect the issue might be related to the new 16KB memory page alignment requirement for native libraries (.so files). If the current ONNX runtime or the JNI bridges in the APK are compiled with the 4KB standard, the kernel might be silently blocking the inference engine.
Could you please verify if the current build supports 16KB page alignment or if a re-compilation is planned for newer Android versions?
Thank you for this amazing project and for your help!