Calculate the runtime fingerprint prefixes from build prop
In practice, some partners use the 'import' statement to override the device fingerprint at runtime. The runtime fingerprint will later add to the metadata of OTA package, so that the OTA server can deliver the package to corresponding devices correctly. This CL supports parsing a subset of import statement that the init process recognizes. And we loose the restriction based on how the dynamic fingerprint is used in practice. Right now, we only searches for the override of brand, name and device. And the placeholder format should be ${placeholder}, with its value supplied by the script caller. As part of the implementation, we generate all the possible combinations of the input boot variables. And recalculate the fingerprint for each of the combination. Though we load the build.prop multiple times, the logic is easier to follow. Also, it's more convenient to enhance the logic if we only want to allow some of the boot variables combination later. Bug: 152167826 Test: unittests pass Change-Id: Iac093a40dc6f873c5e1858efa44cb2bd6082508a
Loading
Please register or sign in to comment