Code Monkey home page Code Monkey logo

cdmf-agent-android's Introduction

Welcome to WSO2 Android Agent for WSO2 IoT Server

The WSO2 Device Management Agent allows you to authenticate and enroll your device in WSO2 IoT Server. It also offers a complete and secure enterprise mobility management (EMM/MDM) solution that aims to address mobile computing challenges faced by enterprises today. It helps organizations deal with both corporate owned, personally enabled (COPE) and employee-owned devices with the bring your own device (BYOD) concept.

WSO2 Device Management Agent Key Features

  • Supports app management
  • Device location tracking
  • Retrieving device info
  • Changing lock code
  • Restricting camera
  • OTA WiFi configuration
  • Enterprise WIPE
  • Configuring encryption settings
  • Pass code policy configuration and clear pass code policy
  • Device master reset
  • Mute device
  • Ring device
  • Send messages to device
  • Install/uninstall store and enterprise applications
  • Retrieve apps installed on the device
  • Install Web clips on the device
  • Support FCM/LOCAL connectivity modes
  • App Catalog app to browse the store.
  • Support for custom alerts.
  • Advanced WiFi Profiles.
  • Improved support for OEMs

Find the online documentation at : https://docs.wso2.com/display/IoTS310/Android+Device.

Contact us

WSO2 Android Agent developers can be contacted via the mailing lists:

cdmf-agent-android's People

Contributors

boxidilshan avatar charithag avatar chaturadilan avatar dilee avatar dulichan avatar gayany avatar gdlmadushanka avatar geethkokila avatar harshanl avatar hasuniea avatar inoshperera avatar janakamarasena avatar kamidu avatar kasundananjaya avatar lakshmanudayakantha avatar madawas avatar madhawap avatar manojgunayadev avatar megala21 avatar milanperera avatar n-jay avatar nirothipan avatar pasindujw avatar prabathabey avatar rasika avatar ruwany avatar sameeragunarathne avatar shagihan avatar vasvlad avatar warunalakshitha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cdmf-agent-android's Issues

IdentityProxy is not thread safe ?

Hi,
I noticed that IdProxy can be called from APIController.invokeAPI in different contexts (threads).
Setting requestcode for singleton IdentityProxy is not thread safe : IdentityProxy.getInstance().setRequestCode(requestCode);

Please tell us if assigning a value to this requestCode attribute in a multithreaded context could or not produce an inconsistent result?

Error building the apk with android studio

Description:
Error at builing the apk

Affected Product Version:
cdmf-agent-android-2.0.0

OS, DB, other environment details and versions:
Windows 10, Android Studio 3.0.1, cdmf-agent-android-2.0.0, SDK Platform 17, 22, 25, Build Tools 27.0.3, 23.0.3, 26.0.2 ,22.0.1

Steps to reproduce:

  • Open an existing android project (Selected cdmf-agent-android-2.0.0 folder unzipped)
  • Navigated to client/client/src/main
  • Edited AndroidManifest.xml by commenting
<!--    <uses-permission android:name="android.permission.ACCESS_GPS" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permisssion.ACCESS_COARSE_LOCATION" /> -->
  • Saved all
  • Build -> Generate signed apk
  • Start building and got the error:
    Error:Android Source Generator: Error: Can't find bundle for base name messages.AndroidJpsBundle, locale es_ES java.util.MissingResourceException: Can't find bundle for base name messages.AndroidJpsBundle, locale es_ES at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387) at java.util.ResourceBundle.getBundle(ResourceBundle.java:773) at org.jetbrains.jps.android.AndroidJpsBundle.getBundle(AndroidJpsBundle.java:22) at org.jetbrains.jps.android.AndroidJpsBundle.message(AndroidJpsBundle.java:32) at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.computeModuleDatas(AndroidSourceGeneratingBuilder.java:1276) at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.doBuild(AndroidSourceGeneratingBuilder.java:130) at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.build(AndroidSourceGeneratingBuilder.java:114) at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1263) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:940) at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1012) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:903) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:736) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:384) at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192) at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236) at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Auth failed against WSO2 EMM 2.2.0 server

My goal is to use the EMM agent with GCM enabled (https://docs.wso2.com/display/EMM220/Configuring+WSO2+EMM+with+Firebase+Cloud+Messaging, with hidden API android.jar and so on).

I start from commit 9dce314 (v2.0.0 release). But the compiled APK failed to auth (401 returned). Then I inspecting the HTTP request and found that API_APPLICATION_CONTEXT in utils/Constants didn't same as the original APK that come from WSO2 EMM Download link. The right one is dynamic-client-web.

After changing API_APPLICATION_CONTEXT to dynamic-client-web, the compiled APK still failed to auth with the server because of different payload content.

This is from original APK.
screen shot 2017-02-06 at 2 23 44 pm

And this is from the new compiled APK.
screen shot 2017-02-06 at 2 23 55 pm

So, I thought the v2.0.0 tag has different commit with the original one. Which is the commit that matched with the released APK from download link in http://wso2.com/products/enterprise-mobility-manager/ ?

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

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.

Where are the server notifications being hanled?

Hi, I am trying to go through the source code of android agent. Can you please help me with the part of code (the classes) which actually receive the notification from the server and implement them?

How to handle the failiure during continuous installation (pushing apk) from server?

Iam trying to push apk files one by one from the server to mobile device. Consider Iam trying to push 4 apk files one by one. In this scenario, only 2 or 3 applications are getting installed.

Furthermore, if i try to push the apk file which is more than 250mb size then sometimes the file is getting installed and sometimes download has interrupted.

Please can someone help me to solve this issue. Thanks in advance.

Wso2 iot 3.2.0 server and Agent 3.1.30 - The client side is giving an error after defining the policy

Description:
The client side(Android Agent) is giving an error after defining the policy.
I have tried all of the following operations.

  1. adb shell dpm set-active-admin org.wso2.iot.system.service/org.wso2.iot.system.service.ServiceDeviceAdminReceiver
  2. adb shell dpm set-active-admin org.wso2.iot.agent/.services.AgentDeviceAdminReceiver
  3. adb shell dpm set-device-owner org.wso2.iot.system.service/org.wso2.iot.system.service.ServiceDeviceAdminReceiver

Affected Product Version: Wso2 İot Server 3.2.0 & Agent 3.1.30

OS, DB, other environment details and versions: Ubuntu 14.04 TLS

Error :

> 02-15 09:03:04.083 12499-12521/org.wso2.iot.agent E/Volley: [1559] NetworkDispatcher.run: Unhandled exception java.lang.SecurityException: Admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver} does not own the profile
>                                                             java.lang.SecurityException: Admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver} does not own the profile
>                                                                 at android.os.Parcel.readException(Parcel.java:1620)
>                                                                 at android.os.Parcel.readException(Parcel.java:1573)
>                                                                 at android.app.admin.IDevicePolicyManager$Stub$Proxy.setUserRestriction(IDevicePolicyManager.java:6636)
>                                                                 at android.app.admin.DevicePolicyManager.clearUserRestriction(DevicePolicyManager.java:4756)
>                                                                 at org.wso2.iot.agent.services.operation.OperationManagerDeviceOwner.handleOwnersRestriction(OperationManagerDeviceOwner.java:663)
>                                                                 at org.wso2.iot.agent.services.operation.OperationManagerDeviceOwner.handleDeviceOwnerRestriction(OperationManagerDeviceOwner.java:672)
>                                                                 at org.wso2.iot.agent.services.operation.OperationProcessor.doTask(OperationProcessor.java:216)
>                                                                 at org.wso2.iot.agent.services.operation.OperationProcessor.setPolicyBundle(OperationProcessor.java:279)
>                                                                 at org.wso2.iot.agent.services.operation.OperationProcessor.doTask(OperationProcessor.java:144)
>                                                                 at org.wso2.iot.agent.services.MessageProcessor.performOperation(MessageProcessor.java:147)
>                                                                 at org.wso2.iot.agent.services.MessageProcessor.onReceiveAPIResult(MessageProcessor.java:507)
>                                                                 at org.wso2.iot.agent.proxy.APIController$9.parseNetworkResponse(APIController.java:383)
>                                                                 at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:123)
> 02-15 09:03:04.083 12499-12499/org.wso2.iot.agent E/APIController: com.android.volley.VolleyError: java.lang.SecurityException: Admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver} does not own the profile

If the user credentials are wrong, the "Authenticating" dialog never disapears

When trying to enroll a device with the IOTS 3.0.0, if a user does not enter correct credentials, the "Authenticating" dialog does not disappear. In the logs, there is a Volley error that the /api-application-registration/register returns 401. This should be a normal case when the credentials are wrong but the app does not handle that correctly.

Can't sign in in App Catalog

Hello.

I have uploaded my own android applications in publisher page and now I want to install them by my BYOD and COPE devices.

When I open app catalog I have enetered this address

 my_ip:9443

When I try to login as admin it throws me this error:

DynamicClientManager: com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

I dont understand this error. Do I need to add some kind of additional config into my wso2-iots?

Authentication Failure from android agent after 1-2 days of enrollment

After 1-2 days of enrolling the android device, the android agent shows Authentication Failure. Would it be a good idea to increase the RefreshTokenValidityPeriod value as mentioned in #109 and workaround this issue? So then that means that we'd have to give it a very high value which makes the RenewRefreshToken provision useless.

version: wsiot 3.1.0

I've also tried changing the RefreshTokenValidityPeriod value to 10,00,000 and restarted iots and have rebooted the client - but the issue persists.
Setting RenewRefreshTokenForRefreshGrant to false also didn't work for me.

Please find below my client logs for the same:

12-03 09:28:49.960 8526 8526 E AgentApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.activities.AuthenticationActivity}: java.lang.StringIndexOutOfBoundsException: length=5; regionStart=0; regionLength=-1
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.ActivityThread.-wrap12(ActivityThread.java)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.os.Looper.loop(Looper.java:154)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.ActivityThread.main(ActivityThread.java:6121)
12-03 09:28:49.960 8526 8526 E AgentApplication: at java.lang.reflect.Method.invoke(Native Method)
12-03 09:28:49.960 8526 8526 E AgentApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
12-03 09:28:49.960 8526 8526 E AgentApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
12-03 09:28:49.960 8526 8526 E AgentApplication: Caused by: java.lang.StringIndexOutOfBoundsException: length=5; regionStart=0; regionLength=-1
12-03 09:28:49.960 8526 8526 E AgentApplication: at java.lang.String.substring(String.java:1931)
12-03 09:28:49.960 8526 8526 E AgentApplication: at org.wso2.iot.agent.activities.AuthenticationActivity.onCreate(AuthenticationActivity.java:160)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.Activity.performCreate(Activity.java:6723)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
12-03 09:28:49.960 8526 8526 E AgentApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
12-03 09:28:49.960 8526 8526 E AgentApplication: ... 9 more
12-03 09:28:49.961 8526 8526 I art : System.exit called, status: 2
12-03 09:28:49.961 8526 8526 I AndroidRuntime: VM exiting with result code 2, cleanup skipped.
12-03 09:28:50.073 3226 3388 I ActivityManager: Process org.wso2.iot.agent (pid 8526) has died

Remote control feature is not working when the device is enrolled with mutual-ssl

Description:
The device is enrolled to the IoT server using mutual-ssl. After that tried to create a remote session in order to share the device screen, to execute remote adb command and to view logcat. Under mutual-ssl these features aren't working.

Affected Product Version:
IoT Server v3.3.1 and Tested on Android Agent v3.1.34

Steps to reproduce:

  1. Enrolled an Android device to the IoT Server v3.3.1 using mutual-ssl
  2. Go to the 'DEVICE DETAILS' page and click on 'Remote Session'
  3. Then click on 'Connect to Device'

device operations issues (wipe, reboot, hard lock)

hello,

tested wso2 iot 3.1.0 and agent 3.1.21
in BYOD and COPE mode.

Factory reset (wipe), hard lock and reboot does not work.
tested with apk in debug and debugCope but no logs through adb logcat.

all other operations work.
thanks for help.

error after login into WSO2 Agent

Description:
the routing process is not performed after performing the agent login process. I get the following error :
** Error **
09:54:46.711 6359-6359/org.wso2.iot.agent E/WindowManager: android.view.WindowLeaked: Activity org.wso2.iot.agent.activities.AlreadyRegisteredActivity has leaked window DecorView@81f0860[AlreadyRegisteredActivity] that was originally added here at android.view.ViewRootImpl.(ViewRootImpl.java:572) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:97) at android.app.Dialog.show(Dialog.java:419) at android.app.AlertDialog$Builder.show(AlertDialog.java:1131) at org.wso2.iot.agent.utils.CommonDialogUtils.getAlertDialogWithOneButtonAndTitle(CommonDialogUtils.java:138) at org.wso2.iot.agent.activities.AlreadyRegisteredActivity.onCreate(AlreadyRegisteredActivity.java:217) at android.app.Activity.performCreate(Activity.java:6942) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2880) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Null Pointer exception occurs when installing application through the server

Description:
Null Pointer exception occurs when installing application.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer <ACCESS-TOKEN>' -d '{
  "deviceIDs": [
    "1567393930303"
  ],
  "operation": {
    "appIdentifier": "<APP-IDENTIFIER>",
    "type": "enterprise",
    "url": "<HOST>/helloworld.apk"
  }
}' 'https://<HOST>:<PORT>/api/device-mgt/android/v1.0/admin/devices/install-application'
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
                                                          at org.wso2.iot.agent.events.listeners.ApplicationStateListener.applyEnforcement(ApplicationStateListener.java:152)
                                                          at org.wso2.iot.agent.events.listeners.ApplicationStateListener.onReceive(ApplicationStateListener.java:94)
                                                          at android.app.ActivityThread.handleReceiver(ActivityThread.java:2610)
                                                          at android.app.ActivityThread.access$1700(ActivityThread.java:152) 
                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:138

Affected Product Version:
3.1.0-Update5

OS, DB, other environment details and versions:
Ubuntu 16.04, H2, Single IOT node

Steps to reproduce:
Enroll an android device.
Install an application

Error in login

I have deployed the WSO2 IOT server on my machine using Docker.
When I tried to log in from compatible client version got following error

Enrollment failed, please contact administrator.
Code: 500

org.wso2.iot.agent D/DynamicClientManager: com.android.volley.NoConnectionError: java.io.IOException: unexpected end of stream on Connection{LOCAL_IP:9443, proxy=DIRECT hostAddress=LOCAL_IP cipherSuite=none protocol=http/1.1} (recycle count=0)

MacOs 10.14, Docker 18.06.1-ce-mac73
WSO IOT server version 3.2.0, Client version 3.1.31

How can I resolve this issue?
Please help.

App compiled in "release" mode skips work profile creation

Description:
When compiling the Android Agent as a “Release” build type the app starts the disclaimer activity and then skips the work profile creation activity to go straight to Enrollment activity during usage. This seems to be caused by a faulty else-if construction from what we’ve seen. There doesn’t seem to be an easy workaround without messing up some of the activity code.

Are you aware of this issue or is it intended to not be able to create a work profile in release build?

Suggested Labels:
work profile, agent, build type

Affected Product Version:
3.1.21

OS, DB, other environment details and versions:
3.1.0 IoT server

Steps to reproduce:
Build app as release build type
Install on phone
Try to enroll a phone and see it skips the work profile creation.

Using agent as device owner

Description:
I am failing to install agent as device owner as described in
https://docs.wso2.com/display/EMM330/Device+Ownership+Application

Device management shows device as "Removed". I am unable to login to agent again.

Affected Product Version:
3.2.0.

OS, DB, other environment details and versions:
Server side Ubuntu, Agent on Android 5.1.1

Might be relevant: This Android doesn't have micro USB port so I issued adb through TCP/IP.

Steps to reproduce:
As described in
https://docs.wso2.com/display/EMM330/Device+Ownership+Application
using "A command issued through the Android Debug Bridge (adb)."

I had agent running, removed Google account and then issued adb to get ownership.

...\AppData\Local\Android\Sdk\platform-tools>adb shell dpm set-device-owner org.wso2.iot.agent/.services.AgentDeviceAdminReceiver
Success: Device owner set to package org.wso2.iot.agent
Active admin set to component {org.wso2.iot.agent/org.wso2.iot.agent.services.Ag
entDeviceAdminReceiver}

App catalog stuck on Retrieving application information

Hello ,
Please i need a help , i have a problem with wso2 app catalog ( version 2.0.0 ) , with iot server 3.0.0 , i have android 6.0 on my phone, i install wso2 agent on my phone , it's connect to the server successfully ( i can find it on the devicemgt ) , i can send message,ring . now i want to install the catalog , i build it with the same certificate that i'am already use to build wso2 agent . the result , app catalog stuck on Retrieving application information ( i noticed something , app catalog dont ask me for the ip address or user and password ) . can you please help me ? ( screen shot attached )

screenshot_20170724-180402

Shared UserID in IoT

Hi, I have found that there is no

    android:sharedUserId="android.uid.system"

in IoT system-service application unlike wso2-emm system service application. Will it still be able to access the system permissionsn just by signing it with firmware key?

Also app-catalog of the cdmf agent android applications doesnt have shareduserID with client. They cannot exchange information, can they? Why are the shareduserID's removed?

IP / hostname to put when registering a device

Hi,

I access my EMM using https://192.168.100.162:9443/emm

When registering a device using the agent, I put 192.168.100.162 but while registering, the agent throws "Server is unavailable". What should I put as the address when registering a device?

These are information from adblog

V/ServerUtils(19824): emm.mycorpcloud.bizPosting '{username=theadmin, password=theadmin}' to http://192.168.100.162:9443/emm/api/devices/clientkey
V/ServerUtils(19824): Posting 'username=theadmin&password=theadmin' to http://192.168.100.162:9443/emm/api/devices/clientkey

GEOFENCING LOCATION

Description:
The buttons on the top of the map do not appear. Example : (Add Geo Fence Exit Alert , Add Geo Fence Enter Alert , Add Stationary Alert , Set Speed Alert ). Please help me.

Affected Product Version: Wso2 3.1.0 / Agent 3.1.18

OS, DB, other environment details and versions: Ubuntu 16.0.4 TLS

screenshot from 2018-02-04 23-47-12

Cannot compile using Android Studio 2.1.3

Just clone the source tree and rebuild the project on Android Studio 2.1.3. But it prompts for the following error:

C:\shared\source\product-mdm\modules\mobile-agents\android\client\client\src\main\java\org\wso2\emm\agent\services\NetworkConnectedReceiver.java
Error:(42, 28) error: cannot find symbol method startServiceAsUser(Intent,UserHandle)
C:\shared\source\product-mdm\modules\mobile-agents\android\client\client\src\main\java\org\wso2\emm\agent\utils\CommonUtils.java
Error:(432, 11) error: cannot find symbol method startServiceAsUser(Intent,UserHandle)
Error:(445, 11) error: cannot find symbol method startServiceAsUser(Intent,UserHandle)
Note: Some input files use or override a deprecated API.

Any idea?

Configuring Android for HTTPS Communication

Description:
You have specified the Sdk version as 23 and 16. However, the sdk version of your project is 25. To compile the progeny we have to get our sdk version to 25.

**Affected Product Version: 3.1.0 Update 11 Agent 3.1.18

**OS, DB, other environment details and versions: Ubuntu 16.0.4 TLS , Jdk 1.8.0_144
Sdk Version 23 and 16 // BuildToolsVersion 22.0.1
screenshot from 2018-02-04 17-23-54
Your Project Sdk 25 ?? // BuildToolsVersion 25.0.3 ??????
screenshot from 2018-02-04 17-25-10

Restrictions are not being enforced

I have system service app installed and it is the device owner. I am also able to do the silent install of apps, wipe. But I am unable to enforce restrictions on the device except for the camera. Is there anything I am missing to be configured ? any of the restrictions like screenshot disabling, bluetooth, wifi, vpn mobile network etc configurations does not work.

With system app as device owner, I get the following log:

06-21 13:58:54.053 11499-12787/org.wso2.iot.agent E/Volley: [714] NetworkDispatcher.run: Unhandled exception java.lang.SecurityException: Admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver} does not own the device
                                                    java.lang.SecurityException: Admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver} does not own the device
                                                        at android.os.Parcel.readException(Parcel.java:1689)
                                                        at android.os.Parcel.readException(Parcel.java:1641)
                                                        at android.app.admin.IDevicePolicyManager$Stub$Proxy.setAutoTimeRequired(IDevicePolicyManager.java:6759)
                                                        at android.app.admin.DevicePolicyManager.setAutoTimeRequired(DevicePolicyManager.java:3377)
                                                        at org.wso2.iot.agent.services.operation.OperationManagerDeviceOwner.setAutoTimeRequired(OperationManagerDeviceOwner.java:681)
                                                        at org.wso2.iot.agent.services.operation.OperationProcessor.doTask(OperationProcessor.java:219)
                                                        at org.wso2.iot.agent.services.operation.OperationProcessor.setPolicyBundle(OperationProcessor.java:267)
                                                        at org.wso2.iot.agent.services.operation.OperationProcessor.doTask(OperationProcessor.java:125)
                                                        at org.wso2.iot.agent.services.MessageProcessor.performOperation(MessageProcessor.java:130)
                                                        at org.wso2.iot.agent.services.MessageProcessor.onReceiveAPIResult(MessageProcessor.java:327)
                                                        at org.wso2.iot.agent.proxy.APIController$9.parseNetworkResponse(APIController.java:383)
                                                        at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:123)
06-21 13:58:54.054 11499-11499/org.wso2.iot.agent E/APIController: com.android.volley.VolleyError: java.lang.SecurityException: Admin ComponentInfo{org.wso2.iot.agent/org.wso2.iot.agent.services.AgentDeviceAdminReceiver} does not own the device

It says the Agent app is not a device owner, But if I make Agent app a device owner, it still doesnt work. It executes OperationManagerOlderSdk as there is no check for device owner of Agent app in org.wso2.iot.agent.services.operation.OperationManagerFactory. What can be done to make all the restrictions work?

Wrong SSL handling in agent

SSL certificates that are issued from SSL authorities must be added to the agent keystore and this becomes an issue when the certificate expires, the agent looses communication. To fix this the server must present proper SSL chain and the client must not depend on the internal keystore.

It is not working in Version 2.0.1

Emm agent android was working in version 1.1.0. We have updated the source to version 2.0.1. We are unable to login after updating the source code. Can you any please help me to solve this issue?

Invalid operation code received: workprofile

Description:
When a policy with work profile restrictions (In this case system apps that have to be enabled in the work profile) is enabled the android error shows "Invalid operation code received: work profile"

We took some time digging through the latest android release of the wso2 iot server android agent and found that this functionality is only 50% built.
There is no revoke code for this policy so once the work profile restrictions have been pushed to the devices they can never be revoke.
When is this functionality supposed to be finished?

Affected Product Version:
3.1.0 update 4 and latest android agent release.

Steps to reproduce:
Push work profile restrictions to phone
Check ADB log for revoke errors.

The screen unpins after ring operation - COSU mode

The device was in the COSU mode and I tried the following operations:

  • Installed an app - the app installed on top of the pinned screen - this is correct.

  • Device ring operation - The device started ringing and the pop-up message saying the device is ringing came from the server.

    • I clicked OK.
    • Then the screen unpinned and I was able to use it as a normal device.
    • When I checked the device operations log. It showed that all operations after the screen was unpinned was in the pending state for a long time.

Error while trying to build the client app

Hi,

I'm trying to setup a client with the system service. I'm getting a build errror when trying to build client app. Here is the log:

$ ./gradlew clean assemble
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
nnedic-mbp:client nnedic$ ./gradlew clean assemble
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Already observed package id 'add-ons;addon-google_apis-google-19' in '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19'. Skipping duplicate at '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1'
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Already observed package id 'add-ons;addon-google_apis-google-19' in '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19'. Skipping duplicate at '/Users/nnedic/Library/Android/sdk/add-ons/addon-google_apis-google-19-1'
Incremental java compilation is an incubating feature.
:client:clean
:iDPProxy:clean
:client:preBuild UP-TO-DATE
:client:preDebugBuild UP-TO-DATE
:client:checkDebugManifest
:client:preDebugCopeBuild UP-TO-DATE
:client:preReleaseBuild UP-TO-DATE
:client:preStagingBuild UP-TO-DATE
:client:preStandaloneBuild UP-TO-DATE
:client:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:client:prepareComAndroidSupportAppcompatV72531Library
:client:prepareComAndroidSupportDesign2531Library
:client:preDebugAndroidTestBuild UP-TO-DATE
:client:prepareComAndroidSupportMultidex101Library
:client:prepareComAndroidSupportRecyclerviewV72531Library
:client:prepareComAndroidSupportSupportCompat2531Library
:client:prepareComAndroidSupportSupportCoreUi2531Library
:client:prepareComAndroidSupportSupportCoreUtils2531Library
:client:prepareComAndroidSupportSupportFragment2531Library
:client:prepareComAndroidSupportSupportMediaCompat2531Library
:client:prepareComAndroidSupportSupportV42531Library
:client:prepareComAndroidSupportSupportVectorDrawable2531Library
:client:prepareComAndroidSupportTransition2531Library
:client:prepareComAndroidVolleyVolley100Library
:client:prepareComGoogleAndroidGmsPlayServicesBasement1024Library
:client:prepareComGoogleAndroidGmsPlayServicesTasks1024Library
:client:prepareComGoogleFirebaseFirebaseAnalytics1024Library
:client:prepareComGoogleFirebaseFirebaseAnalyticsImpl1024Library
:client:prepareComGoogleFirebaseFirebaseCommon1024Library
:client:prepareComGoogleFirebaseFirebaseCore1024Library
:client:prepareComGoogleFirebaseFirebaseIid1024Library
:client:prepareComGoogleFirebaseFirebaseMessaging1024Library
:iDPProxy:preBuild UP-TO-DATE
:iDPProxy:preDebugBuild UP-TO-DATE
:iDPProxy:checkDebugManifest
:iDPProxy:preDebugAndroidTestBuild UP-TO-DATE
:iDPProxy:preDebugUnitTestBuild UP-TO-DATE
:iDPProxy:preReleaseBuild UP-TO-DATE
:iDPProxy:preReleaseUnitTestBuild UP-TO-DATE
:iDPProxy:preStagingBuild UP-TO-DATE
:iDPProxy:preStagingUnitTestBuild UP-TO-DATE
:iDPProxy:preStandaloneBuild UP-TO-DATE
:iDPProxy:preStandaloneUnitTestBuild UP-TO-DATE
:iDPProxy:prepareComAndroidVolleyVolley100Library
:iDPProxy:prepareDebugDependencies
:iDPProxy:compileDebugAidl
:iDPProxy:compileDebugNdk UP-TO-DATE
:iDPProxy:compileLint
:iDPProxy:copyDebugLint UP-TO-DATE
:iDPProxy:mergeDebugShaders
:iDPProxy:compileDebugShaders
:iDPProxy:generateDebugAssets
:iDPProxy:mergeDebugAssets
:iDPProxy:mergeDebugProguardFiles
:iDPProxy:packageDebugRenderscript UP-TO-DATE
:iDPProxy:compileDebugRenderscript
:iDPProxy:generateDebugResValues
:iDPProxy:generateDebugResources
:iDPProxy:packageDebugResources
:iDPProxy:processDebugManifest
:iDPProxy:generateDebugBuildConfig
:iDPProxy:mergeDebugResources
:iDPProxy:processDebugResources
:iDPProxy:generateDebugSources
:iDPProxy:incrementalDebugJavaCompilationSafeguard
:iDPProxy:javaPreCompileDebug
:iDPProxy:compileDebugJavaWithJavac
:iDPProxy:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:iDPProxy:processDebugJavaRes UP-TO-DATE
:iDPProxy:transformResourcesWithMergeJavaResForDebug
:iDPProxy:transformClassesAndResourcesWithSyncLibJarsForDebug
:iDPProxy:mergeDebugJniLibFolders
:iDPProxy:transformNativeLibsWithMergeJniLibsForDebug
:iDPProxy:transformNativeLibsWithStripDebugSymbolForDebug
:iDPProxy:transformNativeLibsWithSyncJniLibsForDebug
:iDPProxy:bundleDebug
:client:prepareDebugDependencies
:client:compileDebugAidl
:client:compileDebugRenderscript
:client:generateDebugBuildConfig
:client:generateDebugResValues
:client:generateDebugResources
:client:mergeDebugResources
:client:processDebugManifest
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/AndroidManifest.xml:35:5-68 Warning:
        Element uses-permission#android.permission.READ_LOGS at AndroidManifest.xml:35:5-68 duplicated with element declared at AndroidManifest.xml:31:5-68
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/AndroidManifest.xml:56:5-84 Warning:
        Element uses-permission#android.permission.WAKE_LOCK at AndroidManifest.xml:56:5-84 duplicated with element declared at AndroidManifest.xml:22:5-68
:client:processDebugResources
:client:generateDebugSources
:client:incrementalDebugJavaCompilationSafeguard
:client:javaPreCompileDebug
:client:compileDebugJavaWithJavac
:client:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/api/RuntimeInfo.java:157: error: cannot find symbol
        String filePath = Environment.getLegacyExternalStorageDirectory() + "/logcat.log";
                                     ^
  symbol:   method getLegacyExternalStorageDirectory()
  location: class Environment
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/services/AlarmReceiver.java:52: error: cannot find symbol
                                        operation = (Operation) intent.getExtra(context.getResources().getString(R.string.alarm_scheduled_operation_payload));
                                                                      ^
  symbol:   method getExtra(String)
  location: variable intent of type Intent
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/services/LocationUpdateReceiver.java:31: error: cannot find symbol
            location = (Location) intent.getExtra(Constants.Location.LOCATION);
                                        ^
  symbol:   method getExtra(String)
  location: variable intent of type Intent
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/services/NetworkConnectedReceiver.java:42: error: cannot find symbol
                    context.startServiceAsUser(autoEnrollIntent, android.os.Process.myUserHandle());
                           ^
  symbol:   method startServiceAsUser(Intent,UserHandle)
  location: variable context of type Context
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/utils/CommonUtils.java:417: error: cannot find symbol
                        context.startServiceAsUser(intent, android.os.Process.myUserHandle());
                               ^
  symbol:   method startServiceAsUser(Intent,UserHandle)
  location: variable context of type Context
/Users/nnedic/Development/Git/swc-nextobu/wso2-agent-android/client/client/src/main/java/org/wso2/iot/agent/utils/CommonUtils.java:430: error: cannot find symbol
                        context.startServiceAsUser(intent, android.os.Process.myUserHandle());
                               ^
  symbol:   method startServiceAsUser(Intent,UserHandle)
  location: variable context of type Context
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
:client:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':client:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.856 secs

It appears that the client is using private APIs? Is there a way to build the client application with use system service flag set to true?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.