I wanted to ask if there’s a way to flash zip files directly onto instances, similar to how it’s done via fastboot or adb sideload. Specifically, I’m interested in knowing if it’s possible to apply such zips either through an addon or if a custom AOSP image would be necessary to achieve this.
Thanks in advance for any guidance you can provide!
Hi, sorry for the late answer! (I’ve also answered in the Matrix room)
It’s definitely possible to unpack a zip file however you want.
For instance, you could have a pre-start hook with the following:
#!/bin/sh -ex
if [ "$INSTANCE_TYPE" = "regular" ]; then
exit 0
fi
unzip "${ADDON_DIR}/<zip file>" -d "${ANDROID_ROOTFS}/<path inside Android rootfs>"
Custom Android images are possible, but tricky to get right. Could I ask what you’re trying to do with that zip file exactly? We may have other ways to achieve what you want to do.