Okay, without getting too deep into details, I'm looking to automate the installation of a flashable zip (must be flashed from recovery). For now, I can use the command "reboot recovery" in a shell script to bring me into TWRP, but I'm not sure how to tell TWRP to install something automatically.
I know this is possible because Cyanogenmod does this exact thing with their ROM update utility. Once a ROM update is downloaded, you click "Reboot and Install" from within CM, the phone reboots into TWRP, the installation of the flashable zip begins, and after it completes the phone reboots again back into CM.
I don't know if I can just append the file's path onto the "reboot" command with a particular switch? I haven't been able to find documentation on the available options. I was also thinking maybe TWRP looks for an update.zip file upon launching?
Does anyone know how to do this?