Strangely soft-bricked stock Moto G

_3psilon_

Member
Jun 23, 2016
9
0
0
Hi there, i have spent hours trying to recover my Moto G XT1032 using this forum and I have mad progress but my phone is still dead.

Phone:
Motorola XT1032 - it was the latest stock ROM, always updated to the newest version. (Very probably a non-branded EU retail, 5.1 ROM)

Problem:
Battery got drained. When put on charger, it was 'optimising cache app x of y' for a long time, sometimes it does this anyway.
Then it went into bootloop, stuck at the Motorola logo. It doesn't restart and the logo doesn't starts animating like it normally does.
Fastboot (Power + vol down) worked, but going into recovery failed, leaving me stuck with the same M logo.

Solutions tried:
1. Connection to computer: didn't work. Seen as 'fastboot device' when in fastboot but that's it.
2. Using Android recovery software. Useless because of the above and useless pieces of software anyway. :D
3. Re-flashing stock ROM. After installing Motorola drivers and mfastboot, I tried to flash FALCON_RETEU_5.1_LPBS23.13-56-2_cid7_CFC, and according to the phone it was successful, but it still left me stuck at the bootloop. Even after manually flashing everything from partition tables to system images.
4. I unlocked the phone to install a custom TWRP recovery. The unlock was successful.
5. Tried to install TWRP recovery - to recover my files at least -, the command line says success, the phone says
Code:
Mismatched partition size (recovery)
Many have said in this forum to ignore this message - well, I can't since it can't write the recovery partition.
6. At this point the factory recovery started working ('no command' screen, then pressing 'vol up + power') :confused:
7. I have been able to boot into TWRP with
Code:
mfastboot boot twrp-3.0.0.0_2-falcon.img
What a workaround! Well, I have at least been able to access my files over MTP. Yay! :fingers-crossed:
8. Here comes the problem: I can't wipe the device. I can't copy anything over MTP. I can't delete files over mtp: it looks like the files are deleted but they reappear after restarting the device.
Note: I can access a simple
Code:
 adb shell
in recovery.

So once again, I'm unable to install a custom recovery via mfastboot, and it looks like the whole device was write-protected for whatever reason. At least I've been able to save my data thanks to the useful resources here! Any ideas about what else I could possibly try?

Any help is much appreciated!
 
Last edited:

Paradox♀

Senior Member
Aug 28, 2014
85
21
28
Hyderabad
Hey you can boot into fastboot which means that your phone is not hard bricked thats is a great news.
You can try wiping the partitions in the fastboot if the bootloader is unlocked
Try this in fastboot mode:
(Use mfastboot) :- http://forum.xda-developers.com/attachment.php?attachmentid=3476163&stc=1&d=1442444179

Code:
mfastboot erase system
mfastboot erase cache
mfastboot erase userdata
mfastboot erase recovery
mfastboot erase modemst1
mfastboot erase modemst2
Then install the stock rom or flash recovery then install a custom ROM.

Hit thanks if it worked..!
Stay Crazy o_O
 

_3psilon_

Member
Jun 23, 2016
9
0
0
Hey you can boot into fastboot which means that your phone is not hard bricked thats is a great news.
You can try wiping the partitions in the fastboot if the bootloader is unlocked
Try this in fastboot mode:
(Use mfastboot) :- http://forum.xda-developers.com/attachment.php?attachmentid=3476163&stc=1&d=1442444179

Code:
mfastboot erase system
mfastboot erase cache
mfastboot erase userdata
mfastboot erase recovery
mfastboot erase modemst1
mfastboot erase modemst2
Then install the stock rom or flash recovery then install a custom ROM.

Hit thanks if it worked..!
Stay Crazy o_O
Thanks!
It erased everything OK, at least no error messages.

Fun fact: it still boots into factory recovery after erasing the recovery partition!
Fun fact 2: I still can't flash custom recoveries like TWRP. ('Partition mismatch' error and then boots into factory recovery as if nothing changed. If I manually 'mfastboot boot twrp....img' into the image, then the internal storage shows up intact as before the phone was broken!

Then I flashed new stock ROMs, all returned OK, but still bootloop:

Code:
mfastboot flash partition gpt.bin
mfastboot flash motoboot motoboot.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot erase cache
mfastboot erase userdata
mfastboot reboot
Here's the complete output:

Code:
D:\tmp>mfastboot erase system
erasing 'system'...
(bootloader) Erase allowed in unlocked state
OKAY [  0.023s]
finished. total time: 0.025s

D:\tmp>mfastboot erase cache
erasing 'cache'...
OKAY [  0.017s]
finished. total time: 0.018s

D:\tmp>mfastboot erase userdata
erasing 'userdata'...
OKAY [  0.026s]
finished. total time: 0.028s

D:\tmp>mfastboot erase recovery
erasing 'recovery'...
(bootloader) Erase allowed in unlocked state
OKAY [  0.037s]
finished. total time: 0.037s

D:\tmp>mfastboot erase modemst1
erasing 'modemst1'...
OKAY [  0.012s]
finished. total time: 0.013s

D:\tmp>mfastboot erase modemst2
erasing 'modemst2'...
OKAY [  0.012s]
finished. total time: 0.013s

D:\tmp>mfastboot flash partition gpt.bin
target max-sparse-size: 256MB
sending 'partition' (32 KB)...
OKAY [  0.025s]
writing 'partition'...
(bootloader) This may take a few seconds, if a
(bootloader) different partition table is being
(bootloader) flashed since we need to backup
(bootloader) and restore a few partitions
(bootloader) Flashing primary GPT image...
(bootloader) Flashing backup GPT image...
OKAY [  0.303s]
finished. total time: 0.330s

D:\tmp>mfastboot flash motoboot motoboot.img
target max-sparse-size: 256MB
sending 'motoboot' (1953 KB)...
OKAY [  0.084s]
writing 'motoboot'...
(bootloader) flashing tz ...
(bootloader) flashing rpm ...
(bootloader) flashing sdi ...
(bootloader) flashing aboot ...
(bootloader) flashing sbl1 ...
OKAY [  0.930s]
finished. total time: 1.018s

D:\tmp>mfastboot flash logo logo.bin
target max-sparse-size: 256MB
sending 'logo' (295 KB)...
OKAY [  0.055s]
writing 'logo'...
OKAY [  0.036s]
finished. total time: 0.095s

D:\tmp>mfastboot flash boot boot.img
target max-sparse-size: 256MB
sending 'boot' (10240 KB)...
OKAY [  0.360s]
writing 'boot'...
OKAY [  0.585s]
finished. total time: 0.948s

D:\tmp>mfastboot flash recovery recovery.img
target max-sparse-size: 256MB
sending 'recovery' (10240 KB)...
OKAY [  0.363s]
writing 'recovery'...
OKAY [  0.591s]
finished. total time: 0.958s

D:\tmp>mfastboot flash system system.img_sparsechunk.0
target max-sparse-size: 256MB
sending 'system' (257755 KB)...
OKAY [  8.153s]
writing 'system'...
OKAY [  7.753s]
finished. total time: 15.907s

D:\tmp>mfastboot flash system system.img_sparsechunk.1
target max-sparse-size: 256MB
sending 'system' (256953 KB)...
OKAY [  8.132s]
writing 'system'...
OKAY [  7.910s]
finished. total time: 16.044s

D:\tmp>mfastboot flash system system.img_sparsechunk.2
target max-sparse-size: 256MB
sending 'system' (260396 KB)...
OKAY [  8.234s]
writing 'system'...
OKAY [  7.899s]
finished. total time: 16.137s

D:\tmp>mfastboot flash system system.img_sparsechunk.3
target max-sparse-size: 256MB
sending 'system' (166176 KB)...
OKAY [  5.274s]
writing 'system'...
OKAY [  6.251s]
finished. total time: 11.528s

D:\tmp>mfastboot flash modem NON-HLOS.bin
target max-sparse-size: 256MB
sending 'modem' (49376 KB)...
OKAY [  1.599s]
writing 'modem'...
OKAY [  0.763s]
finished. total time: 2.365s

D:\tmp>mfastboot flash fsg fsg.mbn
target max-sparse-size: 256MB
sending 'fsg' (103 KB)...
OKAY [  0.088s]
writing 'fsg'...
OKAY [  3.177s]
finished. total time: 3.268s

D:\tmp>mfastboot erase cache
erasing 'cache'...
OKAY [  0.015s]
finished. total time: 0.017s

D:\tmp>mfastboot erase userdata
erasing 'userdata'...
OKAY [  0.019s]
finished. total time: 0.024s

D:\tmp>mfastboot reboot
rebooting...

finished. total time: 0.002s

D:\tmp>
I think I have the same symptoms as this user.
Maybe the file system is corrupted? Or the bootloader?

Or just the flash memory in the phone stopped working properly.

Let's recap:
  • Erasing partitions doesn't actually erase them but it returns OK
  • Can't erase userdata
  • Can't install custom recoveries
  • Flashing stock ROM returns OK but still can't boot.
 

_3psilon_

Member
Jun 23, 2016
9
0
0
I'm pretty sure the eMMC (internal memory chip) has been damaged. Goodbye, phone...
Fortunately I still had my good ol' ZTE Blade sitting in the drawer. :D
 

_3psilon_

Member
Jun 23, 2016
9
0
0
Sorry for the late reply,
If the data partition is corrupt then you can try wiping data partition under Wipe-->Format Data in TWRP that should do the trick.
tl;dr: can't fsck, can't format, can't mfastboot erase, can't twrp erase.

Thanks! I've tried it, it doesn't work. Looks like it's wiped, then after restart it doesn't.

But doesn't the command you have suggested before
Code:
mfastboot erase userdata
erase the data partition?

I'm concerned that the eMMC is damaged and my phone can't be put to life again - if a complete erase & flash (including partition table, see my previous post) doesn't work then what does? :rolleyes:

Here's a df output from TWRP:
Code:
/data # df -h
df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   435.3M     20.0K    435.3M   0% /dev
tmpfs                   435.3M     20.0K    435.3M   0% /tmp
/dev/block/mmcblk0p33
                        651.7M     11.6M    640.0M   2% /cache
/dev/block/mmcblk0p36
                          5.5G      4.6G    927.0M  83% /data
/dev/block/mmcblk0p36
                          5.5G      4.6G    927.0M  83% /sdcard
/dev/block/mmcblk0p1     62.4M     46.5M     15.9M  75% /firmware
/dev/block/mmcblk0p34
                        960.6M    938.1M     22.6M  98% /system
Here's a worrisome FSCK output on the data partition:

Code:
/sbin # fsck.f2fs /dev/block/mmcblk0p36
fsck.f2fs /dev/block/mmcblk0p36
Info: sector size = 512
Info: total sectors = 11583232 (in 512 bytes)
Info: MKFS version
  ""
Info: FSCK version
  from "Linux version 3.4.42-g89906d6 ([email protected]) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Fri Feb 26 06:48:18 CST 2016"
    to "Linux version 3.4.42-g661f6ff ([email protected]) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Feb 15 19:02:51 PST 2016"
[FIX] (fsck_chk_orphan_node: 926)  --> Discard orphan inodes: ino [0x31040]
[FIX] (fsck_chk_orphan_node: 926)  --> Discard orphan inodes: ino [0x315d9]

NID[0x31040] is unreachable
NID[0x315d9] is unreachable
NID[0x315da] is unreachable
NID[0x315e2] is unreachable
NID[0x315e6] is unreachable
NID[0x315ec] is unreachable
NID[0x315ef] is unreachable
NID[0x315f1] is unreachable
NID[0x315f4] is unreachable
NID[0x315f9] is unreachable
NID[0x31600] is unreachable
[FSCK] Unreachable nat entries                        [Fail] [0xb]
[FSCK] SIT valid block bitmap checking                [Fail]
[FSCK] Hard link checking for regular file            [Ok..] [0x0]
[FSCK] valid_block_count matching with CP             [Fail] [0xfd3d3]
[FSCK] valid_node_count matcing with CP (de lookup)   [Fail] [0x78ea]
[FSCK] valid_node_count matcing with CP (nat lookup)  [Ok..] [0x78f5]
[FSCK] valid_inode_count matched with CP              [Fail] [0x75ed]
[FSCK] free segment_count matched with CP             [Ok..] [0x15a]
[FSCK] next block offset is free                      [Ok..]
[FSCK] fixing SIT types
[FSCK] other corrupted bugs                           [Fail]
        Error: Could not conduct fsync!!!

Done.
And what happens when I try to format the data partition? This:
Code:
/sbin # mkfs.f2fs /dev/block/mmcblk0p36
mkfs.f2fs /dev/block/mmcblk0p36

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

Info: sector size = 512
Info: total sectors = 11583232 (in 512 bytes)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 3.4.42-g661f6ff ([email protected]) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Feb 15 19:02:51 PST 2016"
        Error: Could not conduct fsync!!!
Info: format successful
Exact same error as for example here.
 

_3psilon_

Member
Jun 23, 2016
9
0
0
Hey is there any chance that you have a backup image that could be used to restore the partitions?
Well, I don't, but I used stock ROM images from this forum. It's the same stuff that was installed before failure.

If I can't run a simple fsck, then I'm 90% sure it's some hardware issue. Based on how many people are having the same problem, maybe the eMMC chips are reaching the end of their (short) lifetime.