diff --git a/mtkclient/Library/DA/xml/xml_lib.py b/mtkclient/Library/DA/xml/xml_lib.py index 0975a552..9c09cb4f 100755 --- a/mtkclient/Library/DA/xml/xml_lib.py +++ b/mtkclient/Library/DA/xml/xml_lib.py @@ -614,7 +614,9 @@ def __init__(self, storagetype, data): self.lua1_size = int(get_field(data, "lua1_size"), 16) self.lua2_size = int(get_field(data, "lua2_size"), 16) self.lua3_size = int(get_field(data, "lua3_size"), 16) - self.cid = get_field(data, "id") + self.cid = get_field(data, "id") # this doesn't exists in Xiaomi DA + if self.cid == "": + self.cid = get_field(data, "ufs_cid") elif self.storagetype == "EMMC": self.block_size = int(get_field(data, "block_size"), 16) self.boot1_size = int(get_field(data, "boot1_size"), 16) @@ -625,7 +627,9 @@ def __init__(self, storagetype, data): self.gp2_size = int(get_field(data, "gp2_size"), 16) self.gp3_size = int(get_field(data, "gp3_size"), 16) self.gp4_size = int(get_field(data, "gp4_size"), 16) - self.cid = get_field(data, "id") + self.cid = get_field(data, "id") # this doesn't exists in Xiaomi DA + if self.cid == "": + self.cid = get_field(data, "emmc_cid") elif self.storagetype == "NAND": self.block_size = int(get_field(data, "block_size"), 16) self.page_size = int(get_field(data, "page_size"), 16)