How to unbrick L29 and AL10 stuck on Fastboot with bootloop (L/UL Bootloader - Mate 8 Q&A, Help & Troubleshooting

After hours of research over the internet and a couple of nights in front of my computer, I finally found a method who can help resurrect any Mate 8 variant which is stuck on bootloop.
You will need 3 things:
- DC Phoenix New Account (it costs 15 euros for 15 credits to use for 72h after initial flash (small price to pay compared to sending to repair shop or having a useless brick) -
- An UPDATE.APP at your choice for your phone (AL10 or L29, both are interchangeable) -
- This file with partition rework and factory firmware - DOWNLOAD -​
Steps:
1. Make sure you have at least 30% of battery.
2. Open DC Phoenix and login with your credentials.
3. Put your phone in fastboot mode (Vol. - + Power).
4. Select «fastboot mode» in DC Phoenix and then go to the «IMG FILES» tab.
5. Select the «NXT-AL10_M00A102_Factory_firmware_Global_Nonspecific_Android_6.0_EMUI_4.0» file and hit Open.
6. Click on «Update» and be patient. This should take 10 minutes.
7. Follow the log on the left. When it says «writing success», reboot your phone (Vol. - and Power until display goes off). The phone should normally boot into a Chinese-like ROM.
8. Put your phone back in fastboot mode and select the «APP FILES» tab in DC Phoenix.
9. Select your UPDATE.APP file and hit Update. Be patient. This may take up to 20 minutes.
10. Again, look at the log for «writing success» line and then reboot your phone.
Enjoy!
You can unlock your bootloader if it is not locked and install TWRP.

WOOOT This worked but HOW!?! And what is this backdoor hack to load the image (see log ) ? LOL!
ps: the downloaded file has a different name: NXT-AL10_M00A102_Factory_firmware_Global_Nonspecific_Android_6.0_EMUI_4.0.dgtks
in the here above filename is wrong/different: NXT-L29_NV_partitions_backup.dgtks (Corrected by TS)
Corrected: ps I checked the MEGA download file with the DC-Unlocker download ( https://files.dc-unlocker.com/user.html?v=files/57694006a60d7 )
they are the same:
K:\>fc /b NXT-AL10_M00A102_Factory_firmware_Global_Nonspecific_Android_6.0_EMUI_4.0_DC_UNL.dgtks NXT-AL10_M00A102_Factory_firmware_Global_Nonspecific_Android_6.0_EMUI_4.0_Mega.dgtks
Comparing files NXT-AL10_M00A102_Factory_firmware_Global_Nonspecific_Android_6.0_EMUI_4.0_DC_UNL.dgtks and NXT-AL10_M00A102_FACTORY_FIRMWARE_GLOBAL_NONSPECIFIC_ANDROID_6.0_EMUI_4.0_MEGA.DGTKS
FC: no differences encountered
anyway
i loaded up the downloaded NXT-AL10_M00A102_Factory_firmware_Global_Nonspecific_Android_6.0_EMUI_4.0.dgtks from MEGA ( see download link from djmitza222)
into DC 0.0.35 and this happened ( see log )
options:
Force upgrade OFF
not erase NV ON
Not Erase oeminfo ON
after this the Phone boots ands is all OK and i have C900B320
ps: My phone was bootloader unlocked and FRP Locked
i dont have installed some sort of virus / backdoor ?!
and can somebody explain why i spend days with tools and stuff but this actually worked ( for 15 euro ok ) ??
########################DC LOG #################### #
The file was loaded successfully
Device found: QHC021******9247
IMEI: 86840*********23
Build number: :NRD90M test-keys
Product model: NXT-L29
Erasing nvme partition
ERASE partition nvme ...FAILED
Cannot get FBlock info from device
Activating backdoor: DONE
Erasing nvme partition
Partition nvme erased
Erasing cust partition
Partition cust erased
Erasing misc partition
Partition misc erased
Writing xloader partition with file fastbootimage/sec_xloader.img
xloader partition UPDATE ...OK
Writing ptable partition with file fastbootimage/ptable.img
ptable partition UPDATE ...OK
Writing fastboot partition with file fastbootimage/sec_fastboot.img
fastboot partition UPDATE ...OK
Writing dts partition with file fastbootimage/sec_dt.img
dts partition UPDATE ...OK
Writing fw_lpm3 partition with file fastbootimage/sec_lpm3.img
fw_lpm3 partition UPDATE ...OK
Writing sensorhub partition with file fastbootimage/sec_sensorhub.img
sensorhub partition UPDATE ...OK
Writing fw_hifi partition with file fastbootimage/sec_hifi.img
fw_hifi partition UPDATE ...OK
Writing teeos partition with file fastbootimage/sec_trustedcore.img
teeos partition UPDATE ...OK
Writing recovery partition with file fastbootimage/sec_recovery.img
recovery partition UPDATE ...OK
Writing recovery2 partition with file fastbootimage/sec_erecovery.img
recovery2 partition UPDATE ...OK
Erasing cache partition
Partition cache erased
Writing cache partition with file fastbootimage/cache.img
cache partition UPDATE ...OK
Writing boot partition with file fastbootimage/sec_boot.img
boot partition UPDATE ...OK
Writing nvme partition with file fastbootimage/nvme.img
nvme partition UPDATE ...OK
Writing trustfirmware partition with file fastbootimage/sec_bl31.bin
trustfirmware partition UPDATE ...OK
Writing modem partition with file fastbootimage/sec_balong_modem.bin
modem partition UPDATE ...OK
Writing modem_dtb partition with file fastbootimage/sec_modem_dt.img
modem_dtb partition UPDATE ...OK
Writing modemnvm_update partition with file fastbootimage/nv.bin
modemnvm_update partition UPDATE ...OK
Writing modem_dsp partition with file fastbootimage/sec_lphy.bin
modem_dsp partition UPDATE ...OK
Writing modem_om partition with file fastbootimage/modem_fs.img
modem_om partition UPDATE ...OK
Writing modemnvm_img partition with file fastbootimage/modem_nv.img
modemnvm_img partition UPDATE ...OK
Writing 3rdmodem partition with file fastbootimage/3rdmodem.img
3rdmodem partition UPDATE ...OK
Writing 3rdmodemnvm partition with file fastbootimage/3rdmodemnvm.img
3rdmodemnvm partition UPDATE ...OK
Writing 3rdmodemnvmbkp partition with file fastbootimage/3rdmodemnvmbkp.img
3rdmodemnvmbkp partition UPDATE ...OK
Erasing userdata partition
Partition userdata erased
Writing userdata partition with file fastbootimage/userdata.img
userdata partition UPDATE ...OK
Writing system partition with file fastbootimage/system.img
system partition UPDATE ...OK
Writing splash2 partition with file fastbootimage/splash2.img
splash2 partition UPDATE ...OK
Writing frp partition with file fastbootimage/frp.img
frp partition UPDATE ...OK
Erasing cust partition
Partition cust erased
Writing cust partition with file fastbootimage/cust_factory.img
cust partition UPDATE ...OK
Writing secure_storage partition with file fastbootimage/secure_storage.img
secure_storage partition UPDATE ...OK
Software written
5/1/2017 9:28:59 PM Writing device finished OK
Current version: NextL09C999B100EMUI41
Extracting partitions
Cannot create extract directory: K:\DC_Phoenix\tmp\20170501_213206_UPDATE\
Extract files to directory: K:\DC_Phoenix\
Extracting partition: XLOADER OK
Extracting partition: FW_LPM3 OK
Extracting partition: FASTBOOT OK
Extracting partition: MODEMNVM_UPDATE OK
Extracting partition: TEEOS OK
Extracting partition: TRUSTFIRMWARE OK
Extracting partition: SENSORHUB OK
Extracting partition: FW_HIFI OK
Extracting partition: BOOT OK
Extracting partition: RECOVERY OK
Extracting partition: RECOVERY2 OK
Extracting partition: DTS OK
Extracting partition: MODEM OK
Extracting partition: MODEM_DSP OK
Extracting partition: 3RDMODEM OK
Extracting partition: SYSTEM OK
Extracting partition: CUST OK
Extracting partition: MODEM_DTB OK
Device found: 012345*********BCDEF
IMEI: 868*******692123
Build number: HLNXTAL10BM00A102
Product model: HUAWEI
Writing XLOADER partition with file K:\DC_Phoenix\XLOADER.img
XLOADER partition UPDATE ...OK
Writing FW_LPM3 partition with file K:\DC_Phoenix\FW_LPM3.img
FW_LPM3 partition UPDATE ...OK
Writing FASTBOOT partition with file K:\DC_Phoenix\FASTBOOT.img
FASTBOOT partition UPDATE ...OK
Writing MODEMNVM_UPDATE partition with file K:\DC_Phoenix\MODEMNVM_UPDATE.img
MODEMNVM_UPDATE partition UPDATE ...OK
Writing TEEOS partition with file K:\DC_Phoenix\TEEOS.img
TEEOS partition UPDATE ...OK
Writing TRUSTFIRMWARE partition with file K:\DC_Phoenix\TRUSTFIRMWARE.img
TRUSTFIRMWARE partition UPDATE ...OK
Writing SENSORHUB partition with file K:\DC_Phoenix\SENSORHUB.img
SENSORHUB partition UPDATE ...OK
Writing FW_HIFI partition with file K:\DC_Phoenix\FW_HIFI.img
FW_HIFI partition UPDATE ...OK
Writing BOOT partition with file K:\DC_Phoenix\BOOT.img
BOOT partition UPDATE ...OK
Writing RECOVERY partition with file K:\DC_Phoenix\RECOVERY.img
RECOVERY partition UPDATE ...OK
Writing RECOVERY2 partition with file K:\DC_Phoenix\RECOVERY2.img
RECOVERY2 partition UPDATE ...OK
Writing DTS partition with file K:\DC_Phoenix\DTS.img
DTS partition UPDATE ...OK
Writing MODEM partition with file K:\DC_Phoenix\MODEM.img
MODEM partition UPDATE ...OK
Writing MODEM_DSP partition with file K:\DC_Phoenix\MODEM_DSP.img
MODEM_DSP partition UPDATE ...OK
Writing 3RDMODEM partition with file K:\DC_Phoenix\3RDMODEM.img
3RDMODEM partition UPDATE ...OK
Writing SYSTEM partition with file K:\DC_Phoenix\SYSTEM.img
SYSTEM partition UPDATE ...OK
Erasing CUST partition
Partition CUST erased
Writing CUST partition with file K:\DC_Phoenix\CUST.img
CUST partition UPDATE ...OK
Writing MODEM_DTB partition with file K:\DC_Phoenix\MODEM_DTB.img
MODEM_DTB partition UPDATE ...OK
Software written
5/1/2017 9:34:22 PM Writing device finished OK

Thank you for your remark! I edited the post with the correct filename.
Concerning the flash method, I think it's based on some sort of exploit. If you looked into the about section of factory firmware, you may notice that it's Android 4.3. This method is awesome because it restores the partition layout back. So if you screw something up, you have a rescue.

flashing the device 2 times 1-factory firmware 2-update.app should cost me 15 or 30 ?

No, it will cost you only 15 € / device. Lifetime. You can flash it as many times you want.

my phone back to work thanks
confirmed
phone is back to work
this is the only solution that i didn't try to avoid pay the 15 euro
but after downloading all the Failes from the internet i give this one a shot and its works
my phone was stack on boot loop and cant boot recovery twrp
phonw unlocked
Fr unlocked
to those how have same problem this is the only way don't waste your Time
thanks again

I have a huawei mate 8 al10 version, can I use the l29 firmware for unbrick and then I also get the international firmware on my phone?

Hi,
this tool really unbricked my Mate 8.
But one thing is that my serialnumber is not correct (0123456789ABCDEF). >> There is the HCU Client to fix this, I haven´t checked yet.
The other thing is, the Internet Connection does not work good. The phone is connected with wifi or mobile LTE
but it always says "no Connection to the Internet".
Do These two things stuck together or are These sepaerate Problems ??
What can I do with Internet failure ?
Greez Rainer

The internet its a common problem for B320 and B330 software versions. You cannot fix them only by flashing a different modem firmware.
Concerning thr serial, you should restore your OEMInfo backup. If you don't have it, then you should fix it via HCU Client and generate your new bootloader unlock code.

Thanks for your answer. But how can I fix the Internet Problem ?

djmitza222 said:
Thank you for your remark! I edited the post with the correct filename.
Concerning the flash method, I think it's based on some sort of exploit. If you looked into the about section of factory firmware, you may notice that it's Android 4.3. This method is awesome because it restores the partition layout back. So if you screw something up, you have a rescue.
Click to expand...
Click to collapse
So that file linked to post #3 will set the phone back to an android 4.3 base? Would it be possible do you think, to flash that through DC, and then be able to put an EMUI 4 rom like B211 on to try to get better battery life back?

Thanks for this guide, at least my phone is working again at all! :good:
But I'm facing some problems flashing a new TWRP (regardless of which version). Maybe you have a hint for me?

I am no longer have this device so I cannot assist you more than this. It's a very good device but with very poor support from developers.

djmitza222 said:
I am no longer have this device so I cannot assist you more than this. It's a very good device but with very poor support from developers.
Click to expand...
Click to collapse
Fair enough! I don't think I'll try it - juuuuust in case

djmitza222 said:
I am no longer have this device so I cannot assist you more than this. It's a very good device but with very poor support from developers.
Click to expand...
Click to collapse
Ok, still thanks for the reply. However it'll turn out, this guide was a HUGE step forward and absolutely worth the 15 bucks. :good:

question??
Patneu said:
Thanks for this guide, at least my phone is working again at all! :good:
But I'm facing some problems flashing a new TWRP (regardless of which version). Maybe you have a hint for me?
Click to expand...
Click to collapse
man ve u unbricked a mate 8 with this program?? i need to know becuase i don t want to waste 15 euro :laugh: (sry for bad english i m italian xD)

DangerousKai said:
man ve u unbricked a mate 8 with this program?? i need to know becuase i don t want to waste 15 euro :laugh: (sry for bad english i m italian xD)
Click to expand...
Click to collapse
Yes, here's what worked for me. Also, note my little update here. Hope it works out for you, too.

Patneu said:
Yes, here's what worked for me. Also, note my little update here. Hope it works out for you, too.
Click to expand...
Click to collapse
Man ty i ve unbricked my mate 8 only one questio, i ve installed my ROM stock b192 . i can update to b560 with ota autoupdate?

My stock build is L29C652B101 (demo firmware)
Is it possible to restore an update.app from L29C432B330 (european build)?

When I tray to enter in fastboot the screen is black and the PC can't see the phone

Related

[Tool] SparseConverter v1.0.1

About:
fastboot stores each file it receives in RAM before flashing it to your Android device.
For this reason, large partitions (such as the /system partition) must be splitted using the "compressed ext4 file system sparse image format",
this format is defined by the AOSP (Android Open Source Project) and was designed for the single purpose of flashing a large partition.
If you tried to flash system.img from backup and received the "Invalid sparse file format at header magi" error, you have come to the right place.
The Solution:
SparseConverter is a tool that can create / decompress compressed ext4 file system sparse image format (e.g. system.img_sparsechunk1).
Note for Motorola phone owners:
The factory images from Motorola contains a 128KB motorola header and a 4KB motorola footer, if you decompress those images you may want to remove the header and footer.
I had no problem using the standard Android fastboot with my unlocked Moto G and flashing images without the Motorola header / footer.
(If you keep the header / footer, then you must use Motorola's fastboot)
Usage Examples:
SparseConverter.exe /compress D:\system.img E:\ 256MB
( will compress D:\system.img to 256MB sparse files starting from E:\system.img_sparsechunk1 )
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
( will decompress E:\system.img_sparsechunk1, E:\system.img_sparsechunk2 and etc. to D:\system.img )
The software may contain bugs and/or limitations that may result in damage to your phone, I take no responsibility for any damage that may occur.
For additional information about the "compressed ext4 file system sparse image format" see libsparse/sparse_format.h
p.s. Source code in C# is provided, Windows XP \ 2003 users must install the .Net Framework 2.0 before running this tool.
How can i flash system.img when is too large. i have compressed it using this tool, now how to flash?
Everything is explained in the original post, You need to use fastboot.exe which is part of the ADT bundle (Android Development Tools).
tal.aloni said:
Everything is explained in the original post, You need to use fastboot.exe which is part of the ADT bundle (Android Development Tools).
Click to expand...
Click to collapse
fastboot flash system system.img_sparsechunk1 ?
Not working for me. :/
It will be downloaded to device, but not flashed.
yes,
fastboot flash system system.img_sparsechunk1
fastboot flash system system.img_sparsechunk2
fastboot flash system system.img_sparsechunk3
make sure the system partition size match the image that you're trying to flash, to flash a bigger image you'll have to reflash the partition table and all the partitions (boot, recovery etc.)
p.s. not sure what "not working" means, what error do you get exactly?
tal.aloni said:
yes,
fastboot flash system system.img_sparsechunk1
fastboot flash system system.img_sparsechunk2
fastboot flash system system.img_sparsechunk3
make sure the system partition size match the image that you're trying to flash, to flash a bigger image you'll have to reflash the partition table and all the partitions (boot, recovery etc.)
p.s. not sure what "not working" means, what error do you get exactly?
Click to expand...
Click to collapse
Here is my error code, after attemp to flash system system.img_sparechunk1:
FAILED (remote: flash_cmds error!)
partition size match, it is system dump from another same device.
Sorry, I'm not familiar with this error.
tal.aloni said:
Sorry, I'm not familiar with this error.
Click to expand...
Click to collapse
I have Rooted my ASUS Tablet, and deleted something in system, now i am soft-bricked.
Now i cannot do somethnig, only use fastboot, butt i cannot flash system.
So i must waiting to developers, to port CWM/TWRP for my device.
Hi, I'm trying to convert a userdata.img file (60GB!) so I can flash it with fastboot onto my phone, when I run the tool I get this
Code:
C:\Users\Matt\Documents\SparseConverter_1.0.0>sparseconverter /compress C:\Users
\Matt\Documents\userdata.img "C:\Users\Matt\Documents\userdata sparse" 256MB
Image size is not a multiple of 4096 bytes
Does this mean that it won't convert my image? Thanks
EDIT: Also I know this image is valid as under linux
Code:
[email protected]:~$ sudo mount -t ext4 -o loop /home/matt/userdata.img /home/matt/ext4
[sudo] password for matt:
[email protected]:~$ sudo su
[email protected]:/home/matt# cd ext4
[email protected]:/home/matt/ext4# ls
anr bugreports dontpanic media resource-cache user
app cam_socket1 dpm mediadrm security
app-asec cam_socket2 drm misc shared
app-lib connectivity fdAlbum nfc system
app-private dalvik-cache local opponvitems time
backup data lost+found property tombstones
Hi Matt,
ext4 allocates storage space in units of "blocks". A block is a group of sectors between 1KiB and 64KiB, and the number of sectors must be an integral power of 2. Block size is specified at mkfs time and typically is 4KiB.
Click to expand...
Click to collapse
The sector size for most flash devices is 4096 bytes.
The "compressed ext4 file system sparse image format" assumes that the image is going to be flashed to a flash device, and thus expects its size to be a multiple of 4096 bytes.
I'm not sure how you created this user data partition image, the size of a proper image (for flashing purposes) should be a multiple of 4096 bytes.
Edit: BlockSize can be set to 512 instead of 4096 in SparseConverter source code (SparseCompressionHelper.cs).
tal.aloni said:
Hi Matt,
The sector size for most flash devices is 4096 bytes.
The "compressed ext4 file system sparse image format" assumes that the image is going to be flashed to a flash device, and thus expects its size to be a multiple of 4096 bytes.
I'm not sure how you created this user data partition image, the size of a proper image (for flashing purposes) should be a multiple of 4096 bytes.
Click to expand...
Click to collapse
I ran into this issue as well. I am trying to compress the userdata image from my phone that was previously bricked and I'd like to find a way to hold onto this data.
Thank you!
hazard666 said:
I ran into this issue as well. I am trying to compress the userdata image from my phone that was previously bricked and I'd like to find a way to hold onto this data.
Thank you!
Click to expand...
Click to collapse
How did you create this image? are you sure it's a raw image?
if it's indeed a raw image, you could append a the necessary amount of zero bytes to the image (e.g. using HxD) and then you could compress it.
I'm not sure what you mean by "hold onto this data", this tool is to prepare an image for flashing, if you're trying to access the files there are other methods (e.g. linux).
Awesome, I use this tool to compress system file of Motorola X2014 of 2.7GB that I was not able to flash it... works great, thank you so much
Great progress! In my case
I generate my system.img.raw by
adb root
adb wait-for-device
adb shell "dd if=/dev/block/platform/f9824900.sdhci/by-name/system of=/sdcard/system.img.raw"
adb pull -p /sdcard/system.img.raw
1st Trail below will NOT works, but at the end you will see my solution:
Windows cmd log:
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>sparseconverter /compress system.img.raw .\ 536870912
...
pause
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_
sparsechunk1
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.591s]
sending 'system' (524284 KB)...
OKAY [ 1.350s]
writing 'system'...
OKAY [ 13.953s]
finished. total time: 15.897s
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_
sparsechunk2
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.532s]
sending 'system' (524287 KB)...
OKAY [ 1.351s]
writing 'system'...
OKAY [ 8.678s]
finished. total time: 10.565s
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_
sparsechunk3
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.524s]
sending 'system' (411515 KB)...
OKAY [ 1.075s]
writing 'system'...
OKAY [123.069s]
finished. total time: 124.671s
Please note even we pass the fastboot flashing, but it does NOT works after flash is finished, the phone can reboot to Linux logo, but block there, can not start Android Animation and go to desktop.
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
SO, SOLUTION is:
as an conclusion, it seems fastboot can not manage the multi input images well, BUT it can handle a single compressed image files, so set the max image side to the partition size to 2684354560 can make fastboot works well.
I need to find my original dd output file system.img.raw in 2.5GB, then:
Windows cmd logs:
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>sparseconverter /compress system.img.raw .\ 2684354560
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_sp
arsechunk1
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.767s]
sending sparse 'system' (521371 KB)...
OKAY [ 4.530s]
writing 'system'...
OKAY [ 9.577s]
sending sparse 'system' (511116 KB)...
OKAY [ 6.465s]
writing 'system'...
OKAY [ 10.833s]
sending sparse 'system' (445892 KB)...
OKAY [ 6.274s]
writing 'system'...
OKAY [139.377s]
finished. total time: 177.831s
that will bring my system.img.raw back to my phone WELL
you can see my rooted su is there, ^_^:
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>adb shell
[email protected]:/ $ su
su
[email protected]:/ #
Matt, hazard666,
I was wrong, there is no restriction on BlockSize , you're welcome to download SparseConverter source code and set BlockSize to 512 (in SparseCompressionHelper.cs),
please let me know if this helps.
tal.aloni said:
Note for Motorola phone owners:
The factory images from Motorola contains a 128KB motorola header and a 4KB motorola footer, if you decompress those images you may want to remove the header and footer.
I had no problem using the standard Android fastboot with my unlocked Moto G and flashing images without the Motorola header / footer.
(If you keep the header / footer, then you must use Motorola's fastboot)
Click to expand...
Click to collapse
Hi, I used your tool to decompress sparsechunks into a single system image for the Moto X 2014 XT1097, AT&T. This is needed as a preliminary step in order to get root.
The next step is to convert the image into an ext4 format. However, the instructions we have to do that require using linux command simg2img and it doesn't like the header. The errors are:
"Invalid sparse file format at header magi
Failed to read sparse file"
"Bad magic"
or
"Error reading sparse file header"
How do we get rid of this header? Thanks!
JulesJam said:
How do we get rid of this header? Thanks!
Click to expand...
Click to collapse
I usually do it manually with HxD (hex editor).
JulesJam said:
The next step is to convert the image into an ext4 format. However, the instructions we have to do that require using linux command simg2img and it doesn't like the header.
Click to expand...
Click to collapse
I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
instead, you can just mount the image, for ext4 it would be:
Code:
sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
and when you're done customizing:
Code:
sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/
sudo umount mnt
(note that I've used offset=131072 instead of removing the header)
tal.aloni said:
I think you're confused, once the image is decompressed, it's no longer a sparse file, so you shouldn't use simg2img.
Click to expand...
Click to collapse
Yeah, I am definitely confused, lol!
tal.aloni said:
instead, use something along the line of (note that I've used offset=131072 instead of removing the header):
Code:
sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/
sudo umount mnt
Click to expand...
Click to collapse
Ok great, I will have someone who knows linux try that. What we want is a single file system image in ext4 format so hopefully that will work!
Thanks!
tal.aloni said:
I usually do it manually with HxD (hex editor).
I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
instead, you can just mount the image, for ext4 it would be:
Code:
sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
and when you're done customizing:
Code:
sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/
sudo umount mnt
(note that I've used offset=131072 instead of removing the header)
Click to expand...
Click to collapse
JulesJam said:
Yeah, I am definitely confused, lol!
Ok great, I will have someone who knows linux try that. What we want is a single file system image in ext4 format so hopefully that will work!
Thanks!
Click to expand...
Click to collapse
And I'm someone who's running a Linux distro!
After the second command I'm getting a memory allocation error though
"error: do_inode_allocate_extents: Failed to allocate 6524 blocks"
tal.aloni said:
I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
Click to expand...
Click to collapse
Also, just to be complete, the way I am going to modify/root the ext4 image is by using TWRP on a bootloader unlocked device according to these instructions:
http://forum.xda-developers.com/showpost.php?p=60389310&postcount=177
It worked for the XT1096 so it should work for the XT1097. Once we get the rooted ext4 image, we have a tool to flash it to the XT1097 that bypasses the signature check. Our bootloaders are locked so we have to do it this way.

[GUIDE][BRICKED] [BOOTS ONLY TO RECOVERY][All ASUS TRANFORMERS]

This is a general users guide to unbrick your Transformer tablet.
This guide will help you if your Asus tablet will only boot into recovery
and the command
Code:
adb reboot-bootloader
does not work to get you booted back to bootloader screen ..
If the above command works then skip to the first fastboot command ..
WHAT YOU NEED
An Asus tablet that will only boot into recovery …
Woking adb and fastboot on your PC
Windows drivers (if using Windows)
A fully charged tablet
Asus data cable
Stock firmware blob (from Asus's web site, make sure you get the right one)
_that's bootit.ko (unzipped and placed with fastboot.exe)
Downloads
Asus Stock firmware---MAKE SURE YOU GET THE CORRECT SKU FOR YOUR TRANSFORMER TABLET
click me
_that's bootit.ko----click me
INSTRUCTIONS
Extract your stock firmware in your downloads folder twice...You will see a blob file rename it boot.blob and move it to the same folder as your fastboot.exe or if in linux to your home folder
Unzip the bootit.ko and place it wth the above blob file.
Let start with this command to make sure that your PC can see your table as an ADB device in recovery
Code:
adb devices
OUTPUT
Code:
[email protected] ~ $ adb devices
List of devices attached
015c7d7a445c260c recovery
Then lets push the bootit.ko to the root of the device like this
Code:
adb push bootit.ko /
OUTPUT
Code:
[email protected] ~ $ adb push bootit.ko /
673 KB/s (27690 bytes in 0.040s)
Then lets insmod this .ko file
Code:
adb shell insmod /bootit.ko
This should reboot the tablet into the bootloader menu, lets verifiy.
Once in the bootloader screen lets make sure your PC can see the device in fastboot.
Code:
fastboot devices
OUTPUT
Code:
[email protected] ~ $ fastboot devices
015c7d7a445c260c fastboot
So now its time to erase the misc & cache partitions, as that is most likely the partitions that is making it boot to recovery...
Code:
fastboot erase misc
OUTPUT
Code:
[email protected] ~ $ fastboot erase misc
erasing 'misc'...
OKAY [ 1.021s]
finished. total time: 1.021s
Code:
fastboot erase cache
OUTPUT
Code:
[email protected] ~ $ fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 2.096s]
finished. total time: 2.096s
Once these two command run with OKAY as the OUTPUT .
It is time to make sure we can reboot into the bootloader with the hardware buttons
So from where you are at in the bootloader screen use the VOL DOWN & POWER buttons to boot the tab back into the bootloader screen ..
Run these command in fastboot in this order
The next command is to just verify your computer can see your device
Code:
fastboot devices
OUTPUT
Code:
[email protected]:~ > fastboot devices
015d2bbce2501405 fastboot
Code:
fastboot erase system
OUTPUT
Code:
[email protected]:~ > fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ 2.954s]
finished. total time: 2.954s
Code:
fastboot erase recovery
OUTPUT
Code:
[email protected]:~ > fastboot erase recovery
erasing 'recovery'...
OKAY [ 1.945s]
finished. total time: 1.945s
Code:
fastboot -w
OUTPUT
Code:
[email protected]:~ > fastboot -w
erasing 'userdata'...
OKAY [ 23.188s]
formatting 'userdata' partition...
Creating filesystem with parameters:
Size: 29618601984
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 7231104
Block groups: 221
Reserved block group size: 1024
Created filesystem with 11/1810432 inodes and 157662/7231104 blocks
sending 'userdata' (139133 KB)...
writing 'userdata'...
OKAY [ 26.358s]
erasing 'cache'...
At this point it will either hangs on erasing 'cache'
Or it will give you an error, either way you will need to
reboot the tablet back into fastboot with the hardware buttons
Once that is done continue on the path
Code:
fastboot erase boot
OUTPUT
Code:
[email protected]:~ > fastboot erase boot
erasing 'boot'...
OKAY [ 1.209s]
finished. total time: 1.209s
Code:
fastboot erase misc
OUTPUT
Code:
[email protected]:~ > fastboot erase misc
erasing 'misc'...
OKAY [ 0.978s]
finished. total time: 0.978s
Code:
fastboot erase cache
OUTPUT
Code:
[email protected]:~ > fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 2.843s]
finished. total time: 2.843s
Code:
fastboot -i 0x0B05 flash system boot.blob
During the sending/writing process of this step you will get the blue bar on your screen.....
OUTPUT
Code:
[email protected]:~ > fastboot -i 0x0B05 flash system boot.blob
erasing 'system'...
OKAY [ 2.339s]
sending 'system' (800927 KB)...
OKAY [133.094s]
writing 'system'...
[OKAY [178.036s]
finished. total time: 313.469s
Code:
fastboot -i 0x0B05 reboot
OUTPUT
Code:
[email protected]:~ > fastboot -i 0x0B05 reboot
rebooting...
finished. total time: 0.020s
Let it boot into stock ROM ...
Credits
@_that for his bootit.ko
TEAM CROMBi and TEAM ZOMBi-X @sbdags @hardslog
Troubleshooting
Here is some troubleshooting
Check out this thread for fasboot.exe, adb.exe and driver help ...CLICK ME
@lj50036
A typo on your very first command: adb device?
Edit: What would you recommend if the userdata is corrupted and have only fastboot/adb? fastboot format data-partition? Thanks...
LetMeKnow said:
@lj50036
A typo on your very first command: adb device?
Edit: What would you recommend if the userdata is corrupted and have only fastboot/adb? fastboot format data-partition? Thanks...
Click to expand...
Click to collapse
Fixed let me know if you see anymore ..
Thx @LetMeKnow
LetMeKnow said:
@lj50036
A typo on your very first command: adb device?
Edit: What would you recommend if the userdata is corrupted and have only fastboot/adb? fastboot format data-partition? Thanks...
Click to expand...
Click to collapse
I am going to get to this once you have fastboot back and you can boot with hardware buttons then its just like @Buster99's
guide but there is one very important command that he leaves out ..
I will post the rest of the guide after bit ...
Thx Josh
Here is the original thread where the bootit module was tested for the first time -> http://forum.xda-developers.com/showthread.php?t=2291974
The problem was that the installed recovery was too old and incompatible with the bootloader and so could not access the eMMC at all. The bootloader command to boot to recovery is stored in the MSC partition (mmcblk0p3), and the recovery could not clear it. Since the bootloader checks the MSC partition before checking for volume-down, it is impossible to get to fastboot without some additional kick in the butt (aka "bootit.ko").
The correct bootit.ko file to use is the one in "bootit-bootloader.zip": http://forum.xda-developers.com/attachment.php?attachmentid=1985941&d=1369339132 - the older version turned out to be too weak. Note that this is a zipped kernel module, not a recovery-installable ZIP. You need to unzip it on your PC before adb push.
After making it to the bootloader menu and working fastboot, you can fastboot flash a current version of TWRP and install the custom ROM of your choice. No real need for the stock blob, unless you want to make sure you have the current bootloader and a known working ROM.
Here is another thread where bootit.ko didn't help, maybe it was really a hardware problem. But lots of good background info from me. -> http://forum.xda-developers.com/showthread.php?t=2437376
And here is another success story -> http://forum.xda-developers.com/showthread.php?p=47525770
_that said:
Here is the original thread where the bootit module was tested for the first time -> http://forum.xda-developers.com/showthread.php?t=2291974
The problem was that the installed recovery was too old and incompatible with the bootloader and so could not access the eMMC at all. The bootloader command to boot to recovery is stored in the MSC partition (mmcblk0p3), and the recovery could not clear it. Since the bootloader checks the MSC partition before checking for volume-down, it is impossible to get to fastboot without some additional kick in the butt (aka "bootit.ko").
The correct bootit.ko file to use is the one in "bootit-bootloader.zip": http://forum.xda-developers.com/attachment.php?attachmentid=1985941&d=1369339132 - the older version turned out to be too weak. Note that this is a zipped kernel module, not a recovery-installable ZIP. You need to unzip it on your PC before adb push.
After making it to the bootloader menu and working fastboot, you can fastboot flash a current version of TWRP and install the custom ROM of your choice. No real need for the stock blob, unless you want to make sure you have the current bootloader and a known working ROM.
Here is another thread where bootit.ko didn't help, maybe it was really a hardware problem. But lots of good background info from me. -> http://forum.xda-developers.com/showthread.php?t=2437376
And here is another success story -> http://forum.xda-developers.com/showthread.php?p=47525770
Click to expand...
Click to collapse
Thx _that I did update the OP with the correct bootit.ko ...
lj50036 said:
Thx _that I did update the OP with the correct bootit.ko ...
Click to expand...
Click to collapse
Great stuff! Thanks for this thread Josh!
Now , if I understand this correctly, the insmod command injects a command into the kernel to boot straight to the bootloader before checking misc to break that 'forced reboot to recovery' cycle.
Kinda correct?
In another thread @_that stated once that
Code:
fastboot getvar all
does not return misc as a supported partiton and that
Code:
fastboot erase misc
only "theoretically" erases misc partition. Is that confirmed now?
You guys are great! So much fun to learn this...
I tried to follow this but i get this output:
After pushing bootit.ko to the root and insmod, the transformer reboots directly in the bootloader.
When try fastboot devices, nothing happens just the next line to fill in a command.
Also, when trying then to fastboot erase misc, it hangs with 'waiting for devices'..
lvrijn said:
I tried to follow this but i get this output:
After pushing bootit.ko to the root and insmod, the transformer reboots directly in the bootloader.
When try fastboot devices, nothing happens just the next line to fill in a command.
Also, when trying then to fastboot erase misc, it hangs with 'waiting for devices'..
Click to expand...
Click to collapse
Did you have a working fastboot driver on your PC before you got into this pickle?
Give us a detailed description on why you tried this procedure.
berndblb said:
Did you have a working fastboot driver on your PC before you got into this pickle?
Give us a detailed description on why you tried this procedure.
Click to expand...
Click to collapse
Thanks for the advice.
It was not the driver, if was my fastboot and adb .exe, i think an old version?
I now downloaded from here http://forum.xda-developers.com/showthread.php?t=2588979
And these are working!
So if someone ever have problems command doesn't recognize fastboot commands, its not always the driver! It can also be the fastboot.exe
This transformer is working again !
lvrijn said:
Thanks for the advice.
It was not the driver, if was my fastboot and adb .exe, i think an old version?
I now downloaded from here http://forum.xda-developers.com/showthread.php?t=2588979
And these are working!
So if someone ever have problems command doesn't recognize fastboot commands, its not always the driver! It can also be the fastboot.exe
This transformer is working again !
Click to expand...
Click to collapse
Great to see you up and running...:good:
I did add a Troubleshooting post number 3
The Josh
berndblb said:
Great stuff! Thanks for this thread Josh!
Now , if I understand this correctly, the insmod command injects a command into the kernel to boot straight to the bootloader before checking misc to break that 'forced reboot to recovery' cycle.
Kinda correct?
In another thread @_that stated once that
Code:
fastboot getvar all
does not return misc as a supported partiton and that
Code:
fastboot erase misc
only "theoretically" erases misc partition. Is that confirmed now?
You guys are great! So much fun to learn this...
Click to expand...
Click to collapse
No, I dont think it injects anything into the kernel as there may not even be one in the LNX partition ..
The bootit.ko module comes from the source of the kernel code..
Also the /misc partition is a full partition as shown here ..
Code:
mmcblk0p3
Offset: 1292369920 (0x4d080000)
Size: 2097152 (0x200000)
File system size: 512 * 4096 = 2097152 (fully occupies partition)
Linux rev 1.0 ext3 filesystem
Not mounted
Permissions: GID system can manipulate
Contains: Empty file system
Purpose: Recovery /misc
Referenced by: /system/lib/libandroid_runtime.so recovery ramdisk: /etc/recovery.fstab
Note: File system is referenced in recovery as emmc, not ext3!
Thx Josh
lj50036 said:
No, I dont think it injects anything into the kernel as there may not even be one in the LNX partition ..
Click to expand...
Click to collapse
I think berndblb meant that insmod injects something into the *currently running* kernel, which it does. It's used for loading additional kernel modules, usually drivers. When a module is loaded, its "init" function is called by the kernel so that it can hook its functionality into the proper kernel subsystems. My bootit.ko's init function simply reboots the tablet - without properly terminating processes, unmounting filesystems, etc. - so it should only be loaded when no partitions are mounted.
_that said:
I think berndblb meant that insmod injects something into the *currently running* kernel, which it does. It's used for loading additional kernel modules, usually drivers. When a module is loaded, its "init" function is called by the kernel so that it can hook its functionality into the proper kernel subsystems. My bootit.ko's init function simply reboots the tablet - without properly terminating processes, unmounting filesystems, etc. - so it should only be loaded when no partitions are mounted.
Click to expand...
Click to collapse
Nothing like _that to put you in your place....
lj50036 said:
Nothing like _that to put you in your place....
Click to expand...
Click to collapse
I'm trying to get back to a working recovery. Now I get a cycle of TWRP splash screens. This method looks promising because it appears to rebuild all of the partitions. I can use the Vol Down + Power keys to get to the bootloader (us_epad-10.6.1.14.10-20130801 A03. Can I skip to the fastboot steps? I had Crombi-kk running with rom2sd before I broke something trying to upgrade to zombie-x.
Thanks!
awilson77584 said:
I'm trying to get back to a working recovery. Now I get a cycle of TWRP splash screens. This method looks promising because it appears to rebuild all of the partitions. I can use the Vol Down + Power keys to get to the bootloader (us_epad-10.6.1.14.10-20130801 A03. Can I skip to the fastboot steps? I had Crombi-kk running with rom2sd before I broke something trying to upgrade to zombie-x.
Thanks!
Click to expand...
Click to collapse
You can skip all the way down to the command "fastboot erase misc". It should kick you out of twrp cycling...good luck..:fingers-crossed:
LetMeKnow said:
You can skip all the way down to the command "fastboot erase misc". It should kick you out of twrp cycling...good luck..:fingers-crossed:
Click to expand...
Click to collapse
Thx!
Back up and running! Thanks!!!

[HELP] Nexus 5 die, can't enter recovery mode (only Bootloader mode)

Hello,
My phone fell to the floor and since than can't boot.
I see the google logo and then it turning off.
I can't enter recovery mode.
I can enter bootloader mode, tried to re-flash the rom (factory) with -w (wipe) and still can't boot / enter recovery mode.
Any suggestions?
Thanks!
time for a new phone
If the screen is okay, get a nexus 5 with a busted screen and swap internal components.
I have the same problem, but allow me to add some more details:
When trying to go to recovery, i got a dead droid with a red sign on it. See my post on android enthusiasts: /questions/169999/stuck-in-bootloop-and-flash-recovery-doesnt-work-on-nexus-5/170395 (can't post url from my account)
From fast boot, I could flash a recovery (my fastboot is unlocked) but it gave no results: still had the dead droid (tried with twrp, cwm, and stock rom).
After that I gave up trying to get back my data and tried flashing the whole stock rom, but it when bad. Now when trying to flash anything I got errors:
Code:
$ sudo ./fastboot flash cache cache.img
target reported max download size of 1073741824 bytes
erasing 'cache'...
OKAY [ 0.125s]
sending 'cache' (13348 KB)...
OKAY [ 0.630s]
writing 'cache'...
FAILED (remote: flash write failure)
finished. total time: 0.936s
- or -
Code:
$ sudo ./fastboot flash system system.img
target reported max download size of 1073741824 bytes
erasing 'system'...
FAILED (remote: failed to erase partition)
finished. total time: 0.118s
The only good news is I realized I could boot to any arbitrary recovery without flashing it with:
Code:
$ sudo ./fastboot boot recovery.img.twrp
Most functions on recory wouldn't work (it says it can't mount most partitions), but from where I can get an
Code:
adb shell
. I tried various steps but without success so far:
Code:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/recovery
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/recovery
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Code:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/system
e2fsck 1.41.14 (22-Dec-2010)
system: clean, 1939/65536 files, 254904/262144 blocks
Code:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
/dev/block/platform/msm_sdcc.1/by-name/cache: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? y
yes
e2fsck: unable to set superblock flags on /dev/block/platform/msm_sdcc.1/by-name/cache
I think I managed to somehow mess up my partition system, and I don't know much how to recover it, anyone have clues or can suggest something ?
You may need to replace the power button on the motherboard. If the phone keeps booting and then restarting when the Google logo appears, the power button might be your culprit. It was for me, and after a trip to my local repair shop, it is as good as new.
Fvolfrine said:
You may need to replace the power button on the motherboard. If the phone keeps booting and then restarting when the Google logo appears, the power button might be your culprit. It was for me, and after a trip to my local repair shop, it is as good as new.
Click to expand...
Click to collapse
The power button works fine on my phone. It's isn't constantly rebooting, but it gets stuck at the booting animation. I can use the power normally in the bootloader and it behaves as expected.
biaib said:
The power button works fine on my phone. It's isn't constantly rebooting, but it gets stuck at the booting animation. I can use the power normally in the bootloader and it behaves as expected.
Click to expand...
Click to collapse
I have the same problem sir.
were you able to solve your issue?
If yes please explain how?
If the phone is stuck at the boot animation, try flashing the oldest Kit Kat ROM from the Google site: https://developers.google.com/android/images
ahiel2 said:
Hello,
My phone fell to the floor and since than can't boot.
I see the google logo and then it turning off.
I can't enter recovery mode.
I can enter bootloader mode, tried to re-flash the rom (factory) with -w (wipe) and still can't boot / enter recovery mode.
Any suggestions?
Thanks!
Click to expand...
Click to collapse
Well I Still am trying to fix that issue since almost 2 years now.....
My guesses are that eMMC is damaged when you thre your phone.
If you do find a solution please do let me know.
Thanks!

EFS2 format in flash

I have dumped the NAND flash chip from a Qualcomm modem and have a large partition labelled EFS2.
Does anyone have any details of the EFS2 format so I can recreate the filesystem from this RAW flash dump.
I have already corrected the ECC errors and removed spare bytes so I can see chunks of file content, just want to recreate the directory structure and content of all files.

how to convert super.img to raw?

hello
i try with simg2img method but its not working get this error
simg2img.exe super.img super.raw
Invalid sparse file format at header magic
Failed to read sparse file
my device partitions is super os12
its kinda eros etc i don,t know much about it
so is there any way to convert it to raw?
Have you found any solution?

Categories

Resources