most xiaomi devices had unglued EMCP chip. just remove them and use a socket to read and test it. backup importart stuff first like modem parts or all partition if you can. then do factory reset and nand test, if it fails then try to repartition them. if all is ok then you can write back all the partition. if its not ok then replace the chip and write the backed up partition.