Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: ics
Fetching contributors…

Cannot retrieve contributors at this time

executable file 37 lines (33 sloc) 1.358 kb
import common
import edify_generator
import os
import re
def AddAssertions(info):
edify = info.script
for i in xrange(len(edify.script)):
if ");" in edify.script[i] and ("ro.product.device" in edify.script[i] or "ro.build.product" in edify.script[i]):
edify.script[i] = edify.script[i].replace(");", ' || getprop("ro.product.device") == "u970" || getprop("ro.build.product") == "u970");')
return
def FullOTA_InstallEnd(info):
try:
input_blob = info.input_zip.read("RADIO/blob")
common.ZipWriteStr(info.output_zip, "blob", input_blob)
info.script.AppendExtra('nv_copy_blob_file("blob", "/staging");')
except KeyError:
print "no blob in target_files; skipping install"
AddAssertions(info)
def IncrementalOTA_InstallEnd(info):
try:
target_blob = info.target_zip.read("RADIO/blob")
try:
source_blob = info.source_zip.read("RADIO/blob")
except KeyError:
source_blob = None
if target_blob == source_blob:
print "blob unchanged; skipping"
else:
common.ZipWriteStr(info.output_zip, "blob", target_blob)
info.script.AppendExtra('nv_copy_blob_file("blob", "/staging");')
except KeyError:
print "no blob in target_files; skipping install"
AddAssertions(info)
Jump to Line
Something went wrong with that request. Please try again.