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

[M2] [LB] TWRP/CWM/PhilZ Touch Recovery

Search This thread

AleksJ

Senior Member
Jul 18, 2014
142
183
Multiple custom Android recovery solution for Xperia M2.

Requirements:
  • Rooted Sony Xperia M2 D2302-6/D2403
  • Installed ADB Interface Driver *
  • Stock firmwares (Android 4.3 - 5.1.1).
  • Locked bootloader.
How to use:
  • Extract recovery installer zip into your computer hard drive.
  • Enable USB Debugging.
  • Connect computer with the device via USB.
  • Execute installation script and follow the instruction on the screen.
Enter into recovery:
  • Power ON phone.
  • When the cyan led glows push/press the appropriate button:
  • Volume Down - PhilZ
  • Volume UP - TWRP
  • Camera button - CWM
Download recovery:
v0.9
XperiaM2 MultiRecovery Installerhttp://forum.xda-developers.com/attachment.php?attachmentid=3754953&stc=1&d=1463594740

Download pre-rooted flashable.zip:

D2303_1281-1548_18.3.1.C.1.13 pre-rooted
D2303_1281-1538_18.3.1.C.1.17 pre-rooted
Includes:
- SuperSU v2.46
- PhilZ Touch Recovery
- RICDefeat (modulecrcpatch and wp_mod.ko based on code by @cubeundcube)

Install pre-rooted flashable zip:
Enter into recovery and create a backup of current firmware:
. Backup and Restore -> Backup to storage/sdcard1/clockworkmod/backup/yy-mm-dd.fw.vesrion
. Copy pre-rooted flashable.zip to storage/sdcard1:
. Wipe and Format Options -> Wipe Dalvik/ART Cache or Clean to Install a New ROM
. Install Zip -> Choose zip from /storage/sdcard1 -> choose the path to the folder that contains the flashable.zip
. Confirm..

Questions & Answers:
  • Q: Do I need root access to install and use MultiRecovery?
  • Q: How to disable Sony RIC on Xperia M2?
  • A: Yes. The root is mandatory. EagleRootTool_20160531 * is my recommendation for a successful completion of these tasks (on Android 5.1.1).

  • Q: Do I need to 'install' any pre-rooted flashable.zip beforehand?
  • A: No. This is an optional feature and is there for if and when you’d ever like to try it.

  • Q: Is it possible to flash any custom ROM?
  • A: Yes. On unlocked bootloader you can flash a custom kernel with this tool, included.

Changelog:
  • v0.9
    Date: 2016-05-18
    Update and recompile Android 'init'.
    Update CWM and PhilZ to latest builds.
    Add selinux_mod and copymodulecrc to installation script.
    The module loading stage is logged in mr.log file.

  • v0.8
    Date: 2016-01-19
    Added installation script with separate adb support for Linux OS.
    Stripped version of byeselinux LKM to reduce size.
    Relevant bug fixes, update LEDs (media and notifications one) in regular Xperia M2.
    MOBILE [aka Emergency] version, which consists on a shell script that can be executed from an elevated Terminal Emulator.
    Demo video preview *

  • v0.7
    Date: 2015-11-09
    Use of Chargemon instead of e2fsck as base script to trigger the Recovery.
    Usage of ByeSELinux kernel module to change SE Linux Status from Enforcing to Permissive during boot. (Many thanks to NUT and zxz0O0).
    (After the user interaction time span, the module is unloaded to continue to regular boot.)
    The same 3 recoveries as KitKat are included, TWRP, PhilZ and CWM.
    Compatibility with legacy e2fsck script inside the installer (Option number 2: "Install MultiRecovery (Android 4.4.x)")
    New Linux/OSX installer script (WIP, only supports installation of Android 5.1.1 Recovery. Will be improved in the future).
    Updated BusyBox.
    More information can be found here *

  • v0.6
    Date: 2015-08-22
    Fixed USB connection, adb shell commands can be used while device is in recovery mode.

  • v0.5
    Date: 2015-06-22
    Added button management, vol-up for TWRP, camera button for CWM.
    Added TWRP Recovery v2.8.1.0 to installer.

  • v0.4
    Date: 2015-05-19
    Temp fixes in a script to catch key events.

  • v0.3
    Date: 2015-05-19
    Changes in recovery.fstab to avoid messages about /misc partition.
    Used a new compilation of busybox * to correct error: unzip zip flags 1 and 8 are not supported.

  • v0.2
    Date: 2015-04-01
    The zip files is packed with new binary interpreter.
    The flashable zip can be used with PRFcreator *

  • v0.1
    Date: 2015-03-06
    Initial public release.


Credits and thanks:
Phil3759 for source.
Team Win Recovery Project.
DooMLoRD for ramdisk.
rachitrawat and [NUT] for recovery installer.
zxz0O0 for PRFCreator.
@Andrej732 and @linuxct for improvements on installer script.

XDA:DevDB Information
XperiaM2 MultiRecovery for locked bootloader, Device Specific App for the Sony Xperia M2

Contributors
AleksJ, linuxct

Version Information
Status: Stable

Created 2015-03-06
Last Updated 2016-05-17

I'm not responsible for any problems caused by using anything from here, so do it at your own risk!
 

Attachments

  • cwm_screen004.png
    cwm_screen004.png
    188.8 KB · Views: 15,597
  • cwm_screen007.png
    cwm_screen007.png
    195 KB · Views: 15,250
  • cwm_screen013.jpg
    cwm_screen013.jpg
    62 KB · Views: 15,036
  • cwm_screen014.jpg
    cwm_screen014.jpg
    84.8 KB · Views: 12,698
  • cwm_screen035.png
    cwm_screen035.png
    200.4 KB · Views: 11,472
  • cwm_screen037.png
    cwm_screen037.png
    202.8 KB · Views: 10,775
  • cwm_screen043.png
    cwm_screen043.png
    196.1 KB · Views: 10,279
  • cwm_screen044.png
    cwm_screen044.png
    203.6 KB · Views: 9,699
  • XperiaM2-MultiRecovery-0.9-PC.zip
    11.5 MB · Views: 43,456
Last edited:

AleksJ

Senior Member
Jul 18, 2014
142
183
Not tested for now .
Yes, it is tested and works on recent (18.3.1.C.1.13) version.

Edit:
Please note that for proper installation Sony RIC protection must be disabled( the related source code can be found here ) .
ric_disabler
ric_disabler-flashable

The recoveries from first post are assembled and designed to be used on locked bootloader, recent additions of TA and modem partitions is only for backup purposes.
The builds linked here can be used on unlocked devices with stock based Android ROM's.
 
Last edited:

ImArlet

Senior Member
Feb 10, 2015
203
13
I test it out my own, but if fail... Can i restore stock? Is this kernel or only recovery?
Edit!
Working and Device succesfully booted up :)
Working on 18.3.1.C.1.13 4.4.4 firmware
 
Last edited:
  • Like
Reactions: AleksJ

AleksJ

Senior Member
Jul 18, 2014
142
183
This is an only one fresh compiled PhilZ Touch recovery, you can make and restore backup to your android, e.g. KitKat 4.4 - 18.3.1.C.0.21.
Also you can use PRFCreator to create a pre-rooted stock firmware, and then flash with this recovery.
I hope this will be useful for people who can't unlock their BL for some reason/restriction, but want to have the possibility to use a custom Android recovery.
 
Last edited:

aidy.lucas

Senior Member
Oct 8, 2014
1,866
610
May try this over the weekend if I get time. Need a recovery on my m2, as currently rooted on 18.1.3.c.0.21 with no recovery. :thumbup:
Installed no problems now have a working recovery thanks:thumbup::D
sent from my Rooted B/l 4.4.4 kk Xperia D2303
 
Last edited:
  • Like
Reactions: AleksJ

AleksJ

Senior Member
Jul 18, 2014
142
183
Here is a complete log of my backup/restore process, right before I post this thread.
You can try this, or If you like, make one for yourself.
Most of Pre-Rooted firmware created with PRFCreator like this , also can be flashed.
 

AleksJ

Senior Member
Jul 18, 2014
142
183
Hi @NoobZik
The button is the last thing for what you need to worry about.

Can you please post :
Your kernel version.
The method you are using to disable RIC kernel module.
The contents of a log file located at /cache/recovery/last_log right after a failed recovery boot attempt.

p.s.
And if there is still some misunderstanding :
This recovery is for Locked Bootloader
 

AleksJ

Senior Member
Jul 18, 2014
142
183
Is not it easier made when the bootloader unlocked?
Yes, but that was not my goal.
Currently I don't have unlocked Eagle device, so I can't test it for myself.

Assume that you have installed correctly Superuser or SuperSU, and RIC is disabled.
Check if this files exist for you after installation:
Code:
/system/bin/recovery.cpio
/system/bin/e2fsck ( this file should be a script )
/system/bin/e2fsck.bin
/system/bin/recovery.sh
Try reinstall your current busybox with this script.
 

Attachments

  • Busy_Box_Uninstaller.rar
    1,021 bytes · Views: 316

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    Multiple custom Android recovery solution for Xperia M2.

    Requirements:
    • Rooted Sony Xperia M2 D2302-6/D2403
    • Installed ADB Interface Driver *
    • Stock firmwares (Android 4.3 - 5.1.1).
    • Locked bootloader.
    How to use:
    • Extract recovery installer zip into your computer hard drive.
    • Enable USB Debugging.
    • Connect computer with the device via USB.
    • Execute installation script and follow the instruction on the screen.
    Enter into recovery:
    • Power ON phone.
    • When the cyan led glows push/press the appropriate button:
    • Volume Down - PhilZ
    • Volume UP - TWRP
    • Camera button - CWM
    Download recovery:
    v0.9
    XperiaM2 MultiRecovery Installerhttp://forum.xda-developers.com/attachment.php?attachmentid=3754953&stc=1&d=1463594740

    Download pre-rooted flashable.zip:

    D2303_1281-1548_18.3.1.C.1.13 pre-rooted
    D2303_1281-1538_18.3.1.C.1.17 pre-rooted
    Includes:
    - SuperSU v2.46
    - PhilZ Touch Recovery
    - RICDefeat (modulecrcpatch and wp_mod.ko based on code by @cubeundcube)

    Install pre-rooted flashable zip:
    Enter into recovery and create a backup of current firmware:
    . Backup and Restore -> Backup to storage/sdcard1/clockworkmod/backup/yy-mm-dd.fw.vesrion
    . Copy pre-rooted flashable.zip to storage/sdcard1:
    . Wipe and Format Options -> Wipe Dalvik/ART Cache or Clean to Install a New ROM
    . Install Zip -> Choose zip from /storage/sdcard1 -> choose the path to the folder that contains the flashable.zip
    . Confirm..

    Questions & Answers:
    • Q: Do I need root access to install and use MultiRecovery?
    • Q: How to disable Sony RIC on Xperia M2?
    • A: Yes. The root is mandatory. EagleRootTool_20160531 * is my recommendation for a successful completion of these tasks (on Android 5.1.1).

    • Q: Do I need to 'install' any pre-rooted flashable.zip beforehand?
    • A: No. This is an optional feature and is there for if and when you’d ever like to try it.

    • Q: Is it possible to flash any custom ROM?
    • A: Yes. On unlocked bootloader you can flash a custom kernel with this tool, included.

    Changelog:
    • v0.9
      Date: 2016-05-18
      Update and recompile Android 'init'.
      Update CWM and PhilZ to latest builds.
      Add selinux_mod and copymodulecrc to installation script.
      The module loading stage is logged in mr.log file.

    • v0.8
      Date: 2016-01-19
      Added installation script with separate adb support for Linux OS.
      Stripped version of byeselinux LKM to reduce size.
      Relevant bug fixes, update LEDs (media and notifications one) in regular Xperia M2.
      MOBILE [aka Emergency] version, which consists on a shell script that can be executed from an elevated Terminal Emulator.
      Demo video preview *

    • v0.7
      Date: 2015-11-09
      Use of Chargemon instead of e2fsck as base script to trigger the Recovery.
      Usage of ByeSELinux kernel module to change SE Linux Status from Enforcing to Permissive during boot. (Many thanks to NUT and zxz0O0).
      (After the user interaction time span, the module is unloaded to continue to regular boot.)
      The same 3 recoveries as KitKat are included, TWRP, PhilZ and CWM.
      Compatibility with legacy e2fsck script inside the installer (Option number 2: "Install MultiRecovery (Android 4.4.x)")
      New Linux/OSX installer script (WIP, only supports installation of Android 5.1.1 Recovery. Will be improved in the future).
      Updated BusyBox.
      More information can be found here *

    • v0.6
      Date: 2015-08-22
      Fixed USB connection, adb shell commands can be used while device is in recovery mode.

    • v0.5
      Date: 2015-06-22
      Added button management, vol-up for TWRP, camera button for CWM.
      Added TWRP Recovery v2.8.1.0 to installer.

    • v0.4
      Date: 2015-05-19
      Temp fixes in a script to catch key events.

    • v0.3
      Date: 2015-05-19
      Changes in recovery.fstab to avoid messages about /misc partition.
      Used a new compilation of busybox * to correct error: unzip zip flags 1 and 8 are not supported.

    • v0.2
      Date: 2015-04-01
      The zip files is packed with new binary interpreter.
      The flashable zip can be used with PRFcreator *

    • v0.1
      Date: 2015-03-06
      Initial public release.


    Credits and thanks:
    Phil3759 for source.
    Team Win Recovery Project.
    DooMLoRD for ramdisk.
    rachitrawat and [NUT] for recovery installer.
    zxz0O0 for PRFCreator.
    @Andrej732 and @linuxct for improvements on installer script.

    XDA:DevDB Information
    XperiaM2 MultiRecovery for locked bootloader, Device Specific App for the Sony Xperia M2

    Contributors
    AleksJ, linuxct

    Version Information
    Status: Stable

    Created 2015-03-06
    Last Updated 2016-05-17

    I'm not responsible for any problems caused by using anything from here, so do it at your own risk!
    8
    MultiRecovery 0.7 (TWRP/CWM/PhilZ Touch Recovery)

    Good night guys,
    After struggling a lot, we finally managed to finish it.

    Here you have MultiRecovery 0.7 for Xperia M2 & M2 Aqua devices.

    Changelog:

    - Use of Chargemon instead of e2fsck as base script to trigger the Recovery.
    - Usage of ByeSELinux kernel module to change SE Linux Status from Enforcing to Permissive during boot. (Many thanks to NUT and zxz0O0).
    (After the user interaction time span, the module is unloaded to continue to regular boot.)
    - The same 3 recoveries as KitKat are included, TWRP, PhilZ and CWM.
    - Compatibility with legacy e2fsck script inside the installer (Option number 2: "Install MultiRecovery (Android 4.4.x)")
    - New Linux/OSX installer script (WIP, only supports installation of Android 5.1.1 Recovery. Will be improved in the future).
    - Updated BusyBox.


    Download:

    Known bugs:
    On some D2303 devices with Touchscreen Firmware 0x0800, screen in TWRP is unresponsive.
    This happens due to a Sony problem with all 0x0800 screens, on .175 release, which makes the screen unusable even in the Android system until screen turns off and goes back on.
    We can't fix that for LBL (a kernel modification is needed), but, for UBL, a Custom Kernel can solve it. Use the ones provided by AleksJ (TWRP recovery in the old, boot.img way).
    However, if you wait 65 seconds exactly, and your screen goes off, try to turn your screen back on, so now you should be able to interact with the Recovery again.
    You can also change the Screen timeout (Under Settings -> Screen menu) to 15, which is the min value, so that you can use TWRP 20 seconds after it boots.

    Enjoy guys!
    (And yes, this means Z4 eXPERIence development will start soon. Stay tuned) :p
    7
    Version 0.8 released! New installers ready.

    Today we are glad to announce the new version 0.8 of MultiRecovery.
    One of the major changes since 0.7 (apart from the multimedia LED strip and the support of both 4.4 and 5.1 in the same script), is that now, you have 3 installers to choose from: PC (with both Linux-Mac and Windows Support), Flashable version (which can be used to upgrade current installation), and MOBILE [aka Emergency] version, which consists on a shell script that can be executed from an elevated Terminal emulator, to install MultiRecovery 0.8 without need of a PC or have another recovery already installed.

    This can be very useful in chase you have a rooted device, but you don't have access to a PC and another recovery installed.
    To use it, just download the following Zip, extract the contents to your SD card or your Internal Memory, download a TERMINAL EMULATOR and execute the following commands.

    IF YOU WANT TO USE THE ROOT OF YOUR EXTERNAL SD CARD:
    Code:
    	su
    	cd /storage/sdcard1/
    	sh install.sh

    IF YOU WANT TO USE THE ROOT OF YOUR INTERNAL MEMORY:
    Code:
    	su
    	cd /storage/emulated/0
    	sh install.sh

    DEMO:

    (from 0:43 to 1:10, as you can see, you can rename the file install.sh to install_debug.sh in case you want to see some extra parameters of the device)


    DOWNLOADS:

    Mobile (Emergency) Version: https://www.androidfilehost.com/?fid=24369303960688490
    Flashable Version: https://www.androidfilehost.com/?fid=24369303960688489
    PC version: http://forum.xda-developers.com/showpost.php?p=64879099&postcount=192

    Enjoy!
    6
    Good job @linuxct, and thank you for effort. :good:

    I did a little modified version on my previous TWRP recovery image (for opened devices) with ability to update and backup/restore most of the important partitions present on Xperia M2 (Eagle).
    I've tested it on my unlocked D2303 with all available custom ROMs for our device, (including the stock Android 5.1.1 OS) and have no problem so far.

    If we want to enable the recovery partition in our system first we need to update it via Emma, or using a specifically created .ftf file from here.
    The flash sequence is the following:
    1. Install TA update.
    2. Turn off device.
    3. Hold Volume up and connect your M2 to the computer USB.
    4. Open your console and type:
    fastboot flash recovery recovery-twrp.img
    5. Disconnect phone from computer.
    At the same time press the Power and Volume down until device vibrate. Quickly release the Power button, but keep pressing Volume down. When you see the Sony logo release Volume down.

    Download link:
    recovery-twrp.img

    I am sorry for the delay on updates about LBL recovery, but soon expect the new updated version.
    That's all for now. :)
    6
    Updates:
    Added twrp to the installer.
    Not fully tested, backup/restore and several installations.
    When you see teamwin logo screen, wait a five seconds.
    Link