Solved

low level hard drive help

Posted on 2003-10-27
6
261 Views
Last Modified: 2010-04-01
Ok, first a quick background: I, along with a small group of diehards came up with a way to disable the EU volume cap protection on the european ipods.  Unfortunately, this way never caught on, as it is a VERY difficult process for people used to apple products to handle.
Now, to solve the problem, and possibly make it more mainstream, i would like to create a C++ (or java, altho i hate the language, i also know a little about it) application to accomplish the task for the user.

Herein lies the problem, i cannot for the life of me find any API or class file that will allow me to accomplish the specific tasks required.  I believe it would require Very Very low level hard drive access, and some way to determine which drive is the ipod on everyones computer (ipod is treated as a standard Hard Disk by linux, only as an SDA device, if that helps), and accomplish the following processes (first on the win 2k/xp platform, then possibly on the osx platform):
1) Completely repartition a hard drive, including hidden partitions.
The way the ipod is set up, there is 3 partitions, only 1 of which is viewable to the OS. AS read in osx

#:  type                  name          length         base     ( size
)
1:  Apple_partition_map partition map    62 @              1      
2:  Apple_MDFW          firmware        81920 @       63       (
40.0M)
3:  Apple_HFS*          disk           29215536 @    81983    (
13.9G**)
Device block size=512, Number of Blocks=29215536 DeviceType=0x0, DeviceId=0x0

*can also be FAT32 for windows formatted ipods
** Can be anywhere from 10G(advertisers gb, not a real one, the 13.9 is supposedly a 15gb) worth, to now 40G worth.

The 3rd partition is unimportant at the moment, only the first 2.
2) Write back a firmware image onto the MDFW partition from a binary file previously captured.  

Basically, what needs to be done is the MDFW partition needs to be resized from 32 mb to 40mb and a new firmware file written back to it.

If anyone has any information whatsoever on something that you think will help me with my task, i would be very gratefull.

Thank you all,
Erich Keane


PS, looking through the pages and pages here, i saw that perhaps createfile(\\.\PhysicalDrivex) might help me somewhat.  The OS is Windows 2000/XP only.
0
Comment
Question by:KeaneE04
6 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9631866
Take a look at Microsoft SDK Floppy sample which can be found in Microsoft SDK\Samples\winbase\IO\Floppy directory.

Readme.txt from this sample

Accessing a Floppy Disk


SUMMARY
========

The FLOPPY sample is designed to show how to access a physical floppy disk
under Windows NT.

This program has two major features:

  - It can be used to display the geometry of a disk. For example, use the
    command:

        mfmt -g a:

  - It can be used to produce a disk image, or to write a disk image to a
    floppy. For example, use the commands:

        mfmt -c a: bootdisk         - produce a disk image of a:
        mfmt -c bootdisk a:         - make a: identical to bootdisk image

MORE INFORMATION
=================

This program is very simple. Minimal error checking is done. It is meant to
provide an example of how to:

  - Open a physical disk.

  - Read a disk's geometry.

  - Perform a low-level format operation.

  - Read and write physical sectors.




0
 

Author Comment

by:KeaneE04
ID: 9632835
The problem with this is that out of the 3 partitions, only 1 has a drive letter in windows, the rest are ignored by the OS, so i dont have direct access to the disk in that way.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9632905
This sample works with physical drive and not partitions.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:KeaneE04
ID: 9643584
Thank you for your help so far, but im still not sure that I understand your recommendation.  I am using BloodShed Dev C++, so i dont have visual studio.  Do you know the web address for the document that you are speaking of, perhaps one with a method overview chart?
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10546201
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 10586133
PAQed, with points refunded (125)

ee_ai_construct
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TCP/IP Socket - connection close results in data lost 14 141
GUI: DIalog Stacking and Popping in MS C++ 4 82
How to convert MFC APP to Win32 APP. 19 98
Unable to start eclipse ? 17 154
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question