0

I have a device admin app that is the device owner and I want to bind to the DeviceAdminService class that the admin app has from another app.

The problem is that the DeviceAdminService class has onBind set to final so I cannot override it like you can with normal service to set my service class as the binder to be able to call the methods of my service class from another app.

How can I bind to this service class in another app so I can call my service methods when I cannot override the onBind?

3
  • That kind of goes contrary to the entire security policy. A device admin owner owns the device and can control anything on it. THere's no security to what apps can bind ot a service. So if apps are allowed to bind to a device admin service, then the admin service is completely compromised. Commented May 23, 2024 at 17:27
  • Fair point for sure Commented May 23, 2024 at 18:37
  • DevicePolicyManager class has a method called bindDeviceAdminServiceAsUser. it allows secondary user to bind to device admin service. But how to get instance of the service inside onServiceConnected callback I have no idea. Commented May 24, 2024 at 10:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.