diff options
Diffstat (limited to 'mkbootimg/unpack_bootimg')
-rwxr-xr-x | mkbootimg/unpack_bootimg | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mkbootimg/unpack_bootimg b/mkbootimg/unpack_bootimg index 8e42ec029..c37acd5ac 100755 --- a/mkbootimg/unpack_bootimg +++ b/mkbootimg/unpack_bootimg @@ -76,8 +76,8 @@ def unpack_bootimage(args): if version > 0: recovery_dtbo_size = unpack('I', args.boot_img.read(1 * 4))[0] print('recovery dtbo size: %s' % recovery_dtbo_size) - recovery_dtbo_address = unpack('Q', args.boot_img.read(8))[0] - print('recovery dtbo load address: %s' % recovery_dtbo_address) + recovery_dtbo_offset = unpack('Q', args.boot_img.read(8))[0] + print('recovery dtbo offset: %s' % recovery_dtbo_offset) boot_header_size = unpack('I', args.boot_img.read(4))[0] print('boot header size: %s' % boot_header_size) else: @@ -95,16 +95,13 @@ def unpack_bootimage(args): ) # header + kernel image_info_list.append((ramdisk_offset, ramdisk_size, 'ramdisk')) - num_second_pages = get_number_of_pages(second_size, page_size) second_offset = page_size * ( num_header_pages + num_kernel_pages + num_ramdisk_pages ) # header + kernel + ramdisk image_info_list.append((second_offset, second_size, 'second')) if recovery_dtbo_size > 0: - dtbo_offset = page_size * (num_header_pages + num_kernel_pages + - num_ramdisk_pages + num_second_pages) - image_info_list.append((dtbo_offset, recovery_dtbo_size, + image_info_list.append((recovery_dtbo_offset, recovery_dtbo_size, 'recovery_dtbo')) for image_info in image_info_list: |