yashsingh1/xdaforums huggingface dataset:
[Xperia Z3 Android Development] John5788:
I don't understand why, but I cannot get into this recovery.

I flashed the img file via fastboot:

C:\Flashtool\x10flasher_lib>fastboot flash recovery recovery-z3-20160214_1813.img
sending 'recovery' (14498 KB)...
OKAY [ 0.468s]
writing 'recovery'...
OKAY [ 0.962s]
finished. total time: 1.430s

But every time I try to enter recovery via power button + vol down, it goes straight into crDroid.

I was using dual recovery before this to flash crDroid.

edit:

I managed to load 2.8.7.0 from infected's CM 12.1 build from the following instructions:

Now I have some sort of weird dual recovery thing going on. I have one version of 2.8.7.0 when I press up when the LED turns on, and a different version of 2.8.7.0 when I press down. I still can't flash the latest .zip file provided in the first post and have the recovery work. Flashing says it succeeded, but holding vol down and powering on does nothing but boot back into my ROM.

Is there a boot.img I should be using to make this work? Or do I need to apply the official bootloader via emma?

Referring to this: http://fxpblog.co/2015/05/01/finally-boot-to-recovery-enabled-in-special-bootloaders-from-sony.html

edit solved:

Figured it out, I did need to apply the .200 update via emma. Once I applied that, I was able to boot into fastboot, flash the img file via command `fastboot flash recovery recovery.img` and I am able to enter recovery via power on + vol down like any other phone.

references:

http://developer.sonymobile.com/services/flash-tool/how-to-download-and-install-the-flash-tool/

http://developer.sonymobile.com/services/flash-tool/use-the-flash-tool-for-xperia-devices/
[Xperia Z3 Android Development] nailyk:
Do not looks like it is.
[Xperia Z3 Android Development] Br4no:
It has been long time ago, but I remember that I flashed with emma, so....:

I have S1_Boot_MSM8974AC_LA3.0_M_2. If it is not upgraded, then how it is possible, that I'm able to boot into twrp (old one) from the system, by hitting the volume rockers during boot and also from phone switched off by pressing vol down and power???

As far as I know if I would have the old bootloader, some options shouldn't be possible, right???

Do you recommend to repeat the process with emma??? And only after that try the newest twrp?

Edit:

I'm attaching screenshot from emma: https://drive.google.com/file/d/1ymg14sF8VoU7wlZl9WJ9Ve4O7k7IQHCf/view?usp=drivesdk

Should it be ok??

Thanks a lot!
[Xperia Z3 Android Development] saedkebbeh:
I am able to boot into recovery too

But the latest version of recovery doesn't boot at all
[Xperia Z3 Android Development] Gargoyles:
Hello! Probably i am super dumb, but i dont nderstand this step:(download and check md5/sha1,) any help would be apreciated.
[Xperia Z3 Android Development] nailyk:
What is the issue ?

What step do you do ?

Where are you stuck ?
[Xperia Z3 Android Development] Gargoyles:
Solved. Thank you!
[Xperia Z3 Android Development] lkjsoiuew:
why is https://xdaforums.com/z3/development/recovery-z3-twrp-2-8-4-0-t3028846 working and I can boot into recovery, but if I flash this one here, it is not booting into recovery?
[Xperia Z3 Android Development] nailyk:
Need more informations.

What device ? What is device state? How do you attempt to boot it ? Did you upgraded your bootloader? What rom are you using ?

Should be a good start :p
[Xperia Z3 Android Development] lkjsoiuew:
device is z3 6603

How do I know about my bootloader?

I managed to install CARBON-CR-5.1-MOO-RELEASE-z3-20180131-0643.zip

via the older recovery (installed via dd).

I tried installing this recovery here via the older and "install image", via dd, and via fastboot, as recovery and as FOTAKernel.

All works, but does not boot into it.

I tried booting via buttons, adb, and via reboot to recovery, it blinks red a few times then boots into the system.
[Xperia Z3 Android Development] nailyk:
This is a know issue, my bad on this.

The newer version are LZMA compressed which is not yet compatible with every roms. We are working on finals tests before releasing.

To know your bootloader version you can use the 'getprop' command in the first post. To boot into recovery you need to power off the device without usb cable, then press power & vol- .

Hope being able to push a working release in the coming week.
[Xperia Z3 Android Development] lkjsoiuew:
just empty:

z3:/ $ getprop ro.boot.s1boot

z3:/ $

I knew there was something with the usb cable, so I can boot this 3.2.1 version? I can only try in a few hours ...
[Xperia Z3 Android Development] nailyk:
Need to ne done into rom, the getprop command do not work in recovery.

If your device is working for now, I recommend you to wait the next twrp release.

(Will require a rom update too)
[Xperia Z3 Android Development] lkjsoiuew:
did it in an adb shell. Do I have to be root? root is not yet installed
[Xperia Z3 Android Development] nailyk:
Don't think so but was always root on my devices.

To ensure it is installed, follow the flash through emma procedure. (2nd post: https://xdaforums.com/z3/general/guide-xperia-z-boot-process-explained-t3359510 ).

I have to go. You can reach me on IRC on freenode #twrp , tomorrow, if needed.
[Xperia Z3 Android Development] lkjsoiuew:
Installed 3.2.1 by 3.0.0 again. By switching off and voldown+power I got into it!

Now I flashed CARBON 6.1 which runs ok.

For root I had to use Magisk 16.0, SuperSU wouldn't install.

I think I still have problems with gapps. opengapps-arm and -arm64 8.1 pico give an error about architecture. .... Solution: http://xdaforums.com/showpost.php?p=76098206&postcount=13
[Xperia Z3 Android Development] orangzeb:
Phone won't boot into recovery from power menu, carbon nougat UB.
[Xperia Z3 Android Development] seanp25:
I have installed the latest firmware using Emma. 23.5.A.0.575

The bootloader is LA3.0_M_2 (this would seem to be newer than anything listed in the OP).

In the OP, the instructions for first rom installation with extract_elf_ramdisk support say to follow the CyanogenMod guide and replace one step. The CM wiki is long gone, is there any important steps I'm missing from here. Or do we just ignore that bit and go straight to flashing boot.img (which?)
[Xperia Z3 Android Development] Daniel_Lechu:
Hello,

Thanks for the latest update, but looks like it breaks the getprop command, for example:

MindTheGapps is unable to detect the system partition and destroy the system (it uses getprop to get the system partition).

OpenGapps is unable to detect the phone architecture and the abort the installation (it use getprops to detect it)

For now I've not tested any other scripts, because I've installed the older version of TWRP and works fine.

Greetings!!.
[Xperia Z3 Android Development] loiselqw:
Dear community,

coming from carbon-rom CARBON-CR5.1-MOO-RELEASE-z3-20171222-2200.zip with twrp "3.0xy". I wanted to migrate to CARBON-CR-6.1-NOCT-WEEKLY-z3-20180501-0620.zip, as the old twrp was causing issues with new system-ROMS (your device is not supported...), I was upgrading twrp to "twrp_z3_2018-03-28.img" via fastboot => fastboot flash boot twrp_z3_2018-03-28.img, leading in the fact the dice could not boot anymore - not to recovery, not to system just nothing...

As I could now only bring system to fastboot mode (blue led) I would like to ask you, how I could rescue the device with fastboot command. I tried various commands

fastboot flash recovery xyz.img

fastboot flash boot xyz.img

fastboot flash FOTAKernel xyz.img

which command is required and which is just nonsense (for my z1c I always use the boot partition and things work perfect) and which *.img file needs to be flashed in which partition?

Is there a fastboot erase command necessary to bring the device back to life?

Is there a fastboot command showing all available partitions from the connected device?

Thanks a lot in advanced for your help
[Xperia Z3 Android Development] loiselqw:
maybe one or two more sentences:

when I try to flash via fastboot, I get following output:

fastboot flash recovery '/home/xyz/recovery.img'

target didn't report max-download-size

sending 'recovery' (14606 KB)...

OKAY [ 0.533s]

writing 'recovery'...

OKAY [ 0.966s]

finished. total time: 1.499s

When I do fastboot reboot, the screen keeps black, no SONY logo, no nothing... pretty frustrating!

This information about the max-download-size sounds weired for me... am I flashing the img-file to the wrong partition? Or which is the correct img file?

No one any ideas? which fastboot commands (or if nothing else helps maybe flashtool) could help to get twrp running on the z3 I am having?

thx a lot in advance
[Xperia Z3 Android Development] shoey63:
Fastboot reboot will try and boot to the rom. You need to enter recovery from powered off state. (power plus volume down until vibration, release volume then power)
[Xperia Z3 Android Development] loiselqw:
negative, I could not reboot the device, not to system not to recovery. Only fastboot works.

I assume the battery is too flat, read multiple posts in other forums mentioning, there should be a minimum battery charge level before starting flashing recoveries... F**k

If I tried what you described the LED was flashing 3 times red, and now just nothing ;-(

Any Ideas how I could bring the device back to life?

Thx a lot in adv
[Xperia Z3 Android Development] shoey63:
Only thing I can think of is replace the battery. Hopefully some other users can provide a more creative solution.
[Xperia Z3 Android Development] loiselqw:
I tried to be more creative... I let following script run over 36h in the hope it could help to recharge the battery (it was an assumption that the battery was flat) - I found something similar for windows here: https://xdaforums.com/showthread.php?t=1658084

#!/bin/bash

for i in {1..900000};
do

echo "the counter is $i"

fastboot getvar battery-voltage
echo "now"
sleep 6
echo "now + 6 seconds"
fastboot reboot bootloader

done

... but unluckily same sh*** than before. Interrupting the script and flashing twrp with

fastboot flash recovery '/z3/twrp_z3_2018-03-28.img'

is giving me following output

target didn't report max-download-size
sending 'recovery' (10808 KB)...
OKAY [ 0.349s]
writing 'recovery'...
OKAY [ 0.715s]
finished. total time: 1.064s

after reboot I only can access fastboot (blue led) or get from time to time red led is flashing up when connected via usb cable to usb...

What are the precise, correct stepts after flashing recovery with above mentioned command? Is the command correct? And what about the output?

Thx a lot in adv
[Xperia Z3 Android Development] juniper1982:
I might be being silly, but i read the how to install on the first page and it talks about installing cyanogenmod. What are the installation instructions for TWRP?

I should add I am on stock everything for this phone. It's my wife's and I think I am inheriting it, so time to upgrade!

I should add, that cyanogen page linked to on page 1 doesn't seem to be up. I think it is old.
[Xperia Z3 Android Development] Dr.TheMaster:
You need to have a working PC with Flashtool and its drivers installed..

You need to unlock bootloader with flashtool (it's the easiest way)

Then install this recovery by fastboot using code

Fastboot flash recovery "file name.img"

After that you can access TWRP recovery and flash any ROM you want..

If you have no experience with Xperia devices and custom ROMs I would say stay with stock ROM for now.. 6.0.1 is the most stable ROM for Z2 for now..

Have a good day :)
[Xperia Z3 Android Development] juniper1982:
I have no experience with upgrading the Z3 (and I have Z3 not Z2, like you said). I have installed custom roms on other phones. So, with clear instructions I should be able to do it.

So, you think omni rom oreo is no good? What about lineage nougat? I find the stock MM on the phone a little to be desired. I don't like the interface.
[Xperia Z3 Android Development] Dr.TheMaster:
Sorry for misunderstanding, I thought you posted in Z2 forums (I have both devices)

Well for Z3 it's kinda different.. at first you need to know what bootloader version you are dealing with.. If it's the latest one then you need to wait for a newer TWRP version compatible with the bootloader.. The instructions to get the bootloader version are in OP..
[Xperia Z3 Android Development] juniper1982:
The instructions in the OP seem to say to issue a command "getprop ...", but where?

Using instructions on the internet, I entered some *#*# number and I see that I have "Bootloader unlock allowed: Yes". Which I think is good.

However, I can't seem to enter my recover at all, but this may be normal.
[Xperia Z3 Android Development] Dr.TheMaster:
You need to have adb files and adb drivers installed then search how to use them.. After that you put the code in adb

Bootloader unlock is allowed on your device which is good if you have the right bootloader version..

There is no recovery in your device right now.. You need to have an unlocked bootloader and the right bootloader version.. Flash TWRP via fastboot.. Then you can access the recovery..
[Xperia Z3 Android Development] juniper1982:
I have adb on my system and I do know how use some of the basic functions. Indeed, adb can find my devices.

So, here is what I don't know.

1) how to check the bootloader version and see if it is the right version.

2) presumably if it is the right version, I don't then know how to flash twrp because I normally need to go into recovery or the bootloader to do that and you can't do that on this phone!

Ok. I just saw a bunch of videos on youtube on this. Man, it's really involved on this phone! But ok. So, I can follow those video to unlock the bootloader.

So, I just want to make sure here is what I do.

1) check the version of the bootloader and make sure it is right (is this simply just confirming the "bootloader unlock allowed: yes" is there? because I have already done that. If that is all I need to do to check the bootloader, I am golden.

2) follow videos to unlock the bootloader. presumably this is all doable on linux.

3) once it is unlocked, I right away flash the TWRP linked to at the beginning of this thread.

4) that should give me twrp. I can then boot into my normal MM or flash the new omni rom or carbon rom (any recommendations?). I will probably do that all at once.

I can't see in this thread if there are precise instructions on the right order to do this. Can someone give some step by step instructions?

Thanks Dr.Themaster.
[Xperia Z3 Android Development] Cush83:
I have a twrp 2017-07-23 can i upgrade my twrp on my xperia z3 ? I have a carbon rom with nougat....
[Xperia Z3 Android Development] maxi16:
Why not?

Twrp is independent from the Custom Rom itself. When you want to upgrade to Carbon Rom with Oreo you need to update the twrp anyway.

Just notice that the way how you can reach the recovery could change a little bit.
[Xperia Z3 Android Development] playitlouder:
[MENTION=6979267]nailyk[/MENTION]

When trying to install OpenGapps 8.1 nano 20180528 with the latest TWRP (2018-03-28 single/unified) the process will fail with "ERROR 64: Wrong architecture to set-up Open Gapps' pre-bundeled busybox".

The OpenGapps zip file is for 32 bit phones, so architecture should be correct.

Version 2017-10-02 Single will install gapps fine, but fail to install carbon rom, because getprop(ro.product.device) will return an empty string and therefore not match with "D6602,D6603,D6643,[...]".
[Xperia Z3 Android Development] marcoforever9:
hi guys, I need of zip file of the latest version o twrp (3.2) please help me
[Xperia Z3 Android Development] maxi16:
Download the twrp from 2018-03-2018. It's the newest twrp version for the z3.

Look in the OP.

And twrp comes in a img format. No zip.
[Xperia Z3 Android Development] lkjsoiuew:
I did "fastboot flash recovery IMG" and "fastboot flash FOTAKernel IMG" and "fastboot boot IMG" (IMG = twrp_z3_2018-03-28.img), all with OK result, but nothing works, can't boot to recovery, neither with buttons nor from android, I have CARBON from last week installed but don't remember how I did that. Why does it not work?

Also tried twrp_leo_2017-10-02.img.

Now I flashed 2018-03-28.img with flashtool and I can boot into recovery. Why?

The recovery doesn't see files on the external sdcard.
[Xperia Z3 Android Development] iansung8:
No problem now
[Xperia Z3 Android Development] cmonty14:
TWRP upgrade failed

Hi,

I want to upgrade to twrp_z3_2018-03-28.

Running the previous TWRP version I started flashing twrp_z3_2018-03-28.img with TWRP.

However, the tool asked me what I want to flash: boot or recovery.

I selected recovery.

Since this I cannot boot into recovery anymore.

How can I fix this?

THX
[Xperia Z3 Android Development] nailyk:
You do not have an upgraded bootloader. Revert back to older version.​
[Xperia Z3 Android Development] cmonty14:
You mean I should install previous TWRP version twrp_z3_2017-11-21.img?

Would it make sense to upgrade to new bootloader?
[Xperia Z3 Android Development] nailyk:
Totally. But some devices does not have it (at least in an official way) so I tried to maintain compatibility with the old boot process (light at power on).

But all the new TWRP builds use LZMA compression who need to be added into your rom.

So:

With the new (2nd, see OP) bootloader, you wont have problem booting TWRP

With the old way (boot recovery from kernel's rom) you need to have a 'kernel' able to extract the LZMA recovery.
[Xperia Z3 Android Development] cmonty14:
I need some advice how to proceed.

I have checked with adb which bootload version is in use.

However getprop ro.boot.s1boot does not return anything (see screenshot).

Therefore I would ask you to share some information how to upgrade the bootloader.

Will this delete everything stored on the device?

And what are the next steps?

THX
[Xperia Z3 Android Development] cmonty14:
How to upgrade bootloader

Can you please advice how to upgrade the bootloader in order to install new TWRO builds (and using LZMA compression)?
[Xperia Z3 Android Development] akkufix:
Using the search will found this: ;)

https://xdaforums.com/z3/general/guide-xperia-z-boot-process-explained-t3359510

Check post #2
[Xperia Z3 Android Development] :
After flashing both the ZIP and the .img in fastboot, my phone STILL says I am on TWRP 3.0.2-0. What am I doing wrong? I am on the D6603-6653_23.5.A.0.291_kernel bootloader.
[Xperia Z3 Android Development] dicanio12:
Wanted to check my bootloader version but

C:\WINDOWS\system32>adb shell getprop ro.boot.s1boot

C:\WINDOWS\system32>adb shell cat /proc/cmdline

/system/bin/sh: cat: /proc/cmdline: Permission denied
[Xperia Z3 Android Development] makes2068:
Is this the latest stable twrp version for Z3 Omnirom?

==> twrp_z3_O_2018-06-16.img
[Xperia Z3 Android Development] alfan.y:
Here's my ro.boot on carbon rom. I flashing with new twrp recovery, but nothing happen when trying to enter twrp. The phone just get reboot. Please help.

Another question, if i try to full flash 5.1 ftf using flashtool

A ndroxyde I've got byte error.
[Xperia Z3 Android Development] nailyk:
Should be but IIRC there is an issue with encrypted devices. Am waiting for thread maintainers to upload a new release.

Need to be done from TWRP, not the rom :)

Yes, there is a problem on latest version (CC
[Xperia Z3 Android Development] emil_bg:
I cannot install gapps using this twrp version. I am keep getting "error 64:wrong architecture to set-up open gapps pre bundled busybox". I am installing Arm version for sony xperia z3 which should be correct. I read that latest version has problem and we should use 3.0.2 version but does older version allow me to install latest LineageOS ?
[Xperia Z3 Android Development] dhacke:
Hi guys,

I have problem with my old phone and hope that some of you can help me because i'm fearing i hardbricked my phone.

So first the story:

Recently i switched to a unofficial aicp pie rom for my z3. It worked until i activate the encryption, update the host file and reboot my device.

Then it stucks at the aicp logo because the data encyption was somehow corrupted.

So today i wanted to change back to carbon rom. I downloaded the zip and flash the build via this twrp. Because i forgot the data wipe i tried it after the rom installation.

And now the problems begun. I can't wipe anything. I always get the error "failed to mount '/data'.

Then i tried to boot into carbon. It starts but it always says "encryption failed" with the option that i can make a factory reset but when i do this it's always bootlooping.

When i try the format option in twrp i get a second error message to the mentioned above:

"mkfs.f2fs -t 0 -r 16384 /dev/block/mmcblk0p25

process ended with error 1"

And the flashmode mode refuses to work, too. The green led stays only for a second and then turned off.

I don't have any idea what the hack is going on my phone and atm i don't have any idea how i can make a successfull wipe.

The only thing that still works is the fastboot mode but that's it.

So any suggestions? It would be a pitty when the aicp build hardbricked my phone.

Edit 1:

It lives again. Hurray:)

Over the fastboot mode i make it to delete the /data partition.
[Xperia Z3 Android Development] fodaseoestado:
Jeez, this is very complicated.
[Xperia Z3 Android Development] nailyk:
Hi,

as the xperia z series doesn't provide real recovery boot process until you upgrade your bootloader to version 15.4 developers made greats tips to provide recoveries functionalities. One of them is to include recovery in the boot.img, the other is the 'extract_elf_ramdisk'.

I never test crdroid but according to your experience it should include a twrp in the boot.img. (when the light is on, you have 3 seconds to press volume and the recovery ramdisk is used).

As you said, applying this update upgrade your bootloader and you now have a real recovery boot process (even if your boot.img is corrupted/damaged/empty) you should be able to boot in recovery.

With the new bootloader there is a problem: the 'reboot recovery' functionality doesn't work. So updating rom is a bit tough.

I'm working on it but I can't figure out the changed needed. (Any help welcome :) )

I'm glad this twrp work for you now.

Thanks for your feedback.
[Xperia Z3 Android Development] HaoZeke:
Hey any chance of getting the zip files of the flags you used to build this?
[Xperia Z3 Android Development] nailyk:
I try to keep this post up-to-date (how-to-build section). All my work is on my github.

What do you need exactly?
[Xperia Z3 Android Development] nailyk:
3.0.0-1 release

New release, but the '3.0.0-1' is just to inform i'm not sync with the twrp source code as mentioned here:

All the source code is done by the twrp team, I just add a few build trick to include crypto / f2fs etc...
[Xperia Z3 Android Development] chaoscreater:
Does work on my D6653, it just keeps boot looping.

I've tried both fastboot and flashing .zip.

LeonidasTurk's one works fine though.
[Xperia Z3 Android Development] nailyk:
Hi,

sorry to read that.

I also experience boot loop under certain conditions:

new bootloader installed,

kernel with extract_elf_ramdisk support,

soft reboot to recovery (or with the 'kernel keycheck': volume rocker when light is purple).

The only way I found to bypass this is:

turn off phone,

unplug the charging cable,

press volume down and power.

Anyway I'm glad the [MENTION=5538740]LeonidasTurk[/MENTION] work for you.

Have you any other information that can help my debug? Some log, dmesg or light status?

Thank for feedback.
[Xperia Z3 Android Development] nailyk:
z3 recovery bootloop

As I workaround for bootloop I propose a (cyanogenmod) kernel where I remove the 'boot in recovery' functionality. It is the only way I found to prevent this. Consequence is there is now way to soft boot into recovery.

Others twrp on xda works very well with old bootloader and my z3 had an upgraded bootloader, so I choose to be only compatible with new bootloader (title edited consequently).

Really sorry but I can't find a way to be compatible with: new bootloader, old one & 'extract_elf_ramdisk' process at the same time.