Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

low level hard drive help

Posted on 2003-10-27
6
Medium Priority
?
266 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

824 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