DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Page 1 of 8 123 ... LastLast
Results 1 to 10 of 79

Thread: new set speed script for bugless!

  1. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #1

    new set speed script for bugless!

    NOTE: BuglessBeast Experimental Froyo 0.2.1 now does automatic Max frequency scaling using the same method I use here! If you just want it to always scale to the max supported and min speed of 250Mhz using the ondemand governor, there is no need to use this script. If you want to adjust the speed and have those changes persist after a reboot, however, read on...

    I wrote a little script to make it easier to adjust the maximum frequency scaling without using SetCPU. USE AT YOUR OWN RISK, THIS IS A WORK IN PROGRESS! That being said, I'm writing it to be as robust as possible, so it shouldn't screw anything up. Let me know if it does, I'll fix it.

    You can use this script to easily switch your maximum and minimum speed, as well as governor.

    To install:
    First, copy setspeed.txt to your sd card. I'm assuming you put it in the root and called it "setspeed.txt"
    Code:
    su
    sh /sdcard/setspeed.txt
    Once you have done this, you can delete the file off the sdcard if you like. On the first run, it will install itself into /system/xbin/setspeed, create links for the setmax, setmin, and setgov commands, and install itself into the startup script install-recovery.sh

    How To Use:
    To set your max speed, type "setmax 600" or "setmax 800" or whatever speed you want. If you type "setmax" by itself, it will list off your available speeds, including the virtual speed of "max", which will automatically determine the maximum supported speed and set that.

    To set your min speed, it's the same as setting the maximum, but with "setmin", and with the virtual speed of "min" in addition to normal speeds.

    To set your governor, type "setgov ondemand" or "setgov conservative". Those are probably the only governors you will want to play with. powersave, performance, and userspace really don't make sense to use on the droid.

    With any of these three settings, your choice will be applied immediately and saved and re-applied on every reboot.

    NOTE: When you are plugged into AC, the Droid will ignore any frequency scaling settings below 500Mhz, so don't be alarmed if it just sits at 500 instead of scaling down to 400,250,125, etc.
    NOTE: You can set unsupported speeds as the minimum. The Droid will scale down to whatever step is equal to or greater than that minimum.
    NOTE: Tested with BB Froyo 0.1, 0.2, and 0.2.1, and it works with all of them

    ChangeLog
    3.2
    Fixed a bug where setmin wasn't working at all
    3.1
    Script has been updated to work with BB 0.3 - the busybox binary was moved to /system/bin
    3.0
    Script is now "setspeed", supports governors, and is easier to use.
    2.0
    Added md5sum check so that new versions will auto-install and overwrite when you install them.
    1.9
    Fixed a bug where filenames that end with a non-integer (ie, things with a .txt extension) won't run. Invalid speeds are now replaced with "600".
    1.8
    Script is now self-installing. speed000 will now set the maximum speed at boot time, rather than storing the maximum speed to set at boot time.
    1.7

    Now allows you to optionally specify a minimum frequency as well, by typing it on the command-line after the script. "speed600 250" will set the max to 600, and the minimum to 250. The minimum will also be restored on a reboot.
    Attached Files
    Last edited by Se7enLC; 06-30-2010 at 10:00 AM.
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  2. Droid
    chadamir's Avatar
    Member #
    71070
    Join Date
    May 2010
    Posts
    38
    Phone
    Enter Current Phone Model Here
    #2
    This is great, but I can't find the /system/xbin/pete file.
  3. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #3
    Quote Originally Posted by chadamir View Post
    This is great, but I can't find the /system/xbin/pete file.
    The BB Froyo release candidate doesn't have that script - previous BB releases do, and I assume future froyo releases will, eventually, as well.
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  4. Developer
    actngrezy's Avatar
    Member #
    49451
    Join Date
    Mar 2010
    Location
    delaware
    Posts
    1,073
    Liked
    32 times
    Phone
    motorola droid
    DroidForums.net Developer
    #4
    Thats awesome. You could help me in my scripting class lol. but im sorry how do you create a symlink. Sorry for the newb question


    Looking for devices to expand p.e.
    Let me know if you have one for sale or to donate.
  5. budmonster
    Guest
    budmonster's Avatar
    #5
    so this doesnt work on froyo yet, correct? could you take the pete script from bb v1.1 and place it in the xbin folder on froyo bb?
  6. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #6
    Quote Originally Posted by budmonster View Post
    so this doesnt work on froyo yet, correct? could you take the pete script from bb v1.1 and place it in the xbin folder on froyo bb?
    It does work on froyo - it just doesn't set the CPU speed on bootup. Setting the max CPU speed in real time works fine - once you run that command, your CPU will be set until the next reboot.

    You could take the pete script from 1.1, but I don't think it will execute on boot. If it did, I suspect pete would have put it there himself :-)

    EDIT: Oh, clever! Pete stuck the contents of his script into install-recovery.sh. That script gets run automatically on every boot, regardless of kernel!

    To apply the change to allow my speedXXX scripts to work, you will want to edit that file. Look for this line:
    Code:
    echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    and replace it with this:
    Code:
    cat /system/etc/bb_scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    Last edited by Se7enLC; 06-10-2010 at 09:49 PM.
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  7. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #7
    Quote Originally Posted by actngrezy View Post
    Thats awesome. You could help me in my scripting class lol. but im sorry how do you create a symlink. Sorry for the newb question
    I had a few examples in the first post right after the part where I said you need to make the symlinks :-)
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
  8. budmonster
    Guest
    budmonster's Avatar
    #8
    Quote Originally Posted by Se7enLC View Post
    Quote Originally Posted by budmonster View Post
    so this doesnt work on froyo yet, correct? could you take the pete script from bb v1.1 and place it in the xbin folder on froyo bb?
    It does work on froyo - it just doesn't set the CPU speed on bootup. Setting the max CPU speed in real time works fine - once you run that command, your CPU will be set until the next reboot.

    You could take the pete script from 1.1, but I don't think it will execute on boot. If it did, I suspect pete would have put it there himself :-)

    EDIT: Oh, clever! Pete stuck the contents of his script into install-recovery.sh. That script gets run automatically on every boot, regardless of kernel!

    To apply the change to allow my speedXXX scripts to work, you will want to edit that file. Look for this line:
    Code:
    echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    and replace it with this:
    Code:
    cat /system/etc/bb_scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    Do you have GTALK? I might need some help on this...

    BTW, what is the benefit of using this rather than just removing Petes script and just using setCPU?
  9. Droid Sensei
    czerdrill's Avatar
    Member #
    22335
    Join Date
    Jan 2010
    Posts
    4,850
    Liked
    103 times
    Phone
    OG Droid UD 3.0 -- GB :)
    #9
    Quote Originally Posted by Se7enLC View Post
    Quote Originally Posted by budmonster View Post
    so this doesnt work on froyo yet, correct? could you take the pete script from bb v1.1 and place it in the xbin folder on froyo bb?
    It does work on froyo - it just doesn't set the CPU speed on bootup. Setting the max CPU speed in real time works fine - once you run that command, your CPU will be set until the next reboot.

    You could take the pete script from 1.1, but I don't think it will execute on boot. If it did, I suspect pete would have put it there himself :-)

    EDIT: Oh, clever! Pete stuck the contents of his script into install-recovery.sh. That script gets run automatically on every boot, regardless of kernel!

    To apply the change to allow my speedXXX scripts to work, you will want to edit that file. Look for this line:
    Code:
    echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    and replace it with this:
    Code:
    cat /system/etc/bb_scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    gotta love grep
    Google Interview Q&A

    Apple CEO, Verizon COO
  10. Droid Ninja
    Se7enLC's Avatar
    Member #
    5148
    Join Date
    Nov 2009
    Posts
    1,263
    Liked
    6 times
    Phone
    Samsung Galaxy Nexus
    #10
    Quote Originally Posted by budmonster View Post
    Do you have GTALK? I might need some help on this...

    BTW, what is the benefit of using this rather than just removing Petes script and just using setCPU?
    I just uploaded a new version to the first post - it will automatically modify the startup script once you run it the first time. How's that for snazzy?

    Honestly, I'm not sure what the benefit really is. SetCPU supposedly uses a lot of unnecessary resources, whereas setting your max scaling frequency on boot uses NO resources.
    Cool CM Tricks
    custom_backup_list.txt - make a list of files in /system that will survive a nightly install (ringtones, notifications, system apps, wallpapers, whatever)
    in Terminal Emulator, set this as your shell command: "/system/xbin/su -c /system/xbin/bash". You get all the features of bash, root access, and you can still use the initial command field for whatever you want (default is adding /data/local/bin to your path)
Page 1 of 8 123 ... LastLast

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. In search of simple script
    By hahn in forum Android Hacks and Help
    Replies: 4
    Last Post: 06-21-2010, 12:51 PM
  2. Script
    By ashin001 in forum Bugless
    Replies: 7
    Last Post: 05-27-2010, 05:06 PM
  3. Enableing script
    By Chris1980 in forum Android Hacks and Help
    Replies: 0
    Last Post: 05-15-2010, 03:52 PM
  4. free50mb script question?
    By solorca in forum Bugless
    Replies: 2
    Last Post: 04-08-2010, 12:11 AM
  5. Bugless Beast 950mHz...no speed difference?
    By Matth3w in forum Android Hacks and Help
    Replies: 51
    Last Post: 02-06-2010, 09:55 PM

Search tags for this page

android command line change cpu speed
,
android init.d set cpu freq on boot
,
android scaling setspeed
,
droid 4 speedscript
,

how to set max freq in android

,

how to set scaling cpu max freq in android

,
scaling setspeed
,
scaling setspeed not taking effect
,

setspeed.txt

,

speed scripts for android

Click on a term to search our site for related topics.

Tags for this Thread

Find us on Google+