Skip to content

Commit

Permalink
Last minute fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
c22dev committed Jan 18, 2024
1 parent e208efb commit d791091
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Geranium/ByeTime/ByeTimeHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func doStuff() {
RootHelper.removeItem(at: URL(fileURLWithPath: "/var/db/com.apple.xpc.launchd/disabled.plist"))
RootHelper.move(from: URL(fileURLWithPath :"/var/mobile/Documents/disabled.plist"), to: URL(fileURLWithPath: "/var/db/com.apple.xpc.launchd/disabled.plist"))
RootHelper.removeItem(at: URL(fileURLWithPath: "/var/mobile/Documents/disabled.plist"))
RootHelper.setDaemonPermission(url: URL(fileURLWithPath: "/var/db/com.apple.xpc.launchd/disabled.plist"))
UIApplication.shared.alert(title:"Done !", body:"Please manually reboot your device", withButton: false)
}

Expand Down
2 changes: 2 additions & 0 deletions Geranium/DaemonMan/DaemonDisabler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ func daemonManagement(key: String, value: Bool, plistPath: String) {
if result != "0" {
sendLog("error while deleting daemon. roothelper returned \(result)")
}
RootHelper.setDaemonPermission(url: URL(fileURLWithPath: plistPath))
RootHelper.removeItem(at: URL(fileURLWithPath: "/var/mobile/Documents/disabled.plist"))
print(result)
}
4 changes: 4 additions & 0 deletions Geranium/Libs/RootHelperMan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class RootHelper {
let code = spawnRoot(rootHelperPath, ["permissionset", url.path, ""], nil, nil)
return String(code)
}
static func setDaemonPermission(url: URL) -> String {
let code = spawnRoot(rootHelperPath, ["daemonperm", url.path, ""], nil, nil)
return String(code)
}
static func rebuildIconCache() -> String {
let code = spawnRoot(rootHelperPath, ["rebuildiconcache", "", ""], nil, nil)
return String(code)
Expand Down
Binary file modified GeraniumRootHelper
Binary file not shown.

1 comment on commit d791091

@c22dev
Copy link
Owner Author

@c22dev c22dev commented on d791091 Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.