Commit Graph

64780 Commits

Author SHA1 Message Date
Tom Cherry 8ba33eb34b Merge "logd: drop logs about pruning and compression to VERBOSE" 2020-10-01 17:22:47 +00:00
josephjang 2906975399 fastboot: add new oem command for post wipe userdata
When Android userdata partition has been erased in fastbootd, call
oem specific API doOemSpecificErase() to wipe other userdata in
device.

If oem doesn't implement this specific API in fastboot_hal lib,
fastbootd will receive 'NOT_SUPPORTED' return status.

Bug: 169173873
Change-Id: I9b6a5a4aaed31d1168e633418b189f9bb6d34d01
2020-10-01 05:09:26 +00:00
Treehugger Robot 7c1fafd7a0 Merge "libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader." am: b9795757e9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1434794

Change-Id: I7d44602dbedfabdbfb5769d363edc5f6663e109f
2020-09-30 00:30:09 +00:00
Treehugger Robot b9795757e9 Merge "libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader." 2020-09-29 23:39:09 +00:00
Treehugger Robot b7b2d1255d Merge "libsnapshot: Partially implement OpenSnapshotWriter." am: 15f97700c2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1433573

Change-Id: Ibd3488f7f1d40fb75616e82dd9aa44c064cb558b
2020-09-29 22:41:54 +00:00
Treehugger Robot 15f97700c2 Merge "libsnapshot: Partially implement OpenSnapshotWriter." 2020-09-29 21:52:07 +00:00
David Anderson d116e250f0 Merge "libsnapshot: Add a maximum block count to CowWriter." am: 2be4a85a2e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1432900

Change-Id: Ib9195dad176e4e1d9768c62df486fe6b97bed964
2020-09-29 20:53:00 +00:00
David Anderson 2be4a85a2e Merge "libsnapshot: Add a maximum block count to CowWriter." 2020-09-29 20:23:17 +00:00
Steven Moreland ee59f6b3b3 Merge "Fixes to String8 fuzzer" am: 3e3e44c740
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1439322

Change-Id: Ie2756baeaddaf24ea4b9bbde5dec1ec67eb2e608
2020-09-28 23:20:48 +00:00
Steven Moreland 3e3e44c740 Merge "Fixes to String8 fuzzer" 2020-09-28 22:35:38 +00:00
Tom Cherry 4ab009f0e7 logd: drop logs about pruning and compression to VERBOSE
These logs are not generally useful and can be considered to be spam
by some.  Drop them to VERBOSE so that we can be selectively enabled
when debugging logd.

Test: these logs do not appears by default.
Change-Id: Ic2bb12552d6f191478777c21f500794de29c8b0a
2020-09-28 13:05:32 -07:00
Christopher Ferris 89f54f6f86 Merge "Add arch member into Unwinder object." am: 087552a89b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1437275

Change-Id: Id44f6fea64d32491f275f5730c8b5f6c33f69abe
2020-09-28 18:50:33 +00:00
Christopher Ferris 087552a89b Merge "Add arch member into Unwinder object." 2020-09-28 18:45:04 +00:00
David Anderson 39f250896a libsnapshot: Implement OnlineKernelSnapshotWriter::OpenReader.
Bug: 168554689
Test: manual test
Change-Id: I91b39c5982c14d80dbe1f38ff6a8bc5745d3e7e8
2020-09-28 11:24:37 -07:00
David Anderson 75b982ad30 libsnapshot: Partially implement OpenSnapshotWriter.
Implement OpenSnapshotWriter for non-compressed Virtual A/B. This is
done by adding an OnlineKernelSnapshotWriter class, which forwards all
writes to a dm-snapshot block device.

This also introduces a new ISnapshotWriter class which extends
ICowWriter, and adds features specific to libsnapshot (versus ICowWriter
which is intended only for the new COW format). The OpenSnapshotReader
call has been moved here since the writer retains all the information
needed to create the reader.

To test the new call, vts_libsnapshot_test has been modified to use
OpenSnapshotWriter.

As part of this change, all consumers of libsnapshot must now link to
libsnapshot_cow.

Bug: 168554689
Test: vts_libsnapshot_test
Change-Id: Ieedfadc557833c1e0540922aabc6e95c80266a64
2020-09-28 11:24:37 -07:00
David Anderson 6560d23765 libsnapshot: Add a maximum block count to CowWriter.
Once COWs are allocated, their size is fixed, and we don't want to
write beyond the end. To make this validation less tedious, the virtual
methods of ICowWriter have been made internal. The user-facing API calls
do validation before calling the internal variants.

Bug: 168554689
Test: cow_writer_test
Change-Id: Ic9ebb5bc4b601180d35d915c47cd9c537bc423fa
2020-09-28 11:24:37 -07:00
Elliott Hughes e4d33367f9 Merge "cli-test: support checking exit status." am: b3dc6089b0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1439574

Change-Id: Ia1877b338c9d8d5a5f0883d858522a09dfc2e1cf
2020-09-28 17:16:43 +00:00
Elliott Hughes b3dc6089b0 Merge "cli-test: support checking exit status." 2020-09-28 16:42:43 +00:00
Rick Yiu 75595e006e Merge changes from topic "revert_androidSetThreadPriority_api" am: 2b1c37a3e4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1440132

Change-Id: I3c64ef093133dfd98558a41f6d7d14da8412808f
2020-09-28 02:25:26 +00:00
Rick Yiu 2b1c37a3e4 Merge changes from topic "revert_androidSetThreadPriority_api"
* changes:
  Revert "Add choice for changing sched policy when setting thread priority"
  Revert "Fix API for C compatibility"
2020-09-28 02:12:58 +00:00
Rick Yiu fa02bb9952 Revert "Add choice for changing sched policy when setting thread priority"
This reverts commit 57affbf91d.

Reason for revert: new API is no longer used

Change-Id: I97128c1d367e161aa50deaefa8b73a0f25e29af4
2020-09-27 11:21:11 +08:00
Rick Yiu 290efe38b6 Revert "Fix API for C compatibility"
This reverts commit b473061c5a.

Reason for revert: new API is no longer used

Change-Id: I2c4f9f37736faeb5d0403c2ba531c792d2531505
2020-09-27 11:20:03 +08:00
Elliott Hughes ac973f63be cli-test: support checking exit status.
Test: new libziparchive (ziptool) tests
Change-Id: If8e74e84340dff29198b5999c45eb2d7220fa93c
2020-09-25 16:43:35 -07:00
Dylan Katz 98e14de057 Fixes to String8 fuzzer
Adds support for format fuzzing, fixes several bugs.
Fix: 163680603
Fix: 162926178
Fix: 157469647
Test: libutils_fuzz_string8 clusterfuzz-testcase-minimized-libutils_fuzz_string8-6188353572306944
Test: libutils_fuzz_string8 clusterfuzz-testcase-minimized-libutils_fuzz_string8-6413754773012480
Test: libutils_fuzz_string8 clusterfuzz-testcase-minimized-libutils_fuzz_string8-5691524777246720

Signed-off-by: Dylan Katz <dylan.katz@leviathansecurity.com>
Change-Id: I7107c3637a4befccab345e17171a1119f8677557
2020-09-25 16:28:49 -07:00
Josh Gao 68083003b8 Improve error message in debuggerd fallback handler.
Bug: http://b/164014625
Test: none
Change-Id: I4f1e61be93c511676e66b909a15735bba963eff0
2020-09-25 13:51:02 -07:00
Treehugger Robot f80e02cffb Merge "Turn off -Wnon-virtual-dtor explicitly" am: fbb0314c33
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1429930

Change-Id: I6c6da87564d81ac43f5636e601d9e38da9ecf7c9
2020-09-25 05:50:24 +00:00
Treehugger Robot fbb0314c33 Merge "Turn off -Wnon-virtual-dtor explicitly" 2020-09-25 03:53:02 +00:00
Jiyong Park ee989fcb4d Turn off -Wnon-virtual-dtor explicitly
adb has been built without -Wnon-virtual-dtor because Soong doesn't turn
the flag for the host targets, and the flag can't coexist with
-Wexit-time-destructors.

However, the new host target linux_bionic_arm64 turns the flag on,
because it inherits most of the cflags from the device config.
That is forcing us to implement the virtual destructor, which isn't
possible due to -Wexit-time-destructors.

Solving the issue by explicitly turning -Wnon-virtual-dtor off so that
it is disabled also for the linux_bionic_arm64 target.

Bug: 159685774
Test: HOST_CROSS_OS=linux_bionic HOST_CROSS_ARCH=arm64 m \
out/soong/host/linux_bionic-arm64/bin/adb
Test: run the adb on an ARM emulator

Change-Id: I655b340e4f199a3a75b7df7cc3fe18832e26a7ae
2020-09-25 11:56:04 +09:00
Christopher Ferris b05c472421 Add arch member into Unwinder object.
This simplifies some of the logic and removes the need to pass an
Arch value to functions that should already know about the arch
it is operating on.

Includes fixes for debuggerd/libbacktrace.

Added new unit tests to cover new cases.

Test: All unit tests pass.
Test: Faked unwinder failing to verify debuggerd error messages display
Test: properly in backtrace and tombstone.
Change-Id: I439fcae0695befcfb1cb4c0a786cc74949d33425
2020-09-24 18:46:23 -07:00
Treehugger Robot 230d6658fe Merge "Chanage uid to userId where it denotes an Android user id." am: 978faa37ba
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1436554

Change-Id: I05d8bbed183f8024f2aef0f15e0673342837cd3b
2020-09-24 18:39:09 +00:00
Mohammad Samiul Islam 0098201dc3 Activate encryption for /data/app-staging folder
Without enabling the encryption on this folder, we will not be able to
rename files from this folder to /data/app folder, since /data/app
folder is encrypted. Trying to rename files between unencrypted folder
to encrypted folder throws EXDEV error.

Turning on encryption for /data/app-staging has the following concerns:

1. Turning on the encryption will erase all of its content. But this is fine
since during OTA we fail all staged sessions anyway.
2. We need to create hardlinks from /data/app-staging to
/data/apex/active. This is also fine since we will be creating link from
encrypted folder (/data/app-staging) to non-encrypted folder and this
does not throw EXDEV error.

Bug: 163037460
Test: atest StagedInstallTest
Change-Id: Ie78f6df0c0e08de54a39c5e406957ad0a56b7727
2020-09-24 19:37:21 +01:00
Treehugger Robot 978faa37ba Merge "Chanage uid to userId where it denotes an Android user id." 2020-09-24 17:57:49 +00:00
Janis Danisevskis 0a738d9504 Chanage uid to userId where it denotes an Android user id.
This patch changes the variable name `uid` to `userId` where it
denotes an Android user id. This makes it harder to mistake the user id
for an actual UID.

Test: Trivial refactoring no logical changes.
Bug: 163636858
Change-Id: I9e240367bcd30bbfa1816014a7f44bbcb58ede4b
2020-09-23 18:01:37 -07:00
Tom Cherry fcae88ecb8 Merge "logd: enable CFI" am: de540ad2f1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1435037

Change-Id: I5a5a25818fdc7d4167ce50dcc856ef10a7e01635
2020-09-23 20:02:54 +00:00
Tom Cherry de540ad2f1 Merge "logd: enable CFI" 2020-09-23 18:44:02 +00:00
Tom Cherry d96139f14c logd: enable CFI
Test: logd runs normally
Change-Id: Ic3e117bd445ae339fed7846e3eaa14478580f091
2020-09-23 09:34:15 -07:00
Treehugger Robot 48507b1c27 Merge "Removed RWLock fuzzer" am: 928910999f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1434261

Change-Id: Ibb967aee0ce0a97c81e0413a630a2133ed69da60
2020-09-22 19:13:20 +00:00
Treehugger Robot 928910999f Merge "Removed RWLock fuzzer" 2020-09-22 18:40:23 +00:00
David Anderson ef77597707 Merge "libsnapshot: Make the new Open calls look more like MapUpdateSnapshot." am: 9ec8c31afb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1433352

Change-Id: Ie2d6014607850c43c66192f82d8ec02eabb6993d
2020-09-22 18:10:19 +00:00
David Anderson 9ec8c31afb Merge "libsnapshot: Make the new Open calls look more like MapUpdateSnapshot." 2020-09-22 17:47:06 +00:00
Jooyung Han 25dea8c25f Merge "ueventd: change firmware location in apexes" am: fb2dafa538
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1429931

Change-Id: I0e399c78f3ac26808703623dc902b9da3dbc8d51
2020-09-22 01:55:23 +00:00
Treehugger Robot 27b3ddc2ea Merge "logd: additional logging if read_offset > buffer_it->write_offset()" am: 55d3e1f9b9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1433571

Change-Id: I0370d07bf013f15e04e2444f2887ea3596311a5d
2020-09-22 01:51:27 +00:00
Jooyung Han fb2dafa538 Merge "ueventd: change firmware location in apexes" 2020-09-22 01:36:35 +00:00
Treehugger Robot 55d3e1f9b9 Merge "logd: additional logging if read_offset > buffer_it->write_offset()" 2020-09-22 01:14:15 +00:00
Tom Cherry 5d1fbece58 logd: additional logging if read_offset > buffer_it->write_offset()
I didn't expect this to ever be hit, but apparently it is, so add
additional logging to track it down.

Bug: 168870781
Test: build
Change-Id: Ia472bc7458a3727e4d407365672f7394426ae515
2020-09-21 15:10:20 -07:00
David Anderson f53794d1af libsnapshot: Make the new Open calls look more like MapUpdateSnapshot.
To make the transition to these new calls easier, give them a very
similar signature to MapUpdateSnapshot. Also, allow them to work in
non-compression mode.

Bug: 168554689
Test: builds
Change-Id: I2eb6b41ba8a294dbde1763aabd7701a80c0789f3
2020-09-21 12:06:49 -07:00
Tom Cherry eb2b5408b6 Merge "logd: remove min heap in SerializedFlushToState" am: b92ac53aeb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1431987

Change-Id: I599fecb6e1f797bfa5409e3b767f6c0a14766cb9
2020-09-21 18:24:18 +00:00
David Anderson 4d620fc341 Merge "libsnapshot: Prototype the new API for mapping writable snapshots." am: 32771b2aa3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1430217

Change-Id: Ic96666a7c2e1cf7840b7f7bd778cce13327a56b8
2020-09-21 18:19:07 +00:00
Tom Cherry b92ac53aeb Merge "logd: remove min heap in SerializedFlushToState" 2020-09-21 18:10:43 +00:00
David Anderson 32771b2aa3 Merge "libsnapshot: Prototype the new API for mapping writable snapshots." 2020-09-21 17:56:08 +00:00