If you have ever done custom AOSP or Embedded Android bring-up on a MediaTek or Qualcomm device, you probably know this loop way too well:
- Device bootloops or a HAL silently refuses to come up.
- You pull
adb logcat,dmesg, and/data/tombstones. - You grep for
avc: denied,hwservicemanager,Direct firmware load, orSIGSEGV. - You run
audit2allow, realize half of its output will break AOSP CTSneverallowrules, and rewrite the.temacros by hand anyway.
While working on an Android 17 / GKI 6.6 bring-up (infinity-dash for a MediaTek Dimensity device), I got tired of repeating that manual triage loop on every build and packaged the tooling into a small open-source CLI: Acrionix.
- GitHub: https://github.com/acrionix-labs/acrionix-cli (Apache-2.0)
- PyPI:
pip install acrionix-cli(zero external dependencies, Python 3.10+) - Live web sandbox (no install needed): https://acrionix.cloud/#sandbox
Why not just audit2allow?
audit2allow does exactly one thing: it turns every single avc: denied line into a raw allow statement. On a real Android 16/17 device in SELinux Enforcing mode, that causes two annoying problems:
- It does not collapse rules into idiomatic AOSP macros (
binder_call,r_file_perms,rw_file_perms,r_dir_perms). - It happily emits rules for things you should never allow, like banking apps probing
selinuxfs,proc_kallsyms,proc_modules, orproc_bootconfigfor root detection. If you blindly merge those into your tree, CTSneverallowchecks will fail the build.
When I tested acrionix doctor --adb --root on my live Android 17 device today, it scanned 968 lines of live logcat, dmesg, SYSTEM_LAST_KMSG, and the latest tombstone in 387ms, and automatically:
- Caught 5
untrusted_app_34anti-root probes (proc_kallsyms,proc_keys,proc_modules,proc_bootconfig,selinuxfs), flagged them as CTSneverallowwarnings, and refused to emit unsafe.terules for them. - Triaged a real vendor Bluetooth HAL crash (
SIGSEGVnull pointer dereference in/vendor/lib64/libbt-vendor.so (mtk_bt_op+580)insideVendorInterface::Shutdown()). - Caught a subtle DSU boot failure (
reboot: Restarting system with command 'opex_incremental_disable') that was getting trapped by DSU's defaultone_shot_boot=1flag.
Quick Example: From Raw Failure Log to git apply --check
Install the CLI:
pip install acrionix-cli Triage an offline log against your local device tree:
acrionix triage ./boot_failure.log --tree ./device/oem/common --out fix.patch git apply --check fix.patch Or inspect a connected device over ADB:
acrionix doctor --adb # With root access (also inspects dmesg, latest tombstone, and last_kmsg): acrionix doctor --adb --root You can also stream live logcat while testing on a bench:
acrionix watch --adb --tree ./device/oem/sm8650 --out-dir ./.acrionix What v0.5.0 handles today
- SELinux AVC synthesizer - maps
avc: deniedtuples into scoped AOSP macros and blocks common CTSneverallowtraps. - VINTF / HAL mismatch resolver - parses
hwservicemanagerandVintfObjecterrors and patchesmanifest.xml. - Init + missing firmware correlation - connects
initdaemon exit codes to kernelDirect firmware load ... failed with error -2and addsPRODUCT_COPY_FILESentries indevice.mk. - Kernel oops / panic & native tombstone triage - extracts faulting addresses,
Call trace:frames, and out-of-tree/vendor_dlkmdriver modules. - CI automation (
--open-prand--cloud) - validates patches withgit apply --check, creates a fix branch, and opens a GitHub PR (or runs stateless analysis viaPOST https://acrionix.cloud/api/triage).
Try it or break it
The codebase is tiny, pure Python stdlib, and Apache-2.0 licensed. If you work on AOSP, custom ROMs, automotive IVI, or Embedded Linux and have weird logcat / dmesg / kernel panic logs that break our parsers, open an issue at https://github.com/acrionix-labs/acrionix-cli and I will add test coverage for them.