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:

  1. Device bootloops or a HAL silently refuses to come up.
  2. You pull adb logcat, dmesg, and /data/tombstones.
  3. You grep for avc: denied, hwservicemanager, Direct firmware load, or SIGSEGV.
  4. You run audit2allow, realize half of its output will break AOSP CTS neverallow rules, and rewrite the .te macros 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.

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:

  1. It does not collapse rules into idiomatic AOSP macros (binder_call, r_file_perms, rw_file_perms, r_dir_perms).
  2. It happily emits rules for things you should never allow, like banking apps probing selinuxfs, proc_kallsyms, proc_modules, or proc_bootconfig for root detection. If you blindly merge those into your tree, CTS neverallow checks 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_34 anti-root probes (proc_kallsyms, proc_keys, proc_modules, proc_bootconfig, selinuxfs), flagged them as CTS neverallow warnings, and refused to emit unsafe .te rules for them.
  • Triaged a real vendor Bluetooth HAL crash (SIGSEGV null pointer dereference in /vendor/lib64/libbt-vendor.so (mtk_bt_op+580) inside VendorInterface::Shutdown()).
  • Caught a subtle DSU boot failure (reboot: Restarting system with command 'opex_incremental_disable') that was getting trapped by DSU's default one_shot_boot=1 flag.

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: denied tuples into scoped AOSP macros and blocks common CTS neverallow traps.
  • VINTF / HAL mismatch resolver - parses hwservicemanager and VintfObject errors and patches manifest.xml.
  • Init + missing firmware correlation - connects init daemon exit codes to kernel Direct firmware load ... failed with error -2 and adds PRODUCT_COPY_FILES entries in device.mk.
  • Kernel oops / panic & native tombstone triage - extracts faulting addresses, Call trace: frames, and out-of-tree /vendor_dlkm driver modules.
  • CI automation (--open-pr and --cloud) - validates patches with git apply --check, creates a fix branch, and opens a GitHub PR (or runs stateless analysis via POST 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.