1<?xml version="1.0"?> 2<config> 3<!-- All the device getvar variables should be listed here --> 4<getvar> 5 <var key="product" assert="superphone2000"/> 6 <var key="secure" assert="no|yes"/> 7</getvar> 8 9<!-- All the device partitions should be listed here --> 10<partitions> 11 <part value="boot" slots="yes" test="yes" hashable="yes" parsed="yes"/> 12 <part value="modem" slots="yes" test="yes" hashable="yes"/> 13 <part value="userdata" slots="no" test="yes" hashable="no"/> 14 15 <!-- Bootloader partitions --> 16 <part value="foo1" slots="yes" test="no" hashable="yes"/> 17 <part value="foo2" slots="yes" test="no" hashable="yes"/> 18 <part value="bar3" slots="yes" test="no" hashable="yes"/> 19</partitions> 20 21<!-- All the device packed partitions should be listed here --> 22<packed> 23 <part value="bootloader" slots="yes"> 24 <!-- We list the real partitions it is composed of --> 25 <child>foo1</child> 26 <child>foo2</child> 27 <child>bar3</child> 28 <!-- We list tests, expect defaults to 'okay' --> 29 <test packed="bootloader.img" unpacked="unpacked"/> 30 <test packed="bootloader_garbage.img" expect="fail"/> 31 </part> 32</packed> 33 34<!-- All the oem commands should be listed here --> 35<oem> 36 <!-- The 'oem self_destruct' command requires an unlocked bootloader --> 37 <command value="self_destruct" permissions="unlocked"> 38 <!-- This will test that "oem self_destruct now" returns 'okay' --> 39 <test value="now" expect="okay"/> 40 <test value="yesterday" expect="fail" /> 41 </command> 42 43 <!-- Test a fictional 'oem get' command --> 44 <command value="get" permissions="none"> 45 <test value="batch_id" expect="okay" assert="[[:digit:]]+"/> 46 <test value="device_color" expect="okay" assert="green|blue"/> 47 <test value="build_num" expect="okay" assert="[\w\-.]+"/> 48 <test value="garbage" expect="fail" assert="Invalid var '[\w ]+'"/> 49 </command> 50 51 <!-- Some oem commands might require staging or downloading data, or both --> 52 <command value="foobar" permissions="unlocked"> 53 <!-- FF will first stage test_image.img before running 'oem foobar use_staged' --> 54 <test value="use_staged" expect="okay" input="test_image.img" /> 55 <!-- FF will run 'oem foobar send_response', upload data from device, then run the validator script --> 56 <test value="send_response" expect="fail" validate="python validator.py"/> 57 </command> 58</oem> 59 60<!-- If there is a custom oem checksum command to hash partitions, add it here --> 61<checksum value="oem sha1sum"/> 62</config> 63