Commit graph

3911 commits

Author SHA1 Message Date
dianlujitao
95f29b7678 Add wrapped key support
These commits added wrapped key support:

  https://source.codeaurora.org/quic/la/platform/system/core/commit/?h=LA.UM.8.1.r1-08800-sm8150.0&id=ddd34f7b85ea6701d0c62f1e7c6cb98bbef60738
  https://source.codeaurora.org/quic/la/platform/system/core/commit/?h=LA.UM.8.1.r1-08800-sm8150.0&id=98ee612a86f40a862889347a4f3bb6231fcdb0e0
  https://source.codeaurora.org/quic/la/platform/system/core/commit/?h=LA.UM.8.1.r1-08800-sm8150.0&id=c69050ee52338339f0eb1a07aa3eeeeeb2e209d9

Although, got either reverted by follow-ups or removed after the big Q merge commit:

  https://source.codeaurora.org/quic/la/platform/system/core/commit/?h=LA.UM.8.1.r1-08800-sm8150.0&id=dd28b6d7f1f44a529a2262d09834da4ca48937f4

Bring in the relevant bits so that system/vold part compiles.

Conflicts:
	fs_mgr/fs_mgr_fstab.cpp
	fs_mgr/include_fstab/fstab/fstab.h

Change-Id: Ibdf035e548c3f5085401f60df158c9a327947f33
(cherry picked from commit 9f03019be92a1ce86910ef20e6372a4785ba56c1)
Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com>
Signed-off-by: zlewchan <zlewchan@icloud.com>
2024-09-08 00:10:30 +02:00
me-cafebabe
9ee2afd3b5 liblp: Allow to flash on bigger block device
Needed for using Retrofit Dynamic Partitions on unified targets, which has different partition sizes on different devices.

Change-Id: I2b4c05401569ce5fc301ebafa7d130c3b0d87c64
2024-09-08 00:09:05 +02:00
Bruno Martins
85a30f4c86 fs_mgr: Allow remounts with Magisk installed
This allows remount to gracefully mount /system when Magisk
is installed.

As a sidenote, the ro.debuggable property check can safely
be removed due to the simple fact that CPP preprocessor flag
ALLOW_ADBD_DISABLE_VERITY=1 is passed when building
userdebug/eng.

Change-Id: Ic10eccbf5d225468c3dc42f8ae3ae7c05b49a699
2024-09-08 00:08:55 +02:00
Tom Marshall
2b61cd0b8c Revert "Format formattable partitions if mount fails"
This reverts commit 29dd6b6c01295222fee5ef2fc70692b2ecb12504.

Change-Id: I7b76cd920019ae8cb7270b3f83e777ea9de7f7a4
2024-09-08 00:00:47 +02:00
Alessandro Astone
85949a0b05 fs_mgr: mount: don't set the block device as ro for recovery
* In recovery we need to be able to edit the block device
   after it's been mounted.
   This allows, for example, to wipe system after mounting it

Change-Id: Ie536d275643e9d6063bba789e4cd2fa2671fc8fa
2024-09-08 00:00:35 +02:00
David Anderson
e3a3d903aa Make snapuserd recovery_available.
Bug: 349287459
Test: adb reboot recovery
      adb root
      adb shell ls -l /system/bin/snapuserd
(cherry picked from https://android-review.googlesource.com/q/commit:dcc81d427a9cfcb7560b4ba590ace3348b314860)
Merged-In: I69a3f8d2fd2d7dc157d14a0f743650881eec473d
Change-Id: I69a3f8d2fd2d7dc157d14a0f743650881eec473d
2024-07-09 02:35:21 +00:00
David Anderson
aaf11ec896 Revert "snapuserd: Don't statically link outside of ramdisk."
This reverts commit c9fa93f4e8.

Reason for revert: b/347670914
Bug: 347670914
(cherry picked from https://android-review.googlesource.com/q/commit:14fbf6d3909dab706568d1c409a941d5fd2a7428)
Merged-In: I9d63a69ccf1f8de98ab7cc23b9fbf400863cddfb
Change-Id: I9d63a69ccf1f8de98ab7cc23b9fbf400863cddfb
2024-06-17 21:43:13 +00:00
David Anderson
c9fa93f4e8 snapuserd: Don't statically link outside of ramdisk.
Also, remove snapuserd from the vendor ramdisk since this isn't used
anymore.

Bug: 345158294
Test: ldd snapuserd_ramdisk and system/bin/snapuserd
      apply full OTA on aosp_cf
Change-Id: I2c2ad1458d67a8449c548e22660f523ba9c86849
2024-06-13 01:29:12 +00:00
Akilesh Kailash
35bd4d8f30 Merge "Revert "libsnapshot: set thread priority"" into main 2024-06-12 20:06:10 +00:00
Daniel Zheng
0168ec74d0 Revert "libsnapshot: set thread priority"
This reverts commit db560090e4.

Reason for revert: breakage on aosp-main

Change-Id: Ib3384dce1e08dd19bce305eee4249d7167d74e10
2024-06-12 18:32:57 +00:00
Daniel Zheng
db560090e4 libsnapshot: set thread priority
Read merge thread + worker thread priority from build configurations. In
the case of low memory devices, a lower priority will reduce CPU
utilization post OTA reboot.

Test: th
Change-Id: I812fccf2ca805d9686a837774e1770a2eebf979a
2024-06-12 11:21:38 -07:00
Daniel Zheng
28801377a5 libsnapshot: configure threshold size
Test: th
Change-Id: Iba59fdc3e1188dd343314d129806d2c4c94aa8c5
2024-06-12 11:21:38 -07:00
Daniel Zheng
9a3a1a14b4 libsnapshot: pass build config o_direct
If o_direct is enabled in build configuration, forward this argument to
snapuserd when the daemon is started.

Bug: 332255580
Test: th
Change-Id: I8e4be5503665031735dba2ebc748e209c45df942
2024-06-11 13:20:23 -07:00
Yihan Dong
30d0608988 Merge "Add proposed trendy teams for CTS modules" into main 2024-06-06 01:54:57 +00:00
Yihan Dong
f0d3447af5 Add proposed trendy teams for CTS modules
Change-Id: I6f4dbaa75c219dd75fec84ab8c9590c4c81ec737
Test: build locally
Bug: 341598672
2024-06-05 01:09:09 +00:00
Elliott Hughes
c088de1879 libc++fs is part of libc++ now.
Change-Id: I2be806de736377e77bb49e4b3b9f72e25f7d717a
2024-06-04 16:47:32 +00:00
Treehugger Robot
276eabe757 Merge "Revert^2 "Set ro.fstype.data when /data is mounted"" into main 2024-05-30 21:25:26 +00:00
Kelvin Zhang
915f32d892 Revert^2 "Set ro.fstype.data when /data is mounted"
062eb59a83

Change-Id: I20c4d4c17e4a314eb8754ed9c03db3dd8e3a5d0f
2024-05-30 19:11:11 +00:00
Priyanka Advani
58a38f4681 Merge "Revert "Set ro.fstype.data when /data is mounted"" into main 2024-05-29 23:58:59 +00:00
Kelvin Zhang
062eb59a83 Revert "Set ro.fstype.data when /data is mounted"
Revert submission 3095293-fstype

Reason for revert: breaks build cf_x86_64_only_phone-next-userdebug

Reverted changes: /q/submissionid:3095293-fstype

Change-Id: I2d1b2561ec7a3d8ea954b375153dce1a936d0294
2024-05-29 23:26:19 +00:00
Treehugger Robot
ac7923211e Merge "Set ro.fstype.data when /data is mounted" into main 2024-05-29 17:49:18 +00:00
Daniel Zheng
0381ebefc4 Merge changes I115b6b98,Iff84c0df,Ice13f58e,I5302a9a2 into main
* changes:
  libsnapshot: set num merge threads
  snapshot_proto add build configuration variables
  update supported compression methods
  libsnapshot: get read_ahead_size from build
2024-05-29 17:29:31 +00:00
Akilesh Kailash
81f1da48bc create_snapshot: Build the binary as static
Build it statically so that it gets easy to be deployed
in lab host without additional shared dependency.

Bug: 342328623
Test: Build create_snapshot; ldd create_snapshot
Change-Id: Ie788ba34bfff38cf78f29ad41d912dcad3bf77de
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-05-25 03:47:52 +00:00
Daniel Zheng
43b2abf797 libsnapshot: set num merge threads
Read number of merge threads from build. In the case that this isn't
specified, fallback to our default.

**THIS doesn't seem to be currently working. It looks like we can't
directly read the property here?

Test: th
Change-Id: I115b6b987699759168d34239d030cfcd0238b1b4
2024-05-23 15:22:48 -07:00
Daniel Zheng
09e081f98e snapshot_proto add build configuration variables
We are adding low memory device configurables. Post OTA reboot, these
values need to be read during 1st stage init and set. Since .ro props
aren't available at this stage, we need to flush these configurables to
snapshot_protos that lives under /Metadata

Bug: 332255580
Test: th
Change-Id: Iff84c0dfe9c6931ea13165b380e11cee6343ce91
2024-05-23 14:31:05 -07:00
Daniel Zheng
6c0800fbbd update supported compression methods
Test: th
Change-Id: Ice13f58e6d29b8f28a4d43a86fb59e91ae9e9dde
2024-05-23 14:30:38 -07:00
Daniel Zheng
67ea4959a2 libsnapshot: get read_ahead_size from build
In the case that read ahead size is set by the build, we want to read
that property rather than use our default.

Bug: 332255580
Test: th
Change-Id: I5302a9a275d284be6c68edab9e13aae1128eb699
2024-05-23 14:30:37 -07:00
Yi Kong
0e8f64bb50 Fix build with ToT libc++
system/core/fs_mgr/libsnapshot/include/libsnapshot/cow_reader.h:174:33: error: no template named 'vector' in namespace 'std'
  174 |     bool GetSequenceDataV2(std::vector<uint32_t>* merge_op_blocks, std::vector<int>* other_ops,
      |                            ~~~~~^

Test: Build with ToT libc++
Change-Id: I1858b30bd4eb6df39411a60a64d6bf16d2a7bfa6
2024-05-24 00:48:35 +09:00
Kelvin Zhang
78c65e52a8 Set ro.fstype.data when /data is mounted
Test: th
Bug: 341216848
Change-Id: I8adf12661eeb790bf0beb80409a678d53c2baea5
2024-05-22 10:42:02 -07:00
Treehugger Robot
68c89b7d7c Merge "Updated 'cc' field of fuzz_config in Android.bp file" into main 2024-05-08 03:42:25 +00:00
Akshata Kadam
87b1dc23c2 Updated 'cc' field of fuzz_config in Android.bp file
corrected cc field in fuzz_config

Bug: 306435930
Test: Build liblp_apis_fuzzer

Change-Id: Id74b2d0d6328ba84df1dcabd47ab1795206f8ca2
2024-05-07 11:42:02 +00:00
Daniel Zheng
c542da2674 libsnapshot: update write error logs
We want to print how much total data we are attempting to write if a
failure occurs

Bug: 336461151
Test: th
Change-Id: I269b7e280df34994c80fa8ef7d39163d053fa9ea
2024-05-06 09:49:07 -07:00
Treehugger Robot
4dced90fdc Merge "Add device= in Fstab" into main 2024-05-02 20:11:52 +00:00
Jaegeuk Kim
d18649eab3 Add device= in Fstab
This adds a raw partition to /data.

Bug: 336319772
Change-Id: Iaae51452be621a15ccd9c2530dae44f4c8714b2f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2024-05-02 00:54:46 +00:00
Kelvin Zhang
6cdee65b8b Allow querying for fstab for a mount point with fstype
Test: th
Bug: 293313353
Change-Id: I8e12c465d0a3e886fcfa0cebf546b145b785c220
2024-04-25 09:48:13 -07:00
Daniel Zheng
885bd1c8d6 libsnapshot: remove hard coded cow version
Remove hard coded global variables referencing cow version in
libsnapshot. This value should stem from the build system, or set
individually in test cases.

Bug: 307452468
Test: th
Change-Id: I3d536246008acca92cd93e77886e5f7d17a131e0
2024-04-19 11:39:46 -07:00
Akilesh Kailash
fa5cf6884a snapshotctl: Check for cow path when allocated from /data
If the COW device is allocated only from /data, then
the COW device name will end with -cow-img. Hence, check
that path as well.

Bug: 335552315
Test: snapshotctl apply-update
Change-Id: Id3c5cf8afd77994da117de41bb98a226b350f8e4
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-04-18 06:19:56 -07:00
Treehugger Robot
ef1a559b1f Merge "vts_fs_test: Annotate fs type test for VSR." into main 2024-04-11 05:04:11 +00:00
Daniel Zheng
361120ca71 Merge "support negative zstd compression levels" into main 2024-04-10 17:56:45 +00:00
Daniel Zheng
3785e7b1f7 support negative zstd compression levels
Zstd compression goes all the way down to -7. zstd compression level -3
gives around the same compression ratio as lz4 level=3. Need further
testing to see performance comparison

Test: ota_from_target_files, update_device.py
Change-Id: Ic082b31aa8af938f80be628c73667e02353835f0
2024-04-10 10:56:18 -07:00
Daniel Zheng
f5e9af16b6 Merge "libsnapshot: fix warnings" into main 2024-04-08 19:32:48 +00:00
Treehugger Robot
a45e51339d Merge "Add dm-thin support" into main 2024-04-03 21:46:00 +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
Treehugger Robot
2dab9f2968 Merge "snapshotctl: Build few commands only for userdebug/eng builds" into main 2024-04-02 17:39:16 +00: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
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
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
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