• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

DISCONTINUED [Recovery][Root] TWRP (Command line only for now)

Search This thread

husam666

Senior Member
Feb 6, 2010
21,411
1,074
Planet Omicron Persei 8
Discontinued, please use this instead


TWRP Recovery for M4 Aqua (No gui, command line only)
This is for E2303 I didn't test on other models, feel free to do so but I take no responsibility whatsoever if anything happens
This will disable OTA updates, if you want them back you can flash the FOTA kernel with FlashTool

Confrmed to be working on those variants:
E2303, E2306, E2333, E2353, E2363


Ok here it is thanks to @jeffreyvh kernel we can finally flash zips however we have 3 catches:
1. No GUI (Sony's fault until they provide full sources for our phones, we're stuck here)
2. You have to mount /system, /data and /cache manually (Working on it)
3. No external SD card support (working on it)

No problem? Cool..

Ok here's how to do it:
0. You need unlocked bootloader <-- Click here to see how
1. Download the recovery.img
2. Flash the recovery file with fastboot
Code:
fastboot flash recovery recovery.img
3. Pull the cable turning off your phone.
4. Press the power button + volume down, when the phone vibrates, press the volume down button repetedly.
5. The Sony logo will disappear and you'll get a black screen (It's okay, congrats you've now booted twrp)

Now for the magic:
Connect your cable, make sure you have ADB and drivers installed.
In your terminal or dos window type:
Code:
adb shell
you'll get a prompt like ~ #

type these three commands:
Code:
mount -w /dev/block/platform/7824900.sdhci/by-name/system  /system
mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache

Now that you have the partition mounted you can flash your zip files:
We don't have external SD card support so for now we're going to stick with sideload
type:
Code:
twrp sideload

adb shell will exit, it's okay now we can install the zip file like this:
Code:
adb sideload <path_to_zip>
path to zip on your computer without the < >
so if you downloaded superSU on C:DownloadsSuperSU.zip
you type
Code:
adb sideload C:DownloadsSuperSU.zip

when you're done type:
Code:
adb reboot
and pull the cable

For Rooting:
Download SuperSU flashable zip from here https://download.chainfire.eu/696/SuperSU
and flash it like explained before

good luck :)

Special Thanks:
@jeffreyvh
@alby_var
@Hnk1
@zw3n
@S7relok
@dexter93
@babydolll
@Sam205
The TWRP team and everyone who made this possible

Download Links:
http://d-h.st/wuGD

XDA:DevDB Information
M4 Aqua TWRP, Tool/Utility for the Sony Xperia M4 Aqua

Contributors
husam666

Version Information
Status: Testing

Created 2015-09-11
Last Updated 2015-11-24
 

husam666

Senior Member
Feb 6, 2010
21,411
1,074
Planet Omicron Persei 8
Help & Troubleshooting

If you get errors with sideload, try copying su.zip to your internal storage, then instead of twrp sideload type:
Code:
twrp install /data/media/0/su.zip
__________________________________________________


If you get ADB out of date error, use this tool to fix it http://visualgdb.com/adbfix/

__________________________________________________

At first, I should thank "husam666" for this great guide.

Secondly, I want to mention some points to help anyone who wants to do this procedure:

1. If you're on windows 8 or 8.1, please make sure that you've disabled "Driver Signature Verification". After doing this, install "Flashmode Drivers" and "Fastboot Drivers" by clicking on "Flashtool Drivers" from "drivers" folder of "FlashTool". (As default, you can find "Flashtool" folder on your "C" drive, after installing it on your computer)

*At the end of installation process, pay attention to the displayed result of it. If it won't go well, you will encounter so many errors later.

2. Download and keep "Universal ADB Drivers" and "Google USB Drivers for MTP/PC etc". Maybe you won't need them but I advise you to have them just in case. You can find them here on the third post of this great guide:
http://forum.xda-developers.com/m4-aqua/general/guide-t3130092

3. If you're stuck in "Flahmode" process, e.g. can't see your "Device Code", it's probably because of drivers. When your phone is in "Flahmode", open your "Device Manager" and look for your android device. If you see a warning sign behind it, then reinstall "Flashmode Drivers". For me, the problem was due to "Driver Signature Verification" of Windows 8.1. In that case, the drivers couldn't be installed properly.

4. If you have problems with "Fastboot", e.g. "Device "null" not found" or "adb server is out of date. killing...", it might be because of two main reasons:

A) Improper Driver Installation: When your phone is in "Fastboot Mode", check your "Device Manager". If you see a warning sign, you can reinstall the driver using "Flashtool Drivers" or"Universal ADB Drivers". If these two won't work, try install the driver manually by updating it in "Device Manager" and addressing it to the folder where you kept "Google USB Drivers for MTP/PC etc" in it.

B) Fastboot Bugs: It happens, so don't freak out. If you check everything and find no problem, just power off your phone, and close "cmd" in windows. Then restart your phone and put it in "Fastboot Mode", then run "cmd" again as administrator. This worked for me.

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

I hope my points will be beneficial for you.
Good luck with your root.
 
Last edited:

rascayus

Member
Jan 5, 2010
16
5
Thnks a lot! Great job. Only a question, Do you need unlocked bootloader?

El vive en la piña debajo del mar
 

PrinzDarknis

Member
May 24, 2014
22
0
3. No external SD card support (working on it)

meens this after rooting the phone don't support an sd-card any more?
 

zw3n

Member
Aug 31, 2015
25
25
www.zw3n.se
Code:
mount -w /system /dev/block/platform/7824900.sdhci/by-name/system
mount -w /data /dev/block/platform/7824900.sdhci/by-name/userdata
mount -w /cache /dev/block/platform/7824900.sdhci/by-name/cache
Change order of device and folder to mount:
Code:
mount -w /dev/block/platform/7824900.sdhci/by-name/system  /system
mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache
Thanks!
 
  • Like
Reactions: husam666

kpbs92

Senior Member
Sep 22, 2014
80
10
so it means if there is a newer software update i cannot install it ???????? is that it ?? even with sony pc companion ??
 
Last edited:

husam666

Senior Member
Feb 6, 2010
21,411
1,074
Planet Omicron Persei 8
Change order of device and folder to mount:
Code:
mount -w /dev/block/platform/7824900.sdhci/by-name/system  /system
mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache
Thanks!

Done, thanks for pointing that out

so it means if there is a newer software update i cannot install it ???????? is that it ?? even with sony pc companion ??

I think it can work with the PC companion, you can also reflash the FOTA kernel with FlashTool, and you also can flash the whole new firmware with FlashTool
 
  • Like
Reactions: kpbs92

kpbs92

Senior Member
Sep 22, 2014
80
10
Done, thanks for pointing that out



I think it can work with the PC companion, you can also reflash the FOTA kernel with FlashTool, and you also can flash the whole new firmware with FlashTool

So this can be applied with any firmware 2.99 and before.. ?? And also should my phone bootloader unlocked before doing this ??
 

Flamenawer

Senior Member
Apr 12, 2009
102
36
In the recovery.zip, is there a kernel compilated for you? or is only a recovery.
Because if is only a recovery that work with any kernel, maybe we can make a prerooted firm.
 

husam666

Senior Member
Feb 6, 2010
21,411
1,074
Planet Omicron Persei 8
In the recovery.zip, is there a kernel compilated for you? or is only a recovery.
Because if is only a recovery that work with any kernel, maybe we can make a prerooted firm.
There is a kernel, that's not fully complete, that's why we don't have screen support, I tried it with stock kernel but didn't work, you can make a prerooted firmware I believe I just don't have time to try it
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    Discontinued, please use this instead


    TWRP Recovery for M4 Aqua (No gui, command line only)
    This is for E2303 I didn't test on other models, feel free to do so but I take no responsibility whatsoever if anything happens
    This will disable OTA updates, if you want them back you can flash the FOTA kernel with FlashTool

    Confrmed to be working on those variants:
    E2303, E2306, E2333, E2353, E2363


    Ok here it is thanks to @jeffreyvh kernel we can finally flash zips however we have 3 catches:
    1. No GUI (Sony's fault until they provide full sources for our phones, we're stuck here)
    2. You have to mount /system, /data and /cache manually (Working on it)
    3. No external SD card support (working on it)

    No problem? Cool..

    Ok here's how to do it:
    0. You need unlocked bootloader <-- Click here to see how
    1. Download the recovery.img
    2. Flash the recovery file with fastboot
    Code:
    fastboot flash recovery recovery.img
    3. Pull the cable turning off your phone.
    4. Press the power button + volume down, when the phone vibrates, press the volume down button repetedly.
    5. The Sony logo will disappear and you'll get a black screen (It's okay, congrats you've now booted twrp)

    Now for the magic:
    Connect your cable, make sure you have ADB and drivers installed.
    In your terminal or dos window type:
    Code:
    adb shell
    you'll get a prompt like ~ #

    type these three commands:
    Code:
    mount -w /dev/block/platform/7824900.sdhci/by-name/system  /system
    mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
    mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache

    Now that you have the partition mounted you can flash your zip files:
    We don't have external SD card support so for now we're going to stick with sideload
    type:
    Code:
    twrp sideload

    adb shell will exit, it's okay now we can install the zip file like this:
    Code:
    adb sideload <path_to_zip>
    path to zip on your computer without the < >
    so if you downloaded superSU on C:DownloadsSuperSU.zip
    you type
    Code:
    adb sideload C:DownloadsSuperSU.zip

    when you're done type:
    Code:
    adb reboot
    and pull the cable

    For Rooting:
    Download SuperSU flashable zip from here https://download.chainfire.eu/696/SuperSU
    and flash it like explained before

    good luck :)

    Special Thanks:
    @jeffreyvh
    @alby_var
    @Hnk1
    @zw3n
    @S7relok
    @dexter93
    @babydolll
    @Sam205
    The TWRP team and everyone who made this possible

    Download Links:
    http://d-h.st/wuGD

    XDA:DevDB Information
    M4 Aqua TWRP, Tool/Utility for the Sony Xperia M4 Aqua

    Contributors
    husam666

    Version Information
    Status: Testing

    Created 2015-09-11
    Last Updated 2015-11-24
    7
    Help & Troubleshooting

    If you get errors with sideload, try copying su.zip to your internal storage, then instead of twrp sideload type:
    Code:
    twrp install /data/media/0/su.zip
    __________________________________________________


    If you get ADB out of date error, use this tool to fix it http://visualgdb.com/adbfix/

    __________________________________________________

    At first, I should thank "husam666" for this great guide.

    Secondly, I want to mention some points to help anyone who wants to do this procedure:

    1. If you're on windows 8 or 8.1, please make sure that you've disabled "Driver Signature Verification". After doing this, install "Flashmode Drivers" and "Fastboot Drivers" by clicking on "Flashtool Drivers" from "drivers" folder of "FlashTool". (As default, you can find "Flashtool" folder on your "C" drive, after installing it on your computer)

    *At the end of installation process, pay attention to the displayed result of it. If it won't go well, you will encounter so many errors later.

    2. Download and keep "Universal ADB Drivers" and "Google USB Drivers for MTP/PC etc". Maybe you won't need them but I advise you to have them just in case. You can find them here on the third post of this great guide:
    http://forum.xda-developers.com/m4-aqua/general/guide-t3130092

    3. If you're stuck in "Flahmode" process, e.g. can't see your "Device Code", it's probably because of drivers. When your phone is in "Flahmode", open your "Device Manager" and look for your android device. If you see a warning sign behind it, then reinstall "Flashmode Drivers". For me, the problem was due to "Driver Signature Verification" of Windows 8.1. In that case, the drivers couldn't be installed properly.

    4. If you have problems with "Fastboot", e.g. "Device "null" not found" or "adb server is out of date. killing...", it might be because of two main reasons:

    A) Improper Driver Installation: When your phone is in "Fastboot Mode", check your "Device Manager". If you see a warning sign, you can reinstall the driver using "Flashtool Drivers" or"Universal ADB Drivers". If these two won't work, try install the driver manually by updating it in "Device Manager" and addressing it to the folder where you kept "Google USB Drivers for MTP/PC etc" in it.

    B) Fastboot Bugs: It happens, so don't freak out. If you check everything and find no problem, just power off your phone, and close "cmd" in windows. Then restart your phone and put it in "Fastboot Mode", then run "cmd" again as administrator. This worked for me.

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

    I hope my points will be beneficial for you.
    Good luck with your root.
    4
    OK, The phone es waterproof OK. I'll tell you what I do this night:
    I maked a prerooted rom with root, xposed and busybox based in 112 firm.
    I will flash this rom, not the SU zip.
    If I make well the rom, I will have the best generic rom rooted with stock firm.
    I will remove all app of google and Sony.
    I will try the module to have all mpx usable in automatic mode.
    If the rom work, will try install a script that make the SD in Internal storage,bravia engine,xloud etc, in a second version.
    This Nigth!!! :D
    4
    At first, I should thank "husam666" for this great guide.

    Secondly, I want to mention some points to help anyone who wants to do this procedure:

    1. If you're on windows 8 or 8.1, please make sure that you've disabled "Driver Signature Verification". After doing this, install "Flashmode Drivers" and "Fastboot Drivers" by clicking on "Flashtool Drivers" from "drivers" folder of "FlashTool". (As default, you can find "Flashtool" folder on your "C" drive, after installing it on your computer)

    *At the end of installation process, pay attention to the displayed result of it. If it won't go well, you will encounter so many errors later.

    2. Download and keep "Universal ADB Drivers" and "Google USB Drivers for MTP/PC etc". Maybe you won't need them but I advise you to have them just in case. You can find them here on the third post of this great guide:
    http://forum.xda-developers.com/m4-aqua/general/guide-t3130092

    3. If you're stuck in "Flahmode" process, e.g. can't see your "Device Code", it's probably because of drivers. When your phone is in "Flahmode", open your "Device Manager" and look for your android device. If you see a warning sign behind it, then reinstall "Flashmode Drivers". For me, the problem was due to "Driver Signature Verification" of Windows 8.1. In that case, the drivers couldn't be installed properly.

    4. If you have problems with "Fastboot", e.g. "Device "null" not found" or "adb server is out of date. killing...", it might be because of two main reasons:

    A) Improper Driver Installation: When your phone is in "Fastboot Mode", check your "Device Manager". If you see a warning sign, you can reinstall the driver using "Flashtool Drivers" or"Universal ADB Drivers". If these two won't work, try install the driver manually by updating it in "Device Manager" and addressing it to the folder where you kept "Google USB Drivers for MTP/PC etc" in it.

    B) Fastboot Bugs: It happens, so don't freak out. If you check everything and find no problem, just power off your phone, and close "cmd" in windows. Then restart your phone and put it in "Fastboot Mode", then run "cmd" again as administrator. This worked for me.

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

    I hope my points will be beneficial for you.
    Good luck with your root.
    4
    Can i use it on E2312

    Yes, it will also work ;)

    ---------- Post added at 09:16 PM ---------- Previous post was at 09:13 PM ----------

    Amy news on SD card compatibility?

    I'm working hard on our device its kernel. As it looks for now, it will take a bit longer to fix the SD because I fix the heavy bugs first. Touchscreen is very useful :p

    Stay tuned to get the latest updates ;)

    PS. Maybe tomorrow I will come with my AOSP 5.1.1 ROM (as beta of course)

    ---------- Post added at 09:51 PM ---------- Previous post was at 09:16 PM ----------

    Well, can I do a backup before than root and then restore as if I have never done a root?

    Yes, you can root it and then after rooting you can install factory kernel + recovery using flash tool (see my unbrick thread for a flash tool tutorial. But this time exclude everything (also the top 3 buttons, only enable kernel and recovery)

    PS. Read the first post before you ask the next question ;)