oasisfeng / island

Island for Android
https://play.google.com/store/apps/details?id=com.oasisfeng.island
Apache License 2.0
2.6k stars 198 forks source link

"...Unknown admin: ComponentInfo..." error message #372

Open yevheniikom opened 2 years ago

yevheniikom commented 2 years ago

I am trying to follow the instruction(https://island.oasisfeng.com/setup.html) and setup the work profile manually. Android 12. Insular installed from F-Droid

$ dpm set-profile-owner --user 0 --name Mainland com.oasisfeng.island.fdroid/.IslandDeviceAdminReceiver

Exception occurred while executing 'set-profile-owner':
java.lang.IllegalArgumentException: Unknown admin: ComponentInfo{com.oasisfeng.island.fdroid/com.oasisfeng.island.fdroid.IslandDeviceAdminReceiver}
        at com.android.server.devicepolicy.DevicePolicyManagerService.findAdmin(DevicePolicyManagerService.java:3304)
        at com.android.server.devicepolicy.DevicePolicyManagerService.setActiveAdmin(DevicePolicyManagerService.java:3885)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetProfileOwner(DevicePolicyManagerServiceShellCommand.java:283)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:91)
        at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
        at android.os.ShellCommand.exec(ShellCommand.java:38)
        at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:10707)
        at android.os.Binder.shellCommand(Binder.java:986)
        at android.os.Binder.onTransact(Binder.java:860)
        at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:7615)
        at android.os.Binder.execTransactInternal(Binder.java:1220)
        at android.os.Binder.execTransact(Binder.java:1179)
Pocarai commented 2 years ago

Yeah same to me a while ago. That was happend when I tried to use Adb.

MadCkull commented 1 year ago

Hi Guys! I had same problem. I was able to solve this issue. Just follow these steps:

  1. Extract Island APK file.
  2. Copy it to your Computer.
  3. Install APK File using this command: adb install --user path/to/apk/file
galenzhao commented 7 months ago

I am trying to follow the instruction(https://island.oasisfeng.com/setup.html) and setup the work profile manually. Android 12. Insular installed from F-Droid

$ dpm set-profile-owner --user 0 --name Mainland com.oasisfeng.island.fdroid/.IslandDeviceAdminReceiver

Exception occurred while executing 'set-profile-owner':
java.lang.IllegalArgumentException: Unknown admin: ComponentInfo{com.oasisfeng.island.fdroid/com.oasisfeng.island.fdroid.IslandDeviceAdminReceiver}
        at com.android.server.devicepolicy.DevicePolicyManagerService.findAdmin(DevicePolicyManagerService.java:3304)
        at com.android.server.devicepolicy.DevicePolicyManagerService.setActiveAdmin(DevicePolicyManagerService.java:3885)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetProfileOwner(DevicePolicyManagerServiceShellCommand.java:283)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:91)
        at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
        at android.os.ShellCommand.exec(ShellCommand.java:38)
        at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:10707)
        at android.os.Binder.shellCommand(Binder.java:986)
        at android.os.Binder.onTransact(Binder.java:860)
        at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:7615)
        at android.os.Binder.execTransactInternal(Binder.java:1220)
        at android.os.Binder.execTransact(Binder.java:1179)

fdroid ver has different package ID,

dpm set-profile-owner --user 12 com.oasisfeng.island.fdroid/com.oasisfeng.island.IslandDeviceAdminReceiver