Tuning a T-Mobile G1 with Cyanogenmod 6 (CM6) for optimal performance (no swap, compcache, or 10MB hack needed!)

IF THIS GUIDE HELPS YOU, PLEASE COMMENT. Last updated 2012-01-24.

[UPDATE: Added Android keyboard bug note; added step to remove ADWLauncher.]

[UPDATE 2: The launcher “Zeam” seems to be even lighter than LauncherPro.  Changing VM heap size to 12 and enabling JIT seems to improve the phone’s AVERAGE behavior considerably. While slower than after the initial boot with VM heap size = 24 + no JIT, the latter combination seems to slowly degrade performance until a reboot is needed, while the new settings don’t have such an effect. However, my phone is literally FULL with apps, so if you run lighter (i.e. remove Maps and Google Voice, don’t have many apps) you may prefer the 24MB heap size.]

[UPDATE 3: You REALLY should perform the EzTerry 14MB RAM hack which makes a massive difference, but requires more advanced work and is beyond the scope of this tutorial.]

I managed to FINALLY get my T-Mobile G1 to perform very well while running Cyanogenmod 6 (specifically I’m running CM 6.1-RC1 for Dream/Sapphire), and because it’s been such a difficult and elusive process, and people all over the Cyanogen forums have been screaming about often lackluster T-Mobile G1 performance (due to the 96MB of OS-usable RAM installed in the G1) I should share everything I’ve done to get this far.

What’s so different about my performance as compared to others who report GOOD performance with a CM6 G1 is that mine had started to become quite poor, which is often the case with these phones and custom ROMs.  Everything would work great after a wipe+flash, which erases pretty much everything, and then over the course of a few weeks the performance would drop until it became laggy and very annoying.  Reports of dialer/phone appearance on an incoming call lagging so severely that calls would be missed are not uncommon.

How does it perform?  Well, most of the time the launcher doesn’t unload, meaning my icons appear immediately when I go “home.”  When it does unload, it’s very quick to come up.  Application load times are drastically better and there is no noticeable lag in most usage cases.  In particular, the 3D gallery, which is very notorious for being slow to come up when using the default CM6 settings, pops up in approximately 5-6 seconds, and all of my 150 or so pictures on my 4GB Class 4 microSD card pop up in another 4-5 seconds (the first gallery startup makes thumbnails and is significantly slower, but we can ignore that since it’s largely a one-shot deal.)

BIG FAT UGLY NOTE TO ALL G1 CYANOGENMOD USERS: The default CM6 Dream/Sapphire settings are NOT OPTIMAL FOR THE T-MOBILE G1!!! I will be telling you to change settings in the “Performance settings” which has a BIG WARNING when you open it about dragons and voided warranties. Don’t worry, you’ll be safe with my setting changes.

First and foremost, you need to get some apps from the Market.  Search for and install the following:

  • Zeam (smaller) or LauncherPro (nicer) to replace ADW.Launcher
  • Home Switcher for Froyo
  • ConnectBot (not strictly needed as you can use Terminal Emulator, but ConnectBot makes things easier)

Now we’re ready to clean up the software on the G1 and get it performing like it was meant to.  Follow these steps:

  1. Run Home Switcher and set the default home app to LauncherPro or Zeam.
  2. Hit Home to get into LauncherPro, then hit Menu > Preferences > Advanced Settings > Memory Usage Settings > Memory Usage Preset, and select Light.
  3. Home > Menu > Settings > CyanogenMod Settings > Performance Settings > OK > Compcache RAM usage > Disabled
  4. Uncheck the following:  Use JIT, Enable surface dithering, Lock home in memory.
  5. Check Lock messaging app in memory.
  6. VM heap size > 24m
  7. You have a G1, so you probably don’t need the on-screen keyboard, and it takes up at least 5MB of RAM even if you aren’t using it.  Decide whether you want to have the on-screen keyboard or if you want to be stuck with only the 5-row slide-out keyboard. For me, the choice was obvious because the on-screen keyboard really, really sucks, so I turned it off. If you can do without the on-screen keyboard (and I highly recommend this step) then deactivate it: Home > Menu > Settings > Language & Keyboard > uncheck Android Keyboard.  [UPDATE: Looks like this box checks itself automatically when you reboot. Just uncheck it whenever you reboot; it’s probably a very minor bug in CM.]
  8. WARNING: the safe parts are now done and over with; in the next steps we will be stripping out Android apps that come with the CM6 system which can be sort of dangerous. Also, reflashing or upgrading CM will put these right back in place and you’ll need to repeat these steps.  (Apps exist to do these things more safely but I didn’t use them myself.)  If you are not comfortable with removing unnecessary system apps, stop here.  This page is very helpful reference for this: http://wiki.cyanogenmod.com/index.php?title=Barebones
  9. We need to remove Voice Search, Amazon MP3 (if applicable), Google Quick Search Box, and News and Weather. These apps seem to run themselves or a system service component all the time, and that means using memory unnecessarily.  (Plus, no one seems to use them anyway.)
  10. Run ConnectBot. Go through their tutorial if you like. Pay attention to how right-alt types a forward slash and right-shift performs “tab completion” of file names for you (in bash). These are very handy for typing the often long app file names. When you can open a new connection, change the connection type from “ssh” to “local” and hit [enter] in the empty box to the right of it.
  11. At the $ prompt, type su and hit enter. This will prompt for superuser access; allow the action to proceed. You’ll be changed to a # prompt.  Type bash and hit enter.  This will give you more junk before the # but otherwise it’s the same.  (Using bash gives us the handy tab completion, remember?)  Type the remaining steps in exactly as they are written, one per line.  If Amazon MP3 is not installed (on some versions) then the Amazon lines may return errors.  Note that after running any of the “pm uninstall” commands you will need to push the trackball button and then the letter “c” after you get “Success” to continue. For some reason it never seems to return to the command prompt if you don’t do this, but whatever.  Remember, you can hit right-shift to have the system complete the file names once you type enough characters.
  12. mount -o remount,rw /system
  13. rm -f /system/app/com.amazon.mp3.apk
  14. rm -f /system/app/GoogleQuickSearchBox.apk
  15. rm -f /system/app/GenieWidget.apk
  16. rm -f /system/app/VoiceSearch.apk
  17. pm uninstall com.amazon.mp3
  18. pm uninstall com.google.android.googlequicksearchbox
  19. pm uninstall com.google.android.apps.genie.geniewidget
  20. pm uninstall com.google.android.voicesearch
  21. [UPDATE] ADWLauncher apparently will continue to eat memory in the background even though you switched to LauncherPro.  Use the following command to make ADW go away (note you can reverse the process if you have to, or update/reflash):
  22. mv /system/app/ADWLauncher.apk /data/

[UPDATE: Don’t remove ADWLauncher; if something goes wrong and you remove Zeam or LauncherPro, you’ll have NO LAUNCHER and a reflash will be forced upon you. The 14MB hack will relieve some of the memory pressure and make this unnecessary anyway.]

Type “exit” three times to leave the console.  After all of this mess is completed, I’d suggest rebooting the phone to make sure everything is in a consistent state.  I noticed that lots of services run at initial startup, so don’t be alarmed if the G1 is slow for about a minute after the launcher appears.  I have found that deleting my Messaging threads and limiting them to 100 messages per contact significantly boosts Messaging app performance. Since Messaging is locked in memory, you might want to regularly clean it out to maintain optimal performance.  The same goes for the various Browser caches and saved information, though cleaning these will only make Browser perform better and has no effect on the entire phone.

After doing all of this, I noticed that my phone boots faster and is extremely responsive all of the time.  Even when the system reloads LauncherPro or starts an app from scratch, it’s MUCH faster to do so.  AGAIN, note that I am NOT using ANY of the following performance hacks:

  • Compcache (not even 10%, it’s DISABLED)
  • The Dalvik JIT compiler
  • Swap file on the SD card
  • 10MB RAM hack
  • Task/process killer applications (they’re unnecessary anyway)

Please leave a comment with feedback if you followed these directions.  I can’t provide help (that’s what the CM forums are for), I just want to know how it works for others.  Thanks!

44 thoughts on “Tuning a T-Mobile G1 with Cyanogenmod 6 (CM6) for optimal performance (no swap, compcache, or 10MB hack needed!)

  1. THIS. IS. AWESOME.

    After installing Cyanogen 6.1 and following your guide. I’m now back up the same amount of free ram I had running 1.5 Android!

    I have only one question… I had the foresight to uninstall apps like New and Weather (GenieWeidget.apk). However, when I uninstalled them via phone terminal, I hit in the wrong command at the end. What I typed was:

    1. mount -o remount,rw /system
    2. rm -f /system/app/GenieWidget.apk
    3. pm uninstall GenieWidget.apk

    Of course, the terminal returned with a “Failed” reading. However, even after I begin the process again and end it correctly with the proper package name (com.google.android.apps.genie.geniewidget), I still get a “Failed”.

    Does this mean I can not uninstall Genie Widget anymore? Or was it uninstalled anyways somehow?

  2. Immediate difference! This froyo cyanogen-mod was beginning to become a drag. Now, so far, so good. Thanks!

  3. Thanks so much for the post! I had been running CM4 for about a year now and was dreading having to upgrade due to my fear of snail-like speed/response. I followed the directions and it’s working great so far 🙂

  4. UPDATE: Everything works great, EXCEPT one big problem.

    My phone process keeps shutting down, usually at the beginning of a phone call (sometimes when using the ‘phone’ process to look up/dial a number I will get a message saying “com.android.phone had stopped unexpectedly” with the option to wait or force quit– both options don’t fix anything).

    The phone call will just disconnect after a few seconds (usually doesn’t make it past the ringing, with no error message other than “hanging up”). This has essentially rendered my phone useless except as a texting/computing device. I’ve tried lots of tinkering with the cyanogenmod performance settings with no luck (running 6.1.0).

    Any ideas/advice, before I do a wipe (which would be a huge pain)?

    1. Post at the CM forums for assistance. My advice would be to wipe the Dalvik cache and see if things improve; if not, re-flash the CM6.1 update and Google Apps (make sure you use the right gapps package.) If all that fails, do a Nandroid backup and then a full wipe.

    2. I know your post is old but for anyone new reading this having that problem, you need to fix permissions.
      – Connect your phone to pc
      – launch command prompt
      – type adb devices and see if it shows a serial number.
      If the result is blank you need to enable Debugging mode on your phone. You can do it through settings on your phone or if you have trouble getting in settings then while on home screen type this:
      setprop persist.service.adb.enable 1. You will not see it actually being typed but it is. Then try adb devices and it should show a serial number.
      – then type this in command prompt: adb shell fix_permissions
      – Reboot and everything should be fine. If not, factory reset from recovery and re-install Cyanogenmod.

  5. Very nice info. I have followed all your steps and my HTC magic is responding fast now. But I am stuck at point 10 i.e. installing google voice, amazon, etc.
    I have installed connectbot but when i run it, it asks me to connect to some server which i don’t know. Sorry but I am a noob using android. can you guide me through it please ? Thanks again.

    Regards,

    Smurf

  6. i kept getting failure for all of them, except for the adwlauncher, that removed and my phone was insanely fast, but when I rebooted my phone was in a bootloop and I had to reflash cyanogen. I DO NOT RECOMMEND ANYONE TO REMOVE THE ADWLAUNCHER UNLESS U WILL NEVER REBOOT

    1. If you get failure, you are possibly not running as root or did not correctly remount the /system partition read-write. Also, note that removal of ADWLauncher is only to be done AFTER you have both downloaded the alternative home app (LauncherPro) AND set it to be the DEFAULT home app instead of ADWLauncher. Once that is done, tossing ADW doesn’t hurt anything unless you also toss LauncherPro for some reason.

  7. Sweet sassy molassey did this help me. Before, my G1 was a corpulent, lumbering atavism. However, I wiped my phone, reflashed 6.1, and followed this guide pretty much exactly. I got some failures uninstalling a couple of the gapps, but no big deal. My G1 is running excellently now, especially since I’ve learnt the value of moderation; I’m using a grand total of seven icons and two widgets, all on a single homescreen. Vastly improved performance. Thanks!

  8. Ugh, after removing voicesearch, the microphone symbol on the keyboard while sending a text message disappeared. I use this feature all the time. Is this easy to get back?

    1. You can pull the .apk file out of the .zip file (I don’t know if it’s in the CM6.1 one or the Google Apps one) and open it from the SD card using the file manager; that should trigger installation like a normal application. If you flash 6.1 again, it will restore everything and you can try again (flashing over with the same version doesn’t generally wipe settings or destroy things).

  9. Nice job!!

    Worked greatly for me! My G1 now is much faster and responsive with CM 6.1.0
    Nice job! Thank you!

  10. I too am stuck in an endless boot loop after rebooting … Followed everything correctly, got the “success” message, etc. My sense is that Cyanomod does not like you to remove the ADWLauncher, and personally, I’m getting a little sick of Cyanomod and all the bloatware that comes with it. I’m going to try another mod.

  11. Aweesome!! really fast boot compare to before.Thank you.
    can i save all of this then flash all setting into other phone or as backup.sothat i dont have todo all this step again.

  12. THANK YOU THANK YOU THANK YOU!!! My Rogers HTC Dream is 1000000000 times faster now.. Before it was so corrupted and screwed up!
    I cannot express how amazing it is now! It’s even faster then my stock android 1.5

  13. Thank you so much for your tips, I followed all the steps and now my G1 is usable and responsive.
    The best optimization and tuning recommendation I have come across.

    I had been looking for something like this for almost 6 months, till I found your blog.

    Great Work!

    keep it up.

    Thanks

  14. Did you enable compcache on your phone now that you’re using JIT? I searched the Cyanogen forums and a couple of users have recommended compcache and JIT together on the HTC Dream.

  15. Pingback: Anonymous
  16. Thank you for these useful suggestions!

    Like others have touched on, it appears for me that moving the ADWLauncher.apk file away from /system/app causes CM to get stuck on its splash screen when rebooting (I left it fifteen minutes in case it was busy doing something!).

    A quick boot into recovery / console, mounting /system and /data and copying the file back, then issuing a reboot seems to bring the phone back to life. Maybe there’s another way to disable ADWLauncher???

    1. You’re supposed to install an alternative home application such as Zeam or LauncherPro before removing ADWLauncher, and set it as the default home app. Dumping ADW with no home app otherwise will result in no home app at all, and the effect you’re talking about.

      1. No, this effect was with Zeam installed and set to the default. Maybe CM6.1 has some hardcoded setting to expect ADW to be present??

        As I note below, “freezing” it with Titanium Backup Pro but leaving it installed seems to have done the trick.

  17. An update to my post above… I experimented with using the Titanium Pro (paid version) backup utility to “freeze” the ADWLauncher and also the android on-screen keyboard – it seemed to boot fine (so far!) and didn’t load them by default.

  18. Hello,

    Thank you for the post. I followed your advice and my T-Mobile G1 phone is considerably faster now.

    I have one concern. My battery lifetime diminished by more than x5. I don’t use the phone much and it used to last for at least four days. Now, it cannot last for one day. I get it fully charged in the morning and by evening the battery is depleted. The usage pattern or signal strength have not changed. I followed all the steps you listed and, regarding heap size and JIT, I went for 12M and JIT enabled. I checked the Barrery Usage tab and Android OS dominates by more than 60%. Do you have any follow-up advice regarding battery performance.

    Thanks!

    1. JIT uses too much of the G1’s memory and 12M heap size causes too much garbage collection to occur. I would actually recommend looking at installing the 2708 kernel and radio, and installing the COS-DS ROM. I did this and the extra 14MB of RAM makes a massive difference, plus it is a 2.3 port, not 2.2 🙂

  19. Excellent tuning guide! I followed the whole guide except I opted to install Zeam, and it made an immediate improvement to the responsiveness of my phone. Zeam occasionally glitches for a moment when coming out of a memory-intensive app, but it isn’t annoying enough to worry about.

    I was still having horrible battery problems after this tuning though – I was running out of power after about 8 or 9 hours of light use. I downloaded the Android System Info app after searching the Internet, and I discovered that K9 was having lots of problems when I looked at the system log in Android System Info. I uninstalled K9, installed MailDroid, and I’m at about 80% battery after 8 hours today. MailDroid doesn’t have as many features (and I hate the ads), but the K9 developers seem to be unwilling (or unable) to fix their battery drain problem. K9 has problems – uninstall it – you have been warned.

  20. thanks man…..but i have a issue, i followed all the steps i got a success for voice search but for others i tried many times it shows failure all the times……..
    my question is that if the app gets uninstalled nd we run the program it will show failure bcoz the apps r already uninstalled?

  21. also i have a issue whenevr i start camera, the g1 reboots itself…….my kernel version is 2.65.35.9
    please specify which version should i get to improve this or if there is any other way of strting my camera…..i cannot tk the help from forum bcoz there is nthng related to this nd m nt understanding clearly wht i have to do exactly…….

  22. Holy crap, is this great. I found Zeam a few months ago, but it didn’t occur to me to uninstall these packages that are running all the damn time, even when you don’t use them. THANK YOU!!

    Now, if I can only fix my stupid battery drain issue. I think the solution is to reboot after unplugging, but haven’t quite figured out what’s causing it.

  23. Amazing. Wonderful. Incredible. For over a month I’ve been going from rom to rom, tool to tool, setting to setting, driving myself crazy trying to get the G1 to be ‘new’ and work efficiently at the same time. I thought it was impossible and was quite depressed because I can’t afford a new phone. Thank you!!!! This is just the best ever, and it works even faster than the stock install? I don’t get how it does that, but it does, and I’m so flipping greatful!

  24. I am trying to do this to speed up my SLOW g1.
    However, I cannot find : Home > Menu > Settings > CyanogenMod Settings >. It doesn’t exist.
    Can you help?
    Thanks, Chuck

    1. have you upgraded to the cyanogenmod? If so, home is the actual button with the home icon, which should bring up an on screen icon for menu, which loads a list of bar-like icons, one of which is settings, and similarly the last one is Cyanogenmod Settings…

Leave a Reply

Your email address will not be published. Required fields are marked *