5

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…

JBA
  • 2,889
  • 1
  • 21
  • 38

1 Answers1

7

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.

Florent Dupont
  • 1,758
  • 18
  • 24
  • It looks like I should take care of you as a valuable resource in those Device-Owner tricks! Thanks again for this tip, still needing to test it on the play store but for now this answer make much sense. – JBA Feb 14 '15 at 06:40
  • Back from testing things, it looks like we cannot nfc-install an App from the PlayStore directly: as mentioned [in this question](http://stackoverflow.com/q/28777354/1720332), the process fails when trying this... This makes the automatic updates from Google Play impossible... Does it mean forcing device-owner publishers to distribute and do every related stuff on a private server ?? – JBA Mar 01 '15 at 15:35
  • 1
    I'm working on a similar app, and my plan is to get users to use the dpm method of setting the app as a device owner. A bit fiddly, but it's going to be a fairly specialist app anyway. – Mark Adamson Oct 17 '16 at 20:30
  • I forgot to say. With the dpm method, I can install the both the initial version and any updates from play store without any problem – Mark Adamson Nov 05 '17 at 09:10
  • I know this is like a completly new question. But how is the behaviour if I try to uninstall/reinstall the devices owner app (When I debugging my app)? – b.holz Nov 10 '17 at 08:50