Succesfull installation of Pie test build on Xperia XA2 (pioneer)

I was a bit nervous about trying this bearing in mind my difficulties with previous installations on this device (covered at length here and here) but wrote a new plan and had a go. It worked and I’ll write up the steps here; may be of interest to others having similar problems with this device!

I was going to include one new measure into my plan that I had read about (I forget where) and thought sounded like a good idea: after sideloading the /e/ zip reboot to recovery before attempting rebooting system. It seemed to make the difference but I lack the knowledge to be certain about this.

Before starting, the phone was on the 25 June /e/ dev build on slot B, 30 April build on slot A and had sometime earlier been flashed to Android 8.0 with Androxyde Flash Tool.

Turn on Developer Options and set Allow usb debugging, power off the phone.

Plug into pc in fastboot mode.

Open paltform-tools folder on pc, check test build zip and twrp.img are there, open terminal in this folder.

Enter: fastboot devices , ok, enter: fastboot flash boot twrp.img (I used twrp-3.3.1-6-pioneer.img)(this command is from the Lineage install instructions for temporary recovery)

Terminal shows this step completed, phone still in fastboot mode.Unplug from pc and manually boot into recovery, twrp in this case.

Now follow steps 1.- 8., Installing /e/ from custom recovery in the /e/ documentation and for Step 9 reboot to recovery and unplug device.

Phone will now reboot into Lineage recovery and the following steps are simply what I did and not necessarily the correct procedure. More on this in a minute.

Select reboot: it was unable to to reboot but I left it to continue (thinking bootloop by now!) and it cycled again to the recovery screen with a message something like “…you may need to factory reset”.

Select factory reset: phone boots to the bouncing ball and after a few minutes a fresh installation.
After a quick run through the set-up I checked the version in Settings: pie test build, mission accomplished!

Notes
When wiping and formatting in twrp I noticed one red line of text at the head of output text, something like “E: unable to decrypt FBE device”. Not sure about that. If it was a valid error could it be that which made the factory reset necessary at the recovery stage?

Also in twrp, when selecting rebooting to recovery, there was the usual warning about “no OS present” to be ignored.

Just a thought, but I’m tempted to try a temporary Lineage recovery to install /e/ next time and see how that goes. But I have to say I’m pleased with the outcome today; it was quite painless. Apart from a few seconds of bootloop terror towards the end :grin:

1 Like

When trying to flash TWRP on an Xperia XA2 I am getting an error as: No such partition.
How should I proceed when there is no partition available ?
error message is below…
image

@jkalayathil I’ve edited my posts to show the twrp version that worked for me. There is no dedicated recovery partition on A/B devices.

To temporarily flash twrp in fastboot mode enter:

fastboot flash boot twrp-3.3.1-6-pioneer.img

Terminal output should verify with “OKAY” and “finished” and phone screen should still be off with the blue led on.

Power off the phone by unplugging from pc and reboot to recovery manually; power button & vol. down

Twrp should now boot. Good luck.

I tried your method, but with the same result.
image

Try

fastboot boot twrp-3.3.1-6-pioneer.img

I think I see the problem now @jkalayathil. Your terminal output shows attempting to flash ‘boot__a’, whereas it should be ‘boot_a’…would you believe!? So I think if you manually specify the slot to flash it should work with either of the commands suggested.

I don’t know how to format the commands, maybe @Manoj would tell you.

I’ll guess it might be just adding _a to the end of boot in the initial command?

This is from the LineageOS Wiki on how to flash pioneer:

Note: Newer fastboot releases dropped legacy A/B support, so it might attempt to flash to boot__a / boot__b rather than boot_a / boot_b if you try to flash boot . In this case, you must manually specify which slot to flash to based on what slot fastboot failed to flash to. For example, if fastboot fails to flash to boot__a , you must flash to boot_a .

@Manoj I was able to flash the TWRP using your suggestion.
But after doing the sideload of the OS, my phone does not reboot,
Message on phone says: “device is corrupt. It can’t be trusted and will not boot”
How should I proceed…?

Is this message showing up on the screen after your installation is complete. Do not have the same device but this type of a message shows up on most devices when you unlock the bootloader. Not sure this is the same.
screen

This is what shows up on Xiaomi devices when you unlock the bootloader but leave it there for a few seconds and the device does boot up.

Hi @Manoj, what @jkalayathil describes pretty similar to what occured to me with the same phone xperia xa2, after I installed TWRP and flashed pie and then tried to reboot. I ended up using emma and flash a factory rom.
I dropped that info here:

There is really need to get that fixed or take it from the compatibility list.

I hope you can use @chrisrg hint (thanks for sharing) and can get the installation more user friendly, which means, it works when following a given user instruction :slight_smile:

@jkalayathil What os/version were you on when starting?

I was on stock Android Oreo, and updated to latest prior to flashing /e/

@Lucretia1, I think I will have to follow your route to get my phone back into working,
Last year I flashed /e/ on to a Google Nexus 5, I was able to get it done without any hitches.
That phone is a little dated and that is why I got an Xperia XA2

I tried using the Sony Xperia companion to repair the phone, but it did not work.

@jkalayathil It should be possible to get /e/ flashed to the phone from the locked out state. How many times did you try? Last month I got locked out twice in a row before a successful install of /e/.

After being locked out of the phone did you try install /e/ again?

After sideloading the /e/ zip did you try manually rebooting to recovery first? It should then boot up the Lineage recovery and you can proceed from there.

If you have tried a few times and are still getting locked out, how many times does the phone bootloop before locking out , or is it instant?

I’m assuming you have the other phone to use as your daily?

So many questions I could ask. If you give step by step your procedure or more information, it should be possible to help.

@chrisrg, Can you send me the directions on how to manually reboot to recovery.
I tried holding down the Vol down + power button and connecting to the laptop, but did not get any response. I am not able to get my laptop to recognize the phone.
The message is" Your device is corrupt, It can’t be trusted and will not boot.
Your device will be powered off in 5 seconds"
but then it doesn’t power off.

I don’t have a clear picture of what you are doing so it is difficult . Forget what I asked about manually rebooting to recovery, I was getting confused there, sorry!

You are locked out of the phone so you need to start again from the beginning somehow.

Read through all this carefully before you start, and take your time.

Do not connect to laptop yet.

First of all the phone needs to be powered off. If power button on its own won’t do it, then use combination button press to force power off: gently hold power button + vol.up, wait for 1 vibrate followed by three quick vibrations and release buttons, phone powers off.

Prepare laptop and terminal etc how you like it, ready for installing

Put phone in fastboot mode holding vol.up while connecting to laptop and get the blue led. If that’s ok you should be good to proceed.

Verify connection with command :
fastboot devices

Check the current slot (I’m guessing it’s on Slot B now) with command:
fastboot getvar current-slot

Boot twrp with the command that worked for you before, changing the slot letter if necessary.

twrp booted now?
No? Then pull the plug and power down. Have a rethink.
Yes? Now follow steps 1.- 8., Installing /e/ from custom recovery in the /e/ documentation but do not reboot system.

With the zip now sideloaded , navigate in twrp to homepage (I think) and select the reboot option followed by recovery option. When rebooting to recovery starts unplug the phone from the pc; the remaining steps will be completed on the phone itself.

The phone should now be in Lineage recovery which is part of the /e/ installation.

This is the stage that I am still experimenting with to try and find the best procedure, so I can only describe what happened to me and hope it works for you.

Select reboot. It may be unable to reboot and start to cycle but let it go a couple of times until it presents the recovery screen again with message: “…you may need to factory reset”. Select factory reset and once in progress just wait for the result.

If something different happens at this point and it carries on bootlooping, power off with vol.up + pwr to prevent another lockout and get a bit of breathing space!

@jkalayathil Manual reboot to recovery: Device powered off, not connected . Vol Down+pwr.

@chrisrg I am unable to get my phone to boot up, tried everything, but nothing is working,
the screen message is still the same.
image

I tried contacting Sony Canada to get a password to use the EMMA tool and they are unwilling to let me use the EMMA tool.
I am on the lookout to find a Sony service agent locally, Most of them are closed now due to the
CCP virus.

@jkalayathil I’m sorry to hear that.

Can you power the phone off?

@jkalayathil Keep calm :slight_smile: So, after the phone powered off itself. Keep it as it is. No volume up or anything, just keep the phone powered off. Take you USB cable and connect to the PC, where you have EMMA running. Start EMMA. Your phone should be recognized and displayed within EMMA.

  1. Keep the phone powered off.
  2. Plug In USB cable to phone and PC.
  3. Start Emma.
  4. Check if your phone is displayed.
  5. Select your ROM. I used the 50.2 (There is one that erases personal, and one that does not).
  6. Hit “Apply service” and that’s it. The rest ist done automatically.

There is no password or anything needed, as far as I know. I just tried with my phone myself.

Note: Although you phone is not listed in the device manager, when powered off and connected to PC, it is recognized by the EMMA tool.
I wished there would be EMMA for /e/ roms :slight_smile:

Have you tried Flashtool? I’ve used it to restore stock firmware, and it does a lot more. Really useful tool for Sony devices