[Kernel] Badass.v2

Search This thread

alin.p

Senior Member
Mar 2, 2012
739
1,795
Iasi
h24m.jpg

Oh, you'll love this.. :eek: So what actually is different in this kernel?

Core
  • Updated to 2.6.39.1
  • Brain F*ck Scheduler implemented for fast task switching, smooth scrolling and possible power saving
  • Code cleaned and optimized in the right places
  • Updated Android Binder, Ashmem and Timed GPIO drivers from 3.10-rc5 upstream sources
  • Compressed with the fastest compressor on the market: LZ4

Processor
  • Updated CPUFREQ drivers
  • Voltage Control (undervolted by default to a range of stable values)
  • Aggressive Overclock
  • PLL2 Overclock possible inside the app
  • Updated all the governors to their latest versions
  • Zen Governor written exclusively for our SoC

Zen
  • Borrows part of its scaling logic from SmartassV2
  • Adds Zen Dynamics
    • This feature makes the governor's parameters completely dynamic. The parameters change by themselves based on various system information (cpu load, suspended state etc.) This ensures that the governor will not bump to high frequencies when it is not needed, and that it will provide enough computational power in high workload cases.
  • Performance Bias parameter
    • This is a simple number between 0 and 15 and the only tunable parameter of the Zen governor. When this is changed every other parameter is recalculated through different formulas based on this value. A higher value will make your phone snappier, at the cost of some battery life and viceversa.
  • TouchPulse and SweepPulse interfaces
    • TouchPulse is the updated and much more accurate version of the older BoostPulse. This works by giving a slight boost on user input (key or touch).
    • SweepPulse shoots the CPU frequency to the maximum value when a Sweep function is activated to ensure best responsivity. Don't worry, this happens very fast, so no battery life is wasted in the process.
  • Suspend profile
    • When the screen is turned off, the governor keeps the power usage at minimum by re-tuning its parameters

Memory
  • LowMemoryKiller updated from 3.10-rc5 upstream sources
  • LMK Whitelist
    • This is a list of apps which will never be killed by the system, unless you do it intentionally.
    • I didn't have time to implement a better way for adding apps to this list, so I'll explain the primitive and only usable way right now.
    • In /system/etc/Badass you will find a file called whitelist. This file can only contain apps in java class path form, separated by commas. Like this:
      • com.touchtype.swiftkey, org.adw.launcher, com.whatever.app
    • All the apps that you add to this list, will be written to the LowMemoryKiller at every boot.
  • LMK Aggressivity: this parameter makes app-killing more or less aggressive. It can be controlled inside the app.
  • Latest ZRam driver with LZ4 compression (activated at boot so you won't have to bother)

Sweep functions
  • When the screen is off...
    • Sweep2Wake
      • This gesture wakes the phone by sliding your finger from left to right in the middle of the screen
      • Its sensitivity is controlled by a single parameter (factor) which can be modified inside the app
    • DoubleTap2[Wake/Play/Pause]
      • This gesture wakes the phone with a double tap on the screen if the lock timeout of 5 seconds hasn't passed yet. If the timeout has passed, double tapping the screen will Play/Pause the music.
      • The Media Control feature (Play/Pause) can be disabled, making DoubleTap2Wake work even after the lock timeout has passed.
    • Pocket Keyguard
      • This feature prevents accidental unlocks when the phone is inside your pocket.
  • When the screen is on...
    • Sweep2Lock
    • Sweep4Menu
    • SweepKeys
  • All these functions work by swiping up from the first 3 pixels at the bottom of the screen(deadzone).
  • The Deadzone and the Sweep sensitivity are changeable in the app.

twy.png

Internet
  • Westwood+ TCP Congestions Algorithm
  • Adaptive RED net scheduler backported from 3.4 upstream sources
  • Congestion window values tweaked
  • TCP Proportional Rate Reduction

Performance
  • Zen and ROW I/O schedulers
  • Triple Buffering
  • TinyRCU
  • Dynamic Filesync
  • Using the 20-50x faster frandom generator instead of the default random.
  • Never depleting entropy using Haveged and some new kernel code.
  • Dynamically changing kernel values based on suspend profiles (writeback ratios, cache pressure etc)
  • System cleaning every 3 days:
    • Zipalign every apk
    • Vacuum and Reindex every SQLite database
    • Clean the garbage data created by the system
    • Clean app caches
  • SpeedMod (disable kernel debugging)
  • Remove 98% of the active debugging code
  • USB Fast Charge

Native Multitask Enhancer
  • Replace services.jar Supercharging with a more native approach
    • Make Home app unkillable
    • Raise PreviousApp priority to make task switching faster
  • Handle CPU time allowed for the foreground app
  • Raise priority of the following processes
    • Kernel Threads
    • ALSA driver (audio playback)
    • Keyboard
    • SystemUI
  • Restrict resources used by the media scanner


Dev's last words (a.k.a. read this carefully before saying anything stupid)
  • This is a stable version and I call it final. I won't update it, unless there are some major bugs like setting phones on fire, giving them artificial intelligence or sh*t like that.
  • DON'T USE ANY OTHER TWEAK ON THIS KERNEL. These tweaks include, but are not limited to:
    • Performance Pack
    • Fly-On Mod
    • CrossBreeder
    • I/O Tweaks
    • V6 Supercharger
    • Whatever else with a cool name which has the words script, pack or mod in it
  • Don't get me wrong, these mods are good (most of them), but what's good is already included in the kernel itself
  • Use Greenify. It is an awesome app, and it does its job very well. I couldn't fully replicate its' features inside the kernel because I don't have access to Android APIs.
  • The first boot will be slow, due to the zipaligning and SQLite optimizing. Don't freakin' panic. This will happen only once in three days.
  • If you feel that the system is slow with the kernel, raise the Performance Bias, the LMK Aggressivity and maybe your max CPU frequency. The default values are optimized for ICS, not JB. Play with those values until you find that sweet spot.
  • Change your damn Superuser app. Use SuperSU or an insecure SU binary. The original SU binaries found on ROMs are freakin' slow nowadays.
  • Even better, use ICS. JellyBean is not for our low-end phones. But, your choice..
  • The key settings for the SweepKeys are ROM dependant. For example Recents SweepKey might not work on some JB ROMs. I can't do anything to fix this.
  • Don't be lazy. I'm here to help, but please show me that you've made some effort on the research for your questions.

And the thanks go to..
  • Androidarmv6 Team
  • Erikcas
  • psyke
  • A_U
  • Franco
  • Boype
  • Benee
  • AOKP Team
  • Paul Reioux (Faux)
  • Stratosk
  • zeppelinrox
  • Ezekeel

Downloads

Installation
  • Boot into recovery
  • Wipe data
  • Re-flash your current ROM to avoid conflicts
  • Flash the appropriate kernel zip
  • Reboot and wait 5-10 minutes for the first boot to complete
  • Use the integrated app to control the kernel

Ramdisk sources:
Ramdisk-tass

XDA:DevDB Information
Badass.v2, a Kernel for the Samsung Galaxy Mini

Contributors
alin.p
Kernel Special Features: Sweep2Wake, DoubleTap2Wake, Native MultitaskEnhancer, Brain F*ck Scheduler

Version Information
Status: Stable

Created 2013-09-27
Last Updated 2013-09-27
 

alin.p

Senior Member
Mar 2, 2012
739
1,795
Iasi
Reserved

Hey guys. I will leave my town in 2 hours and I won't have access to a computer for at least one month. I will be able to respond from my Mini, but I surely won't be able to fix any bugs that might appear.

Until then, take care :)
 
Last edited:

XDRdaniel

Senior Member
Feb 27, 2013
992
603
Havant
Xiaomi Mi 11 Ultra
You did it... it's happening :))

---------- Post added at 03:15 AM ---------- Previous post was at 02:28 AM ----------

Ummmm.... what can you tell me about performance bias? I'm not familiar with this term...

Sent from my GT-S5570 using xda app-developers app
 

alin.p

Senior Member
Mar 2, 2012
739
1,795
Iasi
You did it... it's happening :))

---------- Post added at 03:15 AM ---------- Previous post was at 02:28 AM ----------

Ummmm.... what can you tell me about performance bias? I'm not familiar with this term...

Sent from my GT-S5570 using xda app-developers app

Please read the whole thread before asking. Everything is written there. I know I could simply tell you what that term means, but I need people to read everything. :)
I don't have time to answer the same questions over and over again.
 
  • Like
Reactions: Sagar Deshpande

XDRdaniel

Senior Member
Feb 27, 2013
992
603
Havant
Xiaomi Mi 11 Ultra
First impression: insanely fast
But a minute after boot, bad ass control crashes and all sweep2things stop working. I rebooted a few times and no change. So, i replaced superuser with supersu. Again after several reboots, control app keeps crashing thus stopping all sweep2things... to reuse them I have to reboot.

Steps I followed:
Wipe data and cache
Format system
install cm9.2 plus from erikcas
Install badass kernel v2 (for cm9.2)

I will reflash everything again and hope for better...
 

arpitkh96

Senior Member
Feb 17, 2012
1,156
645
27
panipat
First impression: insanely fast
But a minute after boot, bad ass control crashes and all sweep2things stop working. I rebooted a few times and no change. So, i replaced superuser with supersu. Again after several reboots, control app keeps crashing thus stopping all sweep2things... to reuse them I have to reboot.

Steps I followed:
Wipe data and cache
Format system
install cm9.2 plus from erikcas
Install badass kernel v2 (for cm9.2)

I will reflash everything again and hope for better...

Not for me.app crashes only if it do not get su access in required time.
Otherwise it is awesome.yippe this kernel solves the problem of softkeys
Edit-Extreme right and left keys dont work for me(sweep4menu..lock)
Sent from my GT-S5570 using xda premium
 
Last edited:

alin.p

Senior Member
Mar 2, 2012
739
1,795
Iasi
My own port tw 5
Edit-menu is working after disable and enable
Edit-one think i want to ask.would these keys be disabled while playing games
Sent from my GT-S5570 using xda premium

As I said, these keys are ROM dependant. If your ROM has different key layouts, some keys won't work as expected. I'm using a modified ICS keylayout but I can't make it universal.

I wish I could disable them in some cases (keyboard, status bar expanded, games) but the kernel doesn't have access to android APIs and can't distinguish between the applications.





I reflashed rom and kernel and the problem persisted so i deleted the app :D performance is still here and sweep2things are working.

The kernel is stable, but the app has some problems. I'm not a good Java programmer, I did my best to make it work in normal cases. I never experienced su problems with the app because I have a binary that grants su permission instantly without my interaction. Install SuperSU and set it to always grant permission to get rid of this problem.
 
  • Like
Reactions: arpitkh96

ast00

Senior Member
Apr 29, 2012
3,031
677
The time has arrived... Let's ROCK!

Sent from my GT-S5570 using xda premium
 

Masrepus

Senior Member
Feb 12, 2013
767
99
Yeah @alin.p great u finally did it!!

---------------------------------
Phone : Samsung Galaxy Mini S5570
OS:
•AOSP ICS Touchwiz V5 by A_U
•Android 4.0.4
•Baseband XWKS2
•Kernel: 2.6.37.6 Badass v1.9 by alin.p
•Recovery CWM v4.0.0.5
Mods:
PureAudio, Mounts2SD, ODEX through Universal ODEX script, AdBlock by AdAway
---------------------------------

Gesendet von Tapatalk 4 beta
 

Rajesh_m

Senior Member
May 24, 2013
1,122
298
Kerala
Redmi Note 10 Pro
Well,after a few hours of usage,my impression is too good :) now my phone is really snappy.. multitasking works better than before.. my only concern is sweep2wake. It works well if the phone is not being idle for so long. But it didnt respond well when the phone is in idle for so long. Other sweep functions works perfect :) havent tried the battery life though, but till now its good :)

One suggestion to all: Do a fresh rom install,and then install Badass V2.. :)
 

Charlie

Senior Member
Nov 7, 2012
406
129
Thessaloniki
OnePlus 8T
Well,after a few hours of usage,my impression is too good :) now my phone is really snappy.. multitasking works better than before.. my only concern is sweep2wake. It works well if the phone is not being idle for so long. But it didnt respond well when the phone is in idle for so long. Other sweep functions works perfect :) havent tried the battery life though, but till now its good :)

One suggestion to all: Do a fresh rom install,and then install Badass V2.. :)

I didnt do a fresh rom install, because i have so many apps im lazy to backup them.But the badass works perfectly i didnt notice a problem;)
 

piterdemon

Senior Member
Apr 13, 2011
661
183
28
Gdańsk
Well,after a few hours of usage,my impression is too good :) now my phone is really snappy.. multitasking works better than before.. my only concern is sweep2wake. It works well if the phone is not being idle for so long. But it didnt respond well when the phone is in idle for so long. Other sweep functions works perfect :) havent tried the battery life though, but till now its good :)

One suggestion to all: Do a fresh rom install,and then install Badass V2.. :)

I do fresh install on cm10.1 and have the same like You sweep2wake doesnt responsive for long time blocked screen but i have solution for that, cover proxomity sensor for 1sec and then try sweep2wake for me work perfect :)

wytapatano z Ainol Novo 7 Fire PA 3.99
 
  • Like
Reactions: A_U

Top Liked Posts

  • There are no posts matching your filters.
  • 65
    h24m.jpg

    Oh, you'll love this.. :eek: So what actually is different in this kernel?

    Core
    • Updated to 2.6.39.1
    • Brain F*ck Scheduler implemented for fast task switching, smooth scrolling and possible power saving
    • Code cleaned and optimized in the right places
    • Updated Android Binder, Ashmem and Timed GPIO drivers from 3.10-rc5 upstream sources
    • Compressed with the fastest compressor on the market: LZ4

    Processor
    • Updated CPUFREQ drivers
    • Voltage Control (undervolted by default to a range of stable values)
    • Aggressive Overclock
    • PLL2 Overclock possible inside the app
    • Updated all the governors to their latest versions
    • Zen Governor written exclusively for our SoC

    Zen
    • Borrows part of its scaling logic from SmartassV2
    • Adds Zen Dynamics
      • This feature makes the governor's parameters completely dynamic. The parameters change by themselves based on various system information (cpu load, suspended state etc.) This ensures that the governor will not bump to high frequencies when it is not needed, and that it will provide enough computational power in high workload cases.
    • Performance Bias parameter
      • This is a simple number between 0 and 15 and the only tunable parameter of the Zen governor. When this is changed every other parameter is recalculated through different formulas based on this value. A higher value will make your phone snappier, at the cost of some battery life and viceversa.
    • TouchPulse and SweepPulse interfaces
      • TouchPulse is the updated and much more accurate version of the older BoostPulse. This works by giving a slight boost on user input (key or touch).
      • SweepPulse shoots the CPU frequency to the maximum value when a Sweep function is activated to ensure best responsivity. Don't worry, this happens very fast, so no battery life is wasted in the process.
    • Suspend profile
      • When the screen is turned off, the governor keeps the power usage at minimum by re-tuning its parameters

    Memory
    • LowMemoryKiller updated from 3.10-rc5 upstream sources
    • LMK Whitelist
      • This is a list of apps which will never be killed by the system, unless you do it intentionally.
      • I didn't have time to implement a better way for adding apps to this list, so I'll explain the primitive and only usable way right now.
      • In /system/etc/Badass you will find a file called whitelist. This file can only contain apps in java class path form, separated by commas. Like this:
        • com.touchtype.swiftkey, org.adw.launcher, com.whatever.app
      • All the apps that you add to this list, will be written to the LowMemoryKiller at every boot.
    • LMK Aggressivity: this parameter makes app-killing more or less aggressive. It can be controlled inside the app.
    • Latest ZRam driver with LZ4 compression (activated at boot so you won't have to bother)

    Sweep functions
    • When the screen is off...
      • Sweep2Wake
        • This gesture wakes the phone by sliding your finger from left to right in the middle of the screen
        • Its sensitivity is controlled by a single parameter (factor) which can be modified inside the app
      • DoubleTap2[Wake/Play/Pause]
        • This gesture wakes the phone with a double tap on the screen if the lock timeout of 5 seconds hasn't passed yet. If the timeout has passed, double tapping the screen will Play/Pause the music.
        • The Media Control feature (Play/Pause) can be disabled, making DoubleTap2Wake work even after the lock timeout has passed.
      • Pocket Keyguard
        • This feature prevents accidental unlocks when the phone is inside your pocket.
    • When the screen is on...
      • Sweep2Lock
      • Sweep4Menu
      • SweepKeys
    • All these functions work by swiping up from the first 3 pixels at the bottom of the screen(deadzone).
    • The Deadzone and the Sweep sensitivity are changeable in the app.

    twy.png

    Internet
    • Westwood+ TCP Congestions Algorithm
    • Adaptive RED net scheduler backported from 3.4 upstream sources
    • Congestion window values tweaked
    • TCP Proportional Rate Reduction

    Performance
    • Zen and ROW I/O schedulers
    • Triple Buffering
    • TinyRCU
    • Dynamic Filesync
    • Using the 20-50x faster frandom generator instead of the default random.
    • Never depleting entropy using Haveged and some new kernel code.
    • Dynamically changing kernel values based on suspend profiles (writeback ratios, cache pressure etc)
    • System cleaning every 3 days:
      • Zipalign every apk
      • Vacuum and Reindex every SQLite database
      • Clean the garbage data created by the system
      • Clean app caches
    • SpeedMod (disable kernel debugging)
    • Remove 98% of the active debugging code
    • USB Fast Charge

    Native Multitask Enhancer
    • Replace services.jar Supercharging with a more native approach
      • Make Home app unkillable
      • Raise PreviousApp priority to make task switching faster
    • Handle CPU time allowed for the foreground app
    • Raise priority of the following processes
      • Kernel Threads
      • ALSA driver (audio playback)
      • Keyboard
      • SystemUI
    • Restrict resources used by the media scanner


    Dev's last words (a.k.a. read this carefully before saying anything stupid)
    • This is a stable version and I call it final. I won't update it, unless there are some major bugs like setting phones on fire, giving them artificial intelligence or sh*t like that.
    • DON'T USE ANY OTHER TWEAK ON THIS KERNEL. These tweaks include, but are not limited to:
      • Performance Pack
      • Fly-On Mod
      • CrossBreeder
      • I/O Tweaks
      • V6 Supercharger
      • Whatever else with a cool name which has the words script, pack or mod in it
    • Don't get me wrong, these mods are good (most of them), but what's good is already included in the kernel itself
    • Use Greenify. It is an awesome app, and it does its job very well. I couldn't fully replicate its' features inside the kernel because I don't have access to Android APIs.
    • The first boot will be slow, due to the zipaligning and SQLite optimizing. Don't freakin' panic. This will happen only once in three days.
    • If you feel that the system is slow with the kernel, raise the Performance Bias, the LMK Aggressivity and maybe your max CPU frequency. The default values are optimized for ICS, not JB. Play with those values until you find that sweet spot.
    • Change your damn Superuser app. Use SuperSU or an insecure SU binary. The original SU binaries found on ROMs are freakin' slow nowadays.
    • Even better, use ICS. JellyBean is not for our low-end phones. But, your choice..
    • The key settings for the SweepKeys are ROM dependant. For example Recents SweepKey might not work on some JB ROMs. I can't do anything to fix this.
    • Don't be lazy. I'm here to help, but please show me that you've made some effort on the research for your questions.

    And the thanks go to..
    • Androidarmv6 Team
    • Erikcas
    • psyke
    • A_U
    • Franco
    • Boype
    • Benee
    • AOKP Team
    • Paul Reioux (Faux)
    • Stratosk
    • zeppelinrox
    • Ezekeel

    Downloads

    Installation
    • Boot into recovery
    • Wipe data
    • Re-flash your current ROM to avoid conflicts
    • Flash the appropriate kernel zip
    • Reboot and wait 5-10 minutes for the first boot to complete
    • Use the integrated app to control the kernel

    Ramdisk sources:
    Ramdisk-tass

    XDA:DevDB Information
    Badass.v2, a Kernel for the Samsung Galaxy Mini

    Contributors
    alin.p
    Kernel Special Features: Sweep2Wake, DoubleTap2Wake, Native MultitaskEnhancer, Brain F*ck Scheduler

    Version Information
    Status: Stable

    Created 2013-09-27
    Last Updated 2013-09-27
    13
    Reserved

    Hey guys. I will leave my town in 2 hours and I won't have access to a computer for at least one month. I will be able to respond from my Mini, but I surely won't be able to fix any bugs that might appear.

    Until then, take care :)
    11
    I can't unlock my phone anymore with the Sweeps features :(
    (I'm on AOKP JB)
    I'll wait the new stable revision, alin, could you make a guide to use all the new stuffs?

    Every kernel feature is working and is stable. There's no revision to be done. If something seems not to work, it is because of the app.


    Guides are all the in the OP. Read that goddamn huge post and play more with the kernel. It took me a week to get used to the Sweep features. At first they seem dull and buggy, but it's not a code problem. The algorithm is flawless, but when the phone reaches a very deep sleep state and some other task steals the cpu time allowed for the proximity sensor, that's when sweep doesn't work. Or if the app didn't get SU permission in the required time, it may get some values wrong.
    As you can see, the first problem is a hardware limitation, while the second is a software problem. But the app is written in Java and I'm not that good at it, so you shouldn't expect fixes for this. Instead, take my advice and install an insecure SU binary. Not only it fixes this problem, it can also make root apps work faster.


    U didnt added auto brightness features discussed in older thread?

    Sent from my GT-S5570 using xda premium

    Auto brightness was 98% done. But those 2% were enough to render the feature useless. I didn't know which registers I had to read to get correct lux readings. And without this, obviously, I couldn't calculate the brightness to be adjusted. So I left it out.


    Edit : there is actually a small flaw in the Sweep code. I will probably release a 2.1 with all the fixes I can think about. Until I get my laptop, keep reporting bugs and I will sort out which is a real bug, and which isn't. :)
    But please read the OP entirely before reporting.
    7
    Badass cm10.2

    https://db.tt/YavTqTfg
    Sent from my GT-S5570 using xda premium
    6
    @alin.p , Can we get any updates on v2.1? Are you still working on it? We all know that you are busy with your life,but it would be grateful if you can make a post here :) Thanks :)

    I haven't done any work on the kernel since A_U tested for me a few days ago. I have a ****load of homework and projects and the exams week starts on next Monday, my free time is below zero.

    To be honest, I don't even know what else could I do for the kernel, I fixed every bug possible (even those not reported by the users) and the only new features would be:
    1. S2W finally working on DeepSleep without draining the battery at all
    2. Dividing the screen in two areas so DT2W and DT2Play/Pause can work simultaneously. This means that by double tapping on the upper half of the screen would wake the device, and double tapping on the lower half would control the music player. This also works in DeepSleep without any freeze.
    3. Optimizing Zen governor algorithm for overclocking (this means it still works the same on max 600MHz, it's scaling logic is modified only when max > 600MHz)

    The only problem that A_U reported was battery drain on stand by. This can be caused by tapping the screen while it is off and face-up, as this breaks the DeepSleep for a few seconds to detect touches, or by spikes in the CPU frequency because the governor had a small code flaw.

    The solution for this is simple: the user has to keep the proximity sensor covered anytime he can (in the pocket, keeping the phone face-down etc.)

    This is a compromise I had to do so S2W wouldn't become useless after a few secs of sleep.

    I'll try to find a few hours (this week) to compile the kernel and update the download links, but please don't ask for any other feature, I don't have time for this anymore.