sebaubuntu-python/aospdtgen

I tried using aospdtgen to generate a device tree for Huawei P10 but error

Closed this issue · 1 comments

Hello,
I tried using aospdtgen to generate a device tree for Huawei P10
The firmware of the phone is EMUI 9 (Android 9)
But an error occurred:

Android device tree generator
Version 1.0.1

[INFO] Figuring out partitions scheme
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type None
[WARNING] Unknown HAL type native
[WARNING] Unknown HAL type native
[INFO] Parsing build props and device info
[INFO] Parsing fstab
[INFO] Extracting boot image
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/coconutat/.local/lib/python3.8/site-packages/aospdtgen/__main__.py", line 11, in <module>
    main()
  File "/home/coconutat/.local/lib/python3.8/site-packages/aospdtgen/main.py", line 31, in main
    dump = DeviceTree(args.dump_path)
  File "/home/coconutat/.local/lib/python3.8/site-packages/aospdtgen/device_tree.py", line 62, in __init__
    self.boot_configuration = BootConfiguration(self.path)
  File "/home/coconutat/.local/lib/python3.8/site-packages/aospdtgen/utils/boot_configuration.py", line 25, in __init__
    assert self.boot, "No boot image found"
AssertionError: No boot image found

I know it's because the firmware of Huawei EMUI 9 does not include boot.img. Because Huawei's firmware is deeply customized.
According to some accounts, Huawei's boot.img section is included in the system. img. Additionally, Huawei's kernel partitions are independent.
If necessary, I can upload my img and dumpyara unpacking files,
Additionally:
How to use dumpyara to unpack Huawei's special format. First use Huawei's .APP unpacking tool unpack the .APP files , then use simg2img converts all img files and compresses them into zip. Now we can use dumpyara to unpack it.

OK,rename the recovery_ramdis.img to boot.img and recovery.img.This will all fine.Maybe need rename more PARTITIONS name.