Skip to content

Crash when transfering ownership to a component #259

@nktnet1

Description

@nktnet1

Hello - I'm getting the following error:

android.os.RemoteException: Remote stack trace:
	at  (Preconditions.java:64)
	at com.android.server.devicepolicy.DevicePolicyManagerService.transferOwnership(DevicePolicyManagerService.java:19597)
	at android.app.admin.IDevicePolicyManager$Stub.onTransact$transferOwnership$(IDevicePolicyManager.java:15568)
	at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:5581)
	at android.os.Binder.execTransactInternal(Binder.java:1500)

When trying to transfer ownership to my application.

Image

However, I can set it as "owner" just fine using Android Debug Bridge (ADB).

Why would this be the case?

Do you have any suggestions for how it can be fixed?

My AndroidManifest.yml has the following:

        <receiver
            android:exported="false"
            android:name=".WebviewKioskAdminReceiver"
            android:permission="android.permission.BIND_DEVICE_ADMIN">
            <meta-data
                android:name="android.app.device_admin"
                android:resource="@xml/device_admin" />
            <intent-filter>
                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
            </intent-filter>
        </receiver>

and device_admin.yml:

<device-admin>
    <uses-policies>
    </uses-policies>
</device-admin>

Things I've tried (all unsuccessful):

  • toggling android:exported
  • toggling android:manifest
  • adding/removing policies in device_admin.yml
  • using signed APKs instead of debug/test
  • tweaking intent-filter

Have simply settled for using adb for now.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions