Android Client Troubleshooting
The Debugging section presents several methods on how to obtain debug information regarding the state of the UF Android Client Service.
It is really important that devices are prepared with at least one way to debug possible issues, even in production. Some of the possible ways to debug the background UF Android Client Service are:
- by integrating your own application with the UF Third-party integration APIs.
- using the UF Service API Reference Implementation
- obtaining the device logcat
You can integrate your own application to communicate directly with the UF Android Client Service via the UF Third-party integration APIs. In this case you are free to share the status of the Service or any other debugging information in the way that best fits the final product.
UF Service API Reference Implementation¶
The UF Service API Reference Implementation is an Apache v2.0 licensed Open Source reference application that integrates with the UF Android Client Service and provides visual feedback about the status of the Service, including update download progress, error messages, etc.
To install the UF Service API Reference Implementation download the
uf-service-api-reference-implementation-kynetics_key.apk from the UF Service API Reference Implementation releases page and install it with adb:
adb install uf-service-api-reference-implementation-kynetics_key.apk
The UF Service API Reference Implementation application also allows to open the UF Android Settings page, which shows all current configuration parameters.
An alternative way to open the the UF Android Settings page is the following adb command:
adb shell am start -a com.kynetics.action.SETTINGS
The Android Logcat provides debug messages regarding the system and the UF Android Client Service status. To get the system logcat:
adb logcat > logcat.txt
In Android ≥ 7 it's possible to print only the UF Android Client Service logs with:
adb logcat --pid=`adb shell pidof -s com.kynetics.uf.service`
Symptoms of connection problems may vary depending on the network configuration, geography and other factors.
Device is not polling¶
- Verify network connectivity is active and stable in the target device.
- Verify the are no outbound traffic limitations on your network setup. If limiting is necessary, make sure that Update Factory Platform URLs can be reached by whitelisting the Update Factory DNS
Check the UF Android Client Service status. If it's in an error state restart the service:
Android version ≤ 7.1.2:
adb shell am startservice -a com.kynetics.action.BIND_UF_SERVICE
Android version ≥ 8:
adb shell am start-foreground-service -a com.kynetics.action.BIND_UF_SERVICE
Verify the target ID hasn't been changed via
ufConf.confor UF API.
- Check if the system clock is up-to-date.
- If you have a coin battery powered RTC, verify it keeps the date after a power cycle.
Here is what to check if the installation of a distribution is not successful.
Distribution is not installed¶
- Check there are no space characters in the uploaded software module file name
If the Update Server returns the following error:
The operation failed because one or more of the APKs was invalid. For example, they might be malformed, corrupt, incorrectly signed, mismatched, etc
- Verify the application version code of the to-be-installed APK is greater than the currently installed one. Downgrade is not supported.
- Verify the APK signature.
Android system OTA is downloaded multiple times¶
If in the Action history details of the installation of an Android system OTA Distribution to a Target device the OTA file is downloaded again (message "Update Server: Target retrieved update action and should start now the download.") after the OTA has already been applied (message "Applying ota update") the likely cause is that the OTA formats the
The UF Android Client Service relies on properties stored under
/data to understand whether it should provide post-installation feedback to the Update Factory platform, and thus cannot support Android system OTA that wipe the contents of