简体   繁体   English

Android 管理设备置备失败

[英]Android Management Device Provision Fail

I used this quick start guide to setup my project and enterprise.我使用此快速入门指南来设置我的项目和企业。 Currently the project is under 'No Organization' on the Google Cloud Console hierarchy.目前,该项目位于 Google Cloud Console 层次结构中的“无组织”下。

I have setup the following device policy with a single app in kiosk mode.我已经在自助服务终端模式下使用单个应用设置了以下设备策略。 The app is restricted to a single country and is developed in-house.该应用程序仅限于一个国家,并且是内部开发的。

{
    "safeBootDisabled": true,
    "screenCaptureDisabled": true,
    "factoryResetDisabled": true,
    "systemUpdate": {
        "type": "WINDOWED",
        "startMinutes": 0,
        "endMinutes": 240
    },
    "applications": [
        {
            "packageName": "com.xxx.yyy",
            "installType": "KIOSK",
            "defaultPermissionPolicy": "GRANT"
        }
    ],
    "debuggingFeaturesAllowed": true,
    "funDisabled": true,
    "appAutoUpdatePolicy": "WIFI_ONLY",
    "kioskCustomization": {
        "statusBar": "NOTIFICATIONS_AND_SYSTEM_INFO_ENABLED"
    }
}

I currently use the QR method to provision devices.我目前使用QR 方法来配置设备。

The problem I am having is that the provisioning process is failing at the stage when the app is being installed.我遇到的问题是在安装应用程序的阶段配置过程失败。

When I use this API to check what went wrong I can see that it failed because of the following error:当我使用这个API检查出了什么问题时,我可以看到它由于以下错误而失败:

{
    "nonComplianceDetails": [
        {
            "settingName": "applications",
            "nonComplianceReason": "APP_NOT_INSTALLED",
            "packageName": "com.xxx.yyy",
            "installationFailureReason": "NOT_AVAILABLE_IN_COUNTRY"
        },
        {
            "settingName": "persistentPreferredActivities",
            "nonComplianceReason": "APP_NOT_INSTALLED",
            "packageName": "com.xxx.yyy"
        }
    ]
}

If I change my device policy from install type "KIOSK" to "AVAILIBLE" the device is successfully provisioned.如果我将设备策略从安装类型“KIOSK”更改为“AVAILIBLE”,则设备已成功配置。 I can then install the app from the Play store and reset the install type to "KIOSK" mode.然后我可以从 Play 商店安装应用程序并将安装类型重置为“KIOSK”模式。

But this is far from ideal because the entire device fleet of 85 production devices settings', are then changed just to provision a single device.但这远非理想,因为包含 85 个生产设备设置的整个设备群随后会被更改为仅配置单个设备。

So it seems that while provisioning the device the location settings are incorrect?所以似乎在配置设备时位置设置不正确?

Does anybody know why this is happening?有谁知道为什么会这样?

Try to create a separate policy just for this device so that you can provision it without affecting other devices, and once provisioned, you can update which policy is applied to the device to be the same to all other devices.尝试仅为该设备创建一个单独的策略,以便您可以在不影响其他设备的情况下对其进行配置,并且在配置后,您可以将应用于该设备的策略更新为与所有其他设备相同。

You can use policies.patch to update the policy or devices.patch .您可以使用policies.patch更新策略或devices.patch

This also could be for a lack of Kiosk support mode for a given app as KIOSK required the app to have an official “lock task mode” per https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode .这也可能是由于给定应用程序缺乏 Kiosk 支持模式,因为 KIOSK 要求应用程序具有官方的“锁定任务模式”,每个https://developer.android.com/work/dpc/dedicated-devices/lock-任务模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM