├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md └── mmaintenanced_hook ├── Makefile ├── Tweak.xm ├── control ├── mmaintenanced_hook.plist └── theos /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | .DS_Store 3 | .theos 4 | packages/ 5 | 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "theos"] 2 | path = theos 3 | url = https://github.com/theos/theos.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Pwn20wnd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mmaintenanced_hook 2 | mmaintenanced_hook 3 | -------------------------------------------------------------------------------- /mmaintenanced_hook/Makefile: -------------------------------------------------------------------------------- 1 | THEOS=theos 2 | 3 | ARCHS=arm64 4 | 5 | GO_EASY_ON_ME=1 6 | 7 | include $(THEOS)/makefiles/common.mk 8 | 9 | TWEAK_NAME = mmaintenanced_hook 10 | mmaintenanced_hook_FILES = Tweak.xm 11 | mmaintenanced_hook_FRAMEWORKS = Foundation 12 | 13 | include $(THEOS_MAKE_PATH)/tweak.mk 14 | 15 | after-install:: 16 | install.exec "killall -9 mmaintenanced" 17 | -------------------------------------------------------------------------------- /mmaintenanced_hook/Tweak.xm: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | %hookf(void, "_reboot3") { 5 | execv("/usr/bin/ldrestart", NULL); 6 | } -------------------------------------------------------------------------------- /mmaintenanced_hook/control: -------------------------------------------------------------------------------- 1 | Package: system-memory-reset-fix 2 | Name: System Memory Reset Fix 3 | Depends: mobilesubstrate 4 | Version: 1.0 5 | Architecture: iphoneos-arm 6 | Description: Prevent overnight userspace reboots triggered by mmaintenanced 7 | Maintainer: Pwn20wnd 8 | Author: Pwn20wnd 9 | Section: System 10 | -------------------------------------------------------------------------------- /mmaintenanced_hook/mmaintenanced_hook.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Executables = ( 4 | mmaintenanced, 5 | ); 6 | }; 7 | } -------------------------------------------------------------------------------- /mmaintenanced_hook/theos: -------------------------------------------------------------------------------- 1 | ../theos --------------------------------------------------------------------------------