China Naming Network - Ziwei Dou Shu - How to modify the memory threshold under android source code

How to modify the memory threshold under android source code

The method to modify the memory threshold in the android source code is:

Step 1: First create a XXX.txt file and enter the following code:

#! /system/bin/sh

echo "1536,2048,4096,6144,8192,12288" > /sys/module/lowmemorykiller/parameters/minfree ;

This code is based on The value corresponding to MFM configuration 3. I have used this value for a few days and no problem has been found, so I will take this value as an example for the time being.

Then save and modify the saved XXX.txt file to 67-Jasonfix

Put this 67-Jasonfix file under system/etc/init.d using RE manager (This folder contains the startup script settings.

Then change the permissions to: check all.

Step 2: Modify install-recovery.sh (in system/etc directory)

(1). Find the lines where these scripts are located

sh /system/etc/init.d/XXXXX

Add them accordingly

sh /system/etc/init.d/67-Jason

(2). Then find

echo A,B,C,D,E,F /sys /module/lowmemorykiller/parameters/minfree

Just delete this line and save it.