Questions tagged [device-owner]

A specialized type of Android device administrator

Android 5.0 introduces the ability to deploy a device owner app. A device owner is a specialized type of device administrator that has the additional ability to create and remove secondary users and to configure global settings on the device.

149 questions
25
votes
7 answers

Not allowed to set the device owner because there are already several users on the device

I was following this tutorial to set the app as device owner. In that tutorial, there is a section 'Using adb to set the device owner'. The tutorial here says that after installing the Kiosk Mode Demo App, run the following command: adb shell dpm…
Ankit Shubham
  • 2,989
  • 2
  • 36
  • 61
24
votes
2 answers

PackageInstaller "Silent install and uninstall of apps by Device Owner” - Android M Preview

PackageInstaller (https://developer.android.com/reference/android/content/pm/PackageInstaller.html) seems to have been added starting in API 21 (Lollipop), however I have not found any solid code examples on how to install an APK via this API. Any…
21
votes
1 answer

Android PackageInstaller, re-open the app after it updates itself

I'm developing an app that runs as Device Owner, and I want to build an automatic updater inside it. To do it I use the PackageInstaller, as I have the privileges to use it due to my Device owner position. private void installPackage(InputStream…
19
votes
5 answers

OTA updates for Device Owner Android Application(Kiosk mode)

I am able to make my app, the device owner app through NFC as mentioned here. Now I want to update my app over the air, but I couldn't find a method without rooting. Google is providing many options for enterprises to develop apps as mentioned here,…
Shubham
  • 2,627
  • 3
  • 20
  • 36
18
votes
2 answers

Device owner on Android TV Box not working

I want to install my application as device owner on Android TV Box and I get the next exception. adb shell dpm set-device-owner "com.android.testapp/.receivers.AdminReceiver" java.lang.RuntimeException: Can't set package com.android.testapp as…
leryonce
  • 181
  • 4
17
votes
3 answers

Screen pinning 3rd party apps programmatically

After achieving device ownership, I am trying to implement a method to instruct the device to lock any given app into kiosk mode (or screen pinning mode). Since I have device ownership, the user is not asked for the permission to do so. From the…
10
votes
0 answers

Turn device off instead of rebooting as device owner

With the Android device owner API it is possible to reboot the device (https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#reboot(android.content.ComponentName)) which to me is permission wise pretty much the same as…
timonsku
  • 1,249
  • 2
  • 21
  • 45
10
votes
1 answer

How do I get the signature checksum of my APK that is signed with only the v2 scheme?

I previously posted a question on how to get the signature checksum of my APK here: How do I get the signature checksum of my APK? The answer is perfect if an app is signed with the v1 signature scheme or the combination v1/v2 signature schemes.…
9
votes
1 answer

NFC Device Owner Provisioning and Knox

Firstly, apologies if this is an inappropriate place for this question as it is not strictly a code question but I am struggling to find any relevant resources anywhere else. We have a solution based around using a Samsung devices, currently S7s, as…
AndyGates
  • 171
  • 7
9
votes
3 answers

Android pin activity on boot

I've got an app that registers itself as the default launcher and pins itself automatically when started. This all works fine when installing the app. It pins itself and only the back button is visible. The problem is that when the device first…
Greg T
  • 3,278
  • 3
  • 37
  • 39
9
votes
3 answers

Is it possible to have a "Profile Owner" app in Android Lollipop that is not co-present

The Lollipop API provides 2 new features "Profile Owner" and "Device Owner" (http://developer.android.com/about/versions/android-5.0.html#Enterprise). Between them, they offer just the features I need for an app that parents can use to control their…
8
votes
2 answers

Android 12 Device Owner Provisioning

I have an application, that can be successfully setup as Device Owner on devices up to Android 12 via QR code from JSON…
8
votes
4 answers

How to prevent users from turning off GPS, Wifi and Bluetooth?

I'm developing a tracking application and I need to prevent users from turning off the basic sensors used to determine the location. I can not modify the devices ROM or have root access (or at least it would be very desirable to had not), but I…
7
votes
1 answer

How do I get the signature checksum of my APK?

I would like to use the signature checksum instead of the package checksum when provisioning a device with a device owner app. The app will be downloaded from an http server. This post is great when using…
7
votes
3 answers

Android Kiosk Mode - Preventing users from "unauthorized" unpinning the application

I am pretty new to android and I am currently developing an Android App that should run in KioskMode, so that a normal user can't exit the application or do anything outside of it. What I already did: I set my app as a device owner I "screen pin"…
1
2 3
9 10