[Sony Cross-Device General] mionica:
workaround for xposed reboots

EDIT: This fix is no longer required. No more bootloops, no more random reboots.

To uninstall leakplug, remove /system/etc/init.d/01_flimit and /system/xbin/flimit; but only do that after the you flashed an xposed_arm zip no older than alpha #4 20150430.

I had previously identified the cause of the problem; I also thought I had fixed it :( but I simply had the bad luck to get the fix for the bug I found in the Xposed source code, in the same build as the real fix.

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

Hi guys,

News:

xposed-uninstall v1.1

removes Xposed altogether (no parts left behind :D)

removes the Xposed app

removes leakplug, leak_workaround and/or sonyfix

wipes Dalvik cache and /cache

resets XZDR settings to no-initd / enforcing SElinux

xzdr-busybox-enable v1.0 - this enables all the applets of the XZDR busybox so you won't need an installer app

xposed-leakplug v1.2 (formerly xposed-leak_workaround) - now with the same debug capabilities as sonyfix, which is now deprecated

.

Anybody who is still having

any kind of issues

, for whatever reason, please do the following:

get into TWRP;

install, in this order, without rebooting:

xposed-uninstall-v1.1.zip

xzdr-busybox-enable-v1.0.zip

xposed-sdk21-arm-date.zip

xposed-leakplug-v1.2.zip

copy the logs to the PC, over USB:

uninstall_xposed.log

install_busybox.log

install_leakplug.log

each of the 3 zip's will tell you where it saved the log (it's usually the external sdcard)

reboot to system

reinstall the Xposed .apk (which gets removed in the process)

enjoy!

<rant target="noobs">

Thanks in advance for not asking any questions about whether you have to do any of these steps; yes, you have to.

If you didn't do exactly like I said, and it isn't working, please ask in another thread; this one is for people who are able to follow instructions.

If you can't understand what you have to do, then this is NOT for you - please wait for the Xposed bugfix instead.

All help requests will be ignored unless they have the following files attached: uninstall_xposed.log, install_busybox.log, install_leakplug.log

</rant>

This is still required for Xposed LP alpha3, which hasn't solved the leak yet (reported here :p).

For non-Sony devices, xposed-leakplug should work, if your system has 1) init.d support; 2) permissive SElinux; 3) busybox (for busybox, I recommend you get rid of all installer apps, and use the attached zip). It will throw a few warnings about XZDR, I expect, but you can safely ignore those.

This works by setting the soft file limit of the offending process (system_server) to the maximum allowed by the kernel. So it will still crash - it will do so, however, as late and as rarely as possible.

----

Changelog: (click on a version number to see the expanded changelog for that version)

xposed-leakplug 1.2 - fixed a (XZDR upgrade-related) bug that caused the script to be started twice - generating massive system instability

xposed-leakplug 1.1 - merged the debug features from xposed-sonyfix into xposed-leak_workaround, thus deprecating xposed-sonyfix

xposed-leak_workaround - a simpler version of sonyfix 3.0b which only did what was required to maximize the runtime despite the leaks

xposed-sonyfix 3.0b:

v3.0b: prints a very nice process list with details to the log, after boot completes

v3.0a: fixed a nasty installer bug - the 2nd script (98*) of v2.x wasn't properly removed - which immediately trigger issues

fully automated (.prop file was removed), single-script;

the flimits are set correctly on boot (v2.x missed a bunch of early processes)

the soft flimit is only restored on boot completion for processes who don't have a lot of open files at that time

for processes with a lot of open files, the limit is set to a reasonable number - that process is allowed to open at least 512 more files

the flimit update procedures are repeated as many times as it takes

now only logging to /tmp/flist.log; logcat is sampled once before waiting for the boot to finish, once when we're done - at which time, dmesg is also sampled; these logs, in .log.bz2 format, are available in /tmp

other changes of lesser importance (code cleanup etc.)

xposed-sonyfix 2.5a, 2.5:

cleaned up and improved the process of restoring flimits

since this version, it is strongly recommended to be on the latest XZDR!

got rid of the hardcoded 1024 4096 flimits for restore; the original values of zygote are used instead

however, fl.after.boot.* props are still honored (they take precedence), and flimit restoring can still be disabled altogether

the init.d scripts log everything they do

dmesg is sampled after the 98* script completes; 4 logcat samples are captured (before waiting for zygote to load, after the 01* script completes, before waiting for boot completion and after the 98* script completes)

.prop file setting were added, allowing the dating and copying to the internal sdcard of those log samples (one setting for dmesg, another one for the logcat's); these options are off by default, but the logs are still available under /tmp

if saving either kind is enabled, the flimit log (both 01* and 98*) is also dated and saved

the flimit.prop.sample in the .zip was updated with these new options

other minor changes

xposed-sonyfix 2.4:

flimits are reverted for the entire zygote process tree (previously, only zygote and its first-order children were restored - bug)

accepts configuration from a flimit.prop placed in the same folder as XZDR.prop (/storage/sdcard1/XZDualRecovery)

a sample .prop file exists in the .zip, and explains the syntax; it is not extracted, extract it yourself

the .prop file is not required; if it's missing, the default values are exactly the same as for 2.3 and below;

the .prop also allows you to leave the boot limits in place after boot completes;

timing and other minor changes

xposed-sonyfix 2.3:

vastly improved busybox installer, which also cleans up after previous (busybox) installations

xposed-sonyfix 2.2:

fully self-contained - includes a busybox install/update script that makes sure that the needed busybox applets exist under /system/xbin; if you have XZDR, the existing XZDR busybox will be used, if not, the XZDR busybox will be installed (to /system/xbin)

made sure the init.d scripts use specifically, and only, those applets from /system/xbin

xposed-sonyfix 2.1:

changed the granularity of the boot completed check from 1s to 100ms

faster flimits restore, by only looking at zygote and its descendants (from here, thanks [MENTION=6351145]ondrejvaroscak[/MENTION]!)

xposed-sonyfix 2.0:

added cleanup after the XZDR.prop installer bug in v1;

fixed the installer bug

changed the inter-step delay to 100ms when reverting flimit changes

xposed-sonyfix:

initial release