updater is an individual executable for the target device in the AOSP source tree. It can be found in the $AOSP/bootable/recovery/updater folder. Let's look at the main function in the updater.cpp file. Since the main function is a little long, let's look at it in several paragraphs:
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include "edify/expr.h" #include "updater.h" #include "install.h" #include "blockimg.h" #include "minzip/Zip.h" #include "minzip/SysUtil.h" #include "register.inc" #define SCRIPT_NAME "META-INF/com/google/android/updater-script" extern bool have_eio_error; struct selabel_handle *sehandle; int main(int argc, char** argv) { setbuf(stdout, NULL); setbuf(stderr, NULL); if (argc ...