The Mac doesn't have lseek64, and this code is built with
_FILE_OFFSET_BITS=64 anyway.
Bug: N/A
Test: ran tests
Change-Id: Ibda49c44ecfbe21b304e163e48f7ea42d97e38a7
system/core/libziparchive/zip_archive.cc:847:36: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
const off64_t current_offset = lseek64(fd, 0, SEEK_CUR);
Bug: N/A
Test: builds
Change-Id: If762011722d53376bb6dab35c6ee8031762e5a95
Arrange to delete the overlayfs backing when a specified partition
has been flashed.
Test: manual
Bug: 109821005
Bug: 117605276
Change-Id: I1c6a0341c6cd2ecfbb7c71bec5679a74d579aadd
The purpose of this code was to support preserving partitions across a
flashall operation. Since we are not supporting persistent read-write
partitions, this merging code is effectively useless - it is preserving
only partitions that will be deleted.
Additionally, this code does not merge partition group changes, since
doing so accurately is difficult. Partition size changes aren't sent
until after update-super resolves, so a valid re-grouping could be
rejected during update-super if the existing partitions are too big.
This patch removes the update-super merging code until a use case comes
along and we can properly evaluate how it should work.
Bug: N/A
Test: fastboot flashall
Change-Id: I1d622b23dabdf031897be9de49f59fc8cf3caf3b
If a section header such as 'on' or 'service' has an error with it,
the rest of the commands / options are currently reported as errors
since there is no valid parser object to parse them. For example,
service !@#$%%^&*() /system/bin/false
user root
group blah
blah blah
Generates:
init: /system/etc/init/bad.rc: 2: invalid service name '!@#$%%^&*()'
init: /system/etc/init/bad.rc: 3: Invalid section keyword found
init: /system/etc/init/bad.rc: 4: Invalid section keyword found
init: /system/etc/init/bad.rc: 5: Invalid section keyword found
This change suppresses the extraneous 'Invalid section keyword found'
messages.
Test: faulty error messages are suppressed.
Change-Id: Ieeb2d5b8b7eea33e191a88ce5a0d41701686943f
The libziparchive public headers that refer to `off64_t` also need the
Mac workaround.
In fastboot, there's a stray `lseek64` but since it's only for offset 0,
any kind of seek is fine.
Bug: N/A
Test: builds
Change-Id: I68b4f95202623ebf07ffe6c3e0e21437e7922c5b
Partial revert of "init: if vendor_init can read a property, let it be
a trigger too" (b35f827c97).
We made a mistake when we allowed vendor init to action on any vendor
or odm property, since when a new SELinux label is created for a
vendor property, vendor_init does not automatically get read
permissions for it.
Recently, we tried to use read permissions instead of the built-in
list in init, but that broke due to the above mistaken. Since we have
already launched with these permissions as is, we must restore them.
Bug: 118457755
Test: no denials for vendor init actionable properties on crosshatch
Change-Id: I7a9a560c9a54a177c6b83d28309e2f288f05d400
Given that I can't actually go back in time and just make bionic's
`off_t` be 64-bit.
Bug: N/A
Test: builds
Change-Id: Ic93336b07bffc0977bd0e9caad6a22ce29ca06ed
If an image size changes slightly in between "flashall" and some change
in the build, it's inconvenient to have to reflash the whole device again.
This patch resizes partitions when using a normal flash command, to
improve the developer workflow.
Bug: N/A
Test: fastboot flash system
Change-Id: I349364a4742a0c15748f545fcfda946107720d45
After rebooting to userspace fastboot, the first command issued is
"update-super". If we wound up in the bootloader by accident (as
happened to a few users with a busted vbmeta_system), the resulting
error message will be very misleading ("update-super" will be an
unrecognized command).
Instead, this patch explicitly errors if we did not successfully boot
into fastbootd.
Bug: N/A
Test: fastboot flashall
Change-Id: I7d5bd64db540978bd0bae884f40ce8c3df48f856
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