yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] [NUT]:
XZDualRecovery 2.8.18 now packing up.

This version has a modified [MENTION=4712883]McBane87[/MENTION] fix included in the postrecoveryboot.sh script and removed from the xzdualrecovery.sh script.

The modification is that it will do a e2fsck -pcf on the system partition before it attempts to mount and remount it. I know it's a long-shot, but consider this an 'Attempt' version as they existed in the past while debugging the SELinux/ByeSelinux issues.

I'm still looking in to the cause, still very much unsure what needs to be fixed for it to work properly again.
[Sony Cross-Device General] fz2:
Battery cliff bug update (could someone please give me some feedback on this?)

My first (unanswered) post on this

This bug

Does not happen with any stock FW

Happens with rooted 14.5.A.0.242 (via XZDR)

Happens with rooted 14.5.A.0.270 (via XZDR)

Happens with XZDualRecovery (2.8.15) installed on a Z1C with locked bootlader

I believe the culprit is XZDualRecovery, because this bug happens following boots.

Last night my phone was at 80%. I didn't have a charger with me so I powered it off.

I remembered I had to do one last thing, so I turned it back on.

Within a minute of being back on, the battery dropped drastically to 0%.

I didn't have a charger with me, so I just gave up.

This morning I plugged it into a charger while it was powered off, and I saw the battery had gone back up to 78%.

I'm not sure what this all means.

Some help would be greatly appreciated.

If there is a version of TWRP I can flash to my Z1C by unlocking the bootloader I'll be happy to give that a try instead of using XZDR, but from what I've seen TWRP is only compatible as part of XZDR.
[Sony Cross-Device General] [NUT]:
I honestly doubt XZDR is the culprit, because otherwise it wouldn't only happen to you... besides, if it happens on a rooted installation without XZDR installed as well, why blame XZDR?

Maybe your battery is actually slowly dieing but Sony implemented a 'fix' to that issue in Lollipop.
[Sony Cross-Device General] fz2:
Yeah, sorry I hadn't yet updated the info to be specific enough.

Both rooted versions I tested were installed via XZDR.

This doesn't happen with stock Lollipop, how different could the rooted versions be? Especially as far as booting the phone is concerned.

But sure, it is weird that it's only happening to me. I thought it was my battery, and I had reverted to stock so that I could get it replaced (still in warranty) but I tested it out for two days and the battery had 0 issues so I'm quite confident this has to do with a) the two rooted 14.5 FWs I installed b) XZDR.

I think it's unlikely that both the two separate PRFs were able to cause the same problem. Not sure though.

It might be that when I went back to stock, wiping everything made the battery work again, and maybe if I had kept using it for longer the problems would've presented themselves there as well, but seeing as the problems presented themselves immediately upon installing XZDR/the PRFs I think the culprit is one of the latter.

---------- Post added at 02:36 PM ---------- Previous post was at 02:26 PM ----------

If I remove XZDR, will I retain my rooted android? Can I just follow the how to remove steps in the OP and not have the rest be affected? (newbie question I know, just want to make sure).

That seems like a good way to see if XZDR is at fault or not.
[Sony Cross-Device General] McBane87:
I have a Z1c with unlocked bootloader, Stock-ROm + Stock-Kernel and XZDR 2.8.15 and for me there are no problems with battary drain.

Try this: https://play.google.com/store/apps/details?id=com.nema.batterycalibration&hl=de
[Sony Cross-Device General] Prior_Ori:
does not restore the backup : error while restoring /system.

Philz recovery

ZR 5.02 and such on all versions for lolipop.
[Sony Cross-Device General] arsradu:
Hey guys!

First off I want to thank you all for this great job.

Second, I'm the new owner of a Z3 Compact (D5803) and, after 2 days, I finally managed to get root, backup TA, unlock bootloader, flash recovery and install CM12.1.

Now, coming from a Samsung, this thing with multiple recoveries is still very new and very confusing. So I would like to know a few things about it, if anyone would be kind enough to answer:

1. Sony devices don't have a default recovery. So I need to flash one. Flashing XZDualRecovery (by the way, why is it called "dual recovery" if it's got 3 of them included? I guess this has been asked many time before.) will give me recoveries compatible to flash any ROM....? Stock and CM?

2. After flashing CM12, why can't I access any of the custom recoveries? I can only access Cyanogen Recovery which is no good for anything else other than CM. You can't format /system, you can't make a backup, you can't even flash anything else other than CM ROMs.

3. Is there a way to permanently have one recovery (I don't need 3, since I will only use one at the time anyway) permanently, no matter which ROM I flash, so that, in case something goes wrong, I can either go there and format /data or restore a backup or so something to fix my phone without having to connect to a computer and flash this recovery again?
[Sony Cross-Device General] McBane87:
http://xdaforums.com/showpost.php?p=61339059&postcount=5392

The Red Lines at the bottom.
[Sony Cross-Device General] Prior_Ori:
wait for fixes? or what? does not restore the system. everything else is in order.
[Sony Cross-Device General] McBane87:
Yes, or you try the Workaround with KK-Kernel as mentioned there.

Or here: http://xdaforums.com/showpost.php?p=61374191&postcount=5463
[Sony Cross-Device General] pvnsai73:
Bro Wat do u think about the byeselinux problem did Sony need improve in t2 ultra or [MENTION=787413]zxz[/MENTION]o0o will fix it

Thanks a lot fr findng D bug
[Sony Cross-Device General] McBane87:
Can't help you here. You need the help of Module Developer ( [MENTION=3975929]zxz0O0[/MENTION] ).

Did older Versions work for you?

---------- Post added at 05:49 PM ---------- Previous post was at 05:02 PM ----------

That's something I was trying, too. Device is unmounted, but:

/sbin/e2fsck: Device or resource busy while trying to open /dev/block/platform/msm_sdcc.1/by-name/system
Filesystem mounted or opened exclusively by another program?

BTW: Didn't tested your newest Version yet, but I found out, that executing the commands "on early-fs" will "unlock" /system Partition for Recovery before it first tries to access it. This will help getting rid of this "OS not installed" Error.
[Sony Cross-Device General] [NUT]:
Then I wonder, is the led flashing red when you enter recovery?
[Sony Cross-Device General] McBane87:
No, Normal behaviour. First Green, then purple/blue.
[Sony Cross-Device General] pvnsai73:
On kitakat all versions are working :D but in Lollipop bcoz of selinux :'( no
[Sony Cross-Device General] zippy01:
My led is fine on lollipop
[Sony Cross-Device General] [NUT]:
It's starting to look like an old nemesis of xzdr is back...

Boot to recovery and do busybox lsof

Can you post the output?
[Sony Cross-Device General] Sebi673:
No red light prior to recovery 2.8.18 @ C6603 but it can't load qualcom time daemon. Apart from that everything looks fine.

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

E:can't find time daemon "
[Sony Cross-Device General] DastanShaikh:
I installed on xperia z locked bootloader (lollipop with xposed) and got bootloop...

Any help?
[Sony Cross-Device General] Pandemic:
You should make a back up before install/flash anything but i guess you didn't do that.

Only option is reflash rom !!

I stay on 2.8.15 because that is the most stable one here of i read the struggles about 2.8.16/17
[Sony Cross-Device General] [NUT]:
I missed this part of that post, I just noticed it, sorry about that!

Does this change anything on the behavior of the recoveries and the problem which we are battling?
[Sony Cross-Device General] [NUT]:
The bootloop probably stops happening if you take out your sdcard and edit XZDualRecovery/XZDR.prop to set dr.keep.byeselinux to true.

Actually, if you're talking about using it on anything else then the Z/ZL/ZR/TabZ the latest version should work just fine, and even better when it comes to TWRP as it contains an updated (debugged) version of TWRP 2.8.6.0.

Can you try to check the following and post the output here:

Make sure you disable your 'fix' for this issue completely before you attempt this.

mount -o ro /system
busybox lsmod
busybox rmmod byeselinux
busybox lsmod
umount /system
mount /system
mount | grep system
dmesg | grep ext4 (or at least the last messages on the mounting of system)

It's a hunch I'm going on here...

The previous bug I have been battling in the past was due to a file lock, but as your lsof output showed, no such issue now. But it could still be a lock on system somehow, possibly caused by loading a module from system. The linux kernel (in general) does not always expose it's own dependencies through tools like lsof from my experience... The error message and the way it comes to the damaged system partition looks and sounds quite similar.

This is because it can't mount /system, nothing to worry about in this case, as we are having issues with mounting system in general.
[Sony Cross-Device General] Sebi673:
Absolutely no problem :D. I'm happy it works as it is. I'll wait, patiently, and check your new versions.
[Sony Cross-Device General] [NUT]:
Well... can you implement this in a script to run during on early-fs or from postrecoveryboot.sh and see if you can flash a PRF created rom afterwards?

/sbin/e2fsck -pcf /dev/block/mmcblk0p24
mount -o ro /system
/sbin/busybox rmmod byeselinux
umount /system
mount -o ro /system
mount -o rw,remount /system

It might be SELinux related, so make sure you test this in TWRP, which has the most complete SELinux support of the three.

We're definitely kicking up a lock situation here, the question is where it's coming from :confused:
[Sony Cross-Device General] dizzy2604:
McBane87. here output for Tablet Z (LP)

for module in /system/lib/modules/*.ko; do modulecrcpatch $module /system/lib/modules/byeselinux.ko; done

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

1|root@SGP321:/ #
[Sony Cross-Device General] [NUT]:
This shouldn't be needed if you use 2.8.16 or newer, the problem is different from the Z series compared to the T2Ultra.
[Sony Cross-Device General] dizzy2604:
trying to use 2.8.18, but without luck. installation is done without errors but recovery is not accesible.
[Sony Cross-Device General] McBane87:
Didn't tested flashing yet, but my Log is having some issue with unmounting. Possibly because TWRP is accessing System for some checking at boot.

XZDR: E2FSCK Check
/sbin/e2fsck: Device or resource busy while trying to open /dev/block/platform/msm_sdcc.1/by-name/system
Filesystem mounted or opened exclusively by another program?
XZDR: RO_MOUNT successful
XZDR: Removing ByeSELinux
Module Size Used by Tainted: G

[COLOR="Red"]XZDR: UMOUNT System
umount: can't umount /system: Device or resource busy
XZDR: RO_MOUNT...again[/COLOR] # This possibly would give an error, too. If I would let this part log.
XZDR: RW_MOUNT successful
XZDR: Set BlockDev RW
[Sony Cross-Device General] [NUT]:
If you have an external sdcard inserted, take it out and reboot. What does the (small) Led near the power button do?

This is probably running from postrecoveryboot.sh? If so, pour it in a script to execute by hand before you try to flash the prf package.
[Sony Cross-Device General] McBane87:
Modified my script a little bit. This time unmounting was possible.

But flashing was creating same error as before.
[Sony Cross-Device General] dizzy2604:
after showing sony logo, led glows red for 1-2 sec.
[Sony Cross-Device General] jing000l:
Edited
[Sony Cross-Device General] [NUT]:
Good, now attach (all!) the log files from the XZDualRecovery folder on either/both /cache or /sdcard1 for me to take a look.
[Sony Cross-Device General] [NUT]:
Dang it ... WHAT THE HECK :eek: :rolleyes: :mad: :( :crying:
[Sony Cross-Device General] dizzy2604:
only found this, with preperation.log inside. (/sdcard1/ must be empty because external sdcard is removed as you suggested)

root@SGP321:/ # find / -name XZDualRecovery
/dev/socket/XZDualRecovery
root@SGP321:/ #
[Sony Cross-Device General] McBane87:
This log is saying that byeselinux.ko wasnot able to load.

can you do:

su
insmod /system/lib/modules/byeselinux.ko
dmesg | grep byeselinux
[Sony Cross-Device General] dizzy2604:
root@SGP321:/ # insmod /system/lib/modules/byeselinux.ko

insmod: init_module '/system/lib/modules/byeselinux.ko' failed (Exec format error)

255|root@SGP321:/ # dmesg | grep byeselinux

<4>[ 10.424163] byeselinux: disagrees about version of symbol module_layout

<4>[10595.620208] byeselinux: disagrees about version of symbol module_layout
[Sony Cross-Device General] McBane87:
Ok, and now try this:

http://xdaforums.com/showpost.php?p=61356402&postcount=5444

Don't forget "mount -o rw,remount /system"
[Sony Cross-Device General] dizzy2604:
here is my output:

root@SGP321:/ # mount -o rw,remount /system

root@SGP321:/ # chmod 755 /system/xbin/modulecrcpatch

*.ko; do modulecrcpatch $module /system/lib/modules/byeselinux.ko; done <

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

error: only position independent executables (PIE) are supported.

1|root@SGP321:/ #
[Sony Cross-Device General] McBane87:
Well, your problem is this Binary "modulecrcpatch", which isn't able to execute correctly. But this Binary is needed to modify the byeselinux.ko to match your Kernelversion.

Try my Module from TabZ (it's not a flashable).

Copy it to /system/lib/modules.
[Sony Cross-Device General] dizzy2604:
McBane87, but where to find your module? thx
[Sony Cross-Device General] McBane87:
You are to fast^^

Forgot it and edited last post 30sek later :)
[Sony Cross-Device General] dizzy2604:
sorry :)

your module is working:

<6>[12783.322387] byeselinux: module loaded

<6>[12783.325653] byeselinux: old selinux_enabled 1

<6>[12783.412078] byeselinux: Error finding symbols in kallsyms

<6>[12783.412384] byeselinux: Trying different method

<6>[12783.424377] byeselinux: current selinux_enabled 0

<6>[12783.435638] byeselinux: old selinux_enforcing: 1

<6>[12783.435943] byeselinux: current selinux_enforcing: 0

<6>[12783.436462] byeselinux: trying to load original module

....

and i am able to run recovery ! .. thanx a lot
[Sony Cross-Device General] McBane87:
Keep in mind that this is only a Workaround. Normally the Module should be modifieed and installed by XZDR-Installer which isn't able to do that. So if you (re)-install new version of XZDR, you propably have to copy this moduel again to make it work.
[Sony Cross-Device General] Ardit M:
The KitKat kernel method worked flawlessly for me! :svetius:
[Sony Cross-Device General] DastanShaikh:
I tried two times changing the dr.keep.byeselinux to true but still bootloop occurs...??
[Sony Cross-Device General] juanpirulo:
tryed again but first delete from sd ext the folder xzdualrecovery just in case it gets corrupt. cheers
[Sony Cross-Device General] DastanShaikh:
I tried it already but not any luck...
[Sony Cross-Device General] jing000l:
Tired several versions,18,17,16,16 unofficial

Can't mount system,can't get backup from system!

My device is ZR locked bootloader lollipop 5.0.2 stock,pre rooted rpf

Supersu,compatible mode and also my internal memory is encrypted, by the way i decrypt it first on twrt.
[Sony Cross-Device General] DastanShaikh:
I deleted old xzdualbrecovery folder...tried once again..

But this time there is no file in xzdualbrecovery folder

Any help???
[Sony Cross-Device General] eskamhl:
I know it's not a priority but will it be possible to add the support for the aroma installer?

I tried to flash one but the phone is rebooting before starting the aroma window ( I tried also some old aroma packages that I know for sure were working with kitkat ). In all the recovery logs there's no trace of the zip installation so I'm unable to see exactly what's wrong.

Thank you anyway :)
[Sony Cross-Device General] McBane87:
When does your Bootloop happen?

Right after Bootlogo?

Is your Device able to load byselinux.ko?
[Sony Cross-Device General] DastanShaikh:
After installing recovery via installer...when device automatically reboots.. After that only Sony logo comes and goes.. Out...
[Sony Cross-Device General] techking123:
Hiii.

I recently rooted my Xperia C3 dual D2502, lollipop version, after installing supersu and D2502 preroot flashable zip file I am unable to reboot my mobile. It displays "Sony" logo, vibrates and pink colour LED flashes but not rebooting. Kindly help...
[Sony Cross-Device General] McBane87:
Maybe because of byeselinux.ko

Unfortunately at this point, you can't do anything unless you are somehow able to access your system partition.

Because if recovery is running on Lollipop-Device it will always be loaded.

The keep.byeselinux option in prop file is doing something different. it will not decide if module will be loaded. it only decides if module keeps loaded after recovery has finished.

EDIT:

You could try flashing a KitKat-Kernel and access Recovery. Then reflash system without XZDR.
[Sony Cross-Device General] catdag003:
Can Dualrecovery ver 2.8.18 install in my XZ lollipop bro?:confused:
[Sony Cross-Device General] ecksdeeay:
I have used it with ZR & Z tablet, but only when downgraded to KK to root them (PRFcreator with XZDR flashable zip).....running 2.8.18 with LP !!!!
[Sony Cross-Device General] DastanShaikh:
Can i Flash kitkat kernel then install recovery and then reflash lollipop via recovery???

But... Can kitkat kernel boots up lollipop,??if not then how can I install recovery....

Dude can u explain how?
[Sony Cross-Device General] McBane87:
...it's getting exhausting. I explained that already to others.

Your Recovery should already be installed so just flash KK-Kernel and go into recovery the normal way.

And no Lollipop will not boot with older Kernel. Only Recovery.
[Sony Cross-Device General] spyfly:
Anyone installed the lastest XZDualRecovery 2.8.18 on the Xperia Z (C6603) with Lollipop Firmware using the installer? Is it working?
[Sony Cross-Device General] ecksdeeay:
You may have to do the extra work of downgrading to KK ? it installs perfectly! (using Tab Z & XZR)
[Sony Cross-Device General] emeemisri:
Why is everybody keep asking the same thing all over again.please read before you post.

No offence but reading and respect to others is the key to success.

Pardon me for my very bad english
[Sony Cross-Device General] bouthib:
Hi,

Same here. My device is a SGP312 with 5.0.2 stock, pre rooted, supersu and my internal is not encrypted and I'am unable to run a backup, having "Can't mount /system" message.

Any idea ?
[Sony Cross-Device General] karasmunay:
Hi

Is it safe to flash kernels? Will it unlock the bootloader?
[Sony Cross-Device General] melvinrobertson:
no few apps still give errors, like network card is not accessable, A completly disabled SELinux can give all the permissions.
[Sony Cross-Device General] whalesplaho:
can i download tha latest version (2.8.18) and flash? already using version 2.8.15!
[Sony Cross-Device General] Sebi673:
0. What's happening on your phone (happened to me 2) system isn't loaded - acts like its non existent - it happened to me when i tried to restore a faulty backup.

1. KitKat kernel (boot image) must have the dual recovery installed. In that way you'll be able to restore a previous backup. No, kitkat kernel wont boot your phone into lollipop.

2. Your data partition should be intact. Flash the Lollipop via Flashtool without wiping Data. Now you are no longer rooted.

3. Root via KingRoot (not kingo root or other crap) follow this: http://xdaforums.com/xperia-z/general/super-su-xperia-device-lollipop-easy-t3119006

4. Install recovery via PC (try 2.8.17 or McBane's workaround) - you can install it with kingroot user enabled, no problem.

5. Restore previous backup or switch to SuperSu and enjoy the phone.

!!! If you want to do a restore, best flash the KK boot image, and do the restore - it will replace KK kernel with your backed up Lollipop one.
[Sony Cross-Device General] ecksdeeay:
Thanks to Developers!!

Both devices from KK after installing the Dual Recovery installer.

(for those who can't read!) hmmmm lolipop lolipop oooo loli loli lolipop
[Sony Cross-Device General] DastanShaikh:
Still not work...

See this and point me where i am wrong...

1- on rooted lollipop(with xposed) firstly i installed recovery via installer... phone reboots and bootloop occurs..

2- as u said flash kitkat kernel i flashed . 283(kitkat kernel) ... Then recovery boots up...

3- then i flashed lollipop zip via recovery.... BUT recovery GONE...

M tired of trying... Help??
[Sony Cross-Device General] McBane87:
This method is not helping you getting Recovery run on Lollipop. It will only help you to access system again (without xzdr installed). But now your system is accessable again. Do this (which I already eplained twice now):

http://xdaforums.com/showpost.php?p=61356402&postcount=5444

Then post output.