Spawn a backgrounded subshell from service.sh that polls sys.boot_completed once per second and, once set, blanks the persist.logd.size variants (root, crash, system, main). Runs alongside the existing supervisor fork so daemon startup is unaffected. Idempotent across reboots: even if a previous boot already cleared the props, setting them to empty again is a no-op.
17 lines
384 B
Bash
17 lines
384 B
Bash
MODDIR=${0%/*}
|
|
cd $MODDIR
|
|
|
|
# Fork-based supervisor for instant restart
|
|
./supervisor ./daemon "$MODDIR" &
|
|
|
|
# Clear logd size persist properties once boot completes
|
|
(
|
|
until [ "$(getprop sys.boot_completed)" = "1" ]; do
|
|
sleep 1
|
|
done
|
|
setprop persist.logd.size ""
|
|
setprop persist.logd.size.crash ""
|
|
setprop persist.logd.size.system ""
|
|
setprop persist.logd.size.main ""
|
|
) &
|