Skip to content

Agent crashes when in COSU mode and when system service is used #69

@nemanjanedic

Description

@nemanjanedic

Here is the crash:

08-02 14:59:49.928 26936-26936/org.wso2.iot.agent E/AgentApplication: UncaughtExceptionHandler got an exception
                                                                      java.lang.RuntimeException: Unable to start receiver org.wso2.iot.agent.events.listeners.KioskAppInstallationListener: java.lang.SecurityException: No active admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver}
                                                                          at android.app.ActivityThread.handleReceiver(ActivityThread.java:2616)
                                                                          at android.app.ActivityThread.access$1700(ActivityThread.java:151)
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                          at android.os.Looper.loop(Looper.java:135)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5258)
                                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                                          at java.lang.reflect.Method.invoke(Method.java:372)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
                                                                       Caused by: java.lang.SecurityException: No active admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver}
                                                                          at android.os.Parcel.readException(Parcel.java:1546)
                                                                          at android.os.Parcel.readException(Parcel.java:1499)
                                                                          at android.app.admin.IDevicePolicyManager$Stub$Proxy.setLockTaskPackages(IDevicePolicyManager.java:4212)
                                                                          at android.app.admin.DevicePolicyManager.setLockTaskPackages(DevicePolicyManager.java:3304)
                                                                          at org.wso2.iot.agent.events.listeners.KioskAppInstallationListener.onReceive(KioskAppInstallationListener.java:102)
                                                                          at android.app.ActivityThread.handleReceiver(ActivityThread.java:2609)
                                                                          at android.app.ActivityThread.access$1700(ActivityThread.java:151) 
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380) 
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                          at android.os.Looper.loop(Looper.java:135) 
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5258) 
                                                                          at java.lang.reflect.Method.invoke(Native Method) 
                                                                          at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 

I've noticed that there were no prompts to active device administration for the agent. The system service has been installed as a system application (/system/priv-app). Hope this helps.

I'm testing this on Android 5.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions