aconfig: create aconfig_storage_file binary to print the storage files
To help debug storage files. We need a binary to parse the storage binary files and print out the flag values like device_config list command. In addition, aconfig_storage_file needs to provide a public api to allow flag cli to call to get the flag values. Therefore creating this change. This change includes the following changes: 1, Implement debug print trait for package table, flag table, and flag value struct. So the debug dump is more readable. 2, Add a list flag api to create a vector of flag name and value tuples given the storage file names. This api will be used by aconfig_storage_file binary as well as aconfig flag cli. 3, Add a main.rs to create aconfig_storage_file binary to debug print storage files or list all the flags in storage files. It has two subcommands. 3.1 print command: aconfig_storage_file print --file <storage file> --type <package_map|flag_map|flag_val> This command produce a debug print of a single the storage file content 3.2 list command: aconfig_storage_file list --package_map <package map file> --flag_map <flag map file> --flag_val <flag value file> This command parses all storage files to print out list of flag values in the following form: <package>/<flag>, <value> ... <package>/<flag>, <value> Bug: b/321077378 Test: manual test of the binary command Change-Id: I000e216d13854f853cbd9b63cabb6db3a47dbece
Loading
Please register or sign in to comment