[Sony Xperia M4 Aqua] cmstew:
If you're having problems with random reboots after following this procedure please check the very end of this post!

Sure thing friend. :)

I'm going to assume you meant 2303 correct? If it is indeed a 2203 like you say, you don't have an xperia m4 aqua. You have an xperia e3 and you'll have to go get support in another thread.

ADB, Fastboot, Drivers

First you'll need to make sure you have ADB, Fastboot and Drivers to interact with your android device.

The easiest way is to follow this guide to get all of those: http://xdaforums.com/showthread.php?p=48915118#post48915118

Downgrade Firmware

1. First get yourself firmware version 26.1.A.1.128 for your variation. You can probably find your firmware at this link: http://xdaforums.com/m4-aqua/general/stock-xperia-m4-aqua-xperia-m4-aqua-dual-t3141061 (Get the 26.1.A.1.128 version or any firmware that has xx.x.x.1.xxx! The x's can be anything but the 1 is important)

2. Once you have that, you'll need to make sure you have a program called FlashTool.

Download: http://www.flashtool.net/downloads.php

Open it and click the lightning bolt in the top left and make sure flashmode is selected and click okay. Then click the 3 dot's button in the top right of the window that pops up and browse to the folder that your FTF file is located. Then choose the ftf file. check both options under wipe. If you see any .ta files in the firmware content area, make sure you exclude them. Then Press OK.

3. Unplug your phone (if it's not already) and turn it off. Now, plug the one side of the cord into the computer with the other side not connected to your phone yet. Then hold down the volume down button while plugging in the other end of the cord. sometimes you get a popup asking about a script file. just click okay and let it proceed.

4. once this whole bit is done. You have downgraded your firmware.

Installing Root on downgraded firmware

1. Download this rootkit file:

https://www.dropbox.com/s/edse0h6b02odzn1/rootkitXperia_E23xx.zip?dl=0

2. Extract it.

3. make sure USB debugging is turned on in your phone settings. Go to settings. Tap about phone a whole bunch of times till it says you're a developer. Then go back and just above about phone should be another section called something like development. click that and scroll down and find a checkbox that says something like enable usb debugging. Click it and you're ready to root.

4. Now run install.bat in the rootkit folder. If your phone asks you a question about permissions, just click allow.

5. your phone should restart and you should now see the SuperSu app in your app drawer. If you don't see it, try installing the root again.

Installing Custom Recovery on any firmware with root

1. Download this recovery install file:

https://www.dropbox.com/s/yomdwq3p2le9hvi/M4Aqua-lockedTWRP-0.1-installer.zip?dl=0

2. Extract it

3. run install.bat

4. your phone should ask about root privileges for ADB. Sometimes it takes awhile to pop up. Just click allow.

4. your phone wont restart with this one but you should now have a custom recovery

Booting into the custom recovery

1. Turn off your phone and unplug it from your computer

2. Now turn your phone on

3. When you feel it vibrate and see the notification light turn blue (sometime while it says sony on the screen) press the volume down button and hold it.

4. You should now be booted into the custom recovery

Installing the latest version of android while keeping root

1. Download this file below:

https://www.dropbox.com/s/z0tgziwx8epdu38/twrp_prerooted_M4.zip?dl=0

2. Extract it

3. Download 7 zip from the below link:

http://www.7-zip.org/

choose if you're 64 or 32 bit system.

4. Install 7 zip

5. Make sure you have an FTF file of the version of android you want to upgrade to. (probably whatever version you were running before all of this)

6. Open the ftf file in 7 zip and drag the system.sin and kernel.sin file out of it onto your desktop

7. now open flashtool again.

8. Choose the advaced menu item and click Sin Editor

9. Browse to where you put the .sin files and repeat these next steps for each one.

9a. click on the .sin file and click open.

9b. Then click extract data

9c. the extracted file should be in the same location as your original file. (repeat this step to extract other sin files)

10. Once you have kernel.elf and system.ext4 copy them into your twrp_prerooted_M4 folder

11. Then select everything in the folder and right click on them and click Add to zip...

12. It should open a window that has a bunch of settings. Don't worry about most of them but just make sure that you have the compression level set to 'store' and the type set to zip. Then compress it.

13. now make sure your phone is plugged into your computer and still in recovery mode.

14. transfer your newly created zip file over to the sd card of your phone

15. on your phone in the recovery, click install and browse to where the zip file is. Select it and install it.

16. Reboot your phone and you should now be on the latest firmware with root.

17. after your phone reboots, you will have lost your recovery so go back and install the recovery like i mentioned before if you still want it.

That's it. I hope this was clear enough for you. If you have any questions, feel free to PM me for more clarification. :)

Fixing Random Reboots - New Information

There is a guy in the general forums named [MENTION=3049254]thewailer[/MENTION] that seems to have come up with a solution to the random reboot problem. I'm currently trying it out and it seems to be holding up so far.

Check out his guide over here: http://xdaforums.com/m4-aqua/general/guide-fixing-random-gplay-app-install-t3338362