[Sony Cross-Device General] mionica:
release v2.5

EDIT: a bootloop was reported; I pulled down the download link until I figure out what happened.

Right, upgrade time again.

Changelog for v2.5:

initial flimits for zygote are no longer hardcoded to 1024 4096; instead, the "previous values" as reported by the first flimit call will be used

the scripts log everything they do, both to logcat and to /tmp/$0.log;

added two properties to flimit.prop - fl.save.boot.logcat and fl.save.boot.dmesg; these enable saving logs to the internal sdcard:

fl.save.boot.logcat produces 4 files, named when-logcat[0..3].log.bz2; output level is D, and these are sampled: 0 - before waiting for zygote, 1 - when 01_flimit finishes, 2 - before waiting for boot to complete, 3 - when 98_revert_flimit_after_boot finishes

fl.save.boot.dmesg produces when-dmesg.log.bz2, sampled when 98_revert_flimit_after_boot finished; unlike the logcats, wraparound is unlikely to happen for dmesg, so there's no need to sample more than once

if either one of these is enabled, a file named when-flimit.log.bz2 will also be created, with the full output of those 2 scripts

the file flimit.prop.sample from the .zip has these enabled, so you can simply put that on the external sdcard and rename to flimit.prop

made the bool values "true", "1", "yes" and "on" mean "true" (everything else still means false)

further lowered the wait granularity to 50ms

added the build date and version to the .zip display header :p

Sample flimit log:

[color=green]Mircea@mircea-pc[/color] [color=purple]cygwin32[/color] [color=orange]/cygdrive/d/HTC/xperiaz3/apk/old[/color]
$ bzcat 20151325.1913-flimit.log.bz2 | grep -vE '^\[[dv]'
[i] found flimit settings at /storage/sdcard1/XZDualRecovery/flimit.prop
[i] 01_flimit starting...
[i] =====================
[i] during boot, using softlimit 2047, hardlimit 4095
[i] byeSElinux is already loaded
[i] waiting for the zygote process to appear...
[i] found zygote process after 1350ms at PID 708
[i] initial zygote flimits: [1024 4096]
[i] new zygote flimits: [2047 4095]
[i] applying during.boot flimits - done
[i] 98_revert_flimit_after_boot starting...
[i] =======================================
[i] during boot, used softlimit 2047, hardlimit 4095
[i] after boot, using softlimit 1024, hardlimit 4096
[i] waiting for boot to complete...
[i] boot completed after 31200ms
[i] byeSElinux is already loaded
[i] applying after.boot flimits - iteration #1
[i] 41 processes to check
[i] target PIDs: [ 708 1051 1058 1052 1053 1837 3690 3710 3739 3846 3856 3880 3904 4059 4089 4153 4171 4193 4211 4231 4266 4290 4314 4337 4363 4398 4418 4431 4454 4484 4581 4733 4768 4785 4847 4861 4968 5059 5068 5197 5272]
[i] 37 processes were updated
[i] updated PIDs: [ 708 1837 3690 3710 3739 3846 3856 3880 3904 4059 4089 4153 4171 4193 4211 4231 4266 4290 4314 4337 4363 4398 4418 4431 4454 4484 4581 4733 4768 4785 4847 4861 4968 5059 5068 5197 5272]
[i] applying after.boot flimits - iteration #2
[i] 45 processes to check
[i] target PIDs: [ 708 1051 1058 1052 1053 1837 3690 3710 3739 3846 3856 3880 3904 4059 4089 4153 4171 4193 4211 4231 4266 4290 4314 4337 4363 4398 4418 4431 4454 4484 4581 4733 4768 4785 4847 4861 4968 5059 5068 5197 5272 5390 5415 5692 5761]
[i] 2 processes were updated
[i] updated PIDs: [ 5390 5415]
[i] applying after.boot flimits - iteration #3
[i] 1 processes to check
[i] target PIDs: [ 6134]
[i] 0 processes were updated
[i] updated PIDs: []
[i] applying after.boot flimits - done

I strongly suggest that people who are experiencing random reboots

switch to this version immediately

enable logging

provide logs when they're complaining :)