• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [KERNEL][AOSP][2.6.38.2] - Savaged-Zen v1.1.0! [HAVS+CFS/BFS!] UPDATED 4/7!

frenchy714

Android Expert
Nov 11, 2010
3,153
1,957
East Tawas, MI
Like the title says, SavagedZen's kernel has been updated to 1.1.0!

As of version 1.1.0, SBC can now be turned on and off on the fly thanks for the sysfs interface implemented by Brandon. If you'd like to know how to enable/disable it, you can read the documentation for it at: http://forum.xda-developers.com/showpost.php?p=12736026&postcount=2770

Change Log:

1.1.0

Added BATT_OPTIONS sysfs interface to allow runtime toggling of SBC (Brandon)
USB mass storage write speed increased
BFS v376
Starting voltage raised to 925mV for stability

If you want to try it out, here you go:

Savaged-Zen Mirror System
 
Not to get too off topic, but, how's your experience been w/ Kings GB?

Up until a week or so ago, I have had no issues and love it. Been getting random reboots here and there for the last week or so. Nandroid back to Mikfroyo 4.5 and no reboots. Not sure if it is kernel related but I don't see it being a rom issue as it was fine for a while before this started.
 
Upvote 0
Got Kings GB all set up and styling. Flashed this kernel. That is a dead link up there....how do you toggle SBC????

Instructions in this link. Basically:

echo 0 > /sys/kernel/batt_options/sbc/sysctl_batt_sbc (turns sbc off)
echo 1 > /sys/kernel/batt_options/sbc/sysctl_batt_sbc (turns on sbc)

To verify if it's currently on or off, do this first:

cat /sys/kernel/batt_options/sbc/sysctl_batt_sbc

If it's 0, sbc is off; if it's 1, sbc in on.
 
Upvote 0
Can I do that via terminal emulator?

Yes, that's how you have to do it (or from any shell, such as through adb shell or ssh). FYI for those who don't know, sysfs changes are wiped out when you reboot, so you'll have to do this every time you reboot if you don't want sbc. I'm to get it to run at boot with a script from a flashable zip, but it's not working yet. I'll post it here once I have more time to fix it.
 
Upvote 0
I haven't gotten it to work correctly yet. It seems like the init process is different with CM GB or something weird is going on with how sysfs works with this kernel, and the init process. Who knows. I'll figure it out later.

That being said, I did automate the process by making a tasker toggle widget, so if anyone who uses tasker wants it, I'll export it, and post it here. Since they are just tasker tasks, you could even have it enable/disable based on other tasker contexts (use sbc only at night, but not during the day, for example).
 
Upvote 0
I haven't gotten it to work correctly yet. It seems like the init process is different with CM GB or something weird is going on with how sysfs works with this kernel, and the init process. Who knows. I'll figure it out later.

That being said, I did automate the process by making a tasker toggle widget, so if anyone who uses tasker wants it, I'll export it, and post it here. Since they are just tasker tasks, you could even have it enable/disable based on other tasker contexts (use sbc only at night, but not during the day, for example).

That reminds me, I still have to give Tasker a go :D.
 
Upvote 0
Okay, so it turns out my text editor was throwing in control characters that it shouldn't have (think notepad), though it's not supposed to. Whatever. I figured it out, so here is a flashable zip that will disable SBC at each boot.

sbcoff-signed.zip

I would appreciate it if those who don't want SBC would test this, and verify it works consistently (I see no reason why it wouldn't). I tested it with a couple reboots (after actually flashing it), and it worked.

EDIT: Oh, and credit for the actual script itself goes to bbedward of XDA. I had my own, but it wasn't working (my stupid mistake ;)), so by the time I figured that out, I just went ahead and used this one. It's close enough to what I had, but he still deserves credit for this.
 
Upvote 0
Okay, so it turns out my text editor was throwing in control characters that it shouldn't have (think notepad), though it's not supposed to. Whatever. I figured it out, so here is a flashable zip that will disable SBC at each boot.

sbcoff-signed.zip

I would appreciate it if those who don't want SBC would test this, and verify it works consistently (I see no reason why it wouldn't). I tested it with a couple reboots (after actually flashing it), and it worked.

EDIT: Oh, and credit for the actual script itself goes to bbedward of XDA. I had my own, but it wasn't working (my stupid mistake ;)), so by the time I figured that out, I just went ahead and used this one. It's close enough to what I had, but he still deserves credit for this.

First off, thank you Akazabam; secondly, you only have to flash this once, correct?
 
Upvote 0
Right, so, basically, when the phone boots up, it runs a script called init.rc. That script does a bunch of things at startup, such as start interfaces, start some services, etc. etc. One of the things it does is call on something called run-parts. All that is, is a binary that will execute all of the scripts in a particular directory. It's given /system/etc/init.d as an argument, meaning that as part of the startup process, all scripts in the /system/etc/init.d directory are executed in order (that's why you see scripts in there named with numbers - in case they need to run in a particular order). This is how I verified it runs on CM 7, and it may be different on other ROMs, especially Sense ones. Maybe I'll look into that later.

In any case, this flashable zip takes a script that does nothing more than run the known command (echo 0), and places it in /system/etc/init.d. What that means is that each time the phone boots, it will run that command, and turn off SBC.

So, short answer - yes, you only need to flash this once. Obviously, if you reflash the ROM or any other ROM, you'll need to reflash this.
 
  • Like
Reactions: ocnbrze
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones