├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── Screenshot └── 0x01.png ├── ThunderTweak.dylib ├── ThunderTweak.m └── insert_dylib /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/macos,windows,sublimetext,visualstudiocode,xcode 2 | 3 | ### macOS ### 4 | *.DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | 8 | # Icon must end with two \r 9 | Icon 10 | # Thumbnails 11 | ._* 12 | # Files that might appear in the root of a volume 13 | .DocumentRevisions-V100 14 | .fseventsd 15 | .Spotlight-V100 16 | .TemporaryItems 17 | .Trashes 18 | .VolumeIcon.icns 19 | .com.apple.timemachine.donotpresent 20 | # Directories potentially created on remote AFP share 21 | .AppleDB 22 | .AppleDesktop 23 | Network Trash Folder 24 | Temporary Items 25 | .apdisk 26 | 27 | 28 | ### Windows ### 29 | # Windows thumbnail cache files 30 | Thumbs.db 31 | ehthumbs.db 32 | ehthumbs_vista.db 33 | 34 | # Folder config file 35 | Desktop.ini 36 | 37 | # Recycle Bin used on file shares 38 | $RECYCLE.BIN/ 39 | 40 | # Windows Installer files 41 | *.cab 42 | *.msi 43 | *.msm 44 | *.msp 45 | 46 | # Windows shortcuts 47 | *.lnk 48 | 49 | 50 | ### SublimeText ### 51 | # cache files for sublime text 52 | *.tmlanguage.cache 53 | *.tmPreferences.cache 54 | *.stTheme.cache 55 | 56 | # workspace files are user-specific 57 | *.sublime-workspace 58 | 59 | # project files should be checked into the repository, unless a significant 60 | # proportion of contributors will probably not be using SublimeText 61 | # *.sublime-project 62 | 63 | # sftp configuration file 64 | sftp-config.json 65 | 66 | # Package control specific files 67 | Package Control.last-run 68 | Package Control.ca-list 69 | Package Control.ca-bundle 70 | Package Control.system-ca-bundle 71 | Package Control.cache/ 72 | Package Control.ca-certs/ 73 | bh_unicode_properties.cache 74 | 75 | # Sublime-github package stores a github token in this file 76 | # https://packagecontrol.io/packages/sublime-github 77 | GitHub.sublime-settings 78 | 79 | 80 | ### VisualStudioCode ### 81 | .vscode/* 82 | !.vscode/settings.json 83 | !.vscode/tasks.json 84 | !.vscode/launch.json 85 | !.vscode/extensions.json 86 | 87 | 88 | ### Xcode ### 89 | # Xcode 90 | # 91 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 92 | 93 | ## Build generated 94 | build/ 95 | DerivedData/ 96 | 97 | ## Various settings 98 | *.pbxuser 99 | !default.pbxuser 100 | *.mode1v3 101 | !default.mode1v3 102 | *.mode2v3 103 | !default.mode2v3 104 | *.perspectivev3 105 | !default.perspectivev3 106 | xcuserdata/ 107 | 108 | ## Other 109 | *.moved-aside 110 | *.xccheckout 111 | *.xcscmblueprint 112 | 113 | # End of https://www.gitignore.io/api/macos,windows,sublimetext,visualstudiocode,xcode 114 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Sunnyyoung 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. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | APPPATH=/Applications/Thunder.app 2 | FILEPATH=/Applications/Thunder.app/Contents/MacOS 3 | FILENAME=Thunder 4 | TWEAKFILE=ThunderTweak.m 5 | DYLIBFILE=ThunderTweak.dylib 6 | 7 | build:: 8 | clang -dynamiclib ./${TWEAKFILE} -fobjc-link-runtime -current_version 1.0 -compatibility_version 1.0 -o ./${DYLIBFILE} 9 | 10 | debug:: 11 | make clean 12 | make build 13 | DYLD_INSERT_LIBRARIES=./${DYLIBFILE} ${FILEPATH}/${FILENAME} & 14 | 15 | install:: 16 | @if ! [ -f "${FILEPATH}/${FILENAME}" ]; then\ 17 | echo "Can not find the ${FILENAME}.";\ 18 | exit 1;\ 19 | fi 20 | @if ! [ -f "./${DYLIBFILE}" ]; then\ 21 | echo "Can not find the dylib file, please build first.";\ 22 | exit 1;\ 23 | fi 24 | 25 | @if [ -d "${APPPATH}/Contents/Bundles/Thunder Store.app" ]; then\ 26 | mv ${APPPATH}/Contents/Bundles/Thunder\ Store.app ${APPPATH}/Contents/Bundles/Thunder\ Store;\ 27 | echo "Remove Thunder Store.app successed!.";\ 28 | fi 29 | @if [ -d "${APPPATH}/Contents/Bundles/XLPlayer.app" ]; then\ 30 | mv ${APPPATH}/Contents/Bundles/XLPlayer.app ${APPPATH}/Contents/Bundles/XLPlayer;\ 31 | echo "Remove XLPlayer.app successed!.";\ 32 | fi 33 | @if [ -d "${APPPATH}/Contents/PlugIns/bbassistant.bundle" ]; then\ 34 | mv ${APPPATH}/Contents/PlugIns/bbassistant.bundle ${APPPATH}/Contents/PlugIns/bbassistant.bak;\ 35 | echo "Remove bbassistant.bundle successed!.";\ 36 | fi 37 | @if [ -d "${APPPATH}/Contents/PlugIns/bottomadvertising.bundle" ]; then\ 38 | mv ${APPPATH}/Contents/PlugIns/bottomadvertising.bundle ${APPPATH}/Contents/PlugIns/bottomadvertising.bak;\ 39 | echo "Remove bottomadvertising.bundle successed!.";\ 40 | fi 41 | @if [ -d "${APPPATH}/Contents/PlugIns/myvip.bundle" ]; then\ 42 | mv ${APPPATH}/Contents/PlugIns/myvip.bundle ${APPPATH}/Contents/PlugIns/myvip.bak;\ 43 | echo "Remove myvip.bundle successed!.";\ 44 | fi 45 | @if [ -d "${APPPATH}/Contents/PlugIns/playgame.bundle" ]; then\ 46 | mv ${APPPATH}/Contents/PlugIns/playgame.bundle ${APPPATH}/Contents/PlugIns/playgame.bak;\ 47 | echo "Remove playgame.bundle successed!.";\ 48 | fi 49 | @if [ -d "${APPPATH}/Contents/PlugIns/searchresource.bundle" ]; then\ 50 | mv ${APPPATH}/Contents/PlugIns/searchresource.bundle ${APPPATH}/Contents/PlugIns/searchresource.bak;\ 51 | echo "Remove searchresource.bundle successed!.";\ 52 | fi 53 | @if [ -d "${APPPATH}/Contents/PlugIns/subtitle.bundle" ]; then\ 54 | mv ${APPPATH}/Contents/PlugIns/subtitle.bundle ${APPPATH}/Contents/PlugIns/subtitle.bak;\ 55 | echo "Remove subtitle.bundle successed!.";\ 56 | fi 57 | @if [ -d "${APPPATH}/Contents/PlugIns/thunderstore.bundle" ]; then\ 58 | mv ${APPPATH}/Contents/PlugIns/thunderstore.bundle ${APPPATH}/Contents/PlugIns/thunderstore.bak;\ 59 | echo "Remove thunderstore.bundle successed!.";\ 60 | fi 61 | @if [ -d "${APPPATH}/Contents/PlugIns/xiazaibao.bundle" ]; then\ 62 | mv ${APPPATH}/Contents/PlugIns/xiazaibao.bundle ${APPPATH}/Contents/PlugIns/xiazaibao.bak;\ 63 | echo "Remove xiazaibao.bundle successed!.";\ 64 | fi 65 | @if [ -d "${APPPATH}/Contents/PlugIns/xlplayer.bundle" ]; then\ 66 | mv ${APPPATH}/Contents/PlugIns/xlplayer.bundle ${APPPATH}/Contents/PlugIns/xlplayer.bak;\ 67 | echo "Remove xlplayer.bundle successed!.";\ 68 | fi 69 | 70 | @if [ -f "${FILEPATH}/${DYLIBFILE}" ]; then\ 71 | cp ./${DYLIBFILE} ${FILEPATH}/${DYLIBFILE};\ 72 | echo "Tweak file found! Replace with new tweak file successed!";\ 73 | else \ 74 | cp ${FILEPATH}/${FILENAME} ${FILEPATH}/${FILENAME}.bak;\ 75 | cp ./${DYLIBFILE} ${FILEPATH}/${DYLIBFILE};\ 76 | ./insert_dylib @executable_path/${DYLIBFILE} ${FILEPATH}/${FILENAME} ${FILEPATH}/${FILENAME} --all-yes;\ 77 | echo "Install successed!";\ 78 | fi 79 | 80 | uninstall:: 81 | @if ! [ -f "${FILEPATH}/${FILENAME}" ]; then\ 82 | echo "Can not find the ${FILENAME}.";\ 83 | exit 1;\ 84 | fi 85 | @if ! [ -f "${FILEPATH}/${FILENAME}.bak" ]; then\ 86 | echo "Can not find the ${FILENAME} backup file.";\ 87 | exit 1;\ 88 | fi 89 | 90 | @if [ -d "${APPPATH}/Contents/Bundles/Thunder Store" ]; then\ 91 | mv ${APPPATH}/Contents/Bundles/Thunder\ Store ${APPPATH}/Contents/Bundles/Thunder\ Store.app;\ 92 | echo "Restore Thunder Store.app successed!.";\ 93 | fi 94 | @if [ -d "${APPPATH}/Contents/Bundles/XLPlayer" ]; then\ 95 | mv ${APPPATH}/Contents/Bundles/XLPlayer ${APPPATH}/Contents/Bundles/XLPlayer.app;\ 96 | echo "Restore XLPlayer.app successed!.";\ 97 | fi 98 | @if [ -d "${APPPATH}/Contents/PlugIns/bbassistant.bak" ]; then\ 99 | mv ${APPPATH}/Contents/PlugIns/bbassistant.bak ${APPPATH}/Contents/PlugIns/bbassistant.bundle;\ 100 | echo "Restore bbassistant.bundle successed!.";\ 101 | fi 102 | @if [ -d "${APPPATH}/Contents/PlugIns/bottomadvertising.bak" ]; then\ 103 | mv ${APPPATH}/Contents/PlugIns/bottomadvertising.bak ${APPPATH}/Contents/PlugIns/bottomadvertising.bundle;\ 104 | echo "Restore bottomadvertising.bundle successed!.";\ 105 | fi 106 | @if [ -d "${APPPATH}/Contents/PlugIns/myvip.bak" ]; then\ 107 | mv ${APPPATH}/Contents/PlugIns/myvip.bak ${APPPATH}/Contents/PlugIns/myvip.bundle;\ 108 | echo "Restore myvip.bundle successed!.";\ 109 | fi 110 | @if [ -d "${APPPATH}/Contents/PlugIns/playgame.bak" ]; then\ 111 | mv ${APPPATH}/Contents/PlugIns/playgame.bak ${APPPATH}/Contents/PlugIns/playgame.bundle;\ 112 | echo "Restore playgame.bundle successed!.";\ 113 | fi 114 | @if [ -d "${APPPATH}/Contents/PlugIns/searchresource.bak" ]; then\ 115 | mv ${APPPATH}/Contents/PlugIns/searchresource.bak ${APPPATH}/Contents/PlugIns/searchresource.bundle;\ 116 | echo "Restore searchresource.bundle successed!.";\ 117 | fi 118 | @if [ -d "${APPPATH}/Contents/PlugIns/subtitle.bak" ]; then\ 119 | mv ${APPPATH}/Contents/PlugIns/subtitle.bak ${APPPATH}/Contents/PlugIns/subtitle.bundle;\ 120 | echo "Restore subtitle.bundle successed!.";\ 121 | fi 122 | @if [ -d "${APPPATH}/Contents/PlugIns/thunderstore.bak" ]; then\ 123 | mv ${APPPATH}/Contents/PlugIns/thunderstore.bak ${APPPATH}/Contents/PlugIns/thunderstore.bundle;\ 124 | echo "Restore thunderstore.bundle successed!.";\ 125 | fi 126 | @if [ -d "${APPPATH}/Contents/PlugIns/xiazaibao.bak" ]; then\ 127 | mv ${APPPATH}/Contents/PlugIns/xiazaibao.bak ${APPPATH}/Contents/PlugIns/xiazaibao.bundle;\ 128 | echo "Restore xiazaibao.bundle successed!.";\d 129 | fi 130 | @if [ -d "${APPPATH}/Contents/PlugIns/xlplayer.bak" ]; then\ 131 | mv ${APPPATH}/Contents/PlugIns/xlplayer.bak ${APPPATH}/Contents/PlugIns/xlplayer.bundle;\ 132 | echo "Restore xlplayer.bundle successed!.";\ 133 | fi 134 | 135 | @rm -rf ${FILEPATH}/${DYLIBFILE}; 136 | @mv ${FILEPATH}/${FILENAME}.bak ${FILEPATH}/${FILENAME}; 137 | @echo "Uninstall successed"; 138 | 139 | clean:: 140 | rm -rf ./${DYLIBFILE} 141 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ThunderTweak 2 | 3 | A dynamic library tweak for Thunder([2.7.8.2358 beta](http://down.sandai.net/mac/thunder_dl2.7.8.2358_Beta.dmg)) macOS. 4 | 5 | ## Screenshot 6 | 7 | ![](Screenshot/0x01.png) 8 | 9 | ## Feature 10 | 11 | - Remove unnecessary plugins or bundles 12 | - Remove auto update 13 | 14 | ## Usage 15 | 16 | - `make install` 17 | - Install or Updrade the dylib 18 | - Remove unnecessary files 19 | - `make uninstall` 20 | - Uninstall the dylib 21 | - Restore all files 22 | 23 | ## Development 24 | 25 | **Requirement: Command Line Tools** 26 | 27 | Run `xcode-select --install` to install Command Line Tools 28 | 29 | - `make build` Build the dylib file to the same dicrectory 30 | - `make debug` Build the dylib file and run `Thunder` with dynamic injection 31 | - `make clean` Clean output files 32 | 33 | ## Dependency 34 | 35 | - [insert_dylib](https://github.com/Tyilo/insert_dylib) 36 | 37 | ## License 38 | 39 | The [MIT License](LICENSE). 40 | -------------------------------------------------------------------------------- /Screenshot/0x01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnyyoung/ThunderTweak-macOS/046712b5d3b28913af16cbcd3c8ac6c8a16d7412/Screenshot/0x01.png -------------------------------------------------------------------------------- /ThunderTweak.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnyyoung/ThunderTweak-macOS/046712b5d3b28913af16cbcd3c8ac6c8a16d7412/ThunderTweak.dylib -------------------------------------------------------------------------------- /ThunderTweak.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | @implementation NSObject (ThunderTweak) 7 | 8 | #pragma mark - AutoUpdate 9 | 10 | __attribute__((constructor)) static void AutoLiveUpdateController(void) { 11 | Class class = objc_getClass("AutoLiveUpdateController"); 12 | SEL selector = NSSelectorFromString(@"init"); 13 | Method method = class_getInstanceMethod(class, selector); 14 | IMP imp = imp_implementationWithBlock(^(id self) { 15 | return nil; 16 | }); 17 | class_replaceMethod(class, selector, imp, method_getTypeEncoding(method)); 18 | } 19 | 20 | __attribute__((constructor)) static void ManualLiveUpdateWndController(void) { 21 | Class class = objc_getClass("ManualLiveUpdateWndController"); 22 | SEL selector = NSSelectorFromString(@"init"); 23 | Method method = class_getInstanceMethod(class, selector); 24 | IMP imp = imp_implementationWithBlock(^(id self) { 25 | return nil; 26 | }); 27 | class_replaceMethod(class, selector, imp, method_getTypeEncoding(method)); 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /insert_dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunnyyoung/ThunderTweak-macOS/046712b5d3b28913af16cbcd3c8ac6c8a16d7412/insert_dylib --------------------------------------------------------------------------------