summaryrefslogtreecommitdiff
path: root/cmds/idmap2/tests/TestHelpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/idmap2/tests/TestHelpers.h')
-rw-r--r--cmds/idmap2/tests/TestHelpers.h82
1 files changed, 48 insertions, 34 deletions
diff --git a/cmds/idmap2/tests/TestHelpers.h b/cmds/idmap2/tests/TestHelpers.h
index a7c2f284e7c5..8868b5376796 100644
--- a/cmds/idmap2/tests/TestHelpers.h
+++ b/cmds/idmap2/tests/TestHelpers.h
@@ -30,7 +30,7 @@ const unsigned char idmap_raw_data[] = {
0x49, 0x44, 0x4d, 0x50,
// 0x4: version
- 0x01, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00,
// 0x8: target crc
0x34, 0x12, 0x00, 0x00,
@@ -38,8 +38,8 @@ const unsigned char idmap_raw_data[] = {
// 0xc: overlay crc
0x78, 0x56, 0x00, 0x00,
- // 0x10: target path "target.apk"
- 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x61, 0x70, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // 0x10: target path "targetX.apk"
+ 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x58, 0x2e, 0x61, 0x70, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -56,8 +56,8 @@ const unsigned char idmap_raw_data[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- // 0x110: overlay path "overlay.apk"
- 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x2e, 0x61, 0x70, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // 0x110: overlay path "overlayX.apk"
+ 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x58, 0x2e, 0x61, 0x70, 0x6b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -75,49 +75,63 @@ const unsigned char idmap_raw_data[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// DATA HEADER
- // 0x210: target package id
- 0x7f, 0x00,
+ // 0x210: target_package_id
+ 0x7f,
- // 0x212: types count
- 0x02, 0x00,
+ // 0x211: overlay_package_id
+ 0x7f,
- // DATA BLOCK
- // 0x214: target type
- 0x02, 0x00,
+ // 0x212: target_entry_count
+ 0x03, 0x00, 0x00, 0x00,
- // 0x216: overlay type
- 0x02, 0x00,
+ // 0x216: overlay_entry_count
+ 0x03, 0x00, 0x00, 0x00,
- // 0x218: entry count
- 0x01, 0x00,
-
- // 0x21a: entry offset
- 0x00, 0x00,
+ // 0x21a: string_pool_offset
+ 0x00, 0x00, 0x00, 0x00,
- // 0x21c: entries
+ // 0x21e: string_pool_byte_length
0x00, 0x00, 0x00, 0x00,
- // DATA BLOCK
- // 0x220: target type
- 0x03, 0x00,
+ // TARGET ENTRIES
+ // 0x222: 0x7f020000
+ 0x00, 0x00, 0x02, 0x7f,
- // 0x222: overlay type
- 0x03, 0x00,
+ // 0x226: TYPE_REFERENCE
+ 0x01,
- // 0x224: entry count
- 0x03, 0x00,
+ // 0x227: 0x7f020000
+ 0x00, 0x00, 0x02, 0x7f,
- // 0x226: entry offset
- 0x03, 0x00,
+ // 0x22b: 0x7f030000
+ 0x00, 0x00, 0x03, 0x7f,
- // 0x228, 0x22c, 0x230: entries
- 0x00, 0x00, 0x00, 0x00,
+ // 0x22f: TYPE_REFERENCE
+ 0x01,
+
+ // 0x230: 0x7f030000
+ 0x00, 0x00, 0x03, 0x7f,
+
+ // 0x234: 0x7f030002
+ 0x02, 0x00, 0x03, 0x7f,
+
+ // 0x238: TYPE_REFERENCE
+ 0x01,
+
+ // 0x239: 0x7f030001
+ 0x01, 0x00, 0x03, 0x7f,
+
+ // OVERLAY ENTRIES
+ // 0x23d: 0x7f020000 -> 0x7f020000
+ 0x00, 0x00, 0x02, 0x7f, 0x00, 0x00, 0x02, 0x7f,
- 0xff, 0xff, 0xff, 0xff,
+ // 0x245: 0x7f030000 -> 0x7f030000
+ 0x00, 0x00, 0x03, 0x7f, 0x00, 0x00, 0x03, 0x7f,
- 0x01, 0x00, 0x00, 0x00};
+ // 0x24d: 0x7f030001 -> 0x7f030002
+ 0x01, 0x00, 0x03, 0x7f, 0x02, 0x00, 0x03, 0x7f};
-const unsigned int idmap_raw_data_len = 565;
+const unsigned int idmap_raw_data_len = 0x255;
std::string GetTestDataPath();