Wednesday, January 5, 2011

iPhone iPad iPod Touch Speed tweak for more available ram

NOTE! It is STRONGLY recommended that you make a backup of all the files being modified in this tutorial. These are core system files, and removing the wrong one could potentially result in a restore if backups are not made.

It is also recommended that you have MobileFinder or iFile installed, in case you need to restore your backups but are unable to SSH into your device for some reason. I am not responsible for any damage caused to your device by this tutorial. Follow this tutorial at your own risk. Your results may vary depending on the MobileSubstrate plugins you have running, as those take up memory by themselves.

Every daemon in this tutorial has been tested on a first-generation iPod touch with the 3.1.2 firmware. I am not responsible for any damage to devices other than a first-generation iPod touch with the 3.1.2 firmware, as I am incapable of testing on them. However, this tutorial should apply to all devices running firmwares 3.0 and above, including iOS 4.0.

Also note that if you do not make a backup and end up needing to restore a daemon, the members of this forum cannot upload any .plist files for you. These files contain code copyrighted by Apple, and as such cannot be posted for download on a public forum. Make your backups, people!

Note for those using Spirit: According to MuscleNerd, Spirit installs its own launch daemon. Accidentally deleting this daemon will necessitate a restore of your device. Also, if your device has been previously jailbroken with a different tool, and you used this tutorial to delete launch daemons and kept an edited version of the LaunchDaemons folder on your computer, DO NOT simply use that edited folder to replace the LaunchDaemons folder on your Spirit-jailbroken device. That folder will not have the necessary Spirit daemon and you will have to restore. This has already happened to at least one user on these forums. If anyone could provide me with some information on what the Spirit daemon is named so I can add it to the list, I'd appreciate it.

Before we start, you need to understand what a daemon is if you don't already. Wikipedia has an excellent explanation:
Originally Posted by Wikipedia
In Unix and other computer multitasking operating systems, a daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as background processes.

So what does this mean? This means that when your iPhone or iPod is turned on, it loads a bunch of background processes (over 60!) that allow it to do various things, like connect to the Internet and receive calls. Since these processes are in the background, they take up a sizable amount of your device's available RAM, and because they're system processes, they can't be killed with SBSettings or MemTool. The good news is that some of these daemons are completely unnecessary (for most people), and you can simply delete them and regain the RAM they were taking up.

First, SSH OR plug your device into your pc and use iFunBox. Now in your device navigate to /System/Library. Find the LaunchDaemons folder and download the entire thing to your desktop. Rename the original (on your device) to something like "LaunchDaemons.old" or "LaunchDaemons.original" so that you have an easily retrievable backup if something should go wrong. (It isHIGHLY recommended that you make this backup.) Make any changes you want to the copy on your desktop and then simply reupload to your device when you're done. Be sure that the copy doesn't overwrite the original, and also be sure that the permissions of the LaunchDaemons folder are set to 755. Failure to ensure correct permissions will result in your device freezing at the Apple logo. Once the copy is reuploaded, reboot your device and notice your newfound speed.

To disable a daemon, simply delete the corresponding .plist file.

Safe Daemons
These can be deleted by any user, with no adverse effects on the device.•com.apple.DumpPanic.plist - Dumps crashes for evaluation by Apple.
com.apple.ReportCrash.(Different Things).plist - There are 6 of these daemons, and they collect data about what caused a crash, what programs were running at the time, etc.
com.apple.DumpBasebandCrash.plist - Dumps baseband crashes, which shouldn't happen during normal use. iPod touch users don't even have a baseband.
com.apple.CrashHouseKeeping.plist - Also deals with crashes.
com.apple.aslmanager.plist - This daemon manages system logs.
com.apple.syslogd.plist - Logs system events.
com.apple.powerlog.plist - This is used to monitor any incompatibilities with 3rd party chargers.
com.apple.stackshot.server.plist - This daemon's function is currently unknown, but removing it has no adverse effects on one's device. Some more information can be found Source), but I don't know what that means, exactly. Removing this daemon has had no adverse effects on my device.
com.apple.chud.chum.plist - This daemon is thought to relate to Apple's CHUD (Computer Hardware Understanding Developer) tools. Removing this daemon will have no adverse effects on your device, unless you are a developer.
com.apple.chud.pilotfish.plist - This daemon is also thought to relate to Apple's CHUD tools. Removing this daemon will have no adverse effects on your device, unless you are a developer.
com.apple.psctl.plist - No definitive information about this daemon is currently available, but it's believed that it deals with connecting external storage devices, possibly a feature coming in new iDevices. It doesn't do anything for now, though, so feel free to delete it. (Source)
com.apple.apsd.tcpdump.en0.plist - Logs push notification errors.
com.apple.apsd.tcpdump.pdp_ip0.plist - Also believed to log push notification errors.

Conditional Daemons
These daemons can be disabled by certain users who have no need for some features of their device.•com.apple.searchd.plist - Disables Spotlight search if removed. The Spotlight page will still be there, but nothing will show up when you start typing. Disable this daemon if you don't use Spotlight.
com.apple.AddressBook.plist - If removed, Contacts in the Phone application will load slightly slower. Disable this if you don't care about that.
com.apple.accessoryd.plist - If removed, disables accessories like FM radio transmitters, iPhone docks, and AV cables. Accessories will be able to charge your device, but that is all they will be able to do. Remove this if you don't use any of these accessories.
com.apple.apsd.plist - If removed, Push Notifications will no longer work. Disable this if you don't use Push Notifications.
com.apple.iapd.plist - Functions like com.apple.accessoryd.plist (Source). My personal guess is that it deals with accessories that also come with companion apps, but don't hold me to that.
com.apple.dataaccess.dataaccessd.plist - If removed, contacts will no longer sync via Exchange or Google Sync. Disable this if you don't use those services.
com.apple.datamigrator.plist - Used to transfer contacts from SIM card to phone. iPod touch users can delete this.
com.apple.racoon.plist - Used for Virtual Private Networks. Disable this daemon if you do not use any VPNs.
com.apple.MobileInternetSharing.plist - Used for Internet Tethering. Disable this if you have an iPod touch or if you aren't interested in tethering.
com.apple.AOSNotification.plist - This daemon deals with MobileMe syncing. If you do not use the MobileMe service, you can disable this.
com.apple.AdminLite.plist - This daemon tries to return control of your device to you if it thinks that you are waiting for a lengthly process to respond. It does this by force-quitting the process, so if you're tired of your apps crashing and you would rather wait a few seconds for them to finish what they're doing, disable this daemon.
com.apple.graphicsservices.sample.plist - Thought to have something to do with displaying album artwork. I've deleted it on my iPod and everything still works fine, but some people have encountered problems.
com.apple.UIKit.pasteboardd.plist - I believe that this daemon deals with copy/paste. If you don't find yourself using copy/paste, you can disable this daemon.
com.apple.mobile.obliteration.plist - This daemon wipes the data partition of your device. (Source) This will be used if you remotely wipe your phone via Exchange, or if you use Settings > General > Reset, or if you set your device to wipe itself after a certain number of failed passcode entries. If you don't use these features, you can delete this daemon.
com.apple.scrod.plist - This daemon deals with Voice Control. If you don't use Voice Control, you can delete this daemon.

Manual-Edit Daemons
These daemons should not be fully disabled, but should be edited so that they are disabled when they are not needed.•com.apple.itunesstored.plist - Open the plist file in a text editor and change this:
<key>SuccessfulExit</key>
<false/>

to this:
<key>SuccessfulExit</key>
<true/>

Now this daemon will go away when it's not needed. If you're having trouble editing the .plist on your computer, edit it on your device using iFile.

Unknown Daemons
The functions of these daemons are currently unknown. Proceed with caution.•com.apple.daily.plist - Nothing is currently known about this daemon, except that it is programmed to perform a certain function once a day. Removing this daemon has had no adverse effects on my device.
com.apple.iqagent.plist - This daemon's function is currently unknown, but removing it has had no adverse effects on my device.
com.apple.mobile.profile_janitor.plist - This daemon's function is currently unknown, but removing it has had no adverse effects on my device.

Device-Specific Daemons
These daemons have different functions for different devices. Be ABSOLUTELY CERTAIN that these daemons are safe to delete from your specific device.•com.apple.CommCenter.plist - Deals with making and receiving phone calls. iPod touch users (confirmed on the first-gen, assumed on all the others) can delete this daemon with no adverse effects. iPhone/iPad users should not delete this daemon under any circumstances. On an iPad, it will start to randomly reboot.
com.apple.awd_ice2.plist - Apparently only affects the iPhone 3G and 3GS. It's not known what its function is on those devices, however, so remove this daemon at your own risk.
com.apple.awd_ice3.plist - Apparently only affects the as-yet unreleased iPhone 4G. Anyone not using top-secret prototype Apple tech can delete this daemon.
com.apple.aggregated.plist - It is believed that this performs some function related to Audio-In. If you have an iPod touch and do not intend to use Audio-In, disable this. iPhone users should leave this alone.

Leave-Alone Daemons
These daemons are crucial to the operation of your device and should not be modified in any way.•com.apple.fairplayd.plist - This checks the DRM on your legitimately-acquired music and apps.
com.apple.installd.plist - Deals with app installation.
com.apple.BTServer.plist - If this daemon is disabled, your device will become extremely slow and unresponsive.
com.apple.configd+pm.plist - Deals with system configuration.
com.apple.configd-pm.plist - Also deals with system configuration.
com.apple.gmmd.plist - A debugging service for your device.
com.apple.mDNSResponder.plist - DNS. Disable this, and your Internet is completely gone.
com.apple.mDNSResponderHelper.plist - Also deals with DNS.
com.apple.locationd.plist - Deals with GPS and location.
com.apple.mediaserverd.plist - Plays your music and videos.
com.apple.usbptpd.plist - Allows your device to connect to your computer and charge.
com.apple.mtmergeprops.plist - Appears to have something to do with the touchscreen. After I deleted this daemon, my screen was unresponsive. This is why you make backups!
com.apple.SCHelper-embedded.plist - Appears to be a part of the SystemConfiguration framework (Source), so I don't recommend deleting it. If some brave soul wants to try it, go ahead and report back.
com.apple.SpringBoard.plist - This daemon ensures that SpringBoard launches when you turn your device on. Without this daemon, SpringBoard will not launch. Also, this daemon ensures that you are able to respring your device. If you disable this daemon and attempt to respring, the SpringBoard process will be killed but will not start again.
com.apple.mobile.lockbot.plist - This daemon's function is currently unknown, but several users have removed it (based on my advice; sorry about that, guys!) and have had to restore as a result. However, I think it's worth noting that I have removed this daemon on my first-gen iPod touch and have encountered no problems. For the time being, however, leave this daemon alone.
com.apple.mobile.Lockdown.plist - Deals with SIM and network authorization. iPod touch users, even though this daemon seems like it deals with iPhone-only operations, have still had to restore after deleting this daemon. I have removed this daemon on my first-gen iPod touch and have encountered no problems, but apparently I'm the only one who has been this lucky.
com.apple.itdbprep.plist - Based on the name, this has something to do with syncing music to your device.

Jailbreak Daemons
These are daemons installed by jailbreak applications.•com.apple.dynamic_pager.plist - This is what drives virtual memory (VM) mods. Delete this daemon only if you want to uninstall any VM hacks you have on your device.
com.bigboss.sbsettingsd.plist - Related to SBSettings. I would suggest leaving it alone.
com.imalc.insomnia.plist - Used to keep Insomnia running through resprings and reboots. If you don't want it to do that, disable this.
com.mxweas.MxT2d.plist - The daemon that allows MxTube to download videos in the background. If disabled, the application will need to be reinstalled; however, if you don't use MxTube and are too lazy to uninstall it, you can disable this daemon.
com.saurik.Cydia.Startup.plist - It's believed that this daemon deals with the AutoInstall trick for installing .deb files. If you don't know what that is and you don't use it, you can disable this daemon.
com.saltinbas.free.mem.plist - This daemon is part of the Repeat Memory Free hack that's been floating around lately. Disable this if you no longer want your memory to be freed automatically. (Note: please do not discuss this hack here, as it comes from a forum we aren't allowed to talk about or link to.)
org.nodomain.scrobbled.plist - The Scrobbler daemon. Disable this if you don't want your music scrobbled anymore.
com.SPC.SuperCharged.plist - The SuperCharged daemon, which is a virtual memory mod from Cydia. Don't delete this if you want to keep using SuperCharged.

NOTE! If this tutorial does not specifically mention that a certain daemon is safe to remove, leave it alone. Better safe than sorry.

After removing all of the unnecessary daemons from my device, my boot time has gone down considerably (50 seconds to reach the SpringBoard, where it was over a minute before I deleted the daemons) and I've gotten up to 64 MB of free RAM. That's half of my device's total RAM, and should be enough for several backgrounded applications.

If you have reliable information that one of the daemons mentioned in this tutorial is described incorrectly (e.g. I say it's safe when it isn't), please post in this thread and PM me immediately so that I can edit this post and hopefully prevent anyone from having to restore their device.

Hope this helped!

Thanks to:
GrooveMachine, for information on the CHUD daemons.
Ezekeel, for information on the AOSNotification daemon.
G8D, for noticing a typo I made while describing how to edit the itunesstored daemon.
xXrkidXx, for information on several iPhone-specific daemons.
DarkPaus, for iPad commcenter daemon info.

2 comments:

  1. apsd plist when deleted, also causes the wifi to shutdown after some minutes that the iphone goes to lockscreen and "rest". this is good for battery

    ReplyDelete
  2. awesome thanks for the info ill add that to the post in the morning

    ReplyDelete