b2gdev / Android-JB-4.1.2

A modified Android Jelly Bean 4.1.2 source tree (x-loader, u-boot, Kernel and Filesystem) for the b2g
2 stars 9 forks source link

"SD card removed unexpectedly" message is seen frequently #1

Closed ruvi-d closed 9 years ago

ruvi-d commented 9 years ago

Issue summary

When the power switch is in its off position, and with an SD card inserted, the following pair of logs occurs fairly often:

   SD card removed unexpectedly
   Preparing SD card

Reported by: @DaveMielke

ruvi-d commented 9 years ago

This is appears to be a side effect of us supporting the ability to eject the SD card at any time.

Details

We have currently added support for the end users to be able to eject the SD card at any time without having to safely unmount the device first, including when the device enters suspend power mode (when the keypad enable switch is in its off position). To support this, the system safely ejects the SD card when it is entering suspend mode and then remounts it when it wakes up. This allows the user to be able to remove the SD card even when the device is fully suspended. Otherwise the system may crash on wake up if the SD card which was plugged in earlier was missing. This is why you see the "SD card removed unexpectedly" & "Preparing SD card" messages.

Possible fixes

ruvi-d commented 9 years ago

This will handled using a wake lock in the b2g-ui