Retrieving arguments from BCB and cache files

As we can see in the main function of recovery, it calls to the get_args function to retrieve arguments from the main system or bootloader. The following is the flow diagram of get_args. It is in the same $AOSP/bootable/recovery/recovery.cpp file as the main function of recovery.

Flow diagram of get_args

From the following code snippet, we can see that it calls to the get_bootloader_message function to get the BCB data structure, boot:

static void get_args(int *argc, char ***argv) {     struct bootloader_message boot;     memset(&boot, 0, sizeof(boot));  get_bootloader_message(&boot); // this may fail, ...

Get Android System Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.