• XDA Forums have been migrated to XenForo. We are aware of several issues including missing threads, logins not working, and more. To discuss, use this thread.

[KERNEL][4.4.3] ★☆ Kangaroo Kernel ☆★ 21 OCT | v072 | 3.4.104

Status
Not open for further replies.

Headless96

New member
Nov 4, 2012
1,055
2,099
0
Cardiff
Got a bit bored so decided to complete Poondog's script as much as I could and made it flashable! .. All you have to do now is download it and flash it, I'm sure everyone can manage that ;)

Right here's what's going on anyway:
Code:
#!/system/bin/sh

#################################################################################################################################################################
#
#  KANGAROO CONTROL SCRIPT
#   BY POONDOG & HEADLESS
#
#################################################################################################################################################################
#
# Wake Up Controls
#
#################################################################################################################################################################

# Vibration Control (Wake Up Controls)
echo 20 > /sys/android_touch/vib_strength

# Enable Sweep2Wake: 0=None, 1=Both, 2=S2S
echo 1 > /sys/android_touch/sweep2wake

# Enable Logo2Menu:
echo 1 > /sys/android_touch/logo2menu

# Enable Double Tap To Wake: 0=Off, 1=Bottom only, 2=Fullscreen
echo 2 > /sys/android_touch/doubletap2wake

# Enable Logo2Wake:
echo 0 > /sys/android_touch/logo2wake

# Enable Pocket Detection:
echo 1 > /sys/android_touch/pocket_detect

#################################################################################################################################################################
#
# CPU & GPU Settings
#
#################################################################################################################################################################

# CPU Governor
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# CPU Max Frequency - Must have pnpmgr disabled!
echo 1728000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

# Min/Max CPUs online: Should stick
chmod 666 /sys/power/pnpmgr/hotplug/mp_min_cpus
echo 1 > /sys/power/pnpmgr/hotplug/mp_min_cpus
chmod 444 /sys/power/pnpmgr/hotplug/mp_min_cpus
chmod 666 /sys/power/pnpmgr/hotplug/mp_max_cpus
echo 4 > /sys/power/pnpmgr/hotplug/mp_max_cpus
chmod 444 /sys/power/pnpmgr/hotplug/mp_max_cpus

# Multicore Power Saving: 0=Off, 1=Medium, 2=Aggressive
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings

# GPU Governor
echo "ondemand" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor

# Max GPU clock:
chmod 666 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
echo 400000000 > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
chmod 444 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

# Voltage control:
#echo "800 800 800 825 875 900 960" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

#################################################################################################################################################################
#
# Thermal settings
#
#################################################################################################################################################################

# Step 1 (Min)
echo 45 > /sys/module/msm_thermal/parameters/temp_min
echo 1350000 > /sys/module/msm_thermal/parameters/temp_min_freq

# Step 2 (Mid)
echo 55 > /sys/module/msm_thermal/parameters/temp_mid
echo 918000 > /sys/module/msm_thermal/parameters/temp_mid_freq

# Step 3 (Max)
echo 70 > /sys/module/msm_thermal/parameters/temp_max
echo 486000 > /sys/module/msm_thermal/parameters/temp_max_freq

#################################################################################################################################################################
#
# Powersave
#
#################################################################################################################################################################

# Powersave Switch
echo 0 > /sys/module/msm_thermal/parameters/powersave

# Powersave Cap
echo 1458000 > /sys/module/msm_thermal/parameters/powersave_freq

#################################################################################################################################################################
#
# Misc Settings
#
#################################################################################################################################################################

# Enable Force Fast Charge:
echo 0 > /sys/kernel/fast_charge/force_fast_charge

# Enable BLN 
echo 0 > /sys/class/leds/button-backlight/blink_buttons

# Vibration Control (General)
echo 2700 > /sys/class/timed_output/vibrator/voltage_level

# IO Scheduler: (In lower case)
echo fiops > /sys/block/mmcblk0/queue/scheduler

# IO Readahead:
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb

# TCP Congestion Control 
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control

# Disable pnpmgr - (Delete # to enable)
#mv /system/bin/pnpmgr /system/bin/pnpmgr.bak

echo " ~ Kangaroo Tweaks Applied! ~  " > /sdcard/Kangaroo.txt;
Everything from poondog's previous script is here but I've also added:
  1. Log file to know if script is working
  2. Thermal Control (from v122+ only!)
  3. Powersave Control (122+ only!)
  4. BLN Control
  5. Vibration Control (General)
  6. Vibration Control (Wake Up Controls)
  7. Sweep Up 2 Wake - Not available anymore (too buggy)
  8. Multicore Power Saving Control
  9. Fixed Min/Max HP Cores
  10. CPU Governor Control
  11. CPU Max Freq Control
  12. GPU Governor Control
  13. Fixed GPU Freq Command - Can change max GPU frequency to 400, 320, 200 and 128mhz!
  14. TCP Congestion Control
  15. Disable Pnpmgr - This option isn't going to happen unless you enable it (delete the # before the 'mv /system.....')
  16. Deletes ElementalX scripts - I think the reason some of you have certain things disabled when they shouldn't be is because you have scipts and stuff left over from ElementalX, so I added in the updater-script to delete these files

Also the principal still stands:

  • 1 to enable a function and 0 to disable unless stated otherwise :)
  • And a # before a line means that line is disabled, to enable that line, delete the #, save file and flash!

Final thing: The values that are enabled/disabled in the init.d script already are like that when flashing the kangaroo kernel. Basically when this script is flashed, you'll notice nothing else enabled that already wasn't, it's up to you to decide which ones you want! :)

Final thing 2: If the script isn't flashing for you, there's 2 things you can try:
  • Check if you have a file called 'busybox' in /sbin/ directory. If you don't update busybox and try reflashing I've changed the script so it doesn't use busybox anymore, if the zip doesn't flash try the method below
  • Extract the script from the zip, put it in /system/etc/init.d/ and give it rwx-rwx-rwx (777) permissions and reboot

Final thing 3: You guys know the score, I'm not responsible for anything that may happen to your phones, nothing should go wrong but nandroid backups just in case guys and gals :D

Final thing 4: Alright guys, there has been too many posts saying 'script nt wrking, pls fix, tried bashing phone on table but no success :confused:' ... And so I've added to the script to create a log file in internal storage called Kangaroo.txt. If this txt file is there on your storage then the script is working and any incompatibilities is down to you (of course ask for help if needed)

Enjoy!
 
Last edited:

poondog

Inactive Recognized Contributor
Dec 11, 2011
14,998
12,950
113
Melbourne
Got a bit bored so decided to complete Poondog's script as much as I could and made it flashable! .. All you have to do now is download it and flash it, I'm sure even the 'noobs' can manage that ;)

Right here's what's going on anyway:
Code:
#!/system/bin/sh

### KANGAROO KERNEL SCRIPT ###
### By Poondog ###

# Enable Force Fast Charge:
echo 0 > /sys/kernel/fast_charge/force_fast_charge

# Enable BLN 
echo 0 > /sys/class/leds/button-backlight/blink_buttons

# Enable Sweep2Wake: 0=None, 1=Both, 2=S2S
echo 1 > /sys/android_touch/sweep2wake

# Enable SweepUp2Wake: (Swipe from Logo upwards)
echo 1 > /sys/android_touch/sweepup2wake

# Enable Logo2Menu:
echo 1 > /sys/android_touch/logo2menu

# Enable Double Tap To Wake: 0=Off, 1=Bottom only, 2=Fullscreen
echo 2 > /sys/android_touch/doubletap2wake

# Enable Logo2Wake:
echo 0 > /sys/android_touch/logo2wake

# Enable Pocket Detection:
echo 1 > /sys/android_touch/pocket_detect

# IO Scheduler: (In lower case)
echo fiops > /sys/block/mmcblk0/queue/scheduler;

# IO Readahead:
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb;

# Min and max CPUs online: not sure if this will stick
echo 1 > /sys/power/pnpmgr/hotplug/mp_min_cpus
echo 4 > /sys/power/pnpmgr/hotplug/mp_max_cpus

# Multicore Power Saving: 0=Off, 1= Medium, 2=Aggressive
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings

# Max GPU clock:
echo 400000000 > sys/power/pnpmgr/sysinfo/gpu_max_clk

# Powersaver:
echo 0 > sys/power/powersave

# Vibration Control
echo 2700 > /sys/class/timed_output/vibrator/voltage_level

# Voltage control: not supported currently
#echo "800 800 800 825 875 900 960" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

# Disable pnpmgr
#mv /system/bin/pnpmgr /system/bin/pnpmgr.bak
Everything from poondog's previous script is here but I've also added:
  1. BLN Control
  2. Vibration Control
  3. Multicore Power Saving Control
  4. Disable Pnpmgr - This option isn't going to happen unless you enable it (delete the # before the 'mv /system.....')
  5. Sweep Up 2 Wake - I don't think poondog made this public but he has the code for it, simply swipe up from the logo and it should turn the screen on! (Logo2Menu must be enabled) ... It's kinda buggy atm, takes 2 tries for me but the options there :p
  6. Delete ElementalX scripts - I think the reason some of you have certain things disabled when they shouldn't be is because you have scipts and stuff left over from ElementalX, so I added in the updater-script to delete these files

Also the principal still stands - 1 to enable a function and 0 to disable unless stated otherwise :)

Enjoy!
You beaut!

Put your name back there :p

A few things

Not sure if the min/max cores will work.. maybe if pnpmgr is disabled it will work cause it seems to reset :p

Does it mean the script will try to rename pnpmgr every time? Oh well :p

Thanks for your help and everything :)

Sent from my HTC One using XDA Premium 4 mobile app
 

Headless96

New member
Nov 4, 2012
1,055
2,099
0
Cardiff
You beaut!

Put your name back there :p

A few things

Not sure if the min/max cores will work.. maybe if pnpmgr is disabled it will work cause it seems to reset :p

Does it mean the script will try to rename pnpmgr every time? Oh well :p

Thanks for your help and everything :)

Sent from my HTC One using XDA Premium 4 mobile app
Haha nah if I put my name there, everyone will be asking for an official zip made just from you! :p

Yeah the min/max thing doesn't work when pnpmgr is enabled

And it'll only rename it once, since when it looks for it again it won't find it and it'll just move on to the next command

Edit: Just worked out how to make the min cores thing stick (I'll leave out max cores cos that's already 4, unless you wanna change it?)

Here's the code:
Code:
chmod 666 /sys/power/pnpmgr/hotplug/mp_min_cpus
echo 1 > /sys/power/pnpmgr/hotplug/mp_min_cpus
chmod 444 /sys/power/pnpmgr/hotplug/mp_min_cpus
Fixed my other post and updated zip, please download again if you already have for the updated files!
 
Last edited:

poondog

Inactive Recognized Contributor
Dec 11, 2011
14,998
12,950
113
Melbourne
Haha nah if I put my name there, everyone will be asking for an official zip made just from you! :p

Yeah the min/max thing doesn't work when pnpmgr is enabled

And it'll only rename it once, since when it looks for it again it won't find it and it'll just move on to the next command

Edit: Just worked out how to make the min cores thing stick (I'll leave out max cores cos that's already 4, unless you wanna change it?)

Here's the code:
Code:
chmod 666 /sys/power/pnpmgr/hotplug/mp_min_cpus
echo 1 > /sys/power/pnpmgr/hotplug/mp_min_cpus
chmod 444 /sys/power/pnpmgr/hotplug/mp_min_cpus
Fixed my other post and updated zip, please download again for the updated files!
True! Just don't let anyone know you did it, I will take all the credit :D

Same thing works for max cpus too?

edit: can you please add in max cpus to your script too, then I can link it in the OP :D
 
Last edited:

herwegan

Guest
Jan 1, 1970
3
1,085
0
Got a bit bored so decided to complete Poondog's script as much as I could and made it flashable! .. All you have to do now is download it and flash it, I'm sure even the 'noobs' can manage that ;)

Right here's what's going on anyway:
Code:
#!/system/bin/sh

### KANGAROO KERNEL SCRIPT ###
### By Poondog ###

# Enable Force Fast Charge:
echo 0 > /sys/kernel/fast_charge/force_fast_charge

# Enable BLN 
echo 0 > /sys/class/leds/button-backlight/blink_buttons

# Enable Sweep2Wake: 0=None, 1=Both, 2=S2S
echo 1 > /sys/android_touch/sweep2wake

# Enable SweepUp2Wake: (Swipe from Logo upwards)
echo 1 > /sys/android_touch/sweepup2wake

# Enable Logo2Menu:
echo 1 > /sys/android_touch/logo2menu

# Enable Double Tap To Wake: 0=Off, 1=Bottom only, 2=Fullscreen
echo 2 > /sys/android_touch/doubletap2wake

# Enable Logo2Wake:
echo 0 > /sys/android_touch/logo2wake

# Enable Pocket Detection:
echo 1 > /sys/android_touch/pocket_detect

# IO Scheduler: (In lower case)
echo fiops > /sys/block/mmcblk0/queue/scheduler;

# IO Readahead:
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb;

# Min CPUs online: Should stick
chmod 666 /sys/power/pnpmgr/hotplug/mp_min_cpus
echo 1 > /sys/power/pnpmgr/hotplug/mp_min_cpus
chmod 444 /sys/power/pnpmgr/hotplug/mp_min_cpus

# Multicore Power Saving: 0=Off, 1=Medium, 2=Aggressive
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings

# Max GPU clock:
echo 400000000 > sys/power/pnpmgr/sysinfo/gpu_max_clk

# Powersaver:
echo 0 > sys/power/powersave

# Vibration Control
echo 2700 > /sys/class/timed_output/vibrator/voltage_level

# Voltage control: not supported currently
#echo "800 800 800 825 875 900 960" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

# Disable pnpmgr
#mv /system/bin/pnpmgr /system/bin/pnpmgr.bak
Everything from poondog's previous script is here but I've also added:
  1. BLN Control
  2. Vibration Control
  3. Multicore Power Saving Control
  4. Fixed Min HP Cores
  5. Disable Pnpmgr - This option isn't going to happen unless you enable it (delete the # before the 'mv /system.....')
  6. Sweep Up 2 Wake - I don't think poondog made this public but he has the code for it, simply swipe up from the logo and it should turn the screen on! (Logo2Menu must be enabled) ... It's kinda buggy atm, takes 2 tries for me but the options there :p
  7. Delete ElementalX scripts - I think the reason some of you have certain things disabled when they shouldn't be is because you have scipts and stuff left over from ElementalX, so I added in the updater-script to delete these files

Also the principal still stands - 1 to enable a function and 0 to disable unless stated otherwise :)

Enjoy!
Haha thank you mate! You're now my officialy recognized poondog zip maker :p
 
  • Like
Reactions: Headless96

Headless96

New member
Nov 4, 2012
1,055
2,099
0
Cardiff
True! Just don't let anyone know you did it, I will take all the credit :D

Same thing works for max cpus too?

edit: can you please add in max cpus to your script too, then I can link it in the OP :D
Done! :D

Guys anyone who's already downloaded it before this post, please download again.. Made some changes to updater-script and fixed the hotplugging command

Should be good to go now!
 
Last edited:

lerx

New member
Feb 27, 2011
203
14
0
Done! :D

Guys anyone who's already downloaded it before this post, please download again.. Made some changes to updater-script and fixed the hotplugging command

Should be good to go now!
Just one more feature and it would be perfect! The option to choose vibration for sweep wake controls :p

Sent from my HTC One using Tapatalk
 

Headless96

New member
Nov 4, 2012
1,055
2,099
0
Cardiff
Just one more feature and it would be perfect! The option to choose vibration for sweep wake controls :p

Sent from my HTC One using Tapatalk
No do it yourself!

... Just kidding, updated my other post, download again :p

The vibration for wake up controls command is disabled by default, delete the # before the command and choose the value you want :)
 

Headless96

New member
Nov 4, 2012
1,055
2,099
0
Cardiff
Init.d script has made it to post #3. Thanks to Headless_monkeyhunta96 for your work :) Hit his thanks button!

edit: I just checked on my Nexus 7, the GPU sits at 320MHz there as well (stock behavior on that)
Bro I just realized, the GPU command in the script doesn't work on it's own like that ... We have to do a similar permission lock like the min/max cores online

Anyways, I fixed the zip, reuploaded and edited my post

Would you mind re-quoting me in the OP to avoid confusion?

Also can you guys please download again (last time I promise :p)
 

poondog

Inactive Recognized Contributor
Dec 11, 2011
14,998
12,950
113
Melbourne
Bro I just realized, the GPU command in the script doesn't work on it's own like that ... We have to do a similar permission lock like the min/max cores online

Anyways, I fixed the zip, reuploaded and edited my post

Would you mind re-quoting me in the OP to avoid confusion?

Also can you guys please download again (last time I promise :p)
yeah ok haha

edit: you might wanna take a look at the top 7 lines of the script too while you're at it ;)
 
Last edited:
  • Like
Reactions: Headless96
Status
Not open for further replies.
Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone