6

I would like to check my /sdcard, and possibly other internal partitions as well, for errors on the file system level.

I am wondering how this could be accomplished.

I am using a Samsung Galaxy Nexus (toro) with Verizon Wireless.

Update:
This device does NOT have an actual SD card and I believe the only way to do it is through: "adb shell" (BEFORE system boots (i.e. inside of recovery mode), this way /sdcard is NOT mounted and it's possible to perform checks on it in read/write mode)

1
  • If you boot the phone with an adb logcat running, I suspect you'll see the phone already does an fsck if required during boot...
    – derobert
    Commented Nov 30, 2012 at 11:06

2 Answers 2

3

Perhaps the easiest way to do this, would be to connect your Galaxy Nexus to your computer and use a 3rd-party tool to check the file system for errors.

Please bear in mind that using this method you will only be able to check the mountable storage, and only if your device is in USB mass storage mode.

At current, I know of no way to check the internal partitions for errors - this does not mean there isn't one, however.

EDIT:

Even if you only have an internal SD card, then you should still be able to mount it as USB storage - something has to act as an SD card, for the camera app to function. Something is mounted to /sdcard, and this is what is mounted when you enable USB mass storage.

EDIT 2:

Ok, last but not least - do you have a recovery installed? If so, you can use this flashable zip to do what you want. If not, then are you rooted? You MUST be rooted to be able to this, as it would involve copying a binary to your system.

EDIT 3:

Ok. This CANNOT be done while the device is turned on, in user mode, as the partitions must be unmounted to scan them. This is why that zip is that - a zip. If you cannot flash the zip, there is no other way unless you can find a way to unmount the filesystem's when they are being used.

10
  • @alexus Done, and edit made.
    – Liam W
    Commented Nov 27, 2012 at 18:21
  • nexus does NOT have SD card (even internal) therefor there is NO USB storage there as well, as I mention earlier it has to happened through "adb shell", i dont think any 3rd party tool can access your raw disk through usb mass storage.
    – alexus
    Commented Nov 27, 2012 at 18:27
  • That ZIP contains e2fsck binary (I already have e2fsck (1.41.11),I'm looking for syntax how to use e2fsck, and how to find out partitions and such.
    – alexus
    Commented Nov 27, 2012 at 18:42
  • You cannot check them while they are in use however, and to use adb the device has to be turned on.
    – Liam W
    Commented Nov 27, 2012 at 18:48
  • 1
    Huh? Check should be possible (as it is r/o). Repair is not, unless the device is unmounted. I'm not sure, but it could be doable from recovery (if you get a command prompt there and have it rooted), or might be via ADB while in recovery mode or "below".
    – Izzy
    Commented Nov 27, 2012 at 20:20
2

according to: Android Media Process (high CPU) | alexus' blog:

~ # e2fsck -n /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata
e2fsck 1.41.11 (14-Mar-2010)
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata: clean, 53630/1875968 files, 1921615/7493115 blocks
~ #
1
  • -n works as read/only, -y is read/write
    – alexus
    Commented Nov 30, 2012 at 16:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .