sebaubuntu-python / aospdtgen

LineageOS device tree generator
220 stars 44 forks source link

AssertionError when Running aospdtgen on MIUI Dump #69

Open RuslanYestemessov opened 6 months ago

RuslanYestemessov commented 6 months ago

Operating System: Ubuntu 23.04 Python Version: 3.10 aospdtgen Version: 1.1.1

I encountered an AssertionError when attempting to generate an Android device tree using aospdtgen with a MIUI dump from the ZIYIGlobal variant. This error occurs during the initial phase where the tool tries to figure out the partition scheme.

Version 1.1.1

[INFO] Figuring out partitions scheme
Traceback (most recent call last):
...
File "/home/ruslan/.local/lib/python3.10/site-packages/sebaubuntu_libs/libandroid/partitions/partitions.py", line 27, in __init__
    assert PartitionModel.SYSTEM in self.partitions
AssertionError

I would appreciate any guidance on resolving this issue or any workarounds available. Thank you!

PS: Firmware OTA file here

vedxp commented 6 months ago

Encountering the same:

python3 -m aospdtgen /working/export84276185
$ Android device tree generator
Version 1.1.1

[INFO] Figuring out partitions scheme
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/workspace/.pyenv_mirror/user/current/lib/python3.12/site-packages/aospdtgen/__main__.py", line 11, in <module>
    main()
  File "/workspace/.pyenv_mirror/user/current/lib/python3.12/site-packages/aospdtgen/main.py", line 31, in main
    dump = DeviceTree(args.dump_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/.pyenv_mirror/user/current/lib/python3.12/site-packages/aospdtgen/device_tree.py", line 36, in __init__
    self.partitions = Partitions(self.path)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/.pyenv_mirror/user/current/lib/python3.12/site-packages/sebaubuntu_libs/libandroid/partitions/partitions.py", line 27, in __init__
    assert PartitionModel.SYSTEM in self.partitions
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
Minionguyjpro commented 3 months ago

Getting same issue:

Android device tree generator
Version 1.1.1

[INFO] Figuring out partitions scheme
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/minionguyjpro/.local/lib/python3.12/site-packages/aospdtgen/__main__.py", line 11, in <module>
    main()
  File "/home/minionguyjpro/.local/lib/python3.12/site-packages/aospdtgen/main.py", line 31, in main
    dump = DeviceTree(args.dump_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/minionguyjpro/.local/lib/python3.12/site-packages/aospdtgen/device_tree.py", line 36, in __init__
    self.partitions = Partitions(self.path)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/minionguyjpro/.local/lib/python3.12/site-packages/sebaubuntu_libs/libandroid/partitions/partitions.py", line 27, in __init__
    assert PartitionModel.SYSTEM in self.partitions
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
Minionguyjpro commented 3 months ago

Whoops, think I found the issue. We shouldn't use the boot image. Instead we should use our own self dumped image using dumpyara.