安装设备所有者应用程序的更新 [英] Install updates for a Device-Owner App

查看:151
本文介绍了安装设备所有者应用程序的更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道更新发生时通过Google Play分发的设备所有者应用在生产中的行为吗?

Does anyone know what is the behavior in production of a device-owner App, distributed thru Google Play, when updates occur?

我们知道,安装设备所有者的应用程序需要一定的动力,而且并不容易:将其重置为出厂默认设置,然后使用NFC将设备与第二个设备进行预配置,等等……因此,即使我们认为这一步骤已完成,仍将进行进一步的更新每次都涉及这么多的痛苦?

As we know, installing a device-owner App involves some motivation and is not easy: reset to factory default then NFC-provision the device with a second device etc… So even if we consider this step done, would any further update involve so much pain, each time?

出现此问题的原因是,在我的开发设备上,如果以前安装了该设备,则我无法通过更改重新启动该设备所有者的应用程序…除非将设备重置为出厂设置!

This question occurs because on my development device, I cannot re-launch the device-owner App with changes if it was previously installed… unless I reset the device to factory settings!

感谢您的阅读……

推荐答案

设置了设备所有者应用后,将在/data/system/device_owner.xml 下创建一个引用该设备的新文件./个人资料所有者的应用.

Once your Device Owner app is set, a new file is created under /data/system/device_owner.xml that references the Device/Profile owner apps.

然后,Android系统正在读取此文件,以检查哪个应用程序被视为设备所有者配置文件所有者应用.

The Android system is then reading this file to check which application is considered as Device Owner or Profile Owner App.

此文件包含使用应用程序包名称引用的应用程序.由于软件包名称保持不变,因此更新这些应用程序不会推断出该文件.
更新应用程序时,只需确保始终使用与首次设置设备所有者时使用的证书相同的证书即可(无论如何,这是Android中每个应用程序更新的安全标准规则)).
权限也可以用相同的方式更新,而无需通过NFC或 dpm 工具重新配置.

This file contains refers to the applications by using their package name. Updating these apps won't infer on this file since the package name stays the same.
When you're updating your app, just make sure you're always using the same certificate as the one you previously used when first setting you device owner for the first time (which is a standard rule of security for every application update in Android anyway).
Permissions can also be updated the same way, without the need to reprovision it through NFC, nor dpm tool.

这篇关于安装设备所有者应用程序的更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆