Skip to content

Instantly share code, notes, and snippets.

@mariotpc
Created August 17, 2020 16:59
Show Gist options
  • Save mariotpc/97df9cb790d9d8c6cbf8893a5783d29a to your computer and use it in GitHub Desktop.
Save mariotpc/97df9cb790d9d8c6cbf8893a5783d29a to your computer and use it in GitHub Desktop.
Extract Firmware of my Nebula 1200AC
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
64 0x40 xz compressed data
2162688 0x210000 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 6502290 bytes, 2019 inodes, blocksize: 131072 bytes, created: 2018-06-06 07:02:05
9830400 0x960000 JFFS2 filesystem, little endian
dd if=tf_recovery.img of=header.bin bs=1 count=64 skip=0
dd if=tf_recovery.img of=xzdata.xz bs=1 count=2162624 skip=64
dd if=tf_recovery.img of=squashfs.bin bs=1 count=7667712 skip=2162688
dd if=tf_recovery.img of=jffs2.bin bs=1 skip=9830400
dd if=header.bin of=somefile.img bs=1 count=64
dd if=xzdata.xz of=somefile.img bs=1 count=2162624 seek=64
dd if=squashfs.bin of=somefile.img bs=1 count=7667712 seek=2162688
dd if=jffs2.bin of=somefile.img bs=1 count=6488144 seek=9830400
64 0x40 TRX firmware header, little endian, image size: 6590464 bytes, CRC32: 0xE05F6EFF, flags: 0x0, version: 1, header size: 28 bytes, loader 92 0x5C LZMA compressed data, properties: 0x5D, dictionary size: 65536 bytes, uncompressed size: 4177792 bytes
1721492 0x1A4494 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 4865162 bytes, 737 inodes, blocksize: 131072 bytes, created:
dd if=Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin of=header.bin bs=1 count=64 skip=0
dd if=Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin of=trx.trx bs=1 count=28 skip=64
dd if=Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin of=lzma.lzma bs=1 count=1721400 skip=92
dd if=Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin of=squashfs.fs bs=1 skip=1721492
dd if=header.bin of=somefile.img bs=1 count=64
dd if=trx.trx of=somefile.img bs=1 count=28 seek=64
dd if=lzma.lzma of=somefile.img bs=1 count=1721400 seek=92
dd if=squashfs.fs of=somefile.img bs=1 count=4869036 seek=1721492
This value 4869036 comes from:
[mariotpc@fedora31 Nebula1200-ac]$ dd if=Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin of=squashfs.fs bs=1 skip=1721492
4869036+0 records in
4869036+0 records out
4869036 bytes (4.9 MB, 4.6 MiB) copied, 7.47837 s, 651 kB/s
Check
[root@fedora31 Nebula1200-ac]# md5sum somefile.img
256592bdc045e16279953695eb991f1e somefile.img
[root@fedora31 Nebula1200-ac]# md5sum Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin
256592bdc045e16279953695eb991f1e Nebula1200-ac-v15.03.4.14_en_Nex01_2.test.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment