Closed OmegaXhunter closed 2 years ago
Same here
Hi, I don't know what exactly was not working, but I've used the demo here https://snow.dog/blog/kiosk-mode-android
And it works. The code is a bit different, so maybe you can update your demo if you want, if not no problem =)
Hi, I cloned your repository and successfuly compiled it and run in an emulator.
The problem is when running the ADB command, I get this as response:
Error: Unknown admin: ComponentInfo{com.android.kioskmode/com.android.kioskmode.AdminReceiver}
Any ideas? That is beacuse theres already a gmail account link to the device and if you want to make your app as admin there should be no google account linked to the device.
factory reset your device and then try writing the command through the ADB command it should work. Once you make it an admin app you cannot uninstall it directly you will have to remove the admin access for this app via the abd command again and then only you would be able to uninstall the app.
Yes I did factory reset previously to test your app.
As I already said, it works now with the link I provided.
Thanks for your help.
Getting same error even after factory reset, any suggestions?
@kotta518 did you add the receiver's code in the manifest file and also the XML file for device admin
yes, those are there as is in this sample.
<receiver android:name=".AdminReceiver" android:label="@string/app_name" android:permission="android.permission.BIND_DEVICE_ADMIN">
Hi, I cloned your repository and successfuly compiled it and run in an emulator.
The problem is when running the ADB command, I get this as response:
Error: Unknown admin: ComponentInfo{com.android.kioskmode/com.android.kioskmode.AdminReceiver}
Any ideas?