Android OS Forum banner

[KernelTweaks] LeanKernelTweaks v16.1

333K views 1K replies 297 participants last post by  ars0n 
#1 · (Edited by Moderator)
Mod Type:: Script

Difficulty:: Very Easy

Mod Base:: AOSP

Mod Status:: Stable

Apply In:: CWM Recovery

Carrier:: Verizon

Optional:: Custom Settings

Requires Root:: Yes

Optional:: Overclocked

Android Version:: 4.1.1 (JB)

Source::
LeanKernelTweaks v16.1
This is just an attempt to be more organized with my updates etc. and should reduce the "Where can I download this?" posts/clutter in Imoseyon's kernel thread. THIS IS ONLY FOR IMOSEYON'S LEAN KERNEL FOR NOW. If enough people request it, I'll make a version for other kernels too.

This will work with stable or exp versions of Imo's kernel and is compatible with every current and future build of LeanKernel.

Changelog:

v16.1:
-Changed default scheduler to SIO (Like Imoseyon did stock now)
-Added aggressive preset UV to recommended settings
-Fixed random errors in menus

v16.0:
-Added jakebites preset optimal settings to the main menu

This will set the following at boot:

-CPU MHz: 350 Min, 1350 Max
-Interactive Gov w/ Touch Input Boost Enabled
-Temp Control Set To: 75000
-GPU MHz: 384
-Preset Smart Reflex Tuning
-Ezeekel's Color Offset Tuning
-HQ Sound Playback Enabled
-Aggressive Minfree Mod Enabled
-Remove Logcat Mod Enabled

-Added aggressive preset smart reflex tuning option to the smart reflex tuning menu
-Reverted to deadline scheduler as the stock option
-Fixed one of the checks not working
-Fixed a couple of typos
-Moved some old changelogs to reduce OP size

v15.2:
-Fixed a few typos and bugfixes, nothing new in this build

v15.1:
-Added disable logger at boot mod
-Added input_boost and hispeed_freq advanced settings when setting a max frequency value
-Changed go_hispeed_load to stock JB value which is 50
-Fixed a few typos
[background=rgb(245, 245, 245)]-[/background]Most[background=rgb(245, 245, 245)] things work with JB [/background]

v15.0:
-Fixed all known bugs with start up color tweaks
-Added screen on scheduler tweaks
-Added preset smart reflex tweaks (adding more to this later)

>>Old Changelogs<<
>>Old Changelogs<<

Please note that the 180, 230 and 1420 slots are not stable on every phone to begin with. Undervolting these slots will NOT be stable on every device.

Preset voltages used when undervolting with my script:
1650 MHz: 1420 mV
1520 MHz: 1320 mV
1350 MHz: 1220 mV
1200 MHz: 1210 mV
920 MHz: 1080 mV
700 MHz: 1010 mV
350 MHz: 840 mV
180/230 MHz: 820 mV

Aggressive preset voltages used when undervolting with my script:
1650 MHz: 1400 mV
1520 MHz: 1280 mV
1350 MHz: 1220 mV
1200 MHz: 1160 mV
920 MHz: 1000 mV
700 MHz: 900 mV
350 MHz: 760 mV
180/230 MHz: 740 mV

Features:

-Changes the value in /sys/devices/system/cpu/cpufreq/interactivex/hispeed_freq to user selected value

^ This file determines the frequency that the systems cpu will ramp up to after a certain point in the interactivex and interactive governors. By default it is set to 1200mhz for the Galaxy Nexus. By changing it to the custom overclock value(1350), the system will now not have to load up to 1200 and then make the jump to 1350, which is pretty significant in my opinion because the interactive(x) governors are supposed to jump up quickly for a faster response to the user. This value is untouched when changing frequencies in setcpu and most likely the other cpu apps out there. Many people including myself found this to make a big difference in speed, I feel like now it actually feels overclocked. ^

-Includes leantweaks script which can customize:
Min/Max frequencies at boot
Governor at boot
Zram toggle
Swap toggle
Check current kernel stats
Reboot
Reboot to recovery
Disable all tweaks

Basically, it does what setCPU does with the addition of the interactive/interactivex hispeed_freq edit without the need for an app/service running in the background.

How to install:
Flash in recovery, no need to wipe anything.

Download:
LeanKernelTweaks-16-1.zip

FAQ'S:

What happens when I have a question about Lean Tweaks?:
Abqnm will be VERY HAPPY to answer all questions for you! :)

What is activated by default after the initial flash of the tweaks?
-OC to 1350 at boot
-InteractiveX governor at boot
-hispeed_freq and go_hispeed_freq value edits

What's zram and swap and why should I care?
Zram and swap both offer an extention to VM without having to get more memory(hardware). Basically it will make multi-tasking easier and more efficient.

If I flash a new version of LeanKernel, do I need to re-install LeanTweaks as well?
No, these tweaks and settings will persist until wiping data and/or flashing a new rom.

I chose a setting that my phone didn't like and now my phone won't turn on, do I need to wipe data and reflash everything?
No, just reflash the LeanKernelTweakvX.zip in recovery and the settings will then be reset to stable settings.

If I flash a new version of LeanKernelTweaks, will I need to set everything back up?
Yes, you will need to re-enable the tweaks you would like to use when installing a new version of LeanKernelTweaks.

I'm getting a busybox error when trying to use leantweaks in terminal emulator, what do I do?
You can use Jrummy's Busybox Installer app which is free on the market to install busybox. Leantweaks should work fine after installing busybox.

I want to use a different kernel, do I need to do anything with leantweaks before hand?
Open the leantweaks menu in terminal and disable all tweaks. You can then flash any kernel you like with no issues.

How do I use the terminal commands?
Open terminal emulator and type:
su
leantweaks

Please uninstall or disable defaults in setcpu(or other cpu apps) before installing this.
You're phone doesn't need to rely on a cpu app any longer with this mod, upon install 350 min -1350 max and interactivex governor will be defaulted with the mod to the interactivex file as well. I've done a lot of testing on my personal phone and custom voltages offer such a minimal battery benefit that even after one SOD or random reboot, it has used more battery than it has saved. However, if enough people really desire user undervolting, I'll try working on that too.
 
See less See more
#11 ·
Loved your work on the d2, its nice to see it here. Thanks Jake.
 
#17 · (Edited by Moderator)
You can use the disable option if need be. Also this 'should' work with other kernels if you set it up for it prior to flashing... Meaning set a governor that the kernel actually has and set frequencies that the kernel supports. Also disable zram and/or swap if the kernel doesn't support it.
 
#16 ·
Hey Jake, this is a bit off topic but I just switched from Redemption Rom to Codename with leankernel and the microphone on my phone doesn't detect sound, nor can i hear though the phone's earpiece. However the external speaker works and ringtones sound... I have tried multiple reboots. I hae wiped data in recovery, cache, dalvik cache, formatted system, data, cache. I'm out of tricks. I'm browsing forums trying to find someone with a similar problem. One said that DSP Manager (the default audio prog on redemption rom) was force quitting and once they cleared data for that app, their sound restored. I tried that and no luck. I think it may have corrupted my audio files, but i don't know where they are to access them.
 
#18 ·
If you've exhausted every option(like it seems you have) try restoring the full stock images through the bootloader which I think you can find in the general cdma gnex section. If this doesn't fix it then you're hardware has failed and you should contact verizon about getting the phone replaced.
 
#22 ·
I think the fact that you've been flashing things etc. is just coincidence honestly. I would take restoring it a step further than a nandroid and restore everything to stock through the bootloader using fastboot before giving up. This will restore the old baseband, kernel, recovery, system and whatever else was changed. I know it's a pain but that's why it's the last resort. If that doesn't work then it's deffinitley the hardware failing.
 
#27 ·
Hey Jake,

Thanks for your work.

I had a question, is it redundant to run both zram and swap.

On my OG Droid, Zram used to bog my phone down and require me to reset it from time to time.

I ended up putting a swap partition on my sdcard, which worked quite well for me.

I didn't use both.

So my question to you is which you would recommend. Zram, Swap or both...

Sent from my Galaxy Nexus using RootzWiki
 
#28 ·
Both will extend the memory by setting up separate places to swap, so no it isn't redundant. As far as the slowdown, I don't see anything like that. IIRC zram wasn't available at the time of the OG, and it was still known as compcache. Zram is the next gen compcache which may have fixed the slowdown problem.
 
#43 ·
Thanks for the info... I haven't noticed the slowdown either in the Gnex with zram. Of course its not nearly as memory dependant as the OG was.

If it does slow down, I run a script that disables zram and swap, then restats zram followed by swap, as zram should have priority 1 and swap should be 2..

Correct?

At some point I'll investigate partitioning internal memory for swap as opposed to writing a swap file, but leantweaks is great. I really like losing the overhead of running setcpu.

Thanks again for your work.

Sent from my Galaxy Nexus using RootzWiki
 
#29 ·
so zram and swap is supposed to speed up what exactly? the opening of apps? the swapping of apps? managing of apps? speeds up data transfer between pc and phone? does it improve battery life?

sorry for the questions but i never understood the actual benefits of these features.
 
#31 ·
Well, it will put an app that has been opened but not used for a while into the swap space which will be called on again when reopening the app. So really, it's going to keep more apps suspended longer which means re-opening them will be faster.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top