BinTianqi / OwnDroid

Own your Android! 使用Device owner管理你的安卓设备。Manage your device with Device owner privilege
https://owndroid.pages.dev
GNU General Public License v3.0
398 stars 14 forks source link

Crash on deactivating Profile owner #68

Closed shuvashish76 closed 3 months ago

shuvashish76 commented 3 months ago

Steps to reproduce :

Logs:

FATAL EXCEPTION: main
Process: com.bintianqi.owndroid, PID: 17239
java.lang.SecurityException: No active admin ComponentInfo{com.bintianqi.owndroid/com.bintianqi.owndroid.Receiver}
    at android.os.Parcel.createException(Parcel.java:1950)
    at android.os.Parcel.readException(Parcel.java:1918)
    at android.os.Parcel.readException(Parcel.java:1868)
    at android.app.admin.IDevicePolicyManager$Stub$Proxy.isManagedProfile(IDevicePolicyManager.java:8920)
    at android.app.admin.DevicePolicyManager.isManagedProfile(DevicePolicyManager.java:7974)
    at F0.b.x(SourceFile:1)
    at com.bintianqi.owndroid.F0.l(SourceFile:147)
    at Q.b.d(SourceFile:44)
    at Q.b.l(SourceFile:9)
    at androidx.compose.animation.a.a(SourceFile:1287)
    at G.n.m(SourceFile:51)
    at I.r.M(SourceFile:517)
    at I.r.V(SourceFile:29)
    at androidx.compose.animation.a.d(SourceFile:139)
    at androidx.compose.animation.a.c(SourceFile:310)
    at x1.U.U(SourceFile:468)
    at x1.X.k(SourceFile:22)
    at Q.b.e(SourceFile:44)
    at Q.b.k(SourceFile:9)
    at E.z.m(SourceFile:390)
    at Q.b.m(SourceFile:52)
    at I.r.M(SourceFile:517)
    at I.r.V(SourceFile:29)
    at R.h.f(SourceFile:68)
    at androidx.activity.result.d.q(SourceFile:90)
    at androidx.navigation.compose.o.m(SourceFile:75)
    at Q.b.m(SourceFile:52)
    at I.d.b(SourceFile:150)
    at androidx.activity.result.d.l(SourceFile:51)
    at androidx.navigation.compose.t.k(SourceFile:600)
    at Q.b.e(SourceFile:44)
    at Q.b.k(SourceFile:9)
    at C.y0.l(SourceFile:268)
    at Q.b.d(SourceFile:44)
    at Q.b.l(SourceFile:9)
    at androidx.compose.animation.a.a(SourceFile:1287)
    at r.c.m(SourceFile:273)
    at Q.b.m(SourceFile:52)
    at androidx.activity.result.d.i(SourceFile:927)
    at androidx.activity.result.d.n(SourceFile:1782)
    at androidx.activity.result.d.m(SourceFile:47)
    at x1.g1.l(SourceFile:305)
    at Q.b.d(SourceFile:44)
    at G.v1.m(SourceFile:158)
    at I.r.M(SourceFile:517)
    at I.r.T(SourceFile:137)
    at I.r.q(SourceFile:161)
    at I.r.K(SourceFile:29)
    at I.x.v(SourceFile:35)
    at I.z0.t(SourceFile:123)
    at I.x0.n(SourceFile:513)
    at I.D.doFrame(SourceFile:14)
    at androidx.compose.ui.platform.V.doFrame(SourceFile:48)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
    at android.view.Choreographer.doCallbacks(Choreographer.java:761)
    at android.view.Choreographer.doFrame(Choreographer.java:693)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6718)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    Suppressed: d2.f: [I.m0@5b3d63c, androidx.compose.ui.platform.u0@740afc5, i0{Cancelling}@3770d1a, W@bcab04b]
Caused by: android.os.RemoteException: Remote stack trace:
    at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminWithPolicyForUidLocked(DevicePolicyManagerService.java:2656)
    at com.android.server.devicepolicy.DevicePolicyManagerService.getActiveAdminForCallerLocked(DevicePolicyManagerService.java:2593)
    at com.android.server.devicepolicy.DevicePolicyManagerService.enforceProfileOrDeviceOwner(DevicePolicyManagerService.java:5197)
    at com.android.server.devicepolicy.DevicePolicyManagerService.isManagedProfile(DevicePolicyManagerService.java:11182)
    at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:3237)

Device details:

BinTianqi commented 3 months ago

This bug should be fixed in the latest CI version. Download here.

If this issue persist, please download the latest debug CI version, reproduce it and send log to here. (Code of release version is obfuscated and I can't locate the issue from log)