This allows system_server to access these devices.
Note: This also matches existing ueventd rules used by any
device which followed the Sensor HAL's dynamic sensor README.
Bug: 303522222
Test: ls -l /dev/hidraw0
Change-Id: I0830aca77422d6cab64af05dba1554667737760c
No need partition verification when device boots on snapshot without
slot switch.
This also saves couple of seconds of boot time.
Bug: 299011882
Test: Boot device on snapshot, OTA on Pixel
Change-Id: I5b781de7e0f745bbfe9646f88ca912139b2d853e
Signed-off-by: Akilesh Kailash <akailash@google.com>
Since these functions are used across both parser and writer, updating
it as inline functions in cow_format.
Test: cow_api_test
Change-Id: I9824684e3b9b48947accce935335d4019d745ae0
If any of the read-only partitions are mounted off dm-user
then certainly update is in-progress.
Bug: 308900853
Test: OTA on Pixel, reboot during OTA.
Change-Id: I36121e1d99ec7c1f1110a65fc67996190875af18
Signed-off-by: Akilesh Kailash <akailash@google.com>
We want to add a resume_point_count in the header to represent how many
resume points we've written. In the case that we've written less than
resume_buffer_size, we only want to read the valid resume points.
without these changes incremental OTA runs into segfault or have faulty
data when trying to FindResumeOp() as our resume points contain invalid
entries
Test: full ota followed by inc ota on cuttlefish
Change-Id: I0a8971955439639f2d0f39d9d518c1145ae15c3d
Update FindResumeOp to take in a uint64_t to match the value of the
caller function
Test: ota with following CL
Change-Id: I19568d119b7ebd75ea9e98970b311ae7da92ff0e
Cow size should just be wherever the last data position is written. In
v3 we no longer have a footer, so this calculation is simple. This
function is used by cow estimator
Test: cow_api_test
Change-Id: I08204e2d560b120450019a529baa41de9b8e66d5
The attached test data is a 4096 length byte run that gz compresses to
exactly 4096 bytes. This exposes an edge case in CowReader::ReadData
with v2 snapshot files.
Bug: 310191184
Test: cow_api_test
Change-Id: I35e8d7e939d607d1dc118285ebc2f636c2291a20
This is a change for some system apps that have /data/user_de/0/ in the
package list, but it's easier to reason about and more consistent to
always go down the same path.
Bug: http://b/308990322
Test: treehugger
Change-Id: I479485655c61e8a31fb23f779c66d54b0bb476c0
Add resume space to cow v3. Resume buffer goes after header and scratch
space, and is currently set to contain 4 resume points. When AddLabel is
called, the oldest label is replaced with newest one.
Parser will parse up until the last resumable op from a given label.
Test: cow_api_test
Change-Id: Ie072f245721776887d59c96dad296965ad31a5cc
Ensure that cow was written by v3 writer for the data_length check to
work. All ops written by v2 writer should go through the decompressor
path if a compressor was used.
Test: cow_api_test
Change-Id: I053d6fdaf29ef7001e68f43b45d5a3ff1a36b1c3
Timeouts in tombstoned.cpp and intercept_manager.cpp are scaled
by HwTimeoutMultiplier, but the timeouts in debuggerd_test.cpp
are not, which means the CrasherTest#intercept_timeout test will
fail for any platform that has a high enough HwTimeoutMultiplier.
Bug: 309532789
Test: debuggerd_test.CrasherTest#intercept_timeout
Change-Id: I83cd01e87644c011efa155a32fd5d92cc8a43a95
We haven't had a symlink here for many years, so there's no reason to
allow one any more.
Test: treehugger
Change-Id: Ic10d547a88fc6d9c442a5dfb228c5914ea48a32d
When service is started prior to early init and if per-app memcg is enabled, service start will fail as the required directories for memcg isn't present viz /dev/memcg/apps.
Bug: 308818430
Test: th and CF OTA test with per-app memcg enabled
Change-Id: Ic65e8d179fbfb8e2135f2de5cc7c77d6c29ea7d2
Signed-off-by: Akilesh Kailash <akailash@google.com>
There's no bug here that I can see, but having a larger than necessary
scope just seems like a bad idea in case anyone adds anything later.
Also switch to modern struct initialization syntax.
Bug: http://b/308990322
Test: treehugger
Change-Id: If2576f902de62e8c24d4a643c224df8ea6cff5d5
Add compression path back into Cow operations. Main change is that the
compression algorithm is stored in the header instead of each individaul
op. Have the writer_v3 set this algorithm when parsing options.
There looks to be a lot of code we'll be able to factor out into the
base class, but we can leave that to a later CL.
Test: cow_api_test
Change-Id: Ie9a8eceb5fbdaecae50911119c75f2e51d776a28
Reduce the time spent in WaitToBeReaped() by waiting for SIGCHLD instead
of waiting for 50 ms.
Bug: 308687042
Change-Id: I5e259fdd22dec68e45d27205def2fc6463c06ca3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Add test case to ensure that add blocks will fail when we try to add
more blocks that options.op_count_max specifies. Expected behavior is
that we will write until that count and then fail
Test: cow_api_test
Change-Id: Icb44508c1bacbbe676347df9a58c0526068eebe0
Adding in XOR operation to v3 writer. Parser has to go through ops and
create a mapping of XOR operation to it's data
Test: cow_api_test
Bug: 307452468
Change-Id: I51e13a59ba472b62bdcc05921f2e5d6e2c8ad2af