[G1 Android Development] tsheeley:
CE 2.2.1 Advanced Tweaking Tips

As mentioned a number of posts ago, I'll be sharing my thoughts and tips here on tweaking CE in order to get the most out of your battery life and a smooth user experience. In the efforts of full disclosure - I learned about AutoStarts and had the inspiration for this post from a thread on how to speed up Hero ROMs, but the same methods can be applied to pretty much any ROM on any phone.

As always, use your favorite backup methods before doing anything major to your phone - just in case you don't like the results, or happen to screw something up.

This will be pretty much a constant work in progress as new tips & methods are discovered and tested.

Enjoy and good luck.

*****************************

Trim your startup time and widget list with Autostarts (AppBrain link)

There are a few things here that are set to run after startup, but aren't really needed. Keep in mind, not everyone will have the same apps (obviously)... but you'll get the general idea fairly quickly of what you don't need... don't be afraid to experiment. I recommend either writing down the default states of everything or taking screenshotsp prior to changing anything - that way you don't forget what you changed. (Check out this thread for a Java based screenshot tool to run from your PC.)

Here are some examples of what I found in my startup that I turned off:

Bluetooth Share (Don't have a bluetooth headset, and don't know anyone I'd want to share anything with)

Email (I don't use Exchange)

Messaging (I use Handcent, no need for the default app to start)

Voice Dialer (Never used it... it starts when you long press the green call button anyways)

AdFree (Once it's first used, no need for it to start up everytime)

MyBackup Pro LocationLoggerService (no need for them to know where you are)

Mabilo Wallpapers (unless you use the wallpaper rotation feature, which I don't)

You'll also find further down in Autostarts that after apps are added/updated/removed things like the Market, AppBrain, Slacker, Layar and Pico TTS (text to speech) are notified of the change. Wait... what? Yes, you read that right. Slacker, Layar and Pico TTS get run for a second in the background when you a/u/r apps. They (and others of that ilk) have no need to know what is a/u/r from your phone, in my opinion, it just slows things down - you can disable those updates, saving you a bit of processing time.

Have you ever gone to add a widget to one of your home screens, only to have the huge list of widgets take forever to load? While you're in Autostarts, scroll all the way down to the bottom, there is a section called "Widget updating" - disable anything you don't use.

After all your tweaking in Autostarts is done, reboot. Depending on what you disabled, you should at least see improved boot times and have a shorter widget list.

Give Android a hand with memory management with Auto Memory Manager (AppBrain link)

This had to be one of the best finds. AMM will help your phone kill off those apps you THINK you closed out of, but still left a little something lingering in the background. Gone are the days of opening a task manager and killing those "empty" apps every couple hours. Just set it and forget it. Here are the values that I have been using for a while: 6, 8, 7, 10, 12, 80... they read top to bottom when you're in the app and can be set either by using the sliders or entered manually in the Advanced section from the menu.

Turn off Animations, Vibrate and Move Ringtones into /system

Turning off the animations will help speed up app response time a little as well - it's a fair trade off those if you're more concerned about the speed of your phone over the prettiness. Turning off vibrate can help display the incoming call a whole ring faster too. (I personally tested this with my home phone.) You can also squeeze a little more speed out of the incoming call display time by moving your custom ringtones to /system/media/audio/ringtones.

Play around with this combination a little. I turned off the vibration, kept my rings on my SD card and kept the full animations going - everything is still smooth.

Help your favorite apps start faster (and make them less likely to be killed) with Phone Priortizer (XDA link)

This gem was found by someone else in the thread (sorry, can't remember who at the moment).

As the name states, it will help you set the priority of processes that run on your phone. This can not only help things start faster (like the incoming call display or your favorite messaging app), but can also help keep apps from being killed. If you don't already know, the lower the number (dipping down into the negatives) the higher the priority of the app. For an added bonus, you can also schedule it to clear caches and reboot your phone at a time that's convenient for you - like early in the morning, before you wake up - giving you a fresh boot every day.

Here are the scripts I use for each of the 3 sections. As you can see, I've kept mine pretty basic, but you can have the scripts do virtually anything you'd like. Check out the rest of the PP thread for scripting help and advice on what others have done.

Get the most processing power out of your CPU with SetCPU (AppBrain link)

This is another one of those set-it-and-forget-it apps.

For those that don't know, CE comes packaged with a kernel that can be overclocked - SetCPU is by far the best way to manage that. Here are the settings that I personally use to get the most zip out of my phone with I'm using it and to also conserve battery when I'm not.

Main:

Min/Max: Both set to 595MHz (anything higher than 614MHz and you'll freeze up and need to yank the battery)

Scaling: ondemand

Set on Boot: on

Profiles:

Temp > 50 C (122 F):

Min/Max: Both set to 122MHz

Governor: ondemand

Priority: 70

Battery < 15%:

Min/Max: Both set to 245MHz

Governor: ondemand

Priority: 60

Screen Off:

Min: 245MHz - Max: 595MHz

Governor: ondemand

Priority: 50

Advanced:

The only thing I changed here was the Up Threshold to 20%. This, combined with the above profiles, will ensure you come out of sleep quickly and rev up to full speed.

Use only one launcher app and ADW installed as a System app (ADW website)

By default, CE comes with the stock launcher and ADW as an alternative. Having both isn't necessary and only slows things down. Here's how to get yourself up to snuff with a more current version of ADW and install it as a system app.

First off, whip out your barcode scanner and get the latest MDPI version - you'll want the CM5 based one. Don't do anything with it yet... we'll be getting back to it later.

Next, open your favorite terminal app and run the following lines of code:

(this will uninstall the older ADW that is included in CE)

su
mount -o rw,remount /system
rm -r /system/app/ADW.Launcher.0.7.7_standalone.apk
exit
exit

Now, using your favorite file manager with root access, navigate to /system/app and either delete or move the stock launcher - "launcher.apk". Then, go to where you saved the current ADW you just got (more than likely /sdcard/download) and install that. Finally, go to /data/app and move "com.android.launcher" to /system/app.

You should now have only the current ADW installed as a system app. I'd recommend doing a reboot while still in the file manager (without going to home first) and letting your phone have a fresh start with the current version.

In case of a screwup:

If by some chance you messed up switching to just one launcher and find yourself sitting at the loading screen after rebooting... download Dr Cloverdale's flashable system version of ADW 1.0.1, reboot into your recovery (you might have to yank the battery if you were stuck), mount your SD card, copy the zip to the root, unmount the SD and flash the zip. Reboot normally and you'll have 1.0.1 installed as a system app. I used 1.0.1 up until just recently and I can honestly say it gets the job done very well.

Happy tweaking!

.