Environment.getExternalStorageState().equalsIgnoreCase(Environment.MEDIA_MOUNTED_READ_ONLY)//corrupted -sd card
But whenever I insert a corrupted sd card, the status is always "mounted", is this approach wrong?
Environment.getExternalStorageState().equalsIgnoreCase(Environment.MEDIA_MOUNTED_READ_ONLY)//corrupted -sd card
But whenever I insert a corrupted sd card, the status is always "mounted", is this approach wrong?
I solved it by finding whether the inserted card is read-only or not, by traversing the /proc/mounts file and checking whether read_options of sdcard's mounted_directory is read-only or read-write.