This instruction list grow from XDA member @Raphos instructions here and their, @MartinX3 and others' posts throughout that thread as well as documentation found at ix5.org
Use one of the flash modes
- flashmode (VOL_DOWN) #green - is used by flashtool to flash the Sony Software - press volume down and insert the USB cable (green light will come)
- fastboot (VOL_UP) #blue - is used by fastboot to flash the AOSP images - press volume up and insert the USB cable (blue light will come)
- Backup Trim Area (TA) partition - FlashTool or https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
- If backup TA is not working, factory reset and downgrade to < 7.0 flash stock firmware - https://mega.nz/#!cwJTzL5Q!v36UgGa5gY39GUSM7Vfr2VMvvyHaUwtVBOkYvtWAZLA
- If you're running pre-Pie Android and YOU DON'T BACKUP TA (with DRM keys) - CAMERA WILL NOT WORK + some other features (which?)
- Should be fine for newer Android versions - https://www.xda-developers.com/sony-xperia-android-pie-unlock-bootloader-drm-fix-camera/
- Unlock bootloader - https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader
- If you can't enable OEM unlocking, try flashing newer versions of firmware
- Actual unlocking - https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/how-to-unlock-bootloader/#tutorial-step-3
- Install / Update android SDK tools (
tools/sdkmanager --update
) - Make sure all the tools are in your $PATH -
adb
andfastboot
most importantly - Check if phone appears in
adb devices
- Download .zip image from MartinX3 file hosting (if the link doesn't work, try another dir, or just check xda-developers thread)
- Unzip it and note the
payload.bin
file. - Run the payload dumper:
sudo apt-get install python3-dev && \
git clone https://github.com/vm03/payload_dumper && cd payload_dumper && \
virtualenv --python=python3 venv3 && source venv3/bin/activate && pip install -r requirements.txt && \
python payload_dumper.py payload.bin && deactivate
- Use flashTool to download latest stock ROM (try older
~/Tools/F8331/FlashTool-0.9.26.0/FlashTool/FlashTool
if the newest fails) - Flash the latest ROM to phone and boot the phone (so that security updates get applied, perhaps something else)
- Skip setup quickly and just go and activate developer options!
- Reboot into bootloader with
adb reboot bootloader
or by starting the phone with VOL_UP
- you might need to reconnect the phone and retry if one of these fails until it goes through (it might be that you don't have cache partition though)
- or try
fastboot reboot bootloader
fastboot erase boot && \
fastboot erase cache && \
fastboot erase system && \
fastboot erase userdata
- Download OEM binaries from sony.com
- Does
fastboot getvar all
says "active slot b" ? - Apparently it's good to alternate between using A and B partition (system_a/system_b, oem_a/oem_b, etc..)
- you might need to reconnect the phone and retry if one of these fails
- you might need to change USB port if you get
Requested download size is more than max allowed
- Enter the payload dumper output folder and execute:
fastboot flash boot boot.img && \
fastboot flash dtbo dtbo.img && \
fastboot flash system system.img && sleep 2 && \
fastboot flash vbmeta vbmeta.img && \
fastboot flash vendor vendor.img
# then flash latest SW binaries (you can double check in the XDA thread that latest build works with them)
fastboot flash oem_a SW_binaries_for_Xperia_Android_10.0.7.1_r1_v5a_tama.img
fastboot reboot bootloader
- Install TWRP from
2020-04-13_20-20-57_twrp_sodp_xz2c.tar.gz
or later (find newest here) in fastboot mode - Booting into fastboot mode using hardware VOL_UP button will not help for TWRP
- You have to try rebooting into bootloader mode with fastboot
- Or to install twrp image to boot partition, run the dualsim patch and then flash the LOS boot image before restarting
- Extract TWRP archive, and navigate to the folder
- fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
- fastboot boot twrp-*.img # enter into TWRP
- flash sony-dualsim-patcher-v4.zip
- you should be flash dualsim patcher by either:
- copy the
dualsim-patcher/zips/sony-dualsim-patcher-v4.zip
zip file on the phone and run the installer inside TWRP.. OR - enter "Advanced" in TWRP, and choose "ADB sideload", enter into ADB sideload and then on your computer run
adb sideload dualsim-patcher/zips/sony-dualsim-patcher-v4.zip
- copy the
- you should be flash dualsim patcher by either:
- reboot system