Remove USB read only attribute in Windows

After using balena etcher to flash a USB drive, I found that the USB drive was read-only. I tried to format it using the Windows Disk Management tool, but it didn't work. I also tried using the command prompt to format the drive, but it didn't work either. I finally found a solution that worked for me. Here's how I did it:

===

Source: https://recoverit.wondershare.com/flashdrive-recovery/read-only-flash-drive.html

Windows

Connect your flash drive to the computer, and launch a command prompt by searching for cmd.exe or "Command Prompt" in the Start menu. Type the following and press Enter after each command: diskpart list disk select disk #(# means the name of your write-protected disk) attributes disk clear readonly clean create partition primary format fs=ntfs.