Fixed multiple typo's and silly mistakes due to the change to the combined package (twice over!). Thanks again @russel5 :)

Flashable function only: Moved backupstockbinaries.sh to tmp/ so that the zip looks a bit more clean -or less confusing for the noobies- when unpacking.

Changed the way the installer fail/success detection is done. This is hopefully the best possible way and not needed to change ever again. :silly:

The unrooted option is written with a simple pointer towards what version it is supposed to work on, so: DO NOT TRY IT ON 5.1 AND REPORT IT FAILING TO INSTALL HERE!! :mad:

Windows installer menu only: new option, "5. Open an ADB shell", to make it easy to start a ADB shell for the people who don't know how, or just for those who find it convenient, of course ;)

Hopefully desensitized the code for the unrooted install. Still remember it might require up to 4 attempts to work. It's the nature of the exploit.

Updated the installer to not even attempt an unrooted installation if the Android version is not supported by the rootkit used.

Made a booboo in the batch file, fixed it.

Version 2.8.22:

Moved most of the files XZDR depends on to /system/.XZDualRecovery, including busybox, which will allow you to use whatever version of any busybox updater apps you can think of, as XZDualRecovery now uses it's private location for anything it might need. Thanks to everyone who helped debugging this release during it's BETA stage :highfive:

Somewhere in the development process of 2.8.22 CWM and PhilZ broke. I was able to fix PhilZ but CWM remained broken after several attempts to fix it. As it's old and quickly becoming obsolete, I removed it from XZDualRecovery. If you really want it back, install 2.8.21 instead.

Made a small modification which should prevent system lockups inside recovery, thanks to @McBane87 for that fix.

The kernel version needs to be fixed due to the missing CWM package, the builder will always fail when working with 2.8.22. As nothing has changed for the kernel version itself other then the missing CWM, I will keep that on 2.8.21 until I fix it.

Changed the unrooted installation option to work with the latest rootkitXperia. This version is able to obtain root on most of the early Lollipop 5.0 ROM versions allowing the installer to work properly. I modified the installer to allow a retry as the nature of the exploit is such that it can fail to gain root and cause a reboot due to the nature of the exploit being used. If you use it, don't give up after one try, try it multiple times before reporting issues.

Version 2.8.21:

@McBane87 reported a bug caused by his busybox, fixed that by skipping the one thing which is most likely to still cause bootloops in the previous version.

Updated the TWRP busy-bar animation images, thanks to @_SIL_ for the images.

Updated the fstab.qcom to restore usb-otg functionality on the ZL as suggested by @_SIL_.

Updated the custom kernel functionality, this version should work fine on CyanogenMod rom's at least, thanks go to @oshmoun who debugged it until it worked OK :high-five:

Version 2.8.20:

Updated byeselinux to the one compiled by @McBane87, this is should fix the T2 Ultra Lollipop issues.

Updated modulecrcpatch to the version statically compiled by @McBane87

Changed some code around in dualrecovery.sh making it easier to log more

Updated sysrw.sh to only install the wp_mod.ko kernel module when needed (which is only if /sys/kernel/security/sony_ric is mounted in one of the init files)

Updated dualrecovery.sh to unmount the mountpoint /system/odex instead of the device it should be mounted on, because that might negate the solution for the Z/ZL/ZR and TabZ.

Updated TWRP to version 2.8.7.0:

Whatís new in 2.8.7.0:

Initial ground work for software drawn keyboard (_that)

Fix handling of wiping internal storage on datamedia devices (xuefer)

Allow DataManager to set and read values from the system properties (xuefer)

System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP wonít prompt to install SuperSU and TWRP wonít try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.

resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images donít take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.

Version 2.8.19:

Updated a few times to try and fix the system mount issues. @McBane87 did the leg work for me in my absence and found a definitive fix after doing some testing together, THANKS A MILLION dude, the community owes you! :good:

TWRP 2.8.6.0 has no new version number but it should be considered updated, some fixes which where included in the git repo from Team Win warranted a 'silent' update.

Smaller bug fixes and improvements all around which didn't have a huge impact.

Fixing the XZDR.prop issue which prevents new installations to store and use the input nodes needed for the key checking.

Replaced the Z1 Compact CWM with the Z1 CWM, to see if that makes it kick back to life.

Version 2.8.14:

Removed some unneeded file inclusions.

Improved the failed installation detection. Some people would get a 'enjoy the recoveries' notification while they where never installed :eek:

Updated the stock binary backup checking routines for chargemon, because in some rare situations it would create a bootloop by replacing the chargemon.stock file with a copy of the hijack script...

Introduced init.d functionality to the XZDR Kernel, I actually forgot to add this ever since I started work on the kernel version :o

Modified TWRP's postrecoveryboot.sh to not throw an error anymore if there is no reason for it to throw it.

Updated the script function DRSET-/GET-PROP to return null instead of false. If a switch was set to false it would add it to the config as if it wasn't there...

Updated TWRP to 2.8.6.0 again (see the changelog for XZDR 2.8.4 for the TWRP changelog).

Version 2.8.13:

Used to debug functionality to make XZDR work even more reliable.

Version 2.8.12:

Debugged the RIC defeat functionality to make XZDualRecovery operate on any FW version for any device, as it was before 2.8.4.

Debugged the Kernel Builder, it now produces kernels which are actually usable again :angel:

The /system/xbin/disableric script was not used since quite a while but functioned as a trigger, this has now been replaced by the chargemon hijack script doing all the work, this should now make the disableric functionality work on any ROM, regardless of FW version.

Version 2.8.11:

Used to debug functionality to make XZDR work on any ROM and any device again.

Version 2.8.10:

Introduced the XZDR.prop variable dr.keep.byeselinux, this is set to false by default but when set to true it will cause XZDR to NOT unload the byeselinux kernel module, which at least helps to get Xposed to work. For any Xposed related bugs, please report them in the appropriate Xposed thread. This setting is now valid for all release types, including the kernel version.

XZDR installer/flashable now checks if it is getting installed on a Lollipop ROM, if so, it will then adapt the location where NDRUtils is installed to the way it is done on Lollipop. This should prevent Android from 'Starting Applications' at every boot.

The download page has gone through a bumpy update, I thought I had all bugs solved, but I was wrong, as you all have noticed :p
The website:

now has a comment section;

has a better structure, offering me the option to still have a clean and easy to use website but at the same time allow me to leave more XZDR versions online;

now has a breadcrum bar, this will allow you to quickly move around;

includes a new version of the Kernel Builder.

The new kernel builder now supports repacking ANY kernel, with one basic but adamant requirement, they need to be built using the method CyanogenMod uses (the init.sh method). This means XZDR Kernel now is available for Stock, Custom Stock (kernels like DoomKernel by @DooMLoRD), CyanogenMod, OmniRom and AOSP :victory:

Version 2.8.9:

Used to test a new feature.

Version 2.8.8:

Reverted TWRP to 2.8.5.0, because of a multitude of issues with 2.8.6.0. To help Team Win debug the issues, I will keep 2.8.7 online for testing purposes. Please if you see any errors pop up, make sure you tap Advanced -> Copy log to SD and to attach it to this topic. The one about postrecoveryboot.sh failing is a known one and can be considered a false-positive: it is trying to unmount something which is already unmounted.

Made sure the installer (and only the installer in this case, the flashable package will be patched later) will install the NDRUtils app on the correct location on Lollipop ROM's. This should make the 'applications starting up' notice at boot go away. Make sure you remove the NDRUtils.apk by hand from /system/app before installing this XZDR version and please DO report your results.

Version 2.8.7:

Fully debugged for use with Sony's Lollipop and restored functionality on KitKat on all supported models. Both for locked bootloader installations and the XZDualRecovery Advanced Stock Kernel builder.

Included the byeselinux patch by @zxz0O0, heavily modified. It will unload the module when booting to the ROM to restore SELinux functionality.

Converted XZDR from using my own solution to the more elegant 'wp_mod' method by @MohammadAG. It now uses my own solution as a backup.

Made sure the modules will only be installed when required either by device or ROM version.

Updated the flashable package to do the same.

Updated the included NDR Utils to the latest version.

Updated the (installer) included adb binaries to the current latest version (Required when using TWRP 2.8.6.0 and newer).

The installer and the chargemon hijack script will now make a copy of the init 'rc' files to /system/.XZDualRecovery to be used during updates using the flashable zip, this way the (long!) list of firmwares in the installdisableric.sh script can be discarded in the future, which was only used in the flashable package because these init rc files are unavailable while in recovery.

Version 2.8.6:

Used to debug all the Lollipop issues, in total 8 re-releases. All changes recorded in the next version changelog.

Version 2.8.5:

Sleep deprived bugs and a .gitignore problem solved (which caused some critical files to not be included in the flashable package), tested on Z and Z2, the XZDR Kernel, flashable zip and installer working OK for me.

By popular demand, this version removes the module installed by the byeselinux patch by @zxz0O0 to make sure it doesn't cause issues.

Version 2.8.4:

Fixed XZDR operation for Sony's Lollipop releases, a BIG thanks goes to @zxz0O0 for creating the kernel module which made this possible! :highfive:

Updated TWRP to 2.8.6.0: Whatís new in 2.8.6.0:

Fix daylight savings time rules for USA and Europe (_that)

Allow mulitple overlays for popup boxes (Dees_Troy)

Add pattern style password entry for decrypt (Tassadar)

Keyboard improvements (_that)

Update AOSP base to 5.1 (Dees_Troy)

Reduce theme count to 5 and rely on scaling (Dees_Troy)

Various scaling improvements (Dees_Troy)

Improved handling of resources in the GUI (_that)

Make scroll bar size proportional to list size (_that)

Allow scoll lists to render without a header (_that)

Make console scroll per pixel with kinetic scrolling (_that)

Support styles in XML to reduce XML size and improve consistentcy (Dees_Troy)

Various other fixes and improvements (mdmower, bigbiff, codelover, etc)

Version 2.8.3:

Updated TWRP to 2.8.5.0. Changelog: What's new in 2.8.5.0:

Scale the GUI - TWRP can read the theme's resolution and scale it up or down to fit the theme to your screen's resolution

Backups can now be cancelled while the backup is in progress (does not include restore because we don't want to leave your device in a bad state)

Improve thread handling and move input handling into the main rendering thread to improve stability