Temporarily flash a recovery on your device by typing:
fastboot flash recovery <recovery_filename>.img
In my understanding this is the command to install twrp which can lead to serious problems with the eOS install.
This is from twrp’s website installation page for the XA2:
“WARNING: If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image.”
This is true, I know from bitter experience.
One command to temporarily boot twrp is:
fastboot boot <recovery_filename>.img
This will immediately boot twrp with the interface displayed on the device screen, good to go.
Another command to temporarily boot twrp is:
fastboot flash boot <recovery_filename>.img
This flashes twrp but the phone display remains in fastboot mode; black screen/blue led. Power off phone and manually boot into twrp recovery by holding power & volume down buttons until you feel 1 vibration.
Another thing I have noticed after numerous installations to this phone is that after the eOS installation zip has been sideloaded it is best to reboot into recovery first. This will boot the LineageOS recovery that comes with the installation. There are still be a few little problems to negotiate from this point on but it is consistently successful in my experience.
Rebooting system after sideloading on the other hand is reliably disastrous, don’t want to go there.
Thank you @chrisrg for highlighting this.
This might explain why I had to reinstall a factory image with Emma during my installation of /e/OS (the other possibility is that, I made a mistake while following the procedure; being totally inexperienced with flashing roms and so on, and not actually understanding what I was doing, I might have made some other mistakes…)
Having just installed /e/ onto my new XA2 I found that it will not boot into recovery while the USB cable is installed. It is necessary to remove the USB and power on with Vol Down+Power as described.