Saturday, June 1, 2013

How to Recover/Fix USB flash drives

I was trying to hack a USB flash drive encrypted and protected by --- when I learnt a number of things about USB flash drives:
  1. All USB flash drives have few main components
    1. The flash memory chips that store the data
    2. The controller that:
      1. Allows access to the data
      2. Lets any OS understand the kind of device being used
  2. Certain controllers can be manipulated to:
    1. Create partitions
    2. Hide partitions
    3. Decided Disk encoding (EXT3FS, FATX, FAT32, HFS, ZFS, ....you name it...)
    4. Encrypt content
    5. Masquerade (across OSes) as different type of storage devices (e.g. a CD-ROM)
Now all this sounds quite terribly dreary but really helps understand the steps that I followed:


  1. Unplugged all other devices from USB ports
  2. Plugged in the dead device...

    and made sure that it was detected and that the OS had loaded at least the mass storage device drivers.
    At this stage, if I tried to access the device or even format it, all I got was an error that told me that the OS could not read the memory on the device ...
    OS Access error

  3. To figure out the:

    1. The exact controller chip used
    2. The memory chips used
    3. State of the controller and the memory chips
      I downloaded and ran Chip Genius
      (You could download this software from:
      http://www.onlinedown.net/soft/67367.htm
      or
      http://en.kbdown.com/237488.html

      I told me that this device had a Silicon Motion SM3255AB controller
      Chip Genius to identify the controller

  4. Next, I downloaded the  SMI 3255AB controller tool from http://dl.mydigit.net/special/up/smi.html
    (If you have a different controller you'll have to search and get the relevant controller)
  5. Running the tool I could see that the memory was accessible and so I could now try flashing the controller back to a default state.
    SMI Controller Tool - Initial Interface
  6.  
  7. Next I clicked the space bar to run the tool and it ran a pretest and formatted the drive thus...
    SMI Controller Tool - Flashing
    SMI Controller Tool - Flashing Complete

    OS has remounted the device and shows it empty and functional
  8. Now, I wanted to make a few low level changes so I clicked Settings (Password in most SMI controller tools is 320) and here is what you would see... (Click Ok once you are done tweaking and then run the flashing process again. Be careful and aware of what you do since it can do nasty things to the device :) )
References:
This solution would not have been possible without the painstaking recording of procedures and facts by a number of sites. Here are some that made my life easier and got more than one USB driver working:

10 comments:

Unknown said...

Thank you so much! I had a month-old 64GB Sony stick (Microvault USM64GU) that suddenly started showing up as a useless "SMI USB Memory Bar".

I had a bit of trouble finding the actual download for Chip Genius, but eventually found a direct link to the latest version on the author's site.

NOTE: AVG flagged the exe as a trojan, so I had to disable it (so far, computer hasn't self-destructed...)

Mine had a SM3267ABS controller, which wasn't supported by the SMI tool linked in step 4. A bit of Googling led me to SMI Mass Production Tool V2.5.36, which is a newer version of the one you linked.

Amendment to step 5: I had to hit the "Scan USB (F5)" button first. Then pressed "Start", and in a few minutes I had a working drive!

TG said...

Thank you so much! This was a really easy solution. A had a Verbatim 8gb usb pendrive I messed up trying to install a bootable copy of Linux (Mint) on it.
It was all made more easy thanks to the direct links provided by Jeremy. Thank you!

Ignatius Nayan D'Rozario said...

Thanks +Jeremy!

+TG Glad that the post and Jeremy's added comments helped :)

Unknown said...

Useful indication thanks

Alex Ojeda said...

Hi, great information. I have a question, after this procedure can I recover my files? I have a sony microvault that is showing as "SM3267AB Memory Bar". I need the files, the pendrive is not relevant..

Unknown said...

thank's bro... :)

Ash said...

Thank you so much man.Good tutorial-very helpfu!! I recovered an 8gb flash drive.Same kind as the one described here. Thanx again.

sivmiki said...

someone help me
specs:

-----------------------------------------------------------------------------

Description: [D:]USB háttértár(USB MEMORY BAR)
Device Type: Mass Storage Device

Protocal Version: USB 2.00
Current Speed: High Speed
Max Current: 100mA

USB Device ID: VID = 090C PID = 3000

Device Vendor: Silicon Motion,Inc.
Device Name: SM3255AA MEMORY BAR
Device Revision: 0100

Product Model: USB MEMORY BAR
Product Revision: 1000

Controller Vendor: SMI
Controller Part-Number: SM3255AA - ISP NONE

-----------------------------------------------------------------------------

when i press start, it says: "flashID not found"

Unknown said...

MY PENDRIVE IS SHOWING 0M

Unknown said...

Thank you very much! I'm ready with my pendrive! :-)