oasisfeng / island

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

Manual setup for Island in “God mode” failed in Sharp Aquos R (soft bank 605sh) #76

Open naore opened 4 years ago

naore commented 4 years ago

I did Manual setup for Island as the setup guide firstly, after step 3 "pm install -r --user ...", I found the command line stuck. I left my mac for one night and found it is still stuck. Then I canceled the command and did Manual setup for Island in “God mode”, and get error at step 4. The error message is

java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device at android.os.Parcel.createException(Parcel.java:1958) at android.os.Parcel.readException(Parcel.java:1918) at android.os.Parcel.readException(Parcel.java:1868) at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:6338) at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:176) at com.android.commands.dpm.Dpm.onRun(Dpm.java:106) at com.android.internal.os.BaseCommand.run(BaseCommand.java:54) 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:340) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:8488) at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:7778) at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:1305) at android.os.Binder.execTransact(Binder.java:731).

I run dumpsys account|grep -A 3 Accounts:, just get

` Accounts: 1 Account {name=Phone, type=jp.co.sharp}

AccountId, Action_Type, timestamp, UID, TableName, Key ` ,

and no more.

I have tried reset the phone, just get the same result. May you help me, please?

PS: This phone cannot get into recovery, so I can just wipe personal data and apps' data.

JohnDoe-JohnDoe commented 2 years ago

Hi, I've got a very similar problem on a Xperia XZ1c. Did you manage to get it working?

Thanks

illuminatich commented 2 years ago

try this: $ pm disable-user --user 0 jp.co.sharp then active god mode: $ dpm set-profile-owner --user 0 --name Mainland com.oasisfeng.island/.IslandDeviceAdminReceiver then this $ pm enable jp.co.sharp

win951126 commented 1 year ago

try this: $ pm disable-user --user 0 jp.co.sharp then active god mode: $ dpm set-profile-owner --user 0 --name Mainland com.oasisfeng.island/.IslandDeviceAdminReceiver then this $ pm enable jp.co.sharp

I'm having a similar issue, my phone is Moto Z2 Force (Nash), Verizon Edition, and I'm getting a prompt like this: 1|nash:/ $ dumpsys account|grep -A 3 Accounts: Accounts: 1 Account {name=Phone, type=com.verizon.phone}

Here's how it was solved:

In the adb shell, enter this command: dumpsys account

Then l get output with the following (there are a lot of outputs, which can be pasted elsewhere to search): ServiceInfo: AuthenticatorDescription {type=com.verizon.phone}, ComponentInfo{com.motorola.android.buacloudcontactadapter/com.motorola.android.buacloudcontactadapter.BuaNonProvAuthService}, uid 10088

On the line with "type=com.verizon.phone", You see that the corresponding uid is 10088.

Then I use App Manager ([https://f-droid.org/en/packages/io.github.muntashirakon.AppManager/]) or other methods to find the corresponding app. Then continue to use the method provided by illuminatich and then it will be solved.