Flashing recovery on Xperia Z3 compact

Hello dear /e/ friends,

I saw some Q&A about flashing recovery in this Unlocking Bootloader topic.

My bootloader is unlocked.

But I experienced issues on flashing recovery. I attempted to flash the TWRP img . I can’t start it.

$ fastboot flash recovery twrp-3.3.1-z3c-20200212.img 
target didn't report max-download-size
sending 'recovery' (13268 KB)...
OKAY [  0.447s]
writing 'recovery'...
OKAY [  0.887s]
finished. total time: 1.334s

$ fastboot boot  twrp-3.3.1-z3c-20200212.img 
downloading 'boot.img'...
OKAY [  0.460s]
booting...
FAILED (remote: dtb not found)
finished. total time: 0.531s

As you can see, the target didn’t report max-download-size message looks suspicious.

I tried this command

$ fastboot flash -S512M recovery twrp-3.3.1-z3c-20200212.img

I tried working out what it means but as far as I can tell the -S512M part seems to be relevent to the size of the partition or data its sending.

If anyone know what the function of -S and 512M is exactly it would be nice to know.

Anyway, it doesn’t work. I can’t start recovery.

I also tried several e-recoveries… No more success

$ fastboot flash recovery recovery-e-0.17-q-20210530117214-dev-z3c.img 
target didn't report max-download-size
sending 'recovery' (10888 KB)...
OKAY [  0.373s]
writing 'recovery'...
OKAY [  0.728s]
finished. total time: 1.101s
$ fastboot boot recovery-e-0.17-q-20210530117214-dev-z3c.img 
downloading 'boot.img'...
OKAY [  0.384s]
booting...
FAILED (remote: dtb not found)
finished. total time: 0.452s

Statring the powered off z3c device with volume up button is inefective.

Statring the powered off z3c device with volume down button starts android.

adb reboot recovery restarts android.

I never see green LED.

Here more information. I hope it can help.

$ adb shell getprop ro.build.display.id
23.5.A.1.291
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal

Thanks for any help

Scan

The instructions for installing /e/ on Z3 Compact can be found here: https://doc.e.foundation/devices/z3c/install

You appear to have successfully peformed the step

  1. Flash a recovery image onto your device by typing
    `fastboot flash recovery twrp-x.x.x-x-z3c.img

and you had reached the step

Installing /e/ from recovery,

but I think you may have removed or corrupted the installed recovery with your second step
fastboot boot twrp-3.3.1-z3c-20200212.img

So I think you need to flash the recovery image again using
fastboot flash recovery twrp-3.3.1-z3c-20200212.img

Don’t worry about the target didn't report max-download-size message

There are now two different ways to boot into recovery. The first two are described in the instructions

typing the below command in the console of an adb enabled PC
adb reboot recovery

Tip: You can also do this manually using the below key combination

  • With the device powered off, hold Volume Down + Power

I always use the second method, but both should work fine.

You are trying to boot by typing fastboot boot twrp-3.3.1-z3c-20200212.img which will not work (and is not described or suggested in the linked instructions :wink: )

Hello @petefoth ,
Thank you for your answer.

I’m following this instruction. I can’t boot TWRP recovery. That’s why I tried to install /e/ custom recovery .

I can’t start on recovery mode

No I did not performed successfully this step.

This adb command restarts android, not twrp.

It doesn’t works. Thats why I’m asking here

I have edited my reply above. I think the problem is your command

fastboot boot twrp-3.3.1-z3c-20200212.img

I believe this step is unnecessary, and may even corrupt the recovery image you flashed in the previous step. Only two steps are needed

fastboot flash recovery twrp-3.3.1-z3c-20200212.img
adb reboot recovery

Sorry. It does not work.

@scanlegentil , the above command is still working?
If it is, just after that, shutdown your phone. Then keep (realy keep it for a long long time) the power and the vol-down pressed. The sony logo will apear and keep the keys down until e-recovery boots.

this command results is

$ fastboot flash recovery twrp-3.3.1-z3c-20200212.img 
target didn't report max-download-size
sending 'recovery' (13268 KB)...
OKAY [  0.457s]
writing 'recovery'...
OKAY [  0.886s]

I only remove the USB connector. Blue light indicating bootloader mode is shutting down.

I kept it down until … Android boots, not any recovery.

@scanlegentil just to clariffy, are your device booting the android?

1 Like

Because if it is not, pete will solve this out for you, dont worry.

1 Like

My mistake. abd reboot won’t work until your phone has rebooted into Android, and you have enabled adb debugging - see below.

(Please remember, do not use the fastboot boot command. It is not needed at all when flashing recovery or installing a ROM on Z3C - see this post for details)

OK. If Android is booting, then once it has booted we can use adb reboot recovery. This assumes you have already enabled Developer options and adb debugging (otherwise you would not have been able to unlock the bootloader).

  • Allow the phone to finish booting
  • Connect the device to your PC
  • On your PC, type adb devices. (This step may not be necessary if adb is already running on your PC.
  • If you see a dialog on your device asking whether to allow debugging. Tick the Always allow box, then press Allow

If you haven’t enabled Developer options and USB debugging, the please follow the instructions from this page.

To enable USB Debugging

  • You will need to become a Developer first on your device !!

To become a developer

  • Unlock your device and go to
    Settings » About Phone » Build Number or Version » Tap seven times

You will get a message that you are a Developer.

to enable debugging
Settings » System » Advanced » Developer options » USB Debugging ( enable it here)

A second way to boot into recovery is to enable ‘Advanced restart’. (This works in /e/ and in Lineage OS, but it is not an option in the stock Sony software) Go into Developer options as describe above, and it will be one of the first items you see. Enable it there. Now, when you long press the power key, you should see the usual choice of Power off, Restart and Screenshot. Choose Restart, and you should have a choice of System, Recovery, and Bootloader. Choose Recovery and the phone should boot into TWRP.

Feel free to get back to me if you have any further questions or problems

Thank you, but I followed exactly what you wrote.

I’m testing it on 2 identical smartphone with stock ROM. Same result. Booting Android, not recovery.

Please tell me if you’re flashing a Xperia Z3c you have from a long time.

Maybe you unroot the phone when the firmware was 23.0.A.2.93 or older. Today all your test of flashing recovery are easier thanks to this phone history.

Have you reflashed the recovery image?
fastboot flash recovery twrp-xxxxxx.img
(Don’t fastboot boot ....)

If you have, USB debugging is enabled, the device is visible from adb devices and adb reboot recovery doesn’t work, then I have no more suggestions to offer. Sorry!

yes

yes

no, it doesn’t work

:cry:

Please answer my question. For how long time do you have your Xperia Z3c you’re flashing?

I think I have owned it for around 15 months, but I only used it regularly for a couple of months. Now I only use it for testing (I am the maintainer for the /e/ z3c ROM).

I have relfashed a few times in the last couple of days to check the instructions I am giving you still work.

Since I first installed TWRP on it when I first got the phone, I have been able to boot into recovery using the “Volume down + power’ method with no problems. The fact that it doesn’t work for you (and neither does” adb reboot recovery ") suggests to me that you have not succeeded in flashing either TWRP or /e/ recovery. All I can suggest is that you keep trying

1 Like

Thank you for your help.

I’ll keep trying.

ah ah. I kept trying. Again, and again.
I accidently flashed boot with recovery and nard bricked one of my Z3c device. :frowning:

Next time I order several z3c, can I send you one @petefoth ?

For next mounth, I’ll work on Nexus 5x .

Thank you for your support.

Ouch!

Thank you, but I have more than enough phones :slight_smile: Maybe send on to /e/ so that one of their developers can be the ROM maintainer :wink:

Good luck.

1 Like

I just found a dusty Z3c on my shelves, and decided to use it as side-authenticator, since my home network is breached. The moment I connected my device to the Internet, I received weird pop-ups from com.google.gms, so I decided to root it and do more research, and I had the same problem as you but found out how to boot into recovery: hold volume down, then gentle press power button, release after 0.5 sec, then keep volume down. It will work guaranteed!

1 Like