Unable to write to boot partition [Infinix X657 (MT6580)] - Android Q&A, Help & Troubleshooting

Trying to build a custom TWRP for my phone using this guide, but pulling files from /system is locked behind root perms.
Attempting to use the magisk root method, yet I'm unable to write to the boot partition (even when using the stock image) whatsoever. Each attempt giving this error:
Writing 'boot' FAILED (remote: 'sparse image size span overflow.')
Tried specifying size (using -S), as well as erasing the partition before flashing (both with and without specifying size), each time giving the same error (wouldn't even work with the stock image, so i had to reflash using SP flash tool). Trying to flash from fastbootd instead gives:
Writing 'boot' FAILED (remote: 'Operation not permitted.')

Related

Unable to Lock Moto E (condor) Bootloader the second time.

I am not a developer, but would like to consider myself an advanced user.
After unlocking the bootloader, I have installed custom ROMs on three different devices at different times. I have also installed the stock ROM. But have never locked the bootloader back.
However, on the current device (that was looping through the bootloader), I installed the stock ROM (RETAILDSDSALL_XT1022_4.4.4_KXC21.5-40_cid7_CFC.xml) and locked the bootloader. Successfully updated it to the official OTA Lollipop 5.1.
After that, I just tried my luck to install Ubuntu Touch (ported actually for Moto G [falcon] by h2o64, based on this thread). I unlocked the bootloader again for this. The install was 'successful' (there were no errors surprisingly), but the device obviously did not boot.
Now, I wanted to reinstall the stock firmware on the device. This time however, it fails at this command:
sudo fastboot flash partition gpt.bin
Here's the result >
target reported max download size of 299892736 bytes
sending 'partition' (32 KB)...
OKAY [ 0.087s]
writing 'partition'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.667s
I have used fastboot in Linux all the other times I said I installed custom and stock ROMs.
However, I tested with mfastboot on Windows 10 as well, with no luck.
I am also able to successfully install TWRP recovery on the device and erase "system", "cache" and "userdata" using fastboot. However, cache and dalvik cache removal fails on TWRP.
Finally, although the partition flash command (which I personally understand as creating the partition table - correct me here please) and the motoboot.img flash command failed, I ran the rest of the commands and successfully installed the stock ROM mentioned above. However, this time, the "fastboot oem lock" command fails.
Any suggestions would be of great help... (it's not my phone)

Mistake in fastboot

I made a bootlogo with Moto Boot Logo Maker (http://forum.xda-developers.com/moto-g/themes-apps/app-motorola-boot-logo-maker-source-t2848667).
But when I tried to install the bootlogo via fastboot, I did the mistake of try to flash 'boot' instead of 'logo'.
I tried to flash bootlogo in 'boot' partition 3 times, and now I don't know what to do.
Please help, what to do now?
I don't know if I can turn off my phone or try to restart, I don't know if it'll start again or if it'll hard brick because I tried to flash 'boot' partition.
What can I do? Will I need to download original firmware and flash boot with its correct image?
Computer Logs
Code:
fastboot flash boot bootlogotest.bin
target reported max download size of 299892736
sending 'boot' (597 KB)...
OKAY [0.047s]
writing 'boot'...
(bootloader) Invalid boot image
FAILED (remote failure)
finished. total time: 0.094s
fastboot flash boot bootlogotest.bin
target reported max download size of 299892736
sending 'boot' (597 KB)...
OKAY [0.062s]
writing 'boot'...
(bootloader) Invalid boot image
FAILED (remote failure)
finished. total time: 0.094s
fastboot flash boot logo.bin
target reported max download size of 299892736
sending 'boot' (421 KB)...
OKAY [0.078s]
writing 'boot'...
(bootloader) Invalid boot image
FAILED (remote failure)
finished. total time: 0.094s
Phone Logs
Code:
Fastboot Reason: Reboot mode set to fastboot
USB connected
cmd: getvar:partition-type:boot
cmd: getvar: max-download-size
cmd: download:000954e8
cmd: flash:boot
Mismatched partition size (boot)
cmd: getvar:partition-type:boot
cmd: getvar: max-download-size
cmd: download:000954e8
cmd: flash:boot
Mismatched partition size (boot)
cmd: getvar:partition-type:boot
cmd: getvar: max-download-size
cmd: download:000696e8
cmd: flash:boot
Mismatched partition size (boot)
Phone Info
Code:
Model: XT1025 Dual Sim w/ TV - Brazillian Retail
Updated to first 5.1 Official OTA on July 23rd
Then installed Resurrection Remix
So is your phone booting now?
It wouldn't have done any harm imo.
I haven't came across it before so nothing can be said for sure.
Chances are, fastboot formatted your boot partition and when tried to flash the IMG, throws that error. In that case, your boot partition is empty and system is without a kernel. You will need to flash stock IMG in that case.
However, it might be the case that fastboot performed the check before formatting partition and your kernel might be residing there safely.. But no way of knowing that without booting.
So if you want to be on safe side, flash the stock img.
If you want to try and check , try rebooting once. You might be able to boot into bootlaoder mode after.
Tapped from my Moto X
neo.ank said:
I haven't came across it before so nothing can be said for sure.
Chances are, fastboot formatted your boot partition and when tried to flash the IMG, throws that error. In that case, your boot partition is empty and system is without a kernel. You will need to flash stock IMG in that case.
However, it might be the case that fastboot performed the check before formatting partition and your kernel might be residing there safely.. But no way of knowing that without booting.
So if you want to be on safe side, flash the stock img.
If you want to try and check , try rebooting once. You might be able to boot into bootlaoder mode after.
Tapped from my Moto X
Click to expand...
Click to collapse
I thought boot partition was important as motoboot's bootloader partition or gpt, forgot 'boot' is kernel.
fastboot formatted my boot partition, phone was stuck at bootlogo.
Downloaded official XT1025 firmware and flashed only boot partition.
Went to TWRP, installed my old custom kernel and now the phone is fine.
Thanks
Glad u solved it..
Tapped from my Moto X
The custom logo's doesn't flash on the boot partition, flash on the logo partition
Example: mfastboot flash logo nameoflogo.bin

Flashing recovery using dd on a soft-bricked Asus New Padfone Infinity (A86)

Hello,
I soft-bricked my Padfone A86 when I tried to flash my own kernel using TWRP 2.7.1.1. Before that I was running a rooted Android 5.0.2 (fw version WW-12.4.0.59) with TWRP recovery that I installed like described in an article at padfoneclub.com.
Installing the custom ROM damaged (at least) the boot and recovery partitions. That means I only have access to fastboot which I can not use to flash to those partitions:
Code:
fastboot flash recovery twrp-2.7.1.1-unofficial.img
target reported max download size of 1879048192 bytes
sending 'recovery' (10124 KB)...
OKAY [ 0.321s]
writing 'recovery'...
FAILED (remote: Security is Enable, close 'flash' function !!)
finished. total time: 0.338s
The remote: Security is Enable, close 'flash' function !! error must have been introduced by a patch to the bootloader because I don't recall having this issue when I first flashed TWRP back then when I was running some previous firmware version.
What I can do though is to boot the boot.img (only from fw versions 10.12.3.116 and 10.12.3.130) like this: fastboot boot boot.img
Using saferoot I managed to get root access which enables me to write to the recovery and boot partitions like this:
Code:
dd if=/sdcard/twrp-2.7.1.1-unofficial.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery bs=4096; sync;
Although I can confirm that the memory gets changed using the dd command the bootloader neither loads recovery nor the system on the boot partition.
I looked at a hexdump of the recovery partition and it seems like the only thing stored in it is the TWRP image followed by zeroes. Trying different block sizes didn't help neither.
Confusingly that method seemed to work for some people. Maybe TWRP requires to be written over some stock recovery and can't boot on its own?
I was only able to try to flash the stock recovery for fw versions above 10.12.3.13 as ASUS only included patch-files for the recovery partition before. That didn't work neither. I was assuming that the recovery is running on its own and does not depend on being the same version as the system (or the bootloader). Or might there be something on a different partition that prevents the recovery from working properly?
Booting into recovery results in getting into fastboot mode (fastboot continue doesn't help).
Booting the system stops at the bootloader which shows the error message: ERROR: Can not load Invalid boot image!!
The frustrating thing is that although I seem to have full access to the device memory I still don't manage to fix the recovery partition.
Any help or ideas would be greatly appreciated.
Thunder Storm said:
Hello,
I soft-bricked my Padfone A86 when I tried to flash my own kernel using TWRP 2.7.1.1. Before that I was running a rooted Android 5.0.2 (fw version WW-12.4.0.59) with TWRP recovery that I installed like described in an article at padfoneclub.com.
Installing the custom ROM damaged (at least) the boot and recovery partitions. That means I only have access to fastboot which I can not use to flash to those partitions:
Code:
fastboot flash recovery twrp-2.7.1.1-unofficial.img
target reported max download size of 1879048192 bytes
sending 'recovery' (10124 KB)...
OKAY [ 0.321s]
writing 'recovery'...
FAILED (remote: Security is Enable, close 'flash' function !!)
finished. total time: 0.338s
The remote: Security is Enable, close 'flash' function !! error must have been introduced by a patch to the bootloader because I don't recall having this issue when I first flashed TWRP back then when I was running some previous firmware version.
What I can do though is to boot the boot.img (only from fw versions 10.12.3.116 and 10.12.3.130) like this: fastboot boot boot.img
Using saferoot I managed to get root access which enables me to write to the recovery and boot partitions like this:
Code:
dd if=/sdcard/twrp-2.7.1.1-unofficial.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery bs=4096; sync;
Although I can confirm that the memory gets changed using the dd command the bootloader neither loads recovery nor the system on the boot partition.
I looked at a hexdump of the recovery partition and it seems like the only thing stored in it is the TWRP image followed by zeroes.
Confusingly that method seemed to work for some people. Maybe TWRP requires to be written over some stock recovery and can't boot on its own?
I was only able to try to flash the stock recovery for fw versions above 10.12.3.13 as ASUS only included patch-files for the recovery partition before. That didn't work neither. I was assuming that the recovery is running on its own and does not depend on being the same version as the system (or the bootloader). Or might there be something on a different partition that prevents the recovery from working properly?
Booting into recovery results in getting into fastboot mode (fastboot continue doesn't help).
Booting the system stops at the bootloader which shows the error message: ERROR: Can not load Invalid boot image!!
The frustrating thing is that although I seem to have full access to the device memory I still don't manage to fix the recovery partition.
Any help or ideas would be greatly appreciated.
Click to expand...
Click to collapse
Try getting rid of the bs part. Flash the image at it's normal size.
Sent from my XT1609 using Tapatalk
Thanks for your reply.
I flashed both TWRP and stock recovery without the bs parameter. Same results as before: it doesn't boot into recovery.

Can't use TWRP on Huawei Y6 (2018)

Before:
I just unlocked the bootloader and installed a custom ROM (LineageOS 15.1: https://forum.xda-developers.com/huawei-y6/development/lineageos-15-1-huawei-y6-2018-t3832278) on my Huawei but it won't let me flash the TWRP from adb. I tried before flashing the custom ROM and also after but no progress. I tried with 'fastboot flash recovery recovery.img' as well as 'fastboot flash boot recovery.img' because I knew some smartphones include the recovery in the boot.img but I am always getting the same error:
Code:
fastboot flash recovery recovery.img
target reported max download size of 535822336 bytes
sending 'recovery' (16544 KB)...
OKAY [ 0.522s]
writing 'recovery'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.553s
I am not an expert but I understood that 'recovery' partition doesn't exist. I found some possible solutions online such as writing 'fastboot flash RECOVERY recovery.img' or 'fastboot flash erecovery recovery.img' (because Huawei calls the stock one 'erecovery') but they both gave me another error:
Code:
fastboot flash RECOVERY recovery.img
target reported max download size of 535822336 bytes
sending 'RECOVERY' (16544 KB)...
OKAY [ 0.522s]
writing 'RECOVERY'...
FAILED (remote: Command not allowed)
finished. total time: 0.528s
UPDATE: I found, maybe, the correct name of the recovery partition and it seems to work:
Code:
fastboot flash recovery_ramdisk twrp.img
< waiting for device >
target reported max download size of 535822336 bytes
sending 'recovery_ramdisk' (14026 KB)...
OKAY [ 0.443s]
writing 'recovery_ramdisk'...
OKAY [ 0.323s]
finished. total time: 0.767s
BUT it actually doesn't work properly because when I boot into recovery it boots the stock one. I tried other solutions found on the net like instantly unplug the phone after the flash and reboot it into recovery immediately but again it boots into stock one...
OTHER UPDATE: I managed to find and flash a TWRP that can boot up but it shows the internal storage 0MB not allowing me to install any .zip file. Because of that, I cannot install SuperSU to get root access.
I tried installing TWRP also with stock ROM but still showing 0MB because the phone is encrypted. To disable encryption I need to install the bluspark TWRP (As I found online), the problem is that bluspark won't boot and gets immediately overwritten by the stock ROM as it happened with the one I mentioned in the first update of the post.
Now I will try buying a microSD card and see if it shows right so that I can still flash .zip from the microSD card.
Now:
LATEST UPDATE: The SD card is working properly and I see it as around 60 GB instead of 64 but that's not the problem. I can see the .zip files I'd want to flash but when I try to do it it says me that it failed to mount every single partition and after some research I discovered that my Huawei has all the data encrypted. After other research I found that there are some TWRPs like blu_spark that could decrypt the data but every version I tried doesn't work and gets immediately overwritten by the stock recovery.
Does anyone know other methods to decrypt all the data on Huawei? Otherwise it's impossible to flash any .zip. Actually it flashes it but it fails to update the partitions state so the system doesn't recognize the changes.
Rooting Huawei is so difficult.. I will buy an OP5t as soon as I have the money XD.
Y6 2018 twrp
Any progress? I'm also looking for a version of TWRP that works with the Y6 2018.

Unable to flash any partition [Infinix X657 (MT6580)]

Technically a repost with more info (also I may or may not have forgotten about tags on the first thread).
Trying to fastboot flash to any partition gives the error:
FAILED (remote: 'sparse image size span overflow.')
Tried specifying size with -S, flashing stock image, erasing the partition and flashing (which gave the same error, making me unable to write to the empty partition. Did this with boot (magisk root) and had to reflash to stock using sp flash tool, which is why I'm sure of the stock images being fully functional), and trying two versions of the android platform tools (from the arch repos, as well as developer.android.com)
Originally I thought it was just the boot partition, but trying to flash twrp (built using the mtk auto twrp porter) gave the same error.
Did you later successfully flash it?
And did it work
please share the image file if it works

Categories

Resources