This knowledge base 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:
androidboot.product.board=emteria
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:
android.hardware.health@2.1-impl-emteria.so
- 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.