Subsequently moves the default board hooks to hardware/interface/health
where the new HAL is defined.
This change removes 'healthd's dependency on libhealthd.<target> static hal.
The dependency has now been *temporarily* moved to the new HAL
implementation in hardware/interfaces/health. 'charger' continues to depend
the static HAL.
Test: Tested healthd with and without a board specific health HAL on
Angler.
Bug: b/32724915
Change-Id: I35b56bacde7ded0517bc960f35538d6ca46e6b06
Signed-off-by: Sandeep Patil <sspatil@google.com>
This splits healthd code into 2 pieces as described below.
charger - statically linked executable in /sbin
- responsible for charger-mode UI
- battery/charger monitoring in recovery/charger-mode.
healthd - dynamically linked (*mostly*) executable in /system/bin
- responsible for battery / charger monitoring in Android
- runs 'batteryproperties' service.
Both currently use libhealthd STATIC HALs. However, this now paves
way for the healthd (android) HAL to be a shared library that can
be trebelized.
text data bss dec hex filename
733356 15312 33864 782532 bf0c4 root/sbin/charger
55943 10392 192 66527 103df system/bin/healthd
789299 25704 34056 849059 cf4a3 (TOTALS)
Test: Tested recovery, charge-only and android boot with new binaries
with and without STATIC HAL.
Change-Id: I80f94948dda44d466f172d234b3fcc9064ef2476
Signed-off-by: Sandeep Patil <sspatil@google.com>
This renames the old '/sbin/healthd' to '/sbin/charger'
which is to be only used in recovery and charger-only mode.
.. and adds a new dynamically linked executable in /system/bin/healthd
to be used as 'healthd' in Android.
text data bss dec hex filename
817404 36704 37960 892068 d9ca4 root/sbin/charger {was healthd}
72717 11064 12984 96765 179fd system/bin/healthd {*new*}
890121 47768 50944 988833 f16a1 (TOTALS)
Corresponding changes in recovery and charger-only .rc files are
required change how 'charger' is launched in each mode.
Update the seclable for healthd with the launch path in init.rc
Test: Boot tested and verified all 3 modes (recovery, charge-only,
android)
Change-Id: I4ada27a4c113258c5be1fd10adb0f58232b10024
Signed-off-by: Sandeep Patil <sspatil@google.com>
The charger code lands in 'libhealthd_charger' and androoid/framework
facing code is now compiled into 'libhealtdh_android' (formerly
libhealthd_internal).
This is a pre-cursor to eventually splitting healthd into 2 binaries,
viz ..
1. /sbin/charger - statically linked binary to be used *only* in recovery
and charge-only mode(s).
2. /system/bin/healthd - dynamically linked binary to be used *only* in
Android.
The static board hal (i.e libhealthd.<target>) will then be compiled
twice for charger and healthd seperately, paving the way for us to
seperate out the HAL for Android
Test: Boot tested and verified 'healthd' works in recovery,
charger-only mode and Android.
Change-Id: If45213ddd14c00ea3b8e1759cfd99286ca1ef2ea
Signed-off-by: Sandeep Patil <sspatil@google.com>
Fixed a bug in makefile that was keeping CHARGER_ENABLE_SUSPEND from
getting properly set, so healthd was not trying to put kernel into
suspend.
Bug: 32162033
Change-Id: If054d7996fa5734285cbcd7d497492570076c141
Devices can now override DEFAULT_PERIODIC_CHORES_INTERVAL_FAST
and DEFAULT_PERIODIC_CHORES_INTERVAL_SLOW by defining a value for
BOARD_PERIODIC_CHORES_INTERVAL_FAST and/or BOARD_PERIODIC_CHORES_INTERVAL_SLOW
in the device's BoardConfig.mk file.
Bug: 32162033
Change-Id: I956fd4760893ae6c2eb3a3af586353d4d66daf25
Allow the charging animation to be customized with a configuration file
and custom assets.
- Add a parser to parse a custom configuration file.
- Add support for showing a clock and the battery percentage.
- Expand feature that conditionally shows animation frames using min_level
and level_only to min_level and max_level
BUG: 29547343
Change-Id: Ia33f4bb37dc7d4c7fa6507a63481e93bf0bf9738
In readFromFile() when a newline is not found in the data, we reset
the initial character of the buffer to \0, but leave the count as is
(something >0 in this case).
Later in getBooleanField() we could erroneously treat a response as
"true" because count would be >0 and the initial value of buf would
be != '0' (set to \0 in this case).
To fixup error paths such as this, we can simplify readFromFile
by using android::base functions: ReadFromFileString() and Trim().
NOTES:
- Converted char * buffers used with readFromFile to std::string
- Removed unused variable btech from BatteryMonitor::update
Testing Done:
- Build healthd and recovery for angler device
- Confirm that known values are being read correctly from kernel
sysfs.
Change-Id: I238bbff097543767f352aa084bf0acbc1324baca
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When creating static libs with healthd logic, explicitly
reference libbinder to pick up its header include paths.
Bug: 27804373
Test: healthd libs compile when libbinder's header include
paths change.
Change-Id: I1014eb0b73d06815c42a527c4ea7e63c35ca3530
Boards can opt to have charger mode be passive, with no screen UI or key
processing, the same as for recovery mode, via BOARD_CHARGER_NO_UI. The
minui and associated libs and charging image files are not built into the
executable in this case.
Always select charger No UI operation for Brillo devices.
Bug: 27170356
Change-Id: Ibe71498743353b01ce5b6521e42ed94d75547547
The minui library has changed to no longer use libpixelflinger. It
also offers a more efficient way of storing and loading frames of
animation; use it to represent the battery-full state images.
Also removes the unused battery_charge.png image.
Bug: 12131110
Change-Id: I6cc8b19f36a806c99cda30cc47b5968daf6b333b
Previously because /sbin/healthd does not exist on the build host, make
always tries to rebuild the symlink even in an already-up-to-date tree.
Change-Id: I41201282281476b14eaf4c7d9b2e09fe367c1422
* Add healthd charger mode ops
* Check for executable invocation as "charger", set charger mode if so
* Incorporate charger executable as healthd charger mode
Change-Id: I4a44e7a4c3a65ae9be94491f7f498aa48d4f8a84
* add ops for different "modes" of healthd operation: android vs. recovery
* recovery mode selected by runstring options -r
* binder/Android communication moved to android mode
* recovery mode ops avoiding binder service registration
* "no service manager" flag removed; now handled by android vs. other modes
Change-Id: I3d8c89bf96a18a6a00cc85306f9a07d3f408f2a0
Initially moving battery health monitoring here.
Command line flag -n tells healthd not to use (or wait for) servicemanager
in this execution, for charger and recovery modes.
Change-Id: I1720594724af0c068497b359f9c6ad65aeaa1519