> Attention!

New threads need to be created only inroot partition! In the future, they will be processed by moderators.

If you posted a new version of the program, please notify the moderator by clicking the "Complaint" button on your message.

Catalog of Android programs



В® Improve battery life ten times | patch to improve battery performance



Rep: (2513)
Up to ten times battery life improvement
version: n \ a

Last update of the program in the header:28.04.2012

Attached Image

For the operation of the script requires root user rights.

Short description:
patch to improve battery performance

Description:
Tested and working on : SGA, SGS, Xperia Play, Inc. HTC S, battery life has increased significantly

A lot of text
And so, guys, I give you a mod to achieve longer battery life. This mod, I use on Anthem в„ў, which gives me +50 hours per charge. You can include it in your own ROM or any other. It would be nice if you referred to me when publishing this mod on other resources.
Step 1

Open your ROM.zip (or whatever you call it) in 7zip (Windows) or Betterzip (OSX) and find the sysctl.conf file in / system / etc
If there is no such file, create it.

Step 2

In your sysctl.conf file, write the following text and save the changes to the file:
# sysctl.conf file
fs.nr_open = 1053696;
fs.inotify.max_queued_events = 32000;
fs.inotify.max_user_instances = 256;
fs.inotify.max_user_watches = 10240;
fs.lease-break-time = 10;
fs.file-max = 165164;
kernel.threads-max = 525810;
kernel.random.write_wakeup_threshold = 256;
kernel.random.read_wakeup_threshold = 128;
kernel.panic = 5;
kernel.sched_compat_yield = 1;
kernel.panic = 0;
kernel.panic_on_oops = 1;
kernel.msgmni = 2048;
kernel.msgmax = 64000;
kernel.shmmni = 4096;
kernel.shmall = 2097152;
kernel.shmmax = 268435456;
kernel.sem = '500 512000 64 2048';
kernel.sched_features = 24189;
kernel.hung_task_timeout_secs = 30;
kernel.sched_latency_ns = 18,000,000;
kernel.sched_min_granularity_ns = 1500000;
kernel.sched_wakeup_granularity_ns = 3000000;
kernel.sched_shares_ratelimit = 256,000;
kernel.sched_child_runs_first = 0;
fs.lease-break-time = 10;
fs.file-max = 65536;
net.core.wmem_max = 524288;
net.core.rmem_max = 524288;
net.core.rmem_default = 262144;
net.core.wmem_default = 262144;
net.core.optmem_max = 20480;
net.unix.max_dgram_qlen = 50;
net.ipv4.tcp_keepalive_time = 900;
net.ipv4.tcp_keepalive_probes = 5;
net.ipv4.tcp_keepalive_intvl = 156;
net.ipv4.tcp_timestamps = 0;
net.ipv4.tcp_sack = 1;
net.ipv4.tcp_fack = 1;
net.ipv4.tcp_window_scaling = 1;
net.ipv4.tcp_tw_recycle = 1;
net.ipv4.tcp_tw_reuse = 1;
net.ipv4.tcp_congestion_control = cubic;
net.ipv4.tcp_syncookies = 1;
net.ipv4.conf.all.rp_filter = 1;
net.ipv4.conf.default.rp_filter = 1;
net.ipv4.tcp_synack_retries = 2;
net.ipv4.tcp_syn_retries = 2;
net.ipv4.tcp_max_syn_backlog = 1024;
net.ipv4.tcp_max_tw_buckets = 16384;
net.ipv4.icmp_echo_ignore_all = 1;
net.ipv4.icmp_ignore_bogus_error_responses = 1;
net.ipv4.tcp_no_metrics_save = 1;
net.ipv4.tcp_fin_timeout = 15;
net.ipv4.tcp_keepalive_intvl = 30;
net.ipv4.tcp_keepalive_probes = 5;
net.ipv4.tcp_keepalive_time = 1800;
net.ipv4.ip_forward = 0;
net.ipv4.conf.default.accept_source_route = 0;
net.ipv4.conf.all.accept_source_route = 0;
net.ipv4.conf.all.accept_redirects = 0;
net.ipv4.conf.default.accept_redirects = 0;
net.ipv4.conf.all.secure_redirects = 0;
net.ipv4.conf.default.secure_redirects = 0;
net.ipv4.udp_rmem_min = 6144;
net.ipv4.udp_wmem_min = 6144;
net.ipv4.tcp_rfc1337 = 1;
net.ipv4.ip_no_pmtu_disc = 0;
net.ipv4.tcp_ecn = 0;
net.ipv4.route.flush = 1;
net.ipv4.tcp_rmem = '6144 87380 524288';
net.ipv4.tcp_wmem = '6144 87380 524288';
net.ipv6.conf.default.use_tempaddr = 2;
net.ipv6.conf.all.use_tempaddr = 2;
net.ipv6.conf.all.temp_prefered_lft = 3600;
net.ipv6.conf.default.temp_prefered_lft = 3600;
vm.dirty_ratio = 90;
vm.dirty_background_ratio = 80;
vm.oom_kill_allocating_task = 1;
vm.overcommit_memory = 1;
vm.page-cluster = 3;
vm.drop_caches = 3;
vm.min_free_kbytes = 4096;
vm.panic_on_oom = 0;
vm.dirty_expire_centisecs = 1000;
vm.dirty_writeback_centisecs = 2000;
vm.oom_kill_allocating_task = 0;
vm.vfs_cache_pressure = 10;
vm.min_free_order_shift = 4;
vm.laptop_mode = 0;
vm.block_dump = 0;


Step 3

Now we need to make this file executable at system startup. To do this, go to /system/etc/init.d and create the following file there:
#! / system / bin / sh
# grep sysctl /etc/init.d/*
# Load /sys/etc/sysctl.conf
sysctl -p

wheresysctl -p - that initializes the code.
Name your file, for example,10sysctl and save it.
Comment : Your ROM (or rather, the kernel) must support init.d. This can be done using dsixda's android kitchen (or installing a kernel with such support).

Step 4

Save your ROM and install it from recovery

OR

You can simply copy these files into the already installed firmware on your phone.
Read more about everything at the link to the source or below under the spoiler.

Explanation of parameter values ​​in English
----------- For knowledge -----------



Credits to imoseyon

Ok, so what exactly is sysctl.conf?

Sysctl.conf is a configuration file for "sysctl" The configuration file contains the following elements, vm.min_free_kbytes, vm.dirty_ratio, vm.dirty_backgroud_ratio, vm.vfs_cache_pressure, vm.oom_kill_allocating_task. We have been focusing on it. The sysctl.conf file should be located in / etc (/ system / etc) by default. S sysctl -p somewhere somewhere during the boot process (or shortly afterward). It is not already done so. You can also run the sysctl -p manually after the OS is started.

Sysctl.conf doesn’t really get it.

min free kbytes (vm.min_free_kbytes)
This is the number of kilobytes. This is the VM value for each low zone zone in the system. For each free zone it gets a number of reserved free pages based on its size. Default is 2048kb.

dirty ratio (vm.dirty_ratio) and dirty background ratio (vm.dirty_background_ratio)
This controls how often the card writes a disk to the disk. It is not clear that there is a way for the user to write a disk. These values ​​represent a flushes will occur. Now remember, we are dealing with a spindle and a spindle. It is a little bit longer with a solid hard disk drive.

VFS Cache Pressure
Now here is where it gets interesting! In the case of the file system, it is the system without sacrificing performance at the application level. It’s not a problem.

oom allocating task (vm.oom_kill_allocating_task) (enable or disable, this is not a value.)
OOM-triggering task in out-of-memory (oom) situations. If you want to see the OOM This is a large amount of memory when killed. If this is the OOM killer, it is simply the kills for the out-of-memory condition. This is an easy-to-follow list of scans, or freeze the system.

block_dump (vm.block_dump)
This enables block I / O debugging when set to a nonzero value. If you want to go up (see / proc / sys / vm / laptop_mode), you can gather it up.

If this flag is set, it will give you information about how to get files. This makes it possible to drive up and increase battery life even more. The output of block_dump is retrieved using the "dmesg". If you’re not using your jailbreak, you’ll not be there.

overcommit_memory (vm.overcommit_memory)
More controls than is actually available.

0 - Heuristic overcommit handling. Obvious overcommits of address space are not. Used for a typical system. It is ensured that it will be completely reduced. root is allowed to allocate slighly more memory in this mode. This is the default.
1 - Always overcommit. Appropriate for some scientific applications.
2 - Don't overcommit. The total address of the physical RAM is exceeded. It’s not a problem.

page-cluster (vm.page-cluster)
This is a list of pages that are written. The swap I / O size.

It is a logarithmic value - setting it to zero means "1 page", setting it to 1 means "2 pages", setting it to 2 means "4 pages", etc.

The default value is three (eight pages at a time). If your workload is swap-intensive.

panic_on_oom (vm.panic_on_oom)
This enables or disables panic on out-of-memory feature. If this is set to 1, the kernel panics when out-of-memory happens. If this is set to 0, the kernel will kill some rogue process, by calling oom_kill ().

Usually, oom_killer can kill rogue processes and system will survive. If you want to panic the system rather than killing the rogue processes, set this to 1.

The default value is 0.

It is detected by the kernel.

dirty_expire_centisecs (vm.dirty_expire_centisecs)
How old "data" should be written to disk. It is expressed in 100ths of a second.

dirty_writeback_centisecs (vm.dirty_writeback_centisecs)
This is a period of time periodically for your writeback. It is expressed in 100ths of a second.

If you are lazy and want everything at once, you can download the ready-made update (Battery_life_mod_flashable.zip) for CWM (it contains commands that work with CWM5, if you need to update another script update-script) and install it (This does not negate the fact that your firmware must support init.d)
How do I know if my firmware supports init.d?
In /init.rc you should have a line with running the busybox commands. The easiest way to check is to write to terminal:
grep busybox /init.rc

and look for the following string:
service sysinit / system / bin / logwrapper / system / xbin / busybox run-parts /system/etc/init.d

How do I know if my firmware supports init.d? Option 2 В® Improving battery life ten times (Post # 30753902)
The second version of the script
# sysctl.conf file
fs.nr_open = 1053696
fs.inotify.max_queued_events = 32000
fs.inotify.max_user_instances = 256
fs.inotify.max_user_watches = 10240
fs.lease-break-time = 10
fs.file-max = 165164
kernel.threads-max = 525810
kernel.random.write_wakeup_threshold = 256
kernel.random.read_wakeup_threshold = 128
kernel.panic = 5
kernel.sched_compat_yield = 1
kernel.panic = 0
kernel.panic_on_oops = 1
kernel.msgmni = 2048
kernel.msgmax = 64000
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 268435456
kernel.sem = '500 512000 64 2048'
kernel.sched_features = 24189
kernel.hung_task_timeout_secs = 30
kernel.sched_latency_ns = 18,000,000
kernel.sched_min_granularity_ns = 1500000
kernel.sched_wakeup_granularity_ns = 3000000
kernel.sched_shares_ratelimit = 256,000
kernel.sched_child_runs_first = 0
fs.lease-break-time = 10
fs.file-max = 65536
vm.dirty_ratio = 90
vm.dirty_background_ratio = 80
vm.oom_kill_allocating_task = 1
vm.overcommit_memory = 1
vm.page-cluster = 3
vm.drop_caches = 3
vm.min_free_kbytes = 4096
vm.panic_on_oom = 0
vm.dirty_expire_centisecs = 1000
vm.dirty_writeback_centisecs = 2000
vm.oom_kill_allocating_task = 0
vm.vfs_cache_pressure = 10
vm.min_free_order_shift = 4
vm.laptop_mode = 0
vm.block_dump = 0

Script underinit.d
How to configure sysctl
How to set file permissions
How to do without init.d
How to check that the script does not spin
Read aboutsysctland its settings
Link to the topic : Tips to improve power saving devices on Android OS

Developer: PureMotive
Homepage: http://forum.xda-developers.com/showthread.php?t=1621808

Russian interface: Unknown

Download the update for CWM: Attached fileBattery_life_mod_flashable.zip (128.47 KB)

Download the update for hTC Incredible: Attached fileSysctl_conf.zip (159.95 KB)

Download the sysctl.conf file separately: Attached filesysctl.zip (1.07 KB)

Download the sysctl.conf file from 05/03/12 separately: Attached filesysctl_030512.zip (1.06 KB)

Download sysctl.conf file corrected by forum member Black_BG: В® Improving battery performance ten times (Post # 13253249)
NEW Script option for Samsung Galaxy Mini & SG Fit: В® Improving battery performance ten times (Post # 13415067)
Past versions

* Improving the battery life is ten times - of course this is an exaggeration, but how does it sound!)))

Post has been editedvovanKARPO - 02.03.17, 22:05
Reason for editing: utility



Rep: (2)
Please tell me it's true)



Rep: (1179)
pavel160894,
Theoretically, it can work, but I think that each device has its own settings ...

Lovetz
You can do without init.d
Script manager



Rep: (145)
how is the update?



Rep: (27)
The whole android world froze in anticipation of a miracle ... :)
While I will not put, wait for reviews



Rep: (65)
Installed on SGS firmware cm-9-20120427-NIGHTLY, the core of Semaphore ICS 1.1.1. We'll see.



Rep: (43)
Who can explain how it increases the duration of the work?



Rep: (29)
Damn, I write in the terminal grep busybox /init.rc and he writes that permission denied? Firmware from vo-1 Samsung Ace

- = V @ DIM = -, due to magic

Post has been editedf-lirt - 28.04.12, 09:40



Rep: (161)
Not knowing the author and not reading the first post, I would have thought that some kind of virus or spam).
In general, I am extremely skeptical of all these things, I remember xda wrote such tales about the V6 Supercharger that I even decided to try, in the end I didn’t catch the difference at all.
Lovetz
Tell me, how much is the real increase in%? For example on your SGA.
- = V @ DIM = -
Miracles do not happen, read the lines under the spoiler, there are a lot of different parameters (for example, the time after which the connection with the Internet will break when the connection is inactive.

Post has been editedDen90 - 28.04.12, 09:43



Rep: (43)
Miracles do not happen, for the sake of charge you will have to sacrifice something: for example, performance. Even if in rest mode you manage to significantly reduce consumption, then while playing games or watching movies, surfing in the field, while maintaining the possibility of normal operation with the device (I’m talking about the absence of wild lags), the improvements will be almost not noticeable. So the increase in the duration of work is several times most likely you will notice only if you hide your smartphone in the box for 3 days. On the other hand (which I actually use), this is very good when you are sure that if you have 15% charge left, this will be enough for you until the evening and you will not miss a call. In my opinion, to save charging, it is more convenient to turn off gps, wifi, 3g, bluetooth, etc. I put myself a special widget on the desktop and turn it on only when necessary. Also, for owners of amoled displays, I recommend dark wallpapers and dark themes, also significantly save.



Rep: (172)
Tax, set. On the CF-Root, the kernel got normal. We charge the device and I will test. He didn’t become more brake - already he is happy.



Rep: (2513)
Den90 @ 04/28/2012, 10:41*
Tell me, how much is the real increase in%?
Hey. There are no statistics yet, only in the morning I stuck this patch, charged the battery and did the calibration. We'll see.
Periodically there are various "magic" patches and I see no reason why not to try them, if there is a CWM)

Post has been editedLovetz - 28.04.12, 10:46



Rep: (161)
Lovetz @ 04/28/2012, 10:38*
and did a calibration.

By the way, this is also a myth regarding calibration. Or are you not about removing batterystats.bin, but just discharged the device to zero and charged it completely?



Rep: (2513)
Den90, I know about the myth, I read Google. However, the deletion of this file and several cycles of discharge - charge, oddly enough, help.



Rep: (142)
You just do not forget that other scripts in init.d of any adrenalines and so on, and even in the custom kernel, almost all these values ​​have already been changed.
And since the scripts in init.d are executed in alphabetical order, then look for the "10sysctl" to be the last one, or rename it to the last one so that the changes made by it are not canceled by subsequent ones.
and the current can be viewed in the terminalsysctl -a or it may change nothing already :)

Post has been editedEngelS - 28.04.12, 11:26



Rep: (161)
Lovetz @ 04/28/2012, 11:22*
However, the deletion of this file and several cycles of discharge - charge, oddly enough, help.

Here are some cycles that can really affect something.



Rep: (6)
Someone put on HTC HD2?



Rep: (40)
F-lirt @ 04/28/2012, 10:39*
I write in the terminal grep busybox /init.rc and he writes that permission denied

Similarly, he writes. Worth cm7.



Rep: (9)
I installed LeWa firmware on SGA from 04/27/12, I will test



Rep: (2)
I write in the terminal grep busybox /init.rc and nothing happens. SGS2 omega



Rep: (60)
April first seems to have passed.


Full version    

Help     rules

Now: 07/04/19 07:30