False Read-Only-Flag on USBstick

  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in:

    This forum does not automatically send notices of new content. So if, for example, you would like to be notified by mail when Steve posts an update to his blog (or of any other specific activity anywhere else), you need to tell the system what to “Watch” for you. Please checkout the “Tips & Tricks” page for details about that... and other tips!

    /Steve.

diegojargok

New member
Aug 26, 2021
3
0
Hello generous people.
I have this case with a Kingston USB stick on which it was accidentally disconnected from the notebook connector while copying file.
After that it became Read-Only, which means that I can not format, or repartition it not even with initDisk.

I come here to post because I see a deep knowledge.
Most answers that I get are about it going to end-of-life.
But this happenes with a disconnection and then communication data was corrupted.
Then in my understanding it should be reparable by software.
But no software outthere seem to solve this.
I don't think that is an electronic fusible burned out with current inside.
I feel that a part of the equation is missing.

Thanks in advance !!

1630029769958.png
 

diegojargok

New member
Aug 26, 2021
3
0
I am seeking for the knowledge.
I thought I clarified with the equation analogy.
This is totally software related.

However, the link that you gave is not 5usd is about 37usd:
US$ 4.99 + US$ 31.58 (between shipping and taxes)
Any missused dollars are better expent as donation for the multiple world crisis this days.
 

DiskTuna

Well-known member
Jan 3, 2021
93
10
Netherlands
But this happenes with a disconnection and then communication data was corrupted.

Yes, the firmware. The translation table most likely not to be confused by the FAT or MFT. I am talking about the tables that map LBA to PBA, logical block addresses to physical addresses. You see, unlike conventional drives where LBA and PBA are fixed (what you write to LBA sector 100 will always end up being written at the same 'spot'), NAND based devices are more dynamic. What you write to LBA 100 will end up in a different spot every time. So firmware maps LBA 100 to a specific PBA every time you alter and save contents in LBA 100. A sudden disconnect may damage these translators.

So when we look at how data is stored on your flash drive we see three layers:

File system
LBA block addressing
Flash Translation Layer (FTL)

File system is mapped to LBA usually by a fixed formula, for example for FAT: Start volume + reserved sectors + (FAT * 2) + (cluster address * sectors/cluster), and LBA to PBA using a table.

This can sometimes be repaired using same tools manufacturers use to configure the device. Thing is, these tools can be found on 'vague' Chinese and Russian websites mainly and last time I posted links these tools were flagged suspicious by many AV programs. Start point for such repairs is the tool called ChipGenius. It will tell controller + if NAND chip is found (if the latter is not found repair is probably not possible). It will tell you VID and PID and point to the so called MPtool if possible.

The MPtool is the tool made by manufacturer to setup the USB flash drive. They go without any type of documentation so for instructions you often need to rely on those 'vague' websites. Some times the tool is simple (one button) other times you run into more complex tools.

1630080381788.png


It must be noted that such repairs in 99% of cases result in loss of the current data. So if the data needs to be recovered, this is not the way! To recover data you probably need to remove the NAND chip and dump it using a NAND reader. Since NAND chip is dumped we bypass controller so then special software is needed to emulate the controller and recover the data, for example Visual NAND Reconstructor by Rusolut or Flash Extractor by Soft Center.
 
Last edited:
  • Like
Reactions: hyperbole

diegojargok

New member
Aug 26, 2021
3
0
Hi DiskTuna.
Thanks to your Tips, I was able to do a big step.
I got to those vague chinese and rusian websites and with help of chrome translator I got to download ChipGenius + GetFlashInfo + GetInfo and confirm that a Phison chip PS2251-03 and there is corruption and the WriteProtection flag and some others as it can be seen in GetInfo from the chip-manufacturer company. http://dl.mydigit.net/special/up/phison.html
(Luckly I worked manufacturing LED TVs so I am familiar with the vague information)

I am attaching the file that I was able get so far.
Windows's diskpart tool shows “Current Read-only State: Yes” which matched with file "GetInfoPartitionSetting.PNG" showing corrupted "Write Protect Status" field.
I don't fully understand how is this zone enabled to be writable at all. It would mean that any software can read and write to it, but none seem to offer that feature. Probably because of the discardable-price.

I am not sure how to continue from here since GetInfo tells me the firmware version is MPALL v3.27.0A and there is no download available for that version. Probably there is an upgraded compatible firmware. I have downloaded many of them but I cant figure it out which one may be compatible.

I think that if I get to edit the field "Write Protected Status" with an aceptable value copied from another working usbstick, then the device can get recovered. It is not unwritable, it just have a corrupted flag.

If you have any more clues, I would appreciate it so I can possibly reach a further conclusion out of it.
 

Attachments

  • Kingston16GB_WriteProtected.zip
    355.7 KB · Views: 36

DiskTuna

Well-known member
Jan 3, 2021
93
10
Netherlands
Oh I am not expert in modifying / setting up firmware since I am interested in data recovery. Toying with firmware then is something you do not want to do when dealing with USB flash drives, I just know enough to detect if the USB flash drive is running OK or not. So I do know from experience / observation that "PMAP" for product revision (shown in ChipGenius) is not good. It means the device is in in some sort of setup mode. Looks like this https://www.usbdev.ru/f/index.php?topic=574.0

So in a data recovery scenario if I'd see what you get there, I abandon hope of fixing the device and instead I desolder NAND and try to recover data straight from the NAND chip using Soft Center's Flash Extractor.
 
Last edited: