[Release] Network Based Hard Drive Imaging Tool (XBDD)

Discussion in 'Xbox (Original console)' started by stuntpenguin, Sep 4, 2016.

  1. stuntpenguin

    stuntpenguin Spirited Member

    Joined:
    Jun 5, 2009
    Messages:
    117
    Likes Received:
    69
    Edit: Looks like I was a little premature releasing this tool. Going to do a few bug fixes. A new version will be available soon.

    Double Edit: Fixed data encoding issue, one issue left to solve!

    This is a tool I made to image Xbox hard drives over an Ethernet connection. It's meant to be run on debug and development kits in hopes of recovering deleted files. The primary appeal of this is the ability to image drives without breaking those pristine seals on your kit. There are two parts to this program: server and client. The "server" runs on the Xbox and the client is to be run on a PC you wish to send the hard drive image to.

    It images the hard drive 1/16th at a time (about 520mb). Each of these transfers takes about an hour and the Xbox needs to be restarted between each transfer. This is primarily for RAM limitations PC side and the fact that if something does go wrong in the transfer, you'll know because the client is still running for more than an hour.

    This tool is still very crude so run it at your own risk. I experienced one oddity where I got a few extra bytes at the end of every sector when running from a disc on my debug kit. I never got those extra bytes when running from the hard drive on my DVT4 (Which I used for development of this tool). I accounted for those extra bytes in this release. I assume that those extra bytes are a result of running from a disc and you should have no problem with it.

    There is no form of progress indicator implemented, but if you want to see how far along the transfer is you can look at the memory usage of the client in task manager. That number needs to get to about 520mb. You should also see some level of network usage from the client to be sure that it's working. You will need to find the IP of your Xbox in the dashboard of your router under DHCP to use this tool.

    Anything else you need to know should be in the readme. I plan to eventually add a GUI for the server to show the Xbox's IP address, some kind of progress indicator, improve on imaging speed, and let the user select sectors to image, choose save location, etc. I'm pretty burned out on this project for now so don't expect these features anytime soon.

    Download: Removed until the next version
    Happy imaging! Hope you guys can find some cool stuff! I've already found a few goodies.
     
    Last edited: Sep 7, 2016
    CodeAsm, sonik, XboxSurgeon and 4 others like this.
  2. Shane McRetro

    Shane McRetro Blast Processed Since 199X

    Joined:
    Mar 11, 2012
    Messages:
    2,078
    Likes Received:
    194
    And to think I was just running out of things to do... :)
    I'll give it a shot on whatever hard drive is sitting in my DVT4
    Thanks! :D
     
    HEX1GON likes this.
  3. stuntpenguin

    stuntpenguin Spirited Member

    Joined:
    Jun 5, 2009
    Messages:
    117
    Likes Received:
    69
    Before you try it out, run "XBDDClient.exe yourXboxIP model" to get the model number of your hard drive. The tool is designed to image drives with 63 sectors / track, 16 heads, and 16,383 cylinders. Check the specifications of your drive online to make sure it's the same. This was the geometry of my two kit's drives. The only thing that really needs to be the same is the number of sectors and heads. I'm under the impression that all Xbox drives use this geometry. If not, you'll get some bogus data back. The system should be reset after running the model command.

    Also after running a read00 command, put the file you get in a hex editor. Verify that "FATX" appears at the hex address 80000 to be sure that everything is working as it should be.

    Edit: I discovered an error with the encoding of certain bytes that I need to fix (probably a client side issue), as well as one other possible error where a sector repeats itself where it shouldn't. Hold off on using the tool until the next update.
     
    Last edited: Sep 4, 2016
  4. Shane McRetro

    Shane McRetro Blast Processed Since 199X

    Joined:
    Mar 11, 2012
    Messages:
    2,078
    Likes Received:
    194
    Ah, today was the day I had time to pop the DVT up on the bench - just my luck! :D
    Looking forward to the next release! :)
     
  5. stuntpenguin

    stuntpenguin Spirited Member

    Joined:
    Jun 5, 2009
    Messages:
    117
    Likes Received:
    69
    The repeating sector issue has had me stumped for the last few days. There doesn't seem to be any rhyme or reason to it, although I'm sure there is. My reads are consistently messed up meaning that if I image the same part of the drive two times and compare the files, they are identical and both messed of with the same data at the same wrong locations in each file.

    I've tried to track down just how much data is misplaced and how frequently but that's been found to be variable. The max length of misplaced data is 63 sectors (which is the number of sectors it reads at once) so I guess that's a start. If anyone is handy with C++ and would like to take a crack at solving this issue, send me a message!
     
  6. rso

    rso Gone. See y'all elsewhere, maybe.

    Joined:
    Mar 26, 2010
    Messages:
    2,190
    Likes Received:
    447
    No source provided, or just temporarily taken down? You know, Linus's law might be helpful in eliminating those duped sectors...
     
    Syclopse likes this.
  7. stuntpenguin

    stuntpenguin Spirited Member

    Joined:
    Jun 5, 2009
    Messages:
    117
    Likes Received:
    69
    The client is a modified version of the MSDN "Asynchronous Client Socket Example" in C# and the server is a hacked together, modified version of the nexgen dashboard's HTTP server and XKUtils XKHDD. It's guaranteed to be an unprofessional mess of code so don't judge too hard.

    The problem most likely resides in the while loop at line 329 of of Httpd.cpp or within the if statement of XKHDD.cpp on line 286. I could be wrong though. Maybe it's a client issue.

    Source

    It's worth noting that in this version of the source, the encoding error has been fixed and the client PC no longer needs copious amounts of RAM because the file writes / appends in increments.

    I just want to get at that juicy NFS MW material on my HDD :(
     
    Last edited: Sep 10, 2016
  8. rso

    rso Gone. See y'all elsewhere, maybe.

    Joined:
    Mar 26, 2010
    Messages:
    2,190
    Likes Received:
    447
    had a quick glance. just guessing here, but in readSector, XKHDD::SendATACommand might fail (and leave the data buffer untouched), yet you don't check for that (and don't even zero out the buffer beforehand). In that case you have the previous read's data buffered, no knowledge of something going wrong, and happily return old data.

    always checking return values is a good habit to get into.
     
    stuntpenguin likes this.
  9. stuntpenguin

    stuntpenguin Spirited Member

    Joined:
    Jun 5, 2009
    Messages:
    117
    Likes Received:
    69
    Thanks! solid advice. I zero'd out the buffer before each read and made it continue to try read the sectors until SendATACommand returned true but ended up with the same result. I'm not exactly the most competent programmer so maybe I did those things wrong but I think I did it properly. The only reason SendATACommand will ever return false is if the ATA status register doesn't give the 'okay'. I'll keep fiddling around.
     
    Shane McRetro likes this.
  10. mmz16x

    mmz16x Spirited Member

    Joined:
    Apr 29, 2010
    Messages:
    145
    Likes Received:
    3
  11. stuntpenguin

    stuntpenguin Spirited Member

    Joined:
    Jun 5, 2009
    Messages:
    117
    Likes Received:
    69
    Not much. Haven't really looked at this much and my dev computer won't boot. It's on the back burner but not a huge priority at the moment. Honestly probably just some dumb mistake in my code. Linked to the code an earlier post if you wants to look at it.
     
    Shane McRetro likes this.
  12. mmz16x

    mmz16x Spirited Member

    Joined:
    Apr 29, 2010
    Messages:
    145
    Likes Received:
    3
    i dont know how to code yet but i am looking forward to this project it has so much potential :)
     
  13. CodeAsm

    CodeAsm ohci_write: Bad offset 30

    Joined:
    Dec 22, 2010
    Messages:
    1,500
    Likes Received:
    176
    Hmm, Thx looking forward for the next version. will check the source version too ;)
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page