Flashing recovery using dd on a soft-bricked Asus New Padfone Infinity (A86) - Android Q&A, Help & Troubleshooting

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.

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] Broken system, recovery and bootloader flash failes - What to do?

First of, I'm running Cyanogenmod 12.1 on my Z2.
On the install it vanished my TWRP Recovery, so I decided to reflash it using their app - this was unsucessfull. I thought I would flash it the next day using adb, so I didn't mind.
However in the next hours I needed to reboot the phone - resulting in the Sony logo and nothing more. So I bootet into the CM recovery and tried to reflash the CyanDelta zip - this failed and resulted in "footer is wrong - signature verification failed - Installation aborted". The next thing I tried was flashing a zip by adb recovery sideload - this failed as well and resulted in "protocol fault (no status)".
This was when I tried to boot into the bootloader using the recovery menu entry. The screen got black, the LED lighted up blue and nothing happened forever. The same thing occours when I try to boot into the bootloader by hardware keys (hold VolUp and insert MicroUSB cable).
So, in short:
I can't boot android
I can't install zips by CM recovery
I can't boot into the bootloader [EDIT: I can.]
I can't install nandroid backups since the CM recovery doesn't offer that
Any idea?
If the phone's LED lights up blue it means that you are in fastboot mode (AKA the bootloader) . It is normal for the screen to be black. I suggest that you download a stock FTF and flash it using the windows flashtool application. Your phone is fine. Good luck.
the_crevis said:
If the phone's LED lights up blue it means that you are in fastboot mode (AKA the bootloader) . It is normal for the screen to be black. I suggest that you download a stock FTF and flash it using the windows flashtool application. Your phone is fine. Good luck.
Click to expand...
Click to collapse
Ah, I feel dumb now. I might be damaged from the informational Nexus bootloader.
So, I tried to flash a new recovery - fastboot flash twrp-2.8.6.0-sirius.img - which succeded, but it still boots the CM Recovery. Buh.
Seems like something is overriding the recovery on boot. So lets erase everything:
Code:
fastboot erase system
fastboot erase userdata
fastboot erase recovery
fastboot flash twrp-2.8.6.0-sirius.img
Aaaand - still CM Recovery.
I also tried to flash a stock image as you suggested, however:
Code:
fastboot flash system system.sin
sending 'system' (1800183 KB)...
FAILED (remote: data too large)
finished. total time: 0.002s
No worries, I came from a nexus 4 and it confused me as well at first. Try exacting http://forum.xda-developers.com/xperia-z2/development/kernel-m5-kernel-t2858912 and flashing the boot image via fastboot. That should give you a working recovery.
As I said, flashing a recovery by fastboot results in the CM Recovery.
I just tried to wipe my device using the CM Recovery, it told me it was unable to mount /data - my guess? The filesystem is ****ed up.
EDIT: I got it. Seems like TWRP needs some custom stuff to work (which is provided by CM). Flashing philz worked fine and allowed me to sideload a proper ROM. Everything fine now

[Q] Possible soft brick, please advise

Hi, all.
I was messing around with Android Tweaker 2, zipaligning my apps, performing vague system tweaks and the like, when I rebooted my phone for the changes to take effect; however, the phone booted up, finished the booting animation, and where the home screen should be showing up only showed a black screen. From there I can only reboot again, reboot into STOCK recovery, or reboot into fastboot, which has limited function in an Asus device (inability to flash unsigned custom recovery images, inability to flash rom images, stock firmware images are unavailable ANYWHERE, etc.) My device WAS rooted, however, I did a factory reset from the stock recovery in hopes that the problem would be resolved, so I'm not sure if root access was retained. I've tried a lot of things, but what I need is access to adb to push some files, or just figure out what the hell happened to the device.
Any ideas? Thanks in advance.
Details:
Asus Padfone X [4.4.2 stock rom]
WAS rooted
LOCKED bootloader
STOCK recovery
Fastboot is basically useless, given the "safeguards" Asus has implemented
Read the CM12.1 for instructions on unlocking bootloader , there are instructions on booting from custom recovery using fastboot from there you can adb push the files to your phone as posted in the Nandroid Stock backup thread and install using TWRP.
daggorlad said:
Read the CM12.1 for instructions on unlocking bootloader , there are instructions on booting from custom recovery using fastboot from there you can adb push the files to your phone as posted in the Nandroid Stock backup thread and install using TWRP.
Click to expand...
Click to collapse
Thanks for the advice.
I have consulted the CM12.1 thread, and I see the instructions, the first step of which is to "boot into CWM, CMRecovery, or TWRP." However, I do not have any of these custom recoveries flashed on my Padfone X. Is there a way I can boot custom recovery off an external microsd or something?
Note: upon attempting the "fastboot flash recovery CMrecovery.img" command, the cmd window returns the following:
Code:
target reported max download size of 1879048192 bytes
sending 'recovery' <11220 KB>...
OKAY [ 0.438s ]
writing 'recovery'...
FAILED <remote: can't flash unsigned image>
finished. total time: 0.444s
EDIT: Problem has been resolved, used
Code:
fastboot boot twrp.img
and restored stock.
shattered519 said:
Thanks for the advice.
I have consulted the CM12.1 thread, and I see the instructions, the first step of which is to "boot into CWM, CMRecovery, or TWRP." However, I do not have any of these custom recoveries flashed on my Padfone X. Is there a way I can boot custom recovery off an external microsd or something?
Note: upon attempting the "fastboot flash recovery CMrecovery.img" command, the cmd window returns the following:
Code:
target reported max download size of 1879048192 bytes
sending 'recovery' <11220 KB>...
OKAY [ 0.438s ]
writing 'recovery'...
FAILED <remote: can't flash unsigned image>
finished. total time: 0.444s
EDIT: Problem has been resolved, used
Code:
fastboot boot twrp.img
and restored stock.
Click to expand...
Click to collapse
Glad I was able to point you into the right direction.

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?

Isn't there a way to boot kernel in Xiaomi without flashing? (fastboot boot kernel.img)

I'm trying to boot an image without flashing it to my Xiaomi:
fastboot boot Image
creating boot image...
creating boot image - 35883008 bytes
Sending 'boot.img' (35042 KB) OKAY [ 0.829s]
Booting FAILED (remote: 'unknown command')
fastboot: error: Command failed
Isn't there a way to do it? It's a Poco M3
Poco M3 has separate recovery partition and TWRP is available too. Why don't you flash it?
You mean flashing the kernel to the recovery partition? How would this work? Flash boot.img to recovery, then do adb reboot recovery, and test the kernel,without rewriting the original kernel?
aIecxs said:
Poco M3 has separate recovery partition and TWRP is available too. Why don't you flash it?
Click to expand...
Click to collapse
You mean flashing the kernel to the recovery partition? How would this work? Flash boot.img to recovery, then do adb reboot recovery, and test the kernel,without rewriting the original kernel?
no I mean flash boot.img to boot and twrp to recovery as usual. I am using this TWRP - encryption only worked on very first boot (don't ask me why) but that was good enough to backup userdata and everything

Categories

Resources