Help needed with Moto X XT1053 corrupted partition

ruach13

Member
Sep 13, 2015
5
0
0
[SOLVED: http://forum.xda-developers.com/showpost.php?p=61960808&postcount=2
Also, I realize this should be in the Q&A section. Apologies.]


Until a few days ago, I was on stock 4.4.4 (rooted, unlocked bootloader). I decided to try out the modified stock 5.1 posted on this thread . I had no problems making a backup on TWRP before flashing, but after I flashed 5.1 and went to make a backup, I got stuck in a boot loop.

I had to factory reset from TWRP and tried again, same problems (boot loop whenever I made a backup, and no access to TWRP folder from the OS), so I downloaded the full firmware (TMO_5.1_LPA23.12-15_15_release-keys_Retail_US) from this thread and tried to flash manually using ADB and fastboot, following the instructions in the ReadMe file in the firmware.

Everything was fine until I tried to flash system.img, when this happened:

D:\Phone\MotoX\root>fastboot flash system system.img
(bootloader) Variable not supported!
target reported max download size of 805306368 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 603230508 is not a multiple of t
he block size 4096
sending sparse 'system' (785522 KB)...
error: write_sparse_skip_chunk: don't care size 603230508 is not a multiple of t
he block size 4096
error: write_sparse_skip_chunk: don't care size 603230508 is not a multiple of t
he block size 4096
OKAY [ 51.425s]
writing 'system'...
(bootloader) Sparse image is malformatted
FAILED (remote failure)
finished. total time: 88.818s​

I tried a couple of times, but the same result. So I tried the instructions for manual flashing in this post, and got a different error:

D:\Phone\MotoX\root>mfastboot flash system system.img
load_file: could not allocate 1438613804 bytes
error: cannot load 'system.img'​

I'm stuck now and have no idea what to do. It's the exact same file, so I'm not sure why it's being read as two different sizes.

I also tried to factory reset and got this:

D:\Phone\MotoX\root>fastboot -w
erasing 'userdata'...
OKAY [ 1.524s]
formatting 'userdata' partition...
(bootloader) Variable not supported!
Erase successful, but not automatically formatting.
Can't determine partition type.
OKAY [ 0.274s]
erasing 'cache'...
OKAY [ 0.748s]
formatting 'cache' partition...
(bootloader) Variable not supported!
Erase successful, but not automatically formatting.
Can't determine partition type.
OKAY [ 0.278s]
finished. total time: 2.835s​

I'd like to be able to use my phone again! Can anyone help, please?
 
Last edited:

ruach13

Member
Sep 13, 2015
5
0
0
Try mfastboot.
Thanks. I did try, but I got this error:
D:\Phone\MotoX\root>mfastboot flash system system.img
load_file: could not allocate 1438613804 bytes
error: cannot load 'system.img'​
so I think I'm out of space. Can I use mfastboot to erase and then format the system partition, and then try flashing again? If not, what else can I do?
 

ong14

Senior Member
Sep 2, 2007
169
49
58
Thanks. I did try, but I got this error:
D:\Phone\MotoX\root>mfastboot flash system system.img
load_file: could not allocate 1438613804 bytes
error: cannot load 'system.img'​
so I think I'm out of space. Can I use mfastboot to erase and then format the system partition, and then try flashing again? If not, what else can I do?
I used this script (modified from xt1053dev) with fastboot from xt1053dev;

fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase system
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem config carrier YOUR CARRIER
fastboot oem fb_mode_clear


You can try this script with mfastboot instead.
 
  • Like
Reactions: ruach13
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone