Automate services (bash, dropbear, trollvnc) on boot
mainTo ensure services like bash, dropbear, and trollvnc start automatically, you must:
- Copy their respective
.plistfiles to/System/Library/LaunchDaemonson the device. - Inject these services into the main
/System/Library/xpc/launchd.plistfile. - Patch
launchd_cache_loaderto allow loading the modifiedlaunchd.plistby settinglaunchd_unsecure_cache=1(patching offset0xB58with0xd503201f).
# Patching launchd_cache_loader
fp = open("custom_26.1/launchd_cache_loader", "r+b")
patch(0xB58, 0xd503201f)
fp.close()
# Injecting into launchd.plist using plistlib
target_data.setdefault('LaunchDaemons', {})['/System/Library/LaunchDaemons/bash.plist'] = source_data