title: remounting a stubborn sdcard directory back to read-write
body: <p>I'm developing an application for commercial market that won't be available on Play and I have a specific target device which was custom built, but not by me. Certain 3rd party SDK resources need to be installed in the SDCard directory. That alone is simple to do.</p>
  
  <p>The problem I'm facing is that somehow the sdcard directory has been mounted read-only. Note there isn't really an sdcard, it's a partition on the internal drive. It was actually mount rw at point, something changed and now I'm stuck with read-only sdcard directory.</p>
  
  <p>What I have tried so far:</p>
  
  <ol>
  <li><p>Tried remounting the sdcard mount point. Hasn't worked. Even if i'm logged in as root. No errors supplied.</p>
  
  <p>mount -o remount,rw /dev/block/mmcblk1p4 /mnt/sdcard</p></li>
  <li><p>Checked /proc/mounts. I can see there in /proc/mounts that sdcard has been mounted ro. What I don't know is if there's an fstab equivalent in Android so I change the options. I'm told that vold.fstab is where I should go for that but...</p>
  
  <p>/dev/block/mmcblk1p4 /mnt/sdcard vfat ro,relatime,uid=1000,gid=1015,fmask=0202,dmask=0202,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0</p></li>
  <li><p>Checked vold.fstab. That's not the same device shown in /proc/mount.</p>
  
  <p>dev_mount sdcard /mnt/sdcard 4 /devices/platform/mmci-omap-hs.1/mmc_host/mmc1
  dev_mount usbdisk /mnt/sdcard/usbdisk auto /devices/platform/ehci-omap.0
  dev_mount extsd /mnt/sdcard/extsd auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0</p></li>
  <li><p>Checked logcat output from boot. Nothing to indicate there was an error for mounting, but then I'm not even sure if mount/vold would report to logcat. There were however a number of errors that indicated booting applications couldn't write to sdcard.</p></li>
  </ol>
  
  <p>I'm super confused at this point. Does anyone know of a sure fire way to fix this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I've tried different mount options this time</p>
  
  <p><code>mount -w -o remount /dev/block/mmcblk1p4 /mnt/sdcard</code></p>
  
  <p>This works for awhile, and I'm able to do a few file operations but It eventually reverts back to RO, almost within a couple of minutes.</p>