yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] Saluu:
Problems on Z1C

[MENTION=4904057][NUT][/MENTION]

I am also having trouble getting this to work on my Z1C.

I am on Stock Rom (14.4.A.0.157), rooted by going back to .108, rooting and flashing .157 again. I'm using SuperSu. I tried XZDualRecovery Versions 2.8.3, 2.8.7, 2.8.10 and 2.8.11. All give me the same error:

The installation looks clean, but after the Phone reboots, when the Sony logo appears, the led turns red for a short time and then the phone boots normally. I can not get the phone to boot into recovery by using the volume up/down buttons. Booting into recovery with NDR Utils does also not work.

I will pm you a link to the logs.

I think the problem is this in XZDualRecovery.log:

02:06:13: mount -o remount,rw rootfs /
02:06:13: RET=1

It seems to me, that when booting up, remounting rootfs with rw permissions fails (for whatever reason). Later, remounting ro seems to work:

02:06:13: mount -o remount,ro rootfs /
02:06:13: RET=0

I would greatly appreciate any help!
[Sony Cross-Device General] [NUT]:
*sigh*

The firmware number might be missing but the chargemon script now tries to find the culprit setting in the init files to apply the fix, instead of installing the disableric and depending on that...

Thank you for this report.

Can you try 2.8.11 again and include the install CMD window contents and the XZDR log files from right after the initial reboot after installation?
[Sony Cross-Device General] [NUT]:
This is exactly what I tried to fix with the 2.8.11 release :crying:
[Sony Cross-Device General] russel5:
[MENTION=4904057][NUT][/MENTION] this code

${BUSYBOX} echo "0" > /sys/kernel/security/sony_ric/enable

not working. See upper post ^^

You are need this

TEXECL ${BUSYBOX} echo "0" > /sys/kernel/security/sony_ric/enable

And problem on all version of FW are gone. Trust me ;)
[Sony Cross-Device General] [NUT]:
:eek:

Every time you come with a smart reply like this, I already applied the fix :p :highfive:
[Sony Cross-Device General] russel5:
I think you are fix this in .11 version, after read my PM :)
[Sony Cross-Device General] Jackos:
:eek:

Give this guy a THANKS!
[Sony Cross-Device General] [NUT]:
I will re-release 2.8.11 renaming the folder it is in once it's done. As it's a testing release, this one will go in to the 'attempt' stage as well :fingers-crossed:

Already done ;)
[Sony Cross-Device General] yuskhayru:
I just create a flashable pre rooted .726 with 2.8.10 flashable.zip recovery. Working flawlessly on my Z2, no need to bypass selinux like bfore, and mount r/w also working well. Thanks for your hardwork nut. :)

Sent from my D6503
[Sony Cross-Device General] Saluu:
I tried this on my Z1C, it did the trick. Everything seems to work fine now. Big thanks!
[Sony Cross-Device General] [NUT]:
Please give 2.8.11 Attempt 2 a try as well. Let's see if this does the trick on any ROM.
[Sony Cross-Device General] Saluu:
Tried it, it's working fine on my Z1C :)
[Sony Cross-Device General] russel5:
[MENTION=4904057][NUT][/MENTION]

I tried everything with rmmod, but seem this command not work via script.

I use su, ln, mkdir,chroot but nothing. May be i'm not so smart, may be someone can fix this last bug, may be you [MENTION=4904057][NUT][/MENTION]

I think when phone boot not all directories are mount . Some logs

02:19:27: mount -o remount,rw /system
02:19:27: RET=0
02:19:27: chroot / system/xbin/busybox rmmod byeselinux
rmmod: can't change directory to '/lib/modules': No such file or directory
02:19:27: RET=1
02:19:27: rmmod byeselinux
rmmod: can't change directory to '/lib/modules': No such file or directory
02:19:27: RET=1
[Sony Cross-Device General] [NUT]:
Hmmm, that error actually tells a lot.

Change rmmod byeselinux to:

rmmod /system/lib/modules/byeselinux.ko

And see if that will work.
[Sony Cross-Device General] russel5:
Man, i try everything :)

This command was first what i try ;)
[Sony Cross-Device General] Bird40:
2.8.11 Attempt 2 working fine on my ZL (C6503, 10.5.1.A.0.283 eXitenZ 3.5.0) and Z2 Tablet (SGP521, 23.1.A.0.690)
[Sony Cross-Device General] Tboyroy83:
[MENTION=410007]Nut[/MENTION] just flashed 2.8.11 attempt 2 using twrp and everything is ok. I didn't remove already installed xzdr just flashed over the top, but when I do a complete strip and rebuild this weekend I will try just 2.8.11 attempt 2 and see what happens.

Thanks again for all your hard work, when I get paid I will be sure to make a donation. ;) :D :P
[Sony Cross-Device General] [NUT]:
Well, there is one thing left to try... I've been skipping through the busybox source... and I think I found a possible answer:

In dualrecovery.sh, change this:

if [ "$KEEPBYESELINUX" != "true" ]; then
# Unload the byeselinux module.
rmmod byeselinux
fi

In to this:

if [ "$KEEPBYESELINUX" != "true" ]; then
MOUNTEDLIB="false"
# Unload the byeselinux module.
if [ ! -d "/lib" ]; then
ln -s /system/lib /lib
else
mount -o bind /system/lib /lib
MOUNTEDLIB="true"
fi
rmmod byeselinux
if [ "$MOUNTEDLIB" = "true" ]; then
umount /lib
fi
fi

And move the "EXECL mount -o remount,ro rootfs /" 9 lines above this bit of code to below it:

EXECL mount -o remount,ro /system

ECHOL "Return to normal boot mode..."

/system/bin/setprop dr.xzdr.install true

# Ending log
DATETIME=`busybox date +"%d-%m-%Y %H:%M:%S"`
echo "STOP Dual Recovery at ${DATETIME}: STAGE 2." >> ${LOG}

# Unmount SDCard1
umount -f /storage/sdcard1

if [ "$KEEPBYESELINUX" != "true" ]; then
MOUNTEDLIB="false"
# Unload the byeselinux module.
if [ ! -d "/lib" ]; then
ln -s /system/lib /lib
else
mount -o bind /system/lib /lib
MOUNTEDLIB="true"
fi
rmmod byeselinux
if [ "$MOUNTEDLIB" = "true" ]; then
umount /lib
fi
fi

mount -o remount,ro rootfs /

I'm starting to suspect that during boot the /lib folder isn't sym-linked, does not exist or isn't working properly on some of the models...
[Sony Cross-Device General] Wiltron:
[MENTION=4904057][NUT][/MENTION]

Just wanted to let you know that the version 2 of 2811 is working fine on my C6906 while on KitKat 157. I did a fix permissions and wiped both caches, then rebooted, just to make sure all was good. Was still rooted and what not. Am doing a Nandroid right now, and will eventually install the new Lollipop flashable pre-rooted zip shortly.
[Sony Cross-Device General] [NUT]:
2.8.11 Attempt 3 is now available, with the proposed (untested) fix I detailed here.

To confirm it has worked, (especially) people on the Z1 Compact should install/flash this version and then reboot to the ROM again.

Then connect USB and adb shell to your device, then type the following:

su
busybox lsmod

If the fix has worked, you should not see byeselinux there if you did not change dr.keep.byeselinux to 'true'.
[Sony Cross-Device General] russel5:
[MENTION=4904057][NUT][/MENTION]

I think when you use this

umount -f /storage/sdcard1

and then check this

if [ "$KEEPBYESELINUX" != "true" ]; then

it's not check because sdcard1 unmount or i'm wrong?

No matter. Some other logs, fix still not work

06:05:06: mount -o remount,rw /system
06:05:06: RET=0
06:05:06: ln -s /system/lib /lib
06:05:06: RET=0
06:05:06: rmmod byeselinux
rmmod: can't change directory to '3.4.0-perf-g72984dd': No such file or directory
06:05:06: RET=1

I had this errors already when use chroot /system
[Sony Cross-Device General] [NUT]:
Can you change rmmod to /system/bin/rmmod and try once more? I have a hunch...
[Sony Cross-Device General] russel5:
i fix this. give me some time i wrote how
[Sony Cross-Device General] [NUT]:
I just hope you didn't create a folder to put the module in, because that would limit the fix to just one kernel version... :p
[Sony Cross-Device General] russel5:
yes, i did this

# Unload the byeselinux module.
EXECL ln -s /system/lib /lib/ >> ${LOG}
EXECL ln -s /system/lib /lib/modules/3.4.0-perf-g72984dd >> ${LOG}
EXECL rmmod byeselinux >> ${LOG}
fi

and this works.

May be you can find the way use some string like $KERNEL and this will work on different phone with different kernel number

This command shows current version of kernel

uname -r
[Sony Cross-Device General] [NUT]:
If it's not too much trouble, can you try my hunch method as well? I want to know if that would work just as good...
[Sony Cross-Device General] russel5:
Congrats! Now your script is perfect. It's work ;)

08:20:56: mount -o remount,rw /system
08:20:56: RET=0
08:20:56: /system/bin/rmmod byeselinux
08:20:56: RET=0
08:20:56: Return to normal boot mode...
STOP Dual Recovery at 20-05-1970 08:20:56: STAGE 2.
[Sony Cross-Device General] norti:
Guys, you're incredible! I do not have the time nowadays to follow everything around the Z2, but I LOVE reading this thread and seeing that you are doing really-really great work.

Thank you! ;)
[Sony Cross-Device General] gitzz:
Seriously I m also following this thread for a long time, and most of the time, I could not understand technicality!! I still feel good for NUT and other people involved in this making Xperia more awesome.

Sent from XDA not so Premium App

Gitzz's Xperia™ ZR [Stock 4.4.4, Rooted, Odexed, Xposed, LB]
[Sony Cross-Device General] juanpirulo:
As i was thinking everything was ok with 2.8.10 can someone clarify me if there still some problems with the flashable dualrecovery for the z1. I ve got no problem at all but somepeople cant install a preroot lollipop firmware with the flashable.zip 2.8.10. cheers
[Sony Cross-Device General] tatsu91:
Dunno why some people have problems with that version, I own a z3 and its OK, mostly of thoe with problems are those with xposed on lollipop wich it's in Alpha state
[Sony Cross-Device General] juanpirulo:
I gess the problem is in some script for the flashable.zip in this versions, as I read . cheers
[Sony Cross-Device General] ejstubbs:
Oops, I'm getting repack failures again

Unpacking the uploaded kernel...
SIN v3 file, decrypting now...
Extracting ELF parts from SIN kernel image...
Writing kernel to kernel.zImage
Writing ramdisk to kernel.ramdisk.cpio.gz
Writing QCDT to kernel.qcdt.img
Saving kernel commandline to kernel.boot.cmd

Copying base packages...

Unpacking the kernel ramdisk...

.
./init.qcom.factory.sh
./init.class_main.sh
./sys
./init.sony.usb.rc
./init.sony-device-common.rc
./ueventd.rc
./init.qcom.ssr.sh
./sbin
./sbin/tad_static
./sbin/e2fsck_static
./sbin/healthd
./sbin/tune2fs_static
./sbin/wait4tad_static
./sbin/checkabortedflash
./sbin/fota-ua
./sbin/watchdogd
./sbin/adbd
./sbin/checkfirstboot
./sbin/wipedata
./sbin/mr
./sbin/fsckwait
./sbin/ueventd
./sbin/ua-modem-switcher
./sbin/ric
./res
./res/images
./res/images/charger
./res/images/charger/battery_scale.png
./res/images/charger/battery_fail.png
./res/images/bootstrap
./res/images/bootstrap/checkabortedflash.png
./property_contexts
./init.qcom.early_boot.sh
./init.zygote32.rc
./init.trace.rc
./ueventd.qcom.rc
./init.sony-device.rc
./selinux_version
./init.qcom.sh
./init.usbmode.sh
./seapp_contexts
./sepolicy
./charger
./init.environ.rc
./crashtag
./dev
./file_contexts
./init.target.rc
./default.prop
./system
./init.rc
./service_contexts
./init.qcom.class_core.sh
./init.sony-platform.rc
./init.mdm.sh
./init.sony.rc
./data
./init
./fstab.qcom
./proc
./logo.rle
./init.usb.rc
./init.qcom.rc

Preparing the recovery ramdisks...
Unpacking the XZDualRecovery source package failed, exitting!
Repack failed! Please try again...

Is the kernel builder not ready to go at version 2.8.11 yet?
[Sony Cross-Device General] [NUT]:
You are both right and wrong at the same time :o

It is working problem free on some lollipop roms but not on all devices. But the fixes that fixed xzdr on lollipop are the cause of the issues on kitkat. :confused:

The testing version currently online is my attempt to make it work trouble free on any supported device regardless of the firmware used.

Confusing issues kept that an illusive goal for a while...
[Sony Cross-Device General] tatsu91:
Thanks for the explanation
[Sony Cross-Device General] [NUT]:
Well, it is... But I never realised that renaming the folder caused the kernel builder to break o_O

I'll fix that in about an hour. Apologies for this!
[Sony Cross-Device General] ondrejvaroscak:
Attempt 3 working perfect on Z3 ".690"
[Sony Cross-Device General] eagle25884:
Hi NUT,

could all this end in a result or in a conclusion, that only specific XZDR-Versions for specific and different Xperias would be the solution.

Besides this, I know, that your intention is to find a result of one XZDR for nearly all Xperias within KK & LP.

Finally I deeply appreciate your work and energy to make it eventually happen :good: . Patience is the measure of all things.
[Sony Cross-Device General] munjeni:
You need to fix more important thing than everything other it's related to security! Selinux completely gone by installing your dual recovery so whole amazing lolipop security have no efect! Please check your files!
[Sony Cross-Device General] [NUT]:
No, I actually won't accept that. It's scattered enough as it is with the different models, if I had it my way and all the time in the world, I would even change that :)

But don't worry too much, we're almost there, for sure :cowboy:

--- :fingers-crossed: ---

2.8.11 Attempt 4 is now online.

[MENTION=4688377]russel5[/MENTION], if you would be so kind to test this version to see if the byeselinux issue is gone for good now? :)
[Sony Cross-Device General] xvit096:
2.8.11 is working fine, z3 D6653 latest firmware thanks [MENTION=4904057][NUT][/MENTION]
[Sony Cross-Device General] [NUT]:
What do you mean? I'm kinda puzzled on this post... what is more important to fix then security? SELinux isn't completely gone, you can have it disabled by choice.
[Sony Cross-Device General] munjeni:
Sorry than! Did you ckecked if selinux is working? I just found source code of the byeselinux and noticed that there is no modunload so just wanted to tel you! Its ok than if you allready checked that, I am sorry than! What say lsmod?
[Sony Cross-Device General] luminoso:
May I suggest that for dr.keep.byeselinux=true instead of keeping the module, always unload it and do "setenforce 0" or "echo 0 > /sys/fs/selinux/enforce" instead?

I need more testing but I suspect that byeselinux loaded may be related to some unexpected reboots ;)
[Sony Cross-Device General] [NUT]:
Not in the module itself, no. But unloading the module using rmmod does restore SELinux to it's original state.

https://github.com/xNUTx/byeselinux/blob/master/byeselinux.c#L51 helps with that, and once the byeselinux module is unloaded, you won't be able to modify things you could not modify before you inserted the module in the kernel.
[Sony Cross-Device General] [NUT]:
Actually, keeping it loaded only helps until the ROM has finished booting, if you unload it then, it will be allowed to set it to permissive. Once you unload the module, you won't be able to do so until that same point in the ROM boot.

Anyway, are you using Xposed by any chance? :p
[Sony Cross-Device General] munjeni:
Your module can not be unloaded since you have no module_exit function! Look into lsmod command, you will notice that module stil exist! ;)
[Sony Cross-Device General] [NUT]:
Eh, no, that was due to a bug... but not of the kind you would expect.

CyanogenMod's busybox (the one included in XZDR) is looking in the wrong location for the modules to unload.

Try 2.8.11 Attempt 4 and see for yourself, OR open adb shell and busybox rmmod byeselinux to observe issues and use /system/bin/rmmod byeselinux to really unload it :)

Anyway... bugs... you gotta love him :p
[Sony Cross-Device General] luminoso:
Yes I am. The thing is I've been doing some experiments, and with keep selinux to false I had no more reboots (even with xposed running)

Quick almost unrelated note: Since selinux in permissive mode prevents "20mp superior auto" module from loading (my main reason to run xposed), I've created an "permissive.sh" with an simple command "setenforce 0" in /system/su.d/, wiith all the correct permissions.

It does change it to permissive (even when dr.keep.byeselinux is set to false), however xposed runs randomly, depending of the xposed module load speed on boot. It just a matter of luck if xposed module is loading after the su.d script or not. It if runs after permissions.sh xposed module is loaded correctly, if it runs before module is prevented from working

Your post gave me an idea, I think i'm going to test to set dr.keep.byeselinux=true, and change my permissive.sh to setenforce 0 and then I'll myself unload byselinux module in the same permissions.sh script :good:
[Sony Cross-Device General] russel5:
[MENTION=4904057][NUT][/MENTION]

How I sad before, all works like a charm.

Module unloaded and loaded correct. Try with keep.selinux false and true
[Sony Cross-Device General] munjeni:
Ok. Selinux is good thing but need a lot of work, for example every file must be relabeled after modification, every symlink allso must be relabeled, every single new file... etc, than everything will work, hope xposed too! I will post my soluition tomorrow so you can check. Got all things working ok with enforced selinux. Allso done lolipop sucesfully conversation to the flashable keeping labeling...etc, will post it too
[Sony Cross-Device General] infinitylook:
Thanks for this nut, why should we need to clear dalvik everytime we modify something even not xposed related. Will it be fixed in the future versions or that's really how it works on lollipop? Is the recovery the one causing incompatibility with some xposed modules like amplify. Amplify was already updated for Lollipop.
[Sony Cross-Device General] [NUT]:
Lollipop doesn't use dalvik any more... so if that's a requirement to get Xposed to work, then that's a bug in Xposed and not something I will ever fix...
[Sony Cross-Device General] [NUT]:
Heh, I hope you mean 'said' instead of sad :p

Good stuff! :victory: :highfive:
[Sony Cross-Device General] munjeni:
Just replace busybox in recovery with an linux compliant busybox and your old recovery will get full lolipop support, I done allready with success, missing only symlink relabeling (it can be done adding small function to the recovery source to detect symlinks and add -h flag to the chcon command)...
[Sony Cross-Device General] AussieCable:
Thumbs Up 2.8.11.A4

Version 2.8.11.A4 seems to work just fine with my D6503, no errors on install, with installer, next will try flashable with rooted update package .726.

But the installer seems fine on my Z2, will report my findings with flashable later.
[Sony Cross-Device General] infinitylook:
How will I do that? I'm quite a noob on this. Where will I get that busybox version? From the playstore? And what will I replace. Maybe there's a tutorial?

---------- Post added at 09:06 AM ---------- Previous post was at 09:02 AM ----------

I mean art. Sorry for that. In my case, whenever I modify xposed (update,remove modules) it will cause bootloop after restart. I am using latest version of dual recovery. The only way I get around with this is to clear art at recovery and that will cause to reoptimize apps again(mine is like 400+ apps) and that would take around 15min for my phone which is really a pain. So am I missing something here or this is also what others are experiencing. [MENTION=4120742]munjeni[/MENTION], did you got amplify to work on your lollipop device?
[Sony Cross-Device General] Wiltron:
Mr. [MENTION=4904057][NUT][/MENTION]

I'm back to make your night troublesome :(

Since my last post, I did a fresh FTF Flash of .157, rooted with the 108 <-> 157 flash, and then fully updated all apps and everything. Xposed installed, all is good. KitKat is awesome, stable, no issues whatsoever. I'm using 2.8.11 v4 of the recoveries. I did a Nandroid and backed everything up so I can easily restore things should I bugger it up :)

I downloaded the flashable 5.0.2 ZIPs floating around here for my C6906, and the stripped FTFs that go along with it. I perform both, and after the 10ish minute first boot, it boots into Lollipop just fine without issue. I can do the setup, update apps, everything is awesome. I rebooted normally and it starts fine without issue. I have NOT done anything but update apps from playstore. Nothing frozen with TiBu, nothing disabled in app settings, literally, nothing. I rebooted into recovery and nandroided this, in hopes to have a "recoverable" lollipop installation like my KitKat.

As soon as the nandroid is done, I didn't clear cache or fix permissions or anything, try to boot the system, and it bootloops. It gets all the way to the end of the boot animation where the screen dims, and then freezes, then reboots. I can still access recovery at this point so I cleared both caches and fix permissions, reboot, still bootloops as described above. I should also mention, that a fresh unrooted/no-recovery FTF flash of 5.0.2 works flawlessly.

I'm not sure what's going on here..
[Sony Cross-Device General] russel5:
If you update from 4.4 with installed xposed to lollipop --> bootloop, allways bootlop. In my home forum we already have this problem. Only fresh install 157 without xposed and update to lollipop can fix this bootlop
[Sony Cross-Device General] infinitylook:
Correct i uninstalled xposed first because of that issue. reinstalled it only after making sure recovery was working good. But everytime we do changes on xposed we need to clear art? There's no work around in LP? Clearing art will Re optimize all apps
[Sony Cross-Device General] ondrejvaroscak:
Try to guess what it means....

Make some free space, and try again.
[Sony Cross-Device General] sonalikagaur:
I have more than 8gb space on internal memory and 12gb on external SD.

Space is not an issue.
[Sony Cross-Device General] ondrejvaroscak:
Mount or rw problem?

---------- Post added at 10:05 ---------- Previous post was at 10:04 ----------

By the way 8gb on internal does not mean you have enough free space on system partition!
[Sony Cross-Device General] blue4you:
I have LP mit 2.8.10 dualrecovery on my Z1C.

If I want to start CWM, my Z1C take power off.

TWRP and PhilZ Touch start fine.

For now I only tested TWRP and it works fine.

What is the issue with CWM?
[Sony Cross-Device General] sonalikagaur:
I tried ....using adb shell I am not able to mkdir. But using root i am able to.

----------------------------------------------------------------------

shell@D6653:/ $ mkdir /data/local/tmp

mkdir /data/local/tmp

mkdir failed for /data/local/tmp, Permission denied

255|shell@D6653:/ $ su

su

root@D6653:/ # mkdir /data/local/tmp

mkdir /data/local/tmp

root@D6653:/ #

----------------------------------------------------------------------

I believe that is the reason none of the scripts are working...or say Dual recovery is not being installed.

Please help.
[Sony Cross-Device General] [NUT]:
No, you have enough room on data, but your system partition is full. This is where xzdr will be installed after storing it on data temporarily.

Make room on system.
[Sony Cross-Device General] [NUT]:
Anyone else with this issue?
[Sony Cross-Device General] juanpirulo:
Hi [MENTION=4904057][NUT][/MENTION] I made my own prerooted rom and i modified systemui and something else from the stock 502 for z1. i had no trouble because i set xzdr.prop whith byeselinux to true. But i am sharing my rom and the people who tried it had some problems, nothing i modified in my rom is working so is getting stuck with systemui problems. Now i know because i reverse the set up of xzdr.prop to false and i had the same problems. So i dont know which is the best way to solve this problem. should I advice to set the byeselinux to true to everyone before installing the rom or there is another solution? cheers and sorry for my english if i hadnt explained very well. Thanks
[Sony Cross-Device General] shoey63:
Well, I don't see how you can set byeselinux=true in your rom's zip. When you flash the rom, it will be as if installing xzdr for the first time. Some users have external sd, some don't (in which case /cache will be used). I suggest instructing users to set it manually themselves.
[Sony Cross-Device General] ondrejvaroscak:
You set it AFTER installing. Not in zip itself.

---------- Post added at 12:40 ---------- Previous post was at 12:39 ----------

On Z3 without problem.