[Fastboot] Invalid sparse file format at header magic. How to fix? - Android Q&A, Help & Troubleshooting

Okay, so I own a Red Magic 6 and it's currently bricked. There is no unbrick tool for this device yet and there isn't going to be one for a while.
My bootloader is unlocked. I have tried reflashing the files using fastboot. However when I go to flash the system, it prints out:
Invalid sparse file format at header magic
Sending sparse 'system' 1/4 (786352 KB) OKAY [ 18.114s]
Writing 'system' FAILED (remote: 'Partition not found')
fastboot: error: Command failed
(Phone came with a/b partition just a heads up and it runs on Stock android 11)
I have searched EVERYWHERE, from forums, to tools, to python scripts.... EVERYTHING. No solution.
Yes, my fastboot is on the lastest version and yes I tried the --force command on fastboot. Still no luck.
I have researched everything about sparse images but am still having problems. I tried converting the image to a RAW ext4 img but it fails.
Is there any workaround for this?

chocolote4444 said:
Okay, so I own a Red Magic 6 and it's currently bricked. There is no unbrick tool for this device yet and there isn't going to be one for a while.
My bootloader is unlocked. I have tried reflashing the files using fastboot. However when I go to flash the system, it prints out:
Invalid sparse file format at header magic
Sending sparse 'system' 1/4 (786352 KB) OKAY [ 18.114s]
Writing 'system' FAILED (remote: 'Partition not found')
fastboot: error: Command failed
(Phone came with a/b partition just a heads up and it runs on Stock android 11)
I have searched EVERYWHERE, from forums, to tools, to python scripts.... EVERYTHING. No solution.
Yes, my fastboot is on the lastest version and yes I tried the --force command on fastboot. Still no luck.
I have researched everything about sparse images but am still having problems. I tried converting the image to a RAW ext4 img but it fails.
Is there any workaround for this?
Click to expand...
Click to collapse
I am looking for the same thing. Can't find the answer. Have you found a solution?

same here

Out of curiosity, was there ever a resolution to this issue?
Have RM6SP, was rooted- all good. Battery ran empty and shut off. When I rebooted it just boots directly to fastboot. Recovery is useless (wiped user data but no cache to erase(?)).
Extracted payload.bin, tried flashing boot.img, rebooted, only goes to fastboot. Tried flashing everything from payload.bin- some flashed, others had errors. Just endless loading to fastboot.
Curious if anyone has actually SUCCESSFULLY unbricked these devices?

Looks like your partition table may be corrupted... I don't own this device myself but have a fairly good understanding of android partitions and am happy to help.
Please show the output of
Code:
fastboot getvar ptable
and the errors you get when trying to flash

Hello DavidxxxD and thank you for replying.
Execution of "getvar ptable" results in "FAILED (remote: 'Unknown variable')
I then executed "getvar all" and attached the result. Same whether on fastboot or fastbootd.
As for your other question, when I try to flash product, system, and vendor I get the above "Invalid Sparse File Format at Header Magic" error.
Thank you for any suggestions and your time. This is not my daily driver so there is no urgent, pressing need (I'll never get rid of my trusty S7edge, lol).
EDIT: thanks to the unbrick tool in the 6S Pro forum, I have successfully unbricked this phone. Up and running and on way to getting re-rooted.
Thanks to everyone who offered help!

Glad to hear you already got it unbricked!
For the sake of it being an intresting case, here is the more complicated way I put together and what I could find out from looking at the attatchment and a payload file for your device:
Good news - Your device is not too badly bricked.
Like some other new devices, this phone does not use a cache partition. That is why the recovery has no option to wipe cache.
The "invalid sparse header" message gets triggered when using fastboot to send a filesystem image that is not in the expected android sparse format. This can safely be ignored as the images for your device are uncompressed and the program doesn't know what they're suppsed to look like.
The NX669J uses a dynamic partition and the one on yours appears messed up in a way where I have no idea how it got to this point - all partitions for the A-slot are missing and instead there is a "system" (not system_a) and "system_b-cow" (!?) - This is probably why the bootloader is freaking out.
Usually, something like this can be fixed by just reflashing the super partition. However the update payload does not seem to contain one, so - unless you have a super.img from somewhere else - you would have to manually fix the current layout.
- Put the device is fastbootd mode
Code:
fastboot reboot-fastboot
Note: To verify, you can run
Code:
fastboot getvar is-userspace
Note: Didn't expect to have to say this, but don't run these commands on devices with correctly assigned partitions, unless you know what you are doing! They can be used as an example of how to modify dynamic partitions. "system" is also used as an alias for the active system partition. You will likely softbrick your device and have to fix it!!
- Firstly, remove the strange partition entries
Code:
fastboot delete-logical-partition system
fastboot delete-logical-partition system_b-cow
- Next, re-create the missing entries
Code:
fastboot create-logical-partition system_a 1000
fastboot create-logical-partition system_ext_a 1000
fastboot create-logical-partition product_a 1000
fastboot create-logical-partition vendor_a 1000
fastboot create-logical-partition odm_a 1000
Note: 1000 will set the partition size to a kilobyte. This doesn't matter as flashing will automatically resize them.
- After that, you should be able to flash to the newly created partitions
Code:
fastboot flash system_a system.img
fastboot flash system_ext_a system_ext.img
fastboot flash product_a product.img
fastboot flash vendor_a vendor.img
fastboot flash odm_a odm.img
Note: If you get an error saying "not enough space to resize partition", try
Code:
fastboot erase system_b
fastboot resize-logical-partition system_b 1000
- Finally, set the active slot to A and reboot
Code:
fastboot set_active a
fastboot reboot
Note: If it doesn't boot or the system starts crashing, you may have to flash the other firmware images as well or try using slot B.
In case this doesn't work, you can ask someone with a rooted NX669J to dump their super partition and send it to you. If you do, make sure to check it first using lpdump. Flashing a corrupted image is going to make it worse 100% guaranteed.
I hope this gives you a better idea of what was wrong and how to deal with similar issues in the future. Of course, a low-level unbrick tool works fine too - but where's the fun in that?
P. S: I'm actually typing this on a flat S7 - still an amazing device, 6 years after release : )

Thank you, DavidxxxD, for taking the time out and providing a detailed reply. Hopefully this info might come in useful to someone one day.
I have no idea why a dead battery would "zonk" the phone, but it did. I wonder if it might have been something with magisk...?
¯\_(ツ)_/¯
Sadly, these phones are not popular and support from Nubia is painful, at best. Thanks to folks like you there is still help for those in need.
Again, many thanks for your time and help!

DavidxxxD said:
Glad to hear you already got it unbricked!
For the sake of it being an intresting case, here is the more complicated way I put together and what I could find out from looking at the attatchment and a payload file for your device:
Good news - Your device is not too badly bricked.
Like some other new devices, this phone does not use a cache partition. That is why the recovery has no option to wipe cache.
The "invalid sparse header" message gets triggered when using fastboot to send a filesystem image that is not in the expected android sparse format. This can safely be ignored as the images for your device are uncompressed and the program doesn't know what they're suppsed to look like.
The NX669J uses a dynamic partition and the one on yours appears messed up in a way where I have no idea how it got to this point - all partitions for the A-slot are missing and instead there is a "system" (not system_a) and "system_b-cow" (!?) - This is probably why the bootloader is freaking out.
Usually, something like this can be fixed by just reflashing the super partition. However the update payload does not seem to contain one, so - unless you have a super.img from somewhere else - you would have to manually fix the current layout.
- Put the device is fastbootd mode
Code:
fastboot reboot-fastboot
Note: To verify, you can run
Code:
fastboot getvar is-userspace
- Firstly, remove the strange partition entries
Code:
fastboot delete-logical-partition system
fastboot delete-logical-partition system_b-cow
- Next, re-create the missing entries
Code:
fastboot create-logical-partition system_a 1000
fastboot create-logical-partition system_ext_a 1000
fastboot create-logical-partition product_a 1000
fastboot create-logical-partition vendor_a 1000
fastboot create-logical-partition odm_a 1000
Note: 1000 will set the partition size to a kilobyte. This doesn't matter as flashing will automatically resize them.
- After that, you should be able to flash to the newly created partitions
Code:
fastboot flash system_a system.img
fastboot flash system_ext_a system_ext.img
fastboot flash product_a product.img
fastboot flash vendor_a vendor.img
fastboot flash odm_a odm.img
Note: If you get an error saying "not enough space to resize partition", try
Code:
fastboot erase system_b
fastboot resize-logical-partition system_b 1000
- Finally, set the active slot to A and reboot
Code:
fastboot set_active a
fastboot reboot
Note: If it doesn't boot or the system starts crashing, you may have to flash the other firmware images as well or try using slot B.
In case this doesn't work, you can ask someone with a rooted NX669J to dump their super partition and send it to you. If you do, make sure to check it first using lpdump. Flashing a corrupted image is going to make it worse 100% guaranteed.
I hope this gives you a better idea of what was wrong and how to deal with similar issues in the future. Of course, a low-level unbrick tool works fine too - but where's the fun in that?
P. S: I'm actually typing this on a flat S7 - still an amazing device, 6 years after release : )
Click to expand...
Click to collapse
Hi DavidxxxD,
I had a quite a similar problem here, sometimes ago while trying to install TWRP and Magisk onto my nubia Z20 NX627J, unfortunately did not succeed and got myself a bricked phone. Now phone can only go into fastboot mode.
Had been trying to flash everything from scratch via fastbboot, did not get any error messages with flashing all the img, bin except while flashing system. img, it returned with a " Invalid sparse file format at header magic" but went on with the process without issue. However, the phone still enable to boot up normally.
Is it possible that that the rom I have is not the original stock rom?
So while searching for an answer, was happy to found this thread at XDA forum. After going through the thread on your reply to SkylineDriver, i was hoping you can help and enlighten me if I had miss anything.
Attached is the getvar file from my bricked phone after flashing, another file is the fastboot command I followed, except the flash system command, i just did a "fastboot flash system system.img" without the "-S 100M' because I didn't know what "-S 100M" means".
Thanks in advance

@cksy1112 A bit late, but here are some things I noticed:
Are you sure your bootloader is unlocked? The device says it's locked. What happens when you send the unlock command?
You may need to flash vbmeta with the option --disable-verity.
This device has a painful ammount of partitions and whoever designed it should be punished for making my head hurt.
Not sure about the -S 100M thing, haven't seen that before and the system has to be larger than 100 megabytes.
Also, I don't think it's necessary to erase that many partitions before flashing.
It even has UEFI with a partition to store variables - that is very intresting and could have some great potential for multi-booting and other fun stuff - if we can understand how their implementation works.

chocolote4444 said:
Okay, so I own a Red Magic 6 and it's currently bricked. There is no unbrick tool for this device yet and there isn't going to be one for a while.
My bootloader is unlocked. I have tried reflashing the files using fastboot. However when I go to flash the system, it prints out:
Invalid sparse file format at header magic
Sending sparse 'system' 1/4 (786352 KB) OKAY [ 18.114s]
Writing 'system' FAILED (remote: 'Partition not found')
fastboot: error: Command failed
(Phone came with a/b partition just a heads up and it runs on Stock android 11)
I have searched EVERYWHERE, from forums, to tools, to python scripts.... EVERYTHING. No solution.
Yes, my fastboot is on the lastest version and yes I tried the --force command on fastboot. Still no luck.
I have researched everything about sparse images but am still having problems. I tried converting the image to a RAW ext4 img but it fails.
Is there any workaround for this?
Click to expand...
Click to collapse
Hello,
Have you find a solution to your pronlem?
is there an unbrick tool for red magic 6s pro?
I think I messed up my phone and it is brick because the super image is not updating for product system etc when I tried to flash the extracted ROM images. system and product coyld not be flashed. and sparse error apperas.

Did you install them in fastbootd mode? (Not regular fastboot)

DavidxxxD said:
Did you install them in fastbootd mode? (Not regular fastboot)
Click to expand...
Click to collapse
Thanks for the quick reply
I can’t boot to fastbootd. It gives an error and boot back to fastboot

You can try to flash the non-dynamic partitions first and then try again.

DavidxxxD said:
You can try to flash the non-dynamic partitions first and then try again.
Click to expand...
Click to collapse
hey so i also deleted cache partition
should i do
fastboot create-logical-partition cache 1000
to make cache partition?
i did do that and now its flashing, its showing less errors then last time lol
edit: what should i do to make cache partition?

Hello, I tried the commands DavidxxxD gave, but my phone is now stucked in a bootloop, I have a Xiaomi 11T. And the commands weren't working, it said "deleting 'system'..." but after it said "command failed".

Try creating it again and flash the image in fastbootd.
Is your device A/B? Use
Code:
fastboot getvar all
to learn more.

solution - Use SDK platform 33.03 instead

Related

Flashing system.img problem

Hi,
I have flash system.img file by using
Code:
D:\ADB\Android>fastboot flash system d:\backup\flash\system.img
sending 'system' (116302 KB)...
OKAY [114.524s]
writing 'system'...
OKAY [ 47.582s]
finished. total time: 162.108s
It seems normal to me, but the problem arise when I restart the the phone. The phone unable to boot, and when I try
Code:
ADB Shell
It says somethings like "sh" is not found. So I do reboot recovery go to the shell and mount /system. Shockingly there is nothing in there.
I have checked the contents of system.img, and there is a lot of things in there, including the "sh". But it seems fastboot failed to flash the system partition.
Anyone can help me ?
maybe you should tell more info about your device, brand,chipset, etc ?
so people can be more easy to help.
just newbie suggestion, ignore this if its no help xD
Looks like your system image file is corrupted cause its not mounted after loading kernel. What kind of filesystem the image is using?
lolet said:
Looks like your system image file is corrupted cause its not mounted after loading kernel. What kind of filesystem the image is using?
Click to expand...
Click to collapse
The system image is not corrupted, because I can safely flash it using Clockworkmod. The filesystem is yaff2, and I have tried opening it using some software and my file is there. I think the problem lies on fastboot who failed flashing properly.
simple
yokowasis said:
Hi,
I have flash system.img file by using
Code:
D:\ADB\Android>fastboot flash system d:\backup\flash\system.img
sending 'system' (116302 KB)...
OKAY [114.524s]
writing 'system'...
OKAY [ 47.582s]
finished. total time: 162.108s
It seems normal to me, but the problem arise when I restart the the phone. The phone unable to boot, and when I try
Code:
ADB Shell
It says somethings like "sh" is not found. So I do reboot recovery go to the shell and mount /system. Shockingly there is nothing in there.
I have checked the contents of system.img, and there is a lot of things in there, including the "sh". But it seems fastboot failed to flash the system partition.
Anyone can help me ?
Click to expand...
Click to collapse
ur work is simple...just plug in ur phone in fastboot mode...keep a boot.img file in the same folder that that of the fastboot folder....boot.img can be taken from ur STOCK ROM
and type ==
fastboot devices
then ur device will be shown.....
then type
fastboot flash boot boot.img
n its done!
I stuck with my Mate 9 Error mode numbers 11 and 2
MEGHSHAH said:
ur work is simple...just plug in ur phone in fastboot mode...keep a boot.img file in the same folder that that of the fastboot folder....boot.img can be taken from ur STOCK ROM
and type ==
fastboot devices
then ur device will be shown.....
then type
fastboot flash boot boot.img
n its done!
Click to expand...
Click to collapse
I would like to tell you my problem, I have a Mate 9 MHA-L09C605B111 which I did a rebrand a while ago and I'm with CUST 432 and installed the version of Oreo 8.0.0.368, a few weeks ago I received the update 369 via OTA. It was interesting to try; the problem is that I had open bootloader, TWRP Pretorian 3.2.0 and Root, take a terrible decision to do a relock of the bootloader.
After several attempts and letting the battery drain I could enter Fastboot mode, I have the FRP unlocked and I could unlock the bootloader again, the problem is that I can not enter either the TWRP, or to recovery mode, try flashing again the same TWRP I had installed it well but still when I want to enter after passing the Huawei logo it remains on the white screen of ERROR MODE, Func NO: 11 (recovery image) Error NO: (image Failed!) Reading other forums and looking I have been told a lot by Internet that it is necessary to make the Dload method try it but it did not work, I understand that it does not work in this model but I still try it.
I also did a flash with all the files as I found in a tutorial
"When you have system extracted, flash it in fastboot using fastboot flash system system.img.
Do the same with KERNEL, extract and flash to fastboot flash kernel KERNEL.IMG
(BOOT is now split into RAMDISK and KERNEL)
Recovery was split to recovery_ramdisk, recovery_vendor and recovery_vbmeta
Boot was split into ramdisk and kernel
Recovery2 (erecovery) was split into erecovery_ramdisk, erecovery_kernel, erecovery_vendor and erecovery_vbmeta
fastboot flash ramdisk ramdisk.img. Kernel flashed as fastboot flash kernel kernel.img.
Recovery ramdisk as fastboot flash recovery_ramdisk recovery_ramdisk.img "
I'm still stuck on the same screen with error 11 and 2 I made the flash of the recovery that I used when I put version 368 are two MHA_RECOVERY_NoCheck.img and MHA_RECOVERY2_NoCheck.img both give Failed using the command Fastboot flash recovery_ramdisk RECOVERY_XXXX with both the same without using the _ramdisk command is equal I'm still stuck in the same state.
Does anyone have an idea that another method I can try?
I will thank you very much.
You can flash all * .img through ADB and in this case there is a specific order to do it, check several threads but I did not get an answer and search but I could not find anything, it is worth noting that when I flash files I mentioned before all OKAY but on power up it goes back to error 11 and 2 I have been told that it is a partition problem but I could not find something to recover them, there is some method that is missing or maybe an error in the steps I am doing ? I still can not access the TWRP but I can access without problems by ADB.

[Q] Factory image will not flash

Hi
I'm trying to flash the factory image recently posted but getting the following error:
Code:
target reported max download size of 518205818 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1814213396 bytes
error: update package missing system.img
Looks like the Nexus 9 doesn't have enough allocated space to take the 820+MB zip file that contains the system images. I've updated to the latest version of SDK tools and have the newest Fastboot EXE, and device state is saying UNLOCKED on the HTC Fastboot screen.
Anyone have any ideas?
Regards
Phil
PhilipL said:
Hi
I'm trying to flash the factory image recently posted but getting the following error:
Code:
target reported max download size of 518205818 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1814213396 bytes
error: update package missing system.img
Looks like the Nexus 9 doesn't have enough allocated space to take the 820+MB zip file that contains the system images. I've updated to the latest version of SDK tools and have the newest Fastboot EXE, and device state is saying UNLOCKED on the HTC Fastboot screen.
Anyone have any ideas?
Regards
Phil
Click to expand...
Click to collapse
I would trying to flash each image in factory image individually (Flash bootloader, flash boot, flash recovery, etc.), flashing them in the order the flash-all script would flash them (If your not sure which order it would flash them in just open the flash-all.bat or flash-all.sh as a text file and look at the order they are flashed in).
PhilipL said:
Hi
I'm trying to flash the factory image recently posted but getting the following error:
Code:
target reported max download size of 518205818 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1814213396 bytes
error: update package missing system.img
Looks like the Nexus 9 doesn't have enough allocated space to take the 820+MB zip file that contains the system images. I've updated to the latest version of SDK tools and have the newest Fastboot EXE, and device state is saying UNLOCKED on the HTC Fastboot screen.
Anyone have any ideas?
Regards
Phil
Click to expand...
Click to collapse
The missing.sig errors are normal. The missing system.img is not. Try downloading the factory image again.
Sent from my Nexus 5 using XDA Free mobile app
Same here, get the same error when trying to flash factory image. I did flash the files individually, but wasn't sure how to flash the vendor.img?
any update on this?
what do we do with vendor.img?
mingiunate said:
any update on this?
what do we do with vendor.img?
Click to expand...
Click to collapse
Just an update - based on the size of vendor.img, I assumed it was the same as userdata.
here are the steps i took to manually flash:
unzip image-volantis-lrx21l.zip
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash boot boot.img
fastboot flash userdata vendor.img
from tablet - select hboot
select factory reset
Done!
Hm, I successfully flashed vendor.img using
Code:
fastboot flash vendor vendor.img
But I'm not sure whether that was the correct way to go about things.
Hi
Thanks everyone for the replies/responses.
I will try and flash each image separately, however this shouldn't be necessary and means the image (or some setting on the Nexus 9) is wrong or broken. The whole point of the factory image is that it flashes with ease to get us back to a clean slate (well tablet), so a bit worrying they've not seemingly tested it too well.
Note I've flashed factory images dozens of times to Nexus 4, 5, 7 (both years) and never had this problem.
Perhaps Google will post a fix soon.
Best Regards
Phil
I think you need to run these two commands before you flash the rest of the .img files?
fastboot flash bootloader bootloader-flounder-3.43.0.0114.img
fastboot reboot-bootloader
ilatimer1 said:
I think you need to run these two commands before you flash the rest of the .img files?
fastboot flash bootloader bootloader-flounder-3.43.0.0114.img
fastboot reboot-bootloader
Click to expand...
Click to collapse
here are the steps i took to manually flash:
run the flash-all.bat up until the point where it fails
unzip image-volantis-lrx21l.zip
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash boot boot.img
fastboot flash userdata vendor.img - looks like userdata should be vendor? - mine worked with userdata regardless
from tablet - select hboot
select factory reset
Done!
Hi
ilatimer1 said:
I think you need to run these two commands before you flash the rest of the .img files?
fastboot flash bootloader bootloader-flounder-3.43.0.0114.img
fastboot reboot-bootloader
Click to expand...
Click to collapse
I did this as the first step as that is what is in the batch file with all/most Nexus factory images, didn't make a difference though. Something is definitely broken somewhere. However installing the images separately seems to work.
Best Regards
Phil
When was the last time you updated your SDK? Try downloading the latest SDK and run the flash-all
Hi
cundiffr said:
When was the last time you updated your SDK? Try downloading the latest SDK and run the flash-all
Click to expand...
Click to collapse
As I mentioned in the first post, after the first failure I updated my SDK to the very latest version, the result was the same. The image doesn't flash unless you separate out the individual parts and do it separately. Either the Nexus 9 isn't configured to allow enough space to accept the entire image (which clearly Google think it should as that is how they instruct it to be installed), or the image is broken in some way.
I'm sure it will get fixed at some point.
Regards
Phil
The same thing happened to my while I tried to flashed the newly released lollipop image to my nexus 5. I only had to restart my laptop and it worked.
mingiunate said:
[*]fastboot flash userdata vendor.img - looks like userdata should be vendor? - mine worked with userdata regardless
Click to expand...
Click to collapse
Yep, vendor should be flashed to the "vendor" partition.
userdata is emptied during factory reset.
Are you sure the prollem is with the tablet? When running a full ruu on other HTC devices, the failure to allocate space prollem arises from not having enough ram on the pc. Could be why flashing the images separately is working.
scotty1223 said:
Are you sure the prollem is with the tablet? When running a full ruu on other HTC devices, the failure to allocate space prollem arises from not having enough ram on the pc. Could be why flashing the images separately is working.
Click to expand...
Click to collapse
It's the image or tablet that's at fault. I ran the flashing process on a high-end machine equipped with 32 GB of RAM.
Restart your computer!
I sat here forever trying to figure why the hell i couldn't get 5.0 to flash to my nexus 5. I looked everywhere and didn't find anything that helped at all. I restarted my computer and tried again and it worked instantly. The first thing i said to myself was are you ****ing kidding me.... my computer was the issue. Dont tell yourself bull**** about how your computer is the bees knees. Mine may only have 16 gb of ram but restarting it worked perfectly.
Do i make a fullwipe, befor i flash the Image Files, if yes how i do this.
format system
format data
format cache
????????
fastboot flash userdata vender.img actually worked for me

[Q]Unlock VZW bootloader? Hard brick the Z2 - what would it take?

I'm pondering options with the vzw z2 tablet (sgp561) and before I start playing with this fire, I am curious what it would take to hard brick this so I know what NOT to try.
Any thoughts?
In theory as long as fastboot works it should be pretty tough to brick. I don't really know how fastboot works on Sony devices I have mostly Samsung devices but I assume download mode work largely the same as fastboot. I have brought back Samsung devices from being very near full hard brick. That said they were old and had unlocked bootloaders. I am not sure how relevant my two cents is but that is what I have. On another note I also have the 561 and am more than happy to help in any way I can. I really want some CM12 on this thing since VZW probably won't give it to us until everyone else has had it for 6 months.
Maxim512 said:
In theory as long as fastboot works it should be pretty tough to brick. I don't really know how fastboot works on Sony devices I have mostly Samsung devices but I assume download mode work largely the same as fastboot. I have brought back Samsung devices from being very near full hard brick. That said they were old and had unlocked bootloaders. I am not sure how relevant my two cents is but that is what I have. On another note I also have the 561 and am more than happy to help in any way I can. I really want some CM12 on this thing since VZW probably won't give it to us until everyone else has had it for 6 months.
Click to expand...
Click to collapse
Well, I can throw a couple of "kopeka's" (cents) in as well.
Fastboot is a life savior. Bar none. With it, you can wipe partitions and flash new partition images. Now this is taken that the fastboot capabilities in the given bootloader are "full" and not neutered in some way. Yes, it could possibly be so.
The only way I know, where you can perma-brick the device, is by flashing things on incorrect partition formats, or flashing a bootloader not meant for the device.
Incorrect custom recoveries are notorious for this, as they flash incorrect partition info. (been there, did that).
Also, nand memory can fail after some flashings. It happens. No rhyme or reason to it, it just does. Generally it gets corrupt to the point wipes and formats don't clean it.
Moscow Desire said:
Well, I can throw a couple of "kopeka's" (cents) in as well.
Fastboot is a life savior. Bar none. With it, you can wipe partitions and flash new partition images. Now this is taken that the fastboot capabilities in the given bootloader are "full" and not neutered in some way. Yes, it could possibly be so.
The only way I know, where you can perma-brick the device, is by flashing things on incorrect partition formats, or flashing a bootloader not meant for the device.
Incorrect custom recoveries are notorious for this, as they flash incorrect partition info. (been there, did that).
Also, nand memory can fail after some flashings. It happens. No rhyme or reason to it, it just does. Generally it gets corrupt to the point wipes and formats don't clean it.
Click to expand...
Click to collapse
In random readings, I've seen that "Unlock bootloader allowed=no" on some devices blocks fastboot. I can boot into fastboot mode, but I haven't tried flashing anything since I am not experienced in fastboot flashing. I think the easy test would be to read a partition in fastboot, then write it back. Do you know the commands to do so?
da_reeseboy said:
In random readings, I've seen that "Unlock bootloader allowed=no" on some devices blocks fastboot. I can boot into fastboot mode, but I haven't tried flashing anything since I am not experienced in fastboot flashing. I think the easy test would be to read a partition in fastboot, then write it back. Do you know the commands to do so?
Click to expand...
Click to collapse
You are correct. Some variants (Verizon for example), you can't unlock the bootloader. No unlock, no "full" fastboot or fastboot at all.
Although my original bootlocker was "unlockable" due to it turning out to be a "Demo" unit, I managed to flash an RU ftf, and got the unlocked bootloader. But it seems "some" carrier models don't allow for this. (as a sidenote, I've just reflashed my DRM keys back today, and now on a stock locked .167 build again. Just wanted to try it and see if it worked.)
Here's a list of useful commands (thanks to AndroidForums), but you can certainly find a ton by Google-it.
Code:
fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format <partition> format a flash partition
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
-n <page size> specify the nand page size. default:
2048
-S <size>[K|M|G] automatically sparse files greater th
an
size. 0 to disable
A very useful thing to use, is for example;
fastboot boot boot.img
or
fastboot boot recovery.img
This is useful as it doesn't actually "write" the image to the device, but rather boots it in memory.
Usually how we test things such as new custom recoveries, boot.images and such.
Moscow Desire said:
You are correct. Some variants (Verizon for example), you can't unlock the bootloader. No unlock, no "full" fastboot or fastboot at all.
Although my original bootlocker was "unlockable" due to it turning out to be a "Demo" unit, I managed to flash an RU ftf, and got the unlocked bootloader. But it seems "some" carrier models don't allow for this. (as a sidenote, I've just reflashed my DRM keys back today, and now on a stock locked .167 build again. Just wanted to try it and see if it worked.)
Here's a list of useful commands (thanks to AndroidForums), but you can certainly find a ton by Google-it.
Code:
fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format <partition> format a flash partition
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
-n <page size> specify the nand page size. default:
2048
-S <size>[K|M|G] automatically sparse files greater th
an
size. 0 to disable
A very useful thing to use, is for example;
fastboot boot boot.img
or
fastboot boot recovery.img
This is useful as it doesn't actually "write" the image to the device, but rather boots it in memory.
Usually how we test things such as new custom recoveries, boot.images and such.
Click to expand...
Click to collapse
Well I was going to give it a shot but I turned my tablet off to reboot without making any changes to it and now it won't turn back on. I haven't had time to RMA it yet. It did this before but it just started working again for no reason. It is probably a good thing since it sounds like I probably would have bricked it trying anyway.
Maxim512 said:
Well I was going to give it a shot but I turned my tablet off to reboot without making any changes to it and now it won't turn back on. I haven't had time to RMA it yet. It did this before but it just started working again for no reason. It is probably a good thing since it sounds like I probably would have bricked it trying anyway.
Click to expand...
Click to collapse
Wow, talk about "timing". Luckily you didn't make any changes. Had a similar issue with mine last night (coming out of fastboot coincidently).
Did a fastboot boot to TWRP, and when it went to reboot, I had to mess with the Vol + and - nd PWR combinations a few times before it would boot.
Do not play with verizon z2
I work with custom roms and such... I also have a Sony Z2 late tab... I built a rom for this device.... Never got to test it. Got two on it with no issues. And this is a pain as well due to anytime you use twrp you must reflash twrp or your in for a world of hurt. Well during my process twrp froze while wiping the system... I could get to fastboot but any command I tried to run It told me that it was locked and I couldn't use the command as I didn't have the rights. So long story short I wouldn't play with it till someone gets a unlock for it

How to flash oeminfo. Can only access fastboot.

Hi.
I needed to change the boot logo on a few tablets and so i dumped the oeminfo partition and changed the logo data to all zeroes. This the modded oeminfo worked well on the first tablet, but when I flashed it to the second tablet it stopped booting. In retrospect I can see how this is a bad idea as the oeminfo supposedly contains device specific information such as IMEI etc.
I did make a backup of the original oeminfo partition with dd before flashing the modified one. The problem now is that fastboot does not allow me to flash the original oeminfo partition. I get:
Code:
Code:
$ sudo fastboot flash oeminfo oeminfo.img
target reported max download size of 531628032 bytes
sending 'oeminfo' (65536 KB)...
OKAY [ 2.091s]
writing 'oeminfo'...
FAILED (remote: Command not allowed)
I cannot seem to boot into recovery as the boot process gets stuck before this (Tried with key-combo and through fastboot boot).
Device is a: HUAWEI MediaPad M3 Lite 10
Phone and FRP unlocked.
As far as I can see there is no custom recovery available for this device yet (and it would properly not be usable as I cannot access original recovery)
Do you guys have any clue on how to flash the original oeminfo partition? I can make changes to the boot partition and was thinking about if there could be a way to enable adb in a recovery mode during boot by changing the init.rc / build.prop etc?
Any ideas on how to solve this or for a more suitable thread would be deeply appreciated.
Thanks
Bump.
Anyone that can point me in the right direction?

Installed CallX Call Recorder - Now Phone Borked

Help! Installed CallX, which has very good reviews, but instantly I could no longer hear anyone who called nor who I call. If I turn on the speaker we can converse but not clearly in a noisy environment.
I immediately deinstalled CallX... but, the problem remained.
In desperation I completely installed new firmware on the phone (Havoc 4.12, previously Havoc 4.8) and lost all my config which takes me a day to rebuild, and guess what? NO CHANGE. I can't hear anyone as a normal phone.
The developer of CallX is unresponsive. Isn't that dynamite? I think he must have been packing the reviews.
Does anyone know where the problem could be? I can't believe installing new firmware did not fix it.
Quantumstate said:
Help! Installed CallX, which has very good reviews, but instantly I could no longer hear anyone who called nor who I call. If I turn on the speaker we can converse but not clearly in a noisy environment.
I immediately deinstalled CallX... but, the problem remained.
In desperation I completely installed new firmware on the phone (Havoc 4.12, previously Havoc 4.8) and lost all my config which takes me a day to rebuild, and guess what? NO CHANGE. I can't hear anyone as a normal phone.
The developer of CallX is unresponsive. Isn't that dynamite? I think he must have been packing the reviews.
Does anyone know where the problem could be? I can't believe installing new firmware did not fix it.
Click to expand...
Click to collapse
Sounds like you need to flash stock Motorola firmware.
I never thought an app could do such damage to a phone even after reinstalling firmware.
I've now also lost all of my Signal SMS history (Havoc 4.12) because in Permissions the only ones available for Signal are Media Only or None. It needs Files permission to restore the backups, but it is just not an option.
It's worse now. I installed Stock using my instructions over here, but I installed Android 11, not having seen Beetle's post below. In TWRP I got all kinds of permission denied errors on /data/. So I then downloaded Android 10 from here, and
# fastboot flash partition gpt.bin
...which went fine. But then
# fastboot flash bootloader bootloader.img
Sending 'bootloader' (14204 KB) OKAY [ 0.414s]
Writing 'bootloader' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Preflash validation failed
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote: '')
fastboot: error: Command failed
No idea what is wrong. The partitions should have been written. My phone's down hard now. Booting into fastboot I do not get the normal way it looks, but a mostly blank screen with Start in the center, and text at bottom acknowleging it's connected. And it does answer up to # fastboot devices. I've downloaded the stock image twice and same issue.
I can't find an older Android 10, in the hope that it will fix this. I believe that Android 10 is required for all versions of Havoc, but I can't even get to Stock at this point. Feel like drinking but won't,
# fastboot flash bootloader bootloader.img
Sending 'bootloader' (14204 KB) OKAY [ 0.385s]
Writing 'bootloader' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Preflash validation failed
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote: '')
fastboot: error: Command failed
In TWRP I get "failed to mount /metadata" "invalid argument". There is no way to recover from this. I suspect this happened because I tried to roll back from stock Android 11 to 10. I've tried going back to 11 and every which way.
Looks like this phone is ruined. I've tried everything I can think of. out of ideas.
Yep, did a complete fastboot flash reinstall of Stock 11, and still the earpiece does not work. Phone is the default calling app.
This phone is unusable except in speakerphone. I've ordered another Moto G Power 2020 as it's so good otherwise, even without call recording. But AVOID CallX!
Beetle84 once said to not install Stock 11 then Havoc, that it must be Stock 10, but it is unclear whether that applies to the current Havoc 4.12 which is based on Android 11?
What I know for sure is that when you install Stock Android 11, you can NOT go back to Android 10 as G**gle has thoughtfully put in anti-rollback measures. And Android 12 makes things much more difficult for us modders.
Quantumstate said:
What I know for sure is that when you install Stock Android 11, you can NOT go back to Android 10 as G**gle has thoughtfully put in anti-rollback measures. And Android 12 makes things much more difficult for us modders.
Click to expand...
Click to collapse
That's not good. May I suggest supporting the efforts of the Pine64 folks?
Quantumstate said:
In TWRP I get "failed to mount /metadata" "invalid argument". There is no way to recover from this.
Click to expand...
Click to collapse
Did you try wiping metadata entirely?
I had the same problem with the bootloader refusing to allow downgrading the bootloader after installing Motorola's Android 11 firmware. Even so LineageOS is running fine on the device's Slot A right now. Read my post over here.
I did something like: (Exact steps weren't noted. Sorry, no desire to retest on a now working device used by a family member.)
Booted into the bootloader and flashed Motorola's Android 11 stock firmware from XT2041-4_SOFIA_RETUS_11_RPMS31.Q1-54-13-7_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip on Slot A, minus vbmeta and super
fastboot set_active a
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot flash bluetooth BTFM.bin
fastboot flash dsp dspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash recovery recovery.img
fastboot oem fb_mode_clear
Rebooted into fastbootd (fastboot reboot fastboot) and flashed LineageOS fastbootd images from lineage-18.1-20211219-UNOFFICIAL-FASTBOOTD-sofiar.zip
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vbmeta vbmeta.img
fastboot flash product product.img
Returned to the bootloader (fastboot reboot bootloader) and wiped data
fastboot erase carrier
fastboot erase userdata
fastboot erase metadata
fastboot erase ddr
Rebooted (fastboot reboot) into LineageOS, it booted successfully and runs fine. Rooting wasn't tested. Before trying LineageOS fastbootd images I installed crDroid through TWRP and booted it with success. It had some weird bugs unfortunately, most importantly being unable to serve as a working phone. My family member was very happy with an older version of crDroid from around June on the Android 10 firmware.
I fixed the /medadata error by (in TWRP)
- Unmount /metadata
- Disable MBR
- Format /metadata.
Problem is metadata was encrypted and 11 couldn't tell from 10.
Now all the /loop's on inactive slot b are inaccessible. I could keep jacking with it but ran out of time. And running Stock in slot a I find I still have the earphone problem so gave up and ordered another phone. It should never be possible for an app to do this kind of damage.
Yes I've noticed the Pine64 project, although one thing I require is a water-resistant phone. There will come a point, in view of the awful changes in Android 12, where I may move to a Pine phone. As it is, for years I've run no gapps, do not use the Play store, nor anything else G**gle except the OS. And I choke the OS off with AFWall+ in F-Droid.

Categories

Resources