@fohdeesha
FWIW, I started digging around in the UFI file format from Ruckus, specifically because I wanted to extract the packages
The first 84 bytes of a Ruckus Firmware image are some kind of header. From this header you can reconstruct another table, which has a number of packages with a specific size each and an offset where this table is located.
For SPR08095mufi.bin for example, this is
Code:
size_per_package: 42
num_packages: 13
pkg_table_start_offset: 512
pkg_table_size: size_per_package * num_packages = 546
Although it doesn't make sense to read size_per_package from the header, as it's hardcoded as 42 in the rest of the Ruckus code...
size_per_package is the size of each entry in the package table in bytes.
Each entry has:
2 bytes of whatever - maybe a version? (acc 2)
32 bytes for the package file name, should be zero terminated, so 31 characters + '0' byte (acc 34)
4 bytes for the offset of the package in the file after the table - this is a BIG ENDIAN coded uint32 (don't ask me why it's big endian) (acc 38)
4 bytes for the filesize of the package - - this is a BIG ENDIAN coded uint32 (don't ask me why it's big endian) (acc 42)
For SPR08095mufi.bin, this gives:
Code:
size_per_package: 42
num_packages: 13
pkg_table_start_offset: 512
pkg_table_size: 546
index = 0
entry_offset_in_pkg_table = 0
pkg_file_offset_after_table = 0
total_file_offset = 1058
fileName = SPR08095m.bin
fileSize = 33554432
index = 1
entry_offset_in_pkg_table = 42
pkg_file_offset_after_table = 33554432
total_file_offset = 33555490
fileName = SPR08095m.sig
fileSize = 256
index = 2
entry_offset_in_pkg_table = 84
pkg_file_offset_after_table = 33554688
total_file_offset = 33555746
fileName = spz10126.bin
fileSize = 786944
index = 3
entry_offset_in_pkg_table = 126
pkg_file_offset_after_table = 34341632
total_file_offset = 34342690
fileName = mnz10126.bin
fileSize = 786944
index = 4
entry_offset_in_pkg_table = 168
pkg_file_offset_after_table = 35128576
total_file_offset = 35129634
fileName = Python-2.7.13.tar.gz
fileSize = 7329468
index = 5
entry_offset_in_pkg_table = 210
pkg_file_offset_after_table = 42458044
total_file_offset = 42459102
fileName = httpPkg.tar.gz
fileSize = 4944796
index = 6
entry_offset_in_pkg_table = 252
pkg_file_offset_after_table = 47402840
total_file_offset = 47403898
fileName = dhcp-4.2.5-P1.tar.gz
fileSize = 739706
index = 7
entry_offset_in_pkg_table = 294
pkg_file_offset_after_table = 48142546
total_file_offset = 48143604
fileName = perf-4.4.tar.gz
fileSize = 503799
index = 8
entry_offset_in_pkg_table = 336
pkg_file_offset_after_table = 48646345
total_file_offset = 48647403
fileName = protobuf-c-1.3.1.tar.gz
fileSize = 174130
index = 9
entry_offset_in_pkg_table = 378
pkg_file_offset_after_table = 48820475
total_file_offset = 48821533
fileName = python2-protobuf-3.7.0-1-aarch6
fileSize = 551692
index = 10
entry_offset_in_pkg_table = 420
pkg_file_offset_after_table = 49372167
total_file_offset = 49373225
fileName = python2-six-1.12.0-1-any.pkg.ta
fileSize = 19732
index = 11
entry_offset_in_pkg_table = 462
pkg_file_offset_after_table = 49391899
total_file_offset = 49392957
fileName = FileMgrPkg.tar.gz
fileSize = 3782445
index = 12
entry_offset_in_pkg_table = 504
pkg_file_offset_after_table = 53174344
total_file_offset = 53175402
fileName = logmgrPkg.tar.gz
fileSize = 7612128
I can share the code which directly extracts the files if you want. Allows you to extract current, most up to date bootloaders and stuff like that.
Just tested the extractor - Successfully extracts spz10118.bin from SPR08090mcufi.bin (tested by comparing MD5 hash of extracted file and known good file from archive)