OSDN Git Service

Fix salt for verity tree generation.
authorGeremy Condra <gcondra@google.com>
Sat, 17 May 2014 02:14:30 +0000 (19:14 -0700)
committerGeremy Condra <gcondra@google.com>
Sat, 17 May 2014 02:14:30 +0000 (19:14 -0700)
Prior to this change salts were randomly generated, causing OTAs
to fail when they tried to check whether the system they were
installing on was binary identical to the source from which they
were generated.

Bug: 15018770
Change-Id: I86fffe2264a0c263aaf47112fb82fa71240e3403

tools/releasetools/build_image.py

index 4ad5bca..0bbdddc 100755 (executable)
@@ -30,6 +30,8 @@ import tempfile
 
 import simg_map
 
+FIXED_SALT = "aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7"
+
 def RunCommand(cmd):
   """ Echo and run the given command
 
@@ -79,7 +81,7 @@ def AdjustPartitionSizeForVerity(partition_size):
   return partition_size - verity_tree_size - verity_metadata_size
 
 def BuildVerityTree(sparse_image_path, verity_image_path, prop_dict):
-  cmd = ("build_verity_tree %s %s" % (sparse_image_path, verity_image_path))
+  cmd = ("build_verity_tree -A %s %s %s" % (FIXED_SALT, sparse_image_path, verity_image_path))
   print cmd
   status, output = commands.getstatusoutput(cmd)
   if status: