Since the recovery environment is a self-contained environment, both recovery and the updater are static linked so they don't depend on the C runtime shared libraries. We talked about the C runtime shared libraries in the last chapter, when we removed the dependencies from the /system folder. In such an environment, the production release may contain only recovery itself, so it is very difficult to debug the recovery or updater in such an environment.
The only way that we can identify the potential issues is to look at the log files stored in the cache partition. At runtime, recovery prints the debug messages to the /tmp/recovery.log log file. Before it prepares to reboot the system, it will store the log file to the cache partition at /recovery/last_log. If the updater is executed to update the system, it will store the log file at /recovery/last_install in...