Originally Posted by alexocean
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!!
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!?