[Sony Xperia M2] linuxct:
Hello guys!

Today I'm bringing you a tutorial on how to achieve root permissions on the Xperia M2 with Android 5.1.1 Lollipop. As of right now, this is only available for UNLOCKED BOOTLOADERS, so those with LBL have to wait a little more until I find a suitable solution.

What do we need?

Upgrade your bootloader using this guide.

My ADB pack.

My modded TWRP for unlocked bootloaders.

Ric Disabler by my friend [MENTION=5952360]AleksJ[/MENTION] [MIRROR]

The procedure:

First, flash Lollipop if you didn't flash it before. Once done, upgrade your bootloader using Emma or the FTF I linked before.

WARNING:

If you updated your bootloader BEFORE FLASHING LOLLIPOP, you MUST upgrade it again since Lollipop FTF overwrites it.

Now, turn on the phone, go to Settings, Info. about the device, and tap 7~8 times the Compilation Number. This will un-hide the developer options. Press back button once and go inside the Dev. Options. Now turn them on if they were off, and enable USB Debbuging. Now turn off your phone.

Now, unzip my ADB Pack 'Herramientas-de-flasheo.zip', which contains basic ADB and Fastboot executables to a folder in your desktop. Also, copy the TWRP Recovery .img you downloaded to that folder.

Put your phone in Fastboot mode, this means, while pressing and holding the Vol+ button, connect the USB cable. Once the Led goes blue, stop pressing it.

Now, execute the following keyboard shortcut (Win+R) and type inside the Run prompt CMD. Inside the Command Prompt, using CD (change directory), navigate to the folder you created in the desktop. It'll be something like...

cd C:\Users\linuxct\Desktop\adbpack\

Now, execute the following command:

fastboot flash recovery [COLOR="DarkOrchid"]RECOVERY-TWRP-2.8.7.0-D230X_D240X-UPDATED-THEME[/COLOR].img

Once it finishes, disconnect the USB cable. Now, to enter into the recovery, press and hold the volume down button, and while you're holding it, press and hold the Power button until it vibrates. When you see the

BIG

Sony logo,

stop holding the Vol- Button

.

This will load Erikcas TWRP. After few seconds, it'll ask you to allow /system modifications, so slide it to allow modifications. Now navigate to

Reboot

, and choose

System

. In a moment or so it'll ask you if you want to root your device. To do that, slide again.

The device will reboot in a few seconds. When it's succesfully booted up, go to the App Drawer and look for 'SuperSU Installer'. Open it and hit the 'Play' button. This will open SuperSU in Google Play. Now update SuperSU.

When it's done updating [

Don't open SuperSU yet!

], unzip the Ric Disabler from AleksJ in your PC, and open the Install.bat OR Use the following Bash Script if you're on Linux, thanks to [MENTION=7003729]luichi[/MENTION]. Once it's opened, connect again your device via USB. In the M2, the script will prompt a question about USB Debbuging key. Tick the 'Remember this PC' checkbox and hit Allow. After some secs, it'll ask you for root permissions, so hit Allow.

In a while, when in CMD it says 'Press any key to continue', disconnect your cable and open SuperSU in your device. Now it'll ask you about updating su binary. Hit Update, and then hit on 'Normal' method.

And that's it! Enjoy your Lollipoped device with Root! :D

Don't forget to hit the thanks button and thank all people mentioned in this post too!