Usually you don't need to run filesystem checks manually. Android runs this on every boot before mounting the filesystem (ref). So is the case with external storage (see this answer). However exceptions may exist:
"Some system images do not have e2fsck for licensing reasons (e.g. recent SDK system images). Detect these and skip the check."
So you can check if /system/bin/e2fsck
(or /system/bin/fsck.f2fs
, whatever applicable) exits on your device. Or check logcat
after some repeated reboots to confirm if filesystem check was run (usually in vold
or fs_mgr
log).
If I boot the phone into recovery using adb
, I get Reboot / Factory reset / Wipe Cache on menu, but phone is inaccessible on PC (through adb
or fastboot
).
You are booting into stock recovery provided by your OEM. But in order to run commands (including fsck
) on adb shell
or terminal emulator you need a custom recovery (like TWRP). Note that flashing custom recovery requires unlocking bootloader which is not supported on many devices (including all of the recent Huawei devices).
fastboot
protocol is only available in bootloader mode (on supported devices), so not relevant here.
If you are sure that filesystem check is not being run on your device but it's required (due to filesystem errors), you can do a factory reset which recreates the /data
filesystem.