Sony - Xperia XA2 - pioneer - Documentation Suggestions

The warning should be available now on the install page.

The manual seems to be a bit unclear whether to use TWRP or the recovery image provided by e.foundation. In Lineage only the recovery image is used. And from a first look that seems to work fine.

The /e/ Recovery has only a basic set of functions.
Users who are aware of adb shell commands can use it to manage more advanced functions.
TWRP on the other hand has a UI which makes it easy for all users to try out complex activities.
This is why we are not aggressively promote the /e/ recovery for now.

In that case the information “load TWRP here” is missing. The Chapter " Temporarily Booting a custom recovery using fastboot" tells how to flash an image. I did that for the /e/ Recovery. It would be great if that chapter tells what should be flashed. For example first /e/ Recovery using command x and then boot into TWRP without flashing using command y.

Most likely it worked for me because I tried TWRP first (wipe worked but install failed for some reason) and then I used the /e/ Recovery to do the install.

Hi there,

I would suggest renaming “Upgrade” to “Install on unlocked phone” or the like, because the one thing you can exactly not do is just upgrade an XA2 running Oreo with the Q version.
A prerequisite for installing /e/ Oreo on the XA2 was not having the Pie version on the phone.

So in any case you would have to install the official Android 9 Pie from Sony before installing/upgrading to / e/ Q. (There is no Android 10 for the XA2 but according to the forum, the official Android 9 and /e/ Q does work.).
Installing the official firmware is no piece of cake either, given the a/b scenario. So users should IMHO be sent to lineage for instructions:

Best Dave

Hi,

this is my first post in this forum, so I hope to respect all the community guidelines.
After very good experiences with flashing a Nexus 5 with /e/, yesterday evening I tried to flash my Xperia XA2 following the steps on
https://doc.e.foundation/devices/pioneer/install
It did not went well so I hope to find some help or suggestions here.

In short
In the section “Pre-install instructions” the step “Sideload the copy-partitions-20210323_1922.zip”
did not work out well. After rebooting, the phone was stuck in a boot loop, but it was possible to recover to Android 9 via a menu on the phone. After restarting the procedure from “Temporarily Booting a custom recovery using fastboot” and rebooting the phone, the phone is stuck with “Your device is corrupted. It can’t be trusted and will not boot.”

Details
Setting:

  • Sony Xperia XA2 (H3113)
  • Android 9
  • e-OS: e-0.20-q-20211216151800-dev-pioneer.zip
  • Recovery-image: recovery-e-0.20-q-20211216151800-dev-pioneer.img
  • pre-install-instructions: copy-partitions-20210323_1922.zip

Section: Unlocking the bootloader

user@host:~/Downloads/e-os$ sudo adb reboot bootloader
user@host:~/Downloads/e-os$ sudo fastboot devices
CABC12345C	fastboot
user@host:~/Downloads/e-os$ sudo fastboot oem unlock 0xUNLOCK_CODE
...
OKAY [  1.933s]
finished. total time: 1.933s

Section: Temporarily Booting a custom recovery using fastboot (1st run)

user@host:~/Downloads/e-os$ sudo adb reboot bootloader
user@host:~/Downloads/e-os$ sudo fastboot devices
CABC12345C	fastboot
user@host:~/Downloads/e-os$ sudo fastboot flash boot recovery-e-0.20-q-20211216151800-dev-pioneer.img 
target reported max download size of 536870912 bytes
sending 'boot_b' (23461 KB)...
OKAY [  1.047s]
writing 'boot_b'...
OKAY [  0.191s]
finished. total time: 1.238s

Please note: In the first run ‘boot_b’ was sent.

Section “Pre-Install instructions” (1st run)
The phone was still connected to the PC, but did not respond to any touch on the display or pressing any button, so I thought, that the commands
- On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
- On the host machine, sideload the package using: adb sideload copy-partitions-20210323_1922.zip
are kind of “either… or” and chose the second option, which led to:

user@host:~/Downloads/e-os$ sudo adb sideload copy-partitions-20210323_1922.zip 
adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found

The device did not react and so I disconnected the phone from the PC and tried a reboot. Afterwards, the phone was stuck in a boot-loop and after a couple of restarts, the option of a factory reset or “Try again” was presented on the smartphone’s screen. After factory reset, the Android Version 9 was still present. The bootloader was still unlocked.

Section: Temporarily Booting a custom recovery using fastboot (2nd run)

user@host:~/Downloads/e-os$ sudo adb reboot bootloader
user@host:~/Downloads/e-os$ sudo fastboot devices
CABC12345C	fastboot
user@host:~/Downloads/e-os$ sudo fastboot flash boot recovery-e-0.20-q-20211216151800-dev-pioneer.img
target reported max download size of 536870912 bytes
sending 'boot_a' (23461 KB)...
OKAY [  0.929s]
writing 'boot_a'...
OKAY [  0.190s]
finished. total time: 1.119s

Please note: In the second run ‘boot_a’ was sent.

Section “Pre-Install instructions” (2nd run)
Since in the first run I was not able to follow the Pre-install instructions I disconnected the phone form the PC to check whether in the recovery image the option “Apply Update” and “Apply form ADB”
- On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
- On the host machine, sideload the package using: adb sideload copy-partitions-20210323_1922.zip

Then a reboot did not work and the message “Your device is corrupted. It can’t be trusted and will not boot.” is displayed.
After reconnecting to the PC the device is not found

user@host:~/Downloads/e-os$ sudo fastboot devices
user@host:~/Downloads/e-os$

and the device does not respond to the volume down and power button.

Have I “hard-bricked” my phone or do you see any chance for recovery?
I am happy for any suggestions.

HI @Cassandra73 ,

Can you try again plugging phone to pc while holding vol up, see if you can get the blue led in fastboot mode.

The first misstep in your install procedure was to miss out manually booting the e-recovery directly after flashing. Not your fault, as the instructions don’t show this. The second was trying a reboot after sideloading the copy partitions zip.

The phone should be ok, it can take a lot! But might need to take it a step at a time.

Hi @chrisrg,

thanks for the quick reply.
OK. Well, I don’t get a blue led, however, the device seems to be back in fastboot mode:

user@host:~$ sudo fastboot devices
CABC12345C	   fastboot

ok, that’s good. It would be best to start again and try to be on slot b.

Just in case you don’y know the commands, to see what slot you are on now
:

fastboot getvar current-slot

To change slot

fastboot --set-active=b

it might be fastboot getvar --set-active=b

Sorry, I’m away from home and my notes

Cool. Thank you for the hint. In effect the current-slot was “a”.

And it is:

fastboot --set-active=b

Just for my understanding:
Having checked the

user@host:~$ sudo fastboot devices
CABC12345C	   fastboot

the next step would be to reflash the recovery-image on b? So I am back in the procedure as described and the next step would be step 4 of
Section: Temporarily Booting a custom recovery using fastboot
i.e.,

fastboot flash boot recoveryfilename.img

correct?
And then the next step would be to make a reboot of the phone?

P.S. Oh, don’t worry. I am very happy for your help!

yes

Next step would be with device powered off (unplug from pc) manual reboot to recovery by holding vol down and power. Release power after vibration .

This should boot up the e-recovery. Plug device back in to pc. and you can then follow the instructions to copy partitions again. Do not reboot again until the end. Go to next step to factory reset in recovery etc.

Ok, it seems that I am almost there…
Sideloading of the zip-file gives

user@host:~/Downloads/e-os$ sudo adb sideload e-0.20-q-20211216151800-dev-pioneer.zip 
serving: 'e-0.20-q-20211216151800-dev-pioneer.zip'  (~47%)    adb: failed to read command: Success

However, in step 10 the process does not pause at 47%, but it seems to stop/abort there.
On the phone the Recovey|Apply Update screen is displayed. In small fonts, there is written in the last three log lines

Installing update...
Step 1/2
Step 2/2

The messages " Total xfer: 1.00x" or " Script succeeded result was [1.000000]", as expected in steps 12 and 13, are not displayed.
I just tried it (the sideloading) twice with the same result.

It stops at 47 on PC, the rest is on device. It takes about 5 mins. Eventually you should see a little back arrow at top left of recovery screen. Go back an select reboot system. You can unplug.

If you get a bootloop, leave it an see if it drops back into e recovery and do a factory reset again. Reboot system.

Right now it works! Thank you very much for your help and patience.

Just for the record:
After the arrow on the upper left corner is visible, and going back to Recovery Main Screen the message:
“Install completed with status 0.”
is displayed and a reboot (with the unplugged phone) worked well in about 2 minutes.
Thanks again!

Congratulations, well done!

Install with status 0 is exactly what you want .

If there is a way to contribute to the update of the documentation I would be happy to do so.

You can share steps which you took. This page is also linked from the installation guide.

After having completed the installation, I would like to share some details and observations in addition to the description on Install /e/ on a Sony Xperia XA2 - “pioneer”
that worked for me or that I made in the setting:

  • Sony Xperia XA2 (H3113)
  • Android 9
  • e-OS: e-0.20-q-20211216151800-dev-pioneer.zip
  • Recovery-image: recovery-e-0.20-q-20211216151800-dev-pioneer.img
  • pre-install-instructions: copy-partitions-20210323_1922.zip

This is mainly a summary of the preceeding posts.

Temporarily Booting a custom recovery using fastboot
I followed the steps including section Temporarily Booting a custom recovery using fastboot, which gave:

user@host:~/Downloads/e-os$ sudo adb reboot bootloader
user@host:~/Downloads/e-os$ sudo fastboot devices
CABC12345C	fastboot
user@host:~/Downloads/e-os$ sudo fastboot flash boot recovery-e-0.20-q-20211216151800-dev-pioneer.img 
target reported max download size of 536870912 bytes
sending 'boot_b' (23461 KB)...
OKAY [  1.047s]
writing 'boot_b'...
OKAY [  0.191s]
finished. total time: 1.238s

Please note: If you should need to reinstall the recovery image, the outcome might be:

user@host:~/Downloads/e-os$ sudo fastboot flash boot recovery-e-0.20-q-20211216151800-dev-pioneer.img
target reported max download size of 536870912 bytes
sending 'boot_a' (23461 KB)...
OKAY [  0.929s]
writing 'boot_a'...
OKAY [  0.190s]
finished. total time: 1.119s

i.e., the slot has changed from b to a. To check and - if necessary - adjust (and re-check) the slot, I did:

user@host:~$ sudo fastboot getvar current-slot
current-slot: a
finished. total time: 0.001s
user@host:~$ sudo fastboot --set-active=b
Setting current slot to 'b'...
OKAY [  0.008s]
finished. total time: 0.008s
user@host:~$ sudo fastboot getvar current-slot
current-slot: b
finished. total time: 0.001s

Then I was able to reinstall the recovery image to slot b.

Pre-install instructions
With regard to step 2 in the section “Pre-install instructions”, i.e., to be able to select the “Apply Update” on the phone, I needed to unplug and reboot my phone in (e-)recovery mode by holding the volume down and power button. To start, release power button after vibration. This opened the e-recovery mode. After plugging again the phone to the PC and the selection “Apply Update”, then “Apply from ADB” could be done via the e-recovery mode on the phone.
Afterwards I sideloaded the copy-partitions-20210323_1922.zip, which gave:

user@host:~/Downloads/e-os$ sudo adb sideload copy-partitions-20210323_1922.zip 
* daemon not running; starting now at tcp:5037
* daemon started successfully
Total xfer: 1.00x

Steps to install /e/OS from recovery
In the section Steps to install /e/OS from recovery, step 9, I would like to mention, that the PC seemed to be stuck for some minutes at 47 % and then even seemed to have stopped the process:

user@host:~/Downloads/e-os$ sudo adb sideload e-0.20-q-20211216151800-dev-pioneer.zip 
serving: 'e-0.20-q-20211216151800-dev-pioneer.zip'  (~47%)    adb: failed to read command: Success

However, on the phone, in small fonts, a progress could be followed, giving the (last three) log lines

Installing update...
Step 1/2
Step 2/2

After a couple of minutes an arrow in the upper left corner appeared. On the main screen, there was displayed
Install completed with status 0.

Than the phone could be rebooted as described in steps 14 and 15. Rebooting took approx. 2 minutes.

I hope this helps.

Hello,

the upgrade manual (/e/OS Version Upgrade) mentions that the latest recovery and the latest image should be downloaded. But it only uses the image. It would be good to either say what to do with the recovery or remove that from the manual.

I updated the recovery with fastboot after installing the image on one phone (kirin instead of pioneer but they are very similar) which worked fine. I also tried it the other way round on another phone which made some trouble during reboot from bootloader into recovery but otherwise seemed to work too.

Note that this is true for multiple phones and not only pioneer.

Best regards

Christian

I am about to do an upgrade to S from R, so what you are saying is of quite some interest to me.

During my upgrade from O to R last year, the instructions had a section wherein one flashed the recovery first, and also did a copy-partitions process. These both appear to be missing from the new instructions.

It’s not clear to me why this would be the case, given that the pioneer has an A-B slot architecture that one tends to need to pay attention to.

In fact, the differences between my detailed notes of last year and the new install instructions are very major indeed. Has anyone done the R-to-S upgrade following the instructions as given?