Install updates for a Device-Owner App

陌路散爱 提交于 2021-02-05 20:36:17

问题


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

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!

Thanks for reading…


回答1:


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.

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

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.



来源:https://stackoverflow.com/questions/28273925/install-updates-for-a-device-owner-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!