Edit: New version available! Compatible with Kaiser, Titan, Artemis, Hermes etc.
New version 2.1rc2! This is a major upgrade to version 2.0 (and a bugfix to 2.1rc1). The ImgfsTools now support generating ROMs for Kaiser, Hermes, Titan, Artemis and probably quite some more. All Hermes-specific code was replaced with code working for all devices
The new version is attached to this post.
These are the screenshots of the original version. Have a look:
This is a completely unmodified LVSW edition WM6. It usually has 47 MByte Storage....
What happened? Well, the IMGFS partition (a.k.a. OS.nb) has 8 MByte free space. Until now it was not possible to shrink the IMGFS partiton and enlarge Storage in return, so that space was wasted.
This has changed - now also on the Kaiser!
I modified mamaich's ImgfsTools so that they now create the smallest possible OS.nb from a 'dump' directory, and also write the partition table and MSFLSH header matching the new size. The result is what you see above.
This is an excerpt from the ReadMe file from the new version 2.1rc2:
ImgFS Tools Version 2
================================================================
(Current version: 2.1rc2)
What it is
==========
These little programs help you with cooking your own ROM. They allow you to unpack an OS.nb file into individual files as you'd find them on your device, and to re-pack them into a new OS.nb which you can flash to your device. Of course, betweem unpacking and re-packing, you'll want to add/modify/remove some of them.
The tools are enhanced versions of mamaich's imgfs_tools - a huge Thank You goes to mamaich for creating them, and also for releasing the source code!
The most significant enhancement is that the IMGFS inside the generated OS.nb is no longer of fixed size, but is as small as possible. This means: the more of the unpacked files you remove before re-packing, the smaller it'll get and consequently the bigger your Storage memory will become. Also, the tools are no longer device-specific and should also work other devices than the Hermes.
*** WARNING: ***
Before you flash a ROM created with these tools, make sure you know how to recover from a non-booting ROM! For Hermes and Kaiser, you should install a HardSPL before you use these tools! I accept no responsibility for bricked devices!
Supported devices
=================
These tools have been tested on HTC devices only, and are known to work on Hermes, Kaiser, Titan and Artemis. Other devices were not tested and may or may not work.
If you want to try, I will gladly support you. However, I cannot accept responsibility for bricked devices!
How it works
============
On a high level, this is the chain of actions needed to unpack OS.nb:
RUU-signed.nbh ---(*NBHExtract)---> OS.nb ---(NBSplit)---> OS.nb.payload -->
--(ImgfsFromNb)---> imgfs.bin ---(ImgfsToDump)---> 'dump' directory
At that stage, you will want to edit the 'dump' directory. I recommend using bepe's excellent *Package Tool for this.
The reverse process is:
'dump' directory ---(ImgfsFromDump)---> imgfs-new.bin ---(ImgfsToNb)--->
OS-new.nb.payload ---(NBMerge)---> OS-new.nb ---(*NBHGen)--->
RUU-signed-new.nbh
(The tools marked with '*' are not part of the ImgfsTools, but are also available for free from xda-developers.com. There is also one additional tool, NBInfo, in this package.)
Version History
===============
2007-10-17 2.1rc2
ROMs generated by 2.1RC1 would not boot if created with a certain combination of parameters. Fixed.
2007-10-14 2.1RC1
Major overhaul:
- All Hermes-specific assumptions (like the sector size being always 0x200) are now gone.
- "conservative" mode added to ImgfsToNb and NBMerge
- on devices that have only two MSFLSH flash regions, ImgfsToNb overwrote a few bytes in the XIP section, causing unpredictable results. This was fixed.
- Removed "-emu" support from NBSplit and NBMerge, as this didn't work with WM6 emulator images.
2007-03-18 2.0 RC 2
All tools now linked statically to the MS runtime library, no longer needs DLL. No other changes.
2007-03-18 2.0 RC 1
Initial Release. Starting with version 2 to not collide with mamaich's version numbers.
===================
Enjoy!
Cheers
tadzio
New version 2.1rc2! This is a major upgrade to version 2.0 (and a bugfix to 2.1rc1). The ImgfsTools now support generating ROMs for Kaiser, Hermes, Titan, Artemis and probably quite some more. All Hermes-specific code was replaced with code working for all devices
The new version is attached to this post.
These are the screenshots of the original version. Have a look:
This is a completely unmodified LVSW edition WM6. It usually has 47 MByte Storage....
What happened? Well, the IMGFS partition (a.k.a. OS.nb) has 8 MByte free space. Until now it was not possible to shrink the IMGFS partiton and enlarge Storage in return, so that space was wasted.
This has changed - now also on the Kaiser!
I modified mamaich's ImgfsTools so that they now create the smallest possible OS.nb from a 'dump' directory, and also write the partition table and MSFLSH header matching the new size. The result is what you see above.
This is an excerpt from the ReadMe file from the new version 2.1rc2:
ImgFS Tools Version 2
================================================================
(Current version: 2.1rc2)
What it is
==========
These little programs help you with cooking your own ROM. They allow you to unpack an OS.nb file into individual files as you'd find them on your device, and to re-pack them into a new OS.nb which you can flash to your device. Of course, betweem unpacking and re-packing, you'll want to add/modify/remove some of them.
The tools are enhanced versions of mamaich's imgfs_tools - a huge Thank You goes to mamaich for creating them, and also for releasing the source code!
The most significant enhancement is that the IMGFS inside the generated OS.nb is no longer of fixed size, but is as small as possible. This means: the more of the unpacked files you remove before re-packing, the smaller it'll get and consequently the bigger your Storage memory will become. Also, the tools are no longer device-specific and should also work other devices than the Hermes.
*** WARNING: ***
Before you flash a ROM created with these tools, make sure you know how to recover from a non-booting ROM! For Hermes and Kaiser, you should install a HardSPL before you use these tools! I accept no responsibility for bricked devices!
Supported devices
=================
These tools have been tested on HTC devices only, and are known to work on Hermes, Kaiser, Titan and Artemis. Other devices were not tested and may or may not work.
If you want to try, I will gladly support you. However, I cannot accept responsibility for bricked devices!
How it works
============
On a high level, this is the chain of actions needed to unpack OS.nb:
RUU-signed.nbh ---(*NBHExtract)---> OS.nb ---(NBSplit)---> OS.nb.payload -->
--(ImgfsFromNb)---> imgfs.bin ---(ImgfsToDump)---> 'dump' directory
At that stage, you will want to edit the 'dump' directory. I recommend using bepe's excellent *Package Tool for this.
The reverse process is:
'dump' directory ---(ImgfsFromDump)---> imgfs-new.bin ---(ImgfsToNb)--->
OS-new.nb.payload ---(NBMerge)---> OS-new.nb ---(*NBHGen)--->
RUU-signed-new.nbh
(The tools marked with '*' are not part of the ImgfsTools, but are also available for free from xda-developers.com. There is also one additional tool, NBInfo, in this package.)
Version History
===============
2007-10-17 2.1rc2
ROMs generated by 2.1RC1 would not boot if created with a certain combination of parameters. Fixed.
2007-10-14 2.1RC1
Major overhaul:
- All Hermes-specific assumptions (like the sector size being always 0x200) are now gone.
- "conservative" mode added to ImgfsToNb and NBMerge
- on devices that have only two MSFLSH flash regions, ImgfsToNb overwrote a few bytes in the XIP section, causing unpredictable results. This was fixed.
- Removed "-emu" support from NBSplit and NBMerge, as this didn't work with WM6 emulator images.
2007-03-18 2.0 RC 2
All tools now linked statically to the MS runtime library, no longer needs DLL. No other changes.
2007-03-18 2.0 RC 1
Initial Release. Starting with version 2 to not collide with mamaich's version numbers.
===================
Enjoy!
Cheers
tadzio
Last edited: