[TabZ][TWRP][PhilZ Touch][CWM] XZDualRecovery Q&A

Search This thread

Itcouldbeyou

Member
May 14, 2010
29
21
I know, but I think its better then giving false hope. Unless the stock kernels allow kexec'ing a new kernel, there shouldn't be a way.
CM only describes the unlock way, but since many (at least me) am used to just flash CM from CWM, I investigated if and why this wasn't possible.

Is it technically possible to soft brick with this recovery or does it deny flashing wrong kernels? Because that is something I'd put as a warning.
 

[NUT]

Senior Member
I know, but I think its better then giving false hope. Unless the stock kernels allow kexec'ing a new kernel, there shouldn't be a way.
CM only describes the unlock way, but since many (at least me) am used to just flash CM from CWM, I investigated if and why this wasn't possible.

Is it technically possible to soft brick with this recovery or does it deny flashing wrong kernels? Because that is something I'd put as a warning.

It is, and it is up to the user to try something that risky. I'm not responsible for their misunderstanding the whole concept behind flashing STOCK and CUSTOM kernels and that in relation to the locked or unlocked bootloader requirements...

If you start rooting and modifying your device's ROM (whatever that device might be) you risk bricking it or creating a nice bootloop, it comes with the territory. I'm not the one who should warn users of the dangers ... @DooMLoRD already did with this thread and if people jump in and modify their device before reading up on all the risks and stuff... well... lets just say those people are not the brightest souls on this earth... OK? :silly:
 
Last edited:

Apo11on

Senior Member
Sep 5, 2008
1,668
336
San Diego, CA
FYI: To use this on your Tablet Z, you need the 2.5 BETA release, available on my downloads page!

See the BETA changelog header for the link to it!

After installing 2.5 Beta on my XTZ I see no evidence of this being a dual recovery - it just boots straight into CWM, no TWRP choice is given at any stage. How do I access TWRP?

TWRP is actually the main reason I flashed this because it's way better than CWM and hopefully later on there would be a separate installer for it, instead of dual one.
 

jetstream131

Senior Member
Aug 5, 2012
188
10
This may be a "newby" question, but what exactly would this be used for if installed on a locked bootloader? Like i read through and i saw that you can't use custom kernels/roms, so why would you need to reflash a stock kernel? Is the power to nandroid the only functionality?
 

[NUT]

Senior Member
After installing 2.5 Beta on my XTZ I see no evidence of this being a dual recovery - it just boots straight into CWM, no TWRP choice is given at any stage. How do I access TWRP?

TWRP is actually the main reason I flashed this because it's way better than CWM and hopefully later on there would be a separate installer for it, instead of dual one.

You can select TWRP by pressing volume down, CWM by pressing volume up, as stated in the OP...

But I have to warn you, TWRP still needs to be fixed. It orientates the wrong way, the XTZ has its screen default in landscape and it was made for the default orientation of portrait.

I'll have that fixed sometime soon though. Loadsa stuff buzzin' on the XZ, so I haven't had the time to fix it yet.


This may be a "newby" question, but what exactly would this be used for if installed on a locked bootloader? Like i read through and i saw that you can't use custom kernels/roms, so why would you need to reflash a stock kernel? Is the power to nandroid the only functionality?

There is no such thing as a "newbie question". Just take a look at my signature to see I'm not the only one who thinks that way :)

Custom ROM's can also be based on the STOCK ones created by Sony, with loads of customizations in them but specifically created to run on the STOCK Sony kernels.

Some app creators also do a flashable version of their app. Some people just don't like to use the play store for their testing versions.

The nandroid backups are very useful as a true full filesystem backup. The backup apps available on the play store do not always backup everything you have on your phone or tablet.

In general you can regard the recovery as a gateway to modding heaven. The question you have to ask yourself basically is "how much risk am I willing to take?" and the sky is the limit :D

Sent from my C6603 using xda app-developers app
 
  • Like
Reactions: jetstream131

Apo11on

Senior Member
Sep 5, 2008
1,668
336
San Diego, CA
You can select TWRP by pressing volume down, CWM by pressing volume up, as stated in the OP...

Thanks for the reply. I don't boot into recovery using HW keys - its rather inconvenient. I use regular apps like QuickBoot, or Rom Toolbox, etc' which allow booting into it from the system - is there any way to set TWRP as a default recovery, so those apps would boot my XTZ into TWRP instead of CWM?
 

nyknight77

Senior Member
Sep 20, 2011
148
21
Can someone please confirm that twrp recovery supports exfat sdcard? The whole purpose of me installing recovery would be to nandroid backup to exfat formatted external sdcard.


Sent from my SGP312 using Tapatalk 2
 

[NUT]

Senior Member
Thanks for the reply. I don't boot into recovery using HW keys - its rather inconvenient. I use regular apps like QuickBoot, or Rom Toolbox, etc' which allow booting into it from the system - is there any way to set TWRP as a default recovery, so those apps would boot my XTZ into TWRP instead of CWM?

Quoted from the OP:

Defaults:
The default on first boot with the boot-to-recovery flag set by any recovery is CWM.
You can however create a file called 'default' inside /storage/sdcard1/XZDualRecovery (if you have an external sdcard) or inside /cache/XZDualRecovery and simply put in 'twrp' (without quotes) to make it default to TWRP. :)
The button choice however takes precedence, so you can always overrule the default! ;)

:rolleyes:

Can someone please confirm that twrp recovery supports exfat sdcard? The whole purpose of me installing recovery would be to nandroid backup to exfat formatted external sdcard.


Sent from my SGP312 using Tapatalk 2

It should, as long as the kernel modules are installed and called texfat.ko and nls_utf8.ko they will be inserted in to the kernel by this recovery.
 

SWFlyerUK

Senior Member
Nov 9, 2010
1,191
131
Installed and booted to CWM.

Tried to install a .zip that's in the root of the tablets memory, no option folder shows except from "clockwordmod/" and "0/" ?
 

Hondaracer

Senior Member
Feb 16, 2009
128
35
www.wix.com
@[NUT] if I change the following:
Code:
  	#read default, for use with the boot flag file.
	if [ -e ${DRPATH}/default -a "`cat ${DRPATH}/default`" = "twrp" ]; then
		RECLOG="Booting TWRP by default..."
		RECOVERY="/sbin/recovery.twrp.cpio.lzma"
	else
		RECLOG="Booting CWM by default..."
		RECOVERY="/sbin/recovery.cwm.cpio.lzma"
	fi
to:
Code:
  	#read default, for use with the boot flag file.
	if [ -e ${DRPATH}/default -a "`cat ${DRPATH}/default`" = "cwm" ]; then
		RECLOG="Booting CWM by default..."
		RECOVERY="/sbin/recovery.cwm.cpio.lzma"
	else
		RECLOG="Booting CWM by default..."
		RECOVERY="/sbin/recovery.cwm.cpio.lzma"
	fi
and:
Code:
  	# Prepare CWM recovery
	if [ -f /system/bin/recovery.cwm.cpio.lzma -a "$KEYCHECK" = "UP" ]; then
		RECLOG="Booting CWM by keypress..."
		RECOVERY="/sbin/recovery.cwm.cpio.lzma"
	fi

	# Prepare TWRP recovery
	if [ -f /system/bin/recovery.twrp.cpio.lzma -a "$KEYCHECK" = "DOWN" ]; then
		RECLOG="Booting TWRP by keypress..."
		RECOVERY="/sbin/recovery.twrp.cpio.lzma"
	fi
to:
Code:
  	# Prepare CWM recovery
	if [ -f /system/bin/recovery.cwm.cpio.lzma -a "$KEYCHECK" = "UP" ]; then
		RECLOG="Booting CWM by keypress..."
		RECOVERY="/sbin/recovery.cwm.cpio.lzma"
	fi

	# Prepare TWRP recovery
	if [ -f /system/bin/recovery.cwm.cpio.lzma -a "$KEYCHECK" = "DOWN" ]; then
		RECLOG="Booting CWM by keypress..."
		RECOVERY="/sbin/recovery.cwm.cpio.lzma"
	fi
in dualrecovery.sh, will I then only have CWM which opens by both volume up and down? Or do I forget something?

Or maybe even better, can you tell me which changes are required in the normal CWM for locked bootloaders to run on the Tablet Z?

Maybe it's handier if we share some ideas over PM? I have some experience with recoveries; I've contributed to development of MIUI Recovery on the Meizu MX2: MIUI Recovery Mod by HR - Meizu Me
 

[NUT]

Senior Member
@[NUT] if I change the following:
[snip]
in dualrecovery.sh, will I then only have CWM which opens by both volume up and down? Or do I forget something?

Or maybe even better, can you tell me which changes are required in the normal CWM for locked bootloaders to run on the Tablet Z?

Maybe it's handier if we share some ideas over PM? I have some experience with recoveries; I've contributed to development of MIUI Recovery on the Meizu MX2: MIUI Recovery Mod by HR - Meizu Me

Hmm... what are you trying to do exactly?

To be honest, TWRP should be excellent for use on a tablet: touch interface :highfive:

If only I didn't run in to stuff every day that keep me from fixing TWRP :p

You (and anyone else for that matter) can PM me any time though, I really do not mind :)
 

Apo11on

Senior Member
Sep 5, 2008
1,668
336
San Diego, CA
Quoted from the OP:

Defaults:
The default on first boot with the boot-to-recovery flag set by any recovery is CWM.
You can however create a file called 'default' inside /storage/sdcard1/XZDualRecovery (if you have an external sdcard) or inside /cache/XZDualRecovery and simply put in 'twrp' (without quotes) to make it default to TWRP.
The button choice however takes precedence, so you can always overrule the default!

That did not work. Created default file on external sd in the above location, put twrp in it, saved. Tried rebooting into recovery using 2 different apps - still goes to CWM :(
 

[NUT]

Senior Member
That did not work. Created default file on external sd in the above location, put twrp in it, saved. Tried rebooting into recovery using 2 different apps - still goes to CWM :(

You can try to do the following command in a terminal app:

Code:
echo -n "twrp" > /storage/sdcard1/XZDualRecovery/default

I suspect your default file to contain a newline char and my checking of that file contents does not account for that...

With the above command it should correct that and work :)
 

Apo11on

Senior Member
Sep 5, 2008
1,668
336
San Diego, CA
You can try to do the following command in a terminal app:

Code:
echo -n "twrp" > /storage/sdcard1/XZDualRecovery/default

I suspect your default file to contain a newline char and my checking of that file contents does not account for that...

With the above command it should correct that and work :)

I'm aware of android/Linux carriage return issues and newline char, and I made sure not to type anything after twrp, when I saved...I deleted the file i created manually and created another one, using command line above, but it made no difference. It still boots into CWM. I even tried reflashing 2.5BETA again, thinking something must have happened during the first time flash
 

[NUT]

Senior Member
I'm aware of android/Linux carriage return issues and newline char, and I made sure not to type anything after twrp, when I saved...I deleted the file i created manually and created another one, using command line above, but it made no difference. It still boots into CWM. I even tried reflashing 2.5BETA again, thinking something must have happened during the first time flash

Heh... ok, can you send me all the logs mentioned in the OP under 'error reporting'?

I'll need them to see what is going wrong then...
 

[NUT]

Senior Member
Really appreciate the personalized support and quick response times. I will do that tonight, but right now heading out to a couple of work meetings.

Take your time, I still need to fix TWRP before it will be of real use to you anyway :)

If only I had the cash to purchase a Tablet Z myself... That would make debugging so much easier...

Sent from my C6603 using xda app-developers app
 

k03703

Senior Member
Jun 1, 2012
58
15
Los Angeles
Hi all,

Need help, I install the recovery, and the tablet automatically reboot to CWM, so I know the recovery installed correctly. But I can't access the recovery anymore after. I tried pressing the volume up button when the green LED is on no luck, tried pressing the volume up when pressing power button and holding both, not turning on, pressing the volume down when the green LED is on, no luck either, holding the volume down with power button will make the tablet go to safe mode. I tried flashing the reboot wrapper and boot using Goo and ROM manager to boot to recovery, no luck either. The only way I can get to recovery is to run the batch file again. Did I miss something?

Thanks in advance.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    -=[XZDualRecovery]=-
    PhilZ Touch & CWM & TWRP
    *** For Locked and Unlocked BOOTLOADERS! ***


    Welcome to the Xperia Tablet Z Questions & Answers thread!

    I proudly present you the first and only DUAL RECOVERY for locked boot loaders on our lovely Xperia phones! :cool:

    If you have an unlocked bootloader and chose to keep the STOCK Sony kernel, you can also use this MOD.

    Currently supported XPERIA models:
    These are also links to the device specific Q&A threads.
    Xperia Z: SO-02E, C6602, C6603, C6606, C6616
    Xperia ZL: C6502, C6503, C6506
    Xperia Tablet Z: SO-03E, SGP311, SGP312, SGP321, SGP351
    Xperia Z Ultra: C6802, C6806, C6833, C6843
    Xperia Z1: C6902, C6903, C6906, C6943, C6916
    Xperia Z1 Compact: D5502, D5503, D5506
    Xperia Z2: D6502, D6503, D6506, D6543, D6563
    Xperia Tablet Z2: SGP511, SGP512, SGP521, SGP551, SGP561
    Xperia ZR: C5602, C5603, C5606
    Xperia T, TX, TL and V: LT30p, LT29, LT30at, LT25i
    Xperia S: LT26i
    Xperia SP: C5302, C5303
    Xperia T2 Ultra: D5303, D5322
    Xperia Z3: D6603, D6633, D6643, D6653, D6616
    Xperia Z3 Compact: D5803, D5833
    Xperia Tablet Z3 Compact: SGP621, SGP641, SGP651

    To follow development, be sure to check the DevDB thread!
    13
    INSTALLER: How to install using the installer:
    1. Make sure you have USB debugging turned ON.
    2. download TabZ-lockeddualrecovery[VERSION]-RELEASE.installer.zip from http://nut.xperia-files.com
    3. Windows:
      1. unpack at C: or somewhere you will remember!
      2. navigate to the resulting directory and look for install.bat, double click it to run;
    4. Linux:
      1. unpack in your home folder with 'unzip TabZ-lockeddualrecovery[VERSION]-RELEASE.installer.zip'
      2. navigate to the resulting directory and 'chmod +x install.sh', then execute it, follow instructions.
    5. Your phone WILL reboot when installation has completed and it will go into the default recovery for the first boot.
    6. Reboot to system from recovery to allow the installer to clean up after installation (it is safe to skip this step).
    7. Enjoy DUAL RECOVERY!

    How to install or update using a previously installed (XZDualRecovery) recovery:
    Create a backup of /system/bin/chargemon and keep it somewhere safe, then just flash TabZ-lockeddualrecovery[VERSION]-RELEASE.flashable.zip from http://nut.xperia-files.com using CWM or TWRP.

    How to remove:

    Delete the following files:
    /system/bin/recovery.twrp.cpio.lzma (or .tar)
    /system/bin/recovery.cwm.cpio.lzma (or .tar)
    /system/bin/recovery.philz.cpio.lzma
    /system/bin/charger
    /system/bin/dualrecovery.sh
    /system/bin/mr

    Rename /system/bin/mr.stock to /system/bin/mr to restore stock functionality, then inside /system/bin/ rename chargemon.stock to chargemon check its permissions (should be 755 or otherwise visible as -rwxr-x-r-x). Done!


    When installing custom ROMs:
    Be sure to flash TabZ-lockeddualrecovery[VERSION]-RELEASE.flashable.zip from http://nut.xperia-files.com after installing the ROM and before you reboot, this way you will not lose recovery!

    How to use:
    At boot, once you feel the phone vibrate and while you see the green led burn:
    - press VOL-UP for PhilZ Touch;
    - press VOL-DOWN for TWRP.

    To enter Vanilla CWM, you will need to use the (free) NDRUtils app from the Play store

    2.x Features:
    • When you have a SDCard1 and the XZDualRecovery is able to use it, you can put a file called 'donotrun' inside the XZDualRecovery log folder to make XZDualRecovery escape following boot attempts.
      If you find yourself in a bootloop situation, take out your SDCard1 and put that file in the directory if it exists using a PC. Reboot your phone with Power+Vol-UP and you will be able to boot your phone as if there was no recovery there!
    • XZDualRecovery will signal the escape or any reason why it would not be able to continue normal operation with a 2 second burn of your LED in the color RED. A reason would be a broken /cache and no SDCard1 or a busybox in /system/xbin which does not support the lzcat command. If you see that, check /tmp/XZDualRecovery for a logfile there, it will tell you why.
    • XZDualRecovery will try to use your SDCard1 for logging and functionality, if it has been formatted with ext2/4, FAT16/32 or exFAT. NTFS is currently unsupported.
    • XZDualRecovery now prevents the RIC service from starting up, this means when running XZDualRecovery the Remount-Reboot fix is no longer needed.

    Defaults:
    • The default on first boot with the boot-to-recovery flag set by any recovery is PhilZ Touch Recovery.
    • Init.d support is disabled by default, set dr.enable.initd to true to enable it.
    • Insecure ramdisk support is disabled by default, set dr.insecure.ramdisk to true to enable it, set to 'power' to boot it by pressing the power button at boot.

    Error reporting:
    Please, when reporting errors or problems:
    • Put up a notice in this thread providing the package name you used to install or update;
    • Include ROM name and/or FW version numbers;
    • Include what SU apk you are using (SuperUser or SuperSU)
    • Send me the contents of all the log files from right after a failed boot attempt or a link to an archive containing these logs by PM (that's including the .old rotation logs!). If you have no website or online location to store the logs, PM me for an email address to send them to.
    • Logs can be found inside:
      • /cache/recovery
      • /tmp/XZDualRecovery
      • /storage/sdcard1/XZDualRecovery
      • /cache/XZDualRecovery (if the previous exists, this one will not!)
      NOTE: I need them ALL!
    I really need them to troubleshoot what failed and what worked OK. Thank you!

    -------

    Special Thanks:
    • @DooMLoRD for all his excellent work on our much loved Sony phones!
    • The Team Win developers for TWRP
    • The ClockWorkMod developers for CWM
    • @alexocean for his awesome job testing almost all FW releases and the discovery of SuperSU causing problems for the installation of this recovery!
    • @RoberM for testing
    • @surdu_petru for testing and handy pointers
    • @Androxyde for allowing to use his linux and mac adb binaries.
    • @lancebukkake for finding the TWRP 'fix' to use exFAT formatted sdcards!
    • @delewer for the final fix for TWRP and its use of exFAT formatted sdcards
    • @DevShaft for some code help on the windows installer (the menu!)
    • @Androxyde again, but now for his bash code/script suggestions... oh boy this guy is a genius! :highfive:
    • @Tamirwig and @shoey63 for their excellent job at testing early BETA's (Xperia Z)
    • @gregbradley for his extensive testing on the Xperia Z1

    Well, enjoy! :fingers-crossed:

    The origins of this XZDualRecovery package are in the packages done by:
    Krabappel2548, Cpasjuste and DooMLoRD
    Thank you for your excellent work guys! :victory:
    Your thanks (and donations) should (also) go out to them, they deserve it! :highfive:
    4
    Yes ,. It aligns correctly now ,. :good: :D

    Will you include it in the next beta or we have to do it manually ?

    I'll include a correctly working version in the next beta package line, as soon as 2.7 is released as 'RELEASE' package.

    I will start a seperate package line for all supported models as 2.8 beta, which should eventually have a true tablet Z version of PhilZ Touch Recovery as well.

    As soon as they (all supported models) have been released and reach the 'RELEASE' status, BETA 2.9 will become a single installation package again but it will contain all variations and assemble the correct recovery ramdisks during installation.

    Big plans, but having a single unified installer and the ramdisk assembly are needed to keep the overall package size low and keeps overall maintenance and the future release plans simple ;)
    3
    Is there also support for the SGP311 and SGP312?

    Probably yes, but i can not say yes for 100%. Just install 2.5 BETA and see, it will most probably work.
    3
    Confirmed. It worked on my SGP311. I did a CWM backup without a glitch. Still have to try to restore.

    Enviado desde mi SGP311 usando Tapatalk 2