From a172151731d843be55e2b357bf58d26fe1aee75c Mon Sep 17 00:00:00 2001 From: Dennis Shen Date: Tue, 24 Sep 2024 01:01:41 +0000 Subject: Verify the presence of flag.info in ART APEXes Context: Previously flag info file is created at run time rather than at build time due to two reasons: 1, it saves some storage space on each container 2, initially the flag info file does not container any flag non run time info, so creating this file at run time on device is more efficient. However, flag info file is fairly compact, 1 byte per flag. So the storage footprint increase is minimal. Also, now flag info file contains flag information known at the build time such as if the flag is read write. To help create flag info file at run time, we actually have to keep additional information on flag map file. Then use this information to create flag info file at run time. Now it is more efficient to just create flag info file at build time. In addition, to create flag info file at run time, we need to maintain an additional write api create_flag_info_file. Each time flag file version changes, we have to keep the old version of this API as well. If we create flag info file at build time, then we don't have to maintain this API. Overall the benefits outweight the 1 byte per flag storage overhead. Therefore making this change to create flag info file at build time. Test: art/build/apex/art_apex_test.py Change-Id: I591afd662a5b0de807d6111c44a8d076e38bd617 --- build/apex/art_apex_test.py | 1 + 1 file changed, 1 insertion(+) (limited to 'build/apex/art_apex_test.py') diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py index 1b82302d7a..b3613c06fa 100755 --- a/build/apex/art_apex_test.py +++ b/build/apex/art_apex_test.py @@ -502,6 +502,7 @@ class ReleaseChecker: # Check flagging files that don't get added in builds on master-art. # TODO(b/345713436): Make flags work on master-art. self._checker.check_optional_file('etc/aconfig_flags.pb') + self._checker.check_optional_file('etc/flag.info') self._checker.check_optional_file('etc/flag.map') self._checker.check_optional_file('etc/flag.val') self._checker.check_optional_file('etc/package.map') -- cgit v1.2.3-59-g8ed1b