EzDevInfo.com

sd-card interview questions

Top sd-card frequently asked interview questions

Is there any way to tell if an SD card has been used?

I ordered a “new” micro SD card from Amazon Marketplace. However, it was sent in a small cheap plastic bag instead of the original package. I put it into my PC and found it to be empty but formatted.

Do SD cards normally come formatted out of the box? Does that mean it was already used? If not, is there any method to tell if it was used?

I don’t really mind as long as it works properly, but I don’t think it is OK to list something as “new” in Amazon although if it isn’t.


Source: (StackOverflow)

Reformat SD card to NTFS

I want to reformat a 16 GB SD card to NTFS so that I can use it to transfer large files (larger than 4 GB) from one computer to another easily, but my computer will only allow FAT variations.


Source: (StackOverflow)

Advertisements

How easy is to crack the following copy protection? [closed]

I am trying to copyprotect some work, which is a bootable SD card booting a linux kernel on ARM device (Raspberry pi). I am using this approach:

  1. The approach uses an initrd to mount an encrypted root filesystem.
  2. The initrd generates the filesystems' password according to the CID of the SD card. (a hash function is used, did not decide yet over md5 or sha1). Initrd will try to mount the filesystem using that generated password.
  3. Now here is the most interesting/suspect part: The initrd itself is encrypted using a custom C function, basicaly each byte is XOR'ed using a custom made pseudo random generator. Kernel is modified to have the same encrypting function, which works as decryptor.
  4. The system itself is stripped down so there is no way to use a keyboard or external storage. A single app runs full-screen.

So after the bootloader loads kernel and initrd, the kernel decrypts the initrd and executes its init script, which will generate the password and mount the root filesystem.

My question is: How easy it would be to break this setup (to decrypt the root filesystem and make it boot from any sd card)? What are the most weakest parts? How easy is to decompile the kernel and find those custom encrypting functions?

EDIT: Here are some corrections so you dont waste time with the obvious things: 1. The root device will be encrypted with LUKS (aes256) and the key will be generated by some HMAC function using SD card's CID and some salt. 2. The pseudo random algoritm for initramfs encrypting will be in fact RC4, just the key will be generated using some custom function, because if I just store the key in a byte array it makes it dead simple to retrieve it (yeah this is security through obscurity but there seem no other way). 3. I understand that if using a SD card emulator someone can make a copy of this system start but this is ok with me, because its pretty difficult and not anyone can do this.(also not anyone will want to deal with emulators)


Source: (StackOverflow)

What is the replacement of the floppy

While CD (and to an lesser extend DVD) disks have reached the price-point of the floppy, they have one significant downside, it is WORM (Write-Once Read-Many) media, allowing it to be used only one single time, and you need to be explicit in writing the data to the actual media (you need to burn it.)

While CD-RW solves the "use only once" problem, it is still EWORM (Erasable Write-Once Read-Many) media, which still means you need to be explicit in writing the data to the actual media (you still need to burn it.), and also, you still need to be very explicit in erasing it. (simple delete is not possible.)

Okay, we can use a CD-RW in Packet Writing mode, however the downside to that, is that this mode is not very universal, and also, not the native mode of the media.

Now, while USB-sticks and SD-cards may not have the poblems of the CD, they have a whole other kind of problem: their PRICE! USB-sticks and SD cards are generally 10 to 100 times as expensive as diskettes per piece.

SD-cards, in addition have an added problem, because they need a reader to operate. While it is a very standard thing, it is not default equipment on the computer like the CD drive or USB port (or historically the diskette drive).

You wouldn't give out an USB stick or SD card with a 100 kB text file, not caring weither you would get it back or not.

So, to recap:

  • CD & DVD are basically WORM media.
  • SD cards and USB sticks are relatively expensive.
  • SD cards also needs special readers.
  • Diskettes have a very low data-rate
  • Diskettes have a very low storage capacity.

Now, is there a media out there that solves all these problems, or is there a way to get (very) small USB sticks or SD cards for a very low price (as they're the closest thing to diskette).


Source: (StackOverflow)

Is the lock mechanism on an SD card hardware, firmware, or software (driver,OS) enforced?

Where is the lock to read-only mode enforced with SD cards? Is this done inside the card itself physically, in the firmware of readers, or in the OS? (Some other place?)


Source: (StackOverflow)

Standard SD card and Micro SD card with adapter; same speed?

I'm going to buy a new SD card to be used in my car's audio player. What I would like to know is, if I buy a micro SD card with adapter, will it provide the same read/write speed as a standard SD card of the same model? Does using adapter affect speed?


Source: (StackOverflow)

How do you format a 2 GB SD card to FAT32 (preferably with Disk Utility)?

I've been looking around for a way to do this for a while, but I haven't been able to find the answer. I need to format my 2 GB SD card to FAT-32, but I don't see the option in Disk Utility.

If I select the SD drive (Apple SDXC Reader Media) and go to 'Erase,' I have the following format options:

  • Mac OS extended (Journaled)
  • Mac OS extended (Journaled, Encrypted)
  • Mac OS extended (Case sensitive, Journaled)
  • Mac OS extended (Case sensitive, Journaled, Encrypted)
  • MS DOS (FAT)
  • ExFAT

Doing the same, but selecting the SD card itself (in my case, NO NAME), I get all the same results, minus Mac OS X's with encryption.

I have read that selecting MS-DOS will chose between FAT-16 and -32, depending on the SD card's size. However, I have a 2 GB one.

Format:            MS-DOS (FAT16)
Owners Enabled:    No
Number of Folders: 0
Capacity:          1.98 GB (1,975,546,368 Bytes)
Available:         1.79 GB (1,789,296,640 Bytes)
Used:              186 MB (185,991,168 Bytes)  --> (I have already backed up)
Number of Files:   512

Source: (StackOverflow)

How to use Cygwin to copy an image from an SD memory card

Long story short, I'm working on a Windows 7 machine and I'd like to strip the image off an SD card (backing up the card from a Raspberry Pi). I'm trying to use Cygwin, but not having much success.

Examining the /dev directory, it looks like my SD card is showing up as sdd and sdd1. However, when I run the following command:

dd if=/dev/sdd of=RPi.img

I get the following:

dd: opening '/dev/sdd': Permission denied

I've used dd on a Mac and under Linux without any problem, using similar syntax. What am I missing with Cygwin?


Source: (StackOverflow)

Choice of filesystem for GNU/Linux on an SD card

I have am embedded ARM-based system running on an SD card. It's currently Debian GNU/Linux using ext3 as filesystem. As I'm about to reinstall the system, I started wondering about changing to a more flash-friendly filesystem. I've heard about JFFS2, YAFFS2 and LogFS, and they all seem suited to the job. Which one would you recommend? Also, I've heard there have been a lot of ext4 improvements to better suit SSD disks; am I to interpret that as running ext4 should be just fine? What do I need to think especially about in that case?

I guess the usage of the system is important. But for the sake of generality, imagine it'll do standard desktop stuff (even though it is infact a small ARM-based system).

Thanks for any replies.

Edit: Wikipedia tells me (in a "citation needed" statement) that Removable flash memory cards and USB flash drives have built-in controllers to perform wear leveling and error correction so use of a specific flash file system does not add any benefit. Thus, I'm leaning towards sticking with an ext filesystem.


Source: (StackOverflow)

SSD, SD, eMMC, Raw NAND what are the differences?

so the underlying technology with SSD, eMMC, SD, USB Flash etc... is NAND flash correct? So is the difference between all of them just the way controllers are implemented? Or are the technologies different all together?

From what I know, I think SSDs are for desktops and eMMCs are for mobile devices, but is there some intricate difference between all of these storage technologies?


Source: (StackOverflow)

Is it possible to disable the "scan and fix" message when inserting an SD Card?

Every time I insert the SD card from my camera into the card reader, I get this dialog:

Do you want to scan and fix CANON_DC (E:)? There might be a problem with some files on this device or disc. This can happen if you remove the device or disc before all files have been written to it. * Scan and fix (recommended) This will prevent future problems when copying files to this device or disc * Continue without scanning

Of course there is no need to scan it. Is there a way to disable it?


Source: (StackOverflow)

How do I repartition an SDHC card in Windows?

How do I repartition an SDHC card (4 GB or more)? Do I need third-part tools or Linux (a live CD solution would be OK)?

In Windows' Disk Management the option Delete Partition is dimmed out:

Enter image description here

I can reformat the card as FAT32, copy files to and from the card and even change the file system to NTFS using the command line command CONVERT, but not repartition it.

The article How to Partition an SD Card in Windows XP talks about using "a Windows enabler program" which sound rather dubious to me.

I have tried to change from “Optimize for quick removal” to “Optimize for performance”. The option to format as NTFS appeared, but the Delete Partition option is still dimmed out.

Platform:

I have also tried on different versions of Windows and with different cards with the same result:

  • Kingston 4 GB SDHC card, speed class 4 (the one shown in the screenshot)
  • Transcend 2 GB (not marked as SDHC, but SD)
  • Windows 7 32-bit (albeit with a somewhat an older card reader) and Windows XP 32-bit on an EliteBook 8730w

Source: (StackOverflow)

Recover data from SD card

I have a 2 GB Kingston microSD card which is about three years old. I put it in a reader today in my Windows Vista computer, wrote a 32 MB file onto it, safely removed it, and then tried to read it elsewhere. Nothing. Putting it back in the Windows Vista computer it now says:

You need to format the disk in drive F: before you can use it.

What should I do? I have access to many computers and OSes if your recommendations need that. I would be very sad if I lost all the contents of the card. Most of the data is backed up, but there are a few things that aren't. :(

Doing a

# dd if=/dev/sdg of=~/tmp/sd.bin

gives me a 2 GB file, and grepping the file it seems like lots of my data is still there. How can I put it back together?


Source: (StackOverflow)

On Windows 8 or 10, particularly on tablets with a permanently inserted SD card, is there a universal way to treat the card as a non-removable drive?

I have a tablet, a Surface Pro, and I have a micro SD card that is permanently inserted. I use it to store media files like music and video.

Windows, recognizing that it is a removable drive, deletes files immediately instead of putting them into a recycle bin. In addition, applications such as SkyDrive and Dropbox refuse to sync onto the card since it is removable.

I know that formatting the micro SD card NTFS, and mounting it as a folder on the C: drive, enables SkyDrive and Dropbox to sync onto the removable drive, but it doesn't affect file deletion.

I've also heard that various USB drives can be altered to be treated by Windows as non-removable drives by flipping the removable bit. However, this does not appear to be an option for card readers, at least not the one in my Surface.

Is there any way to enable the recycle bin on this drive, and generally make this drive be treated as a non-removable drive?


Source: (StackOverflow)

Recover Data from Card that cannnot be read

I am trying to help a friend who is very concerned that she has just lost all of the data on her 32GB SanDisk microSD card. I told her I would post this and see if anyone could offer help.

Here are the details:

  1. The SanDisk microSD card is less than two years old. Probably only about a year old. The store will take it back, but that doesn't really help. She wants her data.
  2. She used the card in her Samsung Galaxy S4 smartphone for over a month. The phone was never exposed to water or temperature extremes.
  3. Today, her phone suddenly said something like "Your SD card is blank or an unsupported format".
  4. Her phone was then unable to read the SanDisk microSD card at all.

Here's what she has tried:

  1. Rebooting her phone. Had no effect.
  2. Taking out the SanDisk microSD card and putting it inside a full-size SD card adapter, and inserting it into a Windows 7 SP1 computer. The computer did not recognize its presence at all.
  3. Putting the SanDisk microSD card into a USB 2.0 external card reader and inserting the card reader into a USB port on a Windows 7 SP1 computer. The computer recognized the card reader and installed drivers for it. The card reader shows up as 'Removable Disk' in Windows Explorer. Clicking on 'Removable Disk' in Windows Explorer results in the error "Insert disk: Please insert a disk into the Removable Disk".
  4. After trying #3, tried opening the 'Removable Disk' in FreeCommander. Doing so results in the error "The device is not ready".

She does not have access to a linux box, but does have access to her Android phone.

What can she do to recover the data on her 32GB SanDisk microSD card?


Source: (StackOverflow)