Commit graph

8544 commits

Author SHA1 Message Date
Automerger Merge Worker
a0df3e3584 Merge "Generate recovery.img for unittest during build time" am: bf885b6b21 am: 616db72209
Change-Id: I264469782af6ffab1c138edc01b577abb5fd2675
2020-02-24 19:14:38 +00:00
Automerger Merge Worker
616db72209 Merge "Generate recovery.img for unittest during build time" am: bf885b6b21
Change-Id: I75f0fa79c3e8d2c771edb18bcdc8faa344f273f9
2020-02-24 19:01:14 +00:00
Tianjie Xu
bf885b6b21 Merge "Generate recovery.img for unittest during build time" 2020-02-24 18:49:05 +00:00
Automerger Merge Worker
a761b7fb5a Merge "Recovery UI meet issue if image size is too large" am: f5b94d6e9b am: c9b0fe7172
Change-Id: I4cc6aa5edce84a251eca5dd5da2098a9ea7ac8cb
2020-02-22 17:54:18 +00:00
Automerger Merge Worker
c9b0fe7172 Merge "Recovery UI meet issue if image size is too large" am: f5b94d6e9b
Change-Id: I358dc2c378a2301b46046832ae4c168e7a6fb649
2020-02-22 17:46:03 +00:00
Elliott Hughes
f5b94d6e9b Merge "Recovery UI meet issue if image size is too large" 2020-02-22 17:39:19 +00:00
Automerger Merge Worker
e00afc3fbf [automerger skipped] Force package installation with FUSE unless the package stores on device am: ba27adbbb6 -s ours
am skip reason: Change-Id Ibc9b095036a2fa624e8edf6c347ed4f12aef072f with SHA-1 5e6c4e9a91 is in history

Change-Id: I27862517a8dd9f64325226bcb73643f82da30398
2020-02-21 19:25:03 +00:00
zhang sanshan
0d81b89472 Recovery UI meet issue if image size is too large
When display screen size is too small, some images in recovery
resource cannot caculate the right display position. So the
image cannot show in the screen.
Limit the calculated position to avoid such issue.

Change-Id: Iebebfe0dfbc568ee3a6b6a31b81d060b3ce5f940
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
2020-02-21 16:20:47 +00:00
Tianjie Xu
fa77ee8470 Generate recovery.img for unittest during build time
The unit tests for imgpatch is comparing the compressed bytes. As
a result, these unit tests will fail with libz change.

Since the recovery image is just a gzipped ramdisk with some wrappings,
we can generate with minigzip it during the build time. This matches
the usage in the real world, where we generate the patch with the host
side libz; and apply the patch with the library on the device.

Bug: 149443852
Test: tests pass on Pixel3
Change-Id: I7885765a161c6bf765671bc55a72cfcaa04b4138
2020-02-20 23:09:44 -08:00
Automerger Merge Worker
4d1f8869f4 Merge "recovery: add a way to enable metadata_csum for ext4" am: 5ac6163822 am: 9af39bf5c4
Change-Id: I7f7552d6b24eff0d91d68ed5d1bf6f59bb723815
2020-02-21 05:54:41 +00:00
Automerger Merge Worker
9af39bf5c4 Merge "recovery: add a way to enable metadata_csum for ext4" am: 5ac6163822
Change-Id: I9957761c02094993bc84192e86069bd0832baee7
2020-02-21 05:41:19 +00:00
Jaegeuk Kim
5ac6163822 Merge "recovery: add a way to enable metadata_csum for ext4" 2020-02-21 05:40:48 +00:00
Automerger Merge Worker
70cf3d4556 Merge "updater_sample: add internet access permission" am: c760702633 am: a599c6ca45
Change-Id: I50d2fd15539073b838fdb7ac04a85c4db8fbffff
2020-02-20 23:28:32 +00:00
Automerger Merge Worker
a599c6ca45 Merge "updater_sample: add internet access permission" am: c760702633
Change-Id: If92f9b1c1afa05dcd50e1f121d04fccba6e9aed8
2020-02-20 23:13:53 +00:00
Treehugger Robot
c760702633 Merge "updater_sample: add internet access permission" 2020-02-20 22:58:32 +00:00
Tianjie Xu
cd8faf7eee Force off-device package installation with FUSE
The non-A/B package installation is subject to TOC/TOU flaw if the
attacker can switch the package in the middle of installation. And the
most pratical case is to store the package on an external device, e.g. a
sdcard, and swap the device in the middle.

To prevent that, we can adopt the same protection as used in sideloading
a package with FUSE. Specifically, when we install the package with FUSE,
we read the entire package to cryptographically verify its signature.
The hash for each transfer block is recorded in the memory (TOC), and
the subsequent reads (TOU) will be rejected upon dectecting a mismatch.

This CL forces the package installation with FUSE when the package stays
on a removable media.

Bug: 136498130
Test: Run bin/recovery --update_package with various paths;
and packages are installed from FUSE as expected
Test: recovery_unit_test - no new failures

Change-Id: Ia5afd19854c3737110339fd59491b96708926ae5
Merged-In: I35119c2334895aa0ef4ed71b3ddd08f280c0c031
2020-02-13 19:16:38 +00:00
Raman Tenneti
4139a30ec5 Merge "Revert "Force package installation with FUSE unless the package stores on device"" into qt-qpr1-dev-plus-aosp 2020-02-13 03:08:09 +00:00
Raman Tenneti
daaacea96e Revert "Force package installation with FUSE unless the package stores on device"
This reverts commit 5e6c4e9a91.

Reason for revert: BUG: 149432069 - build failure on git_qt-qpr1-dev-plus-aosp on docs. 'otautil/roots.h' file not found is the error.
Forrest run: https://android-build.googleplex.com/builds/forrest/run/L85900000460577420

Change-Id: I35119c2334895aa0ef4ed71b3ddd08f280c0c031
Merged-In: I35119c2334895aa0ef4ed71b3ddd08f280c0c031
2020-02-13 03:03:36 +00:00
Bryan Ferris
7bc9c8297b Merge "Force package installation with FUSE unless the package stores on device" into qt-qpr1-dev-plus-aosp 2020-02-12 23:37:34 +00:00
Jaegeuk Kim
a8d36e1ea9 recovery: add a way to enable metadata_csum for ext4
Requires to add "metadata_csum" in fsmgr_flag of fstab.

Bug: 149039306
Change-Id: I2b95dcaaf2ba224135ad51f117b7b01bbf342b7e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-02-12 12:16:05 -08:00
Automerger Merge Worker
6409d5f3c6 Merge "rm libbinderthreadstate" am: 2015fe5dbc am: ecfa97375f
Change-Id: I78467551e63cfac87f67c7a311ea9426a01fac94
2020-02-07 00:32:38 +00:00
Automerger Merge Worker
ecfa97375f Merge "rm libbinderthreadstate" am: 2015fe5dbc
Change-Id: Ia4e229316898c37513c9f025877eb77a730df346
2020-02-07 00:17:33 +00:00
Treehugger Robot
2015fe5dbc Merge "rm libbinderthreadstate" 2020-02-07 00:02:40 +00:00
Steven Moreland
c7647926f4 rm libbinderthreadstate
This library is empty, and its functionality has moved
into libbinder/libhwbinder.

Bug: 148692216
Test: N/A
Change-Id: Ie50d9130a8e43de7d5b222883169c26ab958e6d7
2020-02-06 13:28:52 -08:00
Automerger Merge Worker
4fcfb824ad [automerger skipped] Merge "Import translations. DO NOT MERGE" am: 8501ef04ea -s ours am: 88efe3ea38 -s ours
am skip reason: subject contains skip directive

Change-Id: I9f6b5c81edd68d66e0a7c7ebc07bd6ee97fe4edf
2020-02-01 20:30:33 +00:00
Automerger Merge Worker
88efe3ea38 [automerger skipped] Merge "Import translations. DO NOT MERGE" am: 8501ef04ea -s ours
am skip reason: subject contains skip directive

Change-Id: I816a0cb5930289bc2120394521398d6eb2487303
2020-02-01 20:15:57 +00:00
Treehugger Robot
8501ef04ea Merge "Import translations. DO NOT MERGE" 2020-02-01 20:05:23 +00:00
Bill Yi
3147b682cf Import translations. DO NOT MERGE
Change-Id: I81fcbdc2d6c21f6ffdefcf3c10792ebe5ade6e18
Auto-generated-cl: translation import
2020-02-01 07:19:31 -08:00
Automerger Merge Worker
9763f002db Merge "Show warning message if sideload failed or is interrupted." am: e1d76ef395 am: d93d116134
Change-Id: Iecebcf108d57d14263e0a14687fe2d864fe579f2
2020-01-30 22:30:52 +00:00
Automerger Merge Worker
d93d116134 Merge "Show warning message if sideload failed or is interrupted." am: e1d76ef395
Change-Id: I1f87047c256d49cd498e545b4899528c9d5a0ed3
2020-01-30 22:20:06 +00:00
Yifan Hong
e1d76ef395 Merge "Show warning message if sideload failed or is interrupted." 2020-01-30 22:03:58 +00:00
Yifan Hong
13b099696f Show warning message if sideload failed or is interrupted.
For non A/B and Virtual A/B devices where sideloading may affect
the existing OS,
- If sideload has failed, show a warning message in recovery menu header.
- If sideload has interrupted, automatically reboot back into recovery and
  show the warning message in recovery menu header.

Test: the above
Fixes: 140749209
Change-Id: Ifdfc28b45975cdc31b6fce2ecb99acc31bc61fa8
2020-01-29 16:59:07 -08:00
Automerger Merge Worker
565397643b Merge "Prompt for confirmation before reboot if installation fails." am: 1b208af5d4 am: 05eec42808
Change-Id: I691a30f8d114b0de68ba8a7d309a130ad4b4290c
2020-01-29 21:46:30 +00:00
Yifan Hong
05eec42808 Merge "Prompt for confirmation before reboot if installation fails."
am: 1b208af5d4

Change-Id: I04be948b2c16b0f838ec37fe310006baeb5f1604
2020-01-29 13:26:18 -08:00
Yifan Hong
1b208af5d4 Merge "Prompt for confirmation before reboot if installation fails." 2020-01-29 20:32:27 +00:00
Yifan Hong
c9163fdacc Prompt for confirmation before reboot if installation fails.
If previous installation fails, menu item 'Reboot system now'
and 'Power off' now prompts for confirmation from the user.

Known issues:
- If the sideload is interrupted, it'll still boot into normal
Android in the next cycle.
- If 'Enter fastbootd' is chosen, and then 'Enter recovery', such
prompt do not show up.

Test: manual
Fixes: 142892891

Change-Id: I929b80e0520bd3b9f56d88a4b2203fcdd8d7b013
2020-01-28 12:47:55 -08:00
Automerger Merge Worker
ffea0e7333 Merge "Remove fsck_unshare_blocks." am: 699ea0f325 am: 79ce1d3420
Change-Id: I2e5b054970ad9d6783130414d7e82d6e62a541de
2020-01-28 01:22:27 +00:00
David Anderson
79ce1d3420 Merge "Remove fsck_unshare_blocks."
am: 699ea0f325

Change-Id: Iec58138809dd2809abb5de133810ba30a224dcce
2020-01-27 17:08:31 -08:00
Treehugger Robot
699ea0f325 Merge "Remove fsck_unshare_blocks." 2020-01-28 00:57:47 +00:00
David Anderson
969787cffd Remove fsck_unshare_blocks.
This code is dead. It was briefly used to support "adb remount" with
deduplicated partitions, but was very quickly obsoleted by overlayfs
support. There is no reason to include it anymore.

Bug: N/A
Test: N/A
Change-Id: I4cdcbf66bec80092f954826eaae037934ff37765
2020-01-27 09:30:55 -08:00
Automerger Merge Worker
a8a4fb3b18 Merge "Set Casefold and PrjQuotas in Factory Reset" am: 1cf5b0b591 am: ddb9dbb52b
Change-Id: I3524e603efee4970622f761ced025c849965e830
2020-01-25 03:21:21 +00:00
Daniel Rosenberg
ddb9dbb52b Merge "Set Casefold and PrjQuotas in Factory Reset"
am: 1cf5b0b591

Change-Id: I445400a7ee2ed293a712fad28eb4f8d0c750fa17
2020-01-24 19:09:33 -08:00
Treehugger Robot
1cf5b0b591 Merge "Set Casefold and PrjQuotas in Factory Reset" 2020-01-25 01:03:43 +00:00
Daniel Rosenberg
f25b977740 Set Casefold and PrjQuotas in Factory Reset
This sets up devices to have casefolding and project quotas if they have
enabled the relevant product properties. For ext4, we must set wide
inodes at makefs time, but other things are enabled by fs_mgr with
tune2fs at boot time.

Bug: 138321217
Bug: 138322712
Test: Enable on a device.
      Reformat from recovery. Check that /data has the expected values
      using tune2fs/f2fs.fsck
Change-Id: If706a3cad591f311eb904df4deca531d0b3fe0c4
2020-01-24 15:49:00 -08:00
Automerger Merge Worker
4366e0d470 Merge "Mark libedify library as recovery_available." am: e3c7b067c8 am: 8de3a75e87
Change-Id: I508ad557bc9cef0f19c0727054edae49386eead3
2020-01-24 02:54:25 +00:00
Automerger Merge Worker
8de3a75e87 Merge "Mark libedify library as recovery_available." am: e3c7b067c8
Change-Id: I038243c757cfc755893f3d468da6498c1c67d2fd
2020-01-24 02:42:06 +00:00
Yifan Hong
e3c7b067c8 Merge "Mark libedify library as recovery_available." 2020-01-24 02:31:05 +00:00
P.Adarsh Reddy
cd46c1a860 Mark libedify library as recovery_available.
Mark libedify library as recovery_available so that
this is available in recovery.

Bug: 148189099
Test: Tested compilation, library is recovery available.
Functionality wise, tested sideloading in recovery.
Change-Id: Ie4a7a3af1fd32b7ec1bf2016938550e9312a519b
2020-01-23 14:06:55 +00:00
Tianjie Xu
5e6c4e9a91 Force package installation with FUSE unless the package stores on device
The non-A/B package installation is subject to TOC/TOU flaw if the
attacker can switch the package in the middle of installation. And the
most pratical case is to store the package on an external device, e.g. a
sdcard, and swap the device in the middle.

To prevent that, we can adopt the same protection as used in sideloading
a package with FUSE. Specifically, when we install the package with FUSE,
we read the entire package to cryptographically verify its signature.
The hash for each transfer block is recorded in the memory (TOC), and
the subsequent reads (TOU) will be rejected upon dectecting a mismatch.

This CL forces the package installation with FUSE when the package stays
on a removable media.

Bug: 136498130
Test: Run bin/recovery --update_package with various paths;
and packages are installed from FUSE as expected
Test: recovery_component_test - all passing

Change-Id: Ibc9b095036a2fa624e8edf6c347ed4f12aef072f
Merged-In: Ibc9b095036a2fa624e8edf6c347ed4f12aef072f
2020-01-22 22:01:46 +00:00
Tianjie Xu
ba27adbbb6 Force package installation with FUSE unless the package stores on device
The non-A/B package installation is subject to TOC/TOU flaw if the
attacker can switch the package in the middle of installation. And the
most pratical case is to store the package on an external device, e.g. a
sdcard, and swap the device in the middle.

To prevent that, we can adopt the same protection as used in sideloading
a package with FUSE. Specifically, when we install the package with FUSE,
we read the entire package to cryptographically verify its signature.
The hash for each transfer block is recorded in the memory (TOC), and
the subsequent reads (TOU) will be rejected upon dectecting a mismatch.

This CL forces the package installation with FUSE when the package stays
on a removable media.

Bug: 136498130
Test: Run bin/recovery --update_package with various paths;
and packages are installed from FUSE as expected
Test: recovery_component_test - all passing

Merged-In: Ibc9b095036a2fa624e8edf6c347ed4f12aef072f
Change-Id: Ibc9b095036a2fa624e8edf6c347ed4f12aef072f
2020-01-21 21:48:13 +00:00