Android Development Archive

Beta Kernel 21 Jan 11

Posted January 21, 2011 By Ziggy471

NOTE: I’m taking this weekend off from working on kernels.  I also will not be checking the site as much as normal.  Same goes for next week during the day, since I’ll be in a training class w/o internet access.  So if you have any issues, please post them, and I will check in when I can.

NOTES on AOSP: It appears that my kernels work for the most part on Froyo based AOSP ROMs.  However, Gingerbread is a totally different issue.  So it may or may not work, best way to find out is to try.  I do have plans to start working on newer kernel sources soon, but I really need some time off, I’ve spent most of my free time since Thanksgiving on this current source tree.

Changelog (since 15 Jan 11):
Hybrid Adaptive Voltage Scaling (HAVS) with sysfs vdd interface working 100%

SVS sysfs interface file for VDD: /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
HAVS sysfs interface file for VDD: /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs
It’s mostly the same code, but for scripting purposes I named them different
Only one will appear, not both

Sped up lock screen on ALL, damn HTC and Android fdearlysuspend
Fixed some earlysuspend issues
Fixed some wakelock issues
Updated WiMax drivers, ooops, forgot that in the EVO-MR3 update
Fixed a findbit problem

I had updated this to the glacier tree, which doesn’t work as well on our phones

Beta Kernel BRAVO BFS 21 Jan 11 (635 downloads)
Beta Kernel BRAVO BFS HAVS 21 Jan 11 (612 downloads)
Beta Kernel BRAVO CFS 21 Jan 11 (444 downloads)
Beta Kernel BRAVO CFS HAVS 21 Jan 11 (503 downloads)
Beta Kernel EVO BFS 21 Jan 11 (620 downloads)
Beta Kernel EVO BFS HAVS 21 Jan 11 (993 downloads)
Beta Kernel EVO CFS 21 Jan 11 (841 downloads)
Beta Kernel EVO CFS HAVS 21 Jan 11 (2311 downloads)
Beta Kernel INC BFS 21 Jan 11 (585 downloads)
Beta Kernel INC BFS HAVS 21 Jan 11 (1263 downloads)
Beta Kernel INC CFS 21 Jan 11 (461 downloads)
Beta Kernel INC CFS HAVS 21 Jan 11 (687 downloads)



syfs VDD Interface Usage:
Static Voltage Scaling (SVS):”<freq> <vdd>”

echo “128000 875″ > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels

Hybrid Adaptive Voltage Scaling (HAVS):”<freq> <min_vdd> <max_vdd>”
echo “128000 850 900” > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs

94 Comments so far. Join the Conversation

Beta Kernel 15 Jan 11

Posted January 15, 2011 By Ziggy471

NOTE1: If you’re having problems, please uninstall/disable SetCPU and any init scripts first. A lot of the issues are OC related. If everything works fine after doing that, slowly start over-clocking, if not, please post. Once the problem speed is found, report it, but most likely, it’s a voltage issue, not all phones/processors are equal. Since these kernels have snq-‘s VDD sysfs interface, you can modify the VDD levels yourself. If there are any Java developers that would like to tackle the task of writing a program to assist, please do, I’ll help as much as I can.

NOTE2: If you post a problem, please include a valid email address, only myself and Mr. X can see them. For those that have had issues in the past, you can attest to the fact that I’m pretty good about emailing people to help work the issues out. Also when posting, please include the following: platform (Bravo/Evo/Inc), hardware revision if known, ROM and whether it’s Sense/Desire Z port/AOSP Froyo/AOSP Gingerbread, and OC settings. This just makes my job easier when attempting to help.

Change Log:
Updated to
Tweaked smartass some more
Broadcom bluetooth low power driver
Lowered minimum vdd to 825 for further testing
Fixed Bravo camera, now 5MP
Audio Boost for all
Updated BFS to version 363
Fixed out of memory problem when copying large files to a mounted SD card
Hopefully fixed CFS issues
More code clean-up

Full Feature List:(Or as close to it as this old guy can get)
Frankenstein of Inc-MR3/Bravo/Evo-MR3/Glacier/Legend/Vision/Ace source trees
Moved source tree as close to Mainline as possible
Updated to
Evo/Inc Atmel 3/5 Multi-point Touch
Evo WiMax support – see sturmen, I added it to the list
LZMA Kernel compression
Automatic Process Group scheduling
BFQ IO Scheduler
Interactive Governor
Smartass Governor (Default)

fixed sysfs interface
added Kconfig options for all settings
Defaults to 128-245Mhz screen off
Defaults to profile max when screen turns on, reduces lag

Overclockable to 1.22Ghz, default 128-998Mhz
ck2 patchset
snq-‘s VDD sysfs interface

modified for all platforms, vice just the Bravo
Moved the min/max settings to Kconfig options
825-1400mV VDD range, 925mV(128Mhz)-1400mV(1.22Ghz) in acpu table

50K Sampling for conservative governor
AOSP support, yeah I know doesn’t work on all yet
Enabled and fixed rndis for wired tether
disabled HTC’s perflock
SLUB Unqueued allocator
All debugging turned off
All tracing turned off
Swap turned on
Static voltage scaling, no HAVS, not until I modify the VDD sysfs interface to work nicely with it
Absolutely no modifications to htc_battery, other than HTC updates

Quadrant scores (since some think that’s important, lol)
My phone (Inc/Uber-Z 2.0/998Mhz/BFS kernel)

Custom (CPU/Memory) 1475
Full 1675

My phone (Inc/Uber-Z 2.0/1.152Ghz/BFS kernel)

Custom (CPU/Memory) 1575
Full 1875

BETA Kernel Bravo BFS 15 Jan 11 (419 downloads)
BETA Kernel Bravo CFS 15 Jan 11 (399 downloads)
BETA Kernel Evo BFS 15 Jan 11 (694 downloads)
BETA Kernel EVO CFS 15 Jan 11 (814 downloads)
BETA Kernel Inc BFS 15 Jan 11 (650 downloads)
BETA Kernel Inc CFS 15 Jan 11 (393 downloads)



Modifications I’ve done to my phone
Setup and Enable Swap partition
I used gparted to re-partition my SD card to @ 15G FAT/1G ext3/100MB swap.


/dev/block/mmcblk1p3    none    swap    sw    0    0


swapon -a

Drop caches on screen off
I know, not always a good idea, but I discovered this while working on the out of memory when copying files to a mounted SD card. vfs_cache_pressure wasn’t cleaning the caches as quickly as it should, hence drop_caches method.

I still recommend using QtADB or Droid Explorer instead of mounting the SD card to the computer.


(while [ 1 ]
AWAKE=`cat /sys/power/wait_for_fb_wake`
if [ $AWAKE = "awake" ]; then
SLEEPING=`cat /sys/power/wait_for_fb_sleep`
if [ $SLEEPING = "sleeping" ]; then
echo 3 > /proc/sys/vm/drop_caches
done &)

Example of an init script to set VDD levels on boot
Note: Make sure you test the voltages extensively prior to setting up an init script. If you are using the kernel as default, and not changing the governor, then 128 and 245 are the important ones to play with, since your screen is off more than on. Finding the sweet spot for those will save alot of power in the long run. My phone does great at 875 for both.


if [ -e /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels ]; then
echo ’128000 875′ > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo ’245000 875′ > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels

Programs I’ve installed to help
Set to turn on airplane mode and silent mode between 2100-0425 weekdays and 2200-0655 weekends, alarm goes off at 0430 weekdays and 0700 weekends. All mail and messages are there when I wake up. If anyone needs to call me during those times, they can use my home phone. Also it’s setup to reboot the phone every morning at 3am, helps with that phantom hangup on the Desire Z ports.

Auto-wifi enable
Setup to turn on wifi as I approach home and work, since 3G coverage in both places SUCK!!!!!

ES Task Manager
Setup to kill most processes on screen off, set it to ignore the important ones.

System Panel
Setup to monitor. Great tool to help figure out what’s killing batteries or using all the resources.

Titanium Backup
Setup to backup all new and newer M/W/F, and everything T/Th/Sa. Figured the phone needs Sundays off.

Awesome program to copy files to/from phone without having to mount the phone to the computer.

80 Comments so far. Join the Conversation

My thoughts on Over-charging Batteries

Posted January 2, 2011 By Ziggy471

For those that don’t know me personally, I work for the government on special projects, and we’ll just leave it at that. However, in the course of normal work, we talked in depth to a National Lab in regards to batteries. One of the discussions was charging. I can’t post the actual info I got from them, however, here is a good stand in:

This is an except from here:
No trickle charge is applied because lithium-ion is unable to absorb overcharge. A continuous trickle charge above 4.05V/cell would causes plating of metallic lithium that could lead to instabilities and compromise safety. Instead, a brief topping charge is provided to compensate for the small self-discharge the battery and its protective circuit consume. … Typically, the charge kicks in when the open terminal voltage drops to 4.05V/cell and turns off at a high 4.20V/cell.

There is a whole lot more info on that site, but I’ll sum up the excerpt, if you continually charge a Lithium Ion battery, it will degrade, and worst case explode, but hey, at least it looks cool when it does.

Just don’t end up like others have, for example, a Chinese man who took his phone off the charger, put it in his pocket, and then it exploded.  To read a little more about that, check out EnGadget, if you want to see the phone, Tech-Ex.  Here’s another one, no one was killed, but it burst into flames, over on PCWorld.

I’m not sure if those were good factory batteries or the cheap Chinese knock offs, but either way, if you decide to assume the risk, that’s your decision.  However, my decision is NOT to hack the battery code.

I hope this explains why I have not or WILL NOT modify the battery code.


23 Comments so far. Join the Conversation

Beta Kernel 2 Jan 11

Posted January 2, 2011 By Ziggy471

Sorry this wasn’t released on New Years Eve, ran into some issues on the INC, and since that’s my phone, it delayed everything.

First off, thanks to my private beta testers, you guys are awesome.  Evo rev 4 hardware is now supported, both cameras work just fine, thanks to Virus for verifying that one.

Bravo has not been tested, my Canadian testers are MIA, probably celebrated the new year too much.

It has been reported that BFS DOES NOT WORK on EVO rev 4, so unless you have success with it, then don’t bother posting.

Evo MR3 updates, both cameras on HW rev 4 work
Sense and AOSP support in all kernels
Misc updates from the EVO MR3
TUN included in the kernel now, no module required
swap enabled
VDD levels expanded to 850-1400, Calkulin wanted to test min voltage at lower clock speeds
NILFS2 compiled in for those that wanted it
More updates from glacier

BETA Kernel Bravo BFS 2 Jan 11 (458 downloads)
BETA Kernel Bravo CFS 2 Jan 11 (561 downloads)
BETA Kernel Evo BFS 2 Jan 11 (554 downloads)
BETA Kernel Evo CFS 2 Jan 11 (1144 downloads)
BETA Kernel Inc BFS 2 Jan 11 (788 downloads)
BETA Kernel Inc CFS 2 Jan 11 (594 downloads)


83 Comments so far. Join the Conversation

Beta Kernel 19 Dec 10

Posted December 19, 2010 By Ziggy471

This should be the last public beta prior to official posting.

Updated BCM4329 wifi drivers to the latest from glacier
Evo/Inc Updated Atmel drivers to the latest from glacier

Evo/Inc have had the 3/5 point multi-touch enabled for some time. I have not modified the board files, since there are different versions of the controllers, instead I choose to use ffolks mod of the atmel driver, same as toast and netarchy.

BETA Kernel Bravo BFS 19 Dec 10 (570 downloads)
BETA Kernel Bravo CFS 19 Dec 10 (428 downloads)
BETA Kernel Evo BFS 19 Dec 10 (525 downloads)
BETA Kernel Evo CFS 19 Dec 10 (821 downloads)
BETA Kernel Inc BFS 19 Dec 10 (660 downloads)
BETA Kernel Inc CFS 19 Dec 10 (480 downloads)


74 Comments so far. Join the Conversation

Beta Kernel 17 Dec 10

Posted December 18, 2010 By Ziggy471

Updated Android USB Gadget drivers, Thanks Freddie for pointing that one out and testing the fix
Finally built BFS kernels

BETA Kernel Bravo BFS 17 Dec 10 (330 downloads)
BETA Kernel Bravo CFS 17 Dec 10 (333 downloads)
BETA Kernel Evo BFS 17 Dec 10 (427 downloads)
BETA Kernel Evo CFS 17 Dec 10 (503 downloads)
BETA Kernel Inc BFS 17 Dec 10 (355 downloads)
BETA Kernel Inc CFS 17 Dec 10 (320 downloads)


27 Comments so far. Join the Conversation

Beta Kernel 14 Dec 10

Posted December 14, 2010 By Ziggy471

Disclaimer: I’m not responsible for any damage you may do to your phone by installing this

WARNING: I’m still considering this a BETA Test, it’s just a public beta. There may still be bugs left in the kernels from all the work I’ve done on them. I think I’ve caught them all, but I’m only human.

If this beta goes good, which it should, then I’ll clean up the code and get it up on github, but until then, please don’t update the XDA threads, this is just a public beta. If all reports are good, then I’ll do fresh builds and do an official release this weekend.

Started again from scratch with the HTC INC MR3 source tree
Added BRAVO/EVO support
Cleaned up majority of the compiler warnings, only a couple left

Most clean ups came from the glacier tree, at least HTC is trying

Moved the source tree as close to mainline as possible
Updated to
EVO 3/5 point multi-touch mod
Kernel LZMA support (smaller kernels)
Automatic process group scheduling
BFQ IO Scheduler (default)
Interactive Governor
Smartass Governor (default)

Moved all the settings from the code to Kconfig
Fixed the sysfs interface for Smartass, all files located in: /sys/devices/system/cpu/cpu0/cpufreq/smartass
Tweaked the settings extensively

Over-clocked to 1.22GHz, may not work for all, to include me

1.22GHz requires 1400mV, so it’ll kill your battery

Under-volted slightly
128MHz enabled
ck2 patch-set to include updating BFS to 357

BFS and CFS co-exist in the source tree nicely now

sqn’s sysfs interface for VDD Levels
50K sampling for the Conservative Governor, since calkulin wanted it
much more that I can’t remember, DL’s rubbing off on me….lol

Download links:
BETA Kernel Bravo CFS 14 Dec 10 (328 downloads)
BETA Kernel Evo CFS 14 Dec 10 (590 downloads)
BETA Kernel Inc CFS 14 Dec 10 (394 downloads)




30 Comments so far. Join the Conversation

BETA Kernel 4 Dec 10

Posted December 4, 2010 By Ziggy471

EDIT: Figured out why smartass wasn’t included, someone screwed up a Makefile, he’ll remain nameless, but it’s fixed now. lol

Since these are BETA, I’m not sure if everything works, so please report back what doesn’t work.  Also, since they’re beta, the source isn’t going to be released just yet, still WAY too much work left to do, so please don’t update these on XDA yet.

Based off the Incredible MR3 source code release.

Combined source tree, no longer maintaining 3 separate trees.
Some updates from the glacier source release, more to come
Interactive (default)
OC to 1.19
sqn-‘s CPU Vdd levels sysfs interface (Modified slightly for the combined tree)
BETA KERNEL Bravo 4 Dec (314 downloads)
BETA KERNEL Evo 4 Dec (454 downloads)
BETA KERNEL Inc 4 Dec (370 downloads)

6 Comments so far. Join the Conversation

Kernel Status Update (1 December)

Posted December 1, 2010 By Ziggy471

First off, I haven’t stopped working on kernels.  I’ve been working on a brand new source tree.  I started with the HTC Incredible MR3 source, added in support for the Evo and Bravo.  Then started taking the source tree as close to the mainline kernel as possible.  After doing that, I’ve patched it up to, and for those of you that do kernel work, THERE WERE NO REJECTS, only about 5 or 6 patches that had offsets.

The benchmarks are amazing, under Incubus’ port of Myn’s 2.2 RLS4, I was scoring 1400-1450 in Quad, 59 in FPS2D, and 29 in NeoCore.  Last night, I flashed IncredibleDoes’ Desire Z port, since the camera is working now, and I’m getting 1550-1600 Quad, 59 FPS2D, and 29 in NeoCore.  Now all of this is WITHOUT ANY TWEAKS, ok there are 2, I patched the Evo FPS tweak, doesn’t effect me, and the SD Card speedup, which is actually from the mainline code, so I’m not really counting that.

Now that I have that nice and stable, I’m starting to implement some of the new improvements from the glacier source tree, I’ve had many failed builds, so I’m slowly implementing those features.  The main ones I’m focusing on are the newer GPU drivers, the ACPU freq/voltage via debugfs.  Also in the newer glacier code, they’ve removed the efuse code from the acpuclock-scorpion.c.

I’m not sure when I’ll be finished with all of this, but I do need some beta testers, the kernel has currently been tested on all three platforms, but since I’ve finally have stable code, and I’m going to be adding more, I need more testers.  Unlike the other kernels I’ve put out, I’m taking this one slow and testing at every step.  As soon as I get all the glacier patches in there, then I’ll start on the other performance patches.


19 Comments so far. Join the Conversation

Ziggy471 Kernels INC/Bravo/EVO (Updated 24 Nov)

Posted November 24, 2010 By Ziggy471

Sorry for not posting this last night, ended up falling asleep on the couch right after diner.
Also, still no AOSP, I’ll work on that over the long weekend.

Updated the HTC addons to Incredible MR3
Tweaked the conservative governor to 50K sampling instead of 200K
Tweaked the smartass governor
Disabled 802.11n, the speed increase wasn’t that much and the power draw was too much
Enabled 128MHz by request

Of course, it’s still OCd, UVd, BFS357, ck2.


[KERNEL] Ziggy471 Bravo 24 Nov (671 downloads)
[KERNEL] Ziggy471 EVO 24 Nov (1902 downloads)
[KERNEL] Ziggy471 Incredible 24 Nov (1128 downloads)
[KERNEL] Ziggy471 Bravo 24 Nov with Batt Fix (842 downloads)

17 Comments so far. Join the Conversation