Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/bin/sh
- # NFS-INJECTOR
- # BY 2018 K1ks
- #=======================================================================#
- # This program is free/donate software : you can't redistribute it and/or modify
- # This program is distributed in the hope that it will be useful
- # Skynet is everywhere, on XDA, various forums and sites.
- # I make a point of keeping control in all the fields for Skynet .
- # I am not responsible for bricked devices, dead SD cards, corrupted partition, nuclear disasters
- # No to upload on additionals clouds.
- # Another thing, the ideas which are in Skynet remains mine.
- # NO ONE AT ALL CAN USE ANY OF MY CODES
- #=======================================================================#
- # A/B Device =========================================#
- if [ -d /system_root ]; then
- SYSTEM=/system_root/system
- SYS=system_root
- else
- SYSTEM=/system
- SYS=system
- fi;
- # PATH LOG =========================================#
- LOG=/data/nfs.log
- LOGMOUNT=/data/nfsmount.log
- if [ -e $LOG ]; then
- rm $LOG;
- fi;
- if [ -e $LOGMOUNT ]; then
- rm -f $LOGMOUNT
- fi;
- echo "//////// NFS-INJECTOR ~~" | tee -a $LOG
- echo "" | tee -a $LOG;
- # PATH LOG =========================================#
- while ! pgrep com.android ;
- do
- sleep 30
- done
- # Mount RW =========================================#
- for X in $( mount | grep $SYS | cut -d " " -f3);
- do
- mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc $X 2>/dev/null
- done
- mount >> $LOGMOUNT
- # Disable Sysctl to prevent ROM interference =========================================#
- if [ -e $SYSTEM/etc/sysctl.conf ]; then
- mv -f $SYSTEM/etc/sysctl.conf $SYSTEM/etc/sysctl.conf.bak
- fi;
- # Init.d Permissive SELinux =========================================#
- SE=$( cat /sys/fs/selinux/enforce) 2>/dev/null
- if [ -e /sys/fs/selinux/enforce ]; then
- chmod 0666 /sys/fs/selinux/enforce
- setenforce 0
- echo "0" > /sys/fs/selinux/enforce
- chmod 0444 /sys/fs/selinux/enforce
- if [ "$SE" -eq 1 ]; then
- echo "* Security Enhanced Linux : Enforcing *" | tee -a $LOG
- elif [ "$SE" -eq 0 ]; then
- echo "* Security Enhanced Linux : Permissive *" | tee -a $LOG
- fi;
- fi;
- # VM Tweaks =========================================#
- MEM=` free -m | awk '/Mem:/{print $2}'`
- mem=` free | grep Mem | awk '{print $2}'`;
- fs=$(($MEM/4*256))
- MP=$(($mem*1/16))
- chmod 0644 /proc/sys/*; 2>/dev/null
- sysctl -e -w vm.oom_kill_allocating_task=0 2>/dev/null
- sysctl -e -w vm.dirty_background_ratio=1 2>/dev/null
- sysctl -e -w vm.dirty_ratio=99 2>/dev/null
- sysctl -e -w vm.vfs_cache_pressure=50 2>/dev/null
- sysctl -e -w vm.overcommit_memory=1 2>/dev/null
- sysctl -e -w vm.min_free_order_shift=4 2>/dev/null
- sysctl -e -w vm.laptop_mode=1 2>/dev/null
- sysctl -e -w vm.block_dump=0 2>/dev/null
- sysctl -e -w vm.oom_dump_tasks=1 2>/dev/null
- sysctl -e -w vm.dirty_writeback_centisecs=0 2>/dev/null
- sysctl -e -w vm.dirty_expire_centisecs=0 2>/dev/null
- sysctl -e -w fs.lease-break-time=5 2>/dev/null
- sysctl -e -w fs.leases-enable=1 2>/dev/null
- sysctl -e -w fs.inotify.max_user_instances=192 2>/dev/null
- sysctl -e -w fs.inotify.max_user_watches=12288 2>/dev/null
- sysctl -e -w fs.inotify.max_queued_events=24576 2>/dev/null
- sysctl -e -w fs.file-max=$fs 2>/dev/null
- sysctl -e -w vm.compact_memory=1 2>/dev/null
- sysctl -e -w vm.compact_unevictable_allowed=1 2>/dev/null
- sysctl -e -w vm.max_map_count=$MP
- echo "* Kernel VM = Activated *" | tee -a $LOG;
- # LMK PERFORMANCE =========================================#
- HP=$((MEM/5));
- HG=$((HP/2));
- setprop dalvik.vm.heapsize $HP"m"
- setprop dalvik.vm.heapgrowthlimit $HG"m"
- if [ -e /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk ]; then
- chmod 0666 /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk;
- echo "1" > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
- setprop lmk.autocalc true;
- fi;
- FP=$((($MEM*2/100)*1024/4));
- VP=$((($MEM*3/100)*1024/4));
- SR=$((($MEM*6/100)*1024/4));
- HP=$((($MEM*10/100)*1024/4));
- CR=$((($MEM*14/100)*1024/4));
- EP=$((($MEM*15/100)*1024/4));
- chmod 0666 /sys/module/lowmemorykiller/parameters/minfree;
- echo "$FP,$VP,$SR,$HP,$CR,$EP" > /sys/module/lowmemorykiller/parameters/minfree;
- chmod 0666 /sys/module/lowmemorykiller/parameters/adj;
- echo "0,3,6,10,12,15" > /sys/module/lowmemorykiller/parameters/adj;
- if [ -e /sys/module/lowmemorykiller/parameters/cost ]; then
- chmod 0666 /sys/module/lowmemorykiller/parameters/cost;
- echo "64" > /sys/module/lowmemorykiller/parameters/cost;
- fi;
- MFK=$(($SR*4/5))
- MFK1=$(($MFK/2))
- sysctl -e -w vm.min_free_kbytes=$MFK;
- if [ -e /proc/sys/vm/extra_free_kbytes ]; then
- sysctl -e -w vm.extra_free_kbytes=$MFK1;
- setprop sys.sysctl.extra_free_kbytes $MFK1;
- fi;
- if [ -e /sys/module/lowmemorykiller/parameters/lmk_fast_run ]; then
- chmod 0666 /sys/module/lowmemorykiller/parameters/lmk_fast_run;
- echo "1" > /sys/module/lowmemorykiller/parameters/lmk_fast_run;
- fi;
- if [ -e /sys/module/lowmemorykiller/parameters/debug_adj ]; then
- chmod 0666 /sys/module/lowmemorykiller/parameters/debug_adj;
- echo "0" > /sys/module/lowmemorykiller/parameters/debug_adj;
- fi;
- if [ -e /sys/module/lowmemorykiller/parameters/fudgeswap ]; then
- chmod 0666 /sys/module/lowmemorykiller/parameters/fudgeswap
- echo "1024" > /sys/module/lowmemorykiller/parameters/fudgeswap
- fi;
- if [ -e /sys/module/lowmemorykiller/parameters/debug_level ]; then
- chmod 0666 /sys/module/lowmemorykiller/parameters/debug_level
- echo "0" > /sys/module/lowmemorykiller/parameters/debug_level
- fi;
- echo "* Lmk Performance Optimizer = Activated *" | tee -a $LOG;
- # ZRAM/SWAP ADJUSTEMENTS =========================================#
- zram=0
- zswap=0
- ZR=` grep -l zram0 /proc/swaps`
- SW=` grep -l swap /proc/swaps`
- ZS=` grep -l zswap /proc/swaps`
- if [ -e /proc/swaps ]; then
- if [ "$ZR" == "/proc/swaps" ]; then
- sysctl -e -w vm.swappiness=30
- sysctl -e -w vm.page-cluster=2
- echo "* Zram = Logarithmics Values Adjusted *" | tee -a $LOG
- zram=1
- elif [ "$SW" == "/proc/swaps" ]; then
- sysctl -e -w vm.swappiness=30
- sysctl -e -w vm.page-cluster=2
- echo "* Other Swap = Logarithmics Values Adjusted *" | tee -a $LOG
- elif [ "$ZS" == "/proc/swaps" ]; then
- sysctl -e -w vm.swappiness=30
- sysctl -e -w vm.page-cluster=2
- echo "* ZSwap Swap = Logarithmics Values Adjusted *" | tee -a $LOG
- zswap=1
- else
- sysctl -e -w vm.swappiness=0
- sysctl -e -w vm.page-cluster=0
- echo "* No Swap = Logarithmics Values Disabled *" | tee -a $LOG
- fi;
- else
- sysctl -e -w vm.swappiness=0
- sysctl -e -w vm.page-cluster=0
- echo "* No Swap = Logarithmics Values Disabled" | tee -a $LOG
- fi;
- # Storage I/O Scheduler =========================================#
- MMC=` ls -d /sys/block/mmc*`;
- SD=` ls -d /sys/block/sd*`;
- LOOP=` ls -d /sys/block/loop*`;
- RAM=` ls -d /sys/block/ram*`;
- ZRAM=` ls -d /sys/block/zram*`;
- NR=$(($MEM*1/2))
- KB=$(($MEM*2/3))
- for X in $MMC $SD $LOOP $RAM $ZRAM
- do
- echo "0" > $X/queue/rotational 2>/dev/null
- echo "0" > $X/queue/iostats 2>/dev/null
- echo "$NR" > $X/queue/nr_requests 2>/dev/null
- echo "0" > $X/queue/nomerges 2>/dev/null
- echo "2" > $X/queue/rq_affinity 2>/dev/null
- echo "0" > $X/queue/add_random 2>/dev/null
- echo "$KB" > $X/queue/read_ahead_kb 2>/dev/null
- echo "250" > $X/queue/iosched/read_expire 2>/dev/null
- echo "2500" > $X/queue/iosched/write_expire 2>/dev/null
- echo "3" > $X/queue/iosched/writes_starved 2>/dev/null
- echo "1" > $X/queue/iosched/front_merges 2>/dev/null
- echo "16" > $X/queue/iosched/fifo_batch 2>/dev/null
- echo "100" > $X/queue/iosched/hp_read_quantum 2>/dev/null
- echo "75" > $X/queue/iosched/rp_read_quantum 2>/dev/null
- echo "5" > $X/queue/iosched/hp_swrite_quantum 2>/dev/null
- echo "4" > $X/queue/iosched/rp_swrite_quantum 2>/dev/null
- echo "3" > $X/queue/iosched/rp_read_quantum 2>/dev/null
- echo "1" > $X/queue/iosched/lp_read_quantum 2>/dev/null
- echo "1" > $X/queue/iosched/lp_swrite_quantum 2>/dev/null
- echo "15" > $X/queue/iosched/read_idle 2>/dev/null
- echo "25" > $X/queue/iosched/read_idle_freq 2>/dev/null
- echo "1" > $X/queue/iosched/back_seek_penalty 2>/dev/null
- echo "16384 " > $X/queue/iosched/back_seek_max 2>/dev/null
- echo "120" > $X/queue/iosched/fifo_expire_sync 2>/dev/null
- echo "250" > $X/queue/iosched/fifo_expire_async 2>/dev/null
- echo "0" > $X/queue/iosched/slice_idle 2>/dev/null
- echo "8" > $X/queue/iosched/group_idle 2>/dev/null
- echo "1" > $X/queue/iosched/low_latency 2>/dev/null
- echo "10" > $X/queue/iosched/quantum 2>/dev/null
- echo "40" > $X/queue/iosched/slice_async 2>/dev/null
- echo "2" > $X/queue/iosched/slice_async_rq 2>/dev/null
- echo "100" > $X/queue/iosched/slice_sync 2>/dev/null
- echo "300" > $X/queue/iosched/target_latencymax_time 2>/dev/null
- echo "18" > $X/queue/iosched/async_scale 2>/dev/null
- echo "8" > $X/queue/iosched/read_scale 2>/dev/null
- echo "12" > $X/queue/iosched/sync_scale 2>/dev/null
- echo "10" > $X/queue/iosched/write_scale 2>/dev/null
- echo "3" > $X/queue/iosched/writes_starved 2>/dev/null
- echo "300" > $X/queue/iosched/sync_expire 2>/dev/null
- echo "3000" > $X/queue/iosched/async_expire 2>/dev/null
- echo "5" $X/queue/iosched/sleep_latency_multiple 2>/dev/null
- echo "200" $X/queue/iosched/async_read_expire 2>/dev/null
- echo "500" $X/queue/iosched/async_write_expire 2>/dev/null
- echo "100" $X/queue/iosched/sync_read_expire 2>/dev/null
- echo "350" $X/queue/iosched/sync_write_expire 2>/dev/null
- done
- if [ "` ls /sys/devices/virtual/bdi/179*/read_ahead_kb`" ]; then
- for RH in /sys/devices/virtual/bdi/179*/read_ahead_kb;
- do
- echo "$KB" > $RH
- done
- fi 2>/dev/null;
- for I in ` find /sys/devices/platform -name iostats`;
- do echo "0" > $I;
- done
- echo "* Storage I/O Scheduler = Activated *" | tee -a $LOG;
- # UKSM/KSM =========================================#
- if [ -e /sys/kernel/mm/uksm/run ]; then
- echo "1" > /sys/kernel/mm/uksm/run;
- setprop ro.config.ksm.support true;
- echo "low" > /sys/kernel/mm/uksm/cpu_governor;
- echo "600" > /sys/kernel/mm/uksm/sleep_millisecs;
- echo "* UKSM = Activated *" | tee -a $LOG;
- elif [ -e /sys/kernel/mm/ksm/run ]; then
- echo "1" > /sys/kernel/mm/ksm/run;
- setprop ro.config.ksm.support true;
- echo "128" > /sys/kernel/mm/ksm/pages_to_scan;
- echo "6000" > /sys/kernel/mm/ksm/sleep_millisecs;
- echo "1" > /sys/kernel/mm/ksm/deferred_timer;
- echo "* KSM = Activated *" | tee -a $LOG;
- fi;
- # Zram / Zswap =========================================#
- ALG=lz4
- ZR=$(($MEM/4))
- if [ "$zram" -eq 1 ]; then
- echo "1" > /sys/block/zram0/reset;
- echo "$((ZR*1024*1024))" > /sys/block/zram0/disksize
- sysctl -e -w vm.swappiness=30
- sysctl -e -w vm.page-cluster=2
- mkswap /dev/block/zram0 > /dev/null 2>&1;
- swapon /dev/block/zram0 > /dev/null 2>&1;
- setprop ro.config.zram.support true
- setprop zram.disksize $ZR
- if [ -e /sys/block/zram0/comp_algorithm ]; then
- echo "$ALG" > /sys/block/zram0/comp_algorithm
- fi;
- if [ -e /sys/block/zram0/max_comp_streams ]; then
- echo "4" > /sys/block/zram0/max_comp_streams
- fi;
- echo "* ZRAM = Activated for $ZR MB *" | tee -a $LOG;
- fi;
- if [ "$zswap" -eq 1 ]; then
- if [ -e /sys/module/zswap/parameters/enabled ]; then
- echo "Y" > /sys/module/zswap/parameters/enabled
- fi;
- if [ -e /sys/module/zswap/parameters/compressor ]; then
- echo "$ALG" > /sys/module/zswap/parameters/compressor
- fi;
- if [ -e /sys/module/zswap/parameters/max_pool_percent ]; then
- echo "30" > /sys/module/zswap/parameters/max_pool_percent
- fi;
- if [ -e /sys/module/zswap/parameters/zpool ]; then
- echo "z3fold" > /sys/module/zswap/parameters/zpool
- fi;
- sysctl -e -w vm.swappiness=30
- sysctl -e -w vm.page-cluster=2
- echo "* ZSwap = Activated *" | tee -a $LOG;
- fi;
- # Doze Settings Custom =========================================#
- SDK=$(getprop ro.build.version.sdk);
- if [ "$SDK" -ge "23" ]; then
- settings put global device_idle_constants light_after_inactive_to=30000 2>/dev/null
- settings put global device_idle_constants light_pre_idle_to=30000 2>/dev/null
- settings put global device_idle_constants light_idle_to=30000 2>/dev/null
- settings put global device_idle_constants light_idle_factor=2.0 2>/dev/null
- settings put global device_idle_constants light_max_idle_to=60000 2>/dev/null
- settings put global device_idle_constants light_idle_maintenance_min_budget=30000 2>/dev/null
- settings put global device_idle_constants light_idle_maintenance_max_budget=60000 2>/dev/null
- settings put global device_idle_constants min_light_maintenance_time=5000 2>/dev/null
- settings put global device_idle_constants min_deep_maintenance_time=10000 2>/dev/null
- settings put global device_idle_constants inactive_to=60000 2>/dev/null
- settings put global device_idle_constants sensing_to=0 2>/dev/null
- settings put global device_idle_constants locating_to=0 2>/dev/null
- settings put global device_idle_constants location_accuracy=20.0 2>/dev/null
- settings put global device_idle_constants motion_inactive_to=5000 2>/dev/null
- settings put global device_idle_constants idle_after_inactive_to=0 2>/dev/null
- settings put global device_idle_constants idle_pending_to=30000 2>/dev/null
- settings put global device_idle_constants max_idle_pending_to=60000 2>/dev/null
- settings put global device_idle_constants idle_pending_factor=2.0 2>/dev/null
- settings put global device_idle_constants idle_to=3600000 2>/dev/null
- settings put global device_idle_constants max_idle_to=21600000 2>/dev/null
- settings put global device_idle_constants idle_factor=2.0 2>/dev/null
- settings put global device_idle_constants min_time_to_alarm=3600000 2>/dev/null
- settings put global device_idle_constants max_temp_app_whitelist_duration=20000 2>/dev/null
- settings put global device_idle_constants mms_temp_app_whitelist_duration=20000 2>/dev/null
- settings put global device_idle_constants sms_temp_app_whitelist_duration=20000 2>/dev/null
- settings put global device_idle_constants notification_whitelist_duration=20000 2>/dev/null
- echo "* Doze Settings Custom = Activated *" | tee -a $LOG
- fi;
- # FIX GOOGLE PLAY SERVICE =========================================#
- for apk in $(pm list packages -3 | sed 's/package://g' | sort); do
- # Analytics
- pm disable $apk/com.google.android.gms.analytics.AnalyticsService
- pm disable $apk/com.google.android.gms.analytics.AnalyticsJobService
- pm disable $apk/com.google.android.gms.analytics.CampaignTrackingService
- pm disable $apk/com.google.android.gms.measurement.AppMeasurementService
- pm disable $apk/com.google.android.gms.measurement.AppMeasurementJobService
- pm disable $apk/com.google.android.gms.analytics.AnalyticsReceiver
- pm disable $apk/com.google.android.gms.analytics.CampaignTrackingReceiver
- pm disable $apk/com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver
- pm disable $apk/com.google.android.gms.measurement.AppMeasurementReceiver
- pm disable $apk/com.google.android.gms.measurement.AppMeasurementContentProvider
- pm disable $apk/com.crashlytics.android.CrashlyticsInitProvider
- # Ads
- pm disable $apk/com.google.android.gms.ads.AdActivity
- # Firebase
- pm disable $apk/com.google.firebase.iid.FirebaseInstanceIdService
- done
- echo "* Fix GP Services Extented = Activated *" | tee -a $LOG;
- # Network Speed and Throughput =========================================#
- sysctl -e -w net.ipv4.tcp_timestamps=1
- sysctl -e -w net.ipv4.tcp_fin_timeout=45
- sysctl -e -w net.ipv4.tcp_challenge_ack_limit=999
- sysctl -e -w net.ipv4.conf.all.rp_filter=2
- sysctl -e -w net.ipv4.conf.default.rp_filter=2
- sysctl -e -w net.ipv4.tcp_no_metrics_save=1
- sysctl -e -w net.ipv4.tcp_synack_retries=3
- sysctl -e -w net.ipv4.tcp_keepalive_intvl=45
- sysctl -e -w net.ipv4.tcp_keepalive_probes=9
- sysctl -e -w net.ipv4.tcp_window_scaling=1
- sysctl -e -w net.ipv4.tcp_sack=1
- sysctl -e -w net.ipv4.tcp_fack=1
- sysctl -e -w net.ipv4.tcp_moderate_rcvbuf=1
- for len in /sys/class/net/*;
- do echo "100" > $len/tx_queue_len;
- done;
- tcp=/proc/sys/net/ipv4/tcp_available_congestion_control
- if grep -l 'westwood' $tcp; then
- echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control
- STAT=Westwood
- else
- echo "reno" > /proc/sys/net/ipv4/tcp_congestion_control
- STAT=Reno
- fi;
- settings put global wifi_idle_ms 300000;
- settings put secure wifi_idle_ms 300000;
- settings put secure wifi_watchdog_poor_network_test_enabled 0
- settings put global tether_dun_required 0
- echo "* Network Speed $STAT = Activated *" | tee -a $LOG
- # Entropy/Random Daemon =========================================#
- RNGD=$SYSTEM/bin/rngd
- if [ "` pgrep hwrng`" ]; then
- sysctl -e -w kernel.random.read_wakeup_threshold=512 2>/dev/null
- sysctl -e -w kernel.random.write_wakeup_threshold=1024 2>/dev/null
- sysctl -e -w kernel.random.urandom_min_reseed_secs=60 2>/dev/null
- echo "* Auto Random = Generated (hwrng) *" | tee -a $LOG;
- elif [ "` pgrep qrngd`" ]; then
- sysctl -e -w kernel.random.read_wakeup_threshold=512 2>/dev/null
- sysctl -e -w kernel.random.write_wakeup_threshold=1024 2>/dev/null
- sysctl -e -w kernel.random.urandom_min_reseed_secs=60 2>/dev/null
- echo "* Auto Random = Generated (rng) *" | tee -a $LOG
- else
- sysctl -e -w kernel.random.read_wakeup_threshold=512 2>/dev/null
- sysctl -e -w kernel.random.write_wakeup_threshold=1024 2>/dev/null
- sysctl -e -w kernel.random.urandom_min_reseed_secs=60 2>/dev/null
- $RNGD -t 1 -T 1 -s 512 --fill-watermark=100%
- sleep 2
- PID=$( pgrep rngd)
- echo "-8" > /proc/$PID/oom_adj
- renice 5 $PID
- echo "* Auto Entropy = Generated *" | tee -a $LOG;
- fi;
- # DEEP SLEEP ENHANCEMENT =========================================#
- for i in ` ls /sys/class/scsi_disk/`; do
- cat /sys/class/scsi_disk/$i/write_protect 2>/dev/null | grep 1 >/dev/null
- if [ $? -eq 0 ]; then
- echo "temporary none" > /sys/class/scsi_disk/$i/cache_type
- fi;
- done
- # SLEEPING BT =========================================#
- for P in ` find find /sys/ -name pwrnap`;
- do echo "0" > $P;
- done
- # DEBUGGING / LOGGERS =========================================#
- for i in $( find /sys/ -name debug_mask); do
- echo "0" > $i;
- done;
- if [ -e /sys/module/logger/parameters/log_mode ]; then
- echo "2" > /sys/module/logger/parameters/log_mode
- echo "* Disabling Loggers = Activated *" | tee -a $LOG;
- fi;
- echo "* Misc = Activated *" | tee -a $LOG
- # Launcher / SystemUi Keeper/ =========================================#
- # LMK List Commom Launchers for Priority
- list="com.google.android.launcher org.lineageos.trebuchet com.google.android.apps.plus com.deletescape.launchair com.android.launcher3 com.actionlauncher.playstore com.yandex.launcher com.google.android.apps.nexuslauncher com.miui9launcher.miuithemes com.huawei.android.launcher com.miui.home com.cma.launcher.lite com.jiubang.go.mini.launcher com.kkmlauncher-1 com.uprui.launcher.marshmallow com.android.launcher org.adw.launcher org.adwfreak.launcher net.alamoapps.launcher com.anddoes.launcher com.android.lmt com.chrislacy.actionlauncher.pro com.cyanogenmod.trebuchet com.gau.go.launcherex com.gtp.nextlauncher com.miui.mihome2 com.mobint.hololauncher com.mobint.hololauncher.hd com.qihoo360.launcher com.teslacoilsw.launcher com.tsf.shell org.zeam com.sonyericsson.home com.xperiaZ5.home com.sonymobile.simplehome com.teslacoilsw.launcher.prime com.miui.home com.anddoes.launcher.pro-1 com.anddoes.launcher-2 com.actionlauncher.playstore com.lge.launcher2 com.sec.android.app.launcher com.sec.android.app.twlauncher com.gtp.nextlauncher com.cyanogenport.trebuchet";
- while sleep 60; do
- for class in $list; do
- if [ `pgrep $class | head -n 1` ]; then
- launcher=`pgrep $class`;
- echo -17 > /proc/$launcher/oom_adj;
- chmod 100 /proc/$launcher/oom_adj;
- renice -18 $launcher;
- fi;
- done;
- exit;
- done&
- while sleep 3; do
- if [ `$bb pidof com.android.systemui` ]; then
- systemui=`pidof com.android.systemui`;
- renice -18 $systemui;
- echo -17 > /proc/$systemui/oom_adj;
- chmod 100 /proc/$systemui/oom_adj;
- exit;
- fi;
- done&
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement