Permalink
Browse files

OTA without boot.img for Milestone (as the boot is signed, we can't m…

…odify it anyway)
  • Loading branch information...
nadlabak committed Sep 28, 2010
1 parent 0bc71cb commit 147cf06f721b0426ca8e9b7477545fedde40742f
Showing with 12 additions and 6 deletions.
  1. +12 −6 tools/releasetools/ota_from_target_files
@@ -101,6 +101,7 @@ OPTIONS.worker_threads = 3
OPTIONS.backuptool = False
OPTIONS.recoveryex = False
OPTIONS.override_device = 'auto'
OPTIONS.boot = False
def MostPopularKey(d, default):
"""Given a dict, return the key corresponding to the largest
@@ -420,8 +421,10 @@ def WriteFullOTAPackage(input_zip, output_zip):
symlinks = CopySystemFiles(input_zip, output_zip)
script.MakeSymlinks(symlinks)
boot_img = File("boot.img", common.BuildBootableImage(
os.path.join(OPTIONS.input_tmp, "BOOT")))
if OPTIONS.boot:
boot_img = File("boot.img", common.BuildBootableImage(
os.path.join(OPTIONS.input_tmp, "BOOT")))
if OPTIONS.recoveryex == False:
recovery_img = File("recovery.img", common.BuildBootableImage(
os.path.join(OPTIONS.input_tmp, "RECOVERY")))
@@ -430,16 +433,19 @@ def WriteFullOTAPackage(input_zip, output_zip):
Item.GetMetadata(input_zip)
Item.Get("system").SetPermissions(script)
common.CheckSize(boot_img.data, "boot.img")
common.ZipWriteStr(output_zip, "boot.img", boot_img.data)
if OPTIONS.boot:
common.CheckSize(boot_img.data, "boot.img")
common.ZipWriteStr(output_zip, "boot.img", boot_img.data)
script.ShowProgress(0.2, 0)
if OPTIONS.backuptool:
script.ShowProgress(0.2, 10)
script.RunBackup("restore")
script.ShowProgress(0.2, 10)
script.WriteRawImage("boot", "boot.img")
if OPTIONS.boot:
script.ShowProgress(0.2, 10)
script.WriteRawImage("boot", "boot.img")
script.ShowProgress(0.1, 0)
device_specific.FullOTA_InstallEnd()

0 comments on commit 147cf06

Please sign in to comment.