#HooToo HT-TM05 hacking stuff and junk
####David's adds
20171227:
- Added script to patch with files in files folder
So now to generate a new firmware image:
- Download-and-split.sh
- patch.sh
If it goes well you can cleanup (remove) /tmp/hootoo folder
20170321:
- Updated script with version: HooToo TM05-Support exFAT&HFS - 2.000.068.zip
- Updated script with some checks
- Added file to recommended modification to be done inside the image (to_modify.txt)
####theodric's edition
See the thread on the OpenWRT forum for more information: https://forum.openwrt.org/viewtopic.php?id=61445
20160525:
- Updated Download-and-split script to grab the latest firmware file, and to use unrar rather than unzip since the archive type has changed. Also updated the relevant variable name to reflect. That's it.
- Added checksum script "checksum_tool.sh"
- Added mksquashfs script "squish.sh" for resquashing the unsquashfs'd rootfs file from initrdup/firmware/rootfs
- Removed the HooToo firmware to avoid possibly drawing their ire. It's available elsewhere. No need for a mirror here.
I have successfully unpacked, modified, repacked, and reflashed a firmware image with this workflow:
- Run Linux, because OS X won't mount the initrdup ext2 image
- Install the squashfs tools package appropriate to your distribution
- Use Download-and-split.sh to grab and mount the latest firmware
- Use unsquashfs to unpack the firmware/rootfs file inside the initrdup somewhere outside the initrdup
- Make desired changes to the rootfs
- Use squish.sh to re-squashfs the rootfs file
- Replace the initrdup's firmware/rootfs file with your modified one
- sync and umount the initrdup
- gzip initrdup
- cat start_script.sh initrdup.gz > firmware_image_file
- checksum_tool.sh firmware_image.bin
- replace the CRCSUM value in start_script.sh with the one output by checksum_tool.sh
- once again, cat start_script.sh initrdup.gz > firmware_image_file
- flash the firmware_image_file onto your HT-TM05 using the regular web GUI
- hope that it doesn't brick it
- glhf
###TODO 20160530
- figure out how much space I actually have to work with in each of the MTD partitions so I don't cause myself problems
- implement automatic pull-in of optware or entware on either an ext2 USB flash drive or (better?) a loop-mounted ext2 fs image on a *FAT/NTFS-formatted disk
- make an /etc/profile part of the default image, and have it source something useful to making the CLI environment more user-friendly.
- no really totally actually make a /root directory that's at least somewhat writeable (tmpfs? symlink to /etc/root?)
- various cleanups and assorted whatnots
#####I found a couple other interesting projects that are relevant to the OS running on the HT-TM05 https://github.com/wingspinner/Tripmate-HT-TM02-Telnet-Enabling
https://github.com/digidem/filehub-config/blob/master/README.md
What follows below is a portion of the original readme from cryptographrix's repo, where the Download-and-split.sh script came from. See: https://github.com/cryptographrix/HooToo_HT-TM05-hacking
This repo contains a basic script that downloads the current firmware for the HooToo HT-TM05 portable router and lets you access and modify everything.
- Downloads the firmware zip file from the HooToo download site (ZIP)
- Unzips that into the actual update file, which is a stub of sh and initrdup.gz (UPDATE)
- Splits the UPDATE file into start_script.sh and initrdup.gz
- Gunzips initrdup.gz into initrdup
- Creates ./mount and...
- Mounts initrdup into ./mount
Anyone that bought one of these useful portable linux systems and wants to do more with - or customize - it.
Anything you want - eventually you'll need to reverse the process:
- sync and unmount initrdup
- gzip initrdup
- cat start-script.sh initrdup.gz > fw_...
- zip fw into HooToo....