(c) 2003 XDA Developers
by itsme@xs4all.nl
web: http://www.xs4all.nl/~itsme/projects/xda/OsImageTool.html
wiki: OsImageTool
source: browse online

OsImageTool only works with ppc2002+ppc2003 roms for the xda1/wallaby, have a look at nbftools for information on how to flash other devices.


This tool is a replacement for XDARit, with less opportunity for the user to damage their disks or devices.

When used interactively, you see 2 selection boxes, from which you can either select a device or specify a file. Devices can be a local sd card device, xda sd card device, or xda ROM. The Sourcefile can be a .bin, .nb1, or nbf file, the Destinationfile can be either a .nb1 or a .nbf file.

The program will check if the sdcard you are trying to write to is large enough, not a harddisk, or too large, which may indicate you are not writing to an sdcard. ( or maybe you are using this software 2 years from now when 2+G cards will be common. )

This program will only create type 1 sd cards, which means you cannot accidentally trash your bootloader with it.

Clicking 'COPY' will try to perform the action selected.
Clicking 'Cancel' will exit the program.


 -r <source>
 -w <destination>
 -a Be as automatic as possible
 -f Do not check filesize
 --register Install as .nb1 and .nbf handler
<source> and <destination> may both be one of when 'localsdcard' is selected with '-a' (auto) and more than 1 sdcard is found, OsImageTool will allow the user to select the desired card.




You can download the source + exe distribution from
v1.00 : http://nah6.com/~itsme/download/oit_100.zip.
v1.01 : http://nah6.com/~itsme/download/oit_101.zip.
v1.05 : http://nah6.com/~itsme/download/oit_105.zip.

or browse the source


From the source + exe distribution copy OsImageTool.exe and itsutils.dll to the "programme A" directory as created by unpacking jeff's-exe (http://cuba.calyx.nl/~jsummers/XDA/) to a directory in your "Program Files" directory. Then run 'OsImageTool --register'.

currently OsImageTool depends on mfc71.dll, which can be downloaded from http://nah6.com/~itsme/download/mfc71.zip.


Currently things may go wrong if you unplug / replug devices while OsImageTool is already running.

adaptrom notices that I have not yet calculated the checksum.

writing of 5.17 bootloader cards not supported

does not know how to handle data in the top 1M of the rom.
this is only an issue if you want to restore a saved rom, including saved contacts.
or in one case the first 2003 rom released had it's xipchain in that area, but I suspect that to be an oversight by htc.


To build this you may need to change the IncludeDirectories and LibraryDirectories settings in vc++, they currently point to paths on my machine, which may not have the same disks as yours.

You need the pocketpc2002 sdk ( for the activesync or rapi libaries ) from microsoft, and the boost ( from http://www.boost.org/ ) headerfiles. I am only using the header files from the boost distribution, no compilation of boost nescesary.


This is a very raw description of how the various classes relate to each other. I try to work with STL objects as much as possible, in most cases a wrapper around the systemcalls is made for this.


[some research on how to relate drive letters to the device identification]
useful ioctls:

usenet articles on lowlevel disk ioctls: