Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mac65

macrumors member
Original poster
Mar 31, 2009
57
9
Munich, Germany
I post this here because there may be some USB device driver hackers here who might know.

I am working on a tool to read hard disks that have defective sectors.

Most drives not only take a long time to respond once they encounter a bad sector, they also eventually disconnect themselves, not responding any more. In my testing with such a drive connected via a USB 3 adapter, I found that I could simply remove the USB cable briefly to make it responsive again and continue reading.

Now I like to automate this. I could do this with extra hardware, but I'd rather do this without, if possible.

So I ask those who know more about the workings of macOS' USB device drivers: Is it possible to force a device to reconnect on the USB, as if it had been physically disconnected briefly? If so, is there a way to do that in macOS with its original drivers, or can I use a modified driver for this? If someone knows how to do that, please get in contact with me.
 
You may be able to do what you need by way of a forensic type “Write-blocker” disk connector. They are very reliable with damaged disks. Not cheap though.
 
You may be able to do what you need by way of a forensic type “Write-blocker” disk connector. They are very reliable with damaged disks. Not cheap though.
Thanks for that idea. I've heard of them, but I believe those are not controllable by software, i.e. I cannot tell them from my software to disconnect and reconnect the drive when my software decides it needs to do that.
 
Surely the likes of SpinRite already covers this as it deals at the base level outside the OS, which is generally preferable with damaged HDD's as the OS will always want to write some date one way or the other. On the occasion people have asked me I've always recommended to cease using the system or drive ASAP as further use generally reduces the chances of data recovery. SpinRite is an old tool, and I've not used in years, equally when called for it's always done a pretty good job even with HDD's way past their best days.

I think I know what you want to do; read the defective sectors within the GUI, my concern would be as long as the OS has access it will look to write, worse overwrite, while isolation and booting externally will not, if you get my drift.

BTW, Find Any File top tool 👍👍 Used it for many a year, absolutely invaluable if needing to dig about in old Mac's with countless updates, that last saw a clean install at the factory like my 2011 15" and 2008 15" which is now on it's last legs. Credit where credit is due...

n.b. no affixation to SpinRite

Q-6
 
  • Like
Reactions: barbu
my concern would be as long as the OS has access it will look to write, worse overwrite, while isolation and booting externally will not, if you get my drift.
No worries about unwanted writes. I've got that under control (by suppressing the mount operation when the user connects the drive). I've done disk data recovery for nearly 40 years now, though always only with the standard hardware everyone has.

Yay for FAF! I'll have some improvements on the way now that there's so much time and I've run thru everything on Netflix :-D
 
  • Like
Reactions: Queen6
No worries about unwanted writes. I've got that under control (by suppressing the mount operation when the user connects the drive). I've done disk data recovery for nearly 40 years now, though always only with the standard hardware everyone has.

Yay for FAF! I'll have some improvements on the way now that there's so much time and I've run thru everything on Netflix :-D

Too true; I consult internationally (energy industry), been on the ground since end Jan and don't expect much if anything until mid summer. Already written this year off financially. Absolutely same am totally saturated watching films. Getting a lot better here, finally got out; couple of drinks and great local live band, what a boost :D

If all else fails, I fall back on my music, that I never tire of 😎 Take good care & stay safe

Q-6
 
  • Like
Reactions: Mendota and mac65
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.