This only added one real method to ICowWriter, so let's just fold it
into ICowWriter. CompressedSnapshotWriter goes away as well.
CompressedSnapshotReader is now part of libsnapshot_cow.
Bug: 280529365
Test: m otapackage
apply ota
Change-Id: I55358c3c9be111d5aee1a0c22c29cb1539d05494
images are being flashed twice, because of an additional collectImages.
This is resulting in a ~50% increase in flashing time
Test: fastboot flashall -w
Change-Id: I6c271e1e1456cd789f37ebd67cefd221cabc6e7a
This fixes the following compiler errors with gcc
storage.cpp:45:20: error: 'ostream_iterator' is not a member of 'std'
storage.cpp:50:10: error: 'istream_iterator' is not a member of 'std'
Change-Id: I570e332d100bb18e445644a9d57dc14d80f104b5
This fixes the following compiler error with gcc
fastboot_driver.h:51:10: error: ‘function’ in namespace ‘std’ does not name a template type
Change-Id: I3a4d9b48bfdc2c76e443e2efe1761ec9503c6dc5
The ANDROID_SERIAL env is useful for managing multiple
directly connected devices at one time.
Unfortunately for network connected devices, its harder to use.
This is because both adb and fastboot use the same ANDROID_SERIAL
environment value to identify the device to use, and while that
one value works for directly connected devices, when using
network connected devices, the fastboot and adb port numbers may
differ for the same device.
So if I set: `ANDROID_SERIAL="tcp:127.0.0.1:44403"`
fastboot will work, but when I type `adb shell`, I'll get:
adb: device 'tcp:127.0.0.1:44403' not found
As `adb devices` outputs:
List of devices attached
localhost:36697 device
To resolve this, we need separate environment variables,
so introduce a FASTBOOT_DEVICE variable for fastboot.
If FASTBOOT_DEVICE is set, it will use that, and if not
it will fall back to the ANDROID_SERIAL if it is set.
Using an explicit -s argument will still override both.
Change-Id: Icd7db6f29e51ed2decd219e35537f6ed98d698b8
Signed-off-by: John Stultz <jstultz@google.com>
This CL allows restart_period to be set to a value shorter than 5s.
Previously this was prohibited to rate limit crashing services. That
behavior is considered to be a bit too conservative because some
services don't crash, but exit deliverately.
adbd is the motivating example. When adb root or adb unroot is
requested, it changes its mode of operation (via sysprop), exits itself,
and restarts (by init) to enter into the mode. However, due to the 5s
delay, the mode change can complete no earlier than 5 seconds after adbd
was started last time. This can slow the mode change when it is
requested right after the boot.
With this CL, restart_period can be set to a value smaller than 5. And
services like adbd can make use of it. However, in ordef to rate limit
crashing service, the default is enforced if the service was crashed
last time. In addition, such intended restart is not counted as crashes
when monitoring successive crashes during booting.
Bug: 286061817
Test: /packages/modules/Virtualization/vm/vm_shell.sh start-microdroid \
--auto-connect -- --protected
* with this change: within 2s
* without this change: over 6s
Change-Id: I1b3f0c92d349e8c8760821cf50fb69997b67b242
To support multiple implementations of CowWriter, we will need to move
direct usage of CowWriter to ICowWriter. This CL does this while also
adding some small cleanups:
- Move ICowWriter implementation methods to a new CowWriterBase class.
This keeps ICowWriter as a clean interface.
- Make the "Add" methods pure virtual, move the "Emit" methods to
CowWriterBase as an implementation detail.
- Simplify Initialize/InitializeAppend so they can be shared.
- Rename CowWriter to CowWriterV2.
- Rename cow_writer.cpp to writer_v2.cpp.
- Rename cow_api_test.cpp to test_v2.cpp.
- Remove ICowWriter::options, replace with GetBlockSize.
- Add a CreateCowWriter helper to avoid implementation details in
update_engine.
Bug: 280529365
Test: builds
Change-Id: If50faf03b292c6c8b23a6170e3f37329fb759ff6
am skip reason: Merged-In Ic84901ce5af766338b2cab07c3cf10841ba9a150 with SHA-1 40b59a61fc is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2617475
Change-Id: I6445e78c3e5bb50f1eb9ac73631853743100e160
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Ic84901ce5af766338b2cab07c3cf10841ba9a150 with SHA-1 40b59a61fc is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2617475
Change-Id: I4346f368dc445832bedb831fa9eefad6873f9548
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Adjust this test to align with VSR. First, skip the test if kernel is
< 5.10 or < Android 13. Second, allow non-dynamic partitions to be vfat.
Bug: 286038059
Test: vts_fs_test on CF
Change-Id: I5bd874f68296f7155d8c4366ebc13fe3d59c3ee6
The 32-bit variant of libjsoncpp is not always installed
on 64-bit devices, so it must always be statically included.
We should probably collapse libcutils_test with
libcutils_test_static in the future.
Bug: 285357054
Test: libcutils_test
Merged-In: Ic84901ce5af766338b2cab07c3cf10841ba9a150
Change-Id: Ic84901ce5af766338b2cab07c3cf10841ba9a150
The 32-bit variant of libjsoncpp is not always installed
on 64-bit devices, so it must always be statically included.
We should probably collapse libcutils_test with
libcutils_test_static in the future.
Bug: 285357054
Test: libcutils_test
Change-Id: Ic84901ce5af766338b2cab07c3cf10841ba9a150
These tests are still giving us trouble. Move them to libfiemap, which
(1) is closer to the source of implementation, and (2) allows us to
re-use the temporary filesystem code. This won't perturb the state of
the actual device.
The new test creates a 64MB ext4 or f2fs mount point as a sandbox, which
should be much safer.
Bug: 285197715
Test: fiemap_writer_test
Change-Id: I33502d49613be4f269a80e5c632514fc56a0246a
Using for easier debugging. Replacing old getter methods in flash task
with GetInfo(key)
Test: fastboot_test
Change-Id: If42df86c4b0278c3dc5525b1058f1947f0b34794
`stderror` is used in this file and it is defined in `string.h/cstring`, so
the header file needs to be directly included.
Test: build
Bug: 285204695
Change-Id: Idf34126626ad0e9bb397df3d5da50439bf18381d
if we call -w and a reboot task runs beforehand, we don't actually wipe
the given partitions. We want the wipe to occur before reboots.
Test: fastboot flashall -w
Change-Id: If327c5de0858e222cf5fc14531bc20fb741c2960
A point of confusion that has been encountered recently is that the
fileencryption argument is optional (since Android 11), yet the fstab
parser requires the equals sign in "fileencryption=". Thus, someone
wanting to use the default options must use "...,fileencryption=,...".
Make "fileencryption" by itself mean the same thing so that it works as
expected.
Test: atest CtsFsMgrTestCases
Change-Id: I65ce6b9513942bec2107838396835e7aafb3bf37
am skip reason: Merged-In Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685 with SHA-1 e02ef9e9ce is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2604246
Change-Id: Ic32842628663805e2402a90d66b5815d45ca19de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685 with SHA-1 e02ef9e9ce is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2604246
Change-Id: I7580cbd4fec14c89bc905e67c6466cb6bba00a96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>