Solved

low level hard drive help

Posted on 2003-10-27
6
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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!

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 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…

710 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