Skip to content

Commit

Permalink
add option for output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
vm03 committed Aug 20, 2019
1 parent ccbb8c9 commit 5170d8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion payload_dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def data_for_op(op,out_file):
def dump_part(part):
print(part.partition_name)

out_file = open('output/%s.img' % part.partition_name, 'wb')
out_file = open('%s/%s.img' % (args.out, part.partition_name), 'wb')
h = hashlib.sha256()

for op in part.operations:
Expand All @@ -68,6 +68,8 @@ def dump_part(part):
parser = argparse.ArgumentParser(description='OTA payload dumper')
parser.add_argument('payloadfile', type=argparse.FileType('rb'),
help='payload file name')
parser.add_argument('--out', default='output',
help='output directory')
args = parser.parse_args()

magic = args.payloadfile.read(4)
Expand Down

0 comments on commit 5170d8a

Please sign in to comment.