{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Before we get to the mod, I want to get a little personal. I make these mods so that your Android experience will be enhanced. If you find something wrong with the mod then provide constructive criticism. Don't just sit there behind your computer and degrade the effects based on what you see in the code, especially if you are even unwilling to try the mod in the first place. That irritates the hell out of me and unfortunately, I can't help you with your issues...so do yourself and others a favor and either use the mod and provide constructive criticism such as results (positive or negative) or ways to improve it or don't use it at all. That being said, these tweaks work in conjunction with each other, they are not each meant to increase your battery life.
This is my mod for achieving good-great battery life. This is the mod I use in Anthem™ which has given me 50+ hours on a single charge. The increase in battery life may not be "tenfold" for you, but it does increase, which is still better than not increasing. Contact me before including it in your own ROM (that you plan on publicly releasing). I will allow you to use it, just ask first. Please give credit or thanks or both
First: Here is a flashable .zip of the mod that may or may not work with your ROM. I'd still advise doing it manually.
Sysctl.conf - Updated May 3, 2012Requirements:
HTC Incredible (preferably)
Kernel with zram swap (for swappiness)
Kernel with init.d support
Currently working on:
HTC Incredible - Anthem, Clutch, AOKP, ICSenseless
HTC Amaze 4G
Step 1
Open up your ROM.zip (or whatever it's called) in 7zip (Windows) or Betterzip (OSX) and locate
sysctl.conf in /system/etc
If it's not in this directory, create it.
Step 2
In your sysctl.conf file, paste the following code and save it.
Code:
#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.sched_compat_yield=1;
kernel.panic=5;
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=18000000;
kernel.sched_min_granularity_ns=1500000;
kernel.sched_wakeup_granularity_ns=3000000;
kernel.sched_shares_ratelimit=256000;
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;
If the above code does not work for you, try this one. It has the semi-colons removed. Thanks Tiny
Code:
#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.sched_compat_yield=1
kernel.panic=5
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=18000000
kernel.sched_min_granularity_ns=1500000
kernel.sched_wakeup_granularity_ns=3000000
kernel.sched_shares_ratelimit=256000
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
Step 3
Now we need to enable it. So, navigate to /system/etc/init.d and create a file with the following code:
Code:
#!/system/bin/sh
# grep sysctl /etc/init.d/*
# Load /sys/etc/sysctl.conf
sysctl -p
sysctl -p is what initializes the code.
Just FYI: You don't actually need these lines:
Code:
# grep sysctl /etc/init.d/*
Code:
# Load /sys/etc/sysctl.conf
So this would have just sufficed.
Code:
#!/system/bin/sh
sysctl -p
If the above code does not work for any reason, try this:
Code:
#!/system/bin/sh
sysctl -p /system/etc/
Name your file something like this 10sysctl
Save your file.
NOTE: Your ROM must support init.d. You can do this by using dsixda's android kitchen
Step 4
Save your ROM and install it via recovery
OR
you could just push the files into your current ROM and try them out.
Credits to imoseyon for portions of the info
Ok, so what exactly is sysctl.conf?
The sysctl.conf is a configuration file for "sysctl" which is an interface for dynamically changing kernel parameters in the Linux OS. 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. There are many other elements within the file, but we will be primarily focusing on these specifically (the vm prefix stands for virtual memory). The sysctl.conf file should be located in /etc (/system/etc) by default. To enable it you need your ROM to execute "sysctl -p" somewhere during the boot process (or shortly afterward). We will also be discussing how to enable it if it is not already done so. You can also run sysctl -p manually to enable it any time after the OS is started.
Now, let’s get down to what sysctl.conf does and how it works.
min free kbytes (vm.min_free_kbytes)
This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a pages_min value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size. Default is 2048kb.
dirty ratio (vm.dirty_ratio) and dirty background ratio (vm.dirty_background_ratio)
This controls how often the kernel writes data to "disk" (in our case the internal microSD system card, not the removable microSD card). When your apps write data to disk, Linux actually doesn't write the data out to the disk right away, it actually writes the stuff to system memory and the kernel handles when and how the data is actually going to be flushed to the disk. These values represent a percentage, the higher the percentage, the longer it waits to flush, the lower the percentage, the more often flushes will occur. Now remember, we are dealing with solid state storage, not the traditional disk platter and spindle. So we are actually able to delay flushes a little longer with solid state versus a traditional hard drive disk.
VFS Cache Pressure (vm.vfs_cache_pressure)
Now here is where it gets interesting! File system cache (dentry/inode) is really more important than the block cache above in dirty ratio and dirty background ratio, so we really want the kernel to use up much more of the RAM for file system cache, this will increas the performance of the system without sacrificing performance at the application level. The default value is 100, as a percentage, and what you want to do is lower the value to tell the kernel to favor the file system cache and not drop them aggressively.
oom allocating task (vm.oom_kill_allocating_task)(enable or disable, generally in Linux this value is either a "1" or a "0," representing as on or off.)
This enables or disables killing the OOM-triggering task in out-of-memory (oom) situations. If this is set to zero, or disabled, the OOM killer will scan through the entire task list and select a task based on heuristics to kill. This normally selects a rogue memory-hogging task that frees up a large amount of memory when killed. If this is set to non-zero, or enabled, the OOM killer simply kills the task that triggered the out-of-memory condition. This avoids the expensive task list scan, which can take mass amounts of time and "hang" 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 find out which process caused the disk to spin up (see /proc/sys/vm/laptop_mode), you can gather information by setting the flag.
When this flag is set, Linux reports all disk read and write operations that take place, and all block dirtyings done to files. This makes it possible to debug why a disk needs to spin up, and to increase battery life even more. The output of block_dump is written to the kernel output, and it can be retrieved using "dmesg". When you use block_dump and your kernel logging level also includes kernel debugging messages, you probably want to turn off klogd, otherwise the output of block_dump will be logged, causing disk activity that is not normally there.
overcommit_memory (vm.overcommit_memory)
This controls overcommit of system memory, possibly allowing processes to allocate (but not use) more memory than is actually available.
0 - Heuristic overcommit handling. Obvious overcommits of address space are refused. Used for a typical system. It ensures a seriously wild allocation fails while allowing overcommit to reduce swap usage. 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 space commit for the system is not permitted to exceed swap plus a configurable percentage (default is 50) of physical RAM. Depending on the percentage you use, in most situations this means a process will not be killed while attempting to use already-allocated memory but will receive errors on memory allocation as appropriate.
page-cluster (vm.page-cluster)
This controls the number of pages which are written to swap in a single attempt. 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). There may be some small benefits in tuning this to a different value 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 rogue processes, set this to 1.
The default value is 0.
Panic is a system error that is detected by the kernel.
dirty_expire_centisecs (vm.dirty_expire_centisecs)
How old "dirty" data should be before the kernel considers it old enough to be written to disk. It is expressed in 100ths of a second.
dirty_writeback_centisecs (vm.dirty_writeback_centisecs)
This is the interval of when the writeback daemons periodically wake up and write "old" data out to disk. It is expressed in 100ths of a second.
I would be stoked if someone made a flashable zip for me to try
Sent from my ADR6300 using XDA
Could you please explain how this will increase battery life? And if it can be used in other phones?
Sent from my ADR6425LVW using XDA
Does this work on x10 mini with miniCM by NAa ?
I have sysctrl.conf file and when open it with rootexplorer its empty .
Can I add this lines from phone ? Copy/paste them into the files whith rootex ?
Pls answer me and thk U .
Sent from my E10i using xda premium
how do we know if our rom has init.d support?
do we have to ask the rom creator or is there a way to check
Is this already included in your Clutch Rom as well?
Sent from my HTC Droid Incredible using XDA
OMG_VTEC said:
how do we know if our rom has init.d support?
do we have to ask the rom creator or is there a way to check
Click to expand...
Click to collapse
You should have a line in /init.rc with busybox run-parts. To check the easiest way may be from the terminal:
Code:
grep busybox /init.rc
and look for a line like this:
Code:
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
graymonkey44 said:
Could you please explain how this will increase battery life? And if it can be used in other phones?
Sent from my ADR6425LVW using XDA
Click to expand...
Click to collapse
Trust me it works, I had over 20+ hours at a semi heavy use.
Sent from my ADR6300 using Tapatalk 2
withbloodskies said:
Trust me it works, I had over 20+ hours at a semi heavy use.
Click to expand...
Click to collapse
Was there any system performance degradation and/or instability?
Would someone knowledgeable be willing to give an overview description as to what the proposed changes effect?
Would also like to know if this could be done from phone.
PureMotive said:
Okay guys, I just thought I'd give you my mod for achieving good-great battery life. This is the mod I use in Anthem™ which has given me 50+ hours on a single charge. Feel free to include it in your own ROM or whatever. Giving credit would be nice
Step 1
Open up your ROM.zip (or whatever it's called) in 7zip (Windows) or Betterzip (OSX) and locate
sysctl.conf in /system/etc
If it's not in this directory, create it.
Step 2
In your sysctl.conf file, post the following code and save it.
Code:
#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=18000000;
kernel.sched_min_granularity_ns=1500000;
kernel.sched_wakeup_granularity_ns=3000000;
kernel.sched_shares_ratelimit=256000;
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 enable it. So, navigate to /system/etc/init.d and create a file with the following code:
Code:
#!/system/bin/sh
# grep sysctl /etc/init.d/*
/etc/init.d/02vm:# Load /sys/etc/sysctl.conf
/etc/init.d/02vm:sysctl -p
sysctl -p is what initializes the code.
Name your file something like this 10sysctl
Save your file.
NOTE: Your ROM must support init.d. You can do this by using dsixda's android kitchen
Step 4
Save your ROM and install it via recovery
OR
you could just push the files into your current ROM and try them out.
Click to expand...
Click to collapse
Would this work on my HTC Inspire 4g?
Sent from my HTC Inpsire 4G using XDA
Would this work on my HTC Inspire 4G?
Sent from my Desire HD using XDA
I will try this method, as do the necessary tests will comment if it works or not, Greetings!
Does this code change things like how often you're phone checks the cell tower? Have you experienced any missed calls if this is the case? 50+ hours of battery life sounds like it'd be worth the risk, just curious as to what this script is actually doing.
Sent from my ADR6300 using XDA
ferotakis said:
Does this work on x10 mini with miniCM by NAa ?
I have sysctrl.conf file and when open it with rootexplorer its empty .
Can I add this lines from phone ? Copy/paste them into the files whith rootex ?
Pls answer me and thk U .
Sent from my E10i using xda premium
Click to expand...
Click to collapse
Yeah you should be able to paste it with rootex and get it working.
david.degraw54 said:
Would this work on my HTC Inspire 4G?
Sent from my Desire HD using XDA
Click to expand...
Click to collapse
Yes it should. It works with mine lol
jprow507 said:
Is this already included in your Clutch Rom as well?
Sent from my HTC Droid Incredible using XDA
Click to expand...
Click to collapse
Yep
ChuckFarley said:
Does this code change things like how often you're phone checks the cell tower? Have you experienced any missed calls if this is the case? 50+ hours of battery life sounds like it'd be worth the risk, just curious as to what this script is actually doing.
Sent from my ADR6300 using XDA
Click to expand...
Click to collapse
Nope, no missed calls. Everything works fine after using this script. Basically, if you use this, you're just getting the same or similar battery life and performance experience of Anthem on different ROMs.
Can someone please explain what this exactly does to improve battery life?
Sent from my ADR6425LVW using XDA
graymonkey44 said:
Can someone please explain what this exactly does to improve battery life?
Sent from my ADR6425LVW using XDA
Click to expand...
Click to collapse
Yes please answer this.
And can someone make this into a flashable .zip?
PureMotive said:
Nope, no missed calls. Everything works fine after using this script. Basically, if you use this, you're just getting the same or similar battery life and performance experience of Anthem on different ROMs.
Click to expand...
Click to collapse
Wow, sounds too good to be true. I'm all in!
Sent from my ADR6300 using XDA
I'll update the OP later with an explanation.
Quick question about adding the code to the sysctl.conf file: Do you completely replace the existing code with your suggested code, or append yours to the existing?
Related
Tried searching but didn't see anything already posted....
Cyanogen posted on twitter:
powertop for android binary: http://bit.ly/VfOUN .. it needs a kernel with timer debugging enabled (this is in the CM kernels)
Its a tar file that you download. I tried deploying the files but I get an error:
Error opening terminal: unknown
Here is how I deployed the files......
Code:
# pwd
pwd
/system/etc/terminfo
# ls -l l
ls -l l
-rw-r--r-- 1 0 0 1672 Jul 3 00:47 linux
# ls -l u
ls -l u
lrwxrwxrwx 1 0 0 10 Jul 3 00:49 unknown -> ../l/linux
# ls -l /system/bin/powertop
ls -l /system/bin/powertop
-rwxrwxrwx 1 0 0 286648 Jul 3 00:42 /system/bin/powertop
#
I get the same problem.
My guess is cyan is going to include it with 3.6.1 so we can just wait for that to be released.
ive tried various things too. cyanogen, must use some voodoo to get it to work. chmod 777 the 3 files changing PATH, TERM and terminfo, no avail
From cyan on twitter:
if you can't get powertop to work, try "export TERMINFO=/system/etc/terminfo" first
Tried it, still no luck though.
Screen shot of the problem
GOT IT!
Code:
# su
su
# export TERMINFO=/etc/terminfo
export TERMINFO=/etc/terminfo
# export TERM=linux
export TERM=linux
# powertop
Attached some screenshots...
It suggested "increase the VM dirty writeback time to 15 seconds"...
I think that was part of the sysctl.conf tweak thread. I haven't redone those tweaks since I wiped and put cyan's new ROM on my phone. Interesting.
I wish my dos prompt would work with ANSI control codes so I could run it through ADB...
BTW, the tweaks it suggests are for X86, not Android. Most can be ignored, especially the ones about kernel options.
I included it with 3.6.1 too.
So what exactly does this do?
Breen said:
So what exactly does this do?
Click to expand...
Click to collapse
How did you find this website if you've never used a search engine before?
I didn't find anything specific to android.
Just like a "check what consumes most power"-app.
lmfwtw said:
Does accepting powertop suggestions reduce the speed of the phone?
It is currently suggesting
Increase the VM dirty writeback time from 5.000 to 15 seconds with
echo 1500 > /proc/sys/vm/...
Another one it suggest is
Enable the CONFIG_NO_HZ
Enable CONFIG_USB_SUSPEND
Enable CONFIG_HPET_TIMER
in kernel conf option
Click to expand...
Click to collapse
ubernicholi said:
only VM dirty writeback works
the others are for x86 architecture, which the g1 is not. ignore the recommendations of this app.
Click to expand...
Click to collapse
A few questions:
I've been running my phone with Open Overclocker at min 528 Mhz / max 528 Mhz. Would it save battery life to put the minimum lower? (I've found that the lowest you can go is "001 / 528" (leading zeros are necessary).)
How do you implement the VM dirty writeback? lmfwtw says "echo 1500 > /proc/sys/vm/...". But what is the "..."?
What is gp_timer? It always seems to be the #1 cause of wakeups by FAR. Next is futest_wait, and sometimes m2m_i2c. Can they be shutdown/decreased?
Is there anything else we can write to the kernel to save power? I found this, http://ubuntuforums.org/showthread.php?t=729644 but I have no idea if any of that is applicable / will brick my phone.
I didn't find anything specific to android.
Just like a "check what consumes most power"-app.
Click to expand...
Click to collapse
Yeah thats what I found too.
Dont pay any attention to that dude, he likes to play pretend moderator at times and ***** at people for useless posts when in fact his posts are just as useless and adding to the garbage that clutter up threads.
I found this: "Powertop is a Linux command line tool that monitors your laptop (or desktop) and offers suggestions on how to make your hardware consume less power."
I have some other questions as well, but I'll wait. Does anyone know the ones in my last post?
I've been running my phone with Open Overclocker at min 528 Mhz / max 528 Mhz. Would it save battery life to put the minimum lower? (I've found that the lowest you can go is "001 / 528" (leading zeros are necessary).)
Click to expand...
Click to collapse
Found in another thread...
Do NOT use 128/528. It hurts battery life and the processor. The jump between 528 and the idle frequency is big enough to require extra circuits to be switched on. That does two things... slows down the gain of the processor speed and hurts battery life more than simply running permanently on 528.
Click to expand...
Click to collapse
I assume going 001 / 528 would be even worse. Hope that helped.
Senorkabob said:
Found in another thread...
I assume going 001 / 528 would be even worse. Hope that helped.
Click to expand...
Click to collapse
Thanks. Actually, last night after I put it on 001/528, I started having freezes almost immediately. For example, each time the screen rotated when I took the keyboard out, it froze. And when enabling an Alarm, the toast message caused a freeze. And they were 100% full freezes, ie had to take the battery out. After about 5 full freezes, I decided to go back to 528/528 and everything went back to normal. I guess I'll stay on 528/528 hah
A lot of people have a tough time with Hero/Sense ROMs. I thought I'd make a guide on what I do to help others out. This is not definitive but it's my personal way of doing things. Comments, tips and suggestions are welcome here. I will update this with some more info as I go along.
I have a MT3G but this is the same for G1.
**Firerat has really comprehensive guides for A2SD and other tweaks. Please check his thread for more info. Also, his post about setcpu profiles is a must read.
First, get a ROM. I'm currently playing with KingKlick's Legend Port and Vegaman's kernel update.zip. This guide applies to any Hero ROM though.
Table of Contents / Overview
First things first
Get your task killers in order (TasKiller, AutoKiller, etc.)
MyBackup Pro or similar if you use them
Autostarts-- one of my favorites. Would love to hear about a free alternative
Droidwall-- free, blocks Internet to apps you choose
Reboot, wipe Dalvik-cache, reboot
Additional steps, Misc, Errata
FIRST:
Partition your SD card. I set a 256MB swap partition and have copious memory left over even under heavy load. EXT2 is better than 3/4.
Flash the ROM, flash the kernel update after. Boot the ROM, go through set up. I always skip signing in at this point as the setup is heavy on the CPU and wait for things to settle before the memory intensive sign in process begins.
SECOND:
Okay, now I see the home screen. Install TasKiller (free/paid) with ADB, MyBackup Pro and kill all the processes except Sense. I highly recommend Autostarts (paid). It handles not only autostart processes but also event listeners and will significantly speed up the ROM. Here are the services I disable:
"After Startup"
Download Manager
My Uploads
Network Location
PC Synchronization
HTC Message Uploader
Peep
HTC Media Uploader
Flickr/FaceBook/MySpace/etc
com.htc.socialnetwork.provider
HTC Widget Download Manager
MyBackup Pro (Uploads your location to their servers at every boot!!)
"Connectivity Changed"
My Uploads
Network Location Service
HTC Message Uploader
HTC Media Uploader
com.htc.socialnetwork.provider
"Application Installed"
PC Synchronization
Pico TTS (why would text-to-speech need to run...)
If you use Slacker.. disable it completely from all "Application Changed/Installed/Removed" categories. No need in them knowing your usage..
"Screen Off"
TasKiller
Notice how (and you can watch with logcat) when an application is modified or installed, it starts up Pico TTS (text-to-speech), synchronization, etc. This is not necessary and a memory hog. You might also be thinking "but I needz muh Facebook" but you don't need it to autostart. These services will load on demand as you use them. Without them, things go a lot quicker.
THIRD: (If you use MyBackup Pro)
Now, I sign into my account with Market, accept the terms and conditions. Once things have settled and I'm able to use the Market I exit the app immediately. I use MyBackup Pro to restore my apps. Version 3 now links apps to Market so they can be updated. Pretty slick despite the fact it logs your location to their servers without your permission. Luckily Autostarts stopped that. Now there's a small catch-- MyBackup messes up the Market database. Easy fix with ADB:
Code:
# cd /data/data/com.android.vending/databases
# ls -l
[I]I summarized the output here for formatting's sake..[/I]
----rwxr-x assets.db
-rw-rw---- billing.db
-rw-rw---- webview.db
-rw-rw---- webviewCache.db
See how assets.db is owned by root and the wrong permissions? This will FC Market 10/10 times. So:
Code:
# cp assets.db BACKUPassets.db
# cp -p billing.db assets.db
# cat BACKUPassets.db | tee assets.db
# rm BACKUPassets.db
Now it will work. The theory is that we can't chown the DB due to an "unknown user" but the other files there have the correct permissions. We use cat and tee to overwrite the clone with the correct contents. It's a hack that works perfectly.
FOURTH:
I then reboot and go to the Market. Install Droidwall (free) and set it to blacklist any app that doesn't need Internet Access. I also install AdFree (free). One site that it doesn't block is flurry.com. This site is used by a lot of applications such as MoreLocale. It uploads personally identifying information about you including your location, phone number, account info, etc. without your permission. I append it to my hosts file afterward. Note that each update with AdFree will erase that entry but I use Autostarts to disable it at boot and never update.
Code:
# mount -o remount,rw /dev/block/mtdblock3 /system
# echo "127.0.0.1 flurry.com" | tee -a /system/etc/hosts
# mount -o remount,ro /dev/block/mtdblock3 /system
FIFTH:
With all the apps now installed that I want to start out with, I go back to Autostarts and disable those I don't want (pretty much all of them). I reboot into recovery mode and wipe Dalvik cache. Reboot, wait for it to cache again and all is well.
Additional Steps
You can easily lock home into memory. *thanks speedysilwady and firerat. Here's how to set this permanently:
Code:
adb pull /init.rc
[I]replace "setprop ro.HOME_APP_MEM ..." with:
[B]setprop ro.HOME_APP_MEM 1536[/B]
[/I]adb push init.rc /sdcard/init.rc
adb shell
# mount -o remount,ro rootfs /
# cat /sdcard/init.rc | tee /init.rc
# mount -o remount,rw rootfs /
# rm /sdcard/init.rc
I will update this as I go. Any comments and tricks like reducing call delays are welcome. Again, this is just how I do things. Hope it helps.
Reserved for the updates....
Reserved for more updates. Just in case.
Don't bother getting kings version just get Vegaman's 0.3 version.
It works a treat and fast as well...
EDIT= and on Vegaman's use EXT2 not EXT4 like you have to do in kings roms. EXT2 is faster then EXT4
Awesome thread! you could also use AutoKiller and Cachemate to keep things smooth as well! =]
Updated OP. I'm looking for the prioritizer script that supposedly gets incoming calls within 1-2 rings... will update when I get it figured out. I have between 40-55MB free memory according to TasKiller when no apps are running.
deuse said:
Don't bother getting kings version just get Vegaman's 0.3 version.
It works a treat and fast as well...
EDIT= and on Vegaman's use EXT2 not EXT4 like you have to do in kings roms. EXT2 is faster then EXT4
Click to expand...
Click to collapse
I agree...and great job thread creater!!!
Interesting! I will try this, how much will the speed increase be?
With what I do, I barely get any slow downs unless I run a lot of apps but I have TasKiller's mini taskbar on one of my home screens and always clear things out before I do something like web browsing, Maps, or games to keep RAM clean.
I'd love an alternative to Autostarts that's free but it is truly great. Blocking listeners causes a huge boost in speed. You will see in logcat when you install an app that all these services start running in the background like Voice Dialer, TTS, etc. That's the reason installing apps seems to peg the phone for a few minutes. Not so when you block those background services.
enatefox said:
Updated OP. I'm looking for the prioritizer script that supposedly gets incoming calls within 1-2 rings... will update when I get it figured out. I have between 40-55MB free memory according to TasKiller when no apps are running.
Click to expand...
Click to collapse
Code:
su
setprop ro.HOME_APP_MEM 1536
this will keep home in memory. I learned that one from Firerat , should make calls come in faster
from what i understand a large swap like that might offer some positive temporary results, but after time clogs up
adelco93 said:
from what i understand a large swap like that might offer some positive temporary results, but after time clogs up
Click to expand...
Click to collapse
It's bad to have a large swap and high swappiness.
I haven't had any issues. The swap partition hasn't clogged up or even gone under 100MB left for me yet. Your mileage may vary but it's what I set it to. What size/swappiness would you recommend then? 96MB is not enough, 128MB seemed like too close to the edge of what I need.
I need to make the OP not look like crap...
It is better for the life of your sdcard to have a large swap....because if you allocate say only 64mb to swap...those blocks on your sdcard are constantly being written/read and the rest isn't....better to have a swap of say 256mb so that you are evening out the stress on the blocks more.
I think Wes G or Chris S said this....but that's my paraphrase of it.
Also no difference in speed between a 32mb swap and a 256mb swap. Just depends on your sdcard's class.
enatefox said:
I haven't had any issues. The swap partition hasn't clogged up or even gone under 100MB left for me yet. Your mileage may vary but it's what I set it to. What size/swappiness would you recommend then? 96MB is not enough, 128MB seemed like too close to the edge of what I need.
I need to make the OP not look like crap...
Click to expand...
Click to collapse
60 at most 80 or 100 is to much
G1ForFun said:
Also no difference in speed between a 32mb swap and a 256mb swap. Just depends on your sdcard's class.
Click to expand...
Click to collapse
If we were talking about computers then swap would be same size as ram, it's better to have no swap at all then to have one
Read some of this:
https://help.ubuntu.com/community/SwapFaq
G1ForFun said:
It is better for the life of your sdcard to have a large swap....because if you allocate say only 64mb to swap...those blocks on your sdcard are constantly being written/read and the rest isn't....better to have a swap of say 256mb so that you are evening out the stress on the blocks more.
I think Wes G or Chris S said this....but that's my paraphrase of it.
Also no difference in speed between a 32mb swap and a 256mb swap. Just depends on your sdcard's class.
Click to expand...
Click to collapse
Try Fireat
But for purposes of speed, a large swap partition will get full eventually, and when it does, have fun trying to use your phone. It gets slower because swap has to "dig" through more files to get what you want, the more files it has to dig through, the slower it is. However, you won't notice this if you reboot often (and I guess 5% of Android users reboot daily)
is there a way to enable compache on any of these hero roms?
speedysilwady said:
is there a way to enable compache on any of these hero roms?
Click to expand...
Click to collapse
The user.conf (if it is activated on the rom)
JAguirre1231 said:
The user.conf (if it is activated on the rom)
Click to expand...
Click to collapse
The thing is im not sure if its activated in any of the newer sense roms, i never heard it mentioned, so i figured id ask. ill go check the user.conf...
speedysilwady said:
The thing is im not sure if its activated in any of the newer sense roms, i never heard it mentioned, so i figured id ask. ill go check the user.conf...
Click to expand...
Click to collapse
None of newer ones use it for a reason, you would use back-swapping instead(Cc+swap)
Hey guys,
i wanted to know something about Supercharger, what it really do and if the Batterylife gets better
im from germany and dont understand everything right
if this Thread already posted, please delete
facekill1337 said:
Hey guys,
i wanted to know something about Supercharger, what it really do and if the Batterylife gets better
im from germany and dont understand everything right
if this Thread already posted, please delete
Click to expand...
Click to collapse
read this bro..
In simplest language, it does not actually help battery but it makes your ph snappier.
Android has an inbuilt task killer which starts to kill apps based on their priority when ram falls below certain levels as specified in your rom.
Now the more the free ram the faster is ph coz the free ram is used for caching purposes. As we dont always need background apps which can be killed safely but this killing is triggered when the ram falls way below which results in laggy ph.
Now if we tweak the rom to start this killing at a point which is higher than the minimum free specified by rom it will help maintain appropriate free ram. This is done by modifying minfree values. Android allows this modification at boot.
This is done by supercharger in a nutshell. Layman terms.
For detailed info http://forum.xda-developers.com/showthread.php?t=622666
Sent from my LG-P970 using XDA
rusty_banks said:
In simplest language, it does not actually help battery but it makes your ph snappier.
Android has an inbuilt task killer which starts to kill apps based on their priority when ram falls below certain levels as specified in your rom.
Now the more the free ram the faster is ph coz the free ram is used for caching purposes. As we dont always need background apps which can be killed safely but this killing is triggered when the ram falls way below which results in laggy ph.
Now if we tweak the rom to start this killing at a point which is higher than the minimum free specified by rom it will help maintain appropriate free ram. This is done by modifying minfree values. Android allows this modification at boot.
This is done by supercharger in a nutshell. Layman terms.
For detailed info http://forum.xda-developers.com/showthread.php?t=622666
Sent from my LG-P970 using XDA
Click to expand...
Click to collapse
If you have init.d folder (working folder) you can do this.. values are examples..
Code:
#!/system/bin/sh
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,3,6,10,12,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2048,3584,19200,23040,24320,32000" > /sys/module/lowmemorykiller/parameters/minfree
fi
Instead of using task killers, adjust your LMK. There are also APPS in market that allows adjustments of LMK (by MB). Purpose is to let Android do it's purpose/job.
thanks all, im not new with Computers and Software but i doesnt understand the Thread from Maker ;D
gabwerkz said:
If you have init.d folder (working folder) you can do this.. values are examples..
Code:
#!/system/bin/sh
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,3,6,10,12,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2048,3584,19200,23040,24320,32000" > /sys/module/lowmemorykiller/parameters/minfree
fi
Instead of using task killers, adjust your LMK. There are also APPS in market that allows adjustments of LMK (by MB). Purpose is to let Android do it's purpose/job.
Click to expand...
Click to collapse
However, no app fixes ADJ priorities so you have a die-hard launcher... yet.
Just keep your eyes open and one day, I'll have one
zeppelinrox said:
However, no app fixes ADJ priorities so you have a die-hard launcher... yet.
Just keep your eyes open and one day, I'll have one
Click to expand...
Click to collapse
Plus a matching min_free_kbytes.. An all in one app. I can see Sysctl Config app, it would be great if you can combine all. Not bad for all rounder for noobs.
Oh right... it's hard to remember all the cool **** I put in there
Oh hey... check the update... U9RC8... Fix Emissions added
Hi all ,
I found something interesting, at least for me... I think that the vibrator strength is not very strong for the on screen actions like mainly the navbar buttons (even if the vibrator amp is set to 100 and even if the 4.4.1/2 update increased a little the thing).
You need a rooted device with init.d support, if you have not init.d support you can use this app: Universal init.d (tested and it works). Init.d script is made to have the new values will applied on boot.
So to change the value in live with a file explorer (for testing before find the right value to put in the init.d script), go to:
Code:
/sys/class/timed_output/vibrator/driving_ms
And change the value for driving_ms to something like 35/40 (stock is 20) and the vibrator strength is increased (don't forget to save)... Adjust the value to your taste. But I don't think that a higher value than 60 will be a good idea (but it's up to you).
Also (in the same path) the warmup_ms seems to to do almost the same thing but I found that the vibrator strength is not the same by changing this value, It seems for me a little weird. So for now I change only the driving_ms value.
You can use an init.d script to keep the value at boot:
Code:
#!/system/bin/sh
#increase the vibrator strength
#stock value is 20
echo 40 > /sys/class/timed_output/vibrator/driving_ms
Just in case, in attachment the init.d script (remove the .zip extension before putting the script in /system/etc/init.d). Set the correct permissions like this, reboot:
Notes:
This will also increase the vibrator strength for incoming call/SMS-MMS, etc...
It's not the same thing as the vibrator amp...
It should work on all stock/AOSP based rom and stock/custom kernel, I don't know about CM based rom (but if you have the path mentioned above it should work).
I'm not responsible if something goes wrong with the vibrator, avoid values higher than 60 I think...
Hope this help
Hi,
I've been tested with the warmup_ms value in addition to the driving_ms, it seems it produces a more "consistent" vibrator strength, or it is only me?
So for now I ended with this:
Code:
echo 32 > /sys/class/timed_output/vibrator/driving_ms
echo 32 > /sys/class/timed_output/vibrator/warmup_ms
A 40 value as previously is a bit stronger, so for now I set it to 32 (35 is good too)...
Init.d script in attachment, don't forget to remove the .zip extension before putting the script in /system/etc/init.d.
Any feedbacks? CM users?
Doesn't this script set the same value as the apps below?
https://play.google.com/store/apps/details?id=com.dunnow.software.vibrationTuner&hl=en
https://play.google.com/store/apps/details?id=com.bigeyes0x0.trickstermod&hl=en
Hi,
Nope, at least for Trickster Mod (I use it) it only modifies the vibrator amp in /sys/class/timed_output/vibrator/amp... An it seems that it's the same thing for the first app, only the vibrator amp is modified.
Try with the values I modified and you'll see that it's not the same thing..., here you can have a vibrator strength stronger than with only the vibrator amp setting (and even at 100)...
Sent from my LG-D802 using xda premium
Hi,
Any feedbacks?
Some have tested on CM?
Forgot to mention that, obviously, you can change the vibrator amp too if it's not enough for you (and no need for an app):
Code:
/sys/class/timed_output/vibrator/amp
The init.d scrip will be like this (a value of 100 is an example, it's the max):
Code:
echo 100 > /sys/class/timed_output/vibrator/amp
If some wonders if this affects the battery life, I did not notice anything significant, at least for me...
Can you write a how to install this. I'm new to init.d script
Sent from my Nexus 5 using Tapatalk
killajoe said:
Can you write a how to install this. I'm new to init.d script
Click to expand...
Click to collapse
Hi,
I need more information... I thought the OP was clear, but who knows
I assume you are rooted right?
Is your current setup support init.script? For this check the OP of the kernel/rom you're using (or at least check /system/etc/, have you an init.d folder?).
If you are stock (rooted) use the app I mentioned in the op (https://play.google.com/store/apps/details?id=com.androguide.universal.init.d&hl=fr), the init.d scripts needed are in attachment in posts #1 and #2 with "how to"...
If I'm wrong explain better
Thanks
I actually like the vibration that subtle. I had several phones which had a too strong vibration alarm in my opinion. But still a good thing that you can adjust that, I might just try it out. Btw I remember my nokia 6410 was dancing into the sink full of water by the vibration alarm
Sent from my Nexus 5 using xda app-developers app
I just used my Galaxy Nexus yesterday and the vibrator in that is much better. It can handle short blips better and seems to vibrate the entire phone. Nexus 5 can't handle strings either...
Sent from my Nexus 5
Any way to rig this to make the vibration on my Moto X weaker?
Sent from my Nexus 5 using XDA Premium 4 mobile app
_MetalHead_ said:
Any way to rig this to make the vibration on my Moto X weaker?
Click to expand...
Click to collapse
Hi,
Sorry but I don't know for other devices... try to see if you have the path /sys/class/timed_output/vibrator/
If the different setting are presents (driving_ms, warmup_ms, amp) try to change the values and see...
Sent from my LG-D802 using xda premium
Is there any way to do this without root??
hbkekko said:
Is there any way to do this without root??
Click to expand...
Click to collapse
Hi,
Nope, sorry...
Is this strength or just milliseconds? Seems if I put it to 500 it vibrates for half a second at max strength.
viking37 said:
Hi,
I need more information... I thought the OP was clear, but who knows
I assume you are rooted right?
Is your current setup support init.script? For this check the OP of the kernel/rom you're using (or at least check /system/etc/, have you an init.d folder?).
If you are stock (rooted) use the app I mentioned in the op (https://play.google.com/store/apps/details?id=com.androguide.universal.init.d&hl=fr), the init.d scripts needed are in attachment in posts #1 and #2 with "how to"...
If I'm wrong explain better
Thanks
Click to expand...
Click to collapse
I am rooted, unlocked, stock. So I just run those scripts in the program listed and that's it?
Sent from my Nexus 5 using Tapatalk
killajoe said:
I am rooted, unlocked, stock. So I just run those scripts in the program listed and that's it?
Click to expand...
Click to collapse
Hi,
Yes, install the app then run it and choose to run the test (you'll have a Superuser request, accept) then reboot:
After if init.d script works you'll have an init.d folder in /system/etc (and the message like above). Put the init.d script named 01vibratorstrength in the init.d folder and set the correct permissions like in the OP.
Run the app again and activate the init.d script, set to ON like the screenshot:
Reboot again and all will be fine. You'll feel that the vibrator strength is increased (wait about 1-2 seconds after boot). You can check the values are changed by following the path /sys/class/timed_output/vibrator/**** (the vlaue you want check and you have changed).
Hi,
Another feedbacks?
killajoe, did you manage to get it working?
Thanks
Hey XDA!
I actually just posted about another app called Buoy, but over my spring break I went ham and made four apps and I wanted to show off two of them to get some feedback. So here's mFSTRIM!
What is fstrim?
So you know how hard drives get fragmented over time right? Data is placed far apart from other data, increasing latency as the disk needs to physically seek to a certain partition of the disk to read/write data. Well, flash storage doesn't really get fragmented. Instead, when parts of the flash are deleted, the system doesn't actually have a way of knowing which sectors it doesn't care about anymore, and which ones it does. So we go through periodically and TRIM (hence fstrim, the command line utility that does this) all the unused blocks so the system can use them again.
Doesn't Android ALREADY fstrim regularly?
Well, sorta. Newer versions of Android will check at midnight if the device is alive at midnight and is currently charging. If so, it will run fstrim during the next time the device is idle and charging. But what about if that can't happen? I, for one, don't plug my phone in overnight because I care about my battery health. Android also imposes an upper limit! If the device has not run fstrim within the past 3 days, it will force one during the next bootup. And here's where mFSTRIM comes in...
How does mFSTRIM work?
mFSTRIM uses Secure Settings to change how long Android can go without an fstrim before forcing one during bootup. With that logic, we can set that interval to 1 millisecond (aka, one is ALWAYS needed), so that during every reboot, an fstrim is done.
Links
Play Store: https://play.google.com/store/apps/details?id=com.draco.mfstrim
GitHub: https://github.com/tytydraco/mFSTRIM
Feedback is appreciated!
Is there a free version?
orb3000 said:
Is there a free version?
Click to expand...
Click to collapse
Hi,
Sorry, I didn't release a free version since the app is really simple. But just a tip: once you change the setting, it persists even after you uninstall. So do what you want with that information
This is awesome! Any chance to add the ability to run fstrim whilst in the app on demand?
fobtob387 said:
This is awesome! Any chance to add the ability to run fstrim whilst in the app on demand?
Click to expand...
Click to collapse
Hey! Sadly this isn't possible due to the way the app works. Internally in Android there's a setting that tells the system the longest we can go without doing an fstrim on bootup. My app simply changes this setting. The fstrim is actually done by Android still, not my app. Since the only time Android checks our newly changed setting is on a reboot, we have to reboot to make it happen. With root I can do what you suggested, but sadly without root it's not possible.
tytydraco said:
Hey! Sadly this isn't possible due to the way the app works. Internally in Android there's a setting that tells the system the longest we can go without doing an fstrim on bootup. My app simply changes this setting. The fstrim is actually done by Android still, not my app. Since the only time Android checks our newly changed setting is on a reboot, we have to reboot to make it happen. With root I can do what you suggested, but sadly without root it's not possible.
Click to expand...
Click to collapse
Would it be possible to make a root variant?
fobtob387 said:
Would it be possible to make a root variant?
Click to expand...
Click to collapse
It's possible! Also, you can run this via the command line with ADB (no root): adb shell sm fstrim
That forces an fstrim
Nice app! I set it to fstrim on reboot, and sure enough the "last-fstrim" file was modified at boot to confirm fstrim took place. The app is free in the Play Store now (reading the previous comments and it seems this may not have been always the case). I also like that the app doesn't use the network for anything at all (no analytics). I'm rooted, so it did ask me to grant root when starting it up for the first time.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey! Can we please be able to create a custom interval for fstrim?
My phone becomes slow after like 5 mins of fstrim so I'd need this to run every like 1-2 seconds. I don't want to root my phone xd
Auditormadness9 said:
Hey! Can we please be able to create a custom interval for fstrim?
My phone becomes slow after like 5 mins of fstrim so I'd need this to run every like 1-2 seconds. I don't want to root my phone xd
Click to expand...
Click to collapse
No
No
No
No, you definitely do not want to fstrim every 1-2 seconds
No.....
Your "slowness" probably comes from the discard option on the mount point, if its EXT4, takes longer to do its job
Running fstrim multiple times wont fix that
73sydney said:
No
No
No
No, you definitely do not want to fstrim every 1-2 seconds
No.....
Your "slowness" probably comes from the discard option on the mount point, if its EXT4, takes longer to do its job
Running fstrim multiple times wont fix that
Click to expand...
Click to collapse
Oh bummer. And what would fix that slowness then?
Auditormadness9 said:
Oh bummer. And what would fix that slowness then?
Click to expand...
Click to collapse
Without root nothing you do will change a thing
fstrim other than the stock ROM scheduled one will not work without root
73sydney said:
Without root nothing you do will change a thing
fstrim other than the stock ROM scheduled one will not work without root
Click to expand...
Click to collapse
Got it. And one more thing. Do you think this would work if I had root?
SSD Boost - Apps on Google Play
Minimizes writings on the your phone's SSD, increasing speed and extending life
play.google.com
Auditormadness9 said:
Got it. And one more thing. Do you think this would work if I had root?
SSD Boost - Apps on Google Play
Minimizes writings on the your phone's SSD, increasing speed and extending life
play.google.com
Click to expand...
Click to collapse
For starters its not my app, and theres no real detail on what it does beyond change a few mount point options - which you can probably find already (depending on android level and ROM) exists (noatime already on my ROM) by the following in a terminal:
mount | grep noatime
and/or
mount | grep nodiratime
As for its other listed function, running TRIM on demand, theres this app which has been around forever and is ad free
Trimmer (fstrim) - Apps on Google Play
Trim your device NAND chip manually and fix lags.
play.google.com
As for the app you quoted generally, realise its *possible* to brick your device doing some of the things it claims, so check the warnings
Also the author even points out it doesnt actually boost an SSD, it just changes some kernel and mount options that *may* improve filesystem performance
Note: I just tried running SSD Boost on my Pixel 2XL...toggled it on, and it sat there forever saying "Boosting your SSD", and sat there a long time (to the point i thought id have to kill it), and then showed it had made some changes (factoring in i already had noatime set)
Heres some tests before
and after....
Androbench:
Seq Read: +15MB/s
Seq Write: +12MB/s
Ran Read: -3MB/s
Ran Write: +0.4MB/s
SQLite Insert: -57 QPS
SQLite Update: -101 QPS
SQL Delete: -74 QPS
SD Card Test Pro:
Write: +95MB/s Read: +20MB/s
Would i bother installing it (if its safe for your device)...as always , up to the individual. As always these are benchmarks, and just a snapshot in time, real world result in real world usage, dunno if you’d notice
73sydney said:
Without root nothing you do will change a thing
fstrim other than the stock ROM scheduled one will not work without root
Click to expand...
Click to collapse
Why are you posting misleading info? The other user (quote below) actually verified the operation, and it works!
ninjæon said:
Nice app! I set it to fstrim on reboot, and sure enough the "last-fstrim" file was modified at boot to confirm fstrim took place. The app is free in the Play Store now (reading the previous comments and it seems this may not have been always the case). I also like that the app doesn't use the network for anything at all (no analytics). I'm rooted, so it did ask me to grant root when starting it up for the first time.
View attachment 5382223
Click to expand...
Click to collapse
I observed the same change in last-fstrim date! The utility works, it's great!!! Surprising so few people noticed it ...
Thanks for this!
Somewhat related question: will TRIM prevent data recovery?
From my understanding, when you delete data from an SSD it will just remove it from being viewed and allow it to be overwritten but the data is still there and can be recovered through recovery apps or forensics.
Does TRIM prevent this?
DonDizzurp said:
Thanks for this!
Somewhat related question: will TRIM prevent data recovery?
From my understanding, when you delete data from an SSD it will just remove it from being viewed and allow it to be overwritten but the data is still there and can be recovered through recovery apps or forensics.
Does TRIM prevent this?
Click to expand...
Click to collapse
It's a complicated question, each implementation is different. TRIM will tell controller the blocks are unused, not sure if anything else happens to them. Read some of this to get an idea:
Perform a SSD Secure Erase - Thomas-Krenn-Wiki-en
In this article, we will show you how to perform a secure erase on a SSD under Linux. By doing this, you can increase the performance of frequently used SSDs for future use. But, all of the data will be lost. For Fusion-io’s ioDrives, see Low-level Formatting a Fusion-io ioDrive.
www.thomas-krenn.com
I am going to post the actual command to activate this as there is nowhere I can find that has in even the repository. Even though the command is stated on the display, you still have to manually type it so here it is:
adb shell pm grant com.draco.mfstrim android.permission.WRITE_SECURE_SETTINGS
Enjoy
This app only adds a Global Table parameter called "fstrim_mandatory_interval", set to 1 if you choose every reboot. This is possible with SetEdit and ADB very easily (in 10 seconds) and it is permanent. I am a bit surprised that a whole app has been made only to set this one parameter. Also, the parameter is not effective on a lot of ROMs. If OP's app is paid, that is ridiculous; I sure hope it is not!
With magisk root, you can make a script that runs on every boot running fstrim through busybox. That's what I do, because this parameter used in the app is useless; automatic fstrim is not run on any MIUI ROM I have tried so far.
I have no idea why OP states it adds a Secure Table parameter; I have not seen such being added.
Note that these are my observations and could be wrong.
nosak said:
This app only adds a Global Table parameter called "fstrim_mandatory_interval", set to 1 if you choose every reboot. This is possible with SetEdit and ADB very easily (in 10 seconds) and it is permanent. I am a bit surprised that a whole app has been made only to set this one parameter. Also, the parameter is not effective on a lot of ROMs. If OP's app is paid, that is ridiculous; I sure hope it is not!
With magisk root, you can make a script that runs on every boot running fstrim through busybox. That's what I do, because this parameter used in the app is useless; automatic fstrim is not run on any MIUI ROM I have tried so far.
I have no idea why OP states it adds a Secure Table parameter; I have not seen such being added.
Note that these are my observations and could be wrong.
Click to expand...
Click to collapse
It's a free app. It's conveinient for those who don't want to remember the parameter or how to use SetEdit. Also nice to just be able to toggle on/off. It has worked for me on every Lineage-based ROM I've tried it.
Good to know that it doesn't work on MIUI ROMs however, and that there's a permanent method that doesn't require installation of an app!