Commit graph

8494 commits

Author SHA1 Message Date
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
Automerger Merge Worker
2cc6f21833 Merge "Retire the Tron metrics reporting for non-A/B update" am: 6bdacc40ef am: fed0b90045
Change-Id: I50402237f4ef3ca99caa27bd474d1a2e7432a42f
2020-01-21 19:37:27 +00:00
Tianjie Xu
fed0b90045 Merge "Retire the Tron metrics reporting for non-A/B update"
am: 6bdacc40ef

Change-Id: I3cb646b40746b06de19d7c50504a8699b2081fdc
2020-01-21 11:21:35 -08:00
Tianjie Xu
6bdacc40ef Merge "Retire the Tron metrics reporting for non-A/B update" 2020-01-21 19:10:46 +00:00
Tianjie Xu
eb27bfe1e8 Retire the Tron metrics reporting for non-A/B update
This is part of the effort to remove libmetricslogger in platform.
Remove the reporting since the status from non-A/B update is less
important to us. Plus the gmscore already has a copy of the logic
to parse the contents from last_install and report non-A/B metrics
to the clearcut log.

bug: 147776349
Test: build
Change-Id: I4fc5d58fb616edb3eb1edadf4614d3eca15c7ce1
2020-01-16 15:17:41 -08:00
Automerger Merge Worker
0be5110df4 DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master am: 777a1965f3
Change-Id: I7e4b32b320b7a319ed3168c58a499c75024b920d
2020-01-16 01:46:05 +00:00
Xin Li
777a1965f3 DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: I2819646a4508345ecb63d46a1b1e9666e680d0cc
2020-01-15 15:59:08 -08:00
Automerger Merge Worker
eeeac0514b Merge "edify: update for bison 3.5" am: 1477c867f7 am: 1dccf9c474
Change-Id: Ieccbcd941d6cf811628a33c81175ecf8b3c48b12
2020-01-15 22:33:25 +00:00
Steven Moreland
1dccf9c474 Merge "edify: update for bison 3.5"
am: 1477c867f7

Change-Id: I8b3c51a1a420d24639feb1356575832db1d717af
2020-01-15 14:18:52 -08:00
Treehugger Robot
1477c867f7 Merge "edify: update for bison 3.5" 2020-01-15 22:15:54 +00:00
Automerger Merge Worker
f34cfe9683 Merge "Convert update_host_simulator to Android.bp" am: d3e4ee7b16 am: 1d5b35dfb5
Change-Id: I587f12b2efc027c7e3808a00744298623cb35e0b
2020-01-15 20:22:31 +00:00
Dan Willemsen
1d5b35dfb5 Merge "Convert update_host_simulator to Android.bp"
am: d3e4ee7b16

Change-Id: Ida439dc9fde87cdad2ac1e43e25668f871d6ece4
2020-01-15 12:07:50 -08:00
Treehugger Robot
d3e4ee7b16 Merge "Convert update_host_simulator to Android.bp" 2020-01-15 20:05:46 +00:00
Dan Willemsen
5a6784168f Convert update_host_simulator to Android.bp
Bug: 130696912
Test: m update_host_simulator
Change-Id: I7b3c0217268a3edcf76548a5c83030050b2d17f3
2020-01-15 09:39:13 -08:00
Steven Moreland
ee3dd45c07 edify: update for bison 3.5
Getting rid of warning, so using new define for turning on verbose
errors:
%define parse.error verbose

Bug: 31194194
Test: N/A
Change-Id: I47c200a1e669b5c5fc53d392f32b4c264a42182d
2020-01-14 20:56:40 +00:00
Automerger Merge Worker
444bfb7482 Merge "Fix ioctl FIONREAD call parameters to use int instead of size_t" am: b17cdb26df am: 7e1af2dd40
Change-Id: I05410938bc94fb40a9a57f297eb52d487fc2daca
2020-01-14 19:21:38 +00:00
Stephane Lee
7e1af2dd40 Merge "Fix ioctl FIONREAD call parameters to use int instead of size_t"
am: b17cdb26df

Change-Id: Ia47c5f257f1552e711705bcb974c068c201382ba
2020-01-14 11:07:08 -08:00
Stephane Lee
b17cdb26df Merge "Fix ioctl FIONREAD call parameters to use int instead of size_t" 2020-01-14 18:42:31 +00:00
Stephane Lee
12952cdddb Fix ioctl FIONREAD call parameters to use int instead of size_t
Test: Ensure that calls to inotify_cb succeed; Ensure charger does not
crash

Change-Id: I9a7ca304057313c74ef02fd97223d0ed570c6206
2020-01-13 16:04:44 -08:00
Automerger Merge Worker
9f84418306 [automerger skipped] Import translations. DO NOT MERGE am: 7851fab973 -s ours
am skip reason: subject contains skip directive

Change-Id: Ic3cd448883cffebeaca9bdf03d86a36df1faa125
2020-01-11 15:21:21 +00:00
Bill Yi
7851fab973 Import translations. DO NOT MERGE
Change-Id: Iab26dd7eda26ad0d105a69939091cc7cda35c371
Auto-generated-cl: translation import
2020-01-10 22:41:44 -08:00
Automerger Merge Worker
5e39aa4279 Merge "Add elsk@ to OWNERS" am: f52a8782b3 am: 2346f5bd6c
Change-Id: Iefe607958520a381f013586628662931a60c8c16
2020-01-08 22:45:00 +00:00
Yifan Hong
2346f5bd6c Merge "Add elsk@ to OWNERS"
am: f52a8782b3

Change-Id: I5815887ff946dcaa88b67965c77950a27f781866
2020-01-08 14:01:14 -08:00
Yifan Hong
f52a8782b3 Merge "Add elsk@ to OWNERS" 2020-01-08 21:35:33 +00:00
Automerger Merge Worker
367f7d173e Merge "Mount snapshotted /system in Virtual A/B devices" am: 5ee782079a am: bc4b2b44e9
Change-Id: I0bee847aeea87381e704aff5d26fc9d84d0ec8ac
2020-01-07 20:44:25 +00:00
Alessio Balsini
bc4b2b44e9 Merge "Mount snapshotted /system in Virtual A/B devices"
am: 5ee782079a

Change-Id: I763c7c0ca0ba5d9e6e6f822efa2e42e5ea1095bc
2020-01-07 12:30:18 -08:00
Treehugger Robot
5ee782079a Merge "Mount snapshotted /system in Virtual A/B devices" 2020-01-07 20:26:43 +00:00
Yifan Hong
cf58738b89 Add elsk@ to OWNERS
Test: none
Change-Id: Ibe39304e7ad2e23377853ef5753f7873348ff24b
2020-01-07 11:35:06 -08:00
Automerger Merge Worker
58c0120969 Merge "Link libvndksupport dynamically instead of statically." am: 8b9ac5b83d am: dddedcc3de
Change-Id: Ic53f0c08c6159dcf52cca03b729cf536d0ff383b
2019-12-19 18:18:24 +00:00
Peter Collingbourne
dddedcc3de Merge "Link libvndksupport dynamically instead of statically."
am: 8b9ac5b83d

Change-Id: Ib5eaa527fbba27b700f6efc8b2536320252e4ee3
2019-12-19 10:03:09 -08:00
Peter Collingbourne
8b9ac5b83d Merge "Link libvndksupport dynamically instead of statically." 2019-12-19 17:27:37 +00:00
Automerger Merge Worker
9d090b2ca6 Merge "Delete VINTF compatibility check during OTA." am: cae99c43de am: 567ae2f9e1
Change-Id: I40359f387e70e8055c12d0245a0e5d2132007889
2019-12-18 23:40:54 +00:00
Yifan Hong
567ae2f9e1 Merge "Delete VINTF compatibility check during OTA."
am: cae99c43de

Change-Id: I8ec2ee4efdadf39dd1543c1929e5e9bb11500a8e
2019-12-18 15:19:40 -08:00
Yifan Hong
cae99c43de Merge "Delete VINTF compatibility check during OTA." 2019-12-18 23:15:51 +00:00
Yifan Hong
c77bb70166 Delete VINTF compatibility check during OTA.
Test: sideload OTA
Bug: 139300422
Change-Id: I3369b69242ccd7a64540a0c2d754a5d6fc50d072
2019-12-18 12:14:50 -08:00
Peter Collingbourne
8f2f0d09ea Link libvndksupport dynamically instead of statically.
Bug: 146456667
Change-Id: I839223d8fbc365fd3271634143b117604f6aa879
2019-12-17 17:51:42 -08:00
Automerger Merge Worker
0c6c04c64d Merge "Do not execute linkerconfig from recovery" am: b12e54c4f1 am: 7a0a80ea28
Change-Id: I60d2cfb4dc83c35820457f4f1b7646a01acf4edd
2019-12-18 01:13:39 +00:00
Kiyoung Kim
7a0a80ea28 Merge "Do not execute linkerconfig from recovery"
am: b12e54c4f1

Change-Id: Ica8a524984cc85a05c23a03133693586cb7e4f80
2019-12-17 17:01:34 -08:00
Kiyoung Kim
b12e54c4f1 Merge "Do not execute linkerconfig from recovery" 2019-12-18 00:55:03 +00:00
Kiyoung Kim
ea2b683f6e Do not execute linkerconfig from recovery
Linkerconfig binary itself should be built as static, so size of
executable is hard to be reduced. However, this used lots of space from
recovery so only small space left in it. To avoid this linker config
from recovery should be generated within build time and use prebuilt
one. Prebuilt ld.config.txt will be located under /system/etc as before,
and init will copy the file into /linkerconfig so we can use same
location for both recovery and normal boot.

Bug: 146384333
Test: m -j passed && crosshatch bootloader worked with this change
Change-Id: I96300f1c8301167234787274820086a4c6ea0e6e
2019-12-17 15:05:54 +09:00
Alessio Balsini
a9665ced57 Mount snapshotted /system in Virtual A/B devices
Mounting /system in Virtual A/B devices may require the creation of the
associated snapshot devices.
This patch performs all the required initializations prior to attempting
the mount of /system.

Bug: 139157327
Test: manual /system partition mount on VAB device during OTA
Depends-on: I7337bdd38d7016d12d3ee42be1c7893b10e9116d
Change-Id: I71a9dfc57e1a1354f1f1edc5d287aca93c0c8924
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-12-16 21:25:45 +00:00
Automerger Merge Worker
802e7bfd76 Merge "minui: add ARGB_8888 format" am: 38f07f0ba4 am: 305417d49e
Change-Id: I41d8a7aca74f434a4740a6e60e36113cc56acb31
2019-12-13 23:56:23 +00:00
Adrian Salido
305417d49e Merge "minui: add ARGB_8888 format"
am: 38f07f0ba4

Change-Id: I76d13dd351f708c385a84280403cf21f910be9c1
2019-12-13 15:47:27 -08:00
Treehugger Robot
38f07f0ba4 Merge "minui: add ARGB_8888 format" 2019-12-13 23:44:50 +00:00
Adrian Salido
cc7b7eb737 minui: add ARGB_8888 format
Minui currently really only supports composing in 2 different formats
(see gr_color()) with ALPHA always as MSB. However, some devices
interpret PixelFormat as either Big Endian (i.e. ARGB has alpha at MSB)
or Little Endian (i.e. BGRA has alpha at MSB).

This change attempts to give multiple options to specify the same format
depending on device interpretation, while keeping just 2 different
composition formats supported by minui.
* ARGB + BGRA: Pixels have (A)lpha at MSB and (B)lue at LSB
* RGBX + ABGR: Pixels have (A)lpha at MSB and (R)ed at LSB

With this in mind, limiting the use of png_set_bgr() to happen only for
(ARGB/BGRA) combination while leaving (RGBX/ABGR) unchanged.

Bug: 143480444
Test: Boot device with TARGET_RECOVERY_PIXEL_FORMAT := <<all>>
Change-Id: Ia0f94ccbc564b8def7c9416483712ff1abbbf49a
2019-12-13 10:53:33 -08:00
Automerger Merge Worker
b0f5432a16 Merge "Generate linker config from recovery init" am: 17090d7f53 am: c3b430d816
Change-Id: I77454f6071430e5c31093bd3ea3c7dc11a052a81
2019-12-13 01:59:33 +00:00
Kiyoung Kim
c3b430d816 Merge "Generate linker config from recovery init"
am: 17090d7f53

Change-Id: I6c0c59370478da3c57e0971be89fadbc4a856416
2019-12-12 17:13:50 -08:00
Kiyoung Kim
17090d7f53 Merge "Generate linker config from recovery init" 2019-12-13 01:09:58 +00:00
Kiyoung Kim
3a88a1748b Generate linker config from recovery init
Generate linker config from recovery init to be used from recovery
processes.

Bug: 139638519
Test: Tested from crosshatch
Change-Id: I777a8baf08254b07375b8039bb252864637e29e7
2019-12-12 14:40:37 +09:00
Tianjie Xu
1c194f2a81 Merge "Revert "Add mechanism for device-specific loop images"" am: fff38d9446
am: df59e19ca3

Change-Id: I4a1953e72c1e63082bc89844930c9482dba97ce7
2019-12-09 14:38:57 -08:00