Ujanja Ni Uhai (Hustling Is Life)

Android porting: ueventd parsing order

In a recent CyanogenMod 9 port I needed to set permissions on various device nodes at boot. I knew I needed to use ueventd, but I wasn’t sure which file Android’s ueventd daemon was looking in for device-specific rules.

As it turns out, Android’s init system decides which ueventd.*.rc file to parse based on the kernel’s androidboot.hardware command line parameter. Here’s the relevant snippet from system/core/init/ueventd.c: