Help needed with Moto X XT1053 corrupted partition - Moto X Q&A

[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?

Try mfastboot.

ong14 said:
Try mfastboot.
Click to expand...
Click to collapse
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?

ruach13 said:
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?
Click to expand...
Click to collapse
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.

ong14 said:
You can try this script with mfastboot instead.
Click to expand...
Click to collapse
Managed to do it using mfastboot flash system system.img -P
Thanks so much for responding!

Related

[Q] Unable to flash system.img, and thus unable to boot

I tried to update to 4.4 while keeping root, but messed up somewhere along the way. Now I can't flash system.img - fastboot says the buffer isn't big enough? - and so my phone won't boot past the opening Motorola logo.
Any suggestions? I'm on OSX, which is why I haven't been able to try RSD Lite.
EDIT: The speficic error info after running 'fastboot flash system.img system.img' is
sending 'system.img' (971855 KB)...
(bootloader) Data size exceeds download buffer
FAILED (remote failure)
finished. total time: 0.337s
EDIT 2: SOLVED! Turns out that the older fastboot files have issues with large file sizes. I used the new fastboot file from here (zip file) and instructions #2 from here, specifically the following fastboot instructions:
astboot erase cache
fastboot erase customize
fastboot erase clogo
fastboot flash partition gpt.bin
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img

Help - Stuck in Bootloop

The point in which everything took a turn for the worst was while trying to update firmware via SD update method. At which point it just stayed on android boot screen.
Recovery was broken at this point
I successfully flashed an older CWM version, but that was useless for reflashing the latest Asus firmware.
I tried flashing stock recovery again and it appeared to succeed, but now when I try to boot to recovery, it just goes back to bootloop.
I'm trying to flash the US version now via fastboot I get bootloop again and I'm getting weird errors every time I try regarding filesize. (See below)
I tried flashing CROMbi as well and it went through the install process successfully, but that resulted in bootloop as well.
Tried flashing Asus US firmware again without success,
Kind of pissed that this all started when following the instructions on the Asus site to upgrade to their latest firmware via SD card.
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot -i 0x0B05 flash system
asusus.zip
target reported max download size of 643825664 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 425021387 is not a multiple of t
he block size 4096
erasing 'system'...
OKAY [ 1.457s]
sending sparse 'system' (628732 KB)...
error: write_sparse_skip_chunk: don't care size 425021387 is not a multiple of t
he block size 4096
error: write_sparse_skip_chunk: don't care size 425021387 is not a multiple of t
he block size 4096
OKAY [ 86.837s]
writing 'system'...
OKAY [ 17.080s]
sending sparse 'system' (415060 KB)...
OKAY [ 57.305s]
writing 'system'...
OKAY [ 11.353s]
finished. total time: 174.042s
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot -i 0x0B05 reboot
rebooting...
finished. total time: 0.021s
C:\Program Files (x86)\Minimal ADB and Fastboot>
Last time something like this happened, I had to wipe everything and reflash. so I did the following.
fastboot -i 0x0b05 erase boot
fastboot -i 0x0b05 erase cache
fastboot -i 0x0b05 erase userdata
fastboot -i 0x0b05 erase recovery
fastboot -i 0x0b05 erase staging
fastboot -i 0x0b05 erase system
and now I get a bootloader error on startup
I was able to successfully flash CWM 6037 again. I tried newer ones, but 6037 is the only one that will work.
Stock firmware from custom recovery fails every time. "Installing update... Installation aborted."
Crombi installer goes through without any problems. but just never boots once completed.
I tried installing the latest Cyanogen Nightly and got the following error "This package is for tF701T devices; this is a K00C."
But the K00C is a TF701T
After installing CROMbi again, I'm no longer getting the bootloader error in red letters, but I am still bootlooping.
When crombi installer completes I do get one error at the very end. "set_metadata_recursive:some changes failed".
I looked at the log and it says Cant partition non-vfat datamedia.
Does bootloop after apparently successful fstboot flash have anythignt o do with why in the FAW's ASUS recommends ignoring the software update for 4.3? Afterall this is what put me in this situation.
The SD update is designed to work with the stock recovery. What made you think it would work with CWM?
The only successful recovery from a similar situation I remember is the following (and I'm quoting from memory here - it's too late here for me to find the thread, but it is somewhere here in this forum - search for it.
Download the stock recovery to your fastboot folder from here: http://droidbasement.com/db-blog/?p=3210
Also download the 10.26.1.18 firmware, unzip it once, put it on a microSD and insert into tablet.
Enter fastboot mode
Issue:
Code:
fastboot [b]boot[/b] recovery.img
Note: You do not flash the recovery, you boot it!
The recovery should recognize the firmware on the microSD and start to flash it.
If that is successful, you would have stock recovery and firmware again.
Then download the latest firmware, unzip it, put into microSD or internal and the stock recovery should flash it.
Good luck!
Sent from my K00C using Tapatalk
berndblb said:
The SD update is designed to work with the stock recovery. What made you think it would work with CWM?
The only successful recovery from a similar situation I remember is the following (and I'm quoting from memory here - it's too late here for me to find the thread, but it is somewhere here in this forum - search for it.
Download the stock recovery to your fastboot folder from here: http://droidbasement.com/db-blog/?p=3210
Also download the 10.26.1.18 firmware, unzip it once, put it on a microSD and insert into tablet.
Enter fastboot mode
Issue:
Code:
fastboot [b]boot[/b] recovery.img
Note: You do not flash the recovery, you boot it!
The recovery should recognize the firmware on the microSD and start to flash it.
If that is successful, you would have stock recovery and firmware again.
Then download the latest firmware, unzip it, put into microSD or internal and the stock recovery should flash it.
Good luck!
Sent from my K00C using Tapatalk
Click to expand...
Click to collapse
The attempted SD update was done with custom recovery as I couldn't get stock recovery to work after the initial SD update with stock recovery.
Thanks for the info. I'll update.
gorilla p said:
Last time something like this happened, I had to wipe everything and reflash. so I did the following.
fastboot -i 0x0b05 erase boot
fastboot -i 0x0b05 erase cache
fastboot -i 0x0b05 erase userdata
fastboot -i 0x0b05 erase recovery
fastboot -i 0x0b05 erase staging
fastboot -i 0x0b05 erase system
and now I get a bootloader error on startup
I was able to successfully flash CWM 6037 again. I tried newer ones, but 6037 is the only one that will work.
Stock firmware from custom recovery fails every time. "Installing update... Installation aborted."
Crombi installer goes through without any problems. but just never boots once completed.
I tried installing the latest Cyanogen Nightly and got the following error "This package is for tF701T devices; this is a K00C."
But the K00C is a TF701T
After installing CROMbi again, I'm no longer getting the bootloader error in red letters, but I am still bootlooping.
When crombi installer completes I do get one error at the very end. "set_metadata_recursive:some changes failed".
I looked at the log and it says Cant partition non-vfat datamedia.
Does bootloop after apparently successful fstboot flash have anythignt o do with why in the FAW's ASUS recommends ignoring the software update for 4.3? Afterall this is what put me in this situation.
Click to expand...
Click to collapse
That error message means that your internal sdcard is no t available to format. Erasing all partitions is a dangerous thing to do.
The only way you will get back to normal is to try and flash the stock asus rom now as that will recreate everything. I recommend you start with the 4.2.2 one - need to flash it over fastboot - I can't see anything else working as you have erased it all.....
Also you used 0x0b05 which is the code for the last generation of transformers..... You don't need it for the TF701 but not sure if that has caused additional grief now. Probably not but you never know .....
Yeah IO'm getting the same issue that I was having before. I tried both the 4.3 and 4.2 boot.img and the recommended recovery.img file. Each time I ran
fasboot boot recovery.img
downloading 'boot.img'...
OKAY [ 1.121s]
booting...
OKAY [ 0.032s]
finished. total time: 1.157s
booting from downloaded boot.img (on tablet)
Then it goes to boot into the image and...bootloop.
C:\Program Files (x86)\Minimal ADB and Fastboot\asus>fastboot flash system asus4
22.zip
target reported max download size of 643825664 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 346827884 is not a multiple of t
he block size 4096
erasing 'system'...
OKAY [ 1.515s]
sending sparse 'system' (628732 KB)...
error: write_sparse_skip_chunk: don't care size 346827884 is not a multiple of t
he block size 4096
error: write_sparse_skip_chunk: don't care size 346827884 is not a multiple of t
he block size 4096
OKAY [ 86.861s]
writing 'system'...
OKAY [ 17.098s]
sending sparse 'system' (338700 KB)...
OKAY [ 46.823s]
writing 'system'...
OKAY [ 9.280s]
finished. total time: 161.586s
Bootloop...
Could the inability to flash or boot from stock recovery have anything to do with the CWM recovery protection?
Well after those attempts it's totally shot.
Now I can't even get to fastboot. Every reboot results in "Unrecoverable bootloader error..."
Files RMA. Returned.
Moral of story. Don't do anything on a Tegra device without previous documentation that doesn't have NVFlash available.

Bricked Moto X - Partition (boot) Security Version Downgraded

Hi guys, I think I really messed up my new Moto X: and when I say new I mean I bought it yesterday even if used and bricked today.
I had a 4.4 Sprint firmware and I followed the guide to unlock the device (which it seemed to work), since I need it in Europe with a Vodafone sim. After that I decided to get a UK firmware, so I flashed the phone with RSD Lite, but the flash failed and now in boot mode I have the following message: Partition (boot) Security Version Downgraded - Fasboot reason: boot failure. If you have the solution can you explain it step by step, I'm not actually good with this kind of things. Do you think I have to toss the device in the trash bin? Thank you
Jack881 said:
Hi guys, I think I really messed up my new Moto X: and when I say new I mean I bought it yesterday even if used and bricked today.
I had a 4.4 Sprint firmware and I followed the guide to unlock the device (which it seemed to work), since I need it in Europe with a Vodafone sim. After that I decided to get a UK firmware, so I flashed the phone with RSD Lite, but the flash failed and now in boot mode I have the following message: Partition (boot) Security Version Downgraded - Fasboot reason: boot failure. If you have the solution can you explain it step by step, I'm not actually good with this kind of things. Do you think I have to toss the device in the trash bin? Thank you
Click to expand...
Click to collapse
I just want to add that I've altready tried to flash back to the original version, but how you can imagine...nothing to do...
Jack881 said:
I just want to add that I've altready tried to flash back to the original version, but how you can imagine...nothing to do...
Click to expand...
Click to collapse
You shouldn't have attempted to downgrade and/or flash another carriers rom. It's documented many places not to do this. Now you are in a pickle.
This will probably fix you up:
Download the FULL SBF of the ROM you want to flash. It must be the SAME VERSION, or HIGHER than the newest version you have flashed.
Boot into bootloader.
Type:
fastboot flash bootloader motoboot.img
fastboot flash partition gpt.bin
fastboot reboot-bootloader
Now you SHOULD be able to flash the ENTIRE SBF with RSD Lite or Manual method.
Explaination: By doing this, we are JUST flashing the bootloader and partition table (gpt.bin), THEN we reboot back to the bootloader in order to allow the bootloader to LOAD the new partition table before we flash the rest of the partitions.
It fixes people up most of the time, but not all. Good luck, hope it does the trick for you. Next time, heed the warning -- specifically not to downgrade. :good:
samwathegreat said:
You shouldn't have attempted to downgrade and/or flash another carriers rom. It's documented many places not to do this. Now you are in a pickle.
This will probably fix you up:
Download the FULL SBF of the ROM you want to flash. It must be the SAME VERSION, or HIGHER than the newest version you have flashed.
Boot into bootloader.
Type:
fastboot flash bootloader motoboot.img
fastboot flash partition gpt.bin
fastboot reboot-bootloader
Now you SHOULD be able to flash the ENTIRE SBF with RSD Lite or Manual method.
Explaination: By doing this, we are JUST flashing the bootloader and partition table (gpt.bin), THEN we reboot back to the bootloader in order to allow the bootloader to LOAD the new partition table before we flash the rest of the partitions.
It fixes people up most of the time, but not all. Good luck, hope it does the trick for you. Next time, heed the warning -- specifically not to downgrade. :good:
Click to expand...
Click to collapse
You are very kind, but I don't know if I can do it. I downloaded the firmware. But wheere I have to type the command? Sorry I'm really ignorant...
Jack881 said:
You are very kind, but I don't know if I can do it. I downloaded the firmware. But wheere I have to type the command? Sorry I'm really ignorant...
Click to expand...
Click to collapse
Get the latest android SDK from here: http://developer.android.com/sdk/index.html
Install it. It should have a folder called "Platform-tools" inside. Put gpt.bin and motoboot.img from the firmware inside this folder. Then open a command prompt, go to that folder, then run the commands as I outlined in the previous post.
After you "fastboot reboot-bootloader", try to flash the entire firmware zip file using RSD Lite.
I tried, but when I type the device still write Fastboot reason:flash failure. Any idea? Maybe I did something wrong. Thank you.
samwathegreat said:
You shouldn't have attempted to downgrade and/or flash another carriers rom. It's documented many places not to do this. Now you are in a pickle.
This will probably fix you up:
Download the FULL SBF of the ROM you want to flash. It must be the SAME VERSION, or HIGHER than the newest version you have flashed.
Boot into bootloader.
Type:
fastboot flash bootloader motoboot.img
fastboot flash partition gpt.bin
fastboot reboot-bootloader
Now you SHOULD be able to flash the ENTIRE SBF with RSD Lite or Manual method.
Explaination: By doing this, we are JUST flashing the bootloader and partition table (gpt.bin), THEN we reboot back to the bootloader in order to allow the bootloader to LOAD the new partition table before we flash the rest of the partitions.
It fixes people up most of the time, but not all. Good luck, hope it does the trick for you. Next time, heed the warning -- specifically not to downgrade. :good:
Click to expand...
Click to collapse
This is what it writes when I type the commands:
target reported max download size of 805306368 bytes
sending 'bootloader' (1604 KB)...
OKAY [ 0.346s]
writing 'bootloader'...
(bootloader) Permission denied
FAILED (remote failure)
finished. total time: 0.454s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot flash partition gpt.bin
(bootloader) Variable not supported!
target reported max download size of 805306368 bytes
sending 'partition' (32 KB)...
OKAY [ 0.261s]
writing 'partition'...
FAILED (remote failure)
finished. total time: 1.146s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.010s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>
Can you help me? thank you.
Jack881 said:
This is what it writes when I type the commands:
target reported max download size of 805306368 bytes
sending 'bootloader' (1604 KB)...
OKAY [ 0.346s]
writing 'bootloader'...
(bootloader) Permission denied
FAILED (remote failure)
finished. total time: 0.454s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot flash partition gpt.bin
(bootloader) Variable not supported!
target reported max download size of 805306368 bytes
sending 'partition' (32 KB)...
OKAY [ 0.261s]
writing 'partition'...
FAILED (remote failure)
finished. total time: 1.146s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.010s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>
Can you help me? thank you.
Click to expand...
Click to collapse
You noted that you flashed multiple ROMS. What is the LATEST VERSION of all the roms you tried to flash. You can never go lower, so please advise. Did you flash --any-- 4.4.2 or 4.4.4 ROM? If so, you MUST flash a new rom of the same or higher version.
samwathegreat said:
You noted that you flashed multiple ROMS. What is the LATEST VERSION of all the roms you tried to flash. You can never go lower, so please advise. Did you flash --any-- 4.4.2 or 4.4.4 ROM? If so, you MUST flash a new rom of the same or higher version.
Click to expand...
Click to collapse
I flashed a UK retail 4.4.2 and after a France retail 4.4.2...what should I flash now? I was trying your system on the Sprint 4.4 which was the original firmware of the telephone...
Jack881 said:
I flashed a UK retail 4.4.2 and after a France retail 4.4.2...what should I flash now? I was trying your system on the Sprint 4.4 which was the original firmware of the telephone...
Click to expand...
Click to collapse
That will absolutely not work. You are attempting to downgrade!!! (4.4.2 > 4.4) I already mentioned that you must use the same version or higher than the highest version you flashed previously. You MUST flash the Sprint 4.4.2 ROM, and not 4.4
If you try again, with the 4.4.2 Sprint SBF, you should be able to successfully recover.
Jack881 said:
I flashed a UK retail 4.4.2 and after a France retail 4.4.2...what should I flash now? I was trying your system on the Sprint 4.4 which was the original firmware of the telephone...
Click to expand...
Click to collapse
I also tried the 4.4.2 Sprint now, but same results. Do I have to get the file from the same firmware I flash, right? and when I flash do I have to flash without the getvar string?
Jack881 said:
I also tried the 4.4.2 Sprint now, but same results. Do I have to get the file from the same firmware I flash, right? and when I flash do I have to flash without the getvar string?
Click to expand...
Click to collapse
Please just use the manual method.
Do this:
First extract all the files in the SBF zip file (the 4.4.2 Sprint one!!!!!) to the same folder that includes fastboot & mfastboot (you do have the "mfastboot" binary, right?)
Now do this exactly: (ignore the fact that some of these commands are being run twice - this is intentional. Also notice that we are using "mfastboot" to flash system.img. If you don't have it, get it here [and put it in the same folder as fastboot]: https://docs.google.com/file/d/0B9qC3vvamytkSVp0NXhlSEhZVFU/edit )
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot reboot-bootloader
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
mfastboot 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
If everything is successful to this point, now do:
fastboot reboot
If something fails, move on with the other commands. If you get stuck, let me know. Pictures of the errors will be helpful if you have any.
Taking timgree
samwathegreat said:
Please just use the manual method.
Do this:
First extract all the files in the SBF zip file (the 4.4.2 Sprint one!!!!!) to the same folder that includes fastboot & mfastboot (you do have the "mfastboot" binary, right?)
Now do this exactly: (ignore the fact that some of these commands are being run twice - this is intentional. Also notice that we are using "mfastboot" to flash system.img. If you don't have it, get it here [and put it in the same folder as fastboot]: https://docs.google.com/file/d/0B9qC3vvamytkSVp0NXhlSEhZVFU/edit )
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot reboot-bootloader
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
mfastboot 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
If everything is successful to this point, now do:
fastboot reboot
If something fails, move on with the other commands. If you get stuck, let me know. Pictures of the errors will be helpful if you have any.
Click to expand...
Click to collapse
First of all I want to thank you, because I've never med anyone so kind online. Unfortunately I didn't succeed. I explain you exactly what I did:
1) I got from here http://sbf.droid-developers.org/phone.php?device=0 the Sprint 4.4.2 firmware (I had 4.4 originally, so this should be fine according to what you said)
2) I unzipped every file inside sdk/platform-tools
3) I downloaded your mfastboot (since I didn't have it) and stick it inside the same folder sdk/platform tools
4) So now I have this folder with inside all the files I thought you were asking to have there
5) at this point I opened from there the command prompt and started to type the commands you suggested
6) I had this:
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot partition gpt.bin
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, and if found,
recovery, tos
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot flash motoboot motoboot.img
(bootloader) Variable not supported!
target reported max download size of 805306368 bytes
sending 'motoboot' (1604 KB)...
OKAY [ 0.344s]
writing 'motoboot'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.027s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>
I got stuck at the second command. Any idea? thank you.
Jack881 said:
First of all I want to thank you, because I've never med anyone so kind online. Unfortunately I didn't succeed. I explain you exactly what I did:
1) I got from here http://sbf.droid-developers.org/phone.php?device=0 the Sprint 4.4.2 firmware (I had 4.4 originally, so this should be fine according to what you said)
2) I unzipped every file inside sdk/platform-tools
3) I downloaded your mfastboot (since I didn't have it) and stick it inside the same folder sdk/platform tools
4) So now I have this folder with inside all the files I thought you were asking to have there
5) at this point I opened from there the command prompt and started to type the commands you suggested
6) I had this:
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot partition gpt.bin
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, and if found,
recovery, tos
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>f
astboot flash motoboot motoboot.img
(bootloader) Variable not supported!
target reported max download size of 805306368 bytes
sending 'motoboot' (1604 KB)...
OKAY [ 0.344s]
writing 'motoboot'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.027s
C:\Users\Giacomo\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>
I got stuck at the second command. Any idea? thank you.
Click to expand...
Click to collapse
You also didn't correctly issue the first command. You left out "flash"
You typed "fastboot partition gpt.bin"
Instead of "fastboot flash partition gpt.bin"
Please start over. If it fails at motoboot.img -- don't worry. Just continue with the rest of the commands. If we can get everything else to flash, you may well recover. Sometimes it DOES fail at flashing motoboot, but just continue with the commands.
Be sure to type them EXACTLY as I've listed -- you can't leave off "flash" anymore
Please try and update as to status. If you can get to the very end, with nothing but motoboot.img failing, we should be able to recover you.
samwathegreat said:
You also didn't correctly issue the first command. You left out "flash"
You typed "fastboot partition gpt.bin"
Instead of "fastboot flash partition gpt.bin"
Please start over. If it fails at motoboot.img -- don't worry. Just continue with the rest of the commands. If we can get everything else to flash, you may well recover. Sometimes it DOES fail at flashing motoboot, but just continue with the commands.
Be sure to type them EXACTLY as I've listed -- you can't leave off "flash" anymore
Please try and update as to status. If you can get to the very end, with nothing but motoboot.img failing, we should be able to recover you.
Click to expand...
Click to collapse
Something moving...I repeated every single command, now I have on the phone Fastboot reason: Sticky bit factory_fastboot
What should I do now?
Thank you
Jack881 said:
Something moving...I repeated every single command, now I have on the phone Fastboot reason: Sticky bit factory_fastboot
What should I do now?
Thank you
Click to expand...
Click to collapse
Do this:
fastboot oem fb_mode_clear
fastboot reboot-bootloader
then start over with all the commands I previously listed
I recommend using copy / paste for all the commands just so none get messed up
samwathegreat said:
Do this:
fastboot oem fb_mode_clear
fastboot reboot-bootloader
then start over with all the commands I previously listed
I recommend using copy / paste for all the commands just so none get messed up
Click to expand...
Click to collapse
I did it: fastboot oem fb_mode_clear and fastboot reboot-bootloader and repeated all the commands, but now I have Partition (boot) Security version Downgraded. Fastboot reason: boot failure. Thank you
Jack881 said:
I did it: fastboot oem fb_mode_clear and fastboot reboot-bootloader and repeated all the commands, but now I have Partition (boot) Security version Downgraded. Fastboot reason: boot failure. Thank you
Click to expand...
Click to collapse
OK!
It looks like when you were on one of the other roms, you accepted an OTA to 4.4.3 or 4.4.4.....did this happen?
anyways, do this:
fastboot reboot-bootloader
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
mfastboot 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 fb_mode_clear
fastboot reboot
Does it boot?? Hopefully at this point, you boot into android. Fingers crossed.... :fingers-crossed:
samwathegreat said:
OK!
It looks like when you were on one of the other roms, you accepted an OTA to 4.4.3 or 4.4.4.....did this happen?
anyways, do this:
fastboot reboot-bootloader
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
mfastboot 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 fb_mode_clear
fastboot reboot
Does it boot?? Hopefully at this point, you boot into android. Fingers crossed.... :fingers-crossed:
Click to expand...
Click to collapse
No, gosh! maybe I have to repeat everything? now I have Partition (boot) Security version Downgraded Fastboot reason: Boot failure
Jack881 said:
No, gosh! maybe I have to repeat everything? now I have Partition (boot) Security version Downgraded Fastboot reason: Boot failure
Click to expand...
Click to collapse
I will have to continue helping you later tonight. Have to leave for a bit. I'm still hoping we will be able to recover you but it will take some more work, and we have to run the commands perfect. I'll post back here when I return.

[SOLVED] Moto X Bricked? Cannot flash system

I've searched high and low on this website to try and find a solution to my current issue and I have found nothing but more problems, so I'm going to try posting a new thread for help.
Yesterday I was in the process of unrooting my phone, I wasn't able to use some of the apps the way I wanted to. While deleting some extraneous applications powered by busybox, and then busybox itself, I lost connection to Google Services. I tried numerous times to reset the device, but even after factory reset and recovery I could not connect to Google Services (network connection working on wifi and data) and could not sign in to the device. So I decided to flash a new image to the phone to try to get rid of whatever the issue was.
I downloaded the XT1095 image from Motorola's website and used their instructions to flash it to the device. My device was originally XT1096 from Verizon, but I could not locate an image for that one, and read that I could flash to the XT1095 image for Marshmallow access anyway. I don't remember what errors I received. I was able to boot the device and sign in through Google services, but my network connection to Verizon was lost, I received an error that the network was unavailable. So I tried to work around that for a while but could not reinstate voice or data services. I could send SMS for some reason. I decided to try flashing a new image. I tried with the image I received from Motorola again, but I could not flash the system.img, received an error message "load_file: could not allocate [I don't have the number] bytes" and couldn't find a workaround, even using -P at the end of the system command.
I downloaded VICTARA_TMO_XT1095_6.0_MPE24.49-18_cid9_CFC.xml.zip from another thread on this site, I can't find the link to it now. I flashed with the instructions from this thread http://forum.xda-developers.com/moto-x-play/general/reminder-how-to-downgrade-6-0-to-5-1-1-t3267253 This had the separate chunk system files, so I could flash it in smaller pieces, and that worked fine, the only error was with the fsg.mbn file, I received a permission denied error. Here is a copy of the command sheet from this image flash.
Code:
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash logo logo.bin
sending 'logo' (1454 KB)...
OKAY [ 0.096s]
writing 'logo'...
OKAY [ 0.077s]
finished. total time: 0.174s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash boot boot.img
sending 'boot' (10200 KB)...
OKAY [ 0.377s]
writing 'boot'...
OKAY [ 0.480s]
finished. total time: 0.858s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash recovery recovery.img
sending 'recovery' (10280 KB)...
OKAY [ 0.392s]
writing 'recovery'...
OKAY [ 0.462s]
finished. total time: 0.854s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.0
sending 'system' (257551 KB)...
OKAY [ 8.144s]
writing 'system'...
OKAY [ 6.608s]
finished. total time: 14.752s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.1
sending 'system' (256644 KB)...
OKAY [ 8.121s]
writing 'system'...
OKAY [ 6.681s]
finished. total time: 14.802s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.2
sending 'system' (256636 KB)...
OKAY [ 8.117s]
writing 'system'...
OKAY [ 6.722s]
finished. total time: 14.840s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.3
sending 'system' (256977 KB)...
OKAY [ 8.128s]
writing 'system'...
OKAY [ 6.240s]
finished. total time: 14.368s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.4
sending 'system' (256340 KB)...
OKAY [ 8.108s]
writing 'system'...
OKAY [ 6.076s]
finished. total time: 14.185s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.5
sending 'system' (257227 KB)...
OKAY [ 8.136s]
writing 'system'...
OKAY [ 6.498s]
finished. total time: 14.635s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.6
sending 'system' (255276 KB)...
OKAY [ 8.076s]
writing 'system'...
OKAY [ 7.245s]
finished. total time: 15.321s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.7
sending 'system' (257925 KB)...
OKAY [ 8.159s]
writing 'system'...
OKAY [ 6.240s]
finished. total time: 14.399s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash system system.img_sparsechunk.8
sending 'system' (257968 KB)...
OKAY [ 8.158s]
writing 'system'...
OKAY [ 6.184s]
finished. total time: 14.345s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash modem NON-HLOS.bin
sending 'modem' (63188 KB)...
OKAY [ 2.062s]
writing 'modem'...
OKAY [ 1.522s]
finished. total time: 3.585s
C:\Users\Lyyli\AppData\Local\Android\sdk2>fastboot erase modemst1
'fastboot' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot erase modemst1
erasing 'modemst1'...
OKAY [ 0.008s]
finished. total time: 0.008s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot erase modemst2
erasing 'modemst2'...
OKAY [ 0.008s]
finished. total time: 0.008s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot flash FSG fsg.mbn
sending 'FSG' (693 KB)...
OKAY [ 0.064s]
writing 'FSG'...
Permission denied
FAILED (remote failure)
finished. total time: 0.067s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot erase cache
erasing 'cache'...
OKAY [ 0.058s]
finished. total time: 0.058s
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot erase userdata
erasing 'userdata'...
OKAY [ 0.335s]
finished. total time: 0.335s
C:\Users\Lyyli\AppData\Local\Android\sdk2>fastboot reboot
'fastboot' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Lyyli\AppData\Local\Android\sdk2>mfastboot reboot
rebooting...
finished. total time: 0.001s
Upon rebooting device, it would not move past the "bootloader unlocked" screen, which I assume means that some file is missing but I don't know what to fix. When I turn the device off from the bootloader unlocked screen, it automatically returns to Fastboot Flash Mode now. I've tried checking many different threads for similar issues but have not found any solutions.
Troubleshooting:
I used fastboot for the first flash, then switched to mfastboot.
I have tried using RSD Lite but it does not recognize my device.
Cleared cache and userdata through mfastboot.
Thank you for any help you can offer!
Can you boot into Fastboot mode? If yes then you can try installing TWRP and flash a zip for XT1096 which will have all necessary modem files to work on CDMA network.
hamzaalijoiyah said:
Can you boot into Fastboot mode? If yes then you can try installing TWRP and flash a zip for XT1096 which will have all necessary modem files to work on CDMA network.
Click to expand...
Click to collapse
Thanks for the suggestion, the only flashable .zip I was able to find for the Moto X 2014 was a Brazilian edition for the XT1097. It was packaged without modem files so I flashed the modem from the Motorola images, as previously mentioned, and I was able to operate the phone again, but I am still not able to get a network connection with VZW.
Try https://firmware.center/firmware/Mo...ZON_XT1096_5.1_LPE23.32-25-5_cid2_CFC.xml.zip
Follow the flashing steps in the .xml file that was included in the package.
A typical flashing sequence includes all these partitions, but might vary depending on your product - so please use the sequence in the .xml file in your package.
E.g:
fastboot getvar max-sparse-size
fastboot oem fb_mode_set oem
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 flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
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 fb_mode_clear
fastboot reboot
It make your Moto to Verizon 5.1 stock rom.
If you want 6.0MM. You gotta reinstall TWRP, and follow thread XT1095 6.0 flashable stock ROM
Good luck.
I noticed in your cmd flash log that you only flashed up to system.img_sparsechunk.8. All of the flashing guides that I have seen in various posts stop there. Failing to flash system.img_sparsechunk.9 will cause failure to boot (don't ask me how I know).
kyo167 said:
Try https://firmware.center/firmware/Mo...ZON_XT1096_5.1_LPE23.32-25-5_cid2_CFC.xml.zip
Follow the flashing steps in the .xml file that was included in the package.
A typical flashing sequence includes all these partitions, but might vary depending on your product - so please use the sequence in the .xml file in your package.
E.g:
fastboot getvar max-sparse-size
fastboot oem fb_mode_set oem
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 flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
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 fb_mode_clear
fastboot reboot
It make your Moto to Verizon 5.1 stock rom.
If you want 6.0MM. You gotta reinstall TWRP, and follow thread XT1095 6.0 flashable stock ROM
Good luck.
Click to expand...
Click to collapse
Thanks, this got me to where I needed to be to gain connection again. I could not find a Verizon version of the software at all, so thank you for the link!

How to recover my encrypted userdata ?

Hi all,
I have a Nexus 6 phone with disk encryption enabled. I am trying to recover my userdata, could someone help me with this?
Following is what I did.
Backed up encrypted user data:
HTML:
$sudo adb shell dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata myencrypted_userdata
while flashing the new firmware images I accidentally flashed the userdata image that came with factory images too.
I remember the the password I used to encrypt the disk. So I thought I can flash the myencrypted_userdata back, in order to recover the my old data.
I used following command to do that:
HTML:
$ sudo fastboot flash userdata+userdata1 myencrypted_userdata
Unfortunately, that didn't work so how do I flash my backed up "myencrypted_userdata" to my device? and recover it using the the password I know?
Thank you so much for your time
Post note:
Following is the error I am getting:
HTML:
$ sudo fastboot flash userdata+userdata1 myencrypted_userdata
target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
fastboot: ../libsparse/sparse.c:143: write_all_blocks: Assertion `pad >= 0' failed.
and size of backed up "myencrypted_userdata" is huge :
HTML:
$ ls -alh myencrypted_userdata
-rw-rw-r-- 1 kar kar 56G mrt 3 13:03
karthik9;71266527
while flashing the new firmware images I accidentally flashed the userdata image that came with factory images.......[/QUOTE said:
It looks like dirty flashing.
New firmware and data from previous version.
That doesn't work in many cases.
Click to expand...
Click to collapse
NLBeev said:
It looks like dirty flashing.
New firmware and data from previous version.
That doesn't work in many cases.
Click to expand...
Click to collapse
Okay, I tried to use the same firmware image version I had, just to recover the data. That is also not working.
I followed the same steps I mentioned earlier:
HTML:
$sudo fastboot flash userdata+userdata1 myencrypted_userdata
target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
fastboot: ../libsparse/sparse.c:143: write_all_blocks: Assertion `pad >= 0' failed.
Is there there any other way to recover the data? (I remember the password though)
karthik9 said:
...
Is there there any other way to recover the data? (I remember the password though)
Click to expand...
Click to collapse
Are you sure the data partition is wiped/formatted before restoring your data?
(Assumed, but did not see that in the steps you wrote.)
NLBeev said:
Are you sure the data partition is wiped/formatted before restoring your data?
(Assumed, but did not see that in the steps you wrote.)
Click to expand...
Click to collapse
Thank you for you response.
So I did wipe out the old userdata with new firmware image (userdata.img) using following command .
HTML:
$sudo fastboot flash userdata userdata.img
Then now I am trying to restore my old userdata partition using following command:
HTML:
$sudo fastboot flash userdata+userdata1 myencrypted_userdata
No I didn't do anything else in between. Am I missing something in between? if so, how do I format the data partition? Also, the encrypted image size is huge "56G". Is that a problem?
karthik9 said:
No I didn't do anything else in between. Am I missing something in between? if so, how do I format the data partition? Also, the encrypted image size is huge "56G". Is that a problem?
Click to expand...
Click to collapse
Don't know about the size, try it. But you have to fastboot erase the data partition first.
Try fastboot erase userdata and fastboot erase cache before restoring.
EDIT the format command is
Fastboot format <partition>
NLBeev said:
Don't know about the size, try it. But you have to fastboot erase the data partition first.
Try fastboot erase userdata and fastboot erase cache before restoring.
EDIT the format command is
Fastboot format <partition>
Click to expand...
Click to collapse
Still getting same error:
HTML:
[email protected]:~ $ sudo fastboot erase userdata [134]
******** Did you mean to fastboot format this partition?
erasing 'userdata'...
OKAY [ 1.649s]
finished. total time: 1.649s
[email protected]:~ $ sudo fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.024s]
finished. total time: 0.024s
[email protected]:~ $ sudo fastboot flash userdata+userdata1 myencrypted_userdata
target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
fastboot: ../libsparse/sparse.c:143: write_all_blocks: Assertion `pad >= 0' failed.
Last idea:
Fastboot erase userdata
Fastboot format userdata
<Restore>

Categories

Resources