-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[T/U] hardware/health: Upgrade to 2.1
via libhealth2impl
#918
Conversation
Since the migration to `[email protected]` in [#918] we're using the builtin passthrough service that loads our custom implementation from an `impl` library. Android's builtin vendor sepolicy already labels this binary with `hal_health_default_exec`, and the `2.0-service.sony` file is no longer provided and should be removed. [#918]: sonyxperiadev/device-sony-common#918
Since the migration to `[email protected]` in [#918] we're using the builtin passthrough service that loads our custom implementation from an `impl` library. Android's builtin vendor sepolicy already labels this binary with `hal_health_default_exec`, and the `2.0-service.sony` file is no longer provided and should be removed. [#918]: sonyxperiadev/device-sony-common#918
Since the migration to `[email protected]` in [#918] we're using the builtin passthrough service that loads our custom implementation from an `impl` library. Android's builtin vendor sepolicy already labels this binary with `hal_health_default_exec`, and the `2.0-service.sony` file is no longer provided and should be removed. [#918]: sonyxperiadev/device-sony-common#918
@MarijnS95 |
Looking at the code, perhaps it should have been named |
@MarijnS95 |
It's been too long. I'm thinking the following to test:
|
Note that the thing I've done here looks to be very similar to what AOSP recommends: https://android.googlesource.com/platform/hardware/interfaces/+/main/health/2.1/README.md#impl |
@MarijnS95 |
The `libhealthservice` and `libhealthstoragedefault` helper libraries to implement Health HALs have been removed in Android 14 QPR 3. At the same time a newer 2.1 HIDL HAL has been made available (which is already deprecated too, in favour of an AIDL HAL). Upgrade our custom implementation - which backs up the battery cycles and learned capacity - to leverage `libhealth2impl` and automatically implement `[email protected]`. Its implementation and header even describe how to upgrade away from the old `healthd_board_*()` callback symbols. Furthermore, the default implementation already provides a passthrough service, which allows us to convert this service to an `impl` library and use the builtin service (plus all the files it needs) instead. In the end this all turns out to already be documented explicitly upstream: https://android.googlesource.com/platform/hardware/interfaces/+/main/health/2.1/README.md#impl
Fixes #916
Fixes sonyxperiadev/bug_tracker#835
Closes #917, CC @ShujathMohd
Caution
This pull request has only been build-tested on Android T, and has never been tried on an actual device yet!
Please help me do so if you have the opportunity.
The
libhealthservice
andlibhealthstoragedefault
helper libraries to implement Health HALs have been removed in Android 14 QPR 3. At the same time a newer 2.1 HIDL HAL has been made available (which is already deprecated too, in favour of an AIDL HAL). Upgrade our custom implementation - which backs up the battery cycles and learned capacity - to leveragelibhealth2impl
and automatically implement[email protected]
.Its implementation and header even describe how to upgrade away from the old
healthd_board_*()
callback symbols.Furthermore, the default implementation already provides a passthrough service, which allows us to convert this service to an
impl
library and use the builtin service (plus all the files it needs) instead.TODO