Friday, 18 December 2015

Check internal storage for errors



In case this helps anyone, these are the steps I took to check internal storage for errors:
  1. In Android, get the mount points for /data and /system

    Code:


    $ su
    $ grep /data /fstab.qcom
    /dev/block/bootdevice/by-name/userdata      /data        f2fs    rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,inline_data  wait,check,encryptable=/dev/block/bootdevice/by-name/metadata
    $ grep /system /fstab.qcom
    /dev/block/bootdevice/by-name/system        /system      ext4    ro,barrier=1                                        wait



  2. Boot to recovery (TWRP)

  3. Unmount /system, just to be safe
    (You can use adb shell or the TWRP terminal)

    Code:


    umount /system


  4. Check /system for errors using e2fsck (since it's an ext4 filesystem)
    (The mount points are a little bit different in TWRP)

    Code:


    e2fsck -fv /dev/block/platform/soc.0/by-name/system


  5. In TWRP, go to Mount, check System, uncheck everything else

  6. Check /data for errors using fsck.f2fs (since it's an f2fs filesystem)

    Code:


    fsck.f2fs -f /dev/block/platform/soc.0/by-name/userdata


  7. Reboot


Download from this link

No comments:

Post a Comment