OSDN Git Service

otasigcheck: Extract the key
authorChirayu Desai <chirayudesai1@gmail.com>
Mon, 8 Jun 2015 18:41:29 +0000 (00:11 +0530)
committerSteve Kondik <steve@cyngn.com>
Sun, 4 Sep 2016 04:47:36 +0000 (21:47 -0700)
* commit b110c751b181423d268531c624db212d2d81e816
  "build: ota: Support for install tools in /tmp/install"
  erroneously removed the line extracting the releasekey,
  making the script a no-op as it couldn't find a key to
  compare against.

Change-Id: I0dc5d15dbf4b0531de4df9e62a5bd47ec463c2a1

tools/releasetools/edify_generator.py

index b94dafc..3390f1c 100644 (file)
@@ -166,6 +166,7 @@ class EdifyGenerator(object):
     self.script.append(('run_program("/tmp/install/bin/backuptool.sh", "%s");' % command))
 
   def ValidateSignatures(self, command):
+    self.script.append('package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");')
     # Exit code 124 == abort. run_program returns raw, so left-shift 8bit
     self.script.append('run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can\'t install this package on top of incompatible data. Please try another package or run a factory reset");')