Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

No. Most controllers used in USB flash drives are not reprogrammable, or some or all of the pins necessary to reprogram them are not exposed.

Opening an application when the drive is inserted is a behavior which is part of Windows; it is triggered by the presence of a file (autorun.ini) on the drive with specific content.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top