Commit graph

88921 commits

Author SHA1 Message Date
Elliott Hughes
bf33268695 Merge "linker.config.json: remove libpac.so." into main 2024-04-04 00:34:29 +00:00
Treehugger Robot
a45e51339d Merge "Add dm-thin support" into main 2024-04-03 21:46:00 +00:00
Elliott Hughes
dbb87ec8a7 Fix typo in comment.
Change-Id: I1d7e061cf7578d88987d16aa1684d94967af09f7
2024-04-03 16:44:22 +00:00
Shrinidhi Hegde
1d928ca80b Update native watchdog to be triggered after 20 restarts instead of 4.
The native watchdog performs a complete reboot on 5 system server
restarts even before packageWatchdog/RescueParty can perform any of the
mitigations. Increasing the thrsehold at which native watchdog kicks in
to 20 instad of 4.

Test: manual
Bug: 291137901
Change-Id: I9166f6555020e8bf26cc86994b13c53745a9934b
2024-04-03 13:02:12 +00:00
Jooyung Han
2f814176ea Add dm-thin support
thin-pool and thin targets are supported via DmTargetThinPool and
DmTargetThin. DM_TARGET_MSG is also added via a new method
SendMessage() because it's used to create a thin volumn.

dmctl is extended to support thin-pool and thin targets.

TODO: thin-pool target constructor can accept feature arguments.

Bug: 327081431
Test: atest libdm_test (CF with dm-thin enabled kernel)
Change-Id: I4c51c668bfe1489b959f6d03c205a5e2e63d9a1d
2024-04-03 10:47:47 +09:00
Charisee Chiw
62963d97c4 Merge "Update needed for Rust v1.77.0" into main 2024-04-02 20:55:26 +00:00
Treehugger Robot
2dab9f2968 Merge "snapshotctl: Build few commands only for userdebug/eng builds" into main 2024-04-02 17:39:16 +00:00
Devin Moore
bc4f870aaa Merge "init_kill_services_test: don't always try to kill hwservicemanager" into main 2024-04-02 16:37:00 +00:00
Elliott Hughes
d4bd799fcc linker.config.json: remove libpac.so.
The bug in the TODO was fixed 5 years ago, so this should be
obsolete?

Change-Id: I636adccb9852170a00ea171dd96e2f176bf70489
2024-04-02 14:19:15 +00:00
Treehugger Robot
42fe7733a6 Merge "Add libEGL, libGLESv2 into provideLibs" into main 2024-04-02 05:22:42 +00:00
Charisee
0f42bd4a83 Update needed for Rust v1.77.0
error: field `0` is never read
  --> system/core/trusty/keymint/src/keymint_hal_main.rs:40:24
   |
40 | struct HalServiceError(String);
   |        --------------- ^^^^^^
   |        |
   |        field in this struct
   |
   = note: `HalServiceError` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
40 | struct HalServiceError(());
   |                        ~~


Bug: http://b/330185853
Test: ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz  --target aosp_cf_x86_64_phone --image

Change-Id: I79fb9019ba00900508aead414de80edd51f3fa2e
2024-04-02 04:53:01 +00:00
Jeongik Cha
91d82fb635 Add libEGL, libGLESv2 into provideLibs
which are dlopen'ed from librutabaga_gfx from com.android.virt

Bug: 325929966
Test: check if crosvm display works
Change-Id: I7245286ed646dc3287ad3c4df6e7c021b1dd439e
2024-04-02 12:53:26 +09:00
Treehugger Robot
94ec1a28a5 Merge "adb: Do not use fs_config unless we are root (try 3)." into main 2024-04-01 23:44:38 +00:00
Peter Collingbourne
4a57c8f4f2 adb: Do not use fs_config unless we are root (try 3).
This enables fs_config for /data when pushing files as root. Also,
without this, adb push to /tmp fails as the shell user.

When pushing to a directory that does not have an explicit
fs_config, such as /data/local/tmp or /tmp, use the original
file mode. Because adb copies u permissions into g and o
(and in general because the umask on the host may have
made these files world writable), this requires adding more
fs_config entries to cover directories that may contain dex files
i.e. /{odm,product,system,system_ext,vendor}/{framework,app,priv-app}
to avoid hitting a SecurityException caused by writable dex files, e.g.

04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: FATAL EXCEPTION: main
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: Process: android.test.app.system_priv, PID: 4815
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: java.lang.SecurityException: Writable dex file '/system/priv-app/loadlibrarytest_system_priv_app/loadlibrarytest_system_priv_app.apk' is not allowed.
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime:  at dalvik.system.DexFile.openDexFileNative(Native Method)
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime:  at dalvik.system.DexFile.openDexFile(DexFile.java:406)

Bug: 171233429
Bug: 311263616
Change-Id: I18f70095c793d08a25ff59e1851f6dc7648ce4dc
2024-04-01 15:18:49 -07:00
Chris Göllner
8054f5e223 Merge "Revert "adb: Do not use fs_config unless we are root (try 2)."" into main 2024-04-01 13:55:02 +00:00
Weilin Wu
e2fbaed97b Revert "adb: Do not use fs_config unless we are root (try 2)."
Revert submission 3001420-main-Ied805bc3912ea0b4e1691127b5032aef632f85fd

Reason for revert: DroidMonitor: Potential culprit for Bug 331999499 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:3001420-main-Ied805bc3912ea0b4e1691127b5032aef632f85fd

Change-Id: Ibe525a6fd6c01b1f58c67c086306607c4f4d20db
2024-04-01 06:16:36 +00:00
Treehugger Robot
aedc0d0b41 Merge "adb: Do not use fs_config unless we are root (try 2)." into main 2024-03-29 23:57:33 +00:00
Peter Collingbourne
0919e1bc00 adb: Do not use fs_config unless we are root (try 2).
This enables fs_config for /data when pushing files as root. Also,
without this, adb push to /tmp fails as the shell user.

When pushing to a directory that does not have an explicit fs_config,
such as /data/local/tmp or /tmp, use the original file mode.

Bug: 171233429
Bug: 311263616
Change-Id: Ied805bc3912ea0b4e1691127b5032aef632f85fd
2024-03-29 15:13:13 -07:00
David Anderson
65f2a49632 vts_fs_test: Annotate fs type test for VSR.
Bug: 302209455
Test: N/A
Change-Id: I5be7472b9d68072bb1400479187e7aee10beb0c7
2024-03-29 11:49:36 -07:00
Devin Moore
a5521b0d9f init_kill_services_test: don't always try to kill hwservicemanager
When HIDL is not supported, hwservicemanager will not be running and may
not even be installed on the device.

Ignore-AOSP-First: Disabling HIDL internally first. Will cherry-pick
these test CLs after.

Test: init_kill_services_test
Bug: 218588089
Change-Id: Iae41e35e4669dd62c99ab9f138fc419be2f5fa29
2024-03-29 16:12:53 +00:00
Akilesh Kailash
cd4b579ef4 Merge "init: Remove legacy virtual-ab support" into main 2024-03-29 01:03:58 +00:00
Akilesh Kailash
ec799183c8 init: Remove legacy virtual-ab support
Bug: 304829384
Test: OTA on Pixel
Change-Id: I8463a1cc102379daa41fdade6820222a5e3bdd86
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-28 09:53:36 -07:00
Christopher Ferris
283482bdd3 Merge "Enable weak functions properly." into main 2024-03-28 16:42:02 +00:00
Treehugger Robot
0c2ae80025 Merge "Remove unused VNDK-related function" into main 2024-03-28 04:12:29 +00:00
Akilesh Kailash
f56c861eac Merge "libsnapshot: don't kill the daemon for legacy vab snapshots" into main 2024-03-28 02:36:16 +00:00
Kiyoung Kim
37c3ed70c0 Remove unused VNDK-related function
This change is to clean up VNDK-related code from build. The function
append_vndk_version is not in use.

Bug: 330100430
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I691093aaedb7f6630cc32145dcaf7d36403bcf90
2024-03-28 11:19:03 +09:00
Christopher Ferris
bcaeacc686 Enable weak functions properly.
There is a check for WEAKS_AVAILABLE that is never set. Change this so
so it is available everywhere except apple/windows.

Add new test to verify that on Android the logStackInternal function is
defined.

Bug: 331489939

Test: All unit tests pass.
Change-Id: Ie982eba30ae421931a62718d39ff1f0c282453db
2024-03-27 17:49:51 -07:00
Akilesh Kailash
a2aa83c5a5 libsnapshot: don't kill the daemon for legacy vab snapshots
If partitions are mounted off the daemon, there is no need
to kill if the tests are being run for legacy vab snapshots.

This also removes vabc_legacy_test as it is no longer required.

Bug: 331053511
Test: vab_legacy_test, vts_libsnapshot_test on Pixel - No flake observed
with 10 iterations
Change-Id: Ie8b29fef77948d23d920c19d816376290cf2fed9
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-27 22:49:04 +00:00
Akilesh Kailash
bc3476d5dc Merge "libsnapshot: Propagate legacy_snapuserd status during WriteUpdateState" into main 2024-03-27 16:39:44 +00:00
Nikita Ioffe
7400cba410 Merge "Remove check that only allows microdroid vendor partition on debuggable VMs" into main 2024-03-27 12:26:44 +00:00
Akilesh Kailash
b0cf1d2370 libsnapshot: Propagate legacy_snapuserd status during WriteUpdateState
Bug: 304829384
Test: OTA on Pixel
Change-Id: I841612c111148523d13166051512314d6fa1986f
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-26 19:59:02 -07:00
Daniel Zheng
98df25ba2e Merge "libsnapshot: Cache Ops correctly" into main 2024-03-26 21:55:13 +00:00
Daniel Zheng
abd3552713 Merge "libsnapshot: remove temporary solution" into main 2024-03-26 21:55:13 +00:00
Nikita Ioffe
d28f45772f Remove check that only allows microdroid vendor partition on debuggable VMs
The microdroid vendor partition is now verified during Microdroid boot,
so no need for this check.

Bug: 287593065
Test: AVF presubmit
Change-Id: I84811f818ef1140f1fe93d9da5f9ee61341e75dd
2024-03-26 18:04:21 +00:00
Akilesh Kailash
ea88c191e1 Merge "snapuserd: Use snapshots during install" into main 2024-03-26 16:36:09 +00:00
Akilesh Kailash
c375878b8e snapuserd: Use snapshots during install
If on Androd 12, continue to use snapshots

Bug: 304829384
Test: OTA on Pixel
Change-Id: I94890c308e7f297b695ddbd71659ebb1cf4d278c
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-26 16:36:01 +00:00
Akilesh Kailash
ad55fad080 Merge "libsnapshot: Enable snapshots during OTA install for S vendor" into main 2024-03-25 21:15:08 +00:00
Akilesh Kailash
35d5c94bb0 libsnapshot: Enable snapshots during OTA install for S vendor
ro.virtual_ab.userspace.snapshots.enabled is a vendor property which isn't present in Android S. Hence, during OTA install with S vendor, userspace_snapshots is disabled.

However, both update_engine and snapuserd are already on the system partition during install. Hence, forcefully enable userspace_snapshots if this is a path of legacy dm-snapshots with Vendor on Android S.


Bug: 331156940
Test: OTA tests on treehugger, pixel OTA
Change-Id: I3d1c03493d83e670e37df088d4b676c4aa1dc720
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-25 21:10:05 +00:00
Chris Sarbora
7199051aaf Wait for disconnect when rebooting to userspace FB
Wait for the device to disconnect when rebooting to userspace fastboot.
This is a particular problem for USB-over-IP devices, which must tunnel
the USB commands over a relatively-slow network and thus will not
disconnect as quickly as local ones.

Only currently effective for Linux hosts, since LinuxUsbTransport is the
only transport that implements WaitForDisconnect().

Test Plan:
provision with a usbip-attached device, see flash succeed

Change-Id: Ia8903dfa6e40755377870fbeaef9162934f992a0
2024-03-25 14:53:10 -05:00
Akilesh Kailash
da9db4f396 Merge changes Id9263be8,Idd9a60b0 into main
* changes:
  snapuserd: Remove legacy dm-snapshot based snapshot and snapshot-merge
  libsnapshot: Prepare removal of legacy snapshot
2024-03-25 07:50:30 +00:00
Treehugger Robot
ba28275e29 Merge "Add //visibility:any_system_partition" into main 2024-03-25 02:06:17 +00:00
Jeongik Cha
6d7e83fb42 Add //visibility:any_system_partition
system image which is declared in Android.bp should include the module.

Bug: 321000103
Test: m nothing
Change-Id: I6e9d8fa4c1051211ff9ff80c7dfa4a8ee5cbd732
2024-03-23 12:31:32 +09:00
Daniel Zheng
3326685511 Merge "cow_api_test: big replace op" into main 2024-03-22 21:48:13 +00:00
Daniel Zheng
5e8e488c13 libsnapshot: Cache Ops correctly
Change the meaning of batch_size_. Previously, a batch size of 200 meant
200 compressed data ops. With variable block size, each compressed data
op can be up to 256k uncompressed size -> batch size meaning should be
changed to 200 blocks of block size.

With this being said, the default batch size can be increased to 4mb to
better accomodate variable block size

The way we calculate the number of blocks to compress at once also
needs to be changed. Since there's no way of determining the comperssed
data size ahead of time, allow overwriting the cache by batch_size_ and
then flushing the cache as needed

Bug: 322279333
Test: Ota on pixel and measuring system image cow
Change-Id: Ie8e08d109dc5c3b4f5f36a740bbbcd37362a7ab3
2024-03-22 14:47:45 -07:00
Daniel Zheng
d7efbea407 cow_api_test: big replace op
With the modified cache system we might be processing big replace ops at
once. Our old tests didn't catch a case where a big replace op was
chunked into seperate batch writes.

Test: cow_api_test
Change-Id: I3bc80a2f9ed3e4c73dd9f74d9affaba79d49e4d2
2024-03-22 14:47:45 -07:00
Daniel Zheng
6bee318285 Merge "libsnapshot: chunk iov writes" into main 2024-03-22 18:46:08 +00:00
Treehugger Robot
e0b55e5a7c Merge "tombstoned: Rename proto tombstone before text tombstone." into main 2024-03-22 04:58:37 +00:00
Peter Collingbourne
7285c0d1bb tombstoned: Rename proto tombstone before text tombstone.
Because the log message "Tombstone written to: $NAME" is written
before renaming the proto tombstone, it is possible that a tool that
automatically downloads new proto tombstones by watching for this
log message will fail to download the tombstone. For the tool that
I am developing, this occurs < 0.1% of the time. Fix the issue by
renaming the proto tombstone first.

Bug: 328531087
Change-Id: I5b751585f2fce897ca7eb76c0466a0c33a93d851
2024-03-21 18:28:08 -07:00
Daniel Zheng
c60d2fc566 libsnapshot: chunk iov writes
Currently if our iov that we are trying to write is greater than 1024
our write will fail with error "INVALID ARGUMENT". This is because
pwritev() system call takes a max input size of IOV_MAX (which is device
dependant).

With our increased cache size of 1mb or maybe even more (or if user
configures batch size to be large), our write size could be greater than
IOV_MAX, and will fail with an unhelpful error. We should chunk these
writes to ensure they succeed.

Bug: 322279333
Test: cow_api_test + manual testing with large iov write sizes
Change-Id: Ia1fb53cbfc743cfcdfc7256ff9df075ad0c2dd38
2024-03-21 10:52:37 -07:00
Treehugger Robot
a8c6a92f43 Merge "liblp_builder_fuzzer: Bug Fix" into main 2024-03-21 04:29:17 +00:00