Clean up charger's libhealthd dependency.
- Charger uses libhealthloop to maintain an infinite
loop, similar to all health 2.x services.
- Charger tries to open up health 2.1 HAL implementation
to retrieve health info. If it failed, it falls back
to the legacy code path where a default BatteryMonitor
is used, *except* that it won't depend on libhealthd's
healthd_board_init() and healthd_board_battery_update()
anymore.
- Remove global static variables because they are hard to
track.
- Modernize code by converting charger_state in to a C++
Charger class, transforming all functions into methods,
and moving all other global states into the class.
- Devices that matches all of the following:
- have a customized libhealthd (search for modules
named libhealthd.xxxx)
- uses charger from system image (look for "class charger"
in device init.rc scripts; if you see the binary is named
"/charger" or "/system/bin/charger" then you are using
charger from system image)
... must implement health 2.1 passthrough implementation
properly in order to have charger continue to work.
See hardware/interfaces/health/2.1/README.md for details.
Test: charger test
Test: manual charger mode
Bug: 127677771
Bug: 142286265
Change-Id: I0f26e5c1fe2be6b5952fc019224457c8419e43e4
Update adb, fastboot and mount point
Bug: 134359158
Test: build and check if system_ext.img can be flashed
Change-Id: I6219f72242c5fe42a508008c0b1fd218d74da5b6
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.
Bug: 73660730
Test: build
Change-Id: I0d0aa052e1eaf529d18921c45169473df0ee51ff
With the change in [1], /sbin/charger always gets included into
system.img (as opposed to ramdisk) and started by second-stage-init. It
no longer needs to be statically linked. This CL switches it to use
shared libraries, and moves it to /system/bin/charger.
With this change, charger no longer gets installed into recovery image,
which will be handled by a follow-up CL.
[1] https://android-review.googlesource.com/c/platform/build/+/728287
Bug: 73660730
Test: Boot into charger mode on taimen. Check that charger UI works.
Test: Run charger_test on taimen.
Change-Id: Idff70cfad09c825cdba4d35a471ff7ecd5f8a8f7
adbd has been built as a static executable since the same binary was
copied to the recovery partition where shared library is not supported.
However, since we now support shared library in the recovery partition,
adbd is built as a dynamic executable.
In addition, the dependency from adbd to libdebuggerd_handler is removed
as debuggerd is handled by the dynamic linker.
A few more modules in /system/core are marked as recovery_available:
true as they are transitive dependencies of the dynamic linker.
This change also includes ld.config.recovery.txt which is the linker
config file for the recovery mode. It is installed to /etc/ld.config.txt
and contains linker namespace config for the dynamic binaries under
/sbin.
Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.
Change-Id: I363d5a787863f1677ee40afb5d5841321ddaae77
This commit removes stale files from incremental builds:
* /system/etc/ld.config.txt,
* /system/etc/llndk.libraries.txt
* /system/etc/public.libraries.txt
These files are replaced by versioned ones.
Bug: 78605339
Test: Those files are removed in incremental builds
Merged-In: I7925fa45b47397829bde835ab3c479611faffa33
Change-Id: I7925fa45b47397829bde835ab3c479611faffa33
(cherry picked from commit 9afd9b488f)
If PLATFORM_VNDK_VERSION is set to a version other than "current",
add the version to the file names of the namespace configuration
files.
Bug: 69883025
Test: device boot
Change-Id: I27377549581125b6c750c1422d0ee4a607dda5e8
Trusty implementations are provided by vendors. This patch moves
the AOSP reference implementations to the vendor partition.
Bug: 63085384
Test: Build gordon_peak which adopts trusty as the TEE and confirm
that libtrusty and gateway.trusty are moved to /vendor.
Test: Build marlin which does not adopt trusty as the TEE and confirm
that this patch has no effect on the build result.
Test: mmm BOARD_VNDK_VERSION=current system/core/trusty
Change-Id: I7f6d897b86c69d06923a18d28154760e006dd193
The CL is not complete and will cause build break when BOARD_VNDK_VERSION is set.
This reverts commit 7d81b4e081.
Change-Id: If9632fb7ee8147c39f1ad0860ddc3bed62ba89db
Trusty implementations are provided by vendors. This patch moves
the AOSP reference implementations to the vendor partition.
Bug: 63085384
Test: build gordon_peak which adopts trusty as the TEE and confirm
that libtrusty and gateway.trusty are moved to /vendor.
Test: build marlin which does not adopt trusty as the TEE and confirm
that this patch has no effect on the build result.
Change-Id: I9a5440071386b929058207fdef560ed2d7223ba3
When building without vendor/... in the tree, we won't be creating a
vendorimage, so BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE won't be defined. But
we still need to use the vendor image that will be present.
Bug: 30040825
Change-Id: I756adc615aea11da60da4d3a4568caca9fed93ab
I moved grep out of toolbox a couple of months ago, so hopefully no one
else should see this. Just in case, though, remove grep and toolbox so
they both get rebuilt and any symbolic links will find themselves pointing
to the right binary.
Bug: 19878755
Change-Id: I15f63500cae3578a82a895f851c797fd324bbe02
Packets captured and logged by the NFLOG target are unicast, so
extend to catch and decode them. To avoid escaping issues, the raw
contents are passed around as hex strings.
Bug: 18335678
Change-Id: Ib7299500baa00080a1f000f9da843eb527363353
default.prop is generated out of several makefile variables,
and it isn't possible to neatly express a dependency on those
variables (except perhaps by adding every possible makefile that
could define them to the deps list).
Change-Id: I93ea45c956aa22922f2389f735c058700621f674
Set the CAP_SYS_BOOT filesystem capability on the new reboot
command and keep CAP_SYS_BOOT in adb bounding set so that the
shell user can run it.
Change-Id: I1dd6143445ee2a952254f0452ab6e544318431dd