Installing TWRP Recovery on a smartphone like the Sony Xperia M4 Aqua leaves people pretty happy nine times out of ten. One of the features that often gets overlooked that is available from a custom recovery image like what Team Win has produced is the chance to take full backups. Usually, there is only one way to make full backups, and that is by installing ADB on a computer and then executing some ADB commands from the command line when the ADB is installed. A custom recovery environment offers what is called an NANDroid Backup, and it is built into just about every custom recovery that is worth installing.
Team Win’s TWRP certainly has it and with the tap of a button you have backed up everything that is on the device. There’s no need to install any apps from the Google Play Store like Helium to help you backup the application data that is often so annoyingly difficult to backup. What is more, a custom recovery partition like TWRP that offers the NANDroid Backup option can also be paired with the NANDroid Manager  application that is available for rooted Android users. The NANDroid Manager can allow you to restore single partitions of data at a time whereas restoring a traditional NANDroid Backup from the custom recovery itself would result in all data being restored. That means you can restore the apps and no restore anything else for example if you install the NANDroid Manager app.
- The following guide is only made for the Sony Xperia M4 Aqua smartphone. Do not use the same files that are available in this guide on any other device or it will get bricked.
- You must have a computer that is running on the Windows operating system to follow this guide and install a custom recovery on the Sony Xperia M4 Aqua smartphone.
BEFORE WE BEGIN
- Unlock the Developer Options menu  on the Sony Xperia M4 Aqua smartphone and the enable the USB Debugging Mode  so you can make changes to the Android software when it is connected to the computer with the USB cable.
- Make sure you install the Universal Windows ADB Driver  on the computer if your computer does not have it installed already.
HOW TO INSTALL TWRP RECOVERY ON SONY XPERIA M4 AQUA E2312
- Download the TWRP for the E2312  model numbered variant of the Xperia M4 Aqua smartphone.
- Download the boot image  for the M4 Aqua smartphone that is needed to become the root user on the phone.
- Set up ADB on the Windows computer  and then come back to this guide and continue with the rest.
- Copy the TWRP file over to the same folder as the ADB and then extract the TWRP to that folder so that everything is available from the same directory.
- Extract the boot image file ot the same folder.
- Connect the Sony Xperia M4 Aqua E2312 smartphone to the computer with the USB cable.
- Open the ADB and TWRP folder and hold the Shift key while right-clicking the mouse where there are no files in the folder and where it is showing the white background to bring up a new menu.
- Select the option to open a new command window here from the menu that pops up on the screen.
- Type the command: “adb reboot bootloader” to get your Xperia M4 Aqua into the bootloader mode and ready for the custom recovery flashing.
- Type the command: “fastboot flash recovery recovery.img” and the custom recovery you wanted to install gets flashed.
- Type the command: “fastboot reboot” and wait for the smartphone to shut down.
- Restart the Sony Xperia M4 Aqua E2312 smartphone and have the command prompt window open still for typing some more commands.
- Type the command: “fastboot flash boot boot.img” to get the boot image flashed.
- Type the command: “fastboot reboot” and your Sony Xperia M4 Aqua smartphone is now rooted and has the custom recovery installed.
In conclusion, that is how to install TWRP Recovery and then get root on Sony Xperia M4 Aqua E2312 smartphones by flashing the recovery image using ADB on a Windows computer.