Debranding an Zperia Z2
There is something wrong with this file linked (D6503_17.1.A.2.55_EURO_LTE.ftf), it may be corrupt. I flashed it to my Xperia Z2 to de-brand from EE but it sent it into a boot loop instead of restarting. I Managed to get flash tool to work in debug mode again by by plugging in the usb cable and flashed D6503_23.5.A.0.570_RU.ftf which I found on the net as a generic uk Android marshmallow 6.0.1 update and all was well again. After that the next update came from Xperia Companion updating software in the normal way. It is possible that I did something wrong. If you are debranding a UK Z2 just find the latest Marshmallow 6.0.1 update file (D6503_17.1.A.2.55_EURO_LTE.ftf) and flash it to your phone . You don't need to unlock the boot loader of need to root the phone. I'm too new to the forum it won't let me post links to the marshmallow files sorry you will have to find them yourself.
Download and install Flashtool
Enable USB Debugging on phone. Head over to Settings>> Developer options
Enable Unknown sources on the phone by navigating to Settings>> Security
Steps to Debrand Sony Xperia Z2
Step-1: Ensure that you have installed all necessary drivers for Sony Xperia Z2 on the computer. You may do this by installing PC Companion or Sony Update Services (SUS)
Also connect the Xperia Z2 to the computer before starting the process to download USB and ADB drivers. You will find the necessary drivers once Flashtool is installed in the following location, C:Flashtooldrivers
Step-2: Download the following FTF file, which will debrand Xperia Z2
Download link: Xperia Z2 D6503 Generic UK 17.1.A.2.55 (1282-0226)
This is UK generic firmware and will work on any D6503 model and provide several language options. You may download FTF link according to your region
Step-3: Move the downloaded FTF file in C:Flashtoolfirmwares folder
Step-4: Open Flashtool on the computer (Click on the lightning bolt symbol and select Flashmode then click OK
Step-5: Select the downloaded firmware in the left column.
Note: If you want to keep all existing apps and date, ensure that Data is not selected. Press the Flash button
Step-6: You should see Flashtool is "Preparing files for sharing"
When the prompt appears, connect the Xperia Z2 to the computer and switch off the phone. Press and hold Volume Down button while plugging the USB cable into the phone
Step-7: The installation process should begin now
Step-8: When the 'Flashing finished' message appears in Flashtool, remove the phone from the computer and restart it. This process will take a few minutes
That's it. The Xperia Z2 should now be debranded to UK generic firmware.