pass blobs to write_raw_image() instead of using temp file
Change-Id: I73b71541596612552d52a8f7b1ccdd74451ac6fc
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 6c53f9e..d7b924b 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -200,9 +200,8 @@
args = {'device': p.device, 'fn': fn}
if partition_type == "MTD":
self.script.append(
- ('assert(package_extract_file("%(fn)s", "/tmp/%(device)s.img"),\n'
- ' write_raw_image("/tmp/%(device)s.img", "%(device)s"),\n'
- ' delete("/tmp/%(device)s.img"));') % args)
+ 'write_raw_image(package_extract_file("%(fn)s"), "%(device)s");'
+ % args)
elif partition_type == "EMMC":
self.script.append(
'package_extract_file("%(fn)s", "%(device)s");' % args)