Skip to content

Android SecurityException when starting update #30

@Silverdark

Description

@Silverdark

Describe the bug
When trying to start an update with DFU a SecurityException is thrown.

Java.Lang.RuntimeException: Unable to create service crc640fd658db7faaed21.DfuServiceDelegate: java.lang.SecurityException: com.appid: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
 ---> Java.Lang.SecurityException: com.appid: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
 ---> Android.OS.RemoteException: Remote stack trace:
	at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14008)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2585)
	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2763)
	at android.os.Binder.execTransactInternal(Binder.java:1363)
	at android.os.Binder.execTransact(Binder.java:1304)
...

To Reproduce
Steps to reproduce the behavior:

Call the Start method for the DFU installation:

var installation = new DfuInstallation(deviceId, file);
installation.Start(new DfuConfiguration());

Expected behavior
Update with DFU should start.

Smartphone:

  • Device: Google Pixel 6
  • OS: Android 14

Additional context

As far as I understand this happens only if the target SDK level is at 34 and your phone has Android 14 installed.
Looks like an issue with the Android Nordic library NordicSemiconductor/Android-DFU-Library#412 maybe it is already fixed with an update.

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