Skip to content

Add `pmbootstrap bootimg_analyze` command and prompt for boot.img during new device wizard

Administrator requested to merge feature/parse_bootimg into master

This PR adds the command pmbootstrap analyze_bootimg which extract all the information from an existing boot.img and print out the variables for the deviceinfo.

drebrez@drebrez-laptop:~/pmbootstrap$ pmbootstrap analyze_bootimg ~/boot.img
[00:26:38] (native) install unpackbootimg
[00:26:39] Put these variables in the deviceinfo file of your device:

deviceinfo_kernel_cmdline="androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_pagesize="2048"

[00:26:39] Done

And it also prompt it during the initialization wizard for a new device.

This is a working draft implementation, please review the code and suggest how can I improve it.

Merge request reports

Loading