This article explains how to overload default or device-specific Android HALs included into emteria.OS with a user-specified HAL implementation. This empowers the user to customize their devices. Additional information on how to create a custom HAL based on Androids Health HAL can be found in the Android Documentation.
Note: This currently only works on Raspberry Pi 4 based devices.
- Extend the cmdline.txt at the boot partition with androidboot.product.board=<product-name>
Eg. for our Health HAL this is:
This could also be done through system properties.
- Create a prebuild of the HAL you want to overload with the naming scheme <HAL-name>.<product-name>.so.
Eg. for the Health HAL we will create:
- Boot up your device.
- Copy the prebuild onto the odm partition.
This can be done through adb.
Place the prebuild under:
/lib/hw or lib64/hw
- Reboot the device.
The standard HAL should now be overloaded.