I am working on implementing the WSO2 IoT server in my organisation. I can already enroll BYOD devices and everything works fine. Now, I also want to be able to enroll COPE-devices, so I can use operations such as upgrading firmware and factory resetting a device.
I'm working on Windows 10.
- Android Studio version: 3.1.3
- WSO2 IoT version: 3.3.0
- IOT runs on Ubuntu Linux 18.04
- The lowest android version I want to enroll: 6.0.1
I tried to use the following documentation, but I'm having trouble understanding some of the steps.
https://docs.wso2.com/display/IoTS330/Integrating+the+Android+System+Service+Application
Step 1b:
Replace the android.jar file that is in the //platforms/android- directory with the android.jar file. You can get the new jar file using one of the following options:
Download the Android Open Source Project (AOSP) and build the source code to get the jar file for the required SDK level.
Use a pre-built jar file from a third party developer. You can find it here.
Make sure to use the jar file that matches the compileSdkVersion of the WSO2 Android agent. Currently, the compileSdkVersion is 25.
I know how to replace the android.jar file, but I'm not sure which API level I should be working with. We have a lot of different devices, with different android versions (the lowest being 6.0.1). Can I just build the APK with the lowest android version, so that newer android versions can work with that APK?
Step 1c:
Open the system service application source code via Android Studio and clean build it as a usual Android application.
I don't really understand this one. What do they mean with clean building the application? Are there steps I can follow to do this, or do they expect me to know how to build the application myself? I'm not very experienced with programming and I never worked with Android Studio. I downloaded the source code, but I don't know if and what I have to change to make COPE enrollment possible. Do I have to know how to build applications so I can build the right APK?
I have more questions about the other steps, but I'll leave it at this for now. I think that if I know how to correctly build the APK which is able to let a device be enrolled as COPE, I can get a lot further.
Thanks in advance!
By the way, this is my first time posting on Stackoverflow. Please let me know if I'm doing something wrong here :).
Edit: So I kind of figured out how to generate an apk file. Now i only need to know what directory in the IOT source code I should be editing and how I should edit it. Has anyone ever build the Android Agent application so that the device can be registered as a COPE-Device? I feel like they expect me to know how to build Android apps to be able to accomplish this. Is this the case? If so, (how) can I build the application, if I don't have any Android app programming experience? Also, how exactly are the android.jar and the SDK files related to the APK file I should be building?