Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for iPhone Qualcomm MBN files #2

Open
justtryingthingsout opened this issue Aug 4, 2024 · 0 comments
Open

Support for iPhone Qualcomm MBN files #2

justtryingthingsout opened this issue Aug 4, 2024 · 0 comments

Comments

@justtryingthingsout
Copy link

justtryingthingsout commented Aug 4, 2024

Hi, I was trying to reverse engineer the format that the iPhones used for their modems, of which the MBN files in the iPhone 4s baseband firmware, located in the IPSW (software update bundle), available here at Firmware/Trek-6.7.00.Release.bbfw, seemed to match the MBN Header v3 format listed in the FORMAT.md file. However, mbn-tool does not seem to support these types of MBN files. The below error is what happens when trying to parse one of these MBN files using the tool.

Extracting restoredbl.mbn to restoredbl/...
Traceback (most recent call last):
  File "mbn-mcfg-tools/mbn/bin/mbn-tool", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/mbn_mcfg_tools/cli.py", line 62, in main
    extract(args.extract, args.extraction_dir, args.parse_trailer)
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/mbn_mcfg_tools/cli.py", line 80, in extract
    mbn = Mbn(f, parse_trailer_content=parse_trailer)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/mbn_mcfg_tools/mbn.py", line 28, in __init__
    self.parse()
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/mbn_mcfg_tools/mbn.py", line 31, in parse
    self["elf"] = ELFFile(self._stream)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/elftools/elf/elffile.py", line 84, in __init__
    self._identify_file()
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/elftools/elf/elffile.py", line 570, in _identify_file
    elf_assert(magic == b'\x7fELF', 'Magic number does not match')
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/elftools/common/utils.py", line 80, in elf_assert
    _assert_with_exception(cond, msg, ELFError)
  File "mbn-mcfg-tools/mbn/lib/python3.12/site-packages/elftools/common/utils.py", line 143, in _assert_with_exception
    raise exception_type(msg)
elftools.common.exceptions.ELFError: Magic number does not match

Therefore, I was wondering if support for these files could be implemented at all? Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant