Environment.getExternalStorageState().equalsIgnoreCase(Environment.MEDIA_MOUNTED_READ_ONLY)//corrupted -sd card
Is this logic enough to figure out