How to Update Android Firmware OTA for OKT507-C
Part 1 Compile OTA update pack
Compile firmware
Configure the compiling environment
get into source code directory to execute below command$ cd OKT507-android-source/longan
$./build.sh config
$ cd /work/OKT507-android-source/android
$ source build/envsetup.sh
$ lunch okt507_c-userdebug
Fully compile
- cd /work/OKT507-android-source/longan
- $ ./build.sh
- $ cd /work/OKT507-android-source/android
- $ extract-bsp
- $ make installclean
- $ make –j4
the compiled image will be saved to out/target/product/okt507-c
Pack the image
$ pack
the packed image is longan/out/t507_android10_okt507_uart0.img
Compile full pack and differential pack of OTA
$ pack4dist
Target pack
out/target/product/okt507-c/obj/PACKAGING/target_files_intermediates/okt507_c-target_files-eng.xxz.zip
- Full updating pack
-
out/target/product/okt507-c/okt507_c-full_ota-eng.xxz.zip
- The target pack is a basic source to make incremental pack, and it should be saved together with firmware to generate OTA pack.
- Generate complete pack separatly by below command
- $./build/tools/releasetools/ota_from_target_files target.zip ota.zip
- Generate differential pack separatly by below command
- $./build/tools/releasetools/ota_from_target_files -i origin.zip target.zip inc.zip
- Note: origin.zip is a basic version target pack to be upgraded, target.zip is the current target pack, inc.zip is the differential pack.
Part 2 Upgrade firmware by OTA pack
Use complete pack for fully upgrading and use differential pack for incremental upgrading, rename the target upgrading pack to update.zip.
Upgrade by TF card or U-disk
Select as Settings-> system-> advanced-> local upgrade
Choose OTA updating, update.zip will be scanned
Click update.zip and it will indicates verifying whether can be installed, after that, click start install
It will show verifying, process the installation pack and restart on interface, and then it will start reconvery, and system will restart after updating, OTA updating is finished.
Update by ADB
- Copy update.zip to PC, here we suppose to put it to root directory of F-disk
- Execute below command by CMD on PC, the board will restart and get into recovery mode
- adb reboot recovery
- Choose Apply update from ADB by volume control keys on development board
- then execute below command on PC
- adb sideload F:\update.zip
- it will start updating
- Once it's finished, it will indicates below information
- Install from ADB completed with status 0
- Choose Reboot system now, and development board will restart, thus OTA updating is done