From ea448b829ef3c5eefcadcd50fdf74c873eeadd86 Mon Sep 17 00:00:00 2001 From: Android Partner Docs Date: Wed, 8 Aug 2018 13:50:33 -0700 Subject: Docs: Changes to source.android.com - 207940242 One more fix: add header for Television Requirements. by Gina Dimino - 207936055 Update health README link. by Android Partner Docs - 207929938 Errata run for Android 9 CDD. by Gina Dimino - 207897850 Fix typos in Develop and Configure index pages by Kenneth Lau - 207813977 Devsite localized content from translation request 958913. by Android Partner Docs - 207813949 Devsite localized content from translation request 953118. by Android Partner Docs - 207813941 Devsite localized content from translation request 961934. by Android Partner Docs - 207813934 Devsite localized content from translation request 552632. by Android Partner Docs - 207813463 Update line numbers in links by Kenneth Lau - 207796341 Fixing the URL for the CDD link in versions file. by Gina Dimino - 207779392 Fix incorrect link by Kenneth Lau - 207777680 Update build numbers for 2018/08 releases by Android Partner Docs - 207775888 Update links to AOSP by Kenneth Lau - 207769948 Update links to AOSP by Kenneth Lau - 207763826 Clarify system for HIDL passthrough loading. by Android Partner Docs - 207733156 Fixing malformed links in html for kernel patches, adding... by Heidi von Markham - 207650104 Remove link by Heidi von Markham - 207640627 Tags for Android P. by Android Partner Docs - 207626815 Making link absolute by Clay Murphy - 207611166 Add Background Restrictions into Release Notes. by Christina Nguyen - 207606267 Fixing unclosed tag, reformatting for clarity by Heidi von Markham - 207604244 Fix malformed link by Clay Murphy - 207598416 adding subscript by Heidi von Markham - 207595049 Fix link in section 3.5.1. by Gina Dimino - 207590813 Fix broken link due to file path change by Christina Nguyen - 207588930 Update Power nav to include changes to mgmt page (broken ... by Christina Nguyen - 207588102 Separate out the Power Management article into "Applicati... by Christina Nguyen - 207583000 Fix broken links in HAL interface section by Kenneth Lau - 207582699 Put index files in place as redirects are not taking hold by Clay Murphy - 207575443 P release notes: fix bad links, remove "P release" by Mark Hecomovich - 207574657 Fix link typo from release notes to Carrier ID page by Christina Nguyen - 207559561 Integrate SAC next branch into mainline for Android P/9 p... by Mark Hecomovich - 207559252 Publish links to July localized versions within Japanese ... by Clay Murphy - 207122872 Devsite localized content from translation request 958912. by Android Partner Docs - 207122854 Devsite localized content from translation request 961384. by Android Partner Docs - 207007888 Add blurb about the SystemUpdateSampler app on SAC so use... by Christina Nguyen - 206862073 Update Camera HAL testing page by Kenneth Lau - 206805870 Devsite localized content from translation request 960240. by Android Partner Docs - 206805861 Devsite localized content from translation request 954945. by Android Partner Docs PiperOrigin-RevId: 207940242 Change-Id: I3dee204c744e2e6062ac56810b88aefabf84636a --- en/devices/architecture/vintf/match-rules.html | 187 ++++++++++++++++++++++--- 1 file changed, 168 insertions(+), 19 deletions(-) (limited to 'en/devices/architecture/vintf/match-rules.html') diff --git a/en/devices/architecture/vintf/match-rules.html b/en/devices/architecture/vintf/match-rules.html index 61a5f1a7..dd79254b 100644 --- a/en/devices/architecture/vintf/match-rules.html +++ b/en/devices/architecture/vintf/match-rules.html @@ -29,15 +29,34 @@ device manifest, as well as between the framework manifest and the device compatibility matrix. The following sections detail matching rules used by various components.

+

Framework compatibility matrix version matches

+

To match a device manifest with a framework compatibility matrix, +the Shipping FCM version specified by manifest.target-level +must exactly equal to the FCM version specified by +compatibility-matrix.level. Otherwise there is no match.

+ +

If the framework compatibility matrix is requested with +libvintf, this match is always successful because +libvintf opens the device manifest, retrieves the Shipping FCM +Version, and returns the framework compatibility matrix at that Shipping FCM +Version (plus some optional HALs from compatibility matrices at higher FCM +Versions).

+

HAL matches

The HAL-match rule identifies the versions of hal elements in a manifest file that are considered supported by the owner of the corresponding compatibility matrix.

    -
  • Multiple version elements are concatenated with -OR (see camera example below).
  • -
  • Multiple <hal> elements with the same name are -concatenated with AND.
  • +
  • Multiple <hal> elements have AND +relationship.
  • +
  • Multiple <version> elements within the same +<hal> have +OR relationship. If two or more are specified, only +one of the version needs to be implemented (see DRM example below).
  • +
  • Multiple <instance> and +<regex-instance> elements within the same +<hal> have +AND relationship (see DRM example below).

Example: Successful HAL match for Camera module

@@ -92,28 +111,32 @@ for DRM HAL:

<interface> <name>ICryptoFactory</name> <instance>default</instance> + <regex-instance>[a-z]+/[0-9]+</regex-instance> </interface> </hal> -

A vendor must implement ONE of the following HALs:

+

A vendor must implement ONE of the following instances:

-android.hardware.drm@1.x::IDrmFactory/default          //where x >= 0
-android.hardware.drm@1.x::IDrmFactory/specific         //where x >= 0
+android.hardware.drm@1.x::IDrmFactory/default          // where x >= 0
+android.hardware.drm@1.x::IDrmFactory/specific         // where x >= 0
 
OR
-android.hardware.drm@3.y::IDrmFactory/default          //where y >= 1
-android.hardware.drm@3.y::IDrmFactory/specific         //where y >= 1
+android.hardware.drm@3.y::IDrmFactory/default          // where y >= 1
+android.hardware.drm@3.y::IDrmFactory/specific         // where y >= 1
 
-

... AND must also implement this HAL:

+

... AND must also implement all of these instances:

-android.hardware.drm@2.z::ICryptoFactory/default       //where z >= 0
+android.hardware.drm@2.z::ICryptoFactory/default       // where z >= 0
+android.hardware.drm@2.z::ICryptoFactory/${INSTANCE}
+            // where z >= 0 and ${INSTANCE} matches [a-z]+/[0-9]+
+            // e.g. legacy/0
 

Kernel matches

@@ -257,7 +280,7 @@ rules are similar to HAL versions; it is a match if the sepolicy version is higher or equal to the minimum version for the range. The maximum version is purely informational.
  • <kernel-sepolicy-version> i.e. policydb version. Must -exactly match the security_policyvers() reported by the device. +be less than the security_policyvers() reported by the device.
  • @@ -266,17 +289,22 @@ exactly match the security_policyvers() reported by the device.

    -    <sepolicy>
    -        <kernel-sepolicy-version>30</kernel-sepolicy-version>
    -        <sepolicy-version>25.0</sepolicy-version>
    -        <sepolicy-version>26.0-3</sepolicy-version>
    -    </sepolicy>
    +<sepolicy>
    +    <kernel-sepolicy-version>30</kernel-sepolicy-version>
    +    <sepolicy-version>25.0</sepolicy-version>
    +    <sepolicy-version>26.0-3</sepolicy-version>
    +</sepolicy>
     

    On the device:

      -
    • The value returned by security_policyvers() must exactly equal -30. Otherwise it is not a match.
    • +
    • The value returned by security_policyvers() must be greater +than or equal to 30. Otherwise it is not a match. For example: +
        +
      • If a device returns 29, it is not a match.
      • +
      • If a device returns 31, it is a match.
      • +
      +
    • SE Policy version must be one of 25.0-∞ or 26.0-∞. Otherwise it is not a match. (The "-3" after "26.0" is purely informational.)
    • @@ -362,5 +390,126 @@ ro.boot.avb_version == 2.3 && ro.boot.vbmeta.avb_version == 2.1  match  +

      VNDK version matches

      +

      The device compatibility matrix declares the required VNDK version in +compatibility-matrix.vendor-ndk.version. If the device +compatibility matrix does not have a <vendor-ndk> tag, no +requirements are imposed, and hence it is always considered a match.

      +

      If the device compatibility matrix does have a <vendor-ndk> +tag, an <vendor-ndk> entry with a matching +<version> is looked up from the set of VNDK vendor snapshots +provided by the framework in the framework manifest. If such an entry does not +exist, there is no match.

      +

      If such entry does exist, the set of libraries enumerated in the device +compatibility matrix must be a subset of the set of libraries stated in the +framework manifest; otherwise, the entry is not considered a match.

      +
        +
      • As a special case, if no libraries are enumerated in the device + compatibility matrix, the entry is always considered a match, because empty + set is a subset of any set.
      • +
      + +

      Example: Successful VNDK version match

      +

      If the device compatibility matrix states the following requirement on VNDK: +

      + +
      +<!-- Example Device Compatibility Matrix -->
      +<vendor-ndk>
      +    <version>27</version>
      +    <library>libjpeg.so</library>
      +    <library>libbase.so</library>
      +</vendor-ndk>
      +
      + +

      In the framework manifest, only the entry with version 27 is considered.

      + +
      +<!-- Framework Manifest Example A -->
      +<vendor-ndk>
      +    <version>27</version>
      +    <library>libjpeg.so</library>
      +    <library>libbase.so</library>
      +    <library>libfoo.so</library>
      +</vendor-ndk>
      +
      + +

      Example A is a match, because VNDK version 27 is in the framework manifest, +and {libjpeg.so, libbase.so, libfoo.so} ⊇ {libjpeg.so, libbase.so}. +

      + +
      +<!-- Framework Manifest Example B -->
      +<vendor-ndk>
      +    <version>26</version>
      +    <library>libjpeg.so</library>
      +    <library>libbase.so</library>
      +</vendor-ndk>
      +<vendor-ndk>
      +    <version>27</version>
      +    <library>libbase.so</library>
      +</vendor-ndk>
      +
      + +

      Example B is not a match. Even though VNDK version 27 is in the framework +manifest, libjpeg.so is not supported by the framework in that +snapshot. VNDK version 26 is ignored.

      + +

      System SDK version matches

      +

      The device compatibility matrix declares a set of required System SDK +version in compatibility-matrix.system-sdk.version. There is a +match only if the set is a subset of provided System SDK versions as declared +in manifest.system-sdk.version in the framework manifest.

      +
        +
      • As a special case, if no System SDK versions are enumerated in the device + compatibility matrix, it is always considered a match, because empty + set is a subset of any set.
      • +
      + +

      Example: Successful System SDK version match

      +

      If the device compatibility matrix states the following requirement on System +SDK: +

      + +
      +<!-- Example Device Compatibility Matrix -->
      +<system-sdk>
      +    <version>26</version>
      +    <version>27</version>
      +</system-sdk>
      +
      + +

      Then, the framework must provide System SDK version 26 and 27 to match.

      + +
      +<!-- Framework Manifest Example A -->
      +<system-sdk>
      +    <version>26</version>
      +    <version>27</version>
      +</system-sdk>
      +
      + +

      Example A is a match.

      + +
      +<!-- Framework Manifest Example B -->
      +<system-sdk>
      +    <version>26</version>
      +    <version>27</version>
      +    <version>28</version>
      +</system-sdk>
      +
      + +

      Example B is a match.

      + +
      +<!-- Framework Manifest Example C -->
      +<system-sdk>
      +    <version>26</version>
      +</system-sdk>
      +
      + +

      Example C is not a match, because System SDK version 27 is not provided.

      + -- cgit v1.2.3