1

Previously I have been able to use Launchdaemons on iOS 9.3.3 but now that I am on iOS 11.3.1 the method I have used to automate the running of a script is no longer working on my iPhone and I cannot understand why. I am jailbroken on unc0ver 3.8.0-b1 and the log when it is jailbreaking says the service was loaded.

My plist file looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>autoCleaner</string>
    <key>Nice</key>
    <integer>-20</integer>
    <key>ProgramArguments</key>
    <array>
        <string>/var/mobile/script1.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>20</integer>
</dict>
</plist>

launchctl load /Library/LaunchDaemons/autoCleaner.plist says the service is already running but it isn’t executing the script (execute flag is set in permissions on script1.sh). I can run the script from a terminal window fine but it won't start and re-run at 20second intervals like I have tried to do with the launchdaemon

Any ideas how to resolve?

Rhys
  • 27
  • 1
  • 1
  • 5
  • I found a workaround. Apparently there have been security restrictions implemented since iOS 9.3.3 which means that scripts being called by a LaunchDaemon pList cannot be located in /var/mobile. I moved the script being called by the LaunchDaemon to /usr/bin and it worked fine. I have an additional question - if I was to move the pList to LaunchAgents - is it possible to load and unload without logging in as root - would save me a couple steps in terminal.... – Rhys Jan 20 '20 at 09:46

0 Answers0