Skip to content

Commit

Permalink
Merge pull request #1012 from GautamGreat/main
Browse files Browse the repository at this point in the history
Fixed cid issue in DA_XML
  • Loading branch information
bkerler authored May 23, 2024
2 parents 6256082 + 4680b9c commit 0b0067e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mtkclient/Library/DA/xml/xml_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 0b0067e

Please sign in to comment.