this tool is part of the itsutils tools collection.
source can be found at http://nah6.com/itsme/cvs-xdadevtools/itsutils/src/pdocread.cpp
This tool can be used to read and list various parts of m-systems DiskOnChip devices. The -d, -p, and -h options can be used to select a specific disk device. Only specifying -d will open that device directly. Specifying -d and -p, will open the device using the storage manager, and then us the partition specified with -p. To circumvent a problem with truncated device names in some WinCE versions, you can also specify a known open device handle, using -h.
Use "pdocread -l" to get a list of known devices, and open handles on your wince device.
The -n, -w, and -o options are used to select what access method is to be used. -n 0 will read from the binary partition number 0. -w will use the standard disk api to access the device, -o will access the One-time-programmable area of your DOC. when no access method is specified, the 'normal' TFFS partition will be accessed.
Be warned that the tffs API is not very stable, it causes device crashes, and on several devices it is only partially implemented.
currently pdocread is rather verbose, both on the commandprompt, and in a logfile on your wince device.
find the size of the various partitions:
C:\>pdocread -n 0 -t real nr of sectors: 4096 - 2.00Mbyte (0x200000) C:\>pdocread -n 1 -t real nr of sectors: 6144 - 3.00Mbyte (0x300000) C:\>pdocread -t real nr of sectors: 55296 - 27.00Mbyte (0x1b00000)
then copy the contents of these partitions to files, by entering the following commands on the command prompt:
pdocread -n 0 0 0x200000 docbdk0.raw pdocread -n 1 0 0x300000 docbdk1.raw pdocread 0 0x1b00000 docpart0.raw
- http://www.spv-developers.com/forum/showthread.php?p=8177 - a thread with a much more detailed explanation
often disk devices are only accessible via their kernel handle, the handles are listed in the output of =pdocread -l=, and accessed via =pdocread -h 0xHANDLEVALUE=
Usage: pdocread [options] start [ length [ filename ] ] when no length is specified, 512 bytes are assumed when no filename is specified, a hexdump is printed -t : find exact disk size -l : list all diskdevices -v : be verbose -s OFS : seek into source file ( for writing only ) -b SIZE: specify sectorsize to use when accessing disk -B SIZE: specify blocksize to use when accessing disk -G SIZE: specify blocksize to use when transfering over activesync -u PASSWD : unlock DOC device -S BK1x : specify alternate disksignature ( e.g. BIPO, BK1A .. BK1G ) Source: -d NAME : devicename or storename -p NAME : partitionname -h HANDLE : directly specify handle either specify -d and optionally -p, or specify -h Method: -n NUM : binarypartition number ( normal p if omitted ) -w : read via windows disk api -o : read OTP area if the filename is omitted, the data is hexdumped to stdout if no length is specified, 512 bytes are printed numbers can be specified as hex (ex: 0x8000) or decimal (ex: 32768)
the -w switch is useful for accessing non-diskonchip type flash devices.
the -S option is useful for accessing the rom on mDOC-H3 based devices. ( like the [HTC_Elf] or [HTC_Herald] )
the -G option is useful for accessing the rom on mDOC-G4 based devices.
note that on H3 devices the specified size to read must be exactly the size of the partition. on G4 and G3 devices the tffs api does not complain when specifying a very large size, it will just return the actual amount read.