android/platform-system-libvintf.git
2 years agoVintfObject docs: don't reference exact locations master
Steven Moreland [Mon, 29 Oct 2018 20:31:15 +0000 (13:31 -0700)]
VintfObject docs: don't reference exact locations

VintfObject.h still references the original system/vendor locations for
manifests. These now correspond to many possible locations with legacy
compatibility rules and are themselves subject to change. Now, the
header just declares that they are built from component pieces.

Bug: 76108617
Test: N/A
Change-Id: Ie9d0353b0beb0aa1fb6b1ae23ff70bab98ae2667

2 years agoMerge pie-platform-release to aosp-master - DO NOT MERGE
Bill Yi [Wed, 24 Oct 2018 21:48:20 +0000 (14:48 -0700)]
Merge pie-platform-release to aosp-master - DO NOT MERGE

Change-Id: I64d0190a8d7dc001ac24467a7031a3d91bc736de

2 years agoMerge "Add dump_hals_for_release.py and analyze_matrix."
Yifan Hong [Wed, 24 Oct 2018 17:42:33 +0000 (17:42 +0000)]
Merge "Add dump_hals_for_release.py and analyze_matrix."

2 years agoCompatibilityMatrix::combine() combines everything correctly
Yifan Hong [Tue, 16 Oct 2018 17:29:26 +0000 (10:29 -0700)]
CompatibilityMatrix::combine() combines everything correctly
am: e7837b164c

Change-Id: I0b3d6cbb68493152c127c0478575de778c2d2b4e

2 years agoCompatibilityMatrix::combine() combines everything correctly
Yifan Hong [Thu, 11 Oct 2018 17:38:57 +0000 (10:38 -0700)]
CompatibilityMatrix::combine() combines everything correctly

* Combines <kernel> correctly in order to make assemble_vintf
add <kernel> in any order. That is, we now allow:
assemble_vintf -i base_matrix.xml -i kernel_config_base.xml
    -i kernel_config_x86.xml ...
and <kernel>'s will be added in the correct order even when
the order of kernel_config_base.xml and kernel_config_x86.xml
is swapped.

* Combine <sepolicy> and <avb> correctly. They can only
be defined once per level.

Test: libvintf_test
Test: vintf_object_test
Test: build framework compatibility matrix and inspect output manually

Bug: 78943004

Change-Id: I6c90849b8bef0b690fb292bcc5fa8c514f323d96

2 years agolibvintf: deprecate ro.build.system_root_image
Mark Salyzyn [Thu, 11 Oct 2018 15:48:25 +0000 (08:48 -0700)]
libvintf: deprecate ro.build.system_root_image
am: b40e32c92c

Change-Id: I13f443343c822d6d0fbbf8c5f60ff28e799e9aad

2 years agolibvintf: deprecate ro.build.system_root_image android-o-mr1-iot-release-smart-display-r3
Mark Salyzyn [Wed, 10 Oct 2018 21:15:38 +0000 (14:15 -0700)]
libvintf: deprecate ro.build.system_root_image

If default_fstab does not have "/", then it should have "/system",
there is no need to check the ro.build.system_root_image property.

Test: compile
Bug: 109821005
Change-Id: If6419b08f79b30800d13fbb9b320e48f435243f3

2 years agoAdd dump_hals_for_release.py and analyze_matrix.
Yifan Hong [Tue, 2 Oct 2018 23:55:47 +0000 (16:55 -0700)]
Add dump_hals_for_release.py and analyze_matrix.

Test: ./system/libvintf/analyze_matrix/dump_hals_for_release.py \
    --hidl-gen=$(which hidl-gen) \
    --analyze-matrix=$(which analyze_matrix) \
    --compatibility-matrix \
     hardware/interfaces/compatibility_matrices/compatibility_matrix.*.xml
Bug: 116165266

Change-Id: Ic3fa41f8e2dfa6c083ec867534fc39dad469410e

2 years agoMerge "<kernel> compat check can be split"
Yifan Hong [Mon, 8 Oct 2018 21:55:11 +0000 (14:55 -0700)]
Merge "<kernel> compat check can be split"
am: 34168f34e0

Change-Id: Ib1e2bc26efc6de3393a8dc0bfff6bec68119bd6a

2 years agoMerge "<kernel> compat check can be split"
Yifan Hong [Mon, 8 Oct 2018 21:25:48 +0000 (21:25 +0000)]
Merge "<kernel> compat check can be split"

2 years agoAdd test for HalManifest::getHalNamesAndVersions
Yifan Hong [Fri, 5 Oct 2018 01:38:27 +0000 (18:38 -0700)]
Add test for HalManifest::getHalNamesAndVersions
am: cb648df76b

Change-Id: Ie55d7b9b69f665b8b7cd7dbe581b444b61d81292

2 years agoAdd test for HalManifest::getHalNamesAndVersions
Yifan Hong [Thu, 4 Oct 2018 23:27:40 +0000 (16:27 -0700)]
Add test for HalManifest::getHalNamesAndVersions

Change-Id: I1f1c287d3b30f4e158b515e3794293da8a263594
Fixes: 116259705
Test: libvintf_test

2 years ago<kernel> compat check can be split
Yifan Hong [Thu, 4 Oct 2018 19:33:46 +0000 (12:33 -0700)]
<kernel> compat check can be split

Split <kernel> check into its own check flag so that we
can check only the compatibility between <kernel> tag
in fwk compat matrix and runtime kernel.

Test: Vts Treble Vintf Test
Test: libvintf_test
Test: vintf_object_test

Bug: 64301876
Change-Id: Ia5891ef46be1dd6e69123ab6cbeeb5d5d4868c56

2 years agoAdd noexcept to move constructors and assignment operators.
Chih-Hung Hsieh [Tue, 2 Oct 2018 21:54:44 +0000 (14:54 -0700)]
Add noexcept to move constructors and assignment operators.
am: d34570694d

Change-Id: I2369bd5413a153101e4961e2712dc1efcedc7481

2 years agoAdd noexcept to move constructors and assignment operators. android-o-mr1-iot-release-1.0.5
Chih-Hung Hsieh [Tue, 25 Sep 2018 20:40:34 +0000 (13:40 -0700)]
Add noexcept to move constructors and assignment operators.

Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: Ibbc62b8122db952614b927df13002dde388ebef7

2 years agoMerge "Add test for multiple device matrices"
Yifan Hong [Fri, 21 Sep 2018 17:45:47 +0000 (10:45 -0700)]
Merge "Add test for multiple device matrices"
am: 2c58345742

Change-Id: Ia2b7b1e7e4edae0f9d1b4d6b0a6cb228bde7927f

2 years agoMerge "Add test for multiple device matrices"
Yifan Hong [Fri, 21 Sep 2018 17:32:32 +0000 (17:32 +0000)]
Merge "Add test for multiple device matrices"

2 years agogetHalNamesAndVersions fix
Yifan Hong [Fri, 21 Sep 2018 06:18:45 +0000 (23:18 -0700)]
getHalNamesAndVersions fix
am: 8f636b9ae5

Change-Id: I3facca7aa696549bae01d05091646f7dbbd8ebef

2 years agoAdd test for multiple device matrices
Yifan Hong [Thu, 20 Sep 2018 22:33:39 +0000 (15:33 -0700)]
Add test for multiple device matrices

Test: libvintf_test
Bug: 116062715
Change-Id: Id3aa32511111bf58d0c847b9683526825c9793a7

2 years agogetHalNamesAndVersions fix
Yifan Hong [Thu, 20 Sep 2018 22:06:11 +0000 (15:06 -0700)]
getHalNamesAndVersions fix

The bug is introduced in P, but P vintf device info
collection also reports "target_fcm_version", so
we don't have to apply the fix in P branches.

Test: run *TS device info collection
Change-Id: Ie04e28cd67be5c11d3993de7fb99269b1b5701ef

2 years agoMerge "System always contains root dir."
Tom Cherry [Wed, 29 Aug 2018 17:14:10 +0000 (10:14 -0700)]
Merge "System always contains root dir."
am: ca66d989f0

Change-Id: I5b9c26293da91519fceb4c7cf4997996165b45aa

2 years agoMerge "System always contains root dir." android-o-mr1-iot-release-1.0.4
Tom Cherry [Wed, 29 Aug 2018 17:05:40 +0000 (17:05 +0000)]
Merge "System always contains root dir."

2 years agorequire quotes on kconfig string values
Steve Muckle [Fri, 24 Aug 2018 22:13:12 +0000 (15:13 -0700)]
require quotes on kconfig string values
am: 4d4a4c1191

Change-Id: Ie21f544f3cb9702bc1abbb9e7ce09a5fa266fb76

2 years agorequire quotes on kconfig string values
Steve Muckle [Thu, 23 Aug 2018 22:18:46 +0000 (15:18 -0700)]
require quotes on kconfig string values

When parsing the Android kernel config fragments, require (and remove)
quotes around string values.

This change also fails the parsing if the string does not conform to one
of the possible types of string, integer, or tristate.

Change-Id: I2723f341ce086a39ace541ea98eec402b994448d

2 years agoSystem always contains root dir.
Yifan Hong [Tue, 14 Aug 2018 17:55:14 +0000 (10:55 -0700)]
System always contains root dir.

In recovery, system image is mounted to /mnt/system. After the work of
first stage ramdisk, system image always contains the root dir, no
matter what value of ro.build.system_root_image is.

Test: do compat check in recovery
Bug: 112586588
Change-Id: I3890c9c1335b23fd22a8910bca07e59d631bac71

2 years agoAllow OTA package to contain fake AVB version
Yifan Hong [Tue, 14 Aug 2018 17:57:42 +0000 (10:57 -0700)]
Allow OTA package to contain fake AVB version
am: 4dec91dc67

Change-Id: I049f0092f0e164dc43439b743d0b25e7f9879c9a

2 years agoAllow OTA package to contain fake AVB version
Yifan Hong [Mon, 13 Aug 2018 19:37:47 +0000 (12:37 -0700)]
Allow OTA package to contain fake AVB version

The system_matrix.xml in compatibility.zip can contain a fake
AVB version as specified by BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE.
This allows OTA to pass compatibility check when the AVB version is
updated *during* the OTA.
Bug: 112291283
Test: specify BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE.
      and manual test.

Change-Id: I250bf3b547eb6edfdcdcee4dff64405f97e74b15

2 years agoSerializeFlags is a namespace. am: ba588bc3fb
Yifan Hong [Thu, 9 Aug 2018 21:24:11 +0000 (14:24 -0700)]
SerializeFlags is a namespace. am: ba588bc3fb
am: 63283fbc9a

Change-Id: Iefb2cb542ecd583b8b051e21f9d3506ce12524e9

2 years agoDisabledChecks -> CheckFlags namespace am: 072f12dd33
Yifan Hong [Thu, 9 Aug 2018 21:24:05 +0000 (14:24 -0700)]
DisabledChecks -> CheckFlags namespace am: 072f12dd33
am: 14695197ce

Change-Id: I4a7c83fb01ab02ed6313d9b2331c84f7dc9936ab

2 years agoSerializeFlags is a namespace.
Yifan Hong [Thu, 9 Aug 2018 21:15:42 +0000 (14:15 -0700)]
SerializeFlags is a namespace.
am: ba588bc3fb

Change-Id: I3f311139e5a2b024e93521c0bb59371f28d68398

2 years agoDisabledChecks -> CheckFlags namespace
Yifan Hong [Thu, 9 Aug 2018 21:15:37 +0000 (14:15 -0700)]
DisabledChecks -> CheckFlags namespace
am: 072f12dd33

Change-Id: I8c7f75145127de2a832a9db5ca1a7830a08a387d

2 years agoSerializeFlags is a namespace.
Yifan Hong [Wed, 8 Aug 2018 21:19:41 +0000 (14:19 -0700)]
SerializeFlags is a namespace.

The SerializeFlags becomes a namespace that contains
the original class definition under type SerializeFlags::Type
and static constants.

Consequently, all SeralizeFlags methods can
now be constexpr.

Also added static tests.

Test: libvintf_test
Test: vintf_object_test
Bug: 110711640
Change-Id: I786a1f77e19defc2ab2d025de3ed7cfe48f4fbce

2 years agoDisabledChecks -> CheckFlags namespace
Yifan Hong [Wed, 8 Aug 2018 20:04:51 +0000 (13:04 -0700)]
DisabledChecks -> CheckFlags namespace

Switch from negative flags to positive flags using
the dedicated CheckFlags::Type class.

Bug: 110711640
Test: libvintf_test
Test: vintf_object_test
Change-Id: I13f741b64520bd58349dbbf6c874dd1559d79ad8

2 years agoAssembleVintf: fix error message for unsupported tags/attrs for additional manifests...
Yifan Hong [Wed, 8 Aug 2018 20:09:05 +0000 (13:09 -0700)]
AssembleVintf: fix error message for unsupported tags/attrs for additional manifests am: 304cdab710
am: 8d6caf21e9

Change-Id: I9289c742b3802ddf8ef6bf97c701f0f8a74259ea

2 years agoSerializeFlags: Remove legacy APIs am: a1b112d010
Yifan Hong [Wed, 8 Aug 2018 20:08:59 +0000 (13:08 -0700)]
SerializeFlags: Remove legacy APIs am: a1b112d010
am: 329a9a8069

Change-Id: Ib90222be50f65b2d0024a13ae2261a1d3661f1a5

2 years agoassemble_vintf: fix error message for -n -l conflict am: 5c9ff706f0
Yifan Hong [Wed, 8 Aug 2018 20:08:52 +0000 (13:08 -0700)]
assemble_vintf: fix error message for -n -l conflict am: 5c9ff706f0
am: 7853661395

Change-Id: Iee21279cd198341c3d0a6584c7a116372cc0e0d0

2 years agoSerializeFlags: remove legacyValue() API am: a1dfa6f525
Yifan Hong [Wed, 8 Aug 2018 20:08:45 +0000 (13:08 -0700)]
SerializeFlags: remove legacyValue() API am: a1dfa6f525
am: d96cab091f

Change-Id: Ib156a9613315bb1e1b2ac400c6123d0ce492ed88

2 years agoSerializeFlag => SerializeFlags am: 250b55c08e
Yifan Hong [Wed, 8 Aug 2018 20:08:39 +0000 (13:08 -0700)]
SerializeFlag => SerializeFlags am: 250b55c08e
am: 3482749efb

Change-Id: I76f5d5ef3c79e02a79a9acba2f48b46eebc67aff

2 years agoAdd SerializeFlags class. am: e6a770a85d
Yifan Hong [Wed, 8 Aug 2018 20:08:33 +0000 (13:08 -0700)]
Add SerializeFlags class. am: e6a770a85d
am: 6fb2d2cc4d

Change-Id: I33313dc9ffa7390c9700c5516a1b2f43a2a71be6

2 years agoAssembleVintf: fix error message for unsupported tags/attrs for additional manifests
Yifan Hong [Wed, 8 Aug 2018 20:04:43 +0000 (13:04 -0700)]
AssembleVintf: fix error message for unsupported tags/attrs for additional manifests
am: 304cdab710

Change-Id: If376b40fd1235332836de690032d147fb123c7a6

2 years agoSerializeFlags: Remove legacy APIs
Yifan Hong [Wed, 8 Aug 2018 20:04:38 +0000 (13:04 -0700)]
SerializeFlags: Remove legacy APIs
am: a1b112d010

Change-Id: Ic2ce7d2e67cda0da09be6c161f4625f58ca387b1

2 years agoassemble_vintf: fix error message for -n -l conflict
Yifan Hong [Wed, 8 Aug 2018 20:04:33 +0000 (13:04 -0700)]
assemble_vintf: fix error message for -n -l conflict
am: 5c9ff706f0

Change-Id: I63dfb8d2fd6eaeca4fcac7f9641b9d5b9c179a6a

2 years agoSerializeFlags: remove legacyValue() API
Yifan Hong [Wed, 8 Aug 2018 20:04:29 +0000 (13:04 -0700)]
SerializeFlags: remove legacyValue() API
am: a1dfa6f525

Change-Id: I69a1376d42407634e5369927e88ac7a26a86362a

2 years agoSerializeFlag => SerializeFlags
Yifan Hong [Wed, 8 Aug 2018 20:04:24 +0000 (13:04 -0700)]
SerializeFlag => SerializeFlags
am: 250b55c08e

Change-Id: I97ee70b6631302a9f2ef7ca5cc382edbfdcf8455

2 years agoAdd SerializeFlags class.
Yifan Hong [Wed, 8 Aug 2018 20:04:20 +0000 (13:04 -0700)]
Add SerializeFlags class.
am: e6a770a85d

Change-Id: If4b4569e8b8d840ec8018834a7bc98cadfeac9c0

2 years agoAssembleVintf: fix error message for unsupported tags/attrs for additional manifests
Yifan Hong [Thu, 2 Aug 2018 23:03:59 +0000 (16:03 -0700)]
AssembleVintf: fix error message for unsupported tags/attrs for additional manifests

The error message used to contain extraneous values like:

<manifest version="1.0" type="device" target-level="1">
   <sepolicy>
       <version>0.0</version>
   </sepolicy>
</manifest>

Fix it so that it becomes:
<manifest target-level="1" />

Test: manual with additional manifest, then
      `m device_manifest.xml`

Bug: 78943004

Change-Id: I2d66c4db5a5c2136907ac2dc814262909c73b9e0

2 years agoSerializeFlags: Remove legacy APIs
Yifan Hong [Wed, 8 Aug 2018 00:44:10 +0000 (17:44 -0700)]
SerializeFlags: Remove legacy APIs

Remove legacy bitwise operators and boolean conversions
that are meant to be compatible with the old negative flags
usage. Also fix all such usages.

Bug: 110711640
Test: libvintf_test
Change-Id: Ic69a7066dd3ae320aeb0a1848eb7719f67da29d3

2 years agoassemble_vintf: fix error message for -n -l conflict
Yifan Hong [Wed, 8 Aug 2018 00:26:12 +0000 (17:26 -0700)]
assemble_vintf: fix error message for -n -l conflict

There is no error message when -n and -l is specified together.
Add error message.

Also fix flag handling logic to use new SerializeFlags API.
Bug: 110711640
Test: libvintf_test

Change-Id: I78203f20a2cff16a497894243c6c1a519ca59661

2 years agoSerializeFlags: remove legacyValue() API
Yifan Hong [Tue, 7 Aug 2018 23:01:34 +0000 (16:01 -0700)]
SerializeFlags: remove legacyValue() API

Remove constructor with legacyValue (which contains NOT bits) and
getter to legacyValue. Instead, SerializeFlags objects are constructed
with positive flags.

Bug: 110711640
Test: libvintf_test
Change-Id: I41e2b913822b9e75b17a1f2336e5a35236e9671e

2 years agoSerializeFlag => SerializeFlags
Yifan Hong [Wed, 8 Aug 2018 00:41:56 +0000 (17:41 -0700)]
SerializeFlag => SerializeFlags

This is a straightforward refactoring to remove the SerializeFlag enum.
They are combined into one class because SerializeFlag is the old
negative bitfields and is confusing. SerializeFlags will contain
positive bitfields.

Bug: 110711640
Test: libvintf_test

Change-Id: I46070db674955add4971b0dc5736a43436f54ddf

2 years agoAdd SerializeFlags class.
Yifan Hong [Tue, 7 Aug 2018 22:51:14 +0000 (15:51 -0700)]
Add SerializeFlags class.

Bug: 110711640
Test: libvintf_test
Change-Id: I2a2c98d2965a4a79df24525b7ef5e4fff903066e

2 years agoMerge "Make libvintf recovery_available" am: af0cefd66b
Tao Bao [Tue, 7 Aug 2018 00:10:21 +0000 (17:10 -0700)]
Merge "Make libvintf recovery_available" am: af0cefd66b
am: 89630e0b45

Change-Id: I93f1f6b8e2064c00ff262b477dbd244db6fa726c

2 years agoMerge "Make libvintf recovery_available"
Tao Bao [Mon, 6 Aug 2018 23:50:16 +0000 (16:50 -0700)]
Merge "Make libvintf recovery_available"
am: af0cefd66b

Change-Id: Id147e8c8843a2fb7e559d3c5a57fc416578a928f

2 years agoMerge "Make libvintf recovery_available" android-o-mr1-iot-release-1.0.3
Tao Bao [Mon, 6 Aug 2018 23:31:42 +0000 (23:31 +0000)]
Merge "Make libvintf recovery_available"

2 years agoMake libvintf recovery_available
Jerry Zhang [Tue, 17 Jul 2018 19:21:40 +0000 (12:21 -0700)]
Make libvintf recovery_available

Bug: 110380063
Test: Compiles, recovery works
Change-Id: I89b4f7c25f457659d3a4b20fc44786691266126a

2 years agoassemble_vintf: add --no-kernel-requirements option am: 86678e40bc
Yifan Hong [Mon, 30 Jul 2018 17:43:03 +0000 (10:43 -0700)]
assemble_vintf: add --no-kernel-requirements option am: 86678e40bc
am: 19fd19e323

Change-Id: Ie49672315fdda5479e9925266e55b8b2bc414b29

2 years agoassemble_vintf: add --no-kernel-requirements option
Yifan Hong [Mon, 30 Jul 2018 17:38:47 +0000 (10:38 -0700)]
assemble_vintf: add --no-kernel-requirements option
am: 86678e40bc

Change-Id: I7a4d7a80bf9ae013f33911dd33682af079d098ff

2 years agoassemble_vintf: add --no-kernel-requirements option
Yifan Hong [Thu, 26 Jul 2018 18:38:54 +0000 (11:38 -0700)]
assemble_vintf: add --no-kernel-requirements option

When specified, <config> under <kernel> will not be written to the
output matrix, and kernel minor revision will be set to zero.
These requirements are added in P but is verified against the running
kernel (instead of the incoming kernel). This incorrect behavior
in recovery forces us to drop these requirements during OTA.

These requirements are still checked by VTS.

Bug: 111840577
Test: libvintf_test
Change-Id: Id0d7851f5cc11fbd8e6e2928ce377769855445db

2 years agoupdate kernel config suffix to .config am: ad6aa914d5
Steve Muckle [Wed, 25 Jul 2018 23:35:59 +0000 (16:35 -0700)]
update kernel config suffix to .config am: ad6aa914d5
am: c5a3730a17

Change-Id: I643895449e9520183af86472093aa5fe6e955119

2 years agoupdate kernel config suffix to .config
Steve Muckle [Wed, 25 Jul 2018 23:31:52 +0000 (16:31 -0700)]
update kernel config suffix to .config
am: ad6aa914d5

Change-Id: I33b7caa239d355fb0a9be5e0574b59465598093e

2 years agoupdate kernel config suffix to .config
Steve Muckle [Mon, 23 Jul 2018 22:44:01 +0000 (15:44 -0700)]
update kernel config suffix to .config

The kernel configs are changing their naming scheme to use
a suffix of ".config" rather than ".cfg".

Test: build and boot
Bug: 111762107
Change-Id: I590bccb6150d07795d84b12b588faa5e51138605

2 years agolibvintf: recovery_available: true am: 3dc4584b1a
Yifan Hong [Tue, 17 Jul 2018 17:41:41 +0000 (10:41 -0700)]
libvintf: recovery_available: true am: 3dc4584b1a
am: da9abafe66

Change-Id: I9e7ed98b7e338c0fecf735c981d99e5d8e7c2420

2 years agolibvintf: recovery_available: true
Yifan Hong [Tue, 17 Jul 2018 17:35:08 +0000 (10:35 -0700)]
libvintf: recovery_available: true
am: 3dc4584b1a

Change-Id: Idac1cea3287ffde4a6ab5e270dfb9fa44be6242a

2 years agolibvintf: recovery_available: true
Yifan Hong [Mon, 16 Jul 2018 22:02:34 +0000 (15:02 -0700)]
libvintf: recovery_available: true

Test: recovery mode test getService
Bug: 111507946
Bug: 80132328
Change-Id: Id971983cfeb800332f84876cc1bb619e39ade6ee

2 years agoAdd -Wextra-semi. am: 832e39078a
Yifan Hong [Tue, 17 Jul 2018 01:09:49 +0000 (18:09 -0700)]
Add -Wextra-semi. am: 832e39078a
am: ae77fb2127

Change-Id: Iec7d005f228f647e3c79cc4d66b5365e93e10178

2 years agoAdd -Wextra-semi.
Yifan Hong [Tue, 17 Jul 2018 01:04:47 +0000 (18:04 -0700)]
Add -Wextra-semi.
am: 832e39078a

Change-Id: I0c13b08ef28e57a2c3d5dedb6608c704cdf014ec

2 years agoVintfObjectRecovery: partitions are mounted to /mnt am: 91c1b2703b
Yifan Hong [Tue, 17 Jul 2018 00:58:07 +0000 (17:58 -0700)]
VintfObjectRecovery: partitions are mounted to /mnt am: 91c1b2703b
am: 87e6a5391d

Change-Id: Icd7bc88cac8e1ac45ba6a5d9cdf731c3a014d3c8

2 years agoHostFileSystem -> FileSystemUnderPath am: db3084356a
Yifan Hong [Tue, 17 Jul 2018 00:58:01 +0000 (17:58 -0700)]
HostFileSystem -> FileSystemUnderPath am: db3084356a
am: a7dca313a8

Change-Id: I3f25de361003533e301115be4156de52c7c1a67e

2 years agoVintfObject::checkCompatibility: better error message. am: 878556ed52
Yifan Hong [Tue, 17 Jul 2018 00:57:55 +0000 (17:57 -0700)]
VintfObject::checkCompatibility: better error message. am: 878556ed52
am: 3abd6790c0

Change-Id: I9de7be3df86e906fdb5157458a82f1369a81d762

2 years agoAdd -Wextra-semi.
Yifan Hong [Mon, 16 Jul 2018 22:22:55 +0000 (15:22 -0700)]
Add -Wextra-semi.

The headers fail to compile when included
in libhidl, because libhidl has -Wextra-semi.
I decided to clean them up and add -Wextra-semi
for all files for libvintf.

Test: builds
Change-Id: Ida1ed6d3855e582a5c09bc60128dd8c4cfd4210a

2 years agoVintfObjectRecovery: partitions are mounted to /mnt
Yifan Hong [Tue, 17 Jul 2018 00:55:02 +0000 (17:55 -0700)]
VintfObjectRecovery: partitions are mounted to /mnt
am: 91c1b2703b

Change-Id: I325389aa9bf007f200d2255a836cc41444ce4687

2 years agoHostFileSystem -> FileSystemUnderPath
Yifan Hong [Tue, 17 Jul 2018 00:54:58 +0000 (17:54 -0700)]
HostFileSystem -> FileSystemUnderPath
am: db3084356a

Change-Id: I79a2ba680b0b8ab4eeba432be6fb7f94fb86a971

2 years agoVintfObject::checkCompatibility: better error message.
Yifan Hong [Tue, 17 Jul 2018 00:54:54 +0000 (17:54 -0700)]
VintfObject::checkCompatibility: better error message.
am: 878556ed52

Change-Id: Ic1b8b32feb33223771d0bceb0356d3d6aeb7eb62

2 years agoVintfObjectRecovery: partitions are mounted to /mnt
Yifan Hong [Fri, 13 Jul 2018 23:03:59 +0000 (16:03 -0700)]
VintfObjectRecovery: partitions are mounted to /mnt

Recovery now mounts system and vendor partition under /mnt. Update
VintfObjectRecovery to reflect this, so that during OTA, the partitions
are correctly mounted and checked.

During OTA, access to /vendor will always be redirected to /mnt/vendor.
Access to /system will be redirected to
- /mnt/system if ro.build.system_root_image is false
- /mnt/system/system otherwise.

Test: manual by calling CheckCompatibility in "Run graphics test"

Change-Id: I4c4448e526b2a1f14c6a77b14ac72915256b85cb
Fixes: 111372832

2 years agoHostFileSystem -> FileSystemUnderPath
Yifan Hong [Fri, 13 Jul 2018 23:06:25 +0000 (16:06 -0700)]
HostFileSystem -> FileSystemUnderPath

The class is also used by recovery, so moving it to libvintf.
Test: pass

Change-Id: I735212b5ce53a0ba440686ced02feebc51a14841

2 years agoVintfObject::checkCompatibility: better error message.
Yifan Hong [Fri, 13 Jul 2018 20:45:30 +0000 (13:45 -0700)]
VintfObject::checkCompatibility: better error message.

Don't fail so fast.
Test: vintf_object_test

Change-Id: I5fe86410eea601a46abf5817ecf9fe527707cd22

2 years agoVintfObject now provides instance methods. am: 9f78c180ff
Yifan Hong [Mon, 16 Jul 2018 18:11:13 +0000 (11:11 -0700)]
VintfObject now provides instance methods. am: 9f78c180ff
am: a4100d9557

Change-Id: Iafa48a782e9e3f3606fb2cf28ba09094f83942bb

2 years agoVintfObject now provides instance methods.
Yifan Hong [Mon, 16 Jul 2018 18:07:11 +0000 (11:07 -0700)]
VintfObject now provides instance methods.
am: 9f78c180ff

Change-Id: Idac69cbf04fa0b5339cf9c9d0bca5dddd05646b4

2 years agoVintfObject now provides instance methods.
Yifan Hong [Thu, 12 Jul 2018 21:45:52 +0000 (14:45 -0700)]
VintfObject now provides instance methods.

VintfObject used to only contain static methods. It now
contains instance methods, and the static methods are
delegates to the instance methods. For example:

GetDeviceHalManifest calls GetInstance()->getDeviceHalManifest()
getDeviceHalManifest does the actual job.

The static dependencies (FileSystem, PropertyFetcher, PartitionMounter,
ObjectFactory<RuntimeInfo> are also moved from utils.cpp to the
static VintfObject instance.

Tests are updated to create a test VintfObject instance with
the mocked dependencies, and run test on the test object.

As a result, utils.cpp is now empty and removed, and
libvintf_common is the same as libvintf. Hence libvintf_common is also
removed.

This allows:
- Allows better mocking in tests. Tests are now independent of
  each other because a new VintfObject is created for every test.
  (Previously this is done very badly by clearing the global states,
  which is error prone)
  - A bug in VintfObjectTest.FrameworkCompatibilityMatrixCombine
    is discovered because it depends on setting global states in
    previous test cases. This is also fixed in this CL.
- In recovery, two VintfObject is required; one for XMLs in the
  recovery image (under /) and one for XMLs in system/vendor image
  (under /mnt). HIDL HAL getService in recovery depends on the former,
  and OTA depends on the latter. This CL prepares recovery to work.
  (A follow-up CL is needed to update VintfObjectRecovery to use
  /mnt for getService).

Some other notable changes in the CL:
- CompatibilityMatrix/HalManifest fetchAllInformation now takes
  a FileSystem argument to fetch files correctly, because the global
  FileSystem object is removed.
- Globals in utils.cpp / utils-fake.cpp is removed
- DevicePropertyFetcher is moved from utils.cpp to PropertyFetcher.cpp
  and is always built (for both host and target); but host VintfObject
  uses dummy PropertyFetcher by default. (See
  createDefaultPropertyFetcher in VintfObject.cpp).

Bug: 110855270
Bug: 80132328
Bug: 111372832

Test: vintf_object_test
Test: livintf_test

Change-Id: I24320662191b977c0e562129e49b33e80de727cc

2 years agoMerge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs." am: f3378017ea
Yifan Hong [Mon, 2 Jul 2018 19:59:41 +0000 (12:59 -0700)]
Merge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs." am: f3378017ea
am: 48833e5a4e

Change-Id: I5ffde0d5a1ef806d4b568bc70267677b1db35044

2 years agoMerge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs."
Yifan Hong [Mon, 2 Jul 2018 19:55:36 +0000 (12:55 -0700)]
Merge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs."
am: f3378017ea

Change-Id: Id582f2c34e9dc61235a58fa2d4ffc4bc65395643

2 years agoMerge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs." android-o-mr1-iot-release-1.0.2 android-p-preview-5
Treehugger Robot [Mon, 2 Jul 2018 19:37:01 +0000 (19:37 +0000)]
Merge "Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs."

2 years agoAllow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs.
Yifan Hong [Mon, 2 Jul 2018 17:15:24 +0000 (10:15 -0700)]
Allow multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILEs.

Test: multiple DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE is specified, and built
Bug: 68291320
Change-Id: I60358a8b678bc43ced4eec15505c09b245c9764a

2 years agoassemble_vintf: first arg cannot contain extra things am: 0a35ab16fe
Yifan Hong [Fri, 29 Jun 2018 22:03:10 +0000 (15:03 -0700)]
assemble_vintf: first arg cannot contain extra things am: 0a35ab16fe
am: 1c3a660b18

Change-Id: Ic0ca88f03d2cf15b79d683885ef7459684a57a61

2 years agoassemble_vintf: first arg cannot contain extra things
Yifan Hong [Fri, 29 Jun 2018 21:20:02 +0000 (14:20 -0700)]
assemble_vintf: first arg cannot contain extra things
am: 0a35ab16fe

Change-Id: I561412bc64c89f670b9f2800569d44c9556f386e

2 years agoassemble_vintf: first arg cannot contain extra things
Yifan Hong [Fri, 29 Jun 2018 18:32:57 +0000 (11:32 -0700)]
assemble_vintf: first arg cannot contain extra things

... other than <hal> and type attribute.
Bug: 78943004
Test: build vintf stuff
Test: add extra device manifest and the following fails:
- specify "level"
- specify <sepolicy>

Change-Id: I1b0bbae5727dc8a0de1ff043ccf126d9e7c65e9b

2 years ago[automerger skipped] Remove shared lib dependencies of checkvintf am: 13ebc4c20d...
Jae Shin [Tue, 19 Jun 2018 13:47:00 +0000 (06:47 -0700)]
[automerger skipped] Remove shared lib dependencies of checkvintf am: 13ebc4c20d  -s ours
am: afecfcbfb1  -s ours

Change-Id: I0f80f454107790888dcc22033ab0ceda11a76ed0

2 years ago[automerger skipped] Remove shared lib dependencies of checkvintf
Jae Shin [Tue, 19 Jun 2018 13:43:42 +0000 (06:43 -0700)]
[automerger skipped] Remove shared lib dependencies of checkvintf
am: 13ebc4c20d  -s ours

Change-Id: I7bff60005e5ccd543fe5fa463b3e0405003fee82

2 years agoRemove shared lib dependencies of checkvintf android-p-preview-4
Jae Shin [Tue, 5 Jun 2018 02:20:00 +0000 (11:20 +0900)]
Remove shared lib dependencies of checkvintf

checkvintf is used to check the compatibility between system
and vendor in mixed build targets. Because inter branch build
targets need to be hosted on new manifest branches, checkvintf
was added to the dist package and should not have extra shared
library dependencies.

Test: m -j checkvintf; check that checkvintf is executable on its
own
Bug: 74214049

Merged-In: Iabf1c2477d163be6060d493a2f4b85e37fc339df
Change-Id: Iabf1c2477d163be6060d493a2f4b85e37fc339df
(cherry picked from commit e448ccc3c752877411396b445080c85fee8fba62)

2 years agoMerge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Xin Li [Sat, 9 Jun 2018 11:05:07 +0000 (04:05 -0700)]
Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
am: 325d3e832d

Change-Id: Id77884e3f01a563bad84c1a750519395924042d1

2 years agoMerge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Xin Li [Fri, 8 Jun 2018 18:09:26 +0000 (11:09 -0700)]
Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master

Bug: 79597307
Change-Id: I74b5318764006ad4272e0dc685cfcb556f77236a

2 years agoSnap for 4824048 from e448ccc3c752877411396b445080c85fee8fba62 to pi-release android-9.0.0_r1 android-9.0.0_r10 android-9.0.0_r2 android-9.0.0_r3 android-9.0.0_r5 android-9.0.0_r6 android-9.0.0_r7 android-9.0.0_r8 android-9.0.0_r9 android-cts-9.0_r1 android-cts-9.0_r2 android-cts-9.0_r3 android-vts-9.0_r4
android-build-team Robot [Wed, 6 Jun 2018 07:27:32 +0000 (07:27 +0000)]
Snap for 4824048 from e448ccc3c752877411396b445080c85fee8fba62 to pi-release

Change-Id: Ib5c7558b425624d476eeddbde5af4c8bfb3375b5

2 years ago[automerger skipped] libvintf: always use -DLIBVINTF_TARGET for target. am: 8eb7bc56a4
Steven Moreland [Tue, 5 Jun 2018 22:33:59 +0000 (15:33 -0700)]
[automerger skipped] libvintf: always use -DLIBVINTF_TARGET for target. am: 8eb7bc56a4
am: a1887e2b28  -s ours

Change-Id: I24cc9a3c06db0a63f2e1e2c19572a154162879ac

2 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Tue, 5 Jun 2018 21:54:21 +0000 (14:54 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.
am: 8eb7bc56a4

Change-Id: Iadbbdd798fbfabb36f4670a94f2d711f8586cecc

2 years agoRemove shared lib dependencies of checkvintf
Jae Shin [Tue, 5 Jun 2018 17:55:27 +0000 (10:55 -0700)]
Remove shared lib dependencies of checkvintf
am: e448ccc3c7

Change-Id: Idafe234a63ebb4de05fd08f32faa612aa9c409cc

2 years agoSnap for 4821244 from 16a15a748f94bbacf88f5268c29bef459e6e9edb to pi-release
android-build-team Robot [Tue, 5 Jun 2018 07:21:15 +0000 (07:21 +0000)]
Snap for 4821244 from 16a15a748f94bbacf88f5268c29bef459e6e9edb to pi-release

Change-Id: I8771ed11fd2b61b6d4598d22174654bd9b051b45

2 years agoRemove shared lib dependencies of checkvintf
Jae Shin [Tue, 5 Jun 2018 02:20:00 +0000 (11:20 +0900)]
Remove shared lib dependencies of checkvintf

checkvintf is used to check the compatibility between system
and vendor in mixed build targets. Because inter branch build
targets need to be hosted on new manifest branches, checkvintf
was added to the dist package and should not have extra shared
library dependencies.

Test: m -j checkvintf; check that checkvintf is executable on its
own
Bug: 74214049

Change-Id: Iabf1c2477d163be6060d493a2f4b85e37fc339df

2 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Fri, 1 Jun 2018 22:55:23 +0000 (15:55 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.

This was missing from libvintf and only applied to
libvintf_common, but libvintf also has utils.cpp which
depends on LIBVINTF_TARGET being defined. This caused
all property reads that libvintf made to return the
default value.

Bug: 91735839
Test: add an odm manifest for SE conditional on
    a system property (ro.boot.product.hardware.sku)
    and make sure it is read into the manifest (using
    the vintf tool) and also that a client can get the
    service:
$ lshal | grep secure
Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567

Test: `adb shell vintf` shows the manifest as parsing and the HAL as
    being on the device:
     DM                    android.hardware.secure_element@1.0::IDevice/SIM1
               FCM         android.hardware.secure_element@1.0::ISecureElement/SIM[1-9][0-9]*
               FCM         android.hardware.secure_element@1.0::ISecureElement/eSE[1-9][0-9]*

Change-Id: Ibdfdcfce8d17b964015fc05983c99573c7f060a1
Merged-In: Ibdfdcfce8d17b964015fc05983c99573c7f060a1

2 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Mon, 4 Jun 2018 18:04:33 +0000 (11:04 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.
am: 16a15a748f

Change-Id: I3624f10450481624f2ed868ef5c10187a718fcc8

2 years agolibvintf: always use -DLIBVINTF_TARGET for target.
Steven Moreland [Fri, 1 Jun 2018 22:55:23 +0000 (15:55 -0700)]
libvintf: always use -DLIBVINTF_TARGET for target.

This was missing from libvintf and only applied to
libvintf_common, but libvintf also has utils.cpp which
depends on LIBVINTF_TARGET being defined. This caused
all property reads that libvintf made to return the
default value.

Bug: 91735839
Test: add an odm manifest for SE conditional on
    a system property (ro.boot.product.hardware.sku)
    and make sure it is read into the manifest (using
    the vintf tool) and also that a client can get the
    service:
$ lshal | grep secure
Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567

Test: `adb shell vintf` shows the manifest as parsing and the HAL as
    being on the device:
     DM                    android.hardware.secure_element@1.0::IDevice/SIM1
               FCM         android.hardware.secure_element@1.0::ISecureElement/SIM[1-9][0-9]*
               FCM         android.hardware.secure_element@1.0::ISecureElement/eSE[1-9][0-9]*

Change-Id: Ibdfdcfce8d17b964015fc05983c99573c7f060a1