diff options
author | Ken Sumrall <ksumrall@android.com> | 2012-01-04 20:58:40 -0800 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2012-01-05 17:07:30 -0800 |
commit | 726553e5ce617056aff3796ef320b76db245ee67 (patch) | |
tree | 3864166a6c20fc2e7dbc1d931214f9901a5304e3 /releasetools.py | |
parent | 5dce5e401ee7044aad8c49d3290d66b79d2d7050 (diff) | |
download | device_samsung_tuna-726553e5ce617056aff3796ef320b76db245ee67.zip device_samsung_tuna-726553e5ce617056aff3796ef320b76db245ee67.tar.gz device_samsung_tuna-726553e5ce617056aff3796ef320b76db245ee67.tar.bz2 |
Tool to fix the fs_size in the crypto footer
The GPT of HSPA Prime devices is incorrect when it comes from the factory.
Flashing a new bootloader fixes the GPT, but if the user had already
encrypted the device, the old size of the partition is recorded in the
crypto footer. If the size if not updated, the device will not be able
to boot after the OTA, so add a new command to fix the fs_size field in
the crypto footer for Prime devices.
Change-Id: Ied4b592973d3d5c36c478b7fb32d59ac9e9611b0
Diffstat (limited to 'releasetools.py')
-rw-r--r-- | releasetools.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/releasetools.py b/releasetools.py index 23581d6..056c7dc 100644 --- a/releasetools.py +++ b/releasetools.py @@ -32,6 +32,8 @@ def FullOTA_InstallEnd(info): else: WriteRadio(info, radio_img) + FsSizeFix(info) + def IncrementalOTA_VerifyEnd(info): try: target_radio_img = info.target_zip.read("RADIO/radio.img") @@ -74,6 +76,12 @@ def IncrementalOTA_InstallEnd(info): except KeyError: print "no radio.img in target target_files; skipping install" + FsSizeFix(info) + +def FsSizeFix(info): + info.script.Print("Fixing fs_size in crypto footer...") + info.script.AppendExtra('''assert(samsung.fs_size_fix());''') + def WriteBootloader(info, bootloader_img): common.ZipWriteStr(info.output_zip, "bootloader.img", bootloader_img) fstab = info.info_dict["fstab"] |