NFC-free device owner in Android Lollipop

I want to make my application the owner of the device without using NFC. The developer blog says that in order for the device owner you must use NFC, but I found that it is also possible without NFC, as mentioned by alex_au in this comment. Owner of a device on Android 5.0 (and others) without root devices, provision of NFC devices

I tried this, but until I succeed, please help me if someone succeeds to fulfill it.

thanks

+2
source share
1 answer

You can use the dpm command line tool from adb shell.

Application:

usage: dpm [subcommand] [options] usage: dpm set-device-owner <COMPONENT> usage: dpm set-profile-owner <COMPONENT> <USER_ID> dpm set-device-owner: Sets the given component as active admin, and its package as device owner. dpm set-profile-owner: Sets the given component as active admin and profile owner for an existing user. 

For more information check: dpm shell command

Note. Before using this command, make sure that the device is not provided. If the device is prepared and you get a message like "The device is already prepared", try to run the command after deleting all accounts from the device or try after factory reset the device.

+5
source

Source: https://habr.com/ru/post/985781/


All Articles