* Your warranty is now void.
* I am not responsible for bricked devices, dead SD cards, corrupted partition, nuclear disasters
* Please do some research before using this mod!
* YOU are choosing to make these modifications,
* If you point the finger at me for messing up your device, I will laugh at you.
L Speed is a modification that combines tweaks inside an intuitive application, the main goal of the tweaks is to improve performance, reduce stutters and lags, and expands battery life.
The mod will and should work on any device that meets its minimum requirement.
You only need a rooted Android device, Android 4.0 and later is needed for L Speed app to function properly.
DO NOT USE THIS MOD WITH OTHER MOD, CLEAN UP YOUR init.d FOLDER BEFORE USING THIS MOD!
Better battery life
Faster input/output and read/write speed
Cleaner script for cleaning system
And much more
How to clean up init.d
Use a root explorer (such as ES File Explorer)
Open root directory ( / )
Navigate to /system/etc/init.d
Open init.d folder
Delete all files from other mods (e.g. zipalign, sqlite, setpermissions, system tweaks, etc.)
Done! Optionally, do a reboot for safety measure
========= Requirements =========
Root Access (use SuperSU for mod to work properly)
Minimal ~5MB free space on system partition
If you have any problem with the app, please make a logcat and upload it here.
All bootanimations are flashable zips, you know what to do
Download from HERE
PayPal users can donate me using this link http://forum.xda-developers.com/dona....php?u=5514152
If you have issues, download paypal app from playstore, that will work
For US PayPal users:
"I could not use your paypal donation link or url as you already know as it's not possible to send a donation from USA. I logged into my paypal account and used the option to pay for goods or services to send you the funds."
CPU Tuner - Improves the performance, with a little more battery draining in counterpart.
CPU optimizer increases the bg_non_interactive CGroup (which represents all processes placed that are not currently running or requiring an extra boost) value's that specifies a relative share of CPU time available to the tasks (cpu.shares), and an another one that indicates the longest continuous period in which the tasks have access to CPU resources (cpu.rt_runtime_us).
It will be very helpful regardless the performance improvement, but it will not drain your battery a lot as the stock values are generally near to the ones of L SPEED.
This option removes the junk and obsolete files generated by the system (logs, unused cached ones, ect..) in defined directories.
/data : Previous kmsg logs, usagestats files, logs, text and APK files which are no longer useful.
/cache : Recovery mode logs, partition's text and APK files which are no longer useful.
Seeder (thanks @CLPose for his great contribution) - Improves the performance, the battery draining depends on the choosed Seeder level.
kernel.random.read_wakeup_threshold : Contains the number of bits of entropy required for waking up processes that sleep waiting for entropy from /dev/random.
kernel.random.write_wakeup_threshold : Contains the number of bits of entropy below which we wake up processes that do a select for write access to /dev/random.
This option increases the values of kernel.random.read_wakeup_threshold and kernel.random.write_wakeup_threshold according to your selection. If you increase seeder level, your device will suffer from less lag but it will drain more battery (Aggressive > Moderate (suggested) > Lighter > Default).
OOM Killer - Improves the performance.
This option enables or disables killing the OOM-triggering task (vm.oom_kill_allocating_task) in out-of-memory situations.
If the option is disabled, the OOM killer will scan through the entire tasklist 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 it's enabled, the OOM killer simply kills the task that triggered the out-of-memory condition. This avoids the expensive tasklist scan.
Cache Reclaiming - Explanation coming soon !
Cache Allocation - Improves the performance.
This option lets the user to configure the conditions under which a large memory request is accepted or denied, and also to specifies the percentage of physical RAM allowed. How ? By the following important tunables :
vm.overcommit_memory : As its value is set to 1 by L SPEED, the kernel grants memory allocations above the amount of physical RAM and SWAP in the system as defined by the overcommit_ratio value.
vm.overcommit_ratio : This tunable defines the percentage by which the kernel overextends its memory resources (The percentage can be more than 100 for a situation where you have lots of programs that don't use much of their allocated space.).
That's why, Medium Cache Allocation option's choice defines overcommit_ratio value at 100(%) and that Large Cache Allocation second option's choice defines it at 150(%).
Kernel Tweaks - Improves especially the performance and also the battery life.
This option changes the kernel related tunables with new values that will offer you a better battery life and a better performance :
This kernel feature is an automatic fsync controller that disables fsync when the screen is ON which gives better performance and enables it back when screen is OFF and resumes the pending disk writes which avoids data loss. L SPEED enables it if your kernel supports it.
The /proc/sys/fs/ directory contains an array of options and informations concerning various aspects of the file system (including quota and file handling informations). It's also a way to modify the parameters of the kernel in use, and L SPEED does the below explained tunings for a better performance purpose :
/proc/sys/fs/lease-break-time : This file specifies the grace period that the kernel grants to a process holding a file lease after it has sent a signal to that process notifying it that an another process is waiting to open the file. L SPEED reduces this grace period for a better performance.
/proc/sys/fs/inotify/max_queued_events : It's the maximum number of events that can be queued at once. If the queue reaches this size, new events are dropped. This queue's value is increased by L SPEED.
/proc/sys/filesystem/inotify/max_user_instances : It's the maximum number of inotify (inotify is a file change notification system. When an event occurs, the application is notified !) instances that a given user can instantiate. L SPEED increases its values too.
/proc/sys/filesystem/inotify/max_user_watches : It's the maximum number of watches (They consist of a pathname specifying what to watch and an event mask specifying what to watch for many reasons : Deleting a file, closing an another one ect..) per instance. L SPEED increases its values too.
Virtual Memory tunings
vm.dirty_expire_centisecs : This tunable defines how long something can be in cache before it needs to be written. When the kernel processes kick in they will check to see how old a dirty page (it's a memory page that still need to be written to disk) is, and if it’s older than this value it’ll be written asynchronously to disk. The default value is prefered by L SPEED.
vm.dirty_writeback_centisecs : This one defines how often the kernel processes wake up and check to see if work needs to be done. L SPEED increased this value to 3000 centiseconds in order to have a better battery life without decreasing the performance.
vm.block_dump : When it's enabled, the system reports all disk read and write operations that take place. L SPEED disables it for a better performance.
vm.laptop_mode : Minimizes the number of times that a hard disk needs to spin up by keeping the disk spun down for as long as possible. As we're not using laptop, L SPEED disables it.
vm.min_free_kbytes : Forces the Linux VM (virtual memory manager) to keep a minimum number of kilobytes free, which is calculated by L SPEED.
vm.page-cluster : Controls the number of pages which are written to swap in a single attempt, L SPEED defines it to 4 pages in order to give a good performance especially if your phone uses a SWAP partition intensively.
vm.dirty_background_ratio : Defines the percentage of system memory that can be filled with the dirty pages before the pdflush/flush/kdmflush background processes kick in to write it to disk. L SPEED chooses the right percentage according to your amount of RAM.
vm.dirty_ratio : Defines the absolute maximum amount of system memory that can be filled with the dirty pages before everything must get committed to disk. L SPEED chooses the right percentage according to your amount of RAM too.
vm.swappiness : Determines how much a device should use a SWAP partition. The higher the value, the more swapping occurs. L SPEED defines the right percentage according to your amount of RAM again.
Kernel tweaks- It improves the performance, but it reduces the battery life too :
This latest part is only used when the user enables the Heavy kernel tweaks option, but what does it do ?
Two (or more) processes can exchange information via access to a common system message queue, and the below kernel parameters concern it directly. L SPEED increased their values to improve the performance :
kernel.msgmni : It represents the system maximum queues number.
kernel.msgmnb : It represents the default maximum size of queue (that is defined in bytes).
kernel.msgmax : It represents the maximum size of message (that is defined in bytes too).
kernel.shmmni : It represents the maximum number of share memory segments.
kernel.shmall : It represents the maximum total of shared memory (that is defined in kbytes).
kernel.shmmax : It represents the maximum segment size (which is defined in kbytes too).
LNET Optimizer - Improves the network browsing performance.
This option optimizes your network by its different parts :
By default the Linux (and Android) network stack is not configured for high speed connections, as it's done to save memory resources. You can easily tune it by increasing network buffers size to handle more network packets (thus allowing higher download/upload speeds) with the net.tcp.buffersize tunable. And that's what this part does.
If you choose the small net buffers adding, it will increase the network buffers size reasonably for each connection type (3G, WiFi, LTE, Edge, UMTS).
But if you choose the big net buffers adding, the increase will be much bigger and it may affects your battery life while using your network.
This one changes your network's DNS with the net.dns tunable by the ones of Google Public DNS (220.127.116.11 - 18.104.22.168). Read here about its benefits !
This part improves your network's protection by a bunch of kernel tunables adding which are the following :
conf.all.rp_filter - conf.default.rp_filter : Those ones select the default RPF (Reverse Path Filtering) filtering for IP Spoofing protection.
tcp_max_syn_backlog : A SYN flood attack is a form of denial-of-service attack in which an attacker sends a large number of SYN (synchronization) requests to a target systemâ€™s services that uses TCP protocol. This will consume the device resources to make the system unresponsive. This tunable is the maximum number of remembered connection requests, which are still did not receive an acknowledgment from connecting client. L SPEED reduces its value to minimize the risk that it happens.
tcp_synack_retries : This tells the system how many times to try to establish a passive TCP connection that was started by another host. L SPEED reduces too its value for the same previous reasons.
This latest part improves your mobile data's speed by adding a list of build.prop lines :
ro.ril.hsxpa : Defines weither to use UMTS, HSPDA/UMTS, or HSDPA/HSPUA respectively (It's set to 3 by L SPEED which is equivalent to HSDPA/HSPUA).
ro.ril.gprsclass : Defines what class speeds to use with EDGE (It's set to 12 by L SPEED, for more informations about read here !).
ro.ril.enable.3g.prefix : Shows "3G" on lock screen next to the network's name.
ro.ril.hsdpa.category : Defines the max download rate (It's set to 8 by L SPEED which is equivalent to 7.2 Mbit/s).
ro.ril.hsupa.category : Defines the max upload rate. (It's set to 6 by L SPEED which is equivalent to 5.76 Mbit/s).
ro.ril.enable.a53 - ro.ril.enable.gea3 : Related to GPRS encryption algorithm.
IO Tweak - Improves the performance, with a little more battery draining in counterpart.
This opiton is used to tunes the Input/Output performance using its parts :
IO Extend Queue- It improves the performance, but it reduces slightly the battery life too :
Each request queue has a limit on the total number of request descriptors that can be allocated for each read and write by the nr_requests tunable. By default, the number is 128, meaning 128 reads and 128 writes can be queued at a time before putting a process to sleep. That's why, this part increases the number for performance purposes.
IO Booster- It improves the performance without reducing the battery life :
The iostat (/queue/iostats) tunable generates reports and statistics (CPU Utilization Report, Device Utilization Report, and Network Filesystem report) which are only useful for the developers. Letting it enabled causes performance regression, that's why it's disabled.
Rotational (/queue/rotational) is a file which is used to stat if the device is of rotational type or non-rotational type. The majority of the Android devices don't use SSD disks for their internal storage, and the system can detect by itself with hardware if it's or not, so, enabling it is useless.
Nomerges (/queue/nomerges) is a tunable which is primarily a debugging aid. Most workloads benefit from request merging (even on faster storage such as SSDs). In a majority of cases, however, it is desirable to disable merging (by setting it to 1, it can save you some CPU cycles).
If RQ Affinity (/queue/rq_affinity) is set to 1, the block layer will migrate request completions to the CPU "group" that originally submitted the request. For some workloads this provides a significant reduction in CPU cycles due to caching effects. If this value is set to 2, it might provide better results. because all the cores will be used. As the majority of the kernels (especially the old ones) doesn't support the second value, letting it only to the first one is the best choice.
Partition remount :
This part remounts EXT4 partitions with two mount options that are helpful for performance gains purposes.
noatime : Disables the updating of access time for both files and directories so that reading a file does not update their access time (atime).
nodiratime : Disables updating of access time when opening directories so that the access time is not modified when enumerating directories. This routine also checks that the object is a directory, which slows down the routine.
That's why, avoiding the writes associated with updating the access time can result in measurable performance gains.
SD tweak :
The read_ahead_kb (/queue/read_ahead_kb) tunable represents the amount of additional data that should be read after performing a given read request. For example, if there's a read-request for 4KB and the read_ahead_kb is set to 64, then an additional 64KB will be read into the cache after the base 4KB request has been met. Why read this additional data ? Because it "counteracts" the latency problems. This option increases its value for a better read/write speed.
RAM Manager - Improves the performance.
This option calculates the LMK (LowMemoryKiller) settings basing on your device's RAM and the choosen profile. To be clear, what differs the profiles are the triggering RAM limits which are defined by the LMK calculated minfree values.
If free memory goes below than XXXX, then the system will kill the process and so on. That's why for example, the processes aren't often killed using the Multitasking profile.
Also, it changes the LMK's cost parameter. This parameter seems to be a deciding factor on how often the low memory killer callback gets called by a registered shrinke, and the logic seems to mean that if the cost's value is high, seeks would occur less often and it will allow to have more opened apps (that's why, it's increased for the Multitasking profile)
Finally, it disables the debugging by setting the LMK's debug level to 0 : The debug_level is a statement which specify the level of debug information that is logged.
Disable debugging - Improves the performance and the battery life.
This option is very useful to the debugging's disable, as it disables read/write operations debugging (by setting the system debug_mask tunable to 0).
For example, it's used by the developers during debugging driver logs.
Disable kernel panic.
A kernel panic happens when the kernel detects an error from which it can't recover. The operating system handles this situation often by dumping some debug info and/or rebooting the system.
This option disables it to avoid the annoying reboots if the used kernel is buggy and/or not stable.
Kernel samepage merging (KSM) - Improves the performance, with a little more battery draining in counterpart.
KSM is a memory-saving de-duplication feature which performs scans through the memory and finds duplicate pages. Each detected duplicate pair is then merged into a single page, and this kernel feature is very useful for devices with a low amount of RAM.
This option enables it (if your kernel supports it) and changes its specific settings :
pages_to_scan : How many present pages are needed to scan before KSMD (kernel Samepage Merging Daemon) service goes to sleep. sleep_millisecs : How many milliseconds ksm should sleep between the scans.
Zipalign (Android 4.4 & below) - Improves the applications related performance.
Zipalign is an archive alignment tool that provides important optimization to Android application (.apk) files. The purpose is to ensure that all uncompressed data starts with a particular alignment relative to the start of the file. This option executes the process to achieve the previously said purpose.
Fast Charge - Improves the charging speed.
Many modern Android phones support fast charging, which delivers a whopping 15 watts and can therefore charge your phone much more quickly.
This option forces the enabling of this feature (if your kernel supports it) with the force_fast_charge tunable.
Google services drain fix - Explanation coming soon !
Kill Google apps on boot - Reduces the boot delay.
This option kills the related processes to Google Apps (Google Play Services, Google Services Framework, Google Apps process) at your device's boot.
Kill Mediaserver on boot - Improves the battery life.
Mediaserver or Media scanner on Android is designed to scan and index every media file (Images, Videos, Music) and make the list available to all Android apps, so that they donâ€™t have to do the repetitive tasks. But it isnâ€™t perfect. Media server can have strange behaviors and tends to be buggy, that's why it's often you can end-up shedding 50% of your battery on Media scans.
This option like its title says, kills the process at boot to fix the battery drain issue.
zRAM - Improves the multitasking performance, with a little more battery draining in counterpart.
zRAM creates RAM based block devices named /dev/zram<id>
(<id> = 0, 1, ...). Pages written to these disks are compressed and stored
in memory itself. These disks allow very fast I/O and compression provides
good amounts of memory savings. However, the CPU has to work in more because of the data compression/extracting.
This option enables this feature (if your kernel supports it) and calculates the block devices size basing on your RAM amount.
Wifi sleeper - Improves the battery life.
There's some pre-allocated time to make the wifi sleep after the screen turned off. For most of Android phones, it seems like this value is 15 minutes. So, even the screen is off, wifi does not enter to the sleep mode immediately. Phone spend 15 minutes after the screen off, and kill the wifi session if wifi option was set to never (keep wi-fi on during sleep).
For battery saving purpose, this option reduces the default 15 minutes value to 30 seconds by editing the device's settings database.
Flag tuner - Explanation coming soon !
Better voice call quality - Improves the call quality, with a little more battery draining in counterpart.
Adaptive Multi-Rate Wideband (AMR-WB) is a patented wideband speech audio coding standard developed based on Adaptive Multi-Rate encoding, which provides improved speech quality due to a wider speech bandwidth of 50â€“7000 Hz. This option enables it by adding its specific build.prop line (ro.ril.enable.amr.wideband=1).
If you want to use it, check first if your phone supports here !
Fix blackscreen issue after call - Reduces the proximity sensor delay to wake up the screen.
During call on some devices, the proximity sensor has an annoying delay to wake the screen when an user separates it from his ear.
To fix the problem, this option reduces greatly the delay by adding some build.prop lines with their reduced values (ro.lge.proximity.delay - mot.proximity.delay).
Battery improvement - Improves the battery life.
This option lets you to enhance your battery life by adding a bunch of build.prop lines which are explained below :
wifi.supplicant_scan_interval : Depending on the Android phone model, the Wifi connection interval can be set anywhere from 2 to 90 seconds from the factory. L SPEED increases its value to 180 seconds for a better battery saving.
ro.ril.disable.power.collapse - ro.ril.power_collapse : Both of them let the CPU clock rate to be in the Power Collapse State which is lesser than the standard one. It means that it will allow to have a lesser power consuption.
debug.sf.hw : That enabled flag stands for Debug SurfaceFlinger Hardware, in other terms it enables the Hardware Compositing which offers a better battery life than letting it disabled.
persist.sys.use_dithering (Cyanogenmod ROMs only) : This one will increase the quality of the phones graphics, and UI, at the cost of performance if enabled. L SPEED keep it disabled as it hogs RAM and CPU, especially on low-end devices.
ro.config.hw_power_saving - power.saving.mode - power_supply.wakeup enable - persist.radio.add_power_save : All of them have been activated by L SPEED for more power saving.
Better scrolling - Improves the UI (User Interface) performance.
This option increases both of the default maximum and minimum scroll velocity values (ro.max.fling_velocity & ro.min.fling_velocity), and disables the scrolling cache (by editing the persist.sys.scrollingcache tunable's value).
Faster boot - Reduces the boot time.
This option add a new build.prop (ro.config.hw_quickpoweron=true) line which allows a faster boot.
Improve image quality - Improves the recording quality and the pics saving quality.
This option increases the bit rate and the resolution for a better recording quality. Also, it increases the pics saving quality to its optimal level (100%) and changes some specific build.prop lines for the same main purpose. Look below :
Liquid smooth UI - Improves the User Interface performance, with a little more battery draining in counterpart.
This option increases the touch.pressure.scale tunable's floating point number for a better UI. touch.pressure.scale : Specifies a constant scale factor used in the calibration.
Disable logcat - Improves the performance and the battery life.
The option adds build.prop lines which disable debugging in general :
debugtool.anrhistory : Disables the ANR history that would output the debuginfo to data partition.
profiler.debugmonitor - profiler.launch - profiler.hung.dumpdobugreport : Disable the profiling tools which are useful for developers for debugging purposes (measuring the method execution time, monitoring the full heap space, tracking the memory allocations in real time...).
This one let you the choice to enable or to disable the Fast Dormancy by adding a build.prop line, and here's below what does this feature :
When your phone is connected via data (not wifi) your phone needs to enter certain states in order to maintain this connection. If your Operator does not have FD support or you have it disabled, then basically your states are just connected or not connected. What this means is that every time your phone connects to data, it will have to go through all of its internal functions in order to achieve the connection and perform the data transfer. This is slow and obviously the more processing that is required, the more the hit on battery.
FD tries to limit this problem by having several different states. Each state has a different level of connection throughput and power consumption.
DCH - High volume data (highest power consumption). FACH - Lower volume. PCH - No data but keeps connection. IDLE_CCCH - Not entirely sure about this one but I think its an interim stage. IDLE - Connection dropped (lowest power consumption).
When in DCH state, your phone is doing the highest volume of data transfer, and obviously consuming most power out of your battery.
The way FD will work is when transfer rates drop, the state drops to FACH for less power consumption and then back up immediately to DCH if required, or if this transfer state is over for the time being, (eg. you have stopped browsing) instead of going back to IDLE which would mean going through all the connection procedures next time data is required, the state drops down to PCH. This is a very low powered state, and when data is subsequently required, it can then immediately go back up to FACH or DCH with minimal effort. Going up/down between each states takes the least amount of time and battery.
Misc L SPEED tweaks.
This option adds build.prop lines which are considered as misc, as they can have an effect for some and they can don't have an effect for some others (depending on the Android version and the ROM used for example). profiler.force_disable_ulog : Turns off the User Behavior Logging Service (HTC specific). ro.com.google.networklocation : Disables the Google Network Location. ro.telephony.call_ring.delay : Sets the delay of time your phone starts to ring when you receive a call (L SPEED sets it to 0).
Assertive Display (Qualcomm processors only) - Improves the battery life.
Assertive Display is a new Qualcomm technology which makes the display adaptive to its viewing environment. As the viewing conditions change, sophisticated digital processing adjusts each pixel individually in real time for a " high-quality experience . Assertive Display takes control of both the screen brightness, and of the color of each individual pixel of each video frame, and adjusts these coherently providing total control of viewing experience from total darkness to bright sunshine.
The option enables this feature by adding its needed Calibration configuration file and its two build.prop lines (ro.qcom.ad - ro.qcom.ad.calib.data) for the enabling.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?