[Xiaomi Mi 4C] ketut.kumajaya:
I had locked my Mi-4c device (CyanogenMod 13.0, TWRP 3.0.2 installed) using firmware update from V7.5.3.0.LXKCNDE for a research purpose. Next, of course my device failed to boot :D I have a modified V7.1.6.0.LXKCNCK fastboot image without boot.img, recovery.img, persist.img, system.img, cache.img, cust.img, userdata.img, gpt_main0.bin, and gpt_backup0.bin, modified rawprogram0.xml:

<?xml version="1.0" ?>
<data>
<!--NOTE: This is an ** Autogenerated file **-->
<!--NOTE: Sector size is 512bytes-->
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sbl1.mbn" label="sbl1" num_partition_sectors="4096" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x4400" start_sector="34"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sbl1.mbn" label="sbl1bak" num_partition_sectors="4096" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x204400" start_sector="4130"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="rpm.mbn" label="rpm" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x404400" start_sector="8226"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="rpm.mbn" label="rpmbak" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x504400" start_sector="10274"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="tz.mbn" label="tz" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x604400" start_sector="12322"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="tz.mbn" label="tzbak" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x704400" start_sector="14370"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="ssd" num_partition_sectors="16" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="8.0" sparse="false" start_byte_hex="0x804400" start_sector="16418"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="hyp.mbn" label="hyp" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x806400" start_sector="16434"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="hyp.mbn" label="hypbak" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x906400" start_sector="18482"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="DDR" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0xa06400" start_sector="20530"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="emmc_appsboot.mbn" label="aboot" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0xb06400" start_sector="22578"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="emmc_appsboot.mbn" label="abootbak" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0xf06400" start_sector="30770"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="misc" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0x1306400" start_sector="38962"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="BTFM.bin" label="bluetooth" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x1706400" start_sector="47154"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="pmic.mbn" label="pmic" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x1806400" start_sector="49202"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="pmic.mbn" label="pmicbak" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x1826400" start_sector="49458"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="limits" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x1846400" start_sector="49714"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="apdp" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="256.0" sparse="false" start_byte_hex="0x1846800" start_sector="49716"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="msadp" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="256.0" sparse="false" start_byte_hex="0x1886800" start_sector="50228"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="dpo" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x18c6800" start_sector="50740"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sdi.mbn" label="sdi" num_partition_sectors="192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="96.0" sparse="false" start_byte_hex="0x18c6c00" start_sector="50742"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="keystore" num_partition_sectors="1024" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x18dec00" start_sector="50934"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="devinfo" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x195ec00" start_sector="51958"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="config" num_partition_sectors="1024" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x195f000" start_sector="51960"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="sec" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x19df000" start_sector="52984"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="logo.img" label="logo" num_partition_sectors="32768" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="16384.0" sparse="false" start_byte_hex="0x1adf000" start_sector="55032"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk1" num_partition_sectors="43272" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="21636.0" sparse="false" start_byte_hex="0x2adf000" start_sector="87800"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="modemst1" num_partition_sectors="3072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1536.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="modemst2" num_partition_sectors="3072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1536.0" sparse="false" start_byte_hex="0x4180000" start_sector="134144"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="fsc" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x4300000" start_sector="137216"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="bk2.img" label="bk2" num_partition_sectors="59390" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="29695.0" sparse="false" start_byte_hex="0x4300400" start_sector="137218"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk3" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x6000000" start_sector="196608"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="fsg" num_partition_sectors="3072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1536.0" sparse="false" start_byte_hex="0x8000000" start_sector="262144"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk4" num_partition_sectors="62464" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="31232.0" sparse="false" start_byte_hex="0x8180000" start_sector="265216"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk5" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0xa000000" start_sector="327680"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="262144" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="131072.0" sparse="false" start_byte_hex="0xc000000" start_sector="393216"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="boot" num_partition_sectors="131072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x14000000" start_sector="655360"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="recovery" num_partition_sectors="131072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x18000000" start_sector="786432"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="persist" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="true" start_byte_hex="0x1c000000" start_sector="917504"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="oops" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x1e000000" start_sector="983040"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="system" num_partition_sectors="3932160" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1966080.0" sparse="true" start_byte_hex="0x20000000" start_sector="1048576"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="cache" num_partition_sectors="786432" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="393216.0" sparse="true" start_byte_hex="0x98000000" start_sector="4980736"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="cust" num_partition_sectors="655360" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="327680.0" sparse="true" start_byte_hex="0xb0000000" start_sector="5767168"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="userdata" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="0" sparse="true" start_byte_hex="0xc4000000" start_sector="6422528"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="PrimaryGPT" num_partition_sectors="34" partofsingleimage="true" physical_partition_number="0" readbackverify="false" size_in_KB="17.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="BackupGPT" num_partition_sectors="33" partofsingleimage="true" physical_partition_number="0" readbackverify="false" size_in_KB="16.5" sparse="false" start_byte_hex="(512*NUM_DISK_SECTORS)-16896." start_sector="NUM_DISK_SECTORS-33."/>
</data>

Step 2, 3, 4, 5, and my CyanogenMod back without any data loss. Thanks OP :good: Now I'm thinking to create an image to directly flash TWRP in step 4.