island icon indicating copy to clipboard operation
island copied to clipboard

Issue when running dpm set-profile-owner on android 14

Open brizaldi opened this issue 1 year ago • 4 comments

Running this command on android 14 returns an IllegalArgumentException error, seems like on the newest version of dpm the --name argument for set-profile-owner was removed.

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

output:

java.lang.IllegalArgumentException: Unknown option: --name
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.parseArgs(DevicePolicyManagerServiceShellCommand.java:358)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetProfileOwner(DevicePolicyManagerServiceShellCommand.java:284)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:89)
        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:11422)
        at android.os.Binder.shellCommand(Binder.java:1071)
        at android.os.Binder.onTransact(Binder.java:888)
        at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6340)
        at android.os.Binder.execTransactInternal(Binder.java:1337)
        at android.os.Binder.execTransact(Binder.java:1278)

brizaldi avatar Jan 14 '24 03:01 brizaldi

Facing the same issue. It's still there based on the adb documentation, though.

https://developer.android.com/tools/adb#dpm

G0tta-git-git avatar Mar 13 '24 10:03 G0tta-git-git

apparently it works despite the error message. GenesisOS A14.

mabequinho avatar Apr 28 '24 15:04 mabequinho

the same issue, but it's actually executed already though, just restart island in your phone and you'll find it's managed now.

955whynot avatar May 03 '24 10:05 955whynot

I got the same error message, and it did NOT work for me. I restarted island and it's not Managed Mainland...

I did get it working by removing --name Mainland from the command though.

Enabling Managed Mainland removes Developer Options???? Choices choices... I need dev options and wireless debugging for adb

SteveTinkers avatar May 09 '24 12:05 SteveTinkers