Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install updates for a Device-Owner App

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…

like image 353
JBA Avatar asked Feb 02 '15 08:02

JBA


1 Answers

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.

like image 71
Florent Dupont Avatar answered Sep 29 '22 00:09

Florent Dupont