Solved with Corrections: Unable to flash TWRP, Failed (Remote: command not allowed) - Xperia Z1 Q&A, Help & Troubleshooting

Hi,
I just purchased a used Xperia Z1 C6903 and I am trying to put the latest Nougat Resurrection Remix on it. I need to get TWRP going first which I got stuck at trying to flash it.
I was able to get the phone downgraded to 14.1.G.1.534 using flash tool (ver 0.9.24.3). I did this following the guide here https://forum.xda-developers.com/showthread.php?t=2439328.
I was able to root it using Kingoroot.
I was able to unlock the bootloader using flashtool. Using *#*#7378423#*#*, the phone now reports Bootloader Unlocked: yes. See attached screenshot.
The part that I got stuck at is trying to flash TWRP in Fastboot. The command lines and error are below. The main error being "FAILED (remote: Command not allowed)"
I don't have an option in developer's options to "Unlock OEM bootloader". I read some other Xperia users being able to fix this problem by checking this.
I am running Windows 8.1. I am relatively sure that my drivers are correct. I had gotten a "drivers too old" error before in Flashtools but I was able to correct it by reinstalling new drivers.
I tried having debugging checked and unchecked before going into Fastboot and made no difference.
Tried both twrp-2.8.7.0-honami and twrp-3.0.2.0-honami with no success. Tried shortening file name to trp.img with no success.
Tried different 2 different adb files around the web with no success.
I read somewhere someone mentioned briefly that TWRP can be flashed using Flashtools. Is that true? I wasn't able to find a full guide for it.
Any help would be appreciated!
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery trp.img
target didn't report max-download-size
sending 'recovery' (13672 KB)...
OKAY [ 0.433s]
writing 'recovery'...
FAILED (remote: Command not allowed)
finished. total time: 0.439s

Well I was able to get TWRP on there by installing the XY Dual Recovery. The problem with it is that the Resurrection Remix's installation instruction says to use TWRP 3x or higher. TWRP on XY is only at 2.8.7.0. I couldn't find a TWRP 3x flashable zip file for Honami and TWRP wouldn't flash TWRP 3x IMG file I found. Fastboot is still giving me the same Command Not Allowed error.
Any ways, I went ahead and flashed RR with 2.8.7.0. When I tried to flash GAPPs after it says there is insufficient space. I have at least 9GB+ internal storage. So not sure what the deal is there.
I also lost Dual Recovery and root after first RR boot.
Looking into getting re-rooted and reinstalling XY Dual Recovery now.. And then flashing GAPPS after.
Anyone know what the consequences are for installing RR with a lower rev of TWRP?

So the RR Rom does have root but it just doesn't have apps root. Only ADB root. I cant flash the su add on from Lineage's site since I lost recovery. I ended up FTF back to stock and then reflashed everything, the ROM then pico version of GAPPs (pico worked) and then the su addon. The su addon had an error when flashing in TWRP.
Any ways, long story short the whole thing didn't work. Still stuck with RR Without recovery. Su addon didnt work from the flash. And for whatever reason my SIM is not detected and I lost my IMEI in RR. I read that this is a known issue with C6902 but I have the C6903 and I had confirmed this through the service menu before ROM flash. Maybe problems with flashing RR without the latest TWRP.
The Command Not Allowed is still an issue that I dont know how to resolve. So I still can't flash newer version of TWRP.
Any help would be appreciated....
I guess I will try to find a ROM that 's compatible with TWRP 2.8.7.0.

OK! I figured out what the Command Not Allowed problem is!
I've been following the flash guides from a few websites. And they all reference this syntax for flashing TWRP.
Fastboot flash recovery twrp.img.
This syntax didn't work for me. All those websites properly copycat each other.
That syntax is either incorrect or just didnt work for my setup for some reason. I kept searching for ways to flash TWRP and found another website that uses a different syntax. I gave it a go and TWRP flashed right away. This is the syntax that worked for me.
Fastboot flash boot twrp.img
At least that part of the problem is resolved.
Even after flashing RR with TWRP 3.0.20, the SIM/IMEI is still not showing. Recovery is still lost on first boot. Reinstalling TWRP on top of RR causes RR to not boot any more. I will have to look into the RR thread to investigate more.
I will mark this thread as Solved for the Command Not Allowed.
Crossed out everything cause that was not the correct solution. Striked them out to keep them as part of the troubleshooting steps history.

Oops duplicated post.

OK! So it looks like I have to correct myself here on my previous solution.
My solution from earlier for using "Fastboot flash boot twrp.img" is incorrect apparently. Don't use this!
That was the reason why my TWRP was lost after RR boot. The recovery partition comes after the boot and system partition. By flashing the recovery into boot, it screws up the order.
Nevertheless, the Command Not Allowed was still a problem if I tried to use "Fastboot flash recovery twrp.img"
Any ways I was still looking into this problem and started looking into the boot.img stuff and saw someone uses this command line: "fastboot erase boot". This helps someone being able to flash a boot.img when the user was having the Command not Allowed problem trying to flash a different img for the boot partition.
This gave me an idea to try and use "fastboot erase recovery".
I gave it a try and I was able to use "fastboot flash recovery twrp.img" afterwards! It was done in a second.
Then I went through the normal steps of flashing RR and TWRP stayed this time. So now all is good with everything!
Any ways to recap, my full steps used for my RR Installation:
1. Flashtool to flash an Android 5.1.1 stock rom. I used C6903_14.6.A.1.236_1276. (obtained through Flashtool, Xperifirm) Your phone has to run in 5.1.1 for the SIM and IMEI to work in RR. Don't need to flash modem.zip, that's for C6902 only.
2. Fastboot flash erase recovery
3. Fastboot flash recovery twrp.img
4. Follow instructions to flash RR normally.
5. Resize system partition size (for flashing GAPPS micro size or larger).
6. Flash GAPPS.
7. Flash su addon from Lineage's website to allow root for apps and ADB.
I hope this helps someone with similar problems in the future. Thanks to those who stop in to see me ramble to myself about silly stuff

I had the same error message and was able to successfully flash using the phone and the Android Studio Emulator app.
I was already rooted and had an unlocked bootloader.

I tried this solution and it said error: cannot "recovery": No such file or directory LOL even though it's right here and I use it all the time..........I just can't figure it out.

Related

I thin its bricked

I have custom ROM 5.x.x pacman edition I think, I pressed factory reset or something like this from settings. It was having problem because I didnt have gaps. I flashed gaps, but after this the phone is stucked at bootloader. My phone is xt1068 but pc doesnt recognize it.
Now I think I have even bigger problem I was playing with the custom recovery and wiped all the data on sdcard folder. The PC recognize Titan Fastboot device or something like this. Is it possible to transfer to sd card new rom using other device, and then use the sd card on the Moto G?
Can you access twrp recovery?
I can access philz recovery.
Edit: mfastboot has access but it gives error when mfastboot update retail.zip, "Failed to load"... when mfastboot devices it says, ZX1D22D9T8 fastboot. Gives error when trying to flash twrp recovery too.
Edit 2: target max-sparse-size: 256MB
error: cannot load 'twrp.img': No error after trying.
ffup57 said:
I can access philz recovery.
Edit: mfastboot has access but it gives error when mfastboot update retail.zip, "Failed to load"... when mfastboot devices it says, ZX1D22D9T8 fastboot. Gives error when trying to flash twrp recovery too.
Edit 2: target max-sparse-size: 256MB
error: cannot load 'twrp.img': No error after trying.
Click to expand...
Click to collapse
Then flash latest twrp and then ROM+gapps.
Dont wipe anything with fastboot.
You have to unzip the file and mfastboot every file inside.
It worked but after I rooted with kango root then ota update, the phone reboot into stock recovery and it says no command.
Fail don't use kingo.
To root just flash SuperSU.
Check the return to stock guide follow all steps.
Flash twrp then flash SuperSU.
Stick to the proven guides
Pd. I think stock recovery is always empty there is some kind of key combination to bring up the command

Boot TWRP: failed (remote: dtb not found)

Phone oneplus3t, 64GB model EU
Oxygen OS 3.5.4
Android 6.0.1
Bootloader: unlocked
Im having problems with flashing/booting TWRP
It flasheh succsesfully, but it doesnt boot. This is the error i get in the comand prompt: Boot twrp: failed (remote: dtb not found).
I tried flashing it via oneplus3t "all in one tool" and i tried it with downloading only the TWRP.img and flashing it in comnad prompt myselfe. Always the same problem. I also tried a modified TWRP which i found on the thred here somewhere: same problem.
It flashes, but doesnt "open" or boot. Right after I flash it if i click "recovery" it just goes back to the fastboot menu where i started.
I also tried this before i updated it on the oxygen 3.5.4
Please help, Thanks
Did you use the specific twrp recovery for the 3T? This one: https://dl.twrp.me/oneplus3t/
And did you follow a guide. This one for instance: https://forums.oneplus.net/threads/...wrp-root-nandroid-efs-backup-and-more.475142/
jann32 said:
Phone oneplus3t, 64GB model EU
Oxygen OS 3.5.4
Android 6.0.1
Bootloader: unlocked
Im having problems with flashing/booting TWRP
It flasheh succsesfully, but it doesnt boot. This is the error i get in the comand prompt: Boot twrp: failed (remote: dtb not found).
I tried flashing it via oneplus3t "all in one tool" and i tried it with downloading only the TWRP.img and flashing it in comnad prompt myselfe. Always the same problem. I also tried a modified TWRP which i found on the thred here somewhere: same problem.
It flashes, but doesnt "open" or boot. Right after I flash it if i click "recovery" it just goes back to the fastboot menu where i started.
I also tried this before i updated it on the oxygen 3.5.4
Please help, Thanks
Click to expand...
Click to collapse
https://www.youtube.com/watch?v=kTdKmceC5xU watch this video

Troubles reinstalling TWRP [Failed to load/authenticate boot image: Load Error]

I dirty flashed a new version of xiaomi.eu stable build, and it caused TWRP to uninstall itself.
Whenever I hold power on and volume up it just goes to fastboot.
Now I tried reinstalling TWRP like I've done many times before, but it keeps throwing an error. The error I get is when trying to boot without flashing the img. When I do this, I get the error:
Code:
fastboot boot TWRP.img"
downloading 'boot.img'...
OKAY [ 1.609s]
booting...
FAILED (remote: Failed to load/authenticate boot image: Load Error)
finished. total time: 1.675s
Anyone gotten any ideas on what could be going on here? I'm scared to try anything as my phone currently works, but I need TWRP back to update my phone to a different versions and to install the clock mod again.
Thanks!
Got it to load once, but now back to square one. Throwing same error.
Now when running the command fastboot reboot recovery it's saying
Code:
fastboot: usage: unknown reboot target recovery
And writing 'fastboot boot twrp.img' turns the phone off / makes the screen go black. Fully bricked now as the OS wont load either.
Try on a computer with a USB 2.0 port, or a different usb cable, had the same issue once
Ended up having to reinstall dev rom. Device relocked, so have to wait 15 days again. @BusterBg_18 Thanks, will do when I unlock the device
EDIT: When using Mi Flash tool, make sure to check 'clean all' and not 'clean all and lock' in the bottom right. That's what set me back 2 weeks.
I have the same error. How can I fix this pls?
MrkoZino said:
I have the same error. How can I fix this pls?
Click to expand...
Click to collapse
Flash the latest official rom then start all over again. Follow the post above you about miflash.
Hello, I've had the same problem, then flashed latest dev rom via MiFlash and it booted, but now after I flash any custom ROM in TWRP i have this issue again and need to reflash chinese ROM. How can I flash any custom rom?
i'm stuck in the same issue. stuck in fastboot and it would not load recovery. any fix?
Hi, i fixed the "Failed to load/authenticate boot image: Load Error" by simply restarting the Device.
It seems to appear randomly when flashing partitions and then block all further Transfers.
If the Device loops in Fastboot, the only Solution to me was re flashing the Stock Firmware.
greendra8 said:
And writing 'fastboot boot twrp.img' turns the phone off / makes the screen go black. Fully bricked now as the OS wont load either.
Click to expand...
Click to collapse
I have the same Issue, but reflashing Stock Firmware or making OTA Updates dident helped for me. Ive already tried TWRP and OrangeFox without success. The Screen always turns black and Fastboot stays active in an limited Mode, any Ideas? My host Computer only has 3.0+ Ports only, but ive used an 2.0 Extender so it should be fine?
DJPlaya said:
Hi, i fixed the "Failed to load/authenticate boot image: Load Error" by simply restarting the Device.
It seems to appear randomly when flashing partitions and then block all further Transfers.
If the Device loops in Fastboot, the only Solution to me was re flashing the Stock Firmware.
I have the same Issue, but reflashing Stock Firmware or making OTA Updates dident helped for me. Ive already tried TWRP and OrangeFox without success. The Screen always turns black and Fastboot stays active in an limited Mode, any Ideas? My host Computer only has 3.0+ Ports only, but ive used an 2.0 Extender so it should be fine?
Click to expand...
Click to collapse
long time ago now. but i remember at one point having to flash the stock firmware using the mi unlock tool. i also remember trying every single version of twrp and rom until one finally worked. sorry i can't help much but i believe that's how i eventually fixed it.
hi, I've experienced with the same thing.
this methode help me out from it.
try to reflashing some file image from the rom where youre want to install in hh with adb.
copy this files below from rom image to adb folder
1. system.img (command in adb >> fastboot flash system system.img)
2. boot.img (command in adb like #1, change the name of img file) do till #6
3. vendor.img
4. dtbo.img
5. cust.img
6. misc.img
7. now flashing twrp/recovery.img (choose twrp compatible with rom you want to install) with adb
8. the "fastboot boot recovery.img" with adb
9. flashing the rom by twrp
Marihot said:
hi, I've experienced with the same thing.
this methode help me out from it.
try to reflashing some file image from the rom where youre want to install in hh with adb.
copy this files below from rom image to adb folder
1. system.img (command in adb >> fastboot flash system system.img)
2. boot.img (command in adb like #1, change the name of img file) do till #6
3. vendor.img
4. dtbo.img
5. cust.img
6. misc.img
7. now flashing twrp/recovery.img (choose twrp compatible with rom you want to install) with adb
8. the "fastboot boot recovery.img" with adb
9. flashing the rom by twrp
Click to expand...
Click to collapse
Where do you get these .img files?
iconoclasthero said:
Where do you get these .img files?
Click to expand...
Click to collapse
all img files come from the official rom china stable V12.0.2.0.QEBCNXM (.tgz), download and extract the tgz file then find img files from images folder
Marihot said:
all img files come from the official rom china stable V12.0.2.0.QEBCNXM (.tgz), download and extract the tgz file then find img files from images folder
Click to expand...
Click to collapse
Please tell the details for this method
greendra8 said:
Ended up having to reinstall dev rom. Device relocked, so have to wait 15 days again. @BusterBg_18 Thanks, will do when I unlock the device
EDIT: When using Mi Flash tool, make sure to check 'clean all' and not 'clean all and lock' in the bottom right. That's what set me back 2 weeks.
Click to expand...
Click to collapse
BROOOOOOOOOO HAHAHAHAHAHA I LITERALLY JUST READ YOUR COMMENT AND 10 SECONDS LATER I FLASH THE ROM WITH "CLEAN ALL AND LOCK" Im a f-king dumb bro
Marihot said:
你好,我也经历过同样的事情。
这个方法帮助我摆脱它。
尝试使用 adb 从要在 hh 中安装的 rom 中重新刷新一些文件映像。
将下面的文件从 rom 映像复制到 adb 文件夹
1.system.img(adb >> fastboot flash system system.img中的命令)
2. boot.img(adb 中的命令,如#1,更改 img 文件的名称)直到 #6
3. 供应商.img
4.dtbo.img
5. 自定义.img
6. 杂项.img
7. 现在用adb刷twrp/recovery.img(选择twrp与你要安装的rom兼容)
8. adb 的“fastboot boot recovery.img”
9. twrp刷入rom
Click to expand...
Click to collapse
Thank you, brother
try fastboot set_active a
or fastboot set_active b

Can't get twrp working

Hoping I could get some help for this old phone. I've spent over 5 hours trying to get twrp installed and having no success in what should be one of the quickest steps in the whole rooting/flashing game. Reaching out for help before I lose my mind...
I've tried 2 different builds of oreo and 2 different builds of pie (all stock) and for each build I flashed different twrp versions from this link https://androidfilehost.com/?w=files&flid=232371. I even tried the android 9/10 versions on the android 8 builds. No errors in fastboot. If I try using power plus either of the volume keys it just boots right to android. If I try using the fastboot command (fastboot boot recovery.img) it freezes at the Sony logo. Doesn't seem to be an issue with twrp because I couldn't find a single mention of anyone else having this issue in any of the threads I've read while trying to troubleshoot. Any suggestions?
Is your bootloader locked?
betacrypt said:
Is your bootloader locked?
Click to expand...
Click to collapse
Oh, right, I should have mentioned that it's definitely unlocked. I checked in the service menu and I get the warning at startup.
Hmm what android version are you running currently, latest stock pie? It's possible your recovery partition is corrupt somehow.
Open up a terminal for fastboot and try running:
fastboot format recovery
or
fastboot erase recovery
then
fastboot flash recovery twrp-3.3.1-0-lilac-pie-5.img
I used twrp-3.3.1-0-lilac-pie-5.img on my device so I can confirm that one is definitely working.
betacrypt said:
Hmm what android version are you running currently, latest stock pie? It's possible your recovery partition is corrupt somehow.
Open up a terminal for fastboot and try running:
fastboot format recovery
or
fastboot erase recovery
then
fastboot flash recovery twrp-3.3.1-0-lilac-pie-5.img
I used twrp-3.3.1-0-lilac-pie-5.img on my device so I can confirm that one is definitely working.
Click to expand...
Click to collapse
So I managed to get this working. I tried the fastboot erase command but still had no success. Googled "fastboot erase twrp" or something like that and found a thread discussing how twrp was suspected of corrupting someone's data partition and running a "fastboot erase userdata" command to reformat the partition. I didn't think this would help my situation but figured I had nothing to lose at this point. Ran the "erase userdata" command, set up the phone again, but had no success at first.
I re-ran the "erase recovery" command and had no success with twrp 3.3.1. Then I tried 3.2.1 and initially had no success with hardware buttons or the "boot recovery" command. What I did this final time though, which I don't think I did on my previous attempts, was that instead of going back immediately and trying to re-flash twrp after the frozen sony screen, I gave up this time. BUT....I also said "f* it...let me try booting into recovery with the hardware buttons one last time." Lo and behold, I finally got into twrp!
I don't know if running the "erase recovery" command is what was needed, or it was just some quirky glitch where I needed the phone to freeze. Nevertheless, many thanks for responding and prompting me to make the last few attempts. Flashed magisk with no issue afterwards.

Help with OP7P only Fastboot accessible

Hi all, hope you're doing fine.
I came here looking for help since I seem to have bricked my One Plus 7 Pro.
I was root user with unlocked bootloader and installed OOS 11 OTA through OonePlus' updater app, then tried to flash magisk using it's same app but since I'm a little bit un-updated about how it works and couldn't get it to flash I went into recovery just to find out the stock recovery.
Confused I wipped out ADB and tried flashing TWRP. I now know that my problem was not using the correct version of TWRP for A11 but during the attept at flashing TWRP something went wrong (I remeber doing something with the partition where I flashed the recovery.img but cant precise what, was late in the night) and the phone doesn't boot up to OS or recovery, I can just get into fastboot mode.
I can access fastboot and the bootloader is still marked as unlocked. I started reading how to install a clean image of OOS11 form this state and found this guide: LINK
I went all the way up to having the filles from the .bin unpacked and when I try to flash one by one the archives I get the error:
Sending 'aop_a' (200 KB) OKAY [ 0.012s]
Writing 'aop_a' FAILED (remote: 'Flashing is not allowed for Critical Partitions
')
Click to expand...
Click to collapse
But when trying "Fastboot flashing unlock" or "fastboot flashing unlock_critical" I get the message saying that it failed since the device is alredy unlocked
FAILED (remote: ' Device already : unlocked!')
fastboot: error: Command failed
Click to expand...
Click to collapse
I've also tried to use one of those "flash all .bat" roms I saw here on the forums but that didn't work, I'm also trying to use the MSNtool but to be quite frank the tutorials I've found so far are not noob friendly, since I can't seem to get the correct drivers isntalled and the phone properly recognized ( as it is now it shows as "QUSB_BULK_CID:0404_SN:36EDE735" ).
So that's my current state:
I can enter fastboot with suppousedly unlocked bootloader but cant seem to flash things
Can't seem to get the support files/drivers for the MSN method
I would greatly apprciate help getting back into ANY version of OOS working since as it is now the phone's paperweight. If directed to comprehensible guides I beieve I can keep going, I don't mind with wich method.
Thanks in advance and please excuse the inconveniences,
LUCAS
PS: Mod please feel free to move this thread to a more appropiate board if you think I didn't choose the right one
I feel you, i hate the MSMTool. I won't use it unless i absolutely HAVE TO.
Download Mauronofrios All in one tool. You can find that here on xda.
As long as you are able to get into fastboot, that tool will help you.
Good luck

Categories

Resources