Solved

low level hard drive help

Posted on 2003-10-27
6
258 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find boost header files using gnu make (MinGW) on Win 7 11 78
C Language combined operators 28 106
IdTCPClient1->Disconnect(); not working 3 59
I could not build boost code, 10 78
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

937 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

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now