aistra0528 / Hail

Disable / Hide / Suspend / Uninstall Android apps without root.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URGENT: Unable to remove profile owner

opened this issue · comments

By mistake, set profile owner for the Hail app by following command

adb shell dpm unset-profile-owner com.aistra.hail/.receiver.DeviceAdminReceiver

Now unable to remove it, nor i can set it device owner.

  • Tried set device owner
$ adb shell dpm set-device-owner --user 0 com.aistra.hail/.receiver.DeviceAdminReceiver                                                                             
java.lang.IllegalStateException: Trying to set the device owner, but the user already has a profile owner.
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2394)
	at android.os.Parcel.createException(Parcel.java:2370)
	at android.os.Parcel.readException(Parcel.java:2353)
	at android.os.Parcel.readException(Parcel.java:2295)
	at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:9468)
	at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:203)
	at com.android.commands.dpm.Dpm.onRun(Dpm.java:115)
	at com.android.internal.os.BaseCommand.run(BaseCommand.java:60)
	at com.android.commands.dpm.Dpm.main(Dpm.java:41)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:409)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:10833)
	at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:9732)
	at android.app.admin.IDevicePolicyManager$Stub.onTransact$setDeviceOwner$(IDevicePolicyManager.java:18153)
	at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:4057)
	at android.os.Binder.execTransactInternal(Binder.java:1190)
  • Tried remove active admin
adb shell dpm remove-active-admin com.aistra.hail/.receiver.DeviceAdminReceiver                                                                                 
java.lang.SecurityException: Attempt to remove non-test admin ComponentInfo{com.aistra.hail/com.aistra.hail.receiver.DeviceAdminReceiver} 0
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2386)
	at android.os.Parcel.createException(Parcel.java:2370)
	at android.os.Parcel.readException(Parcel.java:2353)
	at android.os.Parcel.readException(Parcel.java:2295)
	at android.app.admin.IDevicePolicyManager$Stub$Proxy.forceRemoveActiveAdmin(IDevicePolicyManager.java:9279)
	at com.android.commands.dpm.Dpm.runRemoveActiveAdmin(Dpm.java:222)
	at com.android.commands.dpm.Dpm.onRun(Dpm.java:121)
	at com.android.internal.os.BaseCommand.run(BaseCommand.java:60)
	at com.android.commands.dpm.Dpm.main(Dpm.java:41)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:409)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.devicepolicy.DevicePolicyManagerService.lambda$forceRemoveActiveAdmin$6$DevicePolicyManagerService(DevicePolicyManagerService.java:5196)
	at com.android.server.devicepolicy.-$$Lambda$DevicePolicyManagerService$kMbNyFCPm-YTFbzEmBLvLJbyLPM.runOrThrow(Unknown Source:6)
	at android.os.Binder.withCleanCallingIdentity(Binder.java:407)
	at com.android.server.devicepolicy.DevicePolicyManagerService$Injector.binderWithCleanCallingIdentity(DevicePolicyManagerService.java:2635)
	at com.android.server.devicepolicy.DevicePolicyManagerService.forceRemoveActiveAdmin(DevicePolicyManagerService.java:5193)

Please help

@aistra0528 for the time being, can you please build the release apk for me with android:testOnly="true" 😅
Reference