iPhone and Linux

Saturday, December 12, 2009

Script for disabling some iPhone launch daemons

#! /bin/sh

# test for root
if [ `id -u` != 0 ]; then echo "Oops, you need to be root to run this script"; exit 0; fi

echo "Made by fubaya using description of the daemons by jdys_1991 at http://modmyi.com/forums/file-mods/682255-speed-up-your-iphone-ipod-removing-launch-daemons.html.
Press enter to continue..."
read

echo "This script only works on daemons listed as "Safe", "Conditional", or "Jailbreak" by jdys_1991 on the modmyi forum post. It will list them one by one and ask if you want to disable them by moving them to /var/mobile/LaunchDaemonsBackup.
Press enter to continue..."
read

script=$0
mkdir /var/mobile/LaunchDaemonsBackup
backupdir=/var/mobile/LaunchDaemonsBackup/
daemondir=/System/Library/LaunchDaemons/
ls $daemondir > .daemonlist

###################################################
function daemon {
# edited Dec-12 to send unnecessary output to /dev/null
if echo $1 | grep -i -f .daemonlist > /dev/null
then
echo -------------------------------------
echo $1 | grep -i "# $1" $script
echo
# edited Dec-12 to change "delete" to "disable"
echo "Do you want to disable $1?" y or n?
echo -------------------------------------
read choice
# edited Dec-12 to add confirmation that file was moved
[ $choice = "y" ] && mv $daemondir$1 $backupdir && echo "$1 successfully disabled"
[ $choice = "n" ] && echo "$1 not disabled"
fi
}
daemon com.apple.DumpPanic.plist
daemon com.apple.ReportCrash.DirectoryService.plist
daemon com.apple.ReportCrash.Jetsam.plist
daemon com.apple.ReportCrash.SafetyNet.plist
daemon com.apple.ReportCrash.SimulateCrash.plist
daemon com.apple.ReportCrash.plist
daemon com.apple.CrashHousekeeping.plist
daemon com.apple.aslmanager.plist
daemon com.apple.syslogd.plist
daemon com.apple.powerlog.plist
daemon com.apple.stackshot.server.plist
daemon com.apple.tcpdump.server.plist
daemon com.apple.iqagent.plist
daemon com.apple.mobile.profile_janitor.plist
daemon com.apple.chud.chum.plist
daemon com.apple.chud.pilotfish.plist
daemon com.apple.AddressBook.plist
daemon com.apple.accessoryd.plist
daemon com.apple.apsd.plist
daemon com.apple.dataaccess.dataaccessd.plist
daemon com.apple.datamigrator.plist
daemon com.apple.racoon.plist
daemon com.apple.MobileInternetSharing.plist
daemon com.apple.aggregated.plist
daemon com.apple.AOSNotification.plist
daemon com.apple.AdminLite.plist
daemon com.bigboss.sbsettingsd.plist
daemon com.imalc.insomnia.plist
daemon com.mxweas.MxT2d.plist
daemon com.saurik.Cydia.Startup.plist
daemon org.nodomain.scrobbled.plist
###################################################
rm .daemonlist
num=$(ls $backupdir | wc -l)
echo
echo "$num daemons have been moved to $backupdir. Please reboot for changes to take effect. Do you want me to
delete myself? y or n?"
read choice
[ $choice = "y" ] && echo "Deleting myself..." && sleep 1.5 && echo "blarg.. I'm dead" && exec rm $0
echo "Phwew, Thank you! I'm too young to die. I'll be here at `pwd`/`basename $0` if you need me."
###################################################
# Safe Daemons - These can be deleted by any user, with no adverse effects on the device
# com.apple.DumpPanic.plist (Safe)- Dumps crashes for evaluation by Apple.
# com.apple.ReportCrash.plist (Safe)- Collects data about what caused a crash, what programs were running at the time, etc.
# com.apple.ReportCrash.DirectoryService.plist (Safe)- Collects data about what caused a crash, what programs were running at the time, etc.
# com.apple.ReportCrash.Jetsam.plist (Safe)- Collects data about what caused a crash, what programs were running at the time, etc.
# com.apple.ReportCrash.SafetyNet.plist (Safe)- Collects data about what caused a crash, what programs were running at the time, etc.
# com.apple.ReportCrash.SimulateCrash.plist (Safe)- Collects data about what caused a crash, what programs were running at the time, etc.
# com.apple.CrashHouseKeeping.plist (Safe)- Also deals with crashes.
# com.apple.aslmanager.plist (Safe)- This daemon manages system logs.
# com.apple.syslogd.plist (Safe)- Logs system events.
# com.apple.powerlog.plist (Safe)- This is used to monitor any incompatibilities with 3rd party chargers.
# com.apple.stackshot.server.plist (Safe)- This daemon's function is currently unknown, but removing it has no adverse effects on one's device. Some more information can be found here, although the page is quite technical and isn't very useful to an end-user.
# com.apple.tcpdump.server.plist (Safe)- This daemon is apparently used to dump traffic on a network. Removing this daemon has no adverse effects on one's device.
# com.apple.iqagent.plist (Safe)- This daemon's function is currently unknown, but removing it has no adverse effects on one's device.
# com.apple.mobile.profile_janitor.plist (Safe)- This daemon's function is currently unknown, but removing it has no adverse effects on one's device.
# com.apple.chud.chum.plist (Safe)- 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 (Safe)- 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.

# Conditional Daemons - These daemons can be disabled by certain users who have no need for some features of their device.
# com.apple.AddressBook.plist (Conditional)- If removed, Contacts in the Phone application will load slightly slower. Disable this if you don't care about that.
# com.apple.accessoryd.plist (Conditional)- 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 (Conditional)- If removed, Push Notifications will no longer work. Disable this if you don't use Push Notifications.
# com.apple.dataaccess.dataaccessd.plist (Conditional)- 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 (Conditional)- Used to transfer contacts from SIM card to phone. iPod touch users can delete this.
# com.apple.racoon.plist (Conditional)- Used for Virtual Private Networks. Disable this daemon if you do not use any VPNs.
# com.apple.MobileInternetSharing.plist (Conditional)- Used for Internet Tethering. Disable this if you have an iPod touch or if you aren't interested in tethering.
# com.apple.aggregated.plist (Conditional)- 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.
# com.apple.AOSNotification.plist (Conditional)- This daemon deals with MobileMe syncing. If you do not use the MobileMe service, you can disable this.
# com.apple.AdminLite.plist (Conditional)- 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.

# Jailbreak Daemons - These are daemons installed by jailbreak applications.
# com.bigboss.sbsettingsd.plist (Jailbreak)- Related to SBSettings. I would suggest leaving it alone.
# com.imalc.insomnia.plist (Jailbreak)- Used to keep Insomnia running through resprings and reboots. If you don't want it to do that, disable this. (note from fubaya: disabling this causes the Insomnia toggle to disappear from SBSettings)
# com.mxweas.MxT2d.plist (Jailbreak)- 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 (Jailbreak)- 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.
# org.nodomain.scrobbled.plist (Jailbreak)- The Scrobbler daemon.

Blog Archive