[Sony Xperia M4 Aqua] sticks_el:
How to get Android 7.1.1 working on E2303 - Update: April 2018

Hi,

i have spent days to finally get my own Sony Xperia M4 Aqua E2303 updated to Android 7.1.1 and it was a pain in the a**. (Android 7.1.1 is in early dev state for the Aqua M4, so e.g. there is no working camera and no working speaker/audio)

Now i write some tips in thread to help others because this thread is the first one the google search found when i looked for E2303 bootloop. ;)

Most time i was stuck in the endless bootloop, too, after i tried to update the 7.1.1. android rom. (Today i have discovered this is because i tried updating from Sony's Android 5.0 stock rom (26.1.A.3.111) to Android 7.1.1, but i have to flash the Sony Android 6.0.1 stock rom first (26.3.A.0.131) prior updating to Android 7.1.1.

After i had the 6.0.1 stock rom installed, i never had the boot loop again. (Expert tip: Prior updating to 6.0.1 stock rom, the sony boot logo was white letters on a black screen, after flashing 6.0.1 stock rom, it's black sony letters on a white background.

Just to mention, the flash of the latest stock rom i have done with the software "Flashtool 0.9.24.4" in so called flashmode.

Expert tip: Always turn on "usb debugging" in developer options

The bootloader of the Xperia M4 Aqua E2303 is locked by default, but Sony have a special developer website where you can generate your personalized unlock code after entering your phone's IMEI number.

I tried unlocking the locked sony bootloader with "fastboot", but no luck (error message was something like command not allowed/unknown remote command). - I also tried unlocking the bootloader with Flashtool, but also no luck at first (some kind of oem error message)

But then i found a hint on some web forum, where was described that i have to create a new folder with my 10-character phone serial number and my personal bootloader unlock code (i get from sony's dev page) in a text file in the path C:\Users\<Your Username>\.flashTool\registeredDevices\<Serial number of your device>\ulcode.txt

So for example i created the folder "YT9114CNHN" under C:\Users\Thomas\.flashTool\registeredDevices\YT9114CNHN\ and there i generated a textfile which is called ulcode.txt and has only my personal unlock code from sony's developers page in it, lets say E8D20BE5BAC1E27C .

With that folder the bootloader unlock with flashtool was no problem at all, and i had an unlocked bootloader. (Just to mention: Do not copy my file paths, your needed file paths will differ)

I also managed to install TWRP in version 3.2.1-0 with "fastboot"-tool. Downloaded a twrp-recovery-image 3.2.1-0 for my Xperia M4 E2303 and flashed it with the command "fastboot flash recovery recovery.img".

After that i was able to boot directly to TWRP.

There are also some "keyboard shortcuts" you have to know when working with Sony M4 Aqua:

Fastboot-Mode:

Device has to be powered off. Then press and hold "Volume up" when attaching a usb cable to start fastboot mode. The LED should light up in a blue color. (Drivers for fastboot mode must be installed inside windows, there should be no question marks in device manager)

Flashmode: (whenever you think you have bricked your device you can flash stock rom with flashtool and it comes back to live again)

Device has to be powered off. Then press and hold "Volume down" when attaching a usb cable to start flashmode. The LED should light up in a green color. (Drivers for flashmode must be installed inside windows, , there should be no question marks in device manager)

Boot to recovery (After TWRP was installed)

Device has to be powered off and absolutely NO usb cable should be attached to the phone. Press and hold volume down while you press power button until display comes on. Do not press power any more, but still hold "volume down" until you see TWRP boot screen.

After that is is simple: Wipe -> Advanced Wipe -> Wipe everything (data, system, cache,) and install the latest 7.1.1 zip, in my case this was tulip-ota-eng.e2303-7.1.1-NOF26V-20170217.zip . After installing cleas dalvik & cache and reboot. - Now Android 7.1.1 should load, but it will take a while, long boot time...