Convert code to use C++ Fstab struct and C++ std::strings.
Bug: 62292478
Bug: 118634720
Test: boots
Change-Id: Ibdc1df5831bc885d7c1574419f41af026e49a137
UpdateEngine has a feature that verifies
payload without downloading the whole update package.
If UpdateEngine detects invalid payload,
the sample app aborts the update.
No JUnit tests, because it accesses files on the
device and migrating tests to robolectric
is not worth for this sample app.
Bug: 77150191
Test: device
Change-Id: Ib8ce73508a02cf5fdcb326d8ba46c1d05ed5efe5
It's moved from PrepareStreamingService intent service.
Now PrepareUpdateService takes an UpdateConfig and
builds PayloadSpec for UpdateEngine for both streaming
and non-streaming update.
It allows us to do all preparations in intent service's
thread, without blocking UI.
We will also add checksum verification to
PrepareUpdateService.
Test: device, junit
Bug: 77150191
Change-Id: I15c0bc58e3238bea6ea1c4f13063575e2def89c1
Merged-In: Iea69acd9aa41e17538c26aff60f7598093ca7744
bootable/recovery/applypatch/imgpatch.cpp:57:3: error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
CHECK_GT(expected_target_length, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bootable/recovery/applypatch/freecache.cpp:145:50: error: comparison of integers of different signs: 'long' and '__fsblkcnt64_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (sf.f_bsize == 0 || free_space / sf.f_bsize != sf.f_bavail) {
~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
bootable/recovery/applypatch/freecache.cpp:190:16: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (free_now >= bytes_needed) {
~~~~~~~~ ^ ~~~~~~~~~~~~
bootable/recovery/applypatch/freecache.cpp:233:18: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (free_now >= bytes_needed) {
~~~~~~~~ ^ ~~~~~~~~~~~~
Test: `mmma -j bootable/recovery/applypatch` with -Wsign-compare
Test: Run recovery_unit_test on marlin.
Change-Id: I4aa1fd0f9b7205b9e4e50874fc4bccb62951e7fe
It's moved from PrepareStreamingService intent service.
Now PrepareUpdateService takes an UpdateConfig and
builds PayloadSpec for UpdateEngine for both streaming
and non-streaming update.
It allows us to do all preparations in intent service's
thread, without blocking UI.
We will also add checksum verification to
PrepareUpdateService.
Test: device, junit
Bug: 77150191
Change-Id: Iea69acd9aa41e17538c26aff60f7598093ca7744
After we generate the localized confirmation text images for certain dpi,
we can now load these images and display them under recovery. Devices that
cannot load the images will use the backup text strings as before.
Bug: 74397117
Test: check the menu with multiple locales, and check all the images locally
with locale test, check the fall back strings.
Change-Id: Ic31a55670026c909ec7a05cb0bb4a0fc1d5d15c7
Seems they're racing with SurfaceFlinger in acquiring the display, which
occasionally takes down the device and leads to test failures.
Bug: 120601844
Test: Run recovery_unit_test on marlin. ScreenRecoveryUITest not
triggered.
Change-Id: I80b21595247a87fc1f2f95aa68df59f58bdf0257
Previously it considered a match if the given path (i.e. path to an
update package) fully equals to a mount_point. For example, `uncrypt
/data block.map` or `uncrypt /vendor block.map` would exit successfully,
without producing a block map.
Test: `uncrypt /path/to/package.zip block.map`
Test: `uncrypt /vendor block.map` fails.
Change-Id: Id946ab1c0b158b623013f89463cbb1960141d8b5
Also use android::base::{Dirname,Realpath,StartsWith}.
Test: Run uncrypt on device (`uncrypt package block.map`).
Change-Id: Ifacd01d6b35d85ea4afcb93a0dbc0235bb765a75