yashsingh1/xdaforums huggingface dataset:
[Sony Xperia M2] Miche1asso:
Weird. Also because if Flashtool says that adb debugging is off easyroot as well shouldn't be able to connect. One thing you may try, if you'll ever root it again (or if you want to test it) is to try to run

adb kill-server
adb start-server

Before starting rootkitXperia. That is what easyroot does before doing all adb operations. Still, it makes little sense to me.

Isn't that just a matter of setting the executable permissions for the install_tool.bat file in Windows? I think it's done selecting the file and opening its properties. Then in the permission (or whatever it's called) tab enable the execution. The rootkitXperia author probably compressed the files from Linux or OSX. In that case the permissions should get lost.
[Sony Xperia M2] nlooooo:
I also tried with 'adb kill-server' and got the same.

Sorry, my mistake, I didn't have problems with install.bat, but with install_tool.sh (trying to run adb shell "su -c /data/local/tmp/install_tool.sh") where I got permission denied on the device.
[Sony Xperia M2] Miche1asso:
No, I don't understand. I would need the whole setup (phone+PC. I know, just saying) to work it out. Also because it works for other people with Windows. As well as checking easyroot again it doesn't seem to use its own adb, but the one already installed in Windows. Unless I missed something (or I have a different version). But Flashtool reports that the adb debugging isn't allowed either so.. I'm lost.

Regarding install_tool.sh if rootkitXperia couldn't connect the file(s) simply shouldn't be there. adb couldn't transfer them. I mean, the rooting was broken since starting, who knows what's in there after that.
[Sony Xperia M2] nlooooo:
After I rooted my phone using easyroottool I manually copied all scripts from rootxperiakit to data\local and tried to run it, but no success.
[Sony Xperia M2] Miche1asso:
Didi you change the permissions? The install script also runs these commands (with [MENTION=302893]adb[/MENTION] instead of adb in a .bat script):

adb shell "chmod 0755 /data/local/tmp/getroot"
adb shell "chmod 0755 /data/local/tmp/busybox"
adb shell "chmod 0644 /data/local/tmp/ric_disabler_mod.ko"
adb shell "chmod 0755 /data/local/tmp/copymodulecrc"
adb shell "chmod 0755 /data/local/tmp/install_tool.sh"

That makes install_tool.sh (and others) executable. I mean, if it is rooted and the permissions are correct it MUST run. :)
[Sony Xperia M2] nlooooo:
Ok, I can try, but now I have it fixed so I can't see the difference, only if it will work.
[Sony Xperia M2] Miche1asso:
Nah, don't worry. That's Unix 101. Since you copied them manually and it failed the execution permissions most likely weren't there. adb doesn't add them if they are not present. Which is especially true from Windows.
[Sony Xperia M2] nlooooo:
Anyway I tried and lost root (didn't have all files inside the folder), tried to root it turned on with all means (rootxperiakit, easyroottool, flashtool) but had no luck. So, all from beginning, flashed JB kernel and, voilà, rootxperiakit worked like a charm, ran adb shell "su -c /data/local/tmp/install_tool.sh", updated su binary and everything works fine now. I simply don't know why I couldn't use rootxperiakit the first time I tried.

And lessons learned:

Dig, try, fail, dig again, try again, fail again, just be stubborn and you'll succeed.

If you brake something, it's only your fault, if you don't know how to fix it than don't try it.

And the biggest lesson: if you don't know what you are doing, than just don't do it.

For the end (luckily happy end), outstanding tutorial, helped me to use my phone in the right way (just rooted, of course, cause bootloader can't be unlocked). Thanks man I appreciate all the help. :good:
[Sony Xperia M2] Miche1asso:
Sure. I'm glad everything worked fine at the end!
[Sony Xperia M2] Vtrendzzy:
Guys i encountered problem with this

adb shell "su -c /data/local/tmp/install_tool.sh"

I rooted using easyroottool.

How i solved it.

adb shell "su -c /data/local/tmp/installmount.sh"

You've to go at this address in your phone and check the .sh file name. That's it.
[Sony Xperia M2] saibbyweb:
I lost you at "From terminal cd into rootkitXperia directory & launch the script install.bat".

Please, clarify what exactly is going to happen at that point (on WINDOWS).

P.S - If something went wrong, will i able to recover my phone, like if i got stuck at a bootloop forever, will i be able to get the phone back into working condition. Kindly, also mention how to recover D2302 - Kitkat 4.4.4 (in some simple steps) incase anything went wrong with this tutorial. I would love to have a working phone is if it didn't work.

Help would be appreciated.
[Sony Xperia M2] nlooooo:
Start flashtool, connect your phone turned on and select force towelroot from menu.

For the full solution read my post #42.

First, adb server will be started, that rootxperiakit will do some files forcing than executing (with a few errors, don't worry) and at the end it will get stuck at rebooting when it's done. It i get stuck at 'waiting for device' try to read my posts from the tutorial, you'll find the solution using easyroottool.

PS have you red this part of the tutorial:

However only kernel flashing is enough to recover you phone.
[Sony Xperia M2] Miche1asso:
If you used easyroot you can't expect to have the rootkitXperia files like install_tool.sh in there. :)

The guide is for rooting with rootkitXperia. Sure the concept will work with other rooting tools. But one has to check their scripts to know what needs to be executed.

As nlooo said. The recovery procedure was at end of the guide. I'd suggest to flash system as well because if one messes up /system can get dirty. Also it removes any trace of rooting attempts in case anyone is worried about the warranty (which is a fairytale. There is no reason whatsoever why adding anything in /system exploiting a Linux vulnerability should void the warranty. I think the EU had its say on this topic as well).
[Sony Xperia M2] Dzepar:
As i know only unlocking bootloader voids you warranty. I had case (xperia j, gps didn't work) was rooted, service didn't say anything to me, anyway they just flash ftf first to repair it. :)

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] FatherTyrone:
Hey I'm about to go through with the rooting process, wondering if anyone's around that could lend a hand if something goes wrong?
[Sony Xperia M2] nlooooo:
Go on, shoot...
[Sony Xperia M2] FatherTyrone:
Thank you!

It's working, thanks for the reassurance

---------- Post added at 10:34 PM ---------- Previous post was at 10:24 PM ----------

Hello! Thank you so much for this tutorial, I can confirm that SU is up and running and root access can be granted, against my mother's fear of ruining yet another phone... :cool:
[Sony Xperia M2] Danchiman:
Hi, i have used the NO OTA ROOT METHOD, and i have just noticed that my NFC isn't working, mine is the m2 d2305, also when the NFC is ON and i tap another m2 d2305 unrooted both with NFC ON, mine just vibrates sometimes and sometimes it doesn't, does anyone have any solution or any help ?

Thanks anyway and sorry for my english , greetings from argentina
[Sony Xperia M2] FatherTyrone:
NFC Fix

Hey Danchiman, I suggest making a backup on your PC of the data/usf directory and then deleting it from your device, should work. If not, you can restore the backup.

Hope this helps
[Sony Xperia M2] Danchiman:
Thanks for the reply, but i am using root explorer and i cant find that directory, i dont have right now a computer to try it but i want to know the solution, can you be more especific where is that directory ? Or am i doing something wrong ?

Also, what should i find in that directory ? Or it's different in every device the content of the directory ?

Thanks anyway and sorry for my english
[Sony Xperia M2] FatherTyrone:
You should find the data folder as soon as you launch root browser, it's not in any other folder. I've found that some phones don't have the data/usf directory but I can't seem to find a fix, sorry.
[Sony Xperia M2] kristver:
nfc reinstall

Maybe you can try reinstall the nfc app. you can download the official one from sony corporation in google play store, in google play just type "nfc", choose the official one (or an alternative if you want) and install.

greetings from Belgium

xperia M2 android 4.4.4. D2303 rooted
[Sony Xperia M2] Miche1asso:
NFC was giving me weird messages (rooted or else) in the logcat. With the very recent 4.4.4 update they seem to have gone (I just checked once right now, though).

I'd suggest to install the update and see if it gets fixed. Please be aware that the phone must be rooted again. There is no OTA/incremental installer, /system (where the rooting resides) gets fully overwritten.
[Sony Xperia M2] slush-puppy:
Hi guys i have a d2403 bootloader locked. unlock allowed: yes, that i am trying to root.

so i enabled unknown sources

and usb debuging

followed all the steps until the phone bootloops.

when i try to run the command "C:\rootkitxperia\install.bat "i get this "adb server is out of date. killing..."

*checked for google usb driver and removed reinstaled adb

*made sure no other instances of adb running in device manager

Thanks
[Sony Xperia M2] Miche1asso:
I think I've seen that message as well a couple of times. Not sure what generates it. Try to run "adb shell" or "adb logcat" and see if it connects. If/when it does try the rooting again.

Oh, don't mess up with the rooting script to test it. It's only adb acting weird.
[Sony Xperia M2] slush-puppy:
Okey so after some fideling it seems auto driver install is disabled, if i connect my phone normaly adb shell connects

should abd be able to connect to the phone in the terminal when the phone is in flashmode?

it doesn't connect in flashmode

device not found

Thanks
[Sony Xperia M2] Miche1asso:
Not sure what you mean with "auto driver".

adb is part of Android. When you are in flash mode you are in a sort of recovering mode. Not even the kernel is loaded. Thus no, adb doesn't have to connect. Run Flashtool, connect the phone in flash mode and see what Flashtool logs. It's all in the guide.
[Sony Xperia M2] Dzepar:
Auto Driver = when you connect the phone to PC, it automatically search for drivers. ;)

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] slush-puppy:
Thanks Miche1asso and nloooo managed to root and install supersu without any rw or su bin problems (d2403)

*Flashed JB kernal

*used easyrootool to obtain root struggled with rootkit and abd

*then used RIC killer first before installing supersu

*Then followed nloooo's method of forcing supersu via towelroot
[Sony Xperia M2] aidy.lucas:
my m2 is rooted on 4.4.4 i updated ota twice to 18.1.3.c.0.21 keeping root , just had the 4.4.4 18.1.3.c.1.13 update arrive in update centre but it says via pc only. will i lose root doing the update that way if so is it just a case of forcing root with flashtool again.
[Sony Xperia M2] Miche1asso:
Yes. I did it myself a couple of weeks ago.
[Sony Xperia M2] sleepytulog:
I'm reading through all the instructions while waiting for Stock JB to download, and I have a few questions:

- Android version : 4.4.4 / kernel version : 3.4.0-g692ff30-dirty / Build number : 18.3.1.C.1.13

- where do I find the ID on what I'm currently using?

- does this simply mean to launch Command Prompt from the rootkitXperia folder?

Thanks in advance.

---------- Post added at 07:39 AM ---------- Previous post was at 07:22 AM ----------

I am now at the "tricky part" and am getting this when I run install.bat:

'adb' is not recognized as an internal or external command,

operable program or batch file.

Help
[Sony Xperia M2] Dzepar:
Did you install ADB? In preparation there is link, reboot after installing. And don't turn on Flashtool, it makes conflict with cmd if it you run both.

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] Miche1asso:
1. Dial *#*#7378423#*#* (*#*#service#*#* ). Check Service/Info/Software Info/Customization version. The first two numbers (xxxx-yyyy) is the "ID", the customization number. I am not exactly sure how to call it. So I used the Flashtool terminology.

2. Well, yeah. That's a way to do it in Windows I suppose.

3. As Dzepar said. :)
[Sony Xperia M2] aidfarh:
Alternate way to shut down phone

There's an alternate way to shut down the phone other than using the off button near the SIM card slot. Just hold down the volume up button and power button and wait a few seconds. First you'll feel a single vibrate indicating the phone is hard rebooting. Keep holding down the two buttons and a few seconds later you'll feel three consecutive vibrations. Your phone is now shut down and you can release the two buttons.

To me this way is easier since I don't need to find a pin to access the off button. .
[Sony Xperia M2] liviu.alex:
xperia m2 bootloop

Hi. I have a xperia m2 d2303 with a 4.4.2 update. The phone has 2 months, and i buyed from orange uk. Suddently it was go in a bootloop, without any actions on software. I tried to repair with pc Companion, Emma and after that with flashtool. I have downloaded the Ftf files from Xperiafirm and from forums. I instaled only the stock roms (all the versions), but the phone is still in bootloop. I tried to flash with bootloader locked and unlocked. Same thing. I flashed all possible versions of android but nothing. I searched all the forums and all the solution. Please help me!!! I am disperate. thanks.
[Sony Xperia M2] ImArlet:
i flashed jb 4.3 kernel booted unitil bootloop and connected to PC but PC wont regionize my phone! No adb???
[Sony Xperia M2] Miche1asso:
I don't really have a solution. PC Companion is supposed to fix it. You may get more help opening a new thread asking about it.

I'm 99% sure that you enabled the "wipe data" option. Doing so you removed the adb access. :D

Just restart from scratch enabling adb again. And this time just flash the kernel. Absolutely no wipes must be done.
[Sony Xperia M2] ImArlet:
I did not eneble wipe data option..

And i got root already :)
[Sony Xperia M2] xLobito:
Hi! Here with some troublesome :c.

Um, I was tryin' to root my device (Xperia M2 D2306 with 4.4.4 KitKat Movistar_CL branded Firmware) with your NO OTA Method.

I used one FTF JellyBean and flash it just the kernel and uncheck the Wipe boxes as your guideline says. Everythin' goes well, then the bootloop (as expected). Then, I opened the rootkitXperia, but, am, shows up some command lines which didn't root my device at all (I installed the ADB from the link you posted, and the rootKit as well).

The result was the device was "unauthorized", leading to me a constant bootloop, reflashing the kernel from 4.4.4 and nothing worked out.

I'd like to know what might have caused the troubleshooting. Wrong download or something like this?

I'll be very pleased if you answer to me. Thanks in advance.

Regards from Chile!

-------------------------------------------

[IMG="Rooting"]http://oi61.tinypic.com/8wdt0h.jpg[/IMG]

PD: After retrying the command line a few time. Showed up: "Unauthorized device".

PD2: Thanks again <3.
[Sony Xperia M2] Dzepar:
3 things: Adb, developers option and Authority permission.

1. You have link in op

2. You have the drill in op

3. After yoy done steps above, start Flashtool, connect phone, wait till popup shows, press Alow. Now continue with flashing 4.3 and on.

When i did it, i reboot PC after every step.

Good Luck.

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] xLobito:
I downloaded the ADB (15 secs install) from the link in OP, same as Rootkit (the first download link posted on its topic). Depuration USB and Security (Allow unknown sources). I will try again. After tryin'. I'll edit the post with the solution.

Edit: The root was done. SuperSU was implemented into my device. Well, after that. Disable RIC and I think it worked. So, thanks [MENTION=3652480]Dzepar[/MENTION] for you help! It really helped me a lot :3 (I suppose was some crashing with the adb-server or something like this xD).
[Sony Xperia M2] bihslk:
I rooted my phone and unlocked bootloader. But how do i install CMW. Cant find anything that works?
[Sony Xperia M2] itsuef:
Good work!

Working on my D2302! :highfive:
[Sony Xperia M2] beandj:
Just flash my D2403 (M2 Aqua) and got root without flash

my phone came with 18.3.1.C.0.21 and updated by OTA to 18.3.1.C.1.13.

I use the D2403_18.3.1.C.1.13_RU.ftf and the kernel provided by i_1
[Sony Xperia M2] ~Patryk:
*bihslk

Flash kernel with cwm.
[Sony Xperia M2] gershco:
OTA Update

Thanks for an excellent method to root my M2. I'd been having real problems setting up rw access to the external SD card, but now it seems to be sorted.

Before I started, my phone had the latest OTA update and was running 18.3.1.C.0.21. I downloaded an FTF of the same firmware and flashed it before flashing the JB kernel.

Having finished the whole process, my phone is now telling me that 18.3.1.C.1.13 is available. If I install this OTA, will I lose root?
[Sony Xperia M2] Miche1asso:
I personally had to update via computer. It didn't allow me to do it via OTA. Via computer it downloads and installs the whole ROM, overwriting /system and thus losing root. Still, it took just 5 minutes to root it again.
[Sony Xperia M2] gershco:
I thought rooting with rw access to the external sd card could only be done to a jb firmware.
[Sony Xperia M2] Obbyb1:
Amazing guide dude, rooted 4.4.4. Thanks!
[Sony Xperia M2] Miche1asso:
Partially, you just need the JB kernel. These are the steps in a nutshell (they are in the guide as well):

- Install the latest ROM (so you must first update if one is available)

- Install the JB kernel

- Root the phone

- Install the kernel from the latest ROM

You're very welcome. There is a thanks button, though. :D
[Sony Xperia M2] Dn.Thanujaya91:
Thanks Man..

You save my Day...
[Sony Xperia M2] i_1:
This is still work in lollipop ?
[Sony Xperia M2] aidy.lucas:
Doubtful as the M2 ain't getting Lollipop. This rooting method is for the M2 KK 4.4.4

D2303 stock 4.4.4 KK rooted philz touch recovery xposed Bravia engine 2 x-reality
[Sony Xperia M2] i_1:
I Want to Try for xperia z1 compact lollipops , so I ask first
[Sony Xperia M2] Miche1asso:
I don't know, I don't have Lollipop nor a Z1C. But you can give it a try. Just remember that you must use a JB kernel or a KK (up to 4.4.2?) kernel vulnerable to Towelroot. If it doesn't give any root just flash back the original Lollipop kernel for your phone. Otherwise if you get root but not the RIC disabled (/system can't be mounted in read/write) at least you have a starting point.

Well, it is a general method for KitKat on all Xperia phones. About Lollipop I can't test it for the reasons you mentioned. :)
[Sony Xperia M2] i_1:
not successful....

flash with 4.3 kernel, but debug usb inactive when in JB 4.3.....

and when I return again early kernel Lollipop, Xperia Z1C stuck in bootloop
[Sony Xperia M2] Miche1asso:
Oh, that's bad. So Google must have also changed the way adbd works in Lollipop. Not sure why it bootloops. But a restore to factory settings should fix it. Hopefully you made a backup as suggested in the guide.

PS: I see now that I double replied to the same guy. I messed up with the multi-quote. The first answer was obviously meant for you.
[Sony Xperia M2] i_1:
Yes .... I understand that you are the first to answer me...

Thak you mr.miche1asso ;)
[Sony Xperia M2] filip.kosut:
Root Is ok but SuperSU still showing Update su binary but this fails. what I should to do?
[Sony Xperia M2] Dzepar:
Disable RIC, reboot and try again. ;)

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] filip.kosut:
I have latest kernel flashed and one question, from which folder i should start the command for disabling? Sorry for stupid questions. ;)
[Sony Xperia M2] Dzepar:
If you havn't put adb in path in Environment Variables, go in Android\sdk\platform-tools here, Shift+right click open Cmd.

Good Luck!
[Sony Xperia M2] filip.kosut:
Omg what I m doing wrong......
[Sony Xperia M2] Miche1asso:
Before starting it is better to check if adb in Windows connects to the phone. Just run this command from Windows:

adb devices

If it reports no devices enable the USB debug, check that the Sony USB drivers are installed and so on. Then when you flash the kernel be sure that you do NOT wipe the data. That removes the "enable USB debug" setting.
[Sony Xperia M2] filip.kosut:
Adb was working good before and during rooting... I try to reinstall drivers or something...

---------- Post added at 06:49 PM ---------- Previous post was at 06:16 PM ----------

everything working . I had to reinstall adb driver in my PC :) thanx to all
[Sony Xperia M2] Miche1asso:
Well, "error: device not found" is at 99% and adb error. Run "adb devices" in advance, you never know if for some bizarre reasons there are two devices showing. It happened to some people, I don't remember why. Otherwise double check the USB cable or change USB port.

Oh, now it came to my mind. In OS X I had the issue that adb always required teh phone to authorize the connection. It works a bit like ssh. My problem was that $HOME/.android (Unix path. I don't know in Windows) was owned by root (superuser). So being in bootloop the connection couldn't be authorized (no popup window showing).

Changing ownership of the .android directory it fixed everything (after the first authorization)
[Sony Xperia M2] filip.kosut:
When i wrote ,,adb devices,, it showed noone device ;)
[Sony Xperia M2] aidy.lucas:
Had a similar problem the other day, turns out it was the latest windows vista updates my laptop had installed. I did a system restore and all was fine again. Might be worth a look

D2303 18.3.1.C.1.15 kk deodexed rooted philz touch recovery bravia engine 2 + x-reality viper audio
[Sony Xperia M2] xazakasrizava:
Nice man! I wanna root too, it's there anything I should look out for, especially in the bootloop part?
[Sony Xperia M2] Dzepar:
Yeah, disable your Antivirus and alow usb debugging authorization before bootloop.

Good Luck.

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] xazakasrizava:
Ok man, also have there been any cases of telephony and sim card not working after flashing roms?

----Edit----

I searched the Q&A thread and found nothing of that sort!!
[Sony Xperia M2] Miche1asso:
You're not flashing any ROM. Just the kernels, restoring the original one at the end. The only system binaries you install rooting are the following:

- The su binary

- The su deamon

- A library module to disable the RIC (write protection on /system)

Then there are a couple of scripts to allow the su deamon to launch and the RIC disabler to load at boot.

All the above should not have anything to do whatsoever with the other devices drivers (SIM/WiFI/Bluetooth/Whatever). Unless of dirty side effects. Then sure, if once rooted one starts to mess up with the system.. :D
[Sony Xperia M2] xazakasrizava:
Haha, I'm quite experienced with rooting and such, I have unbricked and rooted several phones and tablets in this small city of mine, just one case after flashing my xperia tipo with a rom, I lost telephony... I wanted to make sure that there is no chance of that happening :D
[Sony Xperia M2] Dzepar:
Yeah, with Roms it's possible, but with rooting is less possible.

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] xazakasrizava:
Probably no chance! This method works for 18.3.1.C.1.15 right?
[Sony Xperia M2] Dzepar:
Yes, just did it this morning. :)

Xperia M2 D2303 on K.K. 4.4.4
[Sony Xperia M2] xazakasrizava:
Ha cool, I'll do it sometime in the next week, I'll post the results when I'm done!
[Sony Xperia M2] xazakasrizava:
I have some useful info: The method works flawlessly on all firmwares below 18.3.1.C.1.15!!! Because of the new bootloader I can't flash it at all! So just grab .13 and root with this method, also by unlocking my bootloader I haven't lost any of Sony's features, due to losing DRM keys. That's all, respect to Miche for putting the topic together!