Previous submission of this change, aosp/790068, caused a failure in
sdk_mac for CLOCK_REALTIME and <endian.h> not being available.
Bug: 110537511
Test: compiles without failures and verified the correct metric
Change-Id: Iba1dc920ad82e88a4bcdd2feaee9a06202a440c2
This change introduces an IPartitionOpener abstraction. Methods that
interact with live metadata, such as ReadMetadata, UpdatePartitionTable,
and FlashPartitionTable, now require an IPartitionOpener object. Its
purpose is dependency injection: it will make these methods much easier
to test when the super partition spans multiple block devices.
All non-test consumers should be using PartitionOpener, and as such,
some helper methods have been added that automatically create one.
Bug: 116802789
Test: liblp_test gtest
device with super partition boots
Change-Id: I76725a5830ef643c5007c152c00ccaad8085151f
This patch removes the alignment, block device size, and starting sector
fields from LpGeometry into a new LpMetadataBlockDevice struct. The
metadata now contains a table of these structs, and the table will have
exactly one entry representing the super partition.
This refactoring will make it easier to have logical partitions span
multiple physical partitions. When that happens, the table will be
allowed to have more than one entry, and the first entry of the table
will be considered the "root" of the super partition.
Bug: 116802789
Test: liblp_test gtest
device with logical partitions flashes and boots
Change-Id: I97f23beac0363182cb6ae78ba2595860950afcf0
sysconf(_SC_GETPW_R_SIZE_MAX) may return −1 if there is no hard limit
on the the buffer size. Some libc implementations such as musl don't
define this limit and will return -1.
Use a default buffer size to handle this case.
Change-Id: I997b13a2c2dca00574e049a259135e61c8ed8e03
Signed-off-by: Robert Yang <decatf@gmail.com>
Intrduce LMK_GETKILLCNT command for ActivityManager to get the number of
kills from lmkd.
Bug: 117126077
Test: used lmkd_unit_test to verify correct reporting
Change-Id: I09c720a7176b4df95efc544177cd2694f8d791be
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This code only uses android-base/macros.h.
Bug: 118374951
Test: mmma system/core/libnativebridge && for f in out/host/linux-x86/nativetest{,64}/*/*; do $f; done
Change-Id: Ifa5a5a3c9370bd128ddd301ea352746699715929
This directory is used for preloads that are typically placed in
the system_other image and copied to /data on first boot if the
cppreopts script is installed.
Bug: 80508492
Test: make
Change-Id: I4121b07ee2fc96d533075d1907557de7e4be4ee0
Onboard device side gtest of adbd to test mapping to be
run in presubmit.
Test: atest adbd_test
Bug: 112104122
Change-Id: Iefb6be0fb0ecea5a95aadce923c223e40f92bdab
This allows us to remove libziparchive's dependency on libutils.
Bug: http://b/79112958
Test: ran libbase and libziparchive tests, ran fastboot manually
Change-Id: I95c651976dad222863e5b8c37d4514b778f5dce7
Every real call always sets the value to true to init the gnu_debugdata
interface, so remove this parameter.
Test: Builds, unit tests pass.
Change-Id: I07fb3adbbd5b65b51c0dc7608561e820a5095051
This should fix the bloody Mac build, which doesn't have <error.h>. Since
we weren't entirely happy with error(3) anyway, switch to the toybox
style of error_exit and perror_exit, which are slightly briefer and quite
a bit more intention-revealing.
Bug: N/A
Test: builds
Change-Id: Ic8e411906c363af51657da5ce947b25a0b6bb1f3
There is a list of 'stable_properties' that vendor_init can use as
property triggers for Treble property compliance. This list came about
since init parses init scripts before all partitions are mounted and
therefore before all property context files are available, such that
init cannot use the normal SELinux mechanisms for determining if a
given property is vendor_init readable.
Currently though, we require all partitions that would contain
property context files to be mounted during first stage mount, so we
can use the normal SELinux mechanisms here, so this change deprecates
the stable_properties list and moves init to use SELinux to determine
if a property can be a trigger.
Bug: 71814576
Test: vendor_init fails to use non-readable properties as a trigger
Test: vendor_init successfully uses readable properties as a trigger
Change-Id: I6a914e8c212a3418cbf4a8a07215056aad2e0162
apexd is a sensitive daemon, and the ability to ptrace this domain is
restricted by SELinux policy. apexd spawns a binder thread which
makes matching difficult, as we would instead need to use
/system/bin/apexd as the blacklist key.
Change llkd to also check for a match on the basename of the
executable path. This will solve a gotcha expectation when creating
a blacklist key.
Without this change, llkd continues to generate SELinux denials of
type=1400 audit(0.0:1764): avc: denied { ptrace } for comm="llkd" scontext=u:r:llkd:s0 tcontext=u:r:apexd:s0 tclass=process permissive=0
Commit 5390b9add4 was originally intended
to fix these denials, but it seems to have had no effect and the denials
are still being generated. This change will fix it.
Test: none
Change-Id: I00aa10dfff30c65a120ad30582b820e2d4b1bb38
Since the build system move to kati/ninja, build command is an
implicit dependency of a target. This makes the bcp_dep / bcp_md5
thing obsolete.
Test: make
Change-Id: I4ce9ebdabfc72b188e49f12888054d63b3cda64d
* changes:
adbd: implement a nonblocking USB Connection.
adbd: rename daemon/usb.cpp to daemon/usb_legacy.cpp.
adbd: open functionfs ep0 as O_RDWR.
adbd: extract functionfs fd creation.
If fs_mgr_overlayfs_teardown is called with a specific mount_point
reference (eg: /vendor, /product, /system) when /mnt/scratch is not
mounted (eg: in recovery or fastboot mode), then mount it to perform
the directory teardown.
Test: manual on future changes: fastboot flash vendor -> fastbootd
Bug: 109821105
Bug: 117605276
Change-Id: I5735008e33b57d35345a799dc68bb43c9189135a
Provide a means to test out overlayfs work
Test: adb-remount-test.sh
Bug: 109821105
Bug: 117605276
Change-Id: Ia6114c8f4d0c3424cb869d002cc61cfc6863151c
These will help update_engine clear the target slot before applying an OTA.
Bug: 117182932
Test: liblp_test gtest
Change-Id: I6ad370e617f22f2098245a0028a93488f9ac8674
In preparation for supporting multiple block devices, this factors out
the free-list calculation for resizing partitions.
Additionally, it fixes a bug where space in between the first usable
sector and the first extent wasn't added to the free list.
Bug: 116802789
Test: liblp_test gtest
Change-Id: I965760eef0176020e9a5691ce1be2c8b5e0c8bc8