Reputation: 93
I want to create a full block based OTA package for an android device. With the default implementation for creating a OTA only boot.img and system.img files are inside the zip.
I wish to create a file with other required image files also in the zip file.
Upvotes: 1
Views: 2267
Reputation: 4088
Since your question is far to broad to answer in detail, take a look at the following short draft to get you started:
You can start with adding your other .img files to your target-files.zip
by adding cp commands for them in your build/core/Makefile
in the .PHONY: target-files-package
section.
Then modify the ota_from_target_files.py to take your .imgs from the target-files.zip and add them to the ota.zip. The key functions here are:
input_zip.read(..) and output_zip.writestr(..)
To replace your imgs during update you finally need to add commands to flash them to your updater-script
. this would look like: package_extract_file(cache.img, "path")
Upvotes: 1