[kernel]Unhelpful Kernel v1.7 2010-10-04-0018 - Captivate Android Development

WARNING
Overclocking/undervolting could cause crashes with loss of data, or even damage hardware including the CPU or GPU.
Voodoo support included since 1.5, remove all non-Voodoo lagfixes before installing.
This works for me, but you are ultimately responsible for what happens to your device and your data - have backups, preferably on an external SD that you remove for initial testing.
These are unsigned and will not flash via stock recovery. Use ROM Manager to flash, with ROM Manager you also don't need to rename them as it can select any zip file from internal storage.
Features:
Voodoo lagfix support - should work correctly flashed over other Voodoo beta4 kernels, remove non-Voodoo lagfixes before installing.
BLN support to allow use of touch-button lights to indicate pending notifications when screen is off. The lights will light for all statusbar notifications, unless disabled in the app producing the notification (not all apps will have an option to do this, I don't think any stock Samsung apps do).
Stock voltages/clocks at boot, runtime configuration of clocks and voltages via sysfs, nilfs2 and ext2/3/4 filesystem support, two-stage user init - early scripts for mounting filesystems, late ones for running services. Default I/O scheduler is BFQ, BFQ/CFQ/anticipatory all perform roughly the same in benchmarks with multiple threads competing for I/O. Typical wakeup between instant and about one second, built with the binutils 2.19.1 / gcc 4.3.4 toolchain.
User clock/voltage configuration can be read from/written to /sys/devices/system/cpu/cpu0/cpufreq/freq_volt_table. Copy this file to get the defaults, edit your copy and write back over the original to update, or save your new file in /sdcard/sd/config, /sdcard/config, or /system/etc/config to have it applied on boot. The first column is CPU clock, the second GPU clock, the third CPU voltage, the fourth internal voltage. Changing values besides CPU clock/voltage is not recommended. You must keep 100MHz as the lowest speed. Clocks are in KHz, voltages in mV. Modify at your own risk, I find that my phone runs 1.2GHz @ 1.3V just fine, but yours may vary.
Be aware that your phone might appear to run fine with overclock/undervolt at first but crash later due to some error in calculation or data transfer - i recommend a good number of runs on something like Quadrant, and at least five minutes or so of SetCPU stress test for each frequency you add or change.
User inits must be placed in /system/etc/init.d, and properly named - names starting with "E" will run before /data and /dbdata are mounted, names starting with "S" will run right before startup is completed and normal Android services start. Inits are sorted by name, so you can follow the initial E or S with a number to change the order in which they will run. Scripts need not be executable, and will be run with the shell provided in initramfs for Voodoo support (busybox ash). If either /data or /dbdata is not a mount point after E scripts are completed, /user_early_init.sh will attempt to mount an rfs filesystem there from the usual location. If you want to mount a filesystem that is some other type, you will need to do so in a user script. If you want to format /data with another filesystem, you must edit the partition table to change the partition number - I have disabled the code in /sbin/init that rewrites the partition table, but if it finds something on standard /data partition that does not look like a valid RFS filesystem, it will reformat it.
If you want to build yourself, see the toolchains thread for known-working tools. Run
Code:
make ARCH=arm i897_defconfig
make ARCH=arm menuconfig [COLOR="blue"]optional[/COLOR]
make CROSS_COMPILE=/path/to/toolchain/arm-none-eabi- zImage [COLOR="blue"]change if using a different toolchain[/COLOR]
tar c -C arch/arm/boot/zImage >captivate_zimage.tar
Flash captivate_zimage.tar as PDA in Odin - see other threads for how to use Odin and where to get it. Use menuconfig to select a different initramfs source if you wish, by default an included one at usr/initrd_files will be used.
Starting with v1.4, create a .build_config file to change any variables and run build_kernel.sh to build tar flashable with Odin or update.zip. As of v1.5.2 you can also use .build_config to inject commands and files into update.zip builds.
CREDITS
raspdeep - the original OC code
curio - Voodoo lagfix original concept and script
neldar - BLN support
atinm - BLN port for Captivate
BusyBox, buildroot, crosstool-ng, nilfs2 - see respective projects for original contributors and source
v1.7ClockworkMod Recovery
flashable binary: mediafire mirror | github mirror
github source
BETA ClockworkMod Recovery replaces stock recovery
BETA support for backup/restore with Voodoo enabled
v1.6BLN Support
flashable binary: View attachment i897-unhelpful-v1.6.zip | mediafire mirror | github mirror
github source
BLN support - use the touch-button lights to alert of pending notification when screen is off.
Disable check for SGH-I897 device, since this can fail on Captivate hardware if an alternate ROM is flashed.
v1.5.3Bugfix release
flashable binary: View attachment i897-unhelpful-v1.5.3.zip | mediafire mirror | github mirror
github source
Revert from the config based on kepler_rev02_defconfig, suggested by the 9/6 code drop, to aries_rev02_defconfig. The config change appears to have been responsible for the power drain problems seen in v1.5.1 and v1.5.2.
v1.5.2Bugfixes and Voodoo lagfix support
flashable binary: View attachment i897-unhelpful-v1.5.2.zip | View attachment i897-unhelpful-v1.5.2.tar.7z | mediafire mirror | github mirror
github source
Odin-flashable tar file (inside 7z to allow upload to XDA), please use only to recover from bad flash of v1.5.1, the update.zip contains scripts that are important if you're running SRE.
Voodoo lagfix support
Restore correct stock voltage (1.275V) for 1GHz
Update sources and config from Captivate 9/6 source drop
Update modules from JH7 OTA
LZMA initramfs compression to reduce compressed kernel size / allow larger initramfs
Enhanced update.zip support allows developers to easily inject their own commands and files into update.zip on build, and allows run_programs scripts to produce screen output and can flash kernel/modem partitions directly.
v1.4.1BUGFIX for SRE users
flashable binary: View attachment i897-unhelpful-v1.4.1.zip | View attachment i897-unhelpful-v1.4.1.tar.7z | mediafire mirror | github mirror
github source
Bug with SRE + 1.4 causing storage to become unavailable should be fixed by this kernel, fix works on my phone but some have reported problem spontaneously ifxing itself.
v1.4Load OC/UV config from file, system early init (for developers).
downloads removed due to bugs
github source
Built with gcc-4.4.3
build_kernel.sh reads variables from .build_config, or from config file specified by $BUILD_CONFIG, so you can keep the script file clean.
Early system init - E* scripts in /sbin/init.d run before user early init, for developers to include startup scripts.
System init loading of OC/UV table - searches for config/freq_volt_table on external SD, then internal SD, then in /system/etc.
ADB checks uses the first shell found from the list bash, ash, /system/xbin/sh, /system/bin/sh, sh.
Correctly set cpufreq policy on table change - should fix resets of maximum clock to 1GHz after new tables are loaded.
v1.3.1OC/UV configuration
flashable binary: View attachment i897-unhelpful-v1.3.1.zip | mediafire mirror | github mirror
github source
Stock clocks/voltages at boot, user can add new clocks and change voltages at runtime - see above for details.
Modify stock init to avoid rewriting partition table at boot - change the partition table for internal SD, resize partitions or remake /data with a different partition number so it can be safely formatted with another filesystem.
v1.2Bugfix / update.zip / dev features
flashable binary: View attachment 389189 | mediafire mirror | github mirror
github source
Fix scaling bug, performance level was set past end of table on sleep
Scaling enhancement, selectable clock source for GPU
GPU clocked at 222MHz for all speeds except 100MHz, where it matches CPU clock
Basic build_kernel.sh script, edit to change configuration - builds unsigned update.zip with default kernel config by default
Add interactive CPU governor - enabled in build but conservative is still configured as the default
v1.1Bugfix release
flashable binary: mediafire mirror | github mirror
github source
Rework of user init, resolves lost-settings-on-boot issue for me.​
v1.0Initial release for Captivate I897
flashable binary: mediafire mirror | github mirror
github source
nilfs2, ext2/3/4 filesystems
separate early and late user init
600MHz and 1.2GHz speeds, use SetCPU to enable 1.2GHz
fast scaling from low speed, skipping from 100MHz to 800MHz​Other Downloads
User Init Scripts
mediafire, github - enable 1.2GHz overclock on startup
mediafire, github - start Mobile AP background service

Does this include the ability to clock at 1000 mhz?
Sent from my Nexus One using XDA App

You're my hero.
*edit*
_Opiate_ said:
Does this include the ability to clock at 1000 mhz?
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Yea it is, I have it set at 1200 in setcpu and I saw it hit 1000mhz a few times just watching it.

Yes, the scaling steps are 100MHz, 200MHz, 400MHz, 600MHz, 800MHz, 1GHz, and 1.2GHz. 1.2GHz is disabled at startup until the user enables it, so that the kernel can be used without overclocking.
Sent from my SAMSUNG-SGH-I897 using XDA App

So will this undo the MobileAP that was just put out. I know we had to flash a custom kernel to enable that. Will this undo it?

Clienterror said:
You're my hero.
*edit*
Yea it is, I have it set at 1200 in setcpu and I saw it hit 1000mhz a few times just watching it.
Click to expand...
Click to collapse
Never mind I just flashed it. No On demand?

Unhelpful said:
Yes, the scaling steps are 100MHz, 200MHz, 400MHz, 600MHz, 800MHz, 1GHz, and 1.2GHz. 1.2GHz is disabled at startup until the user enables it, so that the kernel can be used without overclocking.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Thats great. Hell just running it at 1000mhz is a slight improvement in Quadrant. Before when I was running the stock kernel I never saw it clock above 800mhz.

Also no wake up lag at all!!!!!!!!! Great fraking job man!!!!!

jhernand1102 said:
So will this undo the MobileAP that was just put out. I know we had to flash a custom kernal to enable that. Will this undo it?
Click to expand...
Click to collapse
This does not run wlp2pservice in the init.rc, but a user script can easily be written to do that - I already have one on my phone, I'm going to add a section for init scripts in the OP when I get the chance.

Can you toss up a donation link plz :-D

Unhelpful said:
This does not run wlp2pservice in the init.rc, but a user script can easily be written to do that - I already have one on my phone, I'm going to add a section for init scripts in the OP when I get the chance.
Click to expand...
Click to collapse
Thanks for the info...looking forward to trying this out once there is a script so MobileAP still works...

jhernand1102 said:
Thanks for the info...looking forward to trying this out once there is a script so MobileAP still works...
Click to expand...
Click to collapse
Yeah that's one reason I still use my Nexus One mainly. The ability to tether is built right in to Froyo. But I can wait for tethering till we have a kernel that will do both. I prefer to play with this kernel now. Lol
Sent from my Nexus One using XDA App

_Opiate_ said:
Yeah that's one reason I still use my Nexus One mainly. The ability to tether is built right in to Froyo. But I can wait for tethering till we have a kernel that will do both. I prefer to play with this kernel now. Lol
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Yeah hopeful it can be put in the same kernel then we can have the best of both worlds...

I just found something strange. When I reboot and enter set cpu the phone say I have to chose my device again so I have to choose autodetect again.
Sent from my SAMSUNG-SGH-I897 using XDA App

do we just flash this with odin ? in the op there are many intrsuctions on putting stuff here and there i got lost

_Opiate_ said:
I just found something strange. When I reboot and enter set cpu the phone say I have to chose my device again so I have to choose autodetect again.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Every time I reboot it's all in Russian again like the first boot with JM5 lol.
Crizthakidd said:
do we just flash this with odin ? in the op there are many intrsuctions on putting stuff here and there i got lost
Click to expand...
Click to collapse
Yep, just use 7zip and extract the .tar then flash with odin3 as PDA.

Wow, unhelpful you are the MAN. Put up a donate link, I'll send a few beers your way.

Works!!
Unhelpful, you're probably one of the MOST helpful people on this forum. haha

minor bug, usb debugging doesn't seem to stay on between reboots.
and i can't seem to send emails using the gmail client anymore

IStern said:
minor bug, usb debugging doesn't seem to stay on between reboots.
and i can't seem to send emails using the gmail client anymore
Click to expand...
Click to collapse
ditto on the usb debugging, wont stay on between reboots

Related

[GUIDE] Make VooDoo Settings Stick on Boot

FIRST: Supercurio makes a really awesome app, so I highly recommend purchasing the pro version to support further development for two reasons. First, it's the right thing to do and second, I haven't figured out how to make all of the VooDoo sound settings work yet, and I'm a busy college student in my senior year attempting to convince someone to pay me, so I don't have much time on my hands (thus my erratic shower schedule).
That being said, I have attached a script that I run on boot. That being said, I'm running AOSP's oiCSv43 ROM with Eugene's Speedy 2 kernel. So long as your kernel supports the following options (which will be listed below), you shouldn't have a problem with this script. I've also verified that it works just peachy with GLaDOS 2.5 for ICS-- another very good ICS kernel [I head 2.6 is quite nice]. (This should also work for GB roms if anyone cares to test for me)
You must have
root
superuser
busybox, or an alternate way to mount /system as writable (there are 2 other methods AFAIK)
ROM that supports init.d scripts OR scripter or some other app like it (in this case, you can just add the script to scripter and set it to run on boot)
If you don't (know if you) have init.d support, check out this post by damnmisur about scripting with ROM Toolbox
This script changes the following:
cpu governor -> interactive
max freq->1000mhz
min freq->150mhz
touchwake enabled with 10 second delay
back light dimmer settings are commented out, so it uses whatever is default for you kernel
bln enabled with blink disabled
blx commented out (reverts to kernel default which is likely 96%)
voodoo_color/red_multiplier->2724764160
voodoo_color/green_multiplier->3059586880
voodoo_color/blue_multiplier->2944130880
voodoo_color/red_v1_offset->-26
voodoo_color/green_v1_offset->-30
voodoo_color/blue_v1_offset->-33
voodoo sound anti-jitter, hi-fi play, hi-fi record, dac direct, voodoo sound control enabled
headphone_amplifier_level->+3db
voodoo sound mono downmix disabled
USE AT YOUR OWN RISK! I AM NOT LIABLE IF ANYTHING GOES WRONG!!!
NANDROID NANDROID NANDROID.
ALWAYS MAKE A BACKUP
NANDROID
The script is in the zip. To install:
Unzip archive into same directory as adb (or wherever you want if you know what you're doing)
open a terminal
Code:
adb remount
adb shell
su
busybox mount -o remount,rw /system
exit
adb push 99whirlpool-Speedy_2 /system/etc/init.d/99whirlpool-Speedy_2
adb shell
chmod 755 /system/etc/init.d/99whirlpool-Speedy_2 && reboot
The file has no extension! If you want to edit it, open it in a text editor. If you don't know what you're doing, don't play with it. To disable boolean values, change the 1 (1 means true i.e. on) to a 0 (which means false, i.e. off).
frequency values are in hertz
you can find out what scaling governors and frequencies your kernel supports by typing
Code:
adb shell
su
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
Feel free to edit anything you'd like!
DO NOT FLASH THE .ZIP FILE! Extract and follow the directions above
thanks....
Nice but some of your changes are the exact opposite of what I use. So I'll just change voodoo settings because I'll be a lot less to change with every boot than if I was to use this.
I do of course use easy settings. Color multipliyer: all the way right.
Gama: all the way left.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
Thank you.
Don't voodoo settings stick by default? It seems my voodoo settings stick just fine without using any script?
Si_NZ said:
Don't voodoo settings stick by default? It seems my voodoo settings stick just fine without using any script?
Click to expand...
Click to collapse
They do with the PRO version, not the free one. I've also never had a problem with them NOT sticking on Pete Alfonso's GPA19, or any GB ROM for that matter, but many ICS users, including myself, have not been able to get our settings to stick recently.
This also means that I don't have to use NSTools or VooDoo Control.
Translation:
no apps changing settings on boot->
fewer individual SU requests (count the number of toast notifications, or check the request list in the superuser app for NSTools and VooDoo control on boot)->
faster boot sequence, and less lag on boot.
Not everyone may have this problem, but I and others do.
I'm visiting for a lesson, had read this before on aosp's or Eugene's kernel threads, but didn't get it so, wanted to ask and thank you for this help.
I'm trying to make voodoo stick, I downloaded your zip, opened and changed a couple of things in Wordpad, it asked to save and rezip, said yes. I used different multipliers and want bln to blink, so changed those numbers and the blink 0 to 1 (or vice versa, followed your directions).
So to do this, do I just flash zip in recovery? Any wipe or just flash away??
Like you said, I will backup, but really don't want to make a mess and thought I would double check first.
nmoreman said:
I'm visiting for a lesson, had read this before on aosp's or Eugene's kernel threads, but didn't get it so, wanted to ask and thank you for this help.
I'm trying to make voodoo stick, I downloaded your zip, opened and changed a couple of things in Wordpad, it asked to save and rezip, said yes. I used different multipliers and want bln to blink, so changed those numbers and the blink 0 to 1 (or vice versa, followed your directions).
So to do this, do I just flash zip in recovery? Any wipe or just flash away??
Like you said, I will backup, but really don't want to make a mess and thought I would double check first.
Click to expand...
Click to collapse
Don't flash the zip. It's just there so that I could upload the attachment properly.
The script is in the zip. To install:
Unzip archive into same directory as adb (or wherever you want if you know what you're doing)
open a terminal
Code:
adb remount
adb shell
su
busybox mount -o remount,rw /system
exit
adb push 99whirlpool-Speedy_2 /system/etc/init.d/99whirlpool-Speedy_2
adb shell
chmod 755 /system/etc/init.d/99whirlpool-Speedy_2 && reboot
I'll add a readme to the zip to make it more obvious.
Shark_On_Land said:
Nice but some of your changes are the exact opposite of what I use. So I'll just change voodoo settings because I'll be a lot less to change with every boot than if I was to use this.
I do of course use easy settings. Color multipliyer: all the way right.
Gama: all the way left.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
Click to expand...
Click to collapse
If your just worried about voodoo settings you could do the following :
http://forum.xda-developers.com/showthread.php?t=1366780 or just use the script from this method. Of course you have to edit numbers to your preference.
Sent from my Skanky Nexus S in the Matr1x using XDA App
damnmisur said:
If your just worried about voodoo settings you could do the following :
http://forum.xda-developers.com/showthread.php?t=1366780 or just use the script from this method. Of course you have to edit numbers to your preference.
Sent from my Skanky Nexus S in the Matr1x using XDA App
Click to expand...
Click to collapse
Thanks, I'm going to add this post to the OP as an alternative for those without init.d support

[KERNEL][GPL] ezterry A500 kernel (ezT20) 2.6.39.4-ezT20-v1.0.1~ [Aug 12th, 2012]

~~~~~ Latest release
A500 - V1.0.1 (first stable release)[Size=+1]
ezT20-v1.0.1-a500_S.zip
MD5: 73e25f9970dc5f34d863a2c7155968d2
[/SIZE]​
**Please remove all undervolting and overclocking before installing, as different kernels will use the CPU differently, This may require you thus to change the OC/UV levels to be stable with this kernel.
While plenty of work has gone into ensuring this kernel was fit for use: I take no responsibility for any problem the use of this kernel may cause, and/or loss of data if you fail to backup your data before installing it. Proceed at your own risk
Notice: This kernel will only operate on an unlocked ICS bootloader, for the a500 this is the patched bootloader
A500 Installation: : simply flash the zip from recovery, this will extract and replace the zImage (linux kernel) from your current rom; and leave your existing ramdisk unchanged.
A501 Installation: :Your ICS rom requires to load the new simdetect_switch.ko module on boot, if your rom dose not have support for this, but has support for init.d scripts please first install the patchkit ezT20_a501_patchkit_S.zip MD5: 617f558555c13d215103cd3669d3c009, (This kit only includes the init.d script to load the simdetect_switch module if it exists, and doesn’t include the actual kernel or modules)
After the patch kit is installed (or if it has been previously installed/is part of your rom) you can flash the a500 zip above to install the kernel + related modules.
CM (9 and 10) installation Install per your device above, then install the audio patch init.d scripif you have audio problems: ezT20cmaudio_patch_S.zip MD5: 26251900115b0ca433f26f4d95e7f269 (see this post for more information)
Are you an A100 user? you are in the wrong place see here
~~~~~ ICS Kernel Features
- BFQ IO scheduler (details here)
(BFQ is now the default scheduler, previously was noop)
- Lulzactive CPU governor (by tegrak with a500 modifications by myself)
(Interactive will be the default governor for most roms, as defined on the ramdisk, however lulzactive is recommended)
- Max OC speed: 1504MHz (default 1000MHz)
- Min OC speed: 216MHz (default 216MHz)
- Fixed voltage tables to allow OC on devices previously unable to on A500-OCTestV3 and A100-OCTestV1
- initial 3g support thanks to patches from Vash (v1.0.0 - a501) .. switched to acer's code in v1.0.1 (a501/a101)
- ability to disable acer audio settings (v1.0.1)
~~~~~ Kernel Notes/Warnings
** A specialized lulzactive configuration program can be found at: https://play.google.com/store/apps/...1bGwsMSwxLDMsImNvbS50ZWdyYWsubHVsemFjdGl2ZSJd
(note setCPU will also let you change the values, I only mention tegrak's app as it may make it easier to understand what is being changed)
** The kernel ought to work in place of the stock ICS kernel, roms requiring special kernels may not function with this kernel
** de-odexed roms may have graphical artifacts that are made more serious by this kernel, civato and I have been working on a build.prop tweak to re-generate odex like dex files on de-odexed roms to solve this
** Voltage display may not be accurate (a rework of the UV logic is planned) note UV offsets are accurate.
The following is using the following:
* My Near stock rom
* My disk-io tweak for the rom
* lulzactive Min: 216 Max 1504
* BFQ scheduler
{
"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"
}
~~~~~ Kernel History
This kernel is the continuation of the Overclocked Test kernel, originally posted for the A500 here and subsequently for the A100 here
~~~~~ Credits
Thanks to:
* richardtrip - original OC and MIN/MAX code
* tegrak - for lulzactive
* civato - for being a willing advanced tester
* Bobg1231, Metallkasten, pio_masaki, Moscow Desire - additional testers
* Vash - A501 3g modem patch set
* Acer/NVidia for providing the source to our devices
* The countless number of people that have created the linux kernel in the form it is today
~~~~~ Release Build list w/ source links
v1.0.1 ezT20-v1.0.1-a500_S.zip
MD5: 73e25f9970dc5f34d863a2c7155968d2
Github: https://github.com/ezterry/AcerTabKernel
Tag: ezT20_kernel_v1.0.1
Tarball: https://github.com/ezterry/AcerTabKernel/tarball/ezT20_kernel_v1.0.1
v1.0.0 ezT20-v1.0.0-a500_S.zip
MD5: 007f00e576bf82f9439f9567685dd255
Github: https://github.com/ezterry/AcerTabKernel
Tag: ezT20_kernel_v1.0.0
Tarball: https://github.com/ezterry/AcerTabKernel/tarball/ezT20_kernel_v1.0.0
NET-USB modules [Experimental] for this version: http://forum.xda-developers.com/showpost.php?p=27887611&postcount=52
v0.9.9 ezT20-v0.9.9-a500_S.zip
MD5: c43844babbd96ab43399a100d74d60de
Github: https://github.com/ezterry/AcerTabKernel
Tag: ezT20_kernel_v0.9.9
Tarball: https://github.com/ezterry/AcerTabKernel/tarball/ezT20_kernel_v0.9.9
~~~~~ Change Log
v1.0.1
*) Import of acer's 3g code [A101 and A501]
*) audio updates to better work with CM roms when cm audio patch is applied ezT20cmaudio_patch_S.zip MD5: 26251900115b0ca433f26f4d95e7f269
*) Allow lower min-voltage
v1.0.0
*) cleanup graphics logic with more patches from the nvidia tegra test kernel (and other patches to prevent the graphic under-runs causing screen flashes on some roms) [applies to all devices]
*) modify lulzactive (yet again) to attempt to stem a rare deadlock .. frequently resulting in a SoD overnight on my tab (probably not most peoples constant SoD problem) [applies to all devices]
*) Add Acer A501 patches for 3g modem [applies to A501]
*) fix some touch events on the A50X caused by the a100 patch set rolling back the a500 touch driver, the touch drivers are separate so this ought not impact the a100 [a50x only]
v0.9.9
Initial release, providing some bugfixes and new features to the previous OCTestV3
**build instructions in second post
Developers Corner
~~~~~ Background
As you may know the linux kernel is considered Free Software under the GPL.
To the creators of the GPL licence this means:
The Free Software Definition said:
“Free software” means software that respects users' freedom and community. Roughly, the users have the freedom to run, copy, distribute, study, change and improve the software. With these freedoms, the users (both individually and collectively) control the program and what it does for them.
Click to expand...
Click to collapse
Full text here
This means when Linus Torvalds changed the licensing from "Non-Comercial" use to the GPLv2 he was no longer preventing the kernel from being used in commercial products (as is obvious by its use on all android devices) However requested that anyone who received a copy of the software, get or be offered a copy of the source as well, and to be allowed to modify that source and distribute those changes to someone else, with the only restriction being they must also provide the source so the next person can also make changes.
Mind you this dosn't mean free software is actually free. Countless hours of hard work by countless people make the kernel what it is today.
While we all must provide the source, if something isn't already in the kernel that you want you have only the following options:
1) find someone willing to make the change
2) pay someone to make the change
3) roll up your sleeves and make the change yourself.
Also note one makes you give away changes you write to the linux kernel, you only must give the source to those who already have the binary.
~~~~~ This Guide
This guide will help you build the kernel yourself on your computer from source, this is in hopes that you may take an interest in how both the build system, and kernel its self works.
Instructions will be primarily focused on both linux, and cygwin users; however osx users may also be able to follow this guide with only minor modifications.
If you do make changes you think the public is interested in I will also be happy to review and potentially include it in my future builds, remember however while its polite to credit me for the codebase provided, you may always distribute you modified versions of the kernel as long as you adhere to providing the source per the GPLv2 to those you distribute it to.
~~~~~ Getting Started - Downloading The Toolchain
The toolchain is the compiler used to convert the 'C' code of the kernel into the arm instructions red by your device.
To build this kernel I use a custom android toolchain based on gcc4.6.3;
Pre-built binaries are available for x86 linux, cygwin, and osx:
1) Download the one for your platform
x86 Linux: toolchain-4.6.3.tar.bz2 (Sha1: c8c57aba6ad92e9acddf29ba
Cygwin: toolchain-4.6.3.cygwin.tar.bz2 (Sha1: 6947e1c1ba95195019f542eb8ba0708667b63eca)
OSX: toolchain-4.6.3.darwin.tar.bz2 (Sha1: 9a977f0672863fdd9501383a6ad1e30723281f
Additional details about these files are on my Android Software post:
http://forum.xda-developers.com/showthread.php?t=1686310
All users may wish to look over the cygwin building requirements there to ensure there system has the required packages.
Other information on the post will include information about retrieving the source to the tool chain its self and another overview of building android kernels in general, and not just this specific Acer kernel.
2) Now that you have the toolchain you want to extract it; this can be done anywere but I recommend for the sake of this guide in your posix home directory
this is done by running at your posix prompt (cygwin terminal in windows normal terminal in linux/osx)
Code:
mkdir -p ~/android
cd ~/android
tar -xjvf </path/to/>toolchain-4.6.3.cygwin.tar.bz2
substitution '</path/to/>toolchain-4.6.3.cygwin.tar.bz2' with the file you downloaded above
all versions will extract then to '~/android/toolchain-4.6.3/' all the files required to build arm binaries
~~~~~ Getting the source code
This can be done many ways, if you want to build a specific version the tarball may be easiest, however it is recommended that you use the git revision control software if you wish to make changes, as this helps keep track of the changes, and publish them on services such as github. (in addition its easier for other people to take the changes into there own work without you loosing credit)
3) To get the AcerTabKernel source change directory into the ~/android directory used to make the toolchain
Code:
cd ~/android
4) run the command to fetch a copy of my git repository
Code:
git clone git://github.com/ezterry/AcerTabKernel.git
5) change into that directory
Code:
cd AcerTabKernel
~~~~~ GIT only, switching code views
Once you have the source code you can always refresh it with git fetch origin, however more work is required to update the local files
Option A: following a branch (recommended if you want the latest source)
6.A.1) run 'git branch -a'
you will likely see the following:
master - you local version of the master branch
remotes/origin/HEAD -> origin/master -- indication master is the default branch
remotes/origin/master -- the remote version of master (as of the last 'git fetch origin' or 'git pull' command)
remotes/origin/tegra_overclock -- the remote version of tegra_overclock (as of the last 'git fetch origin' or 'git pull' command)
the two branchs of interest are as follows:
master - the acer A100/A500 source including my enhancements w/o overclocking support
tegra_overclock - the full enhancement list with overclocking
6.A.2) Create a local version of tegra_overclock
run:
Code:
git branch tegra_overclock origin/tegra_overclock
6.A.3) Switching branches
you can switch between the branches by calling
Code:
git checkout <branch name>
so if you want to build this kernel you will call:
git checkout tegra_overclock
Option B: retrieving a specific tag
6.B.1) If you want the code to a specific kernel you can force the checkout of a tag
Code:
git chekout -f [color=gray]<tagname>[/color]
so for the v0.9.9 you can run
Code:
git checkout -f ezT20_kernel_v0.9.9
This will fetch the code, however you local branches will not be updated if you make changes, see on screen note for details
~~~~~ Building the kernel
Once you have the code you can build the kernel (or make other changes first)
7) Set up your build enviroment
Most steps above need not be done any time you make a change; however every time you want to build from a new terminal you must set up that terminals environment as follows
A) add the toolchan to your path:
Code:
export PATH=$HOME/android/export PATH=$HOME/android/toolchain-4.6.3/bin:$PATH
B) run the following commands to prepare the cross compiler from within the directory with the code (ie 'cd ~/android/AcerTabKernel')
Code:
export ARCH=arm;export CROSS_COMPILE=arm-linux-androideabi-;export KERNEL_DIR=`pwd`
*note I make this one line to make it easier to copy and paste all at once
8) Now that the enviroment is set up we can configure the kernel by running
For A500 Kernels:
Code:
make picasso_defconfig
For A100 Kernels:
Code:
make vangogh_defconfig
This will grab the default configuration for the device (same as /proc/config.gz on the running kernel) in the source tree this is arch/arm/config/picasso_defconfig or arch/arm/config/vangogh_defconfig
9) if you want to change the config (add/remove modules and components or change the kernels name):
Code:
make menuconfig
this will provide the kernel configuraiton gui that allows you to update the many kernel options including adding modules.
10) build the binary kernel
Code:
make -j5
you should replace the 5 in -j5 with the number of CPU cores in your computer + 1. 5 is ideal for a quadcore CPU.
If the number is lower/higher the kernel will take longer to build. (slightly higher however will have minimal impact)
11) prepare the modules (makes sure the modules are ready for use, they are built in the previous step)
Code:
make modules
~~~~~ Packaging the kernel
At this point you can find the kernel in arch/arm/boot/zImage and if you search for files ending in *.ko you will find all the built modules
However here I will describe creating the update.zip installer
Note this may look difficult as the process is mostly manual not automated
12) Download the template (I will assume you are in the directory with the kernel source still)
Code:
wget [url]http://android-git.devnull.name/gh/tepl/acer_kernel_tmpl.tar.bz2[/url]
This template contains the update_binary, unpackbootimg and mkbootimg binaries
In addition it has the ufsd.ko acer stok module (a closed source kernel module used for mounting ntfs disks) the updater-script you will use, and a nfo.prop template
koush is to thank for the unpackbootimg source (unpackbootimg/mkbootimg I built using the A500 Public Recovery source tree, updater_binary is from the stock ICS installer)
13) for future use move the template outside your source directory in case you delete/refresh it
Code:
mv acer_kernel_tmpl.tar.bz2 ~/android/
14) make the update.zip work directory
Code:
tar -xjvf ~/acer_kernel_tmpl.tar.bz2
15) copy over the zImage
Code:
cp arch/arm/boot/zImage acer_kernel_tmpl/[color=gray]<kernel_name.zImage>[/color]
the kernel_name can be any name you wish to call the kernel
16) copy in the modules
Code:
cp `find | grep ko$ | grep -v ufsd` zImage acer_kernel_tmpl/system/lib/modules/
17) copy in modules.order
cp modules.order acer_kernel_tmpl/system/lib/modules/
18) edit the nfo.prop
update the values as per the comments, this will control the displayed output during install
as well as allow you to specify any name for the zImage to be installed without
touching the edify script
19) generate the installer zip
Code:
cd acer_kernel_tmpl
zip -r ../kernel_install.zip .
cd ..
now kernel_install.zip can be flashed from clockworkmod (as an unsigned zip) or you may optionally sign the zip now to publish
~~~~~ What next
What next is up to you, there are many source files to look at some never used for our devices.. and many that I've never looked at.
One important thing however is learning the basics of git revision control, and how to maintain your local mirror and keep it in sync with the version I have on github.
Other interesting git features include remotes allowing you to compare source from other kernel repositories and even cherry-pick individual commits from other users.
If you know how to code, learning this isn't difficult so off to 'git help' and google you go
Hi there Terry - looking forward to giving this a try. Also, thanks for going above-and-beyond on the GPL thing and giving really detailed instructions - I've never compiled for Android in my life so it made interesting reading.
Hey
Can wé flash it with cwm or wé néed es nvflash
Thank s
rayman95 said:
Hey
Can wé flash it with cwm or wé néed es nvflash
Thank s
Click to expand...
Click to collapse
Look what I found in the OP
Installation: simply flash the zip from recovery, this will extract and replace the zImage (linux kernel) from your current rom; and leave your existing ramdisk unchanged.
Click to expand...
Click to collapse
But if you are using it on the flexreaper rom , please use the patch from that thread .
It has got this kernel in it but also the tweaked build.prop.
Read OP of this thread regarding de-odexed roms.
civato said:
Look what I found in the OP
Click to expand...
Click to collapse
To be fair I added that line after reading the question and bashing my head..
(anyway nvflash really has no idea what to do with raw zImage files.. as that is all that is in the zip; the boot.img that needs to be flashed to your device also requires a ramdisk.. as indicated now in the op the update script extracts the one currently installed on your tab to generate a full boot.img with the new kernel)
ezterry said:
To be fair I added that line after reading the question and bashing my head..
Click to expand...
Click to collapse
ssssssssst nobody needs to know
I'll try to make a clean patch for A501 support. For now it's a mess =)
vache said:
I'll try to make a clean patch for A501 support. For now it's a mess =)
Click to expand...
Click to collapse
well if you followed my commits this last week or two.. things didn't quite go as cleanly with any of these other patches as I'd hope either.. (what 5+ commits trying to iron out issues in lulzactive.. it really didn't want to play well with interactive in the same kernel build.. and these are all ones I thought worked.. pushed to github..then needed to edit.. if it didn't work before I pushed to gh I'd have modified the commit)
Anyway looking forward to it as I know some people are interested.
I am curious about the lulzactive governor ... it isn't something pulled out of little finger like smartass governor, right (and full of crap, such as "sleep frequency")?
Skrilax_CZ said:
I am curious about the lulzactive governor ... it isn't something pulled out of little finger like smartass governor, right (and full of crap, such as "sleep frequency")?
Click to expand...
Click to collapse
Smarass and lulzactive are based on googles interactive, and really don't have much more overhead just more tuneing.
Sleep frequency is screen off frequency.. (useful if music is running or a background task to not OC, default is the 800mhz level.. lower is prob not wise since it will only be this high if something needs the cpu..) if your tablet is actually asleep its in suspend to ram mode and the cpu is off.. (at least until a wake lock fires or you push the power button) .. prob the most useful state of this is when I have my computer attached by usb preventing the full sleep.. but the power wire is not.
otherwise its a more tuned version of interactive. Allowing tunable quicker ramp ups or slower ramp downs.. I'm just using my own pre-tuned defaults ... edit: it ought to be noted I've also added a super ramp up if the inc_cpu_load is <91% (default value is 75%) and the current cpu utilization is > (100 -((100-inc_cpu_load)/4)) .. (94% with inc_cpu_load=75%) to ramp to max speed and not the ramp up interval of 2 speed steps (as will still happen if the cpu is between 75% and 93%)
Times in state shows a good balance of speeds as needed, and the device is responsive unlike say on demand.
The biggest problem with all the interactive based governors is how they intercept kernel idle .. pm_idle global hook.. replace the function and call the original.. until you start having more modules being enabled and disabled until the pointer is pointing somewhere random and your system crashes.. switch all of that to a register/unregister system based off the one in x86_64
I see, so just some tune.
ezterry said:
if your tablet is actually asleep its in suspend to ram mode and the cpu is off..
Click to expand...
Click to collapse
Yeah exactly ... that's why I said "full of crap, such as sleep frequency".
SoD issues
EZTerry -
I have gotten SoD with nearly all ICS kernels that have been released, both from Acer OTA and with Flexreaper and yours. The only one that I do NOT get any SoD from is the .022 pre-release one that Civato put up on one of the FR builds a while back. Since you seem to be one of the resident experts on kernels for the A500, do you have any idea what differences exist between the .022 build and the current ones, including your OC ones, that could possibly be contributing to the SoD?
For instance, I loaded the latest FlexReaper Extreme Rev 4 (which uses your latest OC kernel) and got peristent SoDs. I flashed back to the non-OC kernel (to get the normal modules back) and then loaded .022 from a flashable copy I had kept. I haven't had any SoD since. No OC, of course, but at least it's stable...
I saw your post about sending you the logs. Still plan to try that, but for now I'm happy with a working tablet.
BakaNeko59 said:
EZTerry -
I have gotten SoD with nearly all ICS kernels that have been released, both from Acer OTA and with Flexreaper and yours. The only one that I do NOT get any SoD from is the .022 pre-release one that Civato put up on one of the FR builds a while back. Since you seem to be one of the resident experts on kernels for the A500, do you have any idea what differences exist between the .022 build and the current ones, including your OC ones, that could possibly be contributing to the SoD?
For instance, I loaded the latest FlexReaper Extreme Rev 4 (which uses your latest OC kernel) and got peristent SoDs. I flashed back to the non-OC kernel (to get the normal modules back) and then loaded .022 from a flashable copy I had kept. I haven't had any SoD since. No OC, of course, but at least it's stable...
I saw your post about sending you the logs. Still plan to try that, but for now I'm happy with a working tablet.
Click to expand...
Click to collapse
But how is ezterry going to know what is differents or how can he help if he doesn't have a logcat.
If ezterry needs to test every rom situation we need to start paying him for giving us better support then we will ever get from acer.
So please provide logcat.
PS:
f is looking real good m8.
will report to you tomorrow .......
civato said:
But how is ezterry going to know what is differents or how can he help if he doesn't have a logcat.
If ezterry needs to test every rom situation we need to start paying him for giving us better support then we will ever get from acer.
So please provide logcat.
PS:
f is looking real good m8.
will report to you tomorrow .......
Click to expand...
Click to collapse
Well, now that I have a stable working build, I can do a backup and then play with the new kernels to get the logcat. I was just so happy to get a working build that I hadn't considered my next step.
I'll play some more when I get home from work since I can't have my tablet in my office.
You wouldn't care to provide a step by step guide of how to get the logcat info would you? I know it requires adb, but not much else. Also, in another post you mentioned getting the last_kmsg (or last_kmesg - I forget). How do we get that?
Thanks. I appreciate the help.
BakaNeko59 said:
EZTerry -
I have gotten SoD with nearly all ICS kernels that have been released
Click to expand...
Click to collapse
SoD is simple to understand in these terms:
Think of your computer or laptop, you request it to suspend to ram or sleep depending on your OS
It does so, turns into the low power state but is otherwise off, and waits for your return.
When you try to turn the computer on it attempts to wake up but then instead crashes.
This is exactly what is happening, android noted nothing was running and suspended the tablet to ram, either was woken up by you pushing power or a timer the operating system set when it went to sleep.
However before fully starting again the system crashed.
In development of the kernel sometimes I run into such problems with bugs in the oc code, or undervolting too far.. but once I call a kernel stable-ish it can usually last the day with many sleep/wake cycles.. can't say there is never an odd sod but its not common.
The question for you the is: what when wrong.. the easiest way to see is the kernel log of the now crashed kernel.. this requires looking at the /proc/last_kmsg file but this is a little tricky if you needed to force power off the tab (the log is stored in ram thus is completely wiped after 8-10 seconds of the tab being powered off.
When it does exits adb pull can grab the file as soon as the android animation begins.
Sent from my Galaxy Nexus using Tapatalk 2
Does this kernel have cifs module built-in? I can't try by myself right now, my a500 is in vacation at acer's repair facility.
ezterry said:
.
The question for you the is: what when wrong.. the easiest way to see is the kernel log of the now crashed kernel.. this requires looking at the /proc/last_kmsg file but this is a little tricky if you needed to force power off the tab (the log is stored in ram thus is completely wiped after 8-10 seconds of the tab being powered off
Click to expand...
Click to collapse
Does the last_kmsg ONLY exist if there's a fault registered or does it get updated regularly during operation? In other words could I create a continuously running script (for debugging only of course) that copies the last_kmsg file to another location before the system actually crashes? Then when it enters sleep the last file copied would have the information you need? Or is there a way to execute a script early enough in the boot process to copy the file during that first 8-10 seconds of power up so that it is easier to acquire?
Or how about a batch file that simply loops the command "adb pull /proc/last_kmsg last_kmsg" continuously on my PC? If the file doesn't exist it doesn't get copied - if it does exist it gets copied, and if the system crashes and doesn't respond, the last file copied should exist either before or after I manually power off and on the tablet. Hmmmm - guess I'll give it a try...
Sorry - just thinking out loud now
Thanks.
Sent from my A500 using Tapatalk 2
so is it as easy as flashing in CWM over any ics rom?
can i flash this with AOKP??
thank you =]
BakaNeko59 said:
Or is there a way to execute a script early enough in the boot process to copy the file during that first 8-10 seconds of power up so that it is easier to acquire?
Click to expand...
Click to collapse
What do you mean the file is there until reboot if the log data is found, so there is no hurry to pull it off the device.
The logdata is only stored in ram.. so if you power off overnight or while microwaving a frozen dinner.. when you turn the tab back on no data will remain.
Ram however will hold its values for a short time without power however, if you needed to force the tablet off by holding power for 5 seconds you have under 10 seconds to power back on the device if you wish to see any of the log. (and you need to leave it off 3 seconds or it will ignore your pressing power.)

[CWM][Flashable]Init.d Support and Tweaks for Aurora ICS

The aurora_4.1+-init.d-addon zip is compatible with Aurora v4.1+.
The OOM-Priority-Charger-v1.4-Aurora-4.1a zip is compatible ONLY with Aurora v4.1a.
You can visit android.mimic.ca to upload and automatically patch your newer services.jar in an updated Aurora version.
Hello everyone,
I have created an update package that enables init.d support and also has some premade scripts to tweak various settings by the user e.g.
- Synaptics Touchscreen Sensitivity
- Apply FPS Novatek Fix to raise FPS to 53fps
- Set CPU Frequency and Governor
- Disable Atmel Haptic Feedback
- Turn VSync OFF
- Raise SDCard Read Ahead Value
All the above settings are at their defaults meaning that you must change the Settings in the Scripts and reboot to apply them, otherwise all values are the defaults in Aurora after flashing the Package.
It also includes and by default enables Androcharger (V6 SuperCharger tweaked by blk_jack for Desire Z, it is the same as V6's option 5), KickAssKernelizer by zeppelinrox and Loopy Smoothness tweak.
For a full "Supercharge" you must also tweak services.jar via android.mimic.ca (See the V6 Supercharger link for info). I have attached the CWM flashable zip for Aurora 4.1a (OOM-Priority-Charger-v1.4-Aurora-4.1a.zip).
Disclaimer
I am not responsible for any damage to your Device.
Notes:
This will make your boot slower as all these scripts have to be executed at startup. Especially the Loopy Smoothness Tweak will add at least 3 seconds at boot.
To apply Changes you have to Reboot
Changelog:
v1: Initial Release
v2: Resolve Bootloops for Atmel Users
Links:
V6 SuperCharger by zeppelinrox
AndroCharger by blk_jack
Thanks to dzo for his excellent ROM and the U8800 xda community for many of the tweaks.
And of course thanks to zeppelinrox, blk_jack, the EVO 4G developers.
Tweaking Values of Scripts
To tweak the Scripts you must use a File Explorer to navigate to /systemd/etc/init.d/ and open the files with your Favourite Text Editor.
There are instructions in each script.
In detail:
- 11synaptics_sens
Tweak Synaptics Touchsreen sensitivity, values 1 to 8, default=4 to accomodate your fingers and remove "jittering"
Simply replace 4 with your desired value.
- 12fpsfix
This enables the FPS fix that raises the panel's Frame Rate to ~53 from ~46.
This may not work for all phones but it is customizable, to enable it just uncomment (remove the starting #) from the echo line.
- 13cpu
Set your Desired Min/Max CPU Frequency and Governor. You may use copy and paste and finding values by opening:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
For Example to use SmartassV2 replace "echo ondemand > /sys/...." with "echo smartassV2 > /sys/...." in line 9.
If you use SmartassV2 There are extra tweaks for Performance and a highly suggested tweak for Sleep Ideal Frequency.
- 14atmel_haptic_disable
Disable Atmel Haptic Feedback (i.e. Vibration on Touch) by uncommenting the echo line. If you want to enable replace 0 with 1.
(I believe the default is ON here, some atmel user input is appreciated)
- 69vsync_off
This file disables VSync. This will increase FPS, performance and benchmark scores but it will introduce Tearing (try e.g. SpeedX with and without VSync to see jarred lines) and it will probably drain battery faster.
Simply uncomment (remove starting #) from line 8 (echo '0' > /sys/kernel/debug/msm_fb/0/vsync_enable)
- 71sdcard_read_ahead
This file raises the read ahead value for your SDCard meaning faster throughput.
----------
The files 96AndroCharger,97loopy_smoothness_tweak,98KickAssKernel should not be edited.
If you wish to use V6 SuperCharger please remove 96AndroCharger first.
Thank you man this is really usefull, gona try ASAP
BTW "For a full "Supercharge" you must also tweak settings.jar via android.mimic.ca", maybe you wanted to say "services.jar" ?
What is inside the flashable ZIP
The ZIP contains a modified boot.img(its initrd image and specifically init.rc not the Kernel), init.d scripts and an executable file: /system/bin/sysinit that in turn executes all init.d scripts.
The source can be modified to support init.d by applying the attached patch to init.rc in platform/system/core repository of CAF. The init.rc is located in rootdir directory.
The patch is a simple two line patch to run sysinit. I will test, and it will of course be preferable to embed sysinit contents directly in init.rc.
Otherwise the initrd.img in the final bootimage can be unpacked,modified and repacked.
I also modified the update script to set permissions on the init.d directory to 755 and owned by root:shell.
Finally, init.qcom.post_boot.sh has been modded so as not to overwrite CPU settings and exec again 13cpu. I may try to modify it so as to source 13cpu instead.
kaza said:
Thank you man this is really usefull, gona try ASAP
BTW "For a full "Supercharge" you must also tweak settings.jar via android.mimic.ca", maybe you wanted to say "services.jar" ?
Click to expand...
Click to collapse
Yes, thank you kaza.
Please let me know if this works fine for you and if you notice any RAM management improvements.
zephyr1988 said:
Yes, thank you kaza.
Please let me know if this works fine for you and if you notice any RAM management improvements.
Click to expand...
Click to collapse
First impressions after first reboot "wow, this thing is really smoother ^^"
Secound impressions after turn on "12fpsfix" "OMG I have a new mobile phone xD"
Boot its slower, but not that much.
Right after boot i have 173 MB free ram, dont really know how much i had before, what i know is that launcher is not redrawing thats really cool
Until now i can only say this, amazing improvement for Aurora, thank you zephyr1988, I will keep in touch with further testing
EDIT: Aps are opening and closing faster too
Thank you so much for this zephyr.
like kaza said, this impoves smoothess a lot.
And being able to use sd-ext again is really good
Thanks again for this!
Yes, improves everything a lot!
Sent from my U8800
kaza said:
First impressions after first reboot "wow, this thing is really smoother ^^"
Secound impressions after turn on "12fpsfix" "OMG I have a new mobile phone xD"
Boot its slower, but not that much.
Right after boot i have 173 MB free ram, dont really know how much i had before, what i know is that launcher is not redrawing thats really cool
Until now i can only say this, amazing improvement for Aurora, thank you zephyr1988, I will keep in touch with further testing
EDIT: Aps are opening and closing faster too
Click to expand...
Click to collapse
Thanks for testing kaza I'm glad it is useful for you
Thank zeppelinrox for his supercharger and the EVO 4G devs for these two things.
I was simply lucky to find them
@Loureiro,fjsferreira
Glad it works for you guys and thanks for testing
A quick question...
"If you use SmartassV2 There are extra tweaks for Performance and a highly suggested tweak for Sleep Ideal Frequency."
If I change to SmartassV2 with No-frills CPU Control will I benefit from that extra tweaks or only if I change it in 13cpu?
EDIT: Nevermind I saw that its needed to uncoment some lines
kaza said:
A quick question...
"If you use SmartassV2 There are extra tweaks for Performance and a highly suggested tweak for Sleep Ideal Frequency."
If I change to SmartassV2 with No-frills CPU Control will I benefit from that extra tweaks or only if I change it in 13cpu?
Click to expand...
Click to collapse
No Frills will overwrite 13cpu's settings in all cases but if you use smartassv2 in 13cpu and enable the tweaks they should stick, I believe.
In two words, use smartassV2 in both No Frills and 13cpu.
Try enabling the sleep ideal freq tweak and then open with a file manager the file:
/sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
(or in a terminal:
cat /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq)
and see if the value is 368640. If it is it works.
Don't know why, but I installed Aurora 4.0, installed all my apps and then rebooted into Recovery to flash the two Zip files attached to the first post and the phone now is bootlooping :\
trocLas said:
Don't know why, but I installed Aurora 4.0, installed all my apps and then rebooted into Recovery to flash the two Zip files attached to the first post and the phone now is bootlooping :\
Click to expand...
Click to collapse
Are you sure this is because of this mod?
Have you installed other mods too?
Before trying a fresh install, try deleting the three files 96Androcharger, 98KickAsskernel and 97loopy_smoothness_tweak via Pink Screen and PC. Then it is exactly the same as normal aurora and your problem is elsewhere.
Then you should try doing a fresh install of Aurora 4.0, then flash this zip and see if you get bootloops before installing other mods or apps.
wow, I know this will sound strange but at least for me it really happens, i had some slow downloads with Aurora just like most of the guys were reporting, I am using 12fpsfix, 13cpu with 368 min, 1.4 max, smartassV2 with teawks and 71sdcard_read_ahead, and now my downloads are really faster, downloading Asphalt 6 cache now was really fast, maybe its because my read and write speeds of sdcard were increased, dont know, but this is the best tweak so far for Aurora in my opinion lol
kaza said:
wow, I know this will sound strange but at least for me it really happens, i had some slow downloads with Aurora just like most of the guys were reporting, I am using 12fpsfix, 13cpu with 368 min, 1.4 max, smartassV2 with teawks and 71sdcard_read_ahead, and now my downloads are really faster, downloading Asphalt 6 cache now was really fast, maybe its because my read and write speeds of sdcard were increased, dont know, but this is the best tweak so far for Aurora in my opinion lol
Click to expand...
Click to collapse
Yes, I have noticed this too, and also Internet browsing is a little speedier for me.
KickAssKernelizer and SuperCharger(i.e. the modified Androcharger script) apply kernel and tcp stack optimizations
zephyr1988 said:
Are you sure this is because of this mod?
Have you installed other mods too?
Before trying a fresh install, try deleting the three files 96Androcharger, 98KickAsskernel and 97loopy_smoothness_tweak via Pink Screen and PC. Then it is exactly the same as normal aurora and your problem is elsewhere.
Then you should try doing a fresh install of Aurora 4.0, then flash this zip and see if you get bootloops before installing other mods or apps.
Click to expand...
Click to collapse
I tried it with ICS 4.0.4 Toucwiz 5 theme and resulted a bootloop. I will re-install ICS4.0.4 and then your scripts to see if they are working.
zephyr1988 said:
Are you sure this is because of this mod?
Have you installed other mods too?
Before trying a fresh install, try deleting the three files 96Androcharger, 98KickAsskernel and 97loopy_smoothness_tweak via Pink Screen and PC. Then it is exactly the same as normal aurora and your problem is elsewhere.
Then you should try doing a fresh install of Aurora 4.0, then flash this zip and see if you get bootloops before installing other mods or apps.
Click to expand...
Click to collapse
I haven't installed any other mods. I'm going to do a fresh install and then install the two zip files and report what happened!
------------ EDIT ------------
Made a fresh install of Aurora 4.0 and flashed the two zip files from the first post, rebooted the phone, and it entered in bootloop again. Would you upload the files to another host (maybe the files I downloaded are corrupted?).
Don't know why this happens :|
trocLas said:
I haven't installed any other mods. I'm going to do a fresh install and then install the two zip files and report what happened!
Click to expand...
Click to collapse
Did a fresh install but same result(bootloop). Does it make any diffrence which file you install from CWM first?
right after flashing those files, go to Advanced->Report Error. Then mounts and storage -> mount USB storage. You will find inside clockworkmod dir a .log file with debug lines. If something went wrong (mounting or unmounting partitions), it's all there.
Btw which CWM are you using? 5.0.2.7 or 5.5.0.4?
trocLas said:
Don't know why, but I installed Aurora 4.0, installed all my apps and then rebooted into Recovery to flash the two Zip files attached to the first post and the phone now is bootlooping :\
Click to expand...
Click to collapse
same here
Sent from my U8800 using XDA

[GUIDE] [Updated] Compiling and putting together a kernel for the X8

Second thread in a week. Read on, young dev, for you are about to enter a world of Android goodness soon.
WHAT IS A KERNEL?
A kernel, as explained by viper001 in his thread, is the software layer between the ROM and the hardware. It contains the crucial init process of the boot sequence. So an Android phone with a faulty kernel may mean a very expensive paperweight. But fear not I have compiled several kernels for my phone (released a few of them too) and I have never ever bricked my phone (not even a bootloop, strange right?).
WHY THE NEW THREAD AND WHY YOU SHOULD COMPILE A KERNEL?
viper001's thread is pretty outdated (it was published in 2010, it's nearly 2013 now) and uses the FXP source (which is also pretty old). Therefore if you compile a kernel following that guide, you'll only be able to use it with FXP ROM (which is almost ancient by now). That is why I decided, after considering Rohin's suggestion, to write a new kernel building guide, for members who wish to step into the dev world by compiling a kernel. Keep in mind, neither the XDA-ians nor I am to be held responsible if you do brick your phone (even if you pee on it due to sheer excitement, though I am pretty sure you'll handle it....LIKE A BOSS).
THE ACTUAL GUIDE
Okay so you want to compile your kernel, huh? Well, you're gonna need some packages and toolchains and sources and blah blah. In short these are the requirements:
1. An Ubuntu build (Linux Mint will do too but I haven't tried using it) on a fast computer (preferably a quad core but a dual core 2.4GHz will do too, 2GB of RAM) or a virtual installation (Google installing ubuntu on vbox).
2. Some packages that you can get by typing this in the Terminal:
sudo apt-get install git unrar libncurses5-dev qt3-dev-tools
3. A kernel source
4. A toolchain
5. Flashtool in your Windows installation (you must have one)
KERNEL SOURCES AND TOOLCHAINS
nAa GB (L)
nAa ICS (L)
nAa JB (L)
Alfs GB (use master branch; test has problems) (L)
LINARO (L sources only)
LINUX GNU Compiler for ARM
INSTRUCTIONS
Make a folder where you'll be working for the time being. Name it conveniently. Unpack a source there and a toolchain (use the Linaro one, it makes the kernel slightly faster and each of the sources I mentioned is compatible with it). Rename the toolchain folder, and the source folder too, to something simpler. It's better if all this is done without root, because that may screw your Ubuntu installation beyond recovery. Even so I did it in root. You, however, should do it in any place other than root, and make sure you can easily navigate to the place through Terminal.
Now for the tough Terminal bit. Navigate to the source folder and type in this:
export ARCH=arm
export CROSS_COMPILE=/path/to/toolchain/folder/bin/arm-linux-gnueabihf-
This will tell Terminal to build the kernel for the ARM platform using the Linaro toolchain.
Then type in:
make xxxx_shakira_defconfig
Where xxxx is the part of the name before _shakira. Check the /arch/arm/configs directory for either semc_ (for Alfs kernels) or nAa_ (for nAa kernels). Or you can make your own defconfig if you're up to the challenge.
Then type in:
make menuconfig
This will display a GUI version of your defconfig. Edit anything you want to there or directly in the defconfig.
Then type in:
make -j#
Where # is the number of cores your CPU has + 1.
If all goes well, you should have your kernel image. Grab the Image file form /arch/arm/boot.
You do have Windows installed, right? Good, because you're gonna need it now. Download the bootloader unlocking tool (not Flashtool, the one posted by the_laser).
You have to copy your Image file and a ramdisk, check my other guide, to the sinTools folder of the bootloader unlock tool. A suitable ramdisk, not a GB one for an ICS kernel and vice versa. Then rename the Image file to image and double-click on example_build.cmd. You should get a result.zip. Exatract it and rename result.sin to kernel.sin. Copy it over to a folder and place a loader.sin from a working kernel there too. Open up Flashtool. Go to Advanced > Bundle creation. Navigate to the folder and select both files and move them over to the right-side (by clicking the > button). Give it a proper name and branding and click OK. FLASH! FLASH! You are done with your kernel. First ever, huh? Wish to know more.
If your build failed, type in
make mrproper
or
make clean
Coming soon, TIPS AND TRICKS and more.
P.S.
It is pretty obvious that I'm not a RD, or any D for that matter, this guide may have petty mistakes. Therefore I request any member to let me know if there are any mistakes should he/she find any.
Stay safe and pray that your PC doesn't explode while you're doing this.
If any of the Forum Mods are reading this, you may wonder why I posted this when there already was a guide. viper001's thread is a bit outdated although some users have compiled kernels following it. Therefore to help users who are quite new to this, I wrote this. I sincerely hope I do not get warned for posting a guide twice, just to help people compile newer kernels.
NEITHER THE XDA-IANS NOR I AM TO BE HELD RESPONSIBLE FOR ANY DAMAGE THAT THIS MAY CAUSE TO YOUR PHONE. YOU ARE SOLELY RESPONSIBLE FOR WHATEVER YOU DO TO YOUR PHONE.
But do ask for help if you need it.
EDIT: You can also use the zImage file (you have to rename it to image) as pilu1978 said in his post (check second page and thank him). If you use this, you can attach a larger ramdisk.
COMPILING WiFi MODULES
After you compile a kernel, you need to compile a set of WiFi modules for the kernel. Otherwise your WiFi won't turn on and when you check in Terminal Emulator, you'll get blah blah.ko magic version errors. So after every compile, you also need to compile your WiFi modules.
For nAa based kernels, all you gotta do is issue the ./build_wifi.sh command right after compiling your kernel. It'll result in 3 files in the source's parent folder: tiwlan_drv.ko, tiap_drv.ko and sdio.ko. You have to copy these files to the ramdisk's modules folder, replacing the ones already there.
For nAa .32 kernel, you don't have to do anything. Just grab the following modules:
net/compat-wireless/net/mac80211/mac80211.ko
net/compat-wireless/drivers/net/wireless/wl12xx/wl12xx_sdio.ko
net/compat-wireless/drivers/net/wireless/wl12xx/wl12xx.ko
Thanks to @btisserand and @pilu1978.
For alfs based kernels, I have no idea. You can ask alfsamsung like I did. I tried it using his method and failed. However I tried copying the vendor_ti_wlan and the build_wifi.sh files from nAa's source to alfs' source and it worked, just once. I couldn't test the modules myself but my tester said the kernel didn't even boot o_0. Therefore I find it safer to stick to the nAa kernel source. But even if you do try with alfs and somehow manage to succeed, do post how you managed to compile it.
EDIT: Thanks to Daveee10, you now have another source for the WiFi modules. Download this as a zipball and extract in Ubuntu. Then execute nAa's build_wifi.sh script in Terminal and you should have the modules. Oh and if you get any permission denied error just chmod it. It works for me.
Next post covers TIPS AND TRICKS.
TIPS AND TRICKS
So compiling a kernel, a bland, vanilla kernel is pretty mainstream. You want more tweaks. That's up to you to find out how you're gonna manage that. All I can do is help you with some things that'll make the kernel your very own, your precious.
Changing the name of the kernel...like completely
You want to change the name of the kernel like
xxxxx
[email protected]#1
[TIMESTAMP]
The xxxxx in the first line can be changed in the defconfig or in the menuconfig (easier). Go to General Setup. Then scroll down to the KERNEL_VERSION line (in menuconfig). Then change the name to anything you like (for example, X8-kernel).
The [email protected]#1 can also be changed. Go to /source-folder/scripts and open up the mk_compile.h file. Scroll down to line 66 and change the word within inverted commas to anything you like (for example, X8). Then in the next line, change the word within inverted commas to anything you like as well (for example, XDA).
After you flash your compiled kernel and go to Settings > About phone, you'll see
X8-kernel
[email protected]#1
[TIMESTAMP]
I'm not sure if you can change the TIMESTAMP.
Editing CPU freqs
Editing CPU frequencies via kernel is also pretty easy (thanks fotak-x for the suggestion).
Go to /arch/arm/mach-msm and open up acpuclock.c.
Scroll to line 202 (the line which says "7x27 with GSM capable modem PLL0 and PLL1 swapped" or something) and just below that you'll see the frequency table which also has the GPU frequencies (??)
The value after { 0, is the CPU frequency, the one you want to change.
You can delete any frequency that you don't use (19MHz and so on) but don't delete 600MHz or add any beyond 864MHz. No X8 will ever go beyond that without freezing up.
The values just before the last number are the voltage units (ranging from 1 to 7). You can experiment with that too but it's better not to.
If you do not know what you are doing, please do not attempt this.
Adding/Deleting I/O schedulers
First look at this commit from DooMLorD: https://github.com/DooMLoRD/Xperia-...mmit/0ae625f7561c559d4933284f489733bf5eb66e96
I'm pretty sure you understood what you gotta do. If you still didn't, read on.
What Sir DooMLorD did was change some lines in the Kconfig.iosched of /block directory to add the Simple I/O scheduler. Then he edited the Makefile to include the building of SIO. The most important thing he did was to make a new file and paste the code that is the script that tells SIO what to do, basically it's core ingredient. You have to perform similarly and change the defconfig to include the I/O scheduler.
Deleting is way simpler than that. You just have to write n after the line in the defconfig where the inclusion of the scheduler is mentioned.
50% FPS-uncap in ICS (and JB?) kernels
It's pretty obvious that I'm referring to the nAa-ICS kernel source. Navigate to the arch/arm/mach-msm directory and open up the board-delata.c file.
Go to line 1915 (the one that begins with panel_data->panel_info.lcd.vsync_enable). Change the value to FALSE. This disables HW vSync.
Then go to line 1999 (it also begins with panel_data->panel_info.lcd.vsync_enable). Change this value to FALSE as well.
Compile the kernel as you would normally. Flash to see a slight increase in performance, and a massive improvement in gaming.
Thanks to pilu1978
That's it for now. Will be updated soon.
CREDITS in no particular order
-viper001
-nobodyAtall
-alfsamsung
-djnilse
-Daveee10
-CyanogenMod team
-pilu1978
-RohinZaraki
-fotak-x
-DooMLorD
-paxChristos
-Google and the Android team
is it possible to compile it from stock kernel?
Thanks sgt may try compiling a kernel just for my ROMs
cool
@fotak-x
yes you can download the stock sources and compile it but it's a little complicated. and all kernels are basically improvements over the stock kernel, so in a way you are compiling a not-so-stock stock kernel.
Thread updated. More tips and tricks now.
Some additions
About the compiler (arm gcc). Today everyone prefer linaro. After a lot of testing, I can say: NO real performance differences between the different compilers (tried google/codesourcery/linaro with lot of versions between 4.4.x and 4.7.x series). Sometime the older is better. The linaro gcc contains optimized libgcc for each instruction set, but we are on the bottom of the list, without the armv7 extensions, extended float unit (thumb-2) and vector processing unit (NEON) the linaro gcc can't give real boost for our phone.
About the cpu frequencies: yes, possible to add/remove/modify these values, but without enough knowledge, better if you not do anything. You use an android phone, so you must know, your best friend: google. Use it. And try to understand how to generate the cpu freqs. Learn about the PLLs, their values, dividers, bus frequencies (axi, ahb, etc...) before start to play with frequencies. You can't set directly the gpu freq, in the msm7x27 SoC series the gpu freq depends on the axi clock (can't work in async mode). Modify the VCC levels, bus frequencies the easiest way to make the phone unstable.
About the wifi modules: you can use the wifi drivers from nAa sources if you want to compile modules to alfs kernel. Or you can find the tiwlan1271 driver sources in the cyanogenmod source tree too. If not working, or you can't compile, try another compiler, or other sources. If you successfully build the modules, you NOT must recompile it after a new kernel build. If you change the kernel versions (2.6.29.xx-xyz) you MUST recompile the modules (the wifi modules linked directly to the kernel version).
good addition mate. i never added any freq and that's why i don't know the exact amount it multiplies by at every step. or even if it works that way. and i never succeeded in compiling the WiFi modules for alfs. and yeah there is basically no improvements in terms of performance between Linaro and Codesourcery. Linaro just seems cool and that's why everyone wants to use it. simple as that. that being said, Linaro does indeed work good on ARMv7 devices as you said in your post.
Some additions (again)
Differences between make clean and make mrproper (if you need to clean the sources after a failed build). The make clean command delete the most generated files and builded objects, but keep the .config file (what contains the changes of actual defconfig) and keep enough informations to build external modules. The make mrproper command delete ALL generated files/objects, after this command you need to configure the kernel config again (make blabla_defconfig and make menuconfig for example). If you use alfsamsung sources, never use the mrproper command, because this source not contains defconfigs, only a predefined .config, the make mrproper delete it, and need to extract this file again.
About the Image and zImage: the difference between these files is only one, the Image contains the raw kernel code, the zImage starting with a decompressing code and the compressed image. When build the kernel.sin, you can use the zImage too, just rename to Image. The result is a smaller kernel, you can attach bigger ramdisk. The maximum size of the kernel (the complete kernel.sin) is around 8.300.000 byte. A typical kernel image is around 5,5MB (you can use ramdisks with maximum 2,5MB) the compressed image size is less than 3MB (you can use ramdisks around 5MB size)
As sgt. meow wrote: "Linaro just seems cool and that's why everyone wants to use it." This is the general problem in the development section, every "developer" want to make "cool" things, I think better if they concentrate to make "good" things, instead of making "cool" sh!ts...
Some tips:
If you make a kernel, never post it: based on LATEST xyz source. The latest is relative. Write a correct commit version, if you don't know what is it, need to learn before publish kernels.
To the members who have low bandwidth. Download sources as zipball, it needs less data transfer than a repository sync (when you sync a repo, you download a lot of deltas, additional files too), a typical kernel zipball is around 90MB. This method works with rom sources too (but more complicated, because you need to download and extract manually more than 200 files), for example the minicm7 sources with manual download as zipballs is only 600MB (without the prebuilts what is around additional 700MB).
If you want to be "cool" and use linaro, use the standalone linaro gcc (the arm-none-eabi version) instead of the linaro toolchain (arm-linux-gnueabi version) it will give less compiling errors.
true dat, brother.
and is minicm7 really about 1.3GB in size as zipballs? one more thing i heard (read, probably) that the zImage is the compressed version of the Image with a decompression code. so if we use that, won't booting time be a lil bit slower?
added all your suggestions bro. thanks a lot for helping out. you should apply for RC.
No, the compressed image not give significant slower boot time. All nAa kernels use compressed images, and boot faster than the alfs (the alfs8 use normal image, the alfs9 use compressed).
Yes, the minicm7 source only 614MB if you download as zipballs. For example: the settings app size is 3,5MB if you download as zip, but the git repo is around 90MB (this is an extreme example, with some part of code you can't decrease the download size).
Tips to use this method.
Make the repo init, but not start the sync. Check the default.xml in .repo/manifests, and you can see all needed repo.
You can make download links from this file in this form:
https://github.com/"name value"/zipball/"revision value"
Concrete example:
You see this line:
<project path="bootable/recovery" name="CyanogenMod/android_bootable_recovery" />
The link what you need: https://github.com/CyanogenMod/android_bootable_recovery/zipball/gingerbread
(the most line in default.xml not contains revision, if you not see it use gingerberad for minicm7, or ics for minicm9)
If the download finished, you must extract manually the downloaded file into the "project path". With this example: in your source folder you must make the bootable/recovery folder, and extract the downloaded zip into this folder (warning: the zip contains a folder named in this form - project name+commit number, you must extract the files into the "project path" folder WITHOUT this folder (you need the files INSIDE this folder))
gonna try that soon.
okay so the line has to be edited like this:
<project path="bootable/recovery name="CyanogenMod/android_bootable_recovery/zipball" />
i'm trying it on the MiniCM9 source.
oh yeah android source from googlesource can't be zipballed that way.
sgt. meow said:
gonna try that soon.
okay so the line has to be edited like this:
<project path="bootable/recovery name="CyanogenMod/android_bootable_recovery/zipball" />
i'm trying it on MiniCM9.
Click to expand...
Click to collapse
No.
The correct method for get direct links:
You can see in the default.xml: <project path="external/compcache" name="CyanogenMod/android_external_compcache" revision="master" />
The link what you need:
https://github.com/CyanogenMod/android_external_compcache/zipball/master
The text with puple color: need to write it manually
Text with green color: the repo what you need
Text with blue color: the branch name what you need. Usually you not see the revision in the default.xml, if not exist, use the default branch name (gingerbread or ics, depends on what source needed)
The downloaded file will be this: CyanogenMod-android_external_compcache-cm-7.0.0-0-g5fdea21.zip
Inside the zip package you can see a folder with same name, this folder NOT needed, go inside this folder, and extract the files into the folder what marked with orange colour.
You must do it with ALL project (over 200 files), but you need to download only 600MB, and not need to sync the repo (what is much bigger).
EDIT: You not need anything from google sources if you want CM7 (just the prebuilt binaries, but you can find it somewhere in the minicm nightlies threads, eagleeyetom uploaded it when the aosp servers was unavailable)
EDIT: what about platform/abi/cpp and some others?
sgt. meow said:
EDIT: what about platform/abi/cpp and some others?
Click to expand...
Click to collapse
Please explain it in longer form (I not understand what is the question)
i saw this line in the default.xml
<project path="abi/cpp" name="platform/abi/cpp/zipball" remote="aosp" revision="refs/tags/android-4.0.4_r2.1"/>
this is important. how do i zipball or tarball it?
sgt. meow said:
i saw this line in the default.xml
<project path="abi/cpp" name="platform/abi/cpp/zipball" remote="aosp" revision="refs/tags/android-4.0.4_r2.1"/>
this is important. how do i zipball or tarball it?
Click to expand...
Click to collapse
Okay, understand I checked only the cm7 sources, what not contains codes from aosp servers (only the prebuilt toolchains, but this is available on mediafire servers, eagleeyetom upload it when the prebuilts was unavailable ). So, at this moment no idea how to download code from google servers.
Try this: remove all minicm/cyanogenmod related lines from default.xml, leave only the lines that contains: remote="aosp", and sync the repo with only the aosp code. Or send your default.xml (just copy/paste the contents, and send it in a pm.
sorry for off-topic but @pilu you should be recognized developer

Llama Sweet Kernel Tweaks

Feature list​
- sets hostname to LG-G4 something that was missing at first from lineage/aosp 7.1.1 (maybe i will remove that)
- Better mount point flags
- Internal storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- external storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- Net and virtual memory:
tcp_congestion_control
disable_ipv6
dirty_writeback_centisecs
dirty_expire_centisecs
dirty_background_ratio
dirty_ratio
drop_caches
kernel.panic
min_free_kbytes
overcommit_ratio
panic_on_oom
swappiness 0 #llama doesn't have zram feature, it's useless on Lg G4
vfs_cache_pressure
- CPU customisations ~depends on your choice of script~
balanced ~doesn't make any cpu changes~
less ~for less battery drain, cpu rests more~
more-less ~for a lot less battery drain, but with a big lag (will soon try fix stability and smoothness)~
performance ~for full cpu power, but rest when the screen is off~
- Kernel customisations
msm_thermal ~off on battery save / on and set a safe temp. for performance~
lowmemorykiller
read_wakeup_threshold
write_wakeup_threshold
hotplug customisation
- Only the safe internet customisations
tcp_timestamps
tcp_tw_reuse
tcp_sack
tcp_tw_recycle
tcp_window_scaling
tcp_keepalive_probes
tcp_keepalive_intvl
tcp_fin_timeout
For stock based roms follow the guide in post #2
How to "install" it ? Simple
1.unzip
2.place it in /system/etc/init.d
Code:
adb root
adb remount
adb push <your tweak> system/etc/init.d/
3.change its permissions to 755
4.lastly change owner:group to root:shell
Code:
adb shell
su
mount -o remount rw /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
If you don't have a pc, type in a terminal inside your g4
Code:
su
mount -o rw remount /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
Those of you that use the new systemless root method of chainfire you can put the script in /system/su.d or in /su/su.d with permissions 700 (same permissions at folder and script) and set owner:group to root:root
Those of you that use the new magisk root method you can put the script in /magisk/.core/service.d/ with the same permissions and ownership as in init.d
Those coming using search bar and don't have this phone and this kernel, don't try it, unless you know what to edit to "fit" your own kernel.
These tweaks aren't just for faster easy setting up our phone, they are more useful for those that don't want to have root access ON, for various personal reasons. They can apply those settings on boot and setup their phone without the need of root and an app asking for root.
Easy removal: delete the script and reboot. And never use more than one of these scripts inside init.d
Careful, some stock based roms have preinstalled some scripts inside init.d by default.
Those must be removed after flashing Llama Sweet Kernel. They are not compatible and they cause instability !
BIG Thanks to this genius
@genesixxbf3
for his kernel to our lg g4.
XDA:DevDB Information
[Tweaks][MM/N][H815][H811]Kernel Tweaks[CM/STOCK/AOSP], Tool/Utility for the LG G4
Contributors
kessaras, genesixxbf3
Version Information
Status: Stable
Created 2016-12-09
Last Updated 2017-04-25
Reserved
This is a guide for ALL stock based roms and all kernels.
My script will only add tweaks that apply to all kernels.
For those that are rooted with SuperSu, they must first fully remove it.
Nub guide to change SuperSu for Magisk root:​
Step 1.
SuperSu must be removed.
Go into supersu -> settings -> fully remove root access.
###Or download and flash in recovery mode the UnSu script from osm0sis thread.###
Step 2.
Use hardware key combination to boot to TWRP.
###If you used the UnSu script, no need to reboot to recovery, skip step 2 and go to next one.###
Step 3.
Flash latest magisk flashable zip for users that are not rooted yet.
It sais: "If you're not rooted, or something went wrong and you need a clean start"
Download that .zip file and flash it.
Now you are rooted again. Reboot to your rom.
Step 4.
Download Magisk Manager from play store. In that app you can even enable systemless root to hide root from the apps, or do many things that you like.
Questions further go to magisk thread not here. And don't forget to re-enable usb debugging. After you removed root, that was toggled, ###Unless you used the UnSu script again. That means that before reboot you were already rooted.###
Now it's time to install your script.
Download the compressed tweak from this post , uncompress it and follow the next guide.
The steps are the same with the lineage based roms and it works for ALL lineage based roms too
If you use a root file manager then you can skip the guide and just cut - paste the script in /magisk/.core/service.d/
set permissions to 755, ownership to root:shell and reboot.
INSTALLATION​Step 1.
place it in /magisk/.core/service.d/
Code:
adb push /<path to the script>/90balanced /sdcard/
adb shell
su
mv /sdcard/90balanced /magisk/.core/service.d/
Step 2.change its permissions to 755 if it's not already set to 755 by default
Code:
chmod 755 /magisk/.core/service.d/90balanced
If you don't have a pc, type the same commands in g4 terminal but of course without the adb command. Script is supposed to be in path /sdcard/
not in /sdcard/download/ or whatever path. Otherwise edit the command "mv ..." to match the script path.
That's it. Reboot to apply your tweaks.
~I will add Llama Sweet kernel tweaks for stock based ROMS when Genesixxbf3 fixes the bluetooth issue.
Until then all use this one that applies to all kernels including Llama.
Special thanks to:
@topjohnwu for developing Magisk
and to
@osm0sis for his UnSU script
My scripts are not meant for use with kernel adiutor.
Changelog
31/01/2017
- fixed stability for "90less"
- changed to "westwood" tcp congestion control
01/02/2017
- changed to Fiops scheduler only for the 90less and 90more-less
- fixed stability for 90more-less
12/02/2017
- when screen is on, 3 cores always online not 1.
- fixed stability for 90less , 90more-less
- 90balance, interactive governor stable and at the same time conserving some battery
- big cores governor is same with small cores
15/02/2017 and 20/02/2017
- changed back to cfq scheduler
- added cfq scheduler tweaks
- fixed path to disable ipv6
09/03/2017
- fixed a bug for those that big cores were found disabled on boot
Although this is something caused from dirty flashing and can only be fixed with a clean flash
18/03/2017
- Added better mount point flags for Lineage/Aosp based roms, for f2fs, for those that prefer using f2fs partitions format
- i changed the way the mount points get set, now you don't need busybox if you don't want to.
- bigger timer rate for interactive governor for the balanced tweak, balanced can conserve battery now too.
25/04/2017
- Less-more is not lagging anymore but of course it still loads slow since cpu runs at a lower frequency
- interactive governor in balanced script saves more battery than before
- All scripts now give a small cpu frequency amount on input to reduce lag
- At less and less-more the hotplug sets the cores online at a lower frequency. Before, with those scripts you could rarely see the other cores online
kessaras said:
You can request any setting for kernel and cpu you want. I can add them for you.
Screenshots of battery with 90less.
~Haven't done anything special. Brightness is at normal with "auto" ON, gapps stock, usage: Normal, chat, xda, phone Calls/Messages, GPS ON.
Many factors determine the battery drain, such as 3rd party apps, ads from apps, services and more, don't blame my settings. Those settings are absolute and tested and i only do this to help everyone.
Click to expand...
Click to collapse
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...-msm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
jskasia said:
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...sm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
Click to expand...
Click to collapse
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
EDIT:
a part of the scripts does work for stock without llama kernel. it's not dangerous because the stock lg rom doesn't have init.d support on boot and the script only can be applied inside kernel adiutor by enabling init.d emulator.
you can use it then. you will just not get the 100% out of it.
in the 90less you wont get the alucard governor and the hotplug to let the cpu rest.
the only alternative available is to make you one that edits the interactive governor to work almost the same as alucard and conserve a bit more battery than the stock interactive does.
@matgesiarz
follow the op
kessaras said:
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
Click to expand...
Click to collapse
Okay, I successfully put the tweaks (balance) on to init.qcom.post_boot.sh. My phone boot without any problem. After few days we will see the result.
Thanks
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Vipery said:
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
Click to expand...
Click to collapse
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Oletros said:
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Click to expand...
Click to collapse
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
kessaras said:
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Click to expand...
Click to collapse
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
only what the op sais. only group owner. its already set from me, but you have to at least check if its set, if not, set it. group owner shell
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
joaste said:
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
Click to expand...
Click to collapse
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
kessaras said:
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
Click to expand...
Click to collapse
Thanks for the clarification!
kessaras said:
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
Click to expand...
Click to collapse
Thanks
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
welder73 said:
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
Click to expand...
Click to collapse
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
kessaras said:
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
Click to expand...
Click to collapse
So I should change the max for the little cores to 1536 and everything else is ok?
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
...

Categories

Resources