Installing updates as a device owner

54 views
Skip to first unread message

Will Newton

unread,
Apr 24, 2018, 11:59:42 AM4/24/18
to android-platform

Hi,

I'm writing an MDM-like app that uses the DevicePolicyManager in order to set device settings etc. I also want to be able to install OTA updates on the device.

The best way to do this looks to be the android.os.RecoverySystem API, however that calls for the REBOOT permission which is signature|privileged. I can however reboot via the DevicePolicyManager API, just not into recovery. Is this an oversight in the API?

At the moment it seems like my choices are:

1. Sign my app with the platform key. This is possible but I would rather keep the number of components signed with this key as small as possible.
2. Add some kind of helper to the base system that can perform the required operations. This seems kind of a hack.

Does anyone have any better ways to accomplish this?

Thanks,

Arne-Christian Blystad

unread,
Apr 30, 2018, 12:48:37 PM4/30/18
to android-platform
I've created both an OTA update solution, and a MDM solution. The OTA app must be signed with platform certificate, or made into a privileged app (system/priv-app).

What you could do, which we've done for the MDM solution, is to create a very small application with a service that you can bind to and communicate with using AIDL, and execute the API (this APK must require the REBOOT permission, so it must either be signed, or made into a privileged app located in system/priv-app). The application should of course verify that the one calling the AIDL api is permitted (e.g. by checking that it's a system app, though not necessarily a system privileged app).

You don't need to make any changes to the base Android framework.

Hope the above was clear.
Reply all
Reply to author
Forward
0 new messages