[DEVDB][TWRP][PhilZ Touch] XZDualRecovery 2.8.26 RELEASE

Search This thread

alexocean

Member
Jul 25, 2011
19
9
Thanks :)

I've asked @krabappel2548 to do a code review, I am missing whatever is causing this behavior. I'm hoping a fresh look at things can help solve this mystery...

Need device specific information!

Can people running in to problems please report what firmware version you are running?

Mine is .434 NL Generic. Maybe the problems are caused by a difference there...

To be honest, I'm clutching at straws there, I really have no idea why my dual recovery scripts fail on some phones and works just fine on others (like mine)...


Here are my device specifications:

Xperia Z (C6603) with bootloader locked (not unloackable, maybe its this)
Firmware .434 NL Generic, same as yours.

Have tried it yesterday with a fresh stock install of the .434 NL

Another thing, i previously rooted my phone with the v30 binary installer.Maybe it has something to do with it?

I have no problem to make some tests, im using two Z (one for firmware,mods,etc... tests) but i can tell you that on the other device the same thing happens.There was only one working version that i dont remember...maybe 1.6 but CWM was not working, only TWRP

Regards and sorry for my bad english

EDIT 1: I have installed now the 1.6 version to see and confirm that it was the version without the purple led vibration problem.It works but with the cwm not boot problem (vol down starts twrp without problems, vol up doesnt start cwm, it stays on a black screen after sony logo with purple led but without vibrations).
So after installed 1.6 i have tried to use the latest update.zip to see if it works.Twrp tells me that the install was succefull but the recovery has no changes, it stays on 1.6 with the cwm boot problem.

I will try now UK version and edit this post with the results
 
Last edited:
  • Like
Reactions: [NUT]

[NUT]

Senior Member
Here are my device specifications:

Xperia Z (C6603) with bootloader locked (not unloackable, maybe its this)
Firmware .434 NL Generic, same as yours.

Have tried it yesterday with a fresh stock install of the .434 NL

Another thing, i previously rooted my phone with the v30 binary installer.Maybe it has something to do with it?

I have no problem to make some tests, im using two Z (one for firmware,mods,etc... tests) but i can tell you that on the other device the same thing happens.There was only one working version that i dont remember...maybe 1.6 but CWM was not working, only TWRP

Regards and sorry for my bad english

As i am using the same binaries for this dual recovery as Krabappel2548 and Cpasjuste for the single recoveries, that should not really be a problem.

Do you have an external sdcard (sdcard1)? If so, is that formatted as FAT32? If it is, you can create a folder called XZDualRecovery there before installing 2.0 and put in a file called 'donotrun' to prevent it from running the parts of the script that cause the phone to hang or bootloop. That way you can still see if the /tmp/XZDualRecovery/preperation.log contains any errors.

For anyone having the same issues this is the same, you can take out your SDcard and put in the same file on a pc to prevent it from locking up your phone at boot.

If you want to test it problem free but do not have a SDcard, before installation of 2.0 create a folder called XZDualRecovery inside /cache and put in the same file. If your sdcard fails to mount, it will still use cache and skip the part of the dual recovery setup which is most probably causing the current problems.

Another test is to put a file called 'default' inside the same folder with just the word 'twrp' in that file on the first line. That way dual recovery will try to boot to TWRP after installation, instead of the default CWM.

The current BETA release has been pulled apart in to 2 files:

Stage 1: /system/bin/chargemon
  • Kickstarts the log inside /tmp/XZDualRecovery called preperation.log logging all actions and commands this stage takes or executes.
  • Checks busybox support for lzcat
  • Copies busybox to /sbin
  • Creates symlinks to all the supported commands inside /sbin
  • Copies all the important files to /sbin (located on the ramdisk, improves performance during recovery boot)
  • Copies /system/bin/dualrecovery.sh to /sbin/init.sh
  • Tries to mount sdcard1 on /storage/sdcard1
  • Creates the folder called 'XZDualRecovery' on sdcard1 if it can, removing /cache/XZDualRecovery and /cache/chargemon as they are nolonger needed.
  • If sdcard1 fails to mount, creates a folder 'XZDualRecovery' in /cache
  • Sets the /*logpath*/ for stage 2
  • Checks if the file 'donotrun' exists inside the log directory in cache or on sdcard1, and if it does, exits to the regular chargemon application
  • Checks if the file 'drdebug.sh' exists inside the log directory in cache or on sdcard1, and if it does copies that over /sbin/init.sh to make sure stage 2 runs the debug script.
  • Rotates the previous log inside /*logpath*/ to the *.old file and creates an empty file for this boot
  • Starts Stage 2 /sbin/init.sh (either the regular or the debug version) passing some parameters (/*logpath*/ and logfile name).

Stage 2: /system/bin/dualrecovery.sh (copied to /sbin as init.sh)
  • Kickstarts the log inside /*logpath*/ called XZDualRecovery.log logging all actions and commands this stage takes or executes.
  • Checks if /*logpath*/boot or /cache/recovery/boot exists
  • Triggers the led and vibrator
  • Checks the volume keys for a keypress
  • If either of the above checks is NOT triggered, it exits to chargemon.stock and continues regular boot
  • If one of the above checks is triggered it will determine which button got pressed.
  • Double checks if the recovery files are where they are supposed to be and selects the chosen one to be unpacked, based on either 'default' file or button choice
  • Stops all the already started services
  • Unmounts all mounted partitions (except /cache and /storage/sdcard1)
  • Cleans up the ramdisk (rootfs mounted on /), deleting everything except ('.', '..', '/'), /cache, /storage, /sbin, /dev, /proc and /sys
  • Unpacks the recovery ramdisk of choice onto the ramdisk
  • Unmounts /cache and /storage/sdcard1
  • Executes recovery init, booting to the recovery of choice

This works perfectly for me... and considering the problems others are having with this package... I don't know why!! :mad:

This breakdown is meant for anyone who wants to know and especially for @krabappel2548 ... this makes the code review a little easier i gues :)

It seems the problems are caused by Stage 2... but... How? What? Why!? And especially ... How to fix!?
 
Last edited:

[NUT]

Senior Member
From PM, testing and results by alexocean

alexocean said:
[NUT] said:
alexocean said:
[NUT] said:
What version of the firmware do you have?

I've developed the dual recovery on .434 NL Generic, I'm guessing it might be the reason for the problems?

Im using your same firmware (because it was one of the first to get the 434 update).My ftf file is:
C6603_10.1.A.1.434_Generic NL.ftf

Maybe it has something to do with my bootloader allowed no permision (i cant unlock my bootloader so it has never been unlocked).
Im sending one of my Z to sony this week for bootloader status change, but i have another Xperia Z to make some tests and help you out if you want.Have no problem to reflash and reflash hehe.
I will try in some minutes to use the UK firmware and see if it makes some difference.

Regards and sorry for my bad english !!!

Thanks a lot for the help, having a second phone does help a lot when testing :)

Hey, i have installed the .350 UK version and rooted with binary.Then installed your 2.0 package and it works (twrp and cwm 6.0.3.0).This is the first time it works.I will test it now with the .434 UK ftf file, must download it first because i only had on my pc the .350 version.
I will make later another test, downloading the .350 file from the NL version and update it with pccompanion or OTA and see if the problem is only on the "C6603_10.1.A.1.434_Generic NL.ftf" file (i think i have downloaded it here in XDA) .

Need some minutes to make the tests.

Regards and thank you for this great mod.

Eh... this actually hints to some other issue, one with the rooting process...

Anyone having the problems with the boot 'hanging', after you have restored the system partition and have your phone running again:
After rooting your restored phone:
1: Install a root explorer, remount /system as rw to enable writing to it.
(if your phone survives this step, go to step 2)
2: copy any file larger then 100Kb to /system and try to remove it again.

IF my hunch is correct, your phone will most likely do a sudden reboot either while remounting /system or while copying the file to /system...

What if your phone did that?

  1. Restore stock FW using SUS or FLASHTOOL;
  2. Complete first setup and reboot your phone;
  3. Then root it straight after the reboot.
  4. IF rooting fails for _ANY_ reason and you would need to try it again, Go back to step 1 (Seriously!!)
  5. When rooting worked OK the first try, try the previous root explorer test
  6. If your phone no longer reboots with that test, try to install Dual Recovery 2.0
  7. Post results here!!!

My phone did that too, the only solution i found was to restore the firmware and have the rooting process succeed 100% the first try, when it did i had no reboot issues, while when the first attempt failed after a second attempt it came back.

If you have downloaded the installer package, open run.sh inside the files directory with notepad, delete the reboot command at the end. When you have done this step and your phone still reboots when installing Dual Recovery 2.0 BETA, your phone has the 'root bug' for sure.
 
Last edited:

alexocean

Member
Jul 25, 2011
19
9
Im doing some firmware + dualrecovery tests.

Flashed C6603_Unbranded_10.1.A.1.350 UK.ftf (.350 UK version) with latest flashtool.After that i used v30 root package from binary and installed 2.0 dualrecovery installer.
Results: DualRecovery WORKING

Updated the C6603 UK .350 with pccompanion to .434 UK.After that rerooted with the v30 package from binary and installed 2.0 dualrecovery installer.
Results: DualRecovery WORKING

Flashed C6603_10.1.A.1.434_UK unbranded.ftf (.434 UK version) with latest flashtool.After that, same thing, used v30 from binary and 2.0 dualrecovery.
Results: DualRecovery WORKING

Flashed C6603_10.1.A.1.434_Generic NL.ftf (.434 NL version) with latest flashtool. Installed binary root v25 package (problems with v30, maybe this could be the problem) and the 2.0 dualrecovery.
Results: DualRecovery FAILED (purple led and vibrations every 3-4 seconds)

And as final test i have done the same with .350 spanish rom and then updated to 434 with pccompanion.
Results: DualRecovery WORKING on .350 and .434.

I dont have the .350 NL firmware for testing and cant find it.

So far as i can see the only difference on the failed NL firmware is that the only change i made was installing another root package because v30 doesnt work for me on NL firmware.
I will try one thing, i mean it can be the problem.V30 package installs superuser and the V25 package installs superuser or supersu (i selected supersu) so the only difference is between superuser and supersu.

Will do a reflash and reroot of the 434 NL ftf but this time with superuser and see if it works.I need 5-10 minutos to confirm this.

One again, sorry for my bad english.

---------- Post added at 03:28 PM ---------- Previous post was at 03:15 PM ----------

Buaaa, it was the supersu method on rooting.NL is working fine now with superuser.
Installed the .434, rooted with superuser method then installed dualrecovery and the problem with the purple led/vibration are gone.

What i have see on SuperSu is when i install the dualrecovery installer it asks me for permission and on superuser it doesnt ask.

For me, its working now
 
Last edited:
  • Like
Reactions: [NUT]

[NUT]

Senior Member
[SNIP]
What i have see on SuperSu is when i install the dualrecovery installer it asks me for permission and on superuser it doesnt ask.

For me, its working now

Awesome testing dude!
worshippy.gif


The difference in SuperSU and SuperUser is not only the APK, i have noticed the 'su' binary from SuperUser is able to do much more and DOES support the -c (command) switch fully. The 'su' binary from SuperSU does not support the -c switch the same way... and i guess that is what is breaking the installer package... :eek:

I am using SuperUser myself and rooted using the method put up here on XDA by @DooMLoRD.

Now... @alexocean, one more request for testing:

Can you take a clean install and install CWM or TWRP using the packages created by @Cpasjuste or @krabappel2548 and then test the flashable ZIP install version? I've seen some reports about flashing it causing the same issues as the installer version, so if you have some time to spare and feel up to it, can you test that too?

Seriously, you are on my list of memorable members of XDA:
worshippy.gif
worshippy.gif
worshippy.gif
worshippy.gif
 

alexocean

Member
Jul 25, 2011
19
9
I will conclude going from CWM 6.0.2.8 to lockeddualrecovery2.0.zip does not work.

No recoveries at all.

I have tried that yesterday and you are right, the phone boots and recovery is there but the same 6.0.2.8 previously installed.CWM tells that it was installed succefully but the recovery is the same.

[NUT], im at home in 1.30 - 2 hours, i will try installing the zip with a fresh install and superuser with CWM 6.0.2.8 v4 and TWRP.I have only tested it yesterday but with the NL firmware + supersu that was not working.
Now i know that superuser works perfect.
Another thing, after working dualrecovery you can install SuperSu again and delete Superuser without problems, tested some hours ago.

Thanks to you [NUT] for this great dual Recovery, i like it very much hehe.
 
  • Like
Reactions: [NUT]

alexocean

Member
Jul 25, 2011
19
9
Ok here are my test results for installing the lockedualrecovery2.0.zip file using previously installed CWM 6.0.2.8 v4 package.

1. I have flashed a complete new 434 firmware.
2. Rooted with binary package (superuser)
3. Installed CWM 6.0.2.8. package installer for locked bootloaders

Result: CWM installs the zip just fine but there is no recovery to show but the phone boots (no purple led problem).So i have thinked, let me look on my sdcard and noticed that there is no "XZDualRecovery" folder. From my previously backup i restored the folder to my external sd card and rebooted the phone and now, dualrecovery is working fine.

My XZDualRecovery folder contains:

chargemon.log
chargemon.log.old
XZDualRecovery.log
XZDualRecovery.log.old

Hope this can help you a little bit out to find the solution.

---------- Post added at 09:55 PM ---------- Previous post was at 08:56 PM ----------

No more purple led/vibration problem with this method:

I have copied the XZDualRecovery folder to external SD then i rooted my phone with supersu method and thats it.Having the XZDualRecovery folder on external SD before you install the dualrecovery.zip through cwm or twrp or using the installer works 100%.
Tested now on my two xperias, one with supersu and the other with supersu+nl firmware (the same that gives me the problems yesterday).

Now im trying to make it with an empty XZDualRecovery folder without the logs, will edit this post in some minutes with the final results.


EDIT 2: Confirmed, putting an empty folder named "XZDualRecovery" on external SD Card before flashing the dualrecovery2.0.zip with CWM/TWRP or flashing it with the installer works 100% either with superuser or supersu.
 
Last edited:
  • Like
Reactions: [NUT]

[NUT]

Senior Member
I will conclude going from CWM 6.0.2.8 to lockeddualrecovery2.0.zip does not work.

No recoveries at all.

Now im trying to make it with an empty XZDualRecovery folder without the logs, will edit this post in some minutes with the final results.

EDIT 2: Confirmed, putting an empty folder named "XZDualRecovery" on external SD Card before flashing the dualrecovery2.0.zip with CWM/TWRP or flashing it with the installer works 100% either with superuser or supersu.

I have updated the zip files for 2.0.

* Fixed the update package, this should now work as intended (a cook error in my kitchen actually copied the updater script into the flashable zip's directory, instead of it's own!)
* Due to the above issue, the flashable zip is now fixed too!
* Fixed the chargemon script, it now creates the directory... dunno how that got removed, but it was gone!
* Simplified some stuff, made the chargemon script a little smaller in the process

Files now available for download on http://www.fun-industries.nl/xda/ and they are named the same... it's still release 2.0 BETA.

The issues with the installer and SuperSU have not yet been fixed, so be careful.

IF you see the LED turn RED, something crucial went wrong or a 'donotrun' file is found and the chargemon script will exit to the regular boot process.
IF you see the LED turn BLUE, there is a script called drdebug.sh inside the XZDualRecovery directory and it took the place of the original stage 2 file.
IF you see the LED turn GREEN you will most likely feel your phone vibrate as well. You know what to do there, it will turn PURPLE if a recovery has been selected. :)
 
Last edited:
  • Like
Reactions: RoberM

RoberM

Senior Member
Oct 12, 2011
253
121
ESPAÑA
My system:

- Xperia Z 6603 .434 fw, Locked Bootloader
- Rooted + Superuser
- CWM recovery 6.0.2.8

Installed this Dual Recovery using windows installer "lockeddualrecovery2.0.installer.zip"

Everything works perfectly, both recoverys work.

Nice work [NUT]
 
  • Like
Reactions: [NUT]

[NUT]

Senior Member
After some more testing by @alexocean and @RoberM i've silently updated the packages to BETA 4 and then BETA 5...

I'll update the topic later tonight, but from now available on http://www.fun-industries.nl/xda is:

XZDualRecovery v2.0 RELEASE

All issues have been resolved, OP update and changelog will come tonight.

EDIT 18:06 - Updated OP, Change log will come later.
 
Last edited:

[NUT]

Senior Member
[XZDualRecovery] Version 2.0 released!

Change log:
Version 2.0:
  • Split the functionality up into 2 scripts
  • Stage 1 does all the checks and Stage 2 does the key/file check and prepares the phone for the recovery chosen to start.
  • Stage 1 copies all the relevant files to /sbin (which is on the ramdisk, in RAM) which speeds up the recovery boot process.
  • Stage 1 symlinks all the supported commands from busybox to /sbin (This improved the readability of the scripts but will come to good use in a feature which is supposed to get built in sometime)
  • Improved busybox command checking, making it quite bulletproof.
  • Improved logging a lot, making it more complete and readable.
  • Code cleanup, tightening the strict use of shell scripting standards and best practices.
  • Improved the mounting of the external SDCard. Still no exFAT or NTFS though.
  • Will remove the XZDualRecovery or chargemon folder in cache as soon as SDCard1 is available for use.
  • Now checks for a file called 'donotrun' inside the XZDualRecovery folder, if it does, it aborts any attempt to load Stage 2, including debugging scripts. (on sdcard that makes more sense, as you can put in that file on a PC and then reboot the phone with the Power+Vol-UP key combo)
  • If a drdebug.sh script has been found inside the XZDualRecovery folder it replaces Stage 2 with this file.
  • If a debug script has been found, it will change the logfile to from XZDualRecovery.log to XZDebug.log and will use that during testing.
  • Set a default set of colored warnings, these will not change anymore:
    • If you see the LED turn RED for 2 seconds, something crucial (e.g. it did not find lzcat support in busybox) went wrong or a 'donotrun' file is found and Stage 1 will exit to the regular boot process.
    • If you see the LED turn BLUE, there is a script called drdebug.sh inside the XZDualRecovery directory and it took the place of the original Stage 2 file.
    • If you see the LED turn GREEN for 3 seconds you will most likely feel your phone vibrate as well. You know what to do there, it will turn PURPLE when a recovery boot has been selected, either by /cache/recovery/boot, XZDualRecovery/boot or when one of the volume keys has been pressed. The purple LED will turn off as soon as the recovery init has been started and recovery is booting up.
  • The installer has been forked in to 2 scripts;
    • When you use SuperUser on your phone, run superuser.bat to install
    • When you use SuperSU on your phone, run supersu.bat to install, notice and follow the instructions!
    NOTE: Make sure you run the right one when using SuperSU and to follow the instructions: you risk a bootloop if you do not!
  • Fixed a bug in my kitchen, causing the update zip to have NO flash script and the flashable installer to have the wrong one...
  • Now using BETA and RELEASE tags on my releases.
    • RELEASE can be considered stable and safe to use.
    • BETA requires you to take precautions (backups, backups and more backups!), it might be necessary to reflash your phone if or when it goes south!

Files are available now on http://www.fun-industries.nl/xda/ and through the guides in the OP.

:victory: ENJOY! :victory:
 
Last edited:
  • Like
Reactions: alexocean

alexocean

Member
Jul 25, 2011
19
9
BETA Change log:
Version 2.1:
  • Updated CWM to 6.0.3.2, originally built by @DooMLoRD

The BETA release is available for download on http://www.fun-industries.nl/xda/

Please let me know if it works OK for your phone!

Updated the beta with CWM from the Release version of DualRecovery, CWM 6.0.3.2 and TWRP 2.5.0.0 boots fine, also phone boots fine too.
More tests tomorrow (installer and fresh install).

Thanks again NUT !!!
 
  • Like
Reactions: [NUT]

Top Liked Posts

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

    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: C5502, C5503, C5506
    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

    I will be adding more and more devices to the list in the near future, keep your eyes on this thread for them to be released :)
    I will also start a Q&A thread for each of the models officially supported, once released from the experimental stage.

    XZDualRecovery User Manual

    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
    • @russel5 for his tinkering and general debugging help :cool:

    GitHub Repository:
    https://github.com/xNUTx/XZDualRecovery

    Downloads:
    All past, current and future releases will appear on http://nut.xperia-files.com/ for download, also providing a QR code for easy downloading on your mobile :) The flashable file will bring any previous version to the latest release.

    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:

    XDA:DevDB Information
    XZDualRecovery, Tool/Utility for the Sony Xperia Z

    Contributors
    [NUT], AngelBob , shoey63 , Olivier, Krabappel2548, DooMLoRD, Cpasjuste, Tungstwenty, sijav, zxz0O0, MohammadAG, McBane87, oshmoun
    Source Code: https://github.com/xNUTx/XZDualRecovery


    Version Information
    Status: Stable
    Current Stable Version: 2.8.26
    Stable Release Date: 2016-02-22

    Created 2013-07-18
    Last Updated 2016-02-22
    250
    Hello guys,

    I noticed there are some problems getting dualrecovery to work on Lollipop. I created a small hack to bypass the SELinux enforcement (wonder why no one else created it already). Anyway I attached a little bat file to fix dualrecovery again (tested on Z3C).

    Source will be released in the next days and probably also integrated in the official dualrecovery.

    Happy eastern.

    Edit: Source available here https://github.com/dosomder/byeselinux
    136
    Known Issues and Frequently Asked Questions

    Known Issues:
    All known issues in PhilZ, TWRP and CWM on locked boot loaders apply, see their respective threads for more information.

    Busybox updaters can kill XZDualRecovery, see the FAQ below for more information.

    Frequently Asked Questions:

    How to set the correct time & date in PhilZ 6.59.0
    • Boot to PhilZ Touch;
    • Tap 'Recovery Settings';
    • Tap 'Gui Preferences';
    • Tap 'Time Settings';
    • Tap 'Change date and time';
    • Tic one of the last 3 options in this menu to try it;
    • Reboot to PhilZ Touch to see if it sticks, if not, try another and reboot to see if it helped, do this for all options to try them;
    • If one of them does help but does not stick at reboot, tic 'Try Force Persist on Reboot' once (it will un-tic itself after a reboot).
    • Done! :)

    NOTE: if it's close to being correct (max 15h difference before or after your time) you need to correct the timezone.


    About TWRP 2.6 and the use of INTERNAL STORAGE
    [snip]...but permissions are set like: Srw-Srw-r (644) (It seems like the 'S' is the problem, I'm sure GID and UID are ticked)...[snip]

    A workaround for this issue is to use TWRP's advanced options, after creating a backup you wish to move to the PC:

    1. go back to the main menu
    2. go to advanced
    3. go to filemanager
    4. navigate to /data/media/0/TWRP/BACKUPS/*SERIAL*/*BACKUPNAME*
    5. select one of the backup files
    6. press chmod button (the one without 755)
    7. type 0664 and press go
    8. repeat 5->7 for each of the files in the backup, you can skip boot and the md5 files.
    9. reboot to system and you should be able to copy the files without problems.

    Alternatively you can install adbd Insecure by @Chainfire (non-free app from Play, or for free from it's XDA thread) and run ADBd itself as root, which elevates the rights and omits the issue all together.

    I think it's a feature and not a bug (as it secures your backups), but I'll try to convince Team Win to make the setuid/setguid a choice rather then a default.


    Installation of XZDualRecovery on UNROOTED devices
    The 2.8.21 and older installer package uses Easy Root Tool for various Xperia phones, it is able to gain root on all of the currently supported devices, allowing to install XZDR.

    Confirmed working:
    • Z - C6603
    • Z1 Compact - D5503 (doesn't seem to work on JellyBean), SO-01F (docomo)
    • Z1 - C6903,
    • Z Ultra - C6802, C6833
    • ZR, C5502
    • Z2 - D6503
    • Z2 Tablet - SGP511, SGP512
    • ZL2 - SOL25

    If you want to help me perfect this list, use the tool done by @zxz0O0 in his topic and try to root your device. When testing also try older ROM versions, the latest FW versions may have been patched.

    Thanks @zxz0O0 for the initial list.

    The rootless installation has been made possible by:
    • @geohot: Root exploit
    • @MohammadAG: Disable RIC kernel module (Link)
    • @cubeundcube: Disable RIC on Z2 phone (findricaddr/writekmem)
    • @zxz0O0: for creating the initial tool where I have based this unrooted install option on.

    Thanks for your hard work guys! :highfive:

    The 2.8.22 and later installer package uses rootkitXperia for various Xperia phones, it is able to gain root on all of the currently supported devices -if they are running the correct Lollipop version- allowing to install XZDR.

    Thanks go to @cubeundcube and @zxz0O0 respectively for developing and making some changes to allow me to utilize it for XZDualRecovery installation. Thanks guys!


    XZDualRecovery's (2.8.21 and older) Busybox dependency and compatible Busybox updaters

    Busybox Updater/Installer: If you have XZDualRecovery installed, un-install any Busybox updating app/tool as most if not all of them will install a version of busybox which does not support the lzma compression applets XZDualRecovery depends on. The version installed together with XZDualRecovery is very stable and I have yet to hear anyone complain about it's stability.

    @vaisakh7 found a busybox updater which seems to be compatible with XZDualRecovery: Busybox On Rails, which installs a version of busybox created by stericson, which leads me to believe his Busybox installer should also install a version which works together with XZDualRecovery.

    Either case, be careful with updating busybox as there still is a possibility it will break your ability to enter recovery or even break full root, which means you might not be able to recover from the broken situation. Your best bet is the installer version, using that to break the lock on the system partition and reinstall the correct busybox.

    XZDualRecovery 2.8.22 and newer do not suffer from this dependency, you can use whatever busybox updater app you like when you have 2.8.22 or newer installed.


    I installed XPOSED on Lollipop and now I am experiencing a boot loop!

    @ondrejvaroscak found a workaround to fix your bootloop issues: [WORKAROUND] Bootloops with Xposed in Lollipop

    While using the installer I get the message "This device is unauthorized" and I can't install XZDualRecovery!

    Authorizations... The latest versions of adb and android need this, it's nothing XZDR related. If you have USB debugging turned on, and your mobile disconnected from your PC, just make sure you 'revoke all authorizations for USB debugging' in the developer options menu. Then reboot your phone and before doing anything else, make sure you're looking at the home screen on your device, then hook up your USB cable. Your mobile should then ask if the connected PC is authorized or not. Once answered you can start the installer.
    122
    A small update on progress:

    The issues with XZDR are mainly caused by Sony actually properly setting up SELinux support for the very first time on the LP ROM's, something they neglected in all of the KK releases. This makes the LP version a lot more secure, which is a good thing. The problem is that I now know what to fix, but am still looking in to how to fix it. :angel:

    For the techies among us:

    During INIT the hijack still works, but the script is not able to change anything on the rootfs, it allows you to create a folder and if you mount a tmpfs on it you can write stuff to it, but if you try to write anything to the folder as it is (without tmpfs) it will not allow you to do so. This is because the SELinux context of my scripts is not set correctly, so the kernel blocks just about everything I try to do. I'm busy configuring and compiling a new busybox to include in XZDR with better SELinux support, as the one I am currently using is lacking the extended SELinux support I will need to fix this.
    The other problem is that init is less easy to override with the init from the recoveries, it simply continues the LP boot, I am in the progress of including 2nd-init support ( created by SkrilaxCZ ) and will be integrating parts and ideas of the safestrap project by Hashcode to fix these issues.
    The last but not least problem is that I can still mount the SDCard, but I am unable to write to it, most likely also due to the SELinux restrictions. If you remove the SDCard from the device it will use /cache which seems to be set up with less strict permissions and it will be able to do just about everything, except boot the actual recoveries.

    Last night I worked from 23:00PM all the night up to 6:30AM, pulling an almost an all-nighter. I'm not giving up just yet :cowboy:

    My thanks go to @Hashcode for a late night chat (for me that is, he was at work as he is located on the other side of the globe!) which helped me find the most likely cause.