Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- names="com.termux io.twaik.lorie rubberbigpepper.Orientator"
- if test ! -e /realproc/cmdline
- then
- echo Mounting realproc
- mount -o remount,rw none /
- mkdir /realproc
- mount -t proc none /realproc
- fi
- tail -f /dev/null|am monitor| while read line
- do
- echo "$line"
- for n in $names
- do
- for p in `pidof $n`
- do
- if test -e /proc/$p/oom_adj
- then
- echo Masking pid $p
- mount -t tmpfs -o size=4k none /proc/$p/
- for f in /realproc/$p/*
- do ln -s $f /proc/$p
- done
- rm /proc/$p/oom_*
- fi
- echo Setting oom adj, was $(cat /realproc/$p/oom_adj)
- echo -17 > /realproc/$p/oom_adj
- done
- done
- done
Add Comment
Please, Sign In to add comment