SS 4.x - CSM - What Is It?

Discussion in 'ChevyNo1' started by ChevyNo1, Jun 15, 2010.

  1. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    CSM - Custom Startup Manager

    csm allows you to have greater control over what starts up on a system reboot, as well as what runs during the course of the phone's uptime.

    To see the default settings of csm, type 'csm settings':
    ON=true
    DELAY=5
    PERSIST=off
    BACKUPS=5

    To set csm back to default settings, type 'csm defaults'

    To turn all csm processing off, type 'csm off'
    To turn all csm processing on, type 'csm on'

    DELAY - Upon system startup, a list of processes is scanned, and killed if present. There is a sleep of DELAY seconds before that list is checked again. This loop continues until no more of these processes are seen to be running. This means that it is possible that some of your listed processes could still end up running (cooliris.media is notorious). By adjusting the # higher, you are more likely to catch these processes, but you might find it interferes with normal processes (ie listening to music). Adjust accordingly. Change by typing 'csm delay 10' for example.

    PERSIST - There is another list, separate from the above, that is constantly checked, and killed as found. You may or may not find a use for this. Type 'csm persist on' to turn on, and 'csm persist off' to turn off. This also uses the DELAY setting to determine how long to sleep between checking again.

    BACKUPS - future functionality


    Data Files used by CSM (anything you want to 'ignore' preface with a '#')


    # cat /data/chevyno1/csm.am - Activities to start upon bootup

    #android.tether/android.tether.MainActivity


    # cat /data/chevyno1/csm.sh - Apps/scripts to start upon bootup

    #insmod /system/lib/modules/cifs.ko


    # cat /data/chevyno1/stop-once.lst - Apps to be stopped only once
    #com.android.alarmclock


    # cat /data/chevyno1/stop-persist.lst - Persistent kill of apps
    #com.android.alarmclock


    # cat /data/chevyno1/stop.lst - Apps to kill at startup.
    com.cooliris.media
    android.process.media
    com.android.email
    com.motorola.calendar
    com.android.deskclock
    com.android.bluetooth
    com.google.android.apps.uploader
    com.android.voicedialer
    com.google.android.voicesearch
    com.android.calendar
    com.amazon.mp3
    com.android.im
    android.process.im
    #com.android.music
    com.biggu.shopsavvy
    #com.google.android.gm
  2. Aixelsyd
    Offline

    Aixelsyd New Member

    Joined:
    Nov 27, 2009
    Messages:
    487
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Windy City
    Sweetness and nice writeup so we all understand how it works even your other thread you started.

    Oh yea dropped you a quick PM you may want to check out. Info on apps2sd I got passed along to me
  3. mcsinfl
    Offline

    mcsinfl New Member

    Joined:
    Mar 9, 2010
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    0
    Aixelsyd, you understand this??? I'm thinking I need a translation...lol

    actually, i understand the purpose, but a little fuzzy on how to implement
  4. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    Got it - and yep, saw that info already and scripts are coded/tested, and probably released tonite in 4.1. APPS2SD is only a command away :icon_ banana:
  5. Aixelsyd
    Offline

    Aixelsyd New Member

    Joined:
    Nov 27, 2009
    Messages:
    487
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Windy City
    Lol... how fast things travel on the web. gotta luv it....lol. And WOOT!!! can't wait for the release.
  6. roll3r
    Offline

    roll3r New Member

    Joined:
    Jan 13, 2010
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    Any chance of this working on another ROM (Froyo leak 2 stock)? I use Startup Auditor, which doesn't have a delay option to catch things like Gallery (plus runs all the time...). I flashed your ROM just for this feature, but having never run a theme, my brain just couldn't handle the change ;)

    Love your kernels tho! Probably used them from the day you released them, til I switched to CM.
  7. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    You mean have csm work on another ROM? At this point it is designed only for my ROMS - obviously it drew you to mine ;)

    This is also my first release of this - it will continue to improve. Right now most of my effort is going into bkapps/rstapps
  8. roll3r
    Offline

    roll3r New Member

    Joined:
    Jan 13, 2010
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    Like I said, it's just your theme I can't handle! But, CSM seems like such a great idea I have to give it a shot. Just gonna put the framework and APKs from stock back on and test it out.
  9. shaggy3131
    Offline

    shaggy3131 New Member

    Joined:
    Feb 21, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    Yea this looks very usefull but i caint figure out how to use it. Do all these commands
    need to be entered at the command line?
  10. dbindock
    Offline

    dbindock New Member

    Joined:
    Mar 31, 2010
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Data Files used by CSM (anything you want to 'ignore' preface with a '#')


    # cat /data/chevyno1/csm.am - Activities to start upon bootup

    #android.tether/android.tether.MainActivity


    # cat /data/chevyno1/csm.sh - Apps/scripts to start upon bootup

    #insmod /system/lib/modules/cifs.ko


    # cat /data/chevyno1/stop-once.lst - Apps to be stopped only once
    #com.android.alarmclock


    # cat /data/chevyno1/stop-persist.lst - Persistent kill of apps
    #com.android.alarmclock


    # cat /data/chevyno1/stop.lst - Apps to kill at startup.
    com.cooliris.media
    android.process.media
    com.android.email
    com.motorola.calendar
    com.android.deskclock
    com.android.bluetooth
    com.google.android.apps.uploader
    com.android.voicedialer
    com.google.android.voicesearch
    com.android.calendar
    com.amazon.mp3
    com.android.im
    android.process.im
    #com.android.music
    com.biggu.shopsavvy
    #com.google.android.gm[/QUOTE]

    So I'm not new to your work chevy, but I am new to things like this. When you say "anything you want to ignore preface with a # ", where do you go in to edit this? Do you have to edit stop.lst? How do you do that through the command line?

    Also, on the stop-persist list, how do you add programs?

    Sorry if this is something I could find by searching how to use android command line. If it is, you can always tell me to go do my research! :)
  11. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    No worries - I realize that when I posted this, I was writing as if everyone knew Unix/Linux like I do - and I should have come back and beefed these up.

    For now - no easy way to edit those files on the phone - best off to 'adb pull', edit, and push back. This will change in future versions, just haven't gotten to it yet. If you have an entry in one of the files that you want to ignore, you can just delete the line, OR you can put a '#' in front of it, which tells CSM to ignore it.

    So basically everything is driven by those files you just quoted - but it's easiest to edit them after a pull and then push them back ... hope this helps!
  12. dbindock
    Offline

    dbindock New Member

    Joined:
    Mar 31, 2010
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Precisely what I needed to know. Thanks! Now I just need to get more familiar with adb commands. I'm no developer so I haven't had much exposure, but I can get help from the google android page.
  13. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    You bet!

    Quickly - if you have adb installed, and you are running on Windows - open up a DOS/cmd prompt, and type:

    adb get-state

    If it doesn't error out, you are corrected. Then, you can:

    adb pull /data/chevyno1/stop-once.lst

    Edit with your favorite editor, then:

    adb push stop-once.lst /data/chevyno1
  14. dbindock
    Offline

    dbindock New Member

    Joined:
    Mar 31, 2010
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the info. I have it installed, just haven't used it much. I'm not much of a cmd prompt user either, so I only know a handful of commands. Unix/Linux I used in college, but not enough to know it like the back of my hand. I can get around on just about anything, just aren't very efficient in it. I'm getting better and better at doing things in Terminal Emulator though!