Home | History | Annotate | Download | only in releasetools

Lines Matching refs:script

58       Insert the contents of file at the end of the update script.
215 # set metadata for the files generated by this script.
303 def SetPermissions(self, script):
304 """Append set_perm/set_perm_recursive commands to 'script' to
317 script.SetPermissionsRecursive("/"+item.name, *item.best_subtree)
323 script.SetPermissions("/"+item.name, item.uid, item.gid,
332 script.SetPermissions("/"+item.name, item.uid, item.gid,
385 def AppendAssertions(script, info_dict, oem_dict = None):
389 script.AssertDevice(device)
396 script.AssertOemProperty(prop, oem_dict.get(prop))
467 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
475 script.Mount("/oem", recovery_mount_options)
490 script=script,
501 script.AssertOlderBuild(ts, ts_text)
503 AppendAssertions(script, OPTIONS.info_dict, oem_dict)
507 # the order in which the generated script has things):
523 # complete script normally (allow recovery to mark itself finished and reboot)
535 script.AppendExtra("""
538 script.WriteRawImage("/recovery", "recovery.img")
539 script.AppendExtra("""
560 script.ShowProgress(system_progress, 0)
570 system_diff.WriteScript(script, output_zip)
572 script.FormatPartition("/system")
573 script.Mount("/system", recovery_mount_options)
575 script.UnpackPackageDir("recovery", "/system")
576 script.UnpackPackageDir("system", "/system")
579 script.MakeSymlinks(symlinks)
593 system_items.Get("system").SetPermissions(script)
597 script.ShowProgress(0.1, 0)
603 vendor_diff.WriteScript(script, output_zip)
605 script.FormatPartition("/vendor")
606 script.Mount("/vendor", recovery_mount_options)
607 script.UnpackPackageDir("vendor", "/vendor")
610 script.MakeSymlinks(symlinks)
613 vendor_items.Get("vendor").SetPermissions(script)
618 script.ShowProgress(0.05, 5)
619 script.WriteRawImage("/boot", "boot.img")
621 script.ShowProgress(0.2, 10)
625 script.AppendExtra(OPTIONS.extra_script)
627 script.UnmountAll()
630 script.ShowProgress(0.1, 10)
631 script.FormatPartition("/data")
634 script.AppendExtra("""
637 script.AppendExtra("else\n")
638 script.WriteRawImage("/boot", "recovery.img")
639 script.AppendExtra("""
645 script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
700 print ("WARNING: generating edify script for a source that "
702 script = edify_generator.EdifyGenerator(source_version,
717 script=script,
762 script.Mount("/oem", recovery_mount_options)
765 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
769 # which is *not* the order in which the generated script has
787 # complete script normally (allow recovery to mark itself finished and reboot)
797 script.AppendExtra("""
800 script.AppendExtra("sleep(20);\n");
801 script.WriteRawImage("/recovery", "recovery.img")
802 script.AppendExtra("""
808 script.Print("Verifying current system...")
813 script.AssertSomeFingerprint(source_fp, target_fp)
815 script.AssertSomeThumbprint(
834 script.PatchCheck("%s:%s:%d:%s:%d:%s" %
842 script.WriteRawImage("/boot", "recovery.img")
843 script.AppendExtra("""
850 system_diff.WriteVerifyScript(script)
852 vendor_diff.WriteVerifyScript(script)
854 script.Comment("---- start making changes here ----")
858 system_diff.WriteScript(script, output_zip,
861 vendor_diff.WriteScript(script, output_zip, progress=0.1)
865 script.WriteRawImage("/boot", "boot.img")
872 script.Print("Installing boot image...")
873 script.WriteRawImage("/boot", "boot.img")
879 script.Print("Patching boot image...")
880 script.ShowProgress(0.1, 10)
881 script.ApplyPatch("%s:%s:%d:%s:%d:%s"
895 script.AppendExtra(OPTIONS.extra_script)
898 script.Print("Erasing user data...")
899 script.FormatPartition("/data")
902 script.AppendExtra("""
908 script.SetProgress(1)
909 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)
985 def EmitVerification(self, script):
989 script.SkipNextActionIfTargetExists(tf.name, tf.sha1)
990 script.PatchCheck("/"+sf.name, tf.sha1, sf.sha1)
994 def EmitExplicitTargetVerification(self, script):
997 script.FileCheck("/"+fn, sha1)
999 script.FileCheck(tf.name, tf.sha1)
1001 def RemoveUnneededFiles(self, script, extras=()):
1002 script.DeleteFiles(["/"+i[0] for i in self.verbatim_targets] +
1011 def EmitPatches(self, script, total_patch_size, so_far):
1019 script.SkipNextActionIfTargetExists(tf.name, tf.sha1)
1020 script.ApplyPatch("/"+sf.name, "-", tf.size, tf.sha1, sf.sha1, "patch/"+sf.name+".p")
1022 script.SetProgress(so_far / total_patch_size)
1025 def EmitDeferredPatches(self, script):
1028 script.ApplyPatch("/"+sf.name, "-", tf.size, tf.sha1, sf.sha1, "patch/"+sf.name+".p")
1029 script.SetPermissions("/system/build.prop", 0, 0, 0644, None, None)
1031 def EmitRenames(self, script):
1033 script.Print("Renaming files...")
1036 script.RenameFile(src, tgt.name)
1054 print ("WARNING: generating edify script for a source that "
1056 script = edify_generator.EdifyGenerator(source_version,
1065 script.Mount("/oem", recovery_mount_options)
1080 script=script,
1085 script.Mount("/system", recovery_mount_options)
1088 script.Mount("/vendor", recovery_mount_options)
1096 script.AssertSomeFingerprint(source_fp, target_fp)
1098 script.AssertSomeThumbprint(
1126 AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
1130 # which is *not* the order in which the generated script has
1148 # complete script normally (allow recovery to mark itself finished and reboot)
1158 script.AppendExtra("""
1161 script.AppendExtra("sleep(20);\n");
1162 script.WriteRawImage("/recovery", "recovery.img")
1163 script.AppendExtra("""
1169 script.Print("Verifying current system...")
1173 script.ShowProgress(0.1, 0)
1174 so_far = system_diff.EmitVerification(script)
1176 so_far += vendor_diff.EmitVerification(script)
1188 script.PatchCheck("%s:%s:%d:%s:%d:%s" %
1199 script.CacheFreeSpaceCheck(max(size))
1204 script.WriteRawImage("/boot", "recovery.img")
1205 script.AppendExtra("""
1211 script.Comment("---- start making changes here ----")
1217 script.WriteRawImage("/boot", "boot.img")
1220 script.Print("Removing unneeded files...")
1221 system_diff.RemoveUnneededFiles(script, ("/system/recovery.img",))
1223 vendor_diff.RemoveUnneededFiles(script)
1225 script.ShowProgress(0.8, 0)
1232 script.Print("Patching system files...")
1233 so_far = system_diff.EmitPatches(script, total_patch_size, 0)
1235 script.Print("Patching vendor files...")
1236 so_far = vendor_diff.EmitPatches(script, total_patch_size, so_far)
1243 script.Print("Patching boot image...")
1244 script.ApplyPatch("%s:%s:%d:%s:%d:%s"
1252 script.SetProgress(so_far / total_patch_size)
1278 script.DeleteFiles(["/system/recovery-from-boot.p",
1284 script.ShowProgress(0.1, 10)
1290 temp_script = script.MakeTemporary()
1313 script.DeleteFiles(to_delete)
1316 script.Print("Unpacking new system files...")
1317 script.UnpackPackageDir("system", "/system")
1319 script.Print("Unpacking new vendor files...")
1320 script.UnpackPackageDir("vendor", "/vendor")
1323 script.Print("Unpacking new recovery...")
1324 script.UnpackPackageDir("recovery", "/system")
1326 system_diff.EmitRenames(script)
1328 vendor_diff.EmitRenames(script)
1330 script.Print("Symlinks and permissions...")
1342 script.DeleteFiles([i[1] for i in to_create])
1343 script.MakeSymlinks(to_create)
1347 script.AppendScript(temp_script)
1353 script.AppendExtra(OPTIONS.extra_script)
1358 script.Print("Patching remaining system files...")
1359 system_diff.EmitDeferredPatches(script)
1362 script.Print("Erasing user data...")
1363 script.FormatPartition("/data")
1366 script.AppendExtra("""
1373 script.Print("Remounting and verifying system partition files...")
1374 script.Unmount("/system")
1375 script.Mount("/system")
1376 system_diff.EmitExplicitTargetVerification(script)
1379 script.Print("Remounting and verifying vendor partition files...")
1380 script.Unmount("/vendor")
1381 script.Mount("/vendor")
1382 vendor_diff.EmitExplicitTargetVerification(script)
1383 script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)