Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e8baf90 authored by Austen Dicken's avatar Austen Dicken
Browse files

update ota_from_target_files to handle mounting/unmounting for backupscript

backupscript should not be mounting/unmounting itself as it makes other
scripts have unexpected results (such as modelid_cfg, which expects /system
to be mounted)

instead have the ota script handle the mounting/unmounting

Change-Id: I94511f4147c624d975cb3ecbeaa8b0e98f63437c
parent e5de8524
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -158,6 +158,12 @@ class EdifyGenerator(object):
                          p.device, p.mount_point))
      self.mounts.add(p.mount_point)

  def Unmount(self, mount_point):
    """Unmount the partiiton with the given mount_point."""
    if mount_point in self.mounts:
      self.mounts.remove(mount_point)
      self.script.append('unmount("%s");' % (mount_point,))

  def UnpackPackageDir(self, src, dst):
    """Unpack a given directory from the OTA package into the given
    destination directory."""
+2 −0
Original line number Diff line number Diff line
@@ -401,7 +401,9 @@ def WriteFullOTAPackage(input_zip, output_zip):
  AppendAssertions(script, input_zip)
  device_specific.FullOTA_Assertions()
  if OPTIONS.backuptool:
    script.Mount("/system")
    script.RunBackup("backup")
    script.Unmount("/system")

  script.ShowProgress(0.5, 0)