releasetools: force unmount system before format
Change-Id: Id7c7c9dc6cde50050256f9495288866a49baf810
This commit is contained in:
parent
69e9daff39
commit
2cd0b405fa
@ -35,3 +35,12 @@ class EdifyGenerator(edify_generator.EdifyGenerator):
|
||||
('assert(package_extract_file("%(image)s", "/tmp/%(image)s"),\n'
|
||||
' write_raw_image("/tmp/%(image)s", "%(partition)s"),\n'
|
||||
' delete("/tmp/%(image)s"));') % args)
|
||||
|
||||
def Unmount(self, mount_point):
|
||||
"""Unmount the partition with the given mount_point."""
|
||||
fstab = self.info.get("fstab", None)
|
||||
if fstab:
|
||||
p = fstab[mount_point]
|
||||
self.script.append('unmount("%s");' %
|
||||
(p.mount_point))
|
||||
self.mounts.add(p.mount_point)
|
||||
|
@ -68,6 +68,7 @@ def WriteFullOTAPackage(input_zip, output_zip):
|
||||
if OPTIONS.wipe_user_data:
|
||||
script.FormatPartition("/data")
|
||||
|
||||
script.Unmount("/system")
|
||||
script.FormatPartition("/system")
|
||||
script.Mount("/system")
|
||||
script.UnpackPackageDir("recovery", "/system")
|
||||
|
Loading…
Reference in New Issue
Block a user