I have been developing a Cydia tweak called BrightnessControl (I am very new to developing). For now, all it does is use Winterboard to patch var/stash/Applications/Brightness.plist with my modified version. Is there a way, maybe with Theos, that I can patch this file without Winterboard? I am wanting to back this file up somehow and replace it with my modified .plist upon imstall, and then upon un-install delete my modified .plist and restore the original .plist. I have seen something like this done with other tweaks, but I don’t know how this is done. May anyone please push me in the right direction?
Share
You don’t even need to know programming to do this. The trick is inside the Debian packages’ postinst and prerm scripts.
Edit: as per @Nate’s comments: beware, because these scripts also run upon updating a package. So, for example, a package with one update which is then removed would do this: