yashsingh1/xdaforums huggingface dataset:
[Sony Xperia M2] nemanja.bgd:
1. Install and root 4.4.4(best use Kingroot 4.5.0)

2. Install Philz Touch recovery for locked bootloader http://xdaforums.com/xperia-m2/general/d2303-philz-touch-recovery-6-t3047492

3. In recovery flash 18.6.A.0.175_Prerooted_DE http://www.mediafire.com/download/dfmt7bgw93z96ug/18.6.A.0.175_Prerooted_DE.zip (it should take at least 5 minutes, maybe even longer, if its done in less than that flash it again without leaving recovery or you will get bootloop), wipe cash,dalvik and data, then flash again separatly SuperSU https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip

4. Reboot system. If you stuck on xperia logo, just turn off phone using pin hole and turn on (if evereything is ok you should see "android is optimizing apps"). After boot (enable usb debugging) run RIC killer (thanks to [MENTION=5952360]AleksJ[/MENTION]) https://docs.google.com/uc?authuser=0&id=0B1k2IwBoVgfFd293MHJaUkp6Qms&export=download

5. Using Flashtool flash 18.6.A.0.175_other (this is basically original 18.6.A.0.175 firmware with system.sin and kernel.sin excluded) http://www.mediafire.com/download/0zpxxkk238ua91u/D2303_Customized_DE_Other_18.6.A.0.175.ftf with or without wiping data appslog and cashe

6. Enjoy

I did this about 5 times so far, and it works 100% if you follow the steps.

Firmware used here is clean customized DE for D2303, without any bloatware.

Backup your data, there is always chance that something will go wrong.

I hope that someone will find better and faster way fot this, but for now this is the only working way.

For those who want to make their own prerooted flashable zip:

Just download PRF creator http://xdaforums.com/crossdevice-dev/sony/tool-prfcreator-easily-create-pre-t2859904 and just chose firmware file, SuperSU and check just kernel (you can also check all boxes, but thats the way i like to do because i prefer flashing rest of firmware using flashtool(everything else except system and kernel)).
[Sony Xperia M2] aidy.lucas:
Tried it half a dozen times doesn't work nothing but bootloops

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] nemanja.bgd:
It works, i'm rooted and i can mount system and delete files from it. Now we need recevery for locked bootloader that works on 5.1.1
[Sony Xperia M2] linuxct:
This didn't work for me either. That's why I looked for a UBL solution...
[Sony Xperia M2] aidy.lucas:
I'm gutted waited all this time for a update that's no good as there's no xposed and probably never will be t2u are in the same boat

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] Jimmy Thrashmetal:
Works like a charm

Absolutely working, I only use the ric disabler, I did by myself the other process before read this thread.

Thanks a lot, thanks pressed
[Sony Xperia M2] Laura158:
What's about 18.6.A.0.175_other? I'm using D2305, can i flash this file for my phone?
[Sony Xperia M2] Soyjuan08:
pueden publlicar solo el zip del root para intalarlo directamente los que tenemos el bootloader desbloqueado usando el recovery de jellybean cwm
[Sony Xperia M2] nemanja.bgd:
No, do not flash that on d2305. 18.6.a.0.175_other contains everything except system.sin and kernel.sin, safer way to flash them with flashtool than using recovery, thats all.
[Sony Xperia M2] DARK_XPERIA:
Hello and thanks for your post.... This rom working Only for locked bootloader?
[Sony Xperia M2] Dzepar:
It's not rom, it's way to root new 5.1.1 firmware for Locked Bootloader. ;)
[Sony Xperia M2] DARK_XPERIA:
You have right... Sorry.. If You know what can i do about for unlocked bootloader?

:confused:
[Sony Xperia M2] galaxyfreak:
There's another thread with unlocked bootloader instructions in this very same section.

Poslano s D6603 putem XDA Forums
[Sony Xperia M2] Laura158:
Can i flash normal FTF with tick like this
[Sony Xperia M2] khronos_one:
with Lollipop "custom IT" firmware (downloaded into XperiFirm), Flashtool 0.9.19.8 give me the error "Those data will not be flashed : unit 00000907, TA unit 0000091A. Do you want to continue?" in the starting step of backup TA partition.

in internet the only resource is a XDA page into Z3 forum with the same problem and no solution.

i'm waiting for carrier customized firmware, then. but.... :(

:D
[Sony Xperia M2] gordonthegopher:
Is there a way of getting this working on a D2403 Aqua with a locked bootloader?
[Sony Xperia M2] nemanja.bgd:
Yes, but you could also exclide cust-reset and fota-reset, no need for that.

Yes, its easy to make prerooted firmware, download ftf of your choice, use PFR creator, add only SuperSU and check only kernel. After clashing and booting up run ric killer and then us8ng flashtool flash rest of firmware, its safer.
[Sony Xperia M2] gala174:
Install 4.4.4 I'm confused, sorry

I have to go back to version 4.4.4 because I'm on 5.1.1, I don't know how to do

That, I have to use the flashtool, which version of 4.4.4 I have to use, because I saw there is the prerooted version and its file is zip not ftf. And I'm confused, you mentioned also kingroot. I have locked bootloader and I want to root my phone, it's useless without rooting it!!!
[Sony Xperia M2] aidy.lucas:
Kingroot is the last thing you should be using to root your phone

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] gordonthegopher:
So, on Vodafone UK, I download the FTF, use PFR creator to add SuperSU and check kernel, run RIC killer. I understand that. How do I flash the rest of the firmware? Just flash the original unmodified FTF I downloaded?
[Sony Xperia M2] AleksJ:
Yes it should work, but without su daemon some applications are not working properly like ES File Explorer.

For "full" root 99SuperSUDaemon should be copied into /etc/int.d/ directory via adb.
[Sony Xperia M2] Miche1asso:
I followed a similar method, but I get boot loop as well (Hungarian Vodafone ROM):

- Extracted system_*.ext4 from system_*.sin with Flashtool

- Mounted the image as an ext4 partition

- rooted the image and made a tar file

- downgraded to rooted 4.4.4 with recovery (which failed to start. I had to delete /dev/recoverycheck and then it worked. Not sure why)

- Booted in recovery

- formatted /system

- untar via adb (and that's via I needed it working via USB :D) os system.tar in /system

- I flashed the 5.1.1 kernel and of the other pieces back

Bootlook after the Xperia logo. with adb not connecting so I don't even have a clue about what's going on. Unless I messed up badly but the logs in terminal seem fine. The files are not signed or else in Lollipop, are they?

PS: Is it normal to spend 30-40 minutes to flash system.sin with Flashtool?
[Sony Xperia M2] aidy.lucas:
No I have no joy either, can't even get lollipop to boot up period never mind root.

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] Miche1asso:
Really? I've been lucky on that side. I flashed it few times now, never had an issue. With or without erasing the data partition (I kept it after doing a full restore of my data with Titanium backup in KitKat). Oh, i see now that it started the configuration wizard (I know for certain it doesn't like the downgrades). All my apps fortunately are still there.

I have very high IO Waits, though. Talking about 50%. The battery in stand-by with Stamina mode instead is just great.

Just one curiosity: did anyone else notice that it implements.. the swap memory?

shell@D2303:/data/local/tmp $ busybox free
total used free shared buffers
Mem: 885076 782228 102848 0 3440
-/+ buffers: 778788 106288
Swap: 458748 251476 207272
[Sony Xperia M2] nemanja.bgd:
You dont need to extract system.ext4 from system.sin. Just download PRF creator http://xdaforums.com/cros...e-pre-t2859904 and just chose firmware FTF file, SuperSU and check just kernel (you can also check all boxes, but thats the way i like to do because i prefer flashing rest of firmware using flashtool(everything else except system and kernel)). It takes about 5-6 minutes, no less, but 30-40 minutes is not normal.
[Sony Xperia M2] gordonthegopher:
So just to confirm, for Step 5 I flash the original FTF with Flashtool but untick system and kernel?
[Sony Xperia M2] nemanja.bgd:
Yes. Original 18.6.A.0.175.
[Sony Xperia M2] gordonthegopher:
Sorry I should say exclude rather than untick (as in tick exclude). Gets confusing.
[Sony Xperia M2] Miche1asso:
I know. But I am on OS X and it ins't supported. And to install Windows is not an option. :D

Then I wanted to see it by myself, to have control on it. Still, to flash a PRF file don't you have to go through recovery anyway? I dunno, I checked the thread only a bit. To restore the system's tar took few minutes indeed. My issue is with Flashtool and system (nearly 2GB). To downgrade to KK and in case anything goes wrong to flash Lollipop again is a real pain. the other sin files flash much faster being much smaller.

The question remains, though: why to some it works and the rest of us get boot loops?
[Sony Xperia M2] gordonthegopher:
I'm on Linux and run Windows in Virtualbox (you can on a Mac too). I used the VM to root 4.4.4 and it worked fine, might be an option for you.
[Sony Xperia M2] aidy.lucas:
I've give up, kk it is by the looks of it constant bootloops is all I get.

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] Miche1asso:
Yeah, I have a Windows 7 virtual machine. But then it is a pain to load it, I am short on RAM. But again, what I did manually isn't much different than what the PRF creator does. I compared the system image with the one in the phone file to file and the size of the directories. they look the same to me. The files added for rooting shouldn't cause the bootloop either, since it is immediate and doesn't reach adbd either (unless of some tricky security crap). Basically what I am doing manually is what the CWM recovery does when doing a NAND restore of a rooted tar image.

I'm puzzled about this. Did you wipe the data and all (stupid question, I know. But better checking)? If the phone is wiped i don' see many reasons why it shouldn't boot with a fresh installation. Which after all is the same issue I have above. Unless at boot it checks if the phone code number is the same.
[Sony Xperia M2] Miche1asso:
Meh.. I've seen in the first post that there is a specific rooting for Lollipop (obviously). I tried flashing the rooting zip file after flashing /system, but nothing, boot loop at the very beginning. I give up. I'll try with the PRF creator in a virtual machine once I download the Italian ROM.
[Sony Xperia M2] aidy.lucas:
Yep, wiped data and cache always do when using flashtool. Still having no luck come close to stomping on the bloody thing

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] dark90:
i do that with XZdualrecovery T2U on my D2306 and i have the twrp recovery working on 5.1.1 (dont kill me if you dont believe) and when i connect in recovery to my pc it say i have a a T2U :rolleyes: but it work great on D2306 even the TA partition backup
[Sony Xperia M2] linuxct:
I think I already told ya on YouTube about the insecurity of this :)
[Sony Xperia M2] Miche1asso:
I don't know. Maybe your best option is to rebuild the phone with PCC and then flash a ROM from your Country if any is available. I'd also suggest to remove the SIM card and SD card before booting. Oh, and don't use the last Flashtool, stick with 0.9.18.6 (better being safe than sorry). Other than that I really don't know what else to suggest.
[Sony Xperia M2] linuxct:
I have a friend with your exact problem too. His phone is from Telefonica (equivalent to O2), locked and he can't flash ANY Lollipop FTF, all of them get stuck in 'Android is booting' screen. I think that Sony messed up with some models... He is waiting for Telefonica OTA to see if it works or not...
[Sony Xperia M2] aidy.lucas:
It's not flashtool as it's the older version with no problems and it flashes jb kk no problems at all. I could ota it if I want rooted as I had the email from Sony saying it's in the update centre but still on. 15 and rooted ect I'm gonna have one last go I think using the latest prf and using nuts dual recovery for t2u instead can't be any more insecure than rooting in the first place it's the no xposed that's the killer Xperia xposed is the whole reason I rooted in the first place

D2303,18.3.1.C.1.15 kk, deodexed, debloated, rooted, philz touch recovery, bravia engine 2+x-reality+z3 super vivid, viper audio, xposed mods.
[Sony Xperia M2] Miche1asso:
Well, personally I root it because without rooting Android really feels like a jail. And Google is removing everyday more permissions. We can't check the battery/processes stats, we can't do a proper backup, the SD card is nearly useless (I mean, we can't install the obb on it? Really? Not to mention that moving the apps in the SD card only saves few MB), I get spammed by full page ads (and with no option to report them). Not to mention that AdAway also gives a (full) protection from malicious sites. At least Google could provide a blacklist for those. And then, sure. It takes aways the freedom to do things as we like.

The problem is that it can get only "worse". Now with the phones used as credit cards sure rooting isn't an option. Unless of unlocking the bootloader, sure. But for regular users (the majority) rooting is a high security vulnerability. It has been removed even in the last release of OS X, El Capitan (although there are supported ways to enable it back, but i didn't follow it much yet).
[Sony Xperia M2] aidy.lucas:
"i do that with XZdualrecovery T2U on my D2306 and i have the twrp recovery working on 5.1.1 (dont kill me if you dont believe) and when i connect in recovery to my pc it say i have a a T2U but it work great on D2306 even the TA partition backup"

so do i add nuts recovery to the prf zip or install it after flashing przip
[Sony Xperia M2] dark90:
I Just Added to the prf
[Sony Xperia M2] Kessie:
Hi, I am new here can someone clarify step 3. to me? How do I flash in recovery? Am I supposed to have phone connected to PC all the time or what are the steps? Then I do not understand "wipe cash,dalvik and data, then flash again separatly SuperSU" am I supposed to do that only if the first flash will last shorter than 5 mins? What is "wipe cash, dalvik and data"? How to flash separately SuperSU? Next, in the second reply here http://xdaforums.com/xperia-m2/general/d2303-philz-touch-recovery-6-t3047492 is something about RIC disabling if I do that there do I have to do that again in step 4. or not?

And as long as I am already writing here some quick steps on how to use flashtool would be great. It has more functions than I need and I am quite noob in all the terminology there.

I am sorry for maybe stupid questions, but as I said I am new here and to the world of rooting, flashing etc. and I do not want to break my phone because I do not have another. Anyway Thanks in advance to anyone that will help. :)
[Sony Xperia M2] akatll:
RIC Killer link dowload die, :(( please fix that, thank so lot
[Sony Xperia M2] quake73:
here it is again:

https://onedrive.live.com/redir?resid=A8E8D2CE3C5C608!10430&authkey=!AB2B_I6K_DlgH4Q&ithint=file,zip
[Sony Xperia M2] :
Any recovery aviable for UBL 5.1.1?
[Sony Xperia M2] quake73:
erikcas':

https://www.androidfilehost.com/?w=files&flid=24287
[Sony Xperia M2] aidy.lucas:
Hooray praise the Lord, got it to work I removed xposed and used latest prf creator, customised ncb ftf beta version supersu and nuts t2u dual recovery now have full root r/w access and recovery on locked bootloader. I think it may of had something to do with my ageing Sony viao laptop running out of room on its harddrive aswell as once I made a bit of room it was fine.
[Sony Xperia M2] :
I missed it sorry, i need it for LBL (Locked)
[Sony Xperia M2] linuxct:
I don't like using a T2u recovery on the M2. We can't be 100% sure it won't mess up something and end in a softbrick, making you flash the FTF again.

Those who are taking the risk, take care of what you touch or it can lead in flashing again the FTF. This is not a safe solution, yet.
[Sony Xperia M2] aidy.lucas:
Working perfectly fine here now I finally got it to work. Took me long enough but so far so good even the camera is ok I think only thing missing is Xperia xposed but suppose I'll have to live with it for now
[Sony Xperia M2] harisyks:
Hey, sorry but can you please tell me if the camera was bad quality after your first flashing 5.1.1 and did the prerooted method flashing fix that? Also, can you tell me exactly how did you get the prerooted method flashing to work because I also get bootloops? Thanks in advance :)
[Sony Xperia M2] aidy.lucas:
Seems ok so far

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] harisyks:
Can you post a full resolution photo, please?
[Sony Xperia M2] nemanja.bgd:
We only have to wait for working deodex tool. Once there is one to deodex services.odex, i think that Xposed will work perfectly.
[Sony Xperia M2] gordonthegopher:
So to clarify, if you follow the OP you lose custom recovery, unless you use the T2U dual recovery which [MENTION=4787101]linuxct[/MENTION] doesn't recommend as it's technically not for our device and could cause a soft brick?
[Sony Xperia M2] aidy.lucas:
I had root n recovery on kk, I made a pre rooted zip using latest version v1.1 prf creator I used customised NCB ftf beta version of supersu and a flashable version of nuts t2u dual recovery. Wiped cache wiped dalvik cache then cleaned for installation of new rom then whilst still in recovery flashed the pre-rooted zip then once finished I flashed beta version of supersu again then rebooted and let it boot. Then after a couple of goes got ric killed with the ric killer and used the installer version of nuts recovery to install the recovery again. Yes I know it's not ideal but the t2u is more or less identical internally so far so good even my camera is ok so at the minute I'm happy

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] harisyks:
Again, please, what do you mean camera is ok? Btw, I installed and have root but the camera quality is still poor like before. Can you upload a full resolution photo?
[Sony Xperia M2] aidy.lucas:
Both taken on 5.1 customised NCB ftf

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] molnartibor:
those are still very small pics. can you post fullres please? thx
[Sony Xperia M2] harisyks:
Still small pictures. If the upload on xda is not working well, can you upload the pics on some photo upload page and post the links? Because, if I can see well, the quality on your is still bad.
[Sony Xperia M2] dark90:
? you did a lot of things, i Just flashed the prerooted and it give me full root and recovery ?
[Sony Xperia M2] aidy.lucas:
I on my phone that's as big as they get but from some of the bad pictures I've seen from lollipop so far today these seem ok some are that bad you don't even need to click on the picture to see the poor quality pixilated mess

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] Miche1asso:
Yes!! I AM ROOTED!!! God bless ya all!! lol

I downloaded the Custom IT FTF for my Italian phone and made a PRF file in a Windows virtual machine (the pain! A constant beach ball even after closing Safari) choosing kernel and the rooting zip, obviously downgraded to KK and rooted it and installed the triple recovery.

I noticed that after flashing the PRF via recovery (Philz, though. I never used the TWRP before) the root zip didn't start. So I flashed it manually. And.. it worked!!! I disabled the ric as well with the [MENTION=5952360]AleksJ[/MENTION] script, obviously (whom must be thanked twice for the new binary and the recovery).

Oh, I am so looking forward to enable AdAway to send all that spam in /dev/null and to install a script to move all apps into a second partition in the SD card!! :D
[Sony Xperia M2] aidy.lucas:
Did you use nuts dual recovery?

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] FunSucker:
Maybe this method not compatible with d2302 LBL.

Step by step , finished with no problem. But, after flashing to 5.1.1, i cant mount the system partition.

But supersu still installed.

Can you help me, anyone?
[Sony Xperia M2] Laura158:
Can I add RICDefeat.zip [MENTION=5952360]AleksJ[/MENTION] into pre-rooted rom? than don't run RIC killer in 4. step?
[Sony Xperia M2] Dzepar:
Probably you missed step 4.

You need to run RIC disabler so you can mount system.

Good Luck.

Xperia M2 D2303 on LP 5.1.1
[Sony Xperia M2] aidy.lucas:
No as it's not a flashable version it is a pc job

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] Miche1asso:
Huh? Nuts? I don't even know it. Nope, I installed in KK the one from [MENTION=5952360]AleksJ[/MENTION]:

http://xdaforums.com/xperia-m2/general/d2303-philz-touch-recovery-6-t3047492

In Lollipop I have no recovery at the moment. Which is bad since it is obviously needed for the next updates (unless of downgrading to KK for each update). Is there any recovery working already for the D2303?

Anyway, I've seen now how PRF creator works. It makes a zip file with system.sin, boot.sin and partition.sin plus whatever gets selected and it has the tools to flash the .sin files as they are (and so keeping all the info about the current version, which sure was missing when I tried to flash a tar file). As in a local Flashtool (but from Linux and not from Flash mode). Then it should flash any additional .zip file, but in my case for the rooting zip it failed. Still anything can be flashed later from the same recovery as long as one doesn't reboot (at that point the recovery has gone since /system has been replaced).
[Sony Xperia M2] FunSucker:
When im running on 4.4.4, 1-2 month, i kill RIC use "sony RIC killer". I got that in z2 thread (i dont know that is same with RIC Disabler or different) and work fully for me. So i used that tool again yesterday, sir.

I'll try using RIC Disabler tonight and report.

Second question :

after flashing pre-rooted 5.1, my device working normally, should i still flashing again via flashtool (exclude system.sin & kernel.sin) sir?!

Thanks for advance :)
[Sony Xperia M2] aidy.lucas:
I just flashed the pre-rooted zip made with PRFCreator no need to flash rest of ftf via flashtool.

D2303 customised NCB 5.1 full root with nuts t2u dual recovery
[Sony Xperia M2] GioKupreishvili:
Hi, Does Your Method Will Work On M2 D2403 Version?
[Sony Xperia M2] nemanja.bgd:
You should flash the rest, there is baseband and some other things.
[Sony Xperia M2] AleksJ:
Use ric_disabler-flashable.zip to integrate into pre-rooted flashable.zip.

Or ric_disabler.zip for Windows command-line interpreter.
[Sony Xperia M2] :
5th step needed? Because i've done 4 step, and i have full root now.
[Sony Xperia M2] Engineer91:
Flashing prerooted zip only takes a few seconds, obviously it isn't flashing it properly. I'm using philz touch recovery, can flash prerooted KK rom without any problem, but LP doesn't work for me.
[Sony Xperia M2] nemanja.bgd:
It takes abou 5 minutes, because it contains sin files, not ext4, and flashing sin files takes longer just like on flashtool.
[Sony Xperia M2] Engineer91:
It finally worked using TWRP instead of Philz Touch.
[Sony Xperia M2] gala174:
No need to do all these steps

I rooted fully only with using a prerooted room 5.1.1. Not this one, the one on this thread didnt work for me that's all.I made my own prerooted room, I have everything now like kitkat. :D
[Sony Xperia M2] harold3211:
How about the camera quality? Is it the same quality like kk? Can you upload the rom you made please :D