diff options
Diffstat (limited to 'scripts/update_device.py')
-rwxr-xr-x | scripts/update_device.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/update_device.py b/scripts/update_device.py index 64cfbe3b..5c19b89a 100755 --- a/scripts/update_device.py +++ b/scripts/update_device.py @@ -89,7 +89,9 @@ class AndroidOTAPackage(object): otazip = zipfile.ZipFile(otafilename, 'r') payload_info = otazip.getinfo(self.OTA_PAYLOAD_BIN) - self.offset = payload_info.header_offset + len(payload_info.FileHeader()) + self.offset = payload_info.header_offset + self.offset += zipfile.sizeFileHeader + self.offset += len(payload_info.extra) + len(payload_info.filename) self.size = payload_info.file_size self.properties = otazip.read(self.OTA_PAYLOAD_PROPERTIES_TXT) |