[Xperia Z5 Q&A, Help & Troubleshooting] Superblond:
[SOLVED] Re-flashing a ROM with TWRP only on phone

After failing to manually mount the SD-Card or a USB-Stick via OTG-cable through the Terminal with command line function, the xda-user L33Tgod gave me the (simple) tip via pm to use the flashtool and flash the phone with a valid ROM (again)... THX a lot L33tgod!

As a result, I can access my phone & my SD-Card again. Now I have a working ROM on my phone and I am no longer stuck in a TWRP-Menue only, without the chance to communicate with the phone via ADB etc.

So I followed the below how-to (nothing new, I know, but the solution for my problem)

Flash your FTF firmware file

This section details the steps needed in order to flash new firmware onto your Sony Xperia device.

First of all, open Flashtool and then click on the lightning bolt in the top left of Flashtool as highlighted below.

[IMG="mm8"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_8_Red-640x364.png[/IMG]

Select “Flashmode” and click “OK”.

[IMG="mm9"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_9.png[/IMG]

You should already be in the source folder where the FTF firmware files are located. If not, navigate to: “C:\Users\[Your PC Name]\.flashTool\firmwares”

Select the firmware build version that you want to flash from the “Firmware” pane. Ensure the device variant is the same as the model number of your Sony Xperia device.

If you want to retain your apps, data and media (photos, videos, music), then ensure that the “USERDATA” option within the “Wipe” pane is unticked. However, we recommend that when upgrading a major new Android version, a clean install is the way to go. In this case, tick all options under the “Wipe” pane. This will wipe all of your data though including your photos and videos, so please ensure you have these backed up elsewhere.

[IMG="mm10b"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_10_b-640x438.png[/IMG]

IMPORTANT – For FlashTool 0.9.19.10 and older: If you skipped Part 2 of the guide as you already had your own FTF firmware file, then you may see the following ‘SIMLOCK’ option ticked under the “MiscTA Exclude” pane. DO NOT untick SIMLOCK as it could lead to problems with the network lock on your device.

[IMG="sim"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_Simlock_2.png[/IMG]

IMPORTANT – For FlashTool versions 0.9.22.0 to 0.9.22.2: The developer has changed the meaning of the tick box in newer versions of Flashtool, which means ticking the box includes “SIMLOCK”. Either way, you want to ensure you are NOT including SIMLOCK when flashing firmware. So to be clear, when presented with the “SIMLOCK” option below, you must NOT tick the box.

[IMG="flashtool sim"]http://static.xperiablog.net/wp-content/uploads/2016/03/Flashtool-Simlock.png[/IMG]

NOTE – For FlashTool 0.9.22.3 onwards: The developer has disabled “SIMLOCK”, which means you no longer have to worry about accidentally including it in your firmware flashing. The option is only enabled by entering ‘Pro’ mode. Unless you know what you are doing, then stay well away from Pro mode.

Click “Flash”. Flashtool will then indicate that it is “preparing files for flashing”.

[IMG="flashtool prepare"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_11_red-640x364.png[/IMG]

You may have to wait around 60 seconds for the pop-up below to appear. Once it does, you should now connect your Sony Xperia device. Make sure the device is powered off and then hold the ‘volume down’ button whilst connecting the USB cable. Once the pop-up disappears and flashing has started, you can let go of the ‘volume down’ button.

[IMG="vol down"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_12-640x508.png[/IMG]

Flashtool will then start flashing your Xperia device.

[IMG="start flash"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_12-640x508.png[/IMG]

Once you see “Flashing finished” as indicated below, your Sony Xperia has been successfully flashed.

[IMG="finished flashing"]http://static.xperiablog.net/wp-content/uploads/2016/03/MM-Xperia-Guide_14_red-640x364.png[/IMG]

Congratulations you have just installed Android Marshmallow! Now disconnect your Xperia device and power on the handset. Don’t worry if it takes a while for the handset to boot, this is to be expected.

To confirm that you have upgraded the phone software, click on ‘Settings > About phone’, which will reveal your new Android version and firmware build number.

[IMG="guide"]http://static.xperiablog.net/wp-content/uploads/2016/03/Xperia-Marshmallow-Guide_1-315x560.png[/IMG]

If you would also like to confirm the region firmware that you have downloaded, you will need to access the service menu option. To do this, open the dialler and enter the following: *#*#7378423#*#*

Then click ‘Service info > Software info’. The CDF is an eight digit number under the “Customization Version” that should tie in with the firmware you downloaded from XperiFirm. For example, you will notice below that the CDF (software customisation version) of 1298-7362 matches the same firmware that we downloaded in the XperiFirm screenshots above.

[IMG="finish"]http://static.xperiablog.net/wp-content/uploads/2016/03/Xperia-Marshmallow-Guide_2_red-315x560.png[/IMG]

Thx to all the helpers !

SB