From 6c57efafc5d35038e165e9acd15fd38a54ba5fe3 Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan
Date: Thu, 24 Nov 2011 09:38:07 +0700
Subject: Fixed progress bar in releasetools
---
releasetools/aries_edify_generator.py | 4 +---
releasetools/aries_ota_from_target_files | 9 ++++-----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/releasetools/aries_edify_generator.py b/releasetools/aries_edify_generator.py
index 8fb1e20..3261b44 100644
--- a/releasetools/aries_edify_generator.py
+++ b/releasetools/aries_edify_generator.py
@@ -24,9 +24,7 @@ import edify_generator
class EdifyGenerator(edify_generator.EdifyGenerator):
def AssertDevice(self, device):
edify_generator.EdifyGenerator.AssertDevice(self, device)
-
- self.script.append('ui_print("Checking state of BML/MTD...");')
-
+ self.script.append('show_progress(0.15, 5);');
self.script.append(
('package_extract_file("modem.bin", "/tmp/modem.bin");\n'
'set_perm(0, 0, 0777, "/tmp/modem.bin");'))
diff --git a/releasetools/aries_ota_from_target_files b/releasetools/aries_ota_from_target_files
index 3ef8c26..5a913a4 100755
--- a/releasetools/aries_ota_from_target_files
+++ b/releasetools/aries_ota_from_target_files
@@ -74,16 +74,17 @@ def WriteFullOTAPackage(input_zip, output_zip):
# ts = GetBuildProp("ro.build.date.utc", input_zip)
# script.AssertOlderBuild(ts)
+ # script.ShowProgress(0.15, 5) in device-specific assert as I could not get it to show up before it in here
+
AppendAssertions(script, input_zip)
device_specific.FullOTA_Assertions()
- script.ShowProgress(0.5, 0)
-
if OPTIONS.wipe_user_data:
script.FormatPartition("/data")
script.FormatPartition("/system")
script.Mount("/system")
+ script.ShowProgress(0.7, 30);
script.UnpackPackageDir("recovery", "/system")
script.UnpackPackageDir("system", "/system")
@@ -96,14 +97,12 @@ def WriteFullOTAPackage(input_zip, output_zip):
script.UndoRetouchBinaries(retouch_files)
Item.GetMetadata(input_zip)
+ script.ShowProgress(0.15, 5)
Item.Get("system").SetPermissions(script)
- script.ShowProgress(0.2, 0)
-
CopyBootFiles(input_zip, output_zip)
CopyBMLoverMTD(output_zip)
- script.ShowProgress(0.3, 0)
device_specific.FullOTA_InstallEnd()
if OPTIONS.extra_script is not None:
--
cgit v1.1