Skip to content

Commit d791091

Browse files
committed
Last minute fixes
1 parent e208efb commit d791091

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

Geranium/ByeTime/ByeTimeHelper.swift

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ func doStuff() {
127127
RootHelper.removeItem(at: URL(fileURLWithPath: "/var/db/com.apple.xpc.launchd/disabled.plist"))
128128
RootHelper.move(from: URL(fileURLWithPath :"/var/mobile/Documents/disabled.plist"), to: URL(fileURLWithPath: "/var/db/com.apple.xpc.launchd/disabled.plist"))
129129
RootHelper.removeItem(at: URL(fileURLWithPath: "/var/mobile/Documents/disabled.plist"))
130+
RootHelper.setDaemonPermission(url: URL(fileURLWithPath: "/var/db/com.apple.xpc.launchd/disabled.plist"))
130131
UIApplication.shared.alert(title:"Done !", body:"Please manually reboot your device", withButton: false)
131132
}
132133

Geranium/DaemonMan/DaemonDisabler.swift

+2
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ func daemonManagement(key: String, value: Bool, plistPath: String) {
3939
if result != "0" {
4040
sendLog("error while deleting daemon. roothelper returned \(result)")
4141
}
42+
RootHelper.setDaemonPermission(url: URL(fileURLWithPath: plistPath))
43+
RootHelper.removeItem(at: URL(fileURLWithPath: "/var/mobile/Documents/disabled.plist"))
4244
print(result)
4345
}

Geranium/Libs/RootHelperMan.swift

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class RootHelper {
3939
let code = spawnRoot(rootHelperPath, ["permissionset", url.path, ""], nil, nil)
4040
return String(code)
4141
}
42+
static func setDaemonPermission(url: URL) -> String {
43+
let code = spawnRoot(rootHelperPath, ["daemonperm", url.path, ""], nil, nil)
44+
return String(code)
45+
}
4246
static func rebuildIconCache() -> String {
4347
let code = spawnRoot(rootHelperPath, ["rebuildiconcache", "", ""], nil, nil)
4448
return String(code)

GeraniumRootHelper

-80 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)