Commit Graph

8743 Commits

Author SHA1 Message Date
Yifan Hong
bc7e1db211 Add slot suffix to DAP ops
If device supports both A/B and non-A/B, when applying a
non-A/B package, add current slot suffix and apply the update
to the partition at current slot.

This includes:
- (un)map_partition in edify script. For example,
  map_partition("system") will automatically append slot suffix
  to "system" before calling CreateLogicalPartition.
- All operations in dynamic_partitions_op_list. For example,
  add foo group_foo
  will automatically append slot suffix to foo and group_foo
  before editing the super partition metadata.

Test: apply update
Bug: 153581609
Change-Id: Idbd0bfea142529a33dddb4d2debfc74513290730
2020-05-07 19:25:26 -07:00
Yifan Hong
2a4afd29a1 Detect non-A/B vs. A/B packages correctly.
Check the package metadata to determine whether this is an
A/B or non-A/B update package. This is more accurate.

Also checks ro.virtual_ab.allow_non_ab flag. This is useful for
continuously supporting (and testing) non-A/B.

Bug: 153581609
Test: apply non-A/B update on cuttlefish

Change-Id: I629a533a67966d46d9cd87a59c6b9af26daf1667
2020-05-07 19:25:26 -07:00
Tianjie Xu
e8ca1b8634 Consolidate the wait in recovery's reboot
After a reboot function call, we should always wait for it to finish
without executing other instructions.

Bug: 151110322
Test: build
Change-Id: I1dda291a0835ff96df7eaf42eba1a38267a3beeb
(cherry picked from commit 00c4aba9bf428717fc00e26a03e97401eca76ee8)
2020-03-18 13:46:49 -07:00
TreeHugger Robot
342e53d045 Merge "Add more mounting options to updater mount function." into rvc-dev 2020-03-18 18:51:04 +00:00
Hongguang Chen
b37d794351 Add more mounting options to updater mount function.
If enabling the oem partition, it will be mounted by updater before
reading product properties from it. To be safety, we want to enable AVB
to this oem partition. But this means the oem partition can never be
mounted to writable. Otherwise, that partition will be corrupted to AVB
verifying.
This change follows fs_mgr to allow to pass more mounting options to the
updater.

BUG: 150156957
Test: make ota package which mounts AVB oem partition to read only and
run OTA.

Change-Id: I2ebbe3c8ac53c70112f3fed2703fcba9170405a6
2020-03-17 16:16:43 -07:00
Automerger Merge Worker
22f595b2c5 [automerger skipped] Import translations. DO NOT MERGE am: 2f6ed0524e -s ours
am skip reason: subject contains skip directive

Change-Id: Ibac7db9ffa4af2adee660bbf3fe61b5f21495f13
2020-03-17 15:17:12 +00:00
Bill Yi
2f6ed0524e Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I05a2df29e459400e5af878922f6e73a8b94f042b
2020-03-16 19:53:58 -07:00
TreeHugger Robot
2774d5f4f0 Merge "Move libboot_control to boot_control 1.1" into rvc-dev 2020-03-03 06:52:35 +00:00
Marek Z Jeziorek
cbb0b54b12 New priority scripts + critical updates to fonts.
Author: Marek Z. Jeziorek <marekj@google.com>

Needs to be submitted with
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/10280447

BUGANIZER BUGS Addressed
========================
BUG: 149257053

CHANGES
=======
Remove font files no longer required
deleted:    other/NotoSansAdlam-Regular.ttf
deleted:    other/NotoSansGeorgian-Bold.otf
deleted:    other/NotoSansGeorgian-Medium.otf
deleted:    other/NotoSansGeorgian-Regular.otf
deleted:    other/NotoSansJavanese-Regular.ttf
deleted:    other/NotoSansTifinagh-Regular.ttf
deleted:    other/NotoSerifGeorgian-Bold.otf
deleted:    other/NotoSerifGeorgian-Regular.otf

modified:   fonts.mk
modified:   other/Android.bp

Replacements for the above deleted files:
new file:   other/NotoSansAdlam-VF.ttf
new file:   other/NotoSansGeorgian-VF.ttf
new file:   other/NotoSansJavanese-Regular.otf
new file:   other/NotoSansTifinagh-Regular.otf
new file:   other/NotoSerifGeorgian-VF.ttf

New additions to Android fonts (living/revival languages):
new file:   other/NotoSansGunjalaGondi-Regular.otf
new file:   other/NotoSansHanifiRohingya-Regular.otf
new file:   other/NotoSansKhojki-Regular.otf
new file:   other/NotoSansMasaramGondi-Regular.otf
new file:   other/NotoSansWancho-Regular.otf
new file:   other/NotoSansWarangCiti-Regular.otf

Test: ===================================================
Test: on Android (click on a link within a browser):
Test: Adlam https://en.wikipedia.org/wiki/Adlam_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_Extended
Test: Gunjala Gondi
https://en.wikipedia.org/wiki/Gunjala_Gondi_(Unicode_block)
Test: Hanifi Rohingya
https://en.wikipedia.org/wiki/Hanifi_Rohingya_(Unicode_block)
Test: Javanese https://en.wikipedia.org/wiki/Javanese_(Unicode_block)
Test: Khojki https://en.wikipedia.org/wiki/Khojki_(Unicode_block)
Test: Masaram Gondi
https://en.wikipedia.org/wiki/Masaram_Gondi_(Unicode_block)
Test: Tifinagh https://en.wikipedia.org/wiki/Tifinagh_(Unicode_block)
Test: Wancho https://en.wikipedia.org/wiki/Wancho_(Unicode_block)
Test: Warang Citi
https://en.wikipedia.org/wiki/Warang_Citi_(Unicode_block)
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: udhr Adlam https://unicode.org/udhr/d/udhr_fuf_adlm.html
Test: udhr Georgian https://unicode.org/udhr/d/udhr_kat.html
Test: udhr Gunjala Gondi NA (Not Available)
Test: udhr Hanifi Rohingya NA (Not Available)
Test: udhr Javanese https://unicode.org/udhr/d/udhr_jav_java.html
Test: udhr Khojki NA (Not Available)
Test: udhr Masaram Gondi NA (Not Available)
Test: udhr Tifinagh https://unicode.org/udhr/d/udhr_tzm_tfng.html
Test: udhr Wancho NA (Not Available)
Test: udhr Warang Citi NA (Not Available)
Test: ===================================
Test: on Android (comparing two systems - before/after)
Test: Georgian: Systems settings menus compared side by side
Test: ===================================
Test: on Mac (comparing the existing Android fonts with the new font
Test: using diffenator - https://github.com/googlefonts/fontdiffenator)
Test: ===================================
Test: SansAdlam-VF: VALIDATED
Test: SansGeorgian-VF: VALIDATED
Test: SansGunjalaGondi: NEW (No Applicable)
Test: SansHanifiRohingya: NEW (No Applicable)
Test: SansJavanese: VALIDATED
Test: SansKhojki: NEW (No Applicable)
Test: SansMasaramGondi: NEW (No Applicable)
Test: SansTifinagh: VALIDATED
Test: SansWancho: NEW (No Applicable)
Test: SansWarangCiti: NEW (No Applicable)
Test: SerifGeorgian-VF: VALIDATED

Change-Id: I41e030b63f83ec243ae6f174c061faa5298bd6dc
Signed-off-by: Marek Z Jeziorek <marekj@google.com>
(cherry picked from commit f165b9c886476889d99edad8d3e43b2980b855a1)
2020-02-28 14:33:58 +00:00
Tianjie Xu
9c8d0f6103 Move libboot_control to boot_control 1.1
It should belong to the default /misc implementation of boot control
1.1. Right now, it's only used by cuttlefish. So move it over to reduce
confusion in bootloader_message.

Bug: 131775112
Test: build
Change-Id: If09bc6f4cc8adf74c8798048c8e54ec94566abaa
(cherry picked from commit dc4d2a70db40a302cb7001ddbc41816e7187d5c5)
2020-02-26 12:14:54 -08:00
Automerger Merge Worker
67ab5e4bee [automerger skipped] Force package installation with FUSE unless the package stores on device am: ba27adbbb6 -s ours am: e00afc3fbf -s ours
am skip reason: Change-Id Ibc9b095036a2fa624e8edf6c347ed4f12aef072f with SHA-1 5e6c4e9a91 is in history

Change-Id: Idb8d1b20ddecef33a912ca41ae497a6bbe515db9
2020-02-21 19:44:31 +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
Automerger Merge Worker
c6f36bfd30 Merge "recovery: add a way to enable metadata_csum for ext4" am: 5ac6163822 am: 9af39bf5c4 am: 4d1f8869f4
Change-Id: I1e277b5ba5e45bcf1388c4658fa4fb713092999e
2020-02-21 06:05:03 +00: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
21a343c279 Merge "updater_sample: add internet access permission" am: c760702633 am: a599c6ca45 am: 70cf3d4556
Change-Id: I7888de77f684405bf67872ae77bd2338d004d110
2020-02-20 23:39:25 +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
Automerger Merge Worker
ba3a8a1eb3 [automerger skipped] Force off-device package installation with FUSE am: cd8faf7eee -s ours
am skip reason: Change-Id I35119c2334895aa0ef4ed71b3ddd08f280c0c031 with SHA-1 daaacea96e is in history

Change-Id: I703eec760ed1b6f70c656dc0630aef7ca22d1b3c
2020-02-20 19:14:22 +00:00
Bill Yi
f5fab11115 Import translations. DO NOT MERGE
Change-Id: I6b85744c59986965ca016e613974661568b0d182
Auto-generated-cl: translation import
2020-02-18 06:57:16 -08: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
Automerger Merge Worker
f858c00f9d [automerger skipped] Merge "Revert "Force package installation with FUSE unless the package stores on device"" into qt-qpr1-dev-plus-aosp am: 4139a30ec5 -s ours
am skip reason: skipped by user rtenneti

Change-Id: I84e69c619fac38df4be800d6255ac765db9ad3ae
2020-02-13 03:57:58 +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
Automerger Merge Worker
dbb3e28255 [automerger skipped] Merge "Force package installation with FUSE unless the package stores on device" into qt-qpr1-dev-plus-aosp am: 7bc9c8297b -s ours
am skip reason: Change-Id Ibc9b095036a2fa624e8edf6c347ed4f12aef072f with SHA-1 58a27693b2 is in history

Change-Id: Ia23da9ff1c70533fa8c8f215bd9aca241cf1bad0
2020-02-12 23:55:16 +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
5e116da975 Merge "rm libbinderthreadstate" am: 2015fe5dbc am: ecfa97375f am: 6409d5f3c6
Change-Id: I83753e0f01f5d5375f30365eaf74b5e202b4f0e1
2020-02-07 00:44:39 +00: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
e1d3382d57 [automerger skipped] Merge "Import translations. DO NOT MERGE" am: 8501ef04ea -s ours am: 88efe3ea38 -s ours am: 4fcfb824ad -s ours
am skip reason: subject contains skip directive

Change-Id: I9f89bd812215e0b92d4975a03802392b8f084b52
2020-02-01 20:41:31 +00: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
1551e2a5d1 Merge "Show warning message if sideload failed or is interrupted." am: e1d76ef395 am: d93d116134 am: 9763f002db
Change-Id: I987619c409d8fc9defb3184a51849ee2b81e25b8
2020-01-30 22:43:41 +00: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
TreeHugger Robot
cbabf7cc0c Merge "Import translations. DO NOT MERGE" 2020-01-30 21:29:11 +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
Bill Yi
2b9be1f4e3 Import translations. DO NOT MERGE
Change-Id: Id8dd55dd5f36191402ba7f6b44e107f205fbf484
Auto-generated-cl: translation import
2020-01-29 15:36:57 -08:00
Automerger Merge Worker
89c9eae51e Merge "Prompt for confirmation before reboot if installation fails." am: 1b208af5d4 am: 05eec42808 am: 565397643b
Change-Id: I874e028ac058aac56430b6f2fb69d8217a3c13ec
2020-01-29 21:57:36 +00: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