Skip to content

Commit

Permalink
Fixed cid issue in DA_XML
Browse files Browse the repository at this point in the history
  • Loading branch information
GautamGreat committed May 21, 2024
1 parent 8e46df6 commit 4680b9c
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 4680b9c

Please sign in to comment.