We have understood updater and the updater script inside an OTA package so far. We can build an OTA package for our x86vbox device now. To build an OTA package, we can use the following commands:
$ mkdir -p dist_output
$ make dist DIST_DIR=dist_output
The default OTA package build in Android 5 or above is to build the block-based OTA package, but we will get an error building block-based OTA packages for x86vbox. There are a lot more configurations that are needed to be done to support block-based OTA packages in our environment. All the third-party recovery packages cannot use block-based update packages as well.
To avoid this error, we need to change the following build/core/Makefile file to remove the --block option:
$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@echo "Package OTA: $@"
$(hide) PATH=$(foreach
...