Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any possible way to re-program a USB drive's microcontroller?

Ok, so i have opened usb drives before and i understand that they use generic MCU's to control the NAND flash storage. What I was thinking was if one could reprogram them to say, start an application upon insertion into a USB port, then it could be useful for a multitude of applications (such as copying files automatically). I understand that different MCU's may/may not use completely different ASM code, but there is also the problem of how to even communicate with it (i.e. the protocol and such). Could this be possible? I have heard of things like MP Tools which (in theory) can low-level format and reset the drive to factory default, but not edit any of the code used on it.

like image 201
Antonio Escalera Avatar asked Jun 26 '13 04:06

Antonio Escalera


1 Answers

What I was thinking was if one could reprogram them to say, start an application upon insertion into a USB port, then it could be useful for a multitude of applications (such as copying files automatically).

You are mistaken. When you reprogram a USB flash microcontroller, you cause a program to run inside the USB flash stick. You do NOT cause any program to run on the computer's main processor. The USB flash stick's processor only interacts with the main computer by responding to USB transactions initiated by the USB host controller in the main computer, which is under the control of the OS.

In effect, your capabilities are limited to changing what kind of USB device it is reported as (mass storage or imaging or network or ...) and changing the content of the data returned when the computer does a read from the USB stick.

like image 101
Ben Voigt Avatar answered Sep 24 '22 17:09

Ben Voigt