Originally Posted by thekguy
Could you please elaborate on the badblocks thing? It could help many with similar problems
Sent from my MB526 using Tapatalk
Badblocks is a file system feature of ext2 and its newer derivatives. It is most easily accessed by specifying the -c option to e2fsck, either once or twice. If specified once, e2fsck will try reading every block on the file system, and record unreadable blocks as damaged. If it's specified twice, e2fsck will try reading and writing every block. While the manpage calls this latter test "non-destructive", that isn't true: e2fsck will try to restore each block after the test, but a reboot in the middle of things can leave the system unbootable, and you'd have to flash an SBF to recover.
We could do this from TWRP. Unfortunately, badblocks does not appear to be included in the TWRP ramdisk, so you'd have to build your own.
Another option is to combine checking for badblocks with mke2fs, with the same -c or -cc option, though we must be careful not to write a file system to the very end of /dev/block/mmcblk1p21. Again, a high risk of having to restart from SBF if the phone reboots during the operation.
In summary, here are untested instructions, assuming a Linux shell.
- acquire a badblocks binary (I'm currently trying to generate one)
- reboot into TWRP
- adb push badblocks /system/bin/
- adb shell e2fsck -c /dev/block/mmcblk1p21
- adb shell e2fsck -c /dev/block/mmcblk1p24
- adb shell e2fsck -c /dev/block/mmcblk1p25