Android OTA¶
This chapter describes the compilation and upgrade methods for OTA update packages on the Rockchip platform. OTA upgrade is a standard software upgrade method provided by the Android system, offering both full upgrade (complete package) and incremental upgrade (difference package) modes.
Incremental OTA packages contain only the differences and are smaller in size. They require manual creation through special compilation procedures.
| Motherboard | SoC | Android13 Product | Android14 Product |
|---|---|---|---|
| K1 | rk3568 | rk3568_t | / |
| K1B | rk3568 | rk3568_t | / |
| K1 MINI | rk3568 | rk3568_t | rk3568_u |
| K3 | rk3562 | rk3562_t | / |
| K3B | rk3562 | rk3562_t | rk3562_u |
| K7 | rk3576 | / | rk3576_u |
| K7C | rk3576 | / | rk3576_u |
| K7S_K7F | rk3576 | / | rk3576_u |
| K8 | rk3588 | rk3588_t | / |
| K8D | rk3588s | rk3588s_t | rk3588s_u |
| K11C | rk3566 | rk3566_t | rk3566_u |
| TX66 | rk3566 | rk3566_t | rk3566_u |
Upgrade Prerequisites¶
1. For battery‑powered designs, ensure the battery is sufficiently charged while connected to a power source.
2. Ensure that the image date in the OTA package is newer than the existing image date on the board.
Tip
Make sure make installclean is enabled during compilation so that the property information is updated correctly.
Building Update Packages¶
Methods for building full OTA packages and incremental OTA packages on the Rockchip platform.
Building a Full Package¶
The full OTA package rkxxxx-ota-eng.xxx.zip will be generated in the out/target/product/rkxxxx/ directory. Rename it to update.zip and copy it to a TF card or internal flash for upgrade.
Building an Incremental Package¶
Note
A full package and a "source" package are different. An incremental package is generated by comparing the source packages of two versions. Therefore, every time a firmware version is released, you must save the source package from the obj directory, the full OTA package, and all images generated by ./mkimage.sh ota.
1. First, release version v1 and generate its full OTA package. Save out/target/product/rkxxxx/obj/PACKAGING/target_files_intermediates/rkxxx-target_files_eng.xxx.zip as rkxxxx-target_files-v1.zip — this is the base source package for v1. Also flash the firmware from rockdev (this step is critical).
mkdir -p ota_v1
cp rockdev/Image-rk3566_t/update-*.img ota_v1/
cp rockdev/Image-rk3566_t/rk3566_t-*.zip ota_v1/
cp out/target/product/rk3566_t/obj/PACKAGING/target_files_intermediates/rk3566_t-target_files-eng.hcm.zip ota_v1/
2. Modify kernel or Android code, then release version v2 and generate its full OTA package. Save out/target/product/rkxxxx/obj/PACKAGING/target_files_intermediates/rkxxx-target_files-eng.xxx.zip as rkxxxx-target_files-v2.zip — this is the base source package for v2.
mkdir -p ota_v2
cp rockdev/Image-rk3566_t/update-*.img ota_v2/
cp rockdev/Image-rk3566_t/rk3566_t-*.zip ota_v2/
cp out/target/product/rk3566_t/obj/PACKAGING/target_files_intermediates/rk3566_t-target_files-eng.hcm.zip ota_v2/
3. Generate the incremental package between v1 and v2.
Android 13
mkdir -p ota_v1v2
sudo apt install python3-protobuf
python3 ./build/tools/releasetools/ota_from_target_files -v -i \
./ota_v1/rk3566_t-target_files-eng.hcm.zip --block -p ./out/host/linux-x86 \
./ota_v2/rk3566_t-target_files-eng.hcm.zip ./ota_v1v2/v1v2.zip
Android 14
mkdir -p ota_v1v2
out/host/linux-x86/bin/ota_from_target_files -v -i \
./ota_v1/rk3566_t-target_files-eng.hcm.zip --block -p ./out/host/linux-x86 \
./ota_v2/rk3566_t-target_files-eng.hcm.zip ./ota_v1v2/v1v2.zip
Note
ota_from_target_files options:
-v -i – the previous target files used for comparison
--block – use block‑based OTA upgrade
-p – host compilation environment
-k – signing key. On Android 13 the default key path is device/rockchip/common/security/testkey; on other Android platforms it is build/make/target/product/security/testkey. The last argument is the output incremental OTA package generated from the later target files.
Upgrade Procedure¶
For Rockchip platforms, the default OTA client is RKUpdateService. Follow these steps to verify the upgrade:
1. Generate a full or incremental OTA package and rename it to update.zip.
2. Copy update.zip to the root directory of a USB drive, an SD card, /data/media/0/, or /sdcard/.
3. The system will automatically detect the update package and display a notification dialog. If not detected automatically, try unplugging/replugging the USB cable or rebooting the device.
4. Reboot into Recovery mode — the system will automatically complete the OTA upgrade. Wait for the process to finish and the device to reboot into the Android home screen.
5. After the upgrade, verify the changes by checking new features or system build properties.
Server Environment Setup (RKUpdateService)¶
For remote OTA upgrades, you need to set up an OTA server. The board periodically polls the server via RKUpdateService to check for new versions.
Server Configuration¶
1. Download RK平台apache_tomcat_ota服务器搭建说明_v1.1.rar and RKUpdateService_13.zip and extract them.
2. Place apache-tomcat-7.0.29 in any directory on the Ubuntu server:
3. Place the OTA package in the packages directory:
mkdir -p webapps/OtaUpdater/WEB-INF/packages/$(product)
cp rkxxxx-ota-eng.xxx.zip webapps/OtaUpdater/WEB-INF/packages/$(product)/
4. Edit the manifest file webapps/OtaUpdater/WEB-INF/manifast.xml and add an entry for your product:
<?xml version="1.0" encoding="UTF-8"?>
<manifast>
+ <product name="$(product)" full_package_path="null" rkimage_path="null">
+ <version name="$(version)" package_path="packages/$(product)/rkxxxx-ota-eng.xxx.zip" />
+ </product>
</manifast>
| Parameter | Description |
|---|---|
$(product) |
Product name, e.g., rk3568_t, rk3566_t (see the Product column in the table above) |
$(version) |
Version number, e.g., 20260608 |
5. Change the port (optional). The default port is 2300:
<!-- conf/server.xml -->
<Connector port="2300" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
6. Start the server:
To verify, open a browser and visit http://<server_ip>:2300/OtaUpdater/android?product=$(product)&version=$(version). If an XML response is returned, the server is running correctly.
Board Configuration¶
1. Flash firmware that includes RKUpdateService.
2. Modify the OTA properties on the board:
--- a/vendor/build.prop
+++ b/vendor/build.prop
+
+ro.product.ota.host=192.168.1.100:2300
+ro.product.model=$(product)
+ro.product.version=$(version)
3. Reboot the device and connect to the network. Wait for RKUpdateService to detect the new version.
4. When prompted, confirm the upgrade — the device will automatically download the package and reboot to apply the update.
Frequently Asked Questions¶
- OTA upgrade fails?
1. Verify that all upgrade prerequisites are met.
2. Check the recovery logs (last_log) for details: