yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] fz2:
Battery cliff bug

Ever since I installed dual recovery on my phone I kept having problems with my battery. When I would restart the phone the battery charge would sometimes drop by insane amounts (see picture). What would also happen would be my phone's battery would display something like 50% and then in the span of a few minutes it would drop down to 0% and my phone would power off.

I thought my battery was dying, because I was encountering this problem both with rooted 14.5.A.0.242 and with rooted 14.5.A.0.270. When I reverted to stock lollipop because I was planning to send it in to get the battery repaired, I noticed my battery life was good once again, so I decided to keep the phone and investigate further.

I just now realized this seems to be happening only if I hit the restart button on my phone, but not if I power off and power back on.

I'm not 100% sure of this, because I only just tried it out after my phone had lasted a full 15 hours and was at 22%. I tried powering it off and back on and it dropped down to 18% which is not a terribly unreasonable drop. Then I tried restarting the phone, and it dropped down to 0% and powered off.

I have now connected my phone to the charger, turned it back on, powered it off, turned it back on and powered it off again (to eliminate any potential battery bugginess the restart might have caused).

I am planning to let it charge to 100% while powered off and then I'll see how long the battery lasts me.

I expect to get decent battery use.

I'll also try and test the power off vs. restart theory again.

Has anyone else had similar problems?

btw, this happened using Z1C-lockeddualrecovery2.8.15-RELEASE.installer with option 3. I haven't tried any other versions.
[Sony Cross-Device General] McBane87:
With [MENTION=4354813]SquallATF[/MENTION] I'm now able to boot into recovery, but there I'm facing a new Problem.

Both Recoverys (Philz and TWRP) are not able to mount System-Partition.

See log in attachment

EDIT:

Tried to mount manually inside TWRP:

~ # mount -r /dev/block/platform/msm_sdcc.1/by-name/system /system
~ # ls /system
app etc lib odex semc vendor
bin fonts lost+found odex.sqsh tts xbin
build.prop framework media priv-app usr xposed.prop
~ # umount /system
~ # mount -w /dev/block/platform/msm_sdcc.1/by-name/system /system
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/system on /system failed: Device or resource busy
[Sony Cross-Device General] SquallATF:
I think I can not help you about this problem.
[Sony Cross-Device General] McBane87:
No Problem, you helped me a lot with those Addresses ;)
[Sony Cross-Device General] zxz0O0:
Here's a fixed version of byeselinux: https://www.mediafire.com/?pto8oyci3h2wn7c

Should also work for those devices which do not share the kallsyms addresses for selinux_enabled and selinux_enforcing.
[Sony Cross-Device General] McBane87:
Yes, this working. Perfect :good:

Big THANKS :)

<6>[ 170.312377] byeselinux: module loaded
<6>[ 170.324462] byeselinux: old selinux_enabled 1
<6>[ 170.469970] byeselinux: Error finding symbols in kallsyms
<6>[ 170.470275] byeselinux: Trying different method
<6>[ 170.482116] byeselinux: current selinux_enabled 0
<6>[ 170.493652] byeselinux: old selinux_enforcing: 1
<6>[ 170.494171] byeselinux: current selinux_enforcing: 0
<6>[ 170.494445] byeselinux: trying to load original module

And loading Recovery with this module is working, too.
[Sony Cross-Device General] SquallATF:
Is this work?

root@C6603:/ # insmod /sdcard/byeselinux.ko
insmod /sdcard/byeselinux.ko
root@C6603:/ # getenforce
getenforce
Permissive
root@C6603:/ # dmesg | grep byeselinux
dmesg | grep byeselinux
<6>[148736.620170] byeselinux: module loaded
<6>[148736.638419] byeselinux: old selinux_enabled 1
<6>[148736.803733] byeselinux: Error finding symbols in kallsyms
<6>[148736.804069] byeselinux: Trying different method
<6>[148736.815574] byeselinux: current selinux_enabled 0
<6>[148736.826469] byeselinux: old selinux_enforcing: 1
<6>[148736.826988] byeselinux: current selinux_enforcing: 0
<6>[148736.827262] byeselinux: trying to load original module
[Sony Cross-Device General] McBane87:
Yes, looks good.

If getenforce is saying permissive after inserting byeselinux.ko, then it is working.

---------- Post added at 05:59 PM ---------- Previous post was at 05:15 PM ----------

Just played a littlebit around in recovery.

Directly mounting /system in RW seems not to be possible, but with remount it is:

mount -r /dev/block/platform/msm_sdcc.1/by-name/system /system
mount -o rw,remount /system

mount | grep system
/dev/block/platform/msm_sdcc.1/by-name/system on /system type ext4 (rw,seclabel,relatime,data=ordered)

So how can this be implemented in TWRP or CWM/Philz ?
[Sony Cross-Device General] zippy01:
So does this mean recovery is working for XZ on locked bootloader?
[Sony Cross-Device General] [NUT]:
I'll try to release a new xzdr tomorrow
[Sony Cross-Device General] thunder141:
Wow that Sounds great. Am awaiting it.
[Sony Cross-Device General] McBane87:
Does nobody else than me have trouble with not mountable /system Partition on Z-Series?

I've found out that /system is mountable after it was once mounted in RO-Mode and then remounted RW.

After that mounting /system the normal way is working.

mount -o ro /system
mount -o rw,remount /system
umount /system
mount /system #works every time now

So I created a workaround in all 3 Recoveries (recovery.xyz.cpio.lzma):

1. Edit init.rc and add:

on post-fs
start xzdualmount

# This will mount /system one time as workaround for Z-Series
service xzdualmount /sbin/xzdualmount.sh
oneshot
disabled

2. Create File sbin/xzdualmount.sh:

#!/sbin/busybox sh

# Workaround for making sure /system is mountable later (Lollipop Z-Series)

while [[ ! -f /etc/fstab ]]; do
#echo Waiting FSTAB >>/tmp/mount.log
sleep 2
done

mount_ro=$(/sbin/busybox mount -o ro /system >/dev/null 2>/dev/null)$?
while [[ $mount_ro -ne 0 ]]; do
#echo Waiting RO_Mount >>/tmp/mount.log
sleep 2
mount_ro=$(/sbin/busybox mount -o ro /system >/dev/null 2>/dev/null)$?
done

mount_rw=$(/sbin/busybox mount -o rw,remount /system >/dev/null 2>/dev/null)$?
while [[ $mount_rw -ne 0 ]]; do
#echo Waiting RW_Mount >>/tmp/mount.log
sleep 2
mount_rw=$(/sbin/busybox mount -o rw,remount /system >/dev/null 2>/dev/null)$?
done

/sbin/busybox umount /system

exit 0
[Sony Cross-Device General] Lemmi1:
NUT one question. Will there be a working remount reboot fix for Lollipop in the new recovery version?

I ask, cause I wanna use link2sd on my Xperia ZR and the old one don't seems to work anymore.
[Sony Cross-Device General] deliler:
hi NUT , next version solving xperia z lollipop bootloop issue for locked bootloaders?
[Sony Cross-Device General] Rootk1t:
read last page carefully. It is already solved, but has some issues with mounting, though working.
[Sony Cross-Device General] dnaL0R:
nevermind... sorry.
[Sony Cross-Device General] adamdvd:
@up: You downloaded version for flashing in recovery (Flashable). If you are going to install XZDR via PC, you should download Installer version.
[Sony Cross-Device General] bodomfan:
Do I just copy number 1?
[Sony Cross-Device General] [NUT]:
Or, make sure you untic the box in the supersu app on namespace sharing and reboot. This should take care of these issues as well.

Pics as proof, taken from my Xperia Z.
[Sony Cross-Device General] [NUT]:
XZDualRecovery 2.8.16 Released!

RELEASE Change log:

Version 2.8.16:

Updated byeselinux to restore XZDR functionality to the Xperia T2 Ultra, Z, ZL, ZR and Tablet Z :victory: Our thanks and gratitude go to [MENTION=3975929]zxz0O0[/MENTION] again, thanks mate :highfive:
[Sony Cross-Device General] Isuru cs:
Welldone [MENTION=4904057][NUT][/MENTION] [MENTION=787413]zxz[/MENTION]0 ???
[Sony Cross-Device General] Bird40:
Thank you!

For my C6503 and SGP521 is working fine!
[Sony Cross-Device General] nielneal:
Recovery is working great and installed successful

But i cant mount system in recovery i also did what nut told about unticking the box in supersu namespace separation

What would be the issue? Init?
[Sony Cross-Device General] Bird40:
I can mount system in recovery.
[Sony Cross-Device General] nielneal:
ok buddy thanks for the info you on deodex firmware or stock one????

and this the the recovery log

I:Checking for extendedcommand & OpenRecoveryScript...

I:Ignoring 'extendedcommand' boot-script: file not found

I:Ignoring 'openrecoveryscript' boot-script: file not found

I:Checking for recovery lock...

mount: mounting /dev/block/platform/msm_sdcc.1/by-name/system on /system failed: Device or resource busy

W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 (File exists)

I:skiping set_bootloader_message: no /misc

mount: mounting /dev/block/platform/msm_sdcc.1/by-name/system on /system failed: Device or resource busy

W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 (File exists)

E:Error mounting /system!

mount: mounting /dev/block/platform/msm_sdcc.1/by-name/system on /system failed: Device or resource busy

W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 (File exists)

E:Error mounting /system!

I:skiping set_bootloader_message: no /misc

I:skiping set_bootloader_message: no /misc.....

the whole log is attached herein below any idea what would be the issue????
[Sony Cross-Device General] johan23:
I have the same problem on Philz recovery. I don't know where the recovery log is. Would like to provide it though. I am on ZL stock Lollipop.
[Sony Cross-Device General] nielneal:
the recovery log you can save it from advanced function>report error than it will be save in sdcard/clockworkmod folder than upload it;)

i am still finding out the solution for the issue

Hope anyone can help me please.;-(
[Sony Cross-Device General] Prior_Ori:
Subscribe to the above. also not mounts section of the system. ZR 5.02
[Sony Cross-Device General] thunder141:
also get can't mount system in backup in neither in Phil touch nor in twrp . Xperia Z 6603 with 2.8.16 installer version
[Sony Cross-Device General] ALp TR:
Any change other phones (etc Z2 Z3) or 2.8.15 and 2.8.16 versions are the same?
[Sony Cross-Device General] theduke7:
thanks m8 [MENTION=4904057][NUT][/MENTION] for the speedy work , but me too on Xperia Z C6603 Latest stock LP can't get system to mount on any of the recoveries... i attached the log file from TWRP

well, the good news is we don't have a bootloop :D
[Sony Cross-Device General] zippy01:
[MENTION=4904057][NUT][/MENTION] Do we reboot after unchecking namespace then install with installer?

EDIT

Sorry obviously cannot read ?
[Sony Cross-Device General] johan23:
thanks for the log method. andbe sure to tell us if you found a solution:)

here is my log btw
[Sony Cross-Device General] theduke7:
soo... this works, i tried the manual command, entering them from TWRP and system was mounted and installed the zip (in this case Xposed)

i hope this helps on a permanent fix for the issue
[Sony Cross-Device General] nielneal:
how did you do it manually from twrp??? did you created any file with that code????

and also like [MENTION=4712883]McBane87[/MENTION] told by modifying the init.rc with sbin/xzdualmount.sh worked????
[Sony Cross-Device General] theduke7:
i choose command line from the main menu > Advance, and ran each command by itself, one by one, (i selected the root)

---------- Post added at 11:28 AM ---------- Previous post was at 11:23 AM ----------

as this image, it's in Advance...select terminal Command
[Sony Cross-Device General] McBane87:
Don't know if someone else was trying this until now.

For me it is working. You just have to know, how to modify the ramdisks correctly.

Only thing I can't get around is part that TWRP is complaining about not installed os, if you want to reboot.

But you can ignore this.
[Sony Cross-Device General] thunder141:
But no way to do this in Philz Touch?
[Sony Cross-Device General] theduke7:
If there's a terminal on phillz I don't see why not... Try it.
[Sony Cross-Device General] nielneal:
done finally thanks bro but that workout is only once when rebooted the same problem persist
[Sony Cross-Device General] thunder141:
Did not find any terminal option? Can You advise?
[Sony Cross-Device General] theduke7:
when it open the file manager like browser there's a button down at the right named "select" click it...it's not a file manager , its a browser to select where ypu want to start the command... make sure when you click select you're in root , on the upper field only "/" not directory name after it.
[Sony Cross-Device General] McBane87:
In TWRP and PHILZ you can use ADB connection.

adb shell

BTW: I have uploaded this Workaround for TabZ on this Location:

http://xdaforums.com/xperia-tablet-z/general/twrp-xzdualrecovery-2-8-16-unofficial-t3134830

Hopefully [MENTION=4904057][NUT][/MENTION] has no Problem with this unofficial upload :)
[Sony Cross-Device General] theduke7:
i'm sorry i don't know anything about Phillz, i'm sure someone will< you could try TWRP, or wait, i'm sure this will be fixed soon, doesn't appear to be a big problem.

Edit

i just noticed that [MENTION=4712883]McBane87[/MENTION] has provided a fix on the above post , so try it.
[Sony Cross-Device General] thunder141:
But fix is for TabZ and I have Z
[Sony Cross-Device General] theduke7:
i mean this part
[Sony Cross-Device General] pvnsai73:
Bro it is not working on t2 ultra dual nd t2 ultra...as I find there is no "mhl_sii8620_8061_drv.ko module " in our t2 ultra may be this seem to causing the problem there may be other. .Ko file which is the original in t2
[Sony Cross-Device General] Dr_SUSE:
Are you referring to the light meter problem or just overall?

Can you provide some details?

Eg., model number (C6502/6602/03 etc.) Z/ZL, did you have to reinstall xzdr after upgrade or keep from before, since which firmware have you used xzdr, etc.
[Sony Cross-Device General] lancebuks:
I was referring to XZDualRecovery working.

I was originally on 10.3.A.0.423 and had to reinstall XZDR after upgrading 10.3.1.A.0.244

I'm currently on stock C6603 10.3.1.A.0.244 deodexed.

I'll test out the light meter and see what happens.

UPDATE: Light Meter doesn't work either
[Sony Cross-Device General] Jonathan2677:
I can also confirm my 6606 light meter is not available running dual recovery
[Sony Cross-Device General] MafiaManV:
Lost recovery....

I was on existenz v1, with toolkit v16 and twrp 2600.... Decided to upgrade kernel and baseband from .244 so i rerooted with v18 toolkit , flashed new kernel , but i can't get recovery to work ... Any advice ?
[Sony Cross-Device General] timchew:
Hi NUT. I am having a very weird situation here. I install RomAur 8.0 and then dual recovery 2.6. After rebooting and without flashing the kernel for 244 fw, I had WiFi issues as reported by other users and decided to roll back my backuped Rom monxDIFIED 3.62 in TWRP. However, in TWRP, my restore folder is empty. In my file manager, after I reboot, I could still see the backup file in my sd card.

I decided to try my luck and install back TWRP 2.43 using xz recovery apk and behold, when I entered TWRP, the restore folder indicated the backup file and I can roll back to monxDIFIED.

Guess what? When I install dual recovery 2.6 again, in TWRP recovery, the restore is empty again but the file manager indicated that the restore file is still there!

Any help to make TWRP recognise the backup rom? Thanks!
[Sony Cross-Device General] MafiaManV:
ok ,what's going on here :confused: I cleaned manually Dualrecovery files from system/bin and now i'm getting this .. .I'm using SuperSU 1.51 . Should i switch to another SU app ?

"CWM and TWRP Dual Recovery for Xperia Z locked bootloader"
"script created by krabappel2548, modified by [NUT]"

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
=============================================
Step1 : Waiting for Device.
=============================================
Succes
.
=============================================
Step2 : Sending the recovery files.
=============================================
3 KB/s (57 bytes in 0.015s)
3754 KB/s (239920 bytes in 0.062s)
7 KB/s (7775 bytes in 1.000s)
509 KB/s (8144 bytes in 0.015s)
3742 KB/s (657704 bytes in 0.171s)
3361 KB/s (2631207 bytes in 0.764s)
3488 KB/s (1504640 bytes in 0.421s)
120 KB/s (1921 bytes in 0.015s)
.
=============================================
Step3 : Setup of dual recovery.
=============================================
-rw-rw-rw- shell shell 7775 2013-07-18 01:47 chargemon
Look at your device and grant supersu access!
Press any key to continue AFTER granting root access.
Press any key to continue . . .
remount rw /system
remount rootfs rw
copy recoveries to system.
Toolbox!
Toolbox!
Unable to chmod /system/bin/recovery.twrp.cpio.lzma: No such file or directory
Unable to chmod /system/bin/recovery.cwm.cpio.lzma: No such file or directory
rename stock chargemon
copy ric
Toolbox!
Unable to chmod /system/bin/ric: No such file or directory
copy charger
Toolbox!
Unable to chmod /system/bin/charger: No such file or directory
copy hacked chargemon to system.
Toolbox!
Unable to chmod /system/bin/chargemon: No such file or directory
copy dualrecovery.sh to system.
Toolbox!
Unable to chmod /system/bin/dualrecovery.sh: No such file or directory
copy new busybox to system.
Toolbox!
make file for faster backup.
make sure firstboot goes to recovery.

=============================================
DEVICE WILL NOW REBOOT!
=============================================

Waiting for your device to reconnect.
After entering CWM for the first time, reboot to system to complete this install
er if you want it to clean up after itself.
[Sony Cross-Device General] [NUT]:
[XZDualRecovery] Version 2.6.2 released!

RELEASE Change log:

Version 2.6.2:

Updated CWM to 6.0.3.3 / CWM ADVANCED 5 built by myself, preparing to integrate the PhilZ Touch Recovery 5 by [MENTION=4666971]Phil3759[/MENTION] :D

Fixed the light sensor bug, as a result, XZDualRecovery now no longer monitors input event nodes 10 and 11.

Redid the busybox detection and integration. It now creates the symlinks to all the supported applets in /system/xbin and will only use /sbin for storage of the ramdisks, init scripts and busybox itself.

Links have been updated in the OP.

Enjoy!
[Sony Cross-Device General] troyism:
installed newest version to t-mobile rooted Z and cannot boot into either of the recoveries...I hold power and right after vibrate hold up or down on volume, but still get regular boot up. did I do something wrong?

I have even tried flashing via TWRP 2.4.3.0 and still couldn't get back into twrp or cwm so I am staying on 2.4.3.0 until fixed I guess
[Sony Cross-Device General] mlamlam:
Hi, tried XZRecovery and works as normal...

but while using XZRecovery to upgrade to XZDualRecovery 2.6.2, no "green" light during SONY boot logo and thus cannot boot into recovery, the firmware is 244 and rooted (Locked Bootloader)

Thanks.

\sdcard1\XZDualRecovery\XZDualRecovery.log size is 0 byte.

XZRecovery.log:

02:49:05: umount -l /data/idd

02:49:05: RET=1

02:49:05: umount -l /data

02:49:05: RET=0

02:49:05: umount -l /lta-label

02:49:05: RET=0

02:49:05: umount -l /acct

02:49:05: RET=0

02:49:05: umount -l /dev/cpuctl

02:49:05: RET=0

02:49:05: umount -l /dev/pts

02:49:05: RET=0

02:49:05: umount -l /mnt/asec

02:49:05: RET=0

02:49:05: umount -l /mnt/obb

02:49:05: RET=0

02:49:05: umount -l /mnt/qcks

02:49:05: RET=0

02:49:05: Cleaning up ramdisk root...

02:49:05: rm -vrf ./lta-label

02:49:05: rm -vrf ./persist

02:49:05: rm -vrf ./config

02:49:05: rm -vrf ./acct

02:49:05: rm -vrf ./firmware

02:49:05: rm -vrf ./mnt

02:49:05: rm -vrf ./system

02:49:05: rm -vrf ./res

02:49:05: rm -vrf ./data

02:49:05: rm -vrf ./root

02:49:05: Extracting recovery...

: Turning off led, to save power...

STOP Dual Recovery at : Executing recovery init, have fun!

attached is the log from

/cache/recovery

/tmp/XZDualRecovery
[Sony Cross-Device General] digital_ism:
Same here. Cannot enter either of the recoveries. No green light on bootup :S
[Sony Cross-Device General] drsoran2:
I can confirm that the latest 2.6.2. release.windows.zip dual recovery is not working on .244 firmware! I've installed it and the phone does not boot into the recovery, no matter if I press volume up or down. It just boots into android!

However, the previous 2.6.0 does work and I can boot into TWRP! The green LED lights up and when I press volume down it turns pink. Although I suspect that this is the version which still has the light sensor bug?

But still, I can use this recovery for now and flash the smaller softkeys and the remove "swipe to unlock" text.
[Sony Cross-Device General] Guantanamo:
I confirm, I'm having same issue. I'm testing with RomAur 8.0.
[Sony Cross-Device General] YudiA1:
I got same problem after flash update. no green light when boot.

than i try install this

https://app.box.com/s/yd0oni809rdfsjmb76x8

install as usual apk than install recovery there.

twrp 2.4.3...

so i got back recovery when press vol + on boot.

than i flash again dual recovery before update.

now i got back that good dual recovery.:D

hope that can help you to got back dual recovery ;)
[Sony Cross-Device General] [NUT]:
Oh cr*p... I'll get a new release out soon... Sorry guys...
[Sony Cross-Device General] [NUT]:
[XZDualRecovery] 2.6.3 released!

RELEASE Change log:

Version 2.6.3 (re-release of 2.6.2):

Updated CWM to 6.0.3.3 / CWM ADVANCED 5 built by myself, preparing to integrate the PhilZ Touch Recovery 5 by [MENTION=4666971]Phil3759[/MENTION] :D

Fixed the light sensor bug, as a result, XZDualRecovery now no longer monitors input event nodes 10 and 11.

Redid the busybox detection and integration. It now creates the symlinks to all the supported applets in /system/xbin and will only use /sbin for storage of the ramdisks, init scripts and busybox itself.

Release 2.6.2 was bugged because i did some quick edits on my phone while debugging and forgot to apply these to the build-kitchen files :eek:

Links have been updated in the OP

2.6.2 was a result of sleep-deprived stupidity... sorry guys :silly:
[Sony Cross-Device General] dd66:
Thnaks for this new version.

Just a question, though: I'm running Monx with advanced reboot menu: when i choose reboot recovery, it brings me to CWM. Is there a way to make TWRP by default?

Thanks in advance.

Edit: I managed to resolve this with the advice given under the "Defaults" section in the OP. Nice!
[Sony Cross-Device General] mlamlam:
Monx's firmware has TWRP only, seems does not have CWM..

[1031A0244-04-01] STABLE RELEASE

[+] New base from scratch on official 4.2.2 1031A0244 firmware

--> New firmware specific changes :

--- Smoother Boot animation

--- Efficient RAM management

--- Home launcher is smoother, no lags here

--- 3G Signal strength improved

--- Touch response is improved a lot

--- Sleep and Wake is a bit faster now

--- Camera Image quality in dark improved

--- Changes in car mode app

--- High resolution image is captured in normal mode with HDR off

--- No screen flickering

--- No unusual battery reading bug

--- Battery backup has increased

[+] Device MAC address assigning fix

[+] Added Desktop Expand toggle on power menu

[+] TWRP Recovery v2.6.0.1 (UI enhancements & allignment fix)

and from this thread page one, Nut already stated that how to make "default" selection:

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!
[Sony Cross-Device General] shoey63:
Wow! Finally Philz recovery in our device (custom backup and restore already working) :victory: Can't wait for [MENTION=4666971]Phil3759[/MENTION] to add his touch recovery. Many thanks [MENTION=4904057][NUT][/MENTION] for getting the ball rolling. :cowboy::cyclops::cool:
[Sony Cross-Device General] dd66:
didn't you read my edit? :p;)
[Sony Cross-Device General] Dr_SUSE:
Thanks for fixing the light meter bug, and thanks for the Linux script!