Hacking devices can/will void your warranty and can turn your expensive consumer electronics into worthless trash if you don't know what you're doing. This blog is for information purposes only, and if you try to hack into your own consumer electronics, you do so at your own risk. The device I'm currently hacking is the Canon SX10 IS camera.
Wednesday, January 28, 2009
The seagate problem
But my blog is for documenting how I did it.
I started out as I do with many of my ventures by going to google. In looking up how to read the disk drive serial number, I came across the linux IOCTL command, which is for direct device communication. May come in handy in the future. In trying to find a working example of how to use it, I found somebody opening the /proc/something else (I don't recall what it was) and I started thinking that maybe there was something for the drive.
So I looked in proc and found ide, found ide0 inside of it, and several files inside of that.
cat them all out and I could see tons of hexadecimal. So my first thought was to convert the hexadecimal to character format. I went to my favorite hex editor "HxD" (freeware, works really nice) and manually entered the codes. Sure enough, I saw the "SD15" code appear and then the drive model number.
Great, but I can't explain that process to non-programmers very easily. So I figured I'd see if there was some way to do it on the command line. Got as far as awk and decided it would be easier to do this in a simple C program. That would enable me to use my toolchain that I spent so long trying to build.
So the program is simple enough. It uses the built in ability of C to convert a hex string to decimal using strtol command, which is then echoed out as a character.
In other news...I think I've made some progress deciphering the memory dump I took of the machine. I was able to reconstruct a view of the screen that was on the TV at the time I took the screenshot. Don't have time to tell about it now, but details will come.
- ► 2010 (12)
- ▼ 2009 (28)