Android Question Wipe Device

Philip Prins

Active Member
Licensed User
Longtime User
Hello all,

I have a problem with wipe device, i get an error :
B4X:
Log("WipeData")
    Dim r As Reflector
    r.Target = admin
    r.Target = r.GetField("dm")
    r.RunMethod2("wipeData", 0, "java.lang.int") 'this will wipe your device. Be careful!

The error;
B4X:
WipeData
starter_wipereceived (java line: 1765)
java.lang.SecurityException: No active admin owned by uid 10062 for policy #4
    at android.os.Parcel.readException(Parcel.java:1599)
    at android.os.Parcel.readException(Parcel.java:1552)
    at android.app.admin.IDevicePolicyManager$Stub$Proxy.wipeData(IDevicePolicyManager.java:2992)
    at android.app.admin.DevicePolicyManager.wipeData(DevicePolicyManager.java:1898)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod(Reflection.java:216)
    at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod2(Reflection.java:817)
    at dmonitor.telo.starter._wipereceived(starter.java:1765)
    at dmonitor.telo.starter._almreceived(starter.java:244)
    at dmonitor.telo.starter._client_messagearrived(starter.java:436)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at anywheresoftware.b4a.BA$2.run(BA.java:365)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:207)
    at android.app.ActivityThread.main(ActivityThread.java:5728)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

I made the app device admin with ADB.

Any ideas?
 

Philip Prins

Active Member
Licensed User
Longtime User
Hello all,

I have a problem with wipe device, i get an error :
B4X:
Log("WipeData")
    Dim r As Reflector
    r.Target = admin
    r.Target = r.GetField("dm")
    r.RunMethod2("wipeData", 0, "java.lang.int") 'this will wipe your device. Be careful!

The error;
B4X:
WipeData
starter_wipereceived (java line: 1765)
java.lang.SecurityException: No active admin owned by uid 10062 for policy #4
    at android.os.Parcel.readException(Parcel.java:1599)
    at android.os.Parcel.readException(Parcel.java:1552)
    at android.app.admin.IDevicePolicyManager$Stub$Proxy.wipeData(IDevicePolicyManager.java:2992)
    at android.app.admin.DevicePolicyManager.wipeData(DevicePolicyManager.java:1898)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod(Reflection.java:216)
    at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod2(Reflection.java:817)
    at dmonitor.telo.starter._wipereceived(starter.java:1765)
    at dmonitor.telo.starter._almreceived(starter.java:244)
    at dmonitor.telo.starter._client_messagearrived(starter.java:436)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
    at anywheresoftware.b4a.BA$2.run(BA.java:365)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:207)
    at android.app.ActivityThread.main(ActivityThread.java:5728)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

I made the app device admin with ADB.

Any ideas?
Solved I had to reasign admin thru adb
 
Upvote 0
Top