| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2024 The Android Open Source Project |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <!-- |
| This XML defines an allowlist of packages that should be exempt from ECM (Enhanced Confirmation |
| Mode). |
| |
| Example usage: |
| |
| <enhanced-confirmation-trusted-package |
| package="com.example.app" |
| sha256-cert-digest="E9:7A:BC:2C:D1:CA:8D:58:6A:57:0B:8C:F8:60:AA:D2:8D:13:30:2A:FB:C9:00:2C:5D:53:B2:6C:09:A4:85:A0"/> |
| |
| ... |
| |
| <enhanced-confirmation-trusted-installer |
| package="com.example.installer" |
| sha256-cert-digest="E9:7A:BC:2C:D1:CA:8D:58:6A:57:0B:8C:F8:60:AA:D2:8D:13:30:2A:FB:C9:00:2C:5D:53:B2:6C:09:A4:85:A0"/> |
| |
| ... |
| |
| The "enhanced-confirmation-trusted-package" entry shown above indicates that "com.example.app" |
| should be considered a "trusted package". A "trusted package" will be exempt from ECM restrictions. |
| |
| The "enhanced-confirmation-trusted-installer" entry shown above indicates that |
| "com.example.installer" should be considered a "trusted installer". A "trusted installer", and all |
| packages that it installs, will be exempt from ECM restrictions. (There are some exceptions to this. |
| For example, a trusted installer, at the time of installing an app, can opt the app back in to ECM |
| restrictions by setting the app's package source to PackageInstaller.PACKAGE_SOURCE_DOWNLOADED_FILE |
| or PackageInstaller.PACKAGE_SOURCE_LOCAL_FILE.) |
| |
| In either case: |
| |
| - The "package" XML attribute refers to the app's package name. |
| - The "sha256-cert-digest" XML attribute refers to the SHA-256 hash of an app signing certificate. |
| |
| For any entry to successfully apply to a package, both XML attributes must be present, and must |
| match the package. That is, the package name must match the "package" attribute, and the app must be |
| signed by the signing certificate identified by the "sha256-cert-digest" attribute.. |
| --> |
| |
| <config></config> |