4

I'm trying to repair a Moto G (XT1008, unlocked) device.

When booting normally, the motorola splash finishes and the android desktop shows up for one second, then a bunch of pop ups show up informing that applications stopped working. Attempting to do anything (opening the menu, the configuration, any apps) trigger more messages and whatever I attempted to open just crashes.

I tried flashing a custom recovery to the device with fastboot:

fastboot flash recovery twrp-3.0.0-0-xt1

032.img
target reported max download size of 536870912 bytes
sending 'recovery' (9456 KB)...
OKAY [  0.328s]
writing 'recovery'...
OKAY [  0.188s]
finished. total time: 0.516s

Since everything seemed to have worked ok, I immediately tried to boot the recovery, but the stock one (with and android and the ! logo) came instead.

I was able, however, to boot the custom recovery directly with:

fastboot boot twrp-3.0.0-0-xt1032.img

downloading 'boot.img'...
OKAY [  0.344s]
booting...
OKAY [  0.297s]
finished. total time: 0.641s

In the console of TWRP, the following errors show up:

Error opening: '/data/data/com.motorola.motocare/databases/MotoCare.db' (I/O error)
Error opening: '/data/data/com.google.android.gm/shared_prefs' (I/O error)
(other 3 errors similar to this one)

According to most posts I could find, the data partition seems to be corrupted and the most likely solution was to repair or format it entirely, but so far, I have had no luck doing so.

I tried using fsck.f2fs via adb with the following outcome:

~ # ←[6nfsck.f2fs /dev/block/mmcblk0p36
fsck.f2fs /dev/block/mmcblk0p36
Info: sector size = 512
Info: total sectors = 27090688 (in 512 bytes)
Info: MKFS version
  ""
Info: FSCK version
  from "Linux version 3.4.42-g41a696f (hudsoncm@ilclbld31) (gcc version 4.8 (GCC
) ) #1 SMP PREEMPT Fri Jan 23 18:14:39 CST 2015"
    to "Linux version 3.4.42-gf2a818f-00578-g5e5969d (cpu@computer) (gcc version
 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Sun Feb 7 22:24:16 CE
T 2016"
[FIX] (fsck_chk_orphan_node: 926)  --> Discard orphan inodes: ino [0x17274]
[FIX] (fsck_chk_orphan_node: 926)  --> Discard orphan inodes: ino [0x8fdf]
[is_valid_ssa_node_blk: 141] nid                       [0x92e3]
[is_valid_ssa_node_blk: 142] target blk_addr           [0x2d4166]
[is_valid_ssa_node_blk: 145] summary blk_addr          [0x5c70]
[is_valid_ssa_node_blk: 148] seg no / offset           [0x1670 / 0x166]
[is_valid_ssa_node_blk: 150] summary_entry.nid         [0x0]
[is_valid_ssa_node_blk: 151] --> node block's nid      [0x92e3]
[ASSERT] (is_valid_ssa_node_blk: 152)  --> Invalid node seg summary

[ASSERT] (sanity_check_nid: 217)  --> summary node block is not valid. [0x92e3]
[FIX] (__chk_dentries: 779)  --> Unlink [0x92e3] - Cookies len[0x7], type[0x1]
[is_valid_ssa_node_blk: 141] nid                       [0x418]
[is_valid_ssa_node_blk: 142] target blk_addr           [0x2d4163]
[is_valid_ssa_node_blk: 145] summary blk_addr          [0x5c70]
[is_valid_ssa_node_blk: 148] seg no / offset           [0x1670 / 0x163]
[is_valid_ssa_node_blk: 150] summary_entry.nid         [0x0]
[is_valid_ssa_node_blk: 151] --> node block's nid      [0x418]
[ASSERT] (is_valid_ssa_node_blk: 152)  --> Invalid node seg summary

[ASSERT] (sanity_check_nid: 217)  --> summary node block is not valid. [0x418]
[FIX] (__chk_dentries: 779)  --> Unlink [0x418] - MotoCare.db len[0xb], type[0x1
]
[ASSERT] (sanity_check_nid: 242)  --> nid[0x458] blk_addr[0x33a9fe] footer.nid[0
x0]
[FIX] (__chk_dentries: 779)  --> Unlink [0x458] - shared_prefs len[0xc], type[0x
2]
[is_valid_ssa_node_blk: 141] nid                       [0x1205]
[is_valid_ssa_node_blk: 142] target blk_addr           [0x2d4165]
[is_valid_ssa_node_blk: 145] summary blk_addr          [0x5c70]
[is_valid_ssa_node_blk: 148] seg no / offset           [0x1670 / 0x165]
[is_valid_ssa_node_blk: 150] summary_entry.nid         [0x0]
[is_valid_ssa_node_blk: 151] --> node block's nid      [0x1205]
[ASSERT] (is_valid_ssa_node_blk: 152)  --> Invalid node seg summary

[ASSERT] (sanity_check_nid: 217)  --> summary node block is not valid. [0x1205]
[FIX] (__chk_dentries: 779)  --> Unlink [0x1205] - mailstore.someone@somewhere.com.db-wal len[0x28], type[0x1]
[is_valid_ssa_node_blk: 141] nid                       [0x1064]
[is_valid_ssa_node_blk: 142] target blk_addr           [0x2d4164]
[is_valid_ssa_node_blk: 145] summary blk_addr          [0x5c70]
[is_valid_ssa_node_blk: 148] seg no / offset           [0x1670 / 0x164]
[is_valid_ssa_node_blk: 150] summary_entry.nid         [0x0]
[is_valid_ssa_node_blk: 151] --> node block's nid      [0x1064]
[ASSERT] (is_valid_ssa_node_blk: 152)  --> Invalid node seg summary

[ASSERT] (sanity_check_nid: 217)  --> summary node block is not valid. [0x1064]
[FIX] (__chk_dentries: 779)  --> Unlink [0x1064] - prefs_db len[0x8], type[0x1]

NID[0x418] is unreachable
NID[0x458] is unreachable
NID[0x459] is unreachable
NID[0x1064] is unreachable
NID[0x1205] is unreachable
NID[0x17c4] is unreachable
NID[0x41b1] is unreachable
NID[0x499a] is unreachable
NID[0x768c] is unreachable
NID[0x82a2] is unreachable
NID[0x8aa2] is unreachable
NID[0x8b20] is unreachable
NID[0x8f84] is unreachable
NID[0x8fdf] is unreachable
NID[0x92e3] is unreachable
NID[0xab8b] is unreachable
NID[0xacd9] is unreachable
NID[0xb00d] is unreachable
NID[0xb29c] is unreachable
NID[0xb87a] is unreachable
NID[0xbe61] is unreachable
NID[0xbefa] is unreachable
NID[0xc3e7] is unreachable
NID[0xce67] is unreachable
NID[0xf38b] is unreachable
NID[0x16e81] is unreachable
NID[0x17274] is unreachable
NID[0x17275] is unreachable
NID[0x17277] is unreachable
NID[0x1cd65] is unreachable
NID[0x1df3f] is unreachable
NID[0x1eb9f] is unreachable
NID[0x1eedf] is unreachable
NID[0x1f5b8] is unreachable
NID[0x1ff02] is unreachable
[FSCK] Unreachable nat entries                        [Fail] [0x23]
[FSCK] SIT valid block bitmap checking                [Fail]
[FSCK] Hard link checking for regular file            [Ok..] [0x0]
[FSCK] valid_block_count matching with CP             [Fail] [0x15ca44]
[FSCK] valid_node_count matcing with CP (de lookup)   [Fail] [0x55e7]
[FSCK] valid_node_count matcing with CP (nat lookup)  [Ok..] [0x560a]
[FSCK] valid_inode_count matched with CP              [Fail] [0x5282]
[FSCK] free segment_count matched with CP             [Ok..] [0x651]
[FSCK] next block offset is free                      [Ok..]
[FSCK] fixing SIT types
[FSCK] other corrupted bugs                           [Fail]
[FIX] (nullify_nat_entry:1127)  --> Remove nid [0x1eb9f] in nat journal

        Error: Could not conduct fsync!!!

Done.

Judging by the 5 unlinks, it seems to be trying to repair the 5 previously mentioned files, but still have some failed checks at the end, and the fsync error.

Trying to format on the other hand, yields the following result:

mkfs.f2fs /dev/block/mmcblk0p36

        F2FS-tools: mkfs.f2fs Ver: 1.4.0 (2014-10-18) [modified by Motorola to r
eserve space]

Info: sector size = 512
Info: total sectors = 27090688 (in 512 bytes)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 3.4.42-gf2a818f-00578-g5e5969d (cpu@computer) (gcc version 4.9.
x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Sun Feb 7 22:24:16 CET 201
6"
        Error: Could not conduct fsync!!!
Info: format successful

Despite the "format successful" message, after mounting back the partition, all of the data in the partition is intact, and the defective sectors remain.

I have also tried doing fastboot erase userdata and even pushing parted to the file system and using the rm tool to try to get rid of the partition, but still, the partition is untouched, and the same problem described on the top of the post persists.

Am I missing something on the formating? or could it be that the internal storage is physically broken beyond repair?

Any help would be greatly appreciated.

  • It is odd that TWRP is even trying to open those files. – Matthew Read Mar 13 '16 at 4:14
  • @Matthew Read: Since TWRP mounts /data on startup by default, I figure it might be doing an fsck on it's own. But that's just a conjecture, I'm not completely sure about it either. – Diego Tiscareno Mar 13 '16 at 14:57
  • Can you try with fastboot format userdata? – Firelord Mar 13 '16 at 16:52
  • 1
    @Firelord: I just tried it and this message was prompted: "Formatting is not supported for filesystem with type 'raw'." Am I missing some parameter on the command, or could it be a hint of what's going on? – Diego Tiscareno Mar 13 '16 at 18:02
0

so far as your problem is concerned, I got the same problem in my redmi 2, where the rom got curropted while using snapchat, I tried to factory reset the phone but it couldn't delete some files in data partition, after trying many such things(which failed to work!), I installed latest version of TWRP recovery using fastboot method as you stated and then READ CAREFULLY went to WIPE>>ADVANCED WIPE AND TYPE YES, this will erase all your internal storage data(including /data partition!!) and then you are good to go with any rom of your choice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.