Lines Matching refs:boot_img

184 def unpack_boot_image(boot_img, output_dir):  argument
187 info.boot_magic = unpack('8s', boot_img.read(8))[0].decode()
189 kernel_ramdisk_second_info = unpack('9I', boot_img.read(9 * 4))
202 os_version_patch_level = unpack('I', boot_img.read(1 * 4))[0]
215 boot_img.read(16))[0].decode())
216 info.cmdline = cstr(unpack('512s', boot_img.read(512))[0].decode())
217 boot_img.read(32) # ignore SHA
219 boot_img.read(1024))[0].decode())
222 boot_img.read(1536))[0].decode())
225 info.recovery_dtbo_size = unpack('I', boot_img.read(1 * 4))[0]
226 info.recovery_dtbo_offset = unpack('Q', boot_img.read(8))[0]
227 info.boot_header_size = unpack('I', boot_img.read(4))[0]
232 info.dtb_size = unpack('I', boot_img.read(4))[0]
233 info.dtb_load_address = unpack('Q', boot_img.read(8))[0]
239 info.boot_signature_size = unpack('I', boot_img.read(4))[0]
289 extract_image(offset, size, boot_img, os.path.join(output_dir, name))
381 def unpack_vendor_boot_image(boot_img, output_dir): argument
383 info.boot_magic = unpack('8s', boot_img.read(8))[0].decode()
384 info.header_version = unpack('I', boot_img.read(4))[0]
385 info.page_size = unpack('I', boot_img.read(4))[0]
386 info.kernel_load_address = unpack('I', boot_img.read(4))[0]
387 info.ramdisk_load_address = unpack('I', boot_img.read(4))[0]
388 info.vendor_ramdisk_size = unpack('I', boot_img.read(4))[0]
389 info.cmdline = cstr(unpack('2048s', boot_img.read(2048))[0].decode())
390 info.tags_load_address = unpack('I', boot_img.read(4))[0]
391 info.product_name = cstr(unpack('16s', boot_img.read(16))[0].decode())
392 info.header_size = unpack('I', boot_img.read(4))[0]
393 info.dtb_size = unpack('I', boot_img.read(4))[0]
394 info.dtb_load_address = unpack('Q', boot_img.read(8))[0]
408 info.vendor_ramdisk_table_size = unpack('I', boot_img.read(4))[0]
409 vendor_ramdisk_table_entry_num = unpack('I', boot_img.read(4))[0]
410 vendor_ramdisk_table_entry_size = unpack('I', boot_img.read(4))[0]
411 info.vendor_bootconfig_size = unpack('I', boot_img.read(4))[0]
422 boot_img.seek(entry_offset)
423 ramdisk_size = unpack('I', boot_img.read(4))[0]
424 ramdisk_offset = unpack('I', boot_img.read(4))[0]
425 ramdisk_type = unpack('I', boot_img.read(4))[0]
428 boot_img.read(VENDOR_RAMDISK_NAME_SIZE))[0].decode())
431 boot_img.read(
460 extract_image(offset, size, boot_img, os.path.join(output_dir, name))
478 def unpack_bootimg(boot_img, output_dir): argument
480 with open(boot_img, 'rb') as image_file:
558 info = unpack_bootimg(args.boot_img, args.out)