Device Trust from Android Enterprise - Available signals

Android Enterprise 的 Device Trust 在 Device 上提供了一组设备状态信号,授权应用(包括许可清单中的应用和分配了 COMPANION_APP 角色的应用,请参阅管理应用角色和政策配置)可以访问这些信号,以计算设备的信任分数。

Device 及其嵌套模型类中的每个信号字段都包含一个返回 Metadata 的相应 get*Metadata() 方法,该方法会报告检索信号时遇到的任何 Metadata.DataIssue(例如缺少清单权限)。

如需了解如何在应用中集成 Android Management API SDK,请参阅 Android Enterprise 的设备信任 - 集成指南。

信号
操作系统版本
Device#getSoftwareInfo() 会返回一个 SoftwareInfo 对象,其中包含操作系统版本详细信息(较旧的操作系统版本通常具有更多漏洞):
Android Device Policy 版本
SoftwareInfo#getAndroidDevicePolicyVersionCode() 和 SoftwareInfo#getAndroidDevicePolicyVersionName() 会返回设备上 Android 设备政策应用的版本代码和用户可见的版本名称。
设备是否有待处理的 OTA
SoftwareInfo#getSystemUpdateInfo() 会返回一个 SoftwareInfo.SystemUpdateInfo,用于指示设备是否有待处理的操作系统更新(代理指示设备是否容易受到攻击):
设备安全补丁级别
SoftwareInfo#getDeviceSecurityPatchInfos() 会针对设备当前的安全补丁级别,返回一个 SoftwareInfo.SecurityPatchInfo 对象列表(getComponent() 和 getSecurityPatchLevel() 会返回一个 SecurityPatchLevel 对象列表),其中包含可更新的 SecurityPatchComponent 类型:
已发布的安全补丁级别
SoftwareInfo#getPublishedSecurityPatchInfos() 会针对当前已发布的安全补丁级别,返回一系列可更新的 SecurityPatchComponent 类型的 SoftwareInfo.SecurityPatchInfo 对象列表(getComponent() 和 getSecurityPatchLevel() 会返回一系列 SecurityPatchLevel 对象列表):
关键应用详细信息
Device#getApplicationReports() 会向可扩展性应用和在 AMAPI 管理的设备上具有 COMPANION_APP 角色的调用应用返回所有已安装应用的详细信息(请参阅管理应用角色和政策配置;在工作资料中调用时,报告仅限于工作资料中安装的应用)。对于所有其他调用方(例如许可清单中的应用),Device#getApplicationReports() 仅返回以下关键应用的详细信息:
  • com.android.chrome
  • com.google.android.gms
  • com.google.android.apps.work.clouddpc
  • com.android.vending
  • 设备的当前 WebView 软件包(例如 com.google.android.webview)
详情会以 ApplicationReport 对象列表的形式返回,其中包含:
设备硬件信息
Device#getHardwareInfo() 会返回一个 HardwareInfo 对象,该对象会公开:
屏锁复杂度
Device#getDeviceSettings() 提供 DeviceSettings#getScreenLockComplexity(),用于返回 DeviceSettings.ScreenLockComplexity 值,该值指示当前用户或个人资料的屏幕锁定方式的复杂程度。
管理状态(和管理应用)
返回的信息取决于应用在其中运行的配置文件。如需了解详情,请参阅管理状态表。
磁盘加密
DeviceSettings#getEncryptionStatus() 会返回一个 DeviceSettings.EncryptionStatus 值,用于指示设备的存储空间是否已加密。
访问网络状态(网络状态和 Wi-Fi 状态)
Device#getNetworkInfo() 会返回一个 NetworkInfo 对象,而 NetworkInfo#getNetworkParams() 会返回一个 NetworkInfo.NetworkParams 对象列表,其中包含设备上所有活跃网络的详细信息:
Google Play 保护机制 VerifyApps
是否已启用 DNS-over-TLS
NetworkParams#getPrivateDnsState() 会返回一个 PrivateDnsState 值,该值指示是否在网络上使用专用 DNS。
WebView 软件包
SoftwareInfo#getWebviewPackage() 会返回当前 WebView 软件包的名称。
管理服务提供商的直观易懂的商家名称
在 AMAPI 管理的设备上,Device#getManagementProviderInfo() 会返回一个 ManagementProviderInfo 对象,其 getBusinessName() 方法会提供管理提供商的人类可读商家名称。此字段未在非受管设备或由自定义 DPC 管理的设备上设置。

管理状态

管理信号返回的值取决于应用运行所在的个人资料。如需在非受管设备或由自定义 DPC 管理的设备上从个人资料中访问信号,您的应用必须在许可清单中。在 AMAPI 管理的全托管式设备上或在工作资料中,分配了 COMPANION_APP 角色的应用也可以访问这些信号,而无需列入许可清单(在工作资料中调用时,仅限于来自工作资料的信号)。

管理状态 从个人资料中调用时的信号 从工作资料中调用时的信号
非受管设备 ownership: PERSONALLY_OWNED
managementMode: UNMANAGED
managementAppPackageName: N/A
workProfileState:
N/A
个人自有设备 (BYOD) 上的工作资料 ownership: PERSONALLY_OWNED
managementMode: UNMANAGED
managementAppPackageName: N/A
workProfileState:
ownership: PERSONALLY_OWNED
managementMode: PROFILE_OWNER
managementAppPackageName: Package name of the Profile Owner application
workProfileState:
公司自有设备上的工作资料 ownership: COMPANY_OWNED
managementMode: UNMANAGED
managementAppPackageName:N/A
workProfileState:
ownership: COMPANY_OWNED
managementMode: PROFILE_OWNER
managementAppPackageName: Package name of the Profile Owner application
workProfileState:
全托管式设备 N/A ownership: COMPANY_OWNED
managementMode: DEVICE_OWNER
managementAppPackageName: Package name of the Device Owner application
workProfileState: