mobrembski / tprepack

Firmware repack utility for TPlink XZ000-G3 GPON Terminal
18 stars 6 forks source link

No change after upgrade mod firmware #3

Open danysaifuddin opened 1 year ago

danysaifuddin commented 1 year ago

No change after upgrade mod firmware Here is the log :

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ sudo make [sudo] password for dany: [tprepack] CC tprepack

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ sudo unpack sudo: unpack: command not found

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ make unpack sudo sh extract_rootfs.sh Using file: ./input.bin Checking image type... hexdump: result_orig.bin: No such file or directory hexdump: all input file arguments failed Detected full dump! 3670016+0 records in 3670016+0 records out 3670016 bytes (3.7 MB, 3.5 MiB) copied, 3.90271 s, 940 kB/s WARNING: Extracting will take some time, please be patient During process you will be asked for a password, this is due to unsquashfs cannot fully extract image without root Looking for Squashfs image...Please wait Found Squashfs! Offset of squashfs: 1245184 Copying header with linux to extracted_header.bin 1245184+0 records in 1245184+0 records out 1245184 bytes (1.2 MB, 1.2 MiB) copied, 1.35345 s, 920 kB/s Header has been written Copying squashfs to extracted_squashfs 2424832+0 records in 2424832+0 records out 2424832 bytes (2.4 MB, 2.3 MiB) copied, 2.58828 s, 937 kB/s Squashfs has been written Unpacking Squashfs... Parallel unsquashfs: Using 8 processors 555 inodes (384 blocks) to write

[======================================================================================|] 939/939 100%

created 367 files created 78 directories created 124 symlinks created 64 devices created 0 fifos created 0 sockets created 0 hardlinks DONE! Now you can modify system in squashfs-root. Then run make repack

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ make repack sudo sh pack_firmware.sh Packing firmware...Please wait Parallel mksquashfs: Using 8 processors Creating 4.0 filesystem on packed.squash, block size 131072. [======================================================================================/] 384/384 100%

Exportable Squashfs 4.0 filesystem, lzma compressed, data block size 131072 compressed data, compressed metadata, compressed fragments, compressed xattrs, compressed ids duplicates are removed Filesystem size 2367.76 Kbytes (2.31 Mbytes) 21.70% of uncompressed filesystem size (10912.75 Kbytes) Inode table size 4328 bytes (4.23 Kbytes) 20.80% of uncompressed inode table size (20807 bytes) Directory table size 5581 bytes (5.45 Kbytes) 44.78% of uncompressed directory table size (12464 bytes) Number of duplicate files found 43 Number of inodes 633 Number of files 367 Number of fragments 33 Number of symbolic links 124 Number of device nodes 64 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 78 Number of hard-links 0 Number of ids (unique uids + gids) 2 Number of uids 2 root (0) dany (1000) Number of gids 2 root (0) dany (1000) Rootfs created as packed.squash Firmware joined as output_firmware.bin Generating footer... Header Magic number: 0x32524448 found 0x32524448 ...ok Header Magic device: 0x00000100 found 0x00000100 ...ok tclinux.bin size: 3670016 (0x00380000) found 3670016 (0x00380000) ...ok tclinux.bin checksum: 0x4E4C3FF5 found 0xEDC422DB ...failed Checksum fixed. Creating footer... TP Product ID: 0x4685b102 (1183166722) TP Version: 2.0.0.1 TP Version in HEX: 0x2.0x0.0x0.0x1 Calculated CRC:8de2a1bb8da343ec98343a29553e766e output_firmware.bin Done...Please double check size. If your file ends at lower 003800e8, then it's good 00380000 6f 6b 30 6f 77 70 61 6b 64 69 65 39 38 77 64 6b |ok0owpakdie98wdk| 00380010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00380040 00 00 00 00 00 00 00 00 00 00 00 00 46 85 b1 02 |............F...| 00380050 02 00 00 01 03 01 04 00 00 00 00 00 00 00 00 00 |................| 00380060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 003800d0 00 00 00 00 8d e2 a1 bb 8d a3 43 ec 98 34 3a 29 |..........C..4:)| 003800e0 55 3e 76 6e 00 00 00 00 |U>vn....| 003800e8 All good! use result.bin to update device

vinhnguyen2665 commented 1 year ago

No change after upgrade mod firmware Here is the log :

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ sudo make [sudo] password for dany: [tprepack] CC tprepack

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ sudo unpack sudo: unpack: command not found

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ make unpack sudo sh extract_rootfs.sh Using file: ./input.bin Checking image type... hexdump: result_orig.bin: No such file or directory hexdump: all input file arguments failed Detected full dump! 3670016+0 records in 3670016+0 records out 3670016 bytes (3.7 MB, 3.5 MiB) copied, 3.90271 s, 940 kB/s WARNING: Extracting will take some time, please be patient During process you will be asked for a password, this is due to unsquashfs cannot fully extract image without root Looking for Squashfs image...Please wait Found Squashfs! Offset of squashfs: 1245184 Copying header with linux to extracted_header.bin 1245184+0 records in 1245184+0 records out 1245184 bytes (1.2 MB, 1.2 MiB) copied, 1.35345 s, 920 kB/s Header has been written Copying squashfs to extracted_squashfs 2424832+0 records in 2424832+0 records out 2424832 bytes (2.4 MB, 2.3 MiB) copied, 2.58828 s, 937 kB/s Squashfs has been written Unpacking Squashfs... Parallel unsquashfs: Using 8 processors 555 inodes (384 blocks) to write

[======================================================================================|] 939/939 100%

created 367 files created 78 directories created 124 symlinks created 64 devices created 0 fifos created 0 sockets created 0 hardlinks DONE! Now you can modify system in squashfs-root. Then run make repack

┌──(dany㉿kali)-[~/Downloads/TPLINK - XZ000-G3/tprepack-master] └─$ make repack sudo sh pack_firmware.sh Packing firmware...Please wait Parallel mksquashfs: Using 8 processors Creating 4.0 filesystem on packed.squash, block size 131072. [======================================================================================/] 384/384 100%

Exportable Squashfs 4.0 filesystem, lzma compressed, data block size 131072 compressed data, compressed metadata, compressed fragments, compressed xattrs, compressed ids duplicates are removed Filesystem size 2367.76 Kbytes (2.31 Mbytes) 21.70% of uncompressed filesystem size (10912.75 Kbytes) Inode table size 4328 bytes (4.23 Kbytes) 20.80% of uncompressed inode table size (20807 bytes) Directory table size 5581 bytes (5.45 Kbytes) 44.78% of uncompressed directory table size (12464 bytes) Number of duplicate files found 43 Number of inodes 633 Number of files 367 Number of fragments 33 Number of symbolic links 124 Number of device nodes 64 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 78 Number of hard-links 0 Number of ids (unique uids + gids) 2 Number of uids 2 root (0) dany (1000) Number of gids 2 root (0) dany (1000) Rootfs created as packed.squash Firmware joined as output_firmware.bin Generating footer... Header Magic number: 0x32524448 found 0x32524448 ...ok Header Magic device: 0x00000100 found 0x00000100 ...ok tclinux.bin size: 3670016 (0x00380000) found 3670016 (0x00380000) ...ok tclinux.bin checksum: 0x4E4C3FF5 found 0xEDC422DB ...failed Checksum fixed. Creating footer... TP Product ID: 0x4685b102 (1183166722) TP Version: 2.0.0.1 TP Version in HEX: 0x2.0x0.0x0.0x1 Calculated CRC:8de2a1bb8da343ec98343a29553e766e output_firmware.bin Done...Please double check size. If your file ends at lower 003800e8, then it's good 00380000 6f 6b 30 6f 77 70 61 6b 64 69 65 39 38 77 64 6b |ok0owpakdie98wdk| 00380010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00380040 00 00 00 00 00 00 00 00 00 00 00 00 46 85 b1 02 |............F...| 00380050 02 00 00 01 03 01 04 00 00 00 00 00 00 00 00 00 |................| 00380060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 003800d0 00 00 00 00 8d e2 a1 bb 8d a3 43 ec 98 34 3a 29 |..........C..4:)| 003800e0 55 3e 76 6e 00 00 00 00 |U>vn....| 003800e8 All good! use result.bin to update device

Did you edit the squashfs-root/web/frame/menu.htm file before packaging?

danysaifuddin commented 1 year ago

No, i just dump the firmware from serial command, rename dump firmware yo inout.bin, and then make, make unpack, and make repack. Did i miss some step?

vinhnguyen2665 commented 1 year ago

Yep, I also just edited my firmware, I edited (uncommented) the file squashfs-root/web/frame/menu.htm to show hidden menus. then repack and upgrade.

jvalenciag commented 9 months ago

Do you have the firmware for v2 or v1?