Pidsec

Disabling Daemons To Free Memory on 64bit Arm iPhone 5S for iOS7

disablingdeamons

One of the immense benefits to jailbreaking idevices is to allow our devices to prosper. Amplified computing power, an almost never ending array of tools to execute functions, and of course, customizations, themes, and system tweaks that give much more power to the user, all of which greatly outweigh the propaganda Apple tends to beguile its base through scare tactics.

At any rate, I have taken my newly found jailbreak powers to help my very own iPhone 5S 32G to prosper on iOS 7. One of the ways I did this was to eliminate certain system processes.

These processes, conventionally known in the Unix realm as 'daemons', are embedded processes that the OS always has running and they are non-optional, which inadvertently means the user is not presented with the option to simply kill off the process. The problem is that at least 20% of these processes are absolutely irrelevant to the user. Another 20% are also half way irrelevant to many other people, depending on how each user utilizes their device. The meaning of "half way" here is that the elimination of these processes stop the phone to perform a specific function, but some of these functions could be completely irrelevant to a certain segment of users. All of this will be made more clear later on

Traditionally, the previous generations of iPhones took around 61, possibly approaching 70 processes. However with the new iPhone 5S, I have seen on average that the systems processes were well into the 90s. At the very least, it does have a couple of daemons that were not in the file system of older devices nor the daemons in the older iOSs are in iOS7. What does remain the same is the path these daemons are found in. They are located in /System/Library/LaunchDaemons

So I took the time to first disable those daemons that I knew or searched the information as to whether it was trivial to the system. Then I rebooted the device, and my phone was perfectly fine.

Any good script writer can use these sources and write up a script for iPhone 5S users and upload it to Cydia for users to download (as opposed to manually doing the task as it would also require duplicating the "LaunchDaemons" folder and placing it elsewhere in the file system for precautionary measures).

What I did was to copy that folder and pasted the entire folder in a different area of my file system and called it "disabled". I even emailed myself the folder just in case.

Then, I simply went into the /System/Library/LaunchDaemons folder and went to those files, and added ".bkup" after ".plist". This renders the file unreadable to the OS (operating system) which inadvertently disables the daemon without actually having to delete the file since the OS does not know what a file ending with ".bkup" is, and thus wont read it. I didn't actually delete the file. Just in case anything went or goes wrong, you just simply rename the file by deleting the ending ".bkup" and it will revert back to a readable plist file again.

These plist files, known in this context as daemons, I render as useless/semi-useless to the iPhone 5S, and they are the following-

com.apple.appsupport.cplogd.plist.bkup

com.apple.aslmanager.plist.bkup

com.apple.certui.relay.plist.bkup

com.apple.crash_mover.plist.bkup

com.apple.CrashHousekeeping.plist.bkup

com.apple.DumpPanic.plist.bkup

com.apple.mobile.softwareupdated.plist.bkup

com.apple.OTACrashCopier.plist.bkup

com.apple.OTATaskingAgent.plist.bkup

com.apple.powerlog.plist.bkup

com.apple.ReportCrash.DirectoryService.plist.bkup

com.apple.ReportCrash.Jetsam.plist.bkup

com.apple.ReportCrash.plist.bkup

com.apple.ReportCrash.SafetyNet.plist.bkup

com.apple.ReportCrash.SimulateCrash.plist.bkup

com.apple.ReportCrash.StackShot.plist.bkup

com.apple.sharktrace.plist.bkup

com.apple.syslogd.plist.bkup

18 scripts that are absolutely useless. Please take note once more that adding the ".bkup" after ".plist renders the plist file unreadable to the OS. Simply deleting ".bkup" from the name thereby making the ending of the file name as ".plist" returns the file back to normal.

I did see 1 or 2 plist files that "seemed" to be useless, but because I was in doubt, I didn't even bother to touch them.

The following plist files are a bit more integral and rendering them unreadable from the OS will disable something from the phone. I renamed the ending of these plist files with ".cbkup" which stands for "conditional backup" as a way of telling me that nullifying these daemons was conditional to giving up a feature. One must remember that not all features are going to be used by all people, hence determining which plist files really depend on the individual person. These are the following-

com.apple.dataaccess.dataaccessd.plist.cbkup

com.apple.wifi.wapic.plist.cbkup

com.apple.racoon.plist.cbkup

com.apple.gamed.plist.cbkup

com.apple.daily.plist.cbkup

com.apple.mobile.obliteration.plist.cbkup

com.apple.itunescloudd.plist.cbkup

com.apple.biometrickitd.plist.cbkup

[A note to scriptwriters. Including these with the first 18 will limit the amount of users downloading them (possibly). So highlighting what these daemons disable should be clarified for the user]

I will highlight what each one of these plist files does.

com.apple.dataaccess.dataaccessd.plist.cbkup - deals with syncing contacts contacts via Exchange, iCloud or Google Sync. Disable this if you don't use those services. (This will NOT disable Push notifications from Google Voice's app, only the push mail service.)

com.apple.wifi.wapic.plist.cbkup - this daemon in previous iOS firmwares was simply named "com.apple.wapic.plist". In the new iOS 7, they've added 'wifi' to it. This daemon is responsible for logging errors when trying to connect to a WiFi network with Chinese characters in the name. Since we don't live in China, we don't need it.

com.apple.racoon.plist.cbkup - this daemon is used for using Virtual Private Networks. If you don't use VPN at all, then this daemon is irrelevant to you.

com.apple.gamed.plist.cbkup - this daemon is called when using GameCenter. If you don't use GameCenter at all or don't care, disable it. I play games, but I really don't give a damn about GameCenter.

com.apple.daily.plist.cbkup - this daemon is used to check for automatic updates from the AppStore. If you don't care for this and would rather do it manually, then this daemon is irrelevant. If you like for your device to check for automatic updates, don't disable

com.apple.mobile.obliteration.plist.cbkup - this daemon is used for executing an iwipe remotely or natively on your device. If your sure that your never going to use this feature (clicking the restore all in settings.app, or remotely wiping your device because your phone was stolen) then this daemon is irrelevant.

com.apple.itunescloudd.plist.cbkup - this daemon is reaponsible for iTunes in the cloud/home sharing. If you dont use these features, then this daemon is irrelevant and therefore you can disable it

com.apple.biometrickitd.plist.cbkup - I saved this for last. This daemon is responsible for performing the touch id scan on the home button for iPhone 5S specifically. If you see this daemon on any other device, delete it because the touch scan id hardware is only found on the 5S exclusively. If you have no interest in using the touch id scan on your iPhone 5S, then disable this daemon.

So, concluding, I've disabled all of these daemons with no detrimental side affects to the OS. Furthermore, and the whole point of all of this, is that the new memory cleaner app from Cydia was able to clean over 300 megabytes of ram. Before it would clean around 180 megabytes max. Likewise before I only had 300 megabytes of free ram max, whereas now I have 400-420 megabytes of free ram max.

All in all, I was able to free up roughly a 100+ megabytes of ram at any given time by disabling these daemons.

#Jailbreak #iPhone