Store frro configs in idmap file

This also includes the change to use the configs to decide which (if
any) frros to use at runtime

Bug: 243066074
Test: Manual, updated and created automated tests
Change-Id: I3f1d23e2958ad170799880b9f5eb5bd8ceb1fa67
diff --git a/cmds/idmap2/tests/TestHelpers.h b/cmds/idmap2/tests/TestHelpers.h
index 6b5f3a8..45740e2 100644
--- a/cmds/idmap2/tests/TestHelpers.h
+++ b/cmds/idmap2/tests/TestHelpers.h
@@ -30,7 +30,7 @@
     0x49, 0x44, 0x4d, 0x50,
 
     // 0x4: version
-    0x08, 0x00, 0x00, 0x00,
+    0x09, 0x00, 0x00, 0x00,
 
     // 0x8: target crc
     0x34, 0x12, 0x00, 0x00,
@@ -76,66 +76,123 @@
     // 0x58: target_inline_entry_count
     0x01, 0x00, 0x00, 0x00,
 
-    // 0x5c: overlay_entry_count
+    // 0x5c: target_inline_entry_value_count
+    0x01, 0x00, 0x00, 0x00,
+
+    // 0x60: config_count
+    0x01, 0x00, 0x00, 0x00,
+
+    // 0x64: overlay_entry_count
     0x03, 0x00, 0x00, 0x00,
 
-    // 0x60: string_pool_offset
+    // 0x68: string_pool_offset
     0x00, 0x00, 0x00, 0x00,
 
     // TARGET ENTRIES
-    // 0x64: target id (0x7f020000)
+    // 0x6c: target id (0x7f020000)
     0x00, 0x00, 0x02, 0x7f,
 
-    // 0x68: overlay_id (0x7f020000)
+    // 0x70: overlay_id (0x7f020000)
     0x00, 0x00, 0x02, 0x7f,
 
-    // 0x6c: target id (0x7f030000)
+    // 0x74: target id (0x7f030000)
     0x00, 0x00, 0x03, 0x7f,
 
-    // 0x70: overlay_id (0x7f030000)
+    // 0x78: overlay_id (0x7f030000)
     0x00, 0x00, 0x03, 0x7f,
 
-    // 0x74: target id (0x7f030002)
+    // 0x7c: target id (0x7f030002)
     0x02, 0x00, 0x03, 0x7f,
 
-    // 0x78: overlay_id (0x7f030001)
+    // 0x80: overlay_id (0x7f030001)
     0x01, 0x00, 0x03, 0x7f,
 
     // INLINE TARGET ENTRIES
 
-    // 0x7c: target_id
+    // 0x84: target_id
     0x00, 0x00, 0x04, 0x7f,
 
-    // 0x80: Res_value::size (value ignored by idmap)
+    // 0x88: start value index
+    0x00, 0x00, 0x00, 0x00,
+
+    // 0x8c: value count
+    0x01, 0x00, 0x00, 0x00,
+
+    // INLINE TARGET ENTRY VALUES
+
+    // 0x90: config index
+    0x00, 0x00, 0x00, 0x00,
+
+    // 0x94: Res_value::size (value ignored by idmap)
     0x08, 0x00,
 
-    // 0x82: Res_value::res0 (value ignored by idmap)
+    // 0x98: Res_value::res0 (value ignored by idmap)
     0x00,
 
-    // 0x83: Res_value::dataType (TYPE_INT_HEX)
+    // 0x9c: Res_value::dataType (TYPE_INT_HEX)
     0x11,
 
-    // 0x84: Res_value::data
+    // 0xa0: Res_value::data
     0x78, 0x56, 0x34, 0x12,
 
+    // CONFIGURATIONS
+
+    // 0xa4: ConfigDescription
+    // size
+    0x40, 0x00, 0x00, 0x00,
+    // 0xa8: imsi
+    0x00, 0x00, 0x00, 0x00,
+    // 0xac: locale
+    0x00, 0x00, 0x00, 0x00,
+    // 0xb0: screenType
+    0x02, 0x00, 0xe0, 0x01,
+    // 0xb4: input
+    0x00, 0x00, 0x00, 0x00,
+    // 0xb8: screenSize
+    0x00, 0x00, 0x00, 0x00,
+    // 0xbc: version
+    0x07, 0x00, 0x00, 0x00,
+    // 0xc0: screenConfig
+    0x00, 0x00, 0x00, 0x00,
+    // 0xc4: screenSizeDp
+    0x00, 0x00, 0x00, 0x00,
+    // 0xc8: localeScript
+    0x00, 0x00, 0x00, 0x00,
+    // 0xcc: localVariant(1)
+    0x00, 0x00, 0x00, 0x00,
+    // 0xd0: localVariant(2)
+    0x00, 0x00, 0x00, 0x00,
+    // 0xd4: screenConfig2
+    0x00, 0x00, 0x00, 0x00,
+    // 0xd8: localeScriptWasComputed
+    0x00,
+    // 0xd9: localeNumberingSystem(1)
+    0x00, 0x00, 0x00, 0x00,
+    // 0xdd: localeNumberingSystem(2)
+    0x00, 0x00, 0x00, 0x00,
+
+    // 0xe1: padding
+    0x00, 0x00, 0x00,
+
+
     // OVERLAY ENTRIES
-    // 0x88: 0x7f020000 -> 0x7f020000
+    // 0xe4: 0x7f020000 -> 0x7f020000
     0x00, 0x00, 0x02, 0x7f, 0x00, 0x00, 0x02, 0x7f,
 
-    // 0x90: 0x7f030000 -> 0x7f030000
+    // 0xec: 0x7f030000 -> 0x7f030000
     0x00, 0x00, 0x03, 0x7f, 0x00, 0x00, 0x03, 0x7f,
 
-    // 0x98: 0x7f030001 -> 0x7f030002
+    // 0xf4: 0x7f030001 -> 0x7f030002
     0x01, 0x00, 0x03, 0x7f, 0x02, 0x00, 0x03, 0x7f,
 
-    // 0xa0: string pool
+    // 0xfc: string pool
     // string length,
     0x04, 0x00, 0x00, 0x00,
 
-    // 0xa4 string contents "test"
+    // 0x100 string contents "test"
     0x74, 0x65, 0x73, 0x74};
 
-const unsigned int kIdmapRawDataLen = 0xa8;
+const unsigned int kIdmapRawDataLen = 0x104;
 const unsigned int kIdmapRawDataOffset = 0x54;
 const unsigned int kIdmapRawDataTargetCrc = 0x1234;
 const unsigned int kIdmapRawOverlayCrc = 0x5678;