You will want to make changes to the Android Application Package (APK) that is in WSO2 IoT Server to suit your business or Organization requirements. For example, you will want to white label the WSO2 Android agent. In such situations, you need to do the required changes and create a new APK file.
Download and install Android Studio.
For more information, see installing Android Studio.
android.jarfile that is in the
directory with the
android.jarfile. You can get the new
jarfile using one of the following options:
Download the Android Open Source Project (AOSP) and build the source code to get the
jarfile 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
compileSdkVersionof the WSO2 Android agent. Currently, the
Why is this needed?
The WSO2 Android agent requires access to hidden APIs (APIs that are available at runtime). Therefore, you need to replace the
anrdoid.jarfile as mentioned in this step.
- WSO2 IoT Server supports API levels 17 to 25. Therefore, install the Android API levels 17 to 25 on Android Studio.
- Open Android Studio.
- Click SDK Manager.
- Click the SDK Platform tab and select the 17 and 25 API levels.
- Click Apply.
Creating a new APK
Clone the cdmf-agent-android GIT repository. This will be referred to as
Check the WSO2 IoT Server and Agent Compatibility and find out what branch of this repo you need to clone and add the value for
Example: WSO2 IoT Server 3.0.0 is compatible with the WSO2 Android agent 2.0.0. Therefore, the release tag will be release-2.0.0.
- Open the client folder that is in the
<ANDROID_AGENT_SOURCE_CODE>via Android Studio.
Do the necessary changes you wish to make.
White Labeling the WSO2 Android Agent or changing the Android agent
constant.javafile that is in the
Build the project to create a new APK file that has all the changes you made.
- Rename the created
- Copy the renamed file and replace it instead of the existing
android-agent.apkfile that is in the