├── .gitattributes ├── .gitignore ├── LICENSE ├── PlistPatchmaker.bat ├── PlistPatchmaker.command ├── PlistTool.bat ├── PlistTool.command ├── README.md ├── Resources ├── Audio │ ├── [DSDT] HDAS to HDEF.plist │ └── [KEXT] Remove AppleHDA Patches.plist ├── Base Setup │ ├── [BASE] Haswell.plist │ ├── [BASE] IvyBridge.plist │ ├── [BASE] KBL:CFL on 10.12.5-[CPU SPOOF].plist │ ├── [BASE] KBL:CFL on 10.13+.plist │ └── [BASE] SKL:KBL:CFL [10.12.6+:10.12.6].plist ├── CPU │ ├── [CPU] IvyBridge.plist │ ├── [CPU] PluginType [Haswell+].plist │ ├── [CPU] SNB and prior PM.plist │ └── [SSDT] Drop Tables CPU PM.plist ├── DSDT Fixes & Patches │ ├── [FIX] Fix Shutdown.plist │ ├── [FIX] Remove All Fixes.plist │ └── [PATCH] XOSI patch.plist ├── Disable SIP │ ├── [SYS] Disable SIP - HS and later.plist │ └── [SYS] Disable SIP - Pre-HS.plist ├── Disk │ ├── Disks Not Showing In Installer.plist │ └── External Icons Patch.plist ├── GPU │ ├── HD 530 (10.12.4 down).plist │ └── HD 530 or HD 630 (10.12.5 up).plist ├── HDMI Audio │ └── HD4000 Desktop AppleALC.plist ├── Kernel │ ├── [KERNEL] Disable Kext Logging.plist │ └── [KERNEL] MSR 0xE2 instant reboot.plist ├── NVMe │ ├── NVMe Patches 10.12.4.plist │ ├── NVMe Patches 10.12.5.plist │ ├── NVMe Patches 10.12.6.plist │ ├── NVMe patches 10.12.0.plist │ ├── NVMe patches 10.12.1 16B2555.plist │ ├── NVMe patches 10.12.1.plist │ ├── NVMe patches 10.12.2.plist │ ├── NVMe patches 10.12.3.plist │ └── Remove NVMe Patches.plist └── USB │ ├── [DSDT] EHC1 and EHC2 Rename.plist │ ├── [DSDT] XHC Rename.plist │ ├── [KEXT] Port Limit Increase.plist │ ├── [USB] FixOwnership and Inject [ADD].plist │ └── [USB] FixOwnership and Inject [REM].plist └── Scripts ├── __init__.py ├── downloader.py ├── plist.py ├── run.py └── utils.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Ensure all .bat scripts use CRLF line endings 2 | # This can prevent a number of odd batch issues 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # macserial anything 7 | macserial* 8 | 9 | # Hidden files 10 | .* 11 | 12 | # C extensions 13 | *.so 14 | 15 | # Distribution / packaging 16 | .Python 17 | build/ 18 | develop-eggs/ 19 | dist/ 20 | downloads/ 21 | eggs/ 22 | .eggs/ 23 | lib/ 24 | lib64/ 25 | parts/ 26 | sdist/ 27 | var/ 28 | wheels/ 29 | *.egg-info/ 30 | .installed.cfg 31 | *.egg 32 | MANIFEST 33 | 34 | # PyInstaller 35 | # Usually these files are written by a python script from a template 36 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 37 | *.manifest 38 | *.spec 39 | 40 | # Installer logs 41 | pip-log.txt 42 | pip-delete-this-directory.txt 43 | 44 | # Unit test / coverage reports 45 | htmlcov/ 46 | .tox/ 47 | .coverage 48 | .coverage.* 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | *.cover 53 | .hypothesis/ 54 | .pytest_cache/ 55 | 56 | # Translations 57 | *.mo 58 | *.pot 59 | 60 | # Django stuff: 61 | *.log 62 | local_settings.py 63 | db.sqlite3 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # pyenv 82 | .python-version 83 | 84 | # celery beat schedule file 85 | celerybeat-schedule 86 | 87 | # SageMath parsed files 88 | *.sage.py 89 | 90 | # Environments 91 | .env 92 | .venv 93 | env/ 94 | venv/ 95 | ENV/ 96 | env.bak/ 97 | venv.bak/ 98 | 99 | # Spyder project settings 100 | .spyderproject 101 | .spyproject 102 | 103 | # Rope project settings 104 | .ropeproject 105 | 106 | # mkdocs documentation 107 | /site 108 | 109 | # mypy 110 | .mypy_cache/ 111 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 CorpNewt 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 | -------------------------------------------------------------------------------- /PlistPatchmaker.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Get our local path before delayed expansion - allows ! in path 3 | set "thisDir=%~dp0" 4 | 5 | setlocal enableDelayedExpansion 6 | REM Setup initial vars 7 | set "script_name=" 8 | set /a tried=0 9 | set "toask=yes" 10 | set "pause_on_error=yes" 11 | set "py2v=" 12 | set "py2path=" 13 | set "py3v=" 14 | set "py3path=" 15 | set "pypath=" 16 | set "targetpy=3" 17 | 18 | REM use_py3: 19 | REM TRUE = Use if found, use py2 otherwise 20 | REM FALSE = Use py2 21 | REM FORCE = Use py3 22 | set "use_py3=TRUE" 23 | 24 | REM We'll parse if the first argument passed is 25 | REM --install-python and if so, we'll just install 26 | set "just_installing=FALSE" 27 | 28 | REM Get the system32 (or equivalent) path 29 | call :getsyspath "syspath" 30 | 31 | REM Make sure the syspath exists 32 | if "!syspath!" == "" ( 33 | if exist "%SYSTEMROOT%\system32\cmd.exe" ( 34 | if exist "%SYSTEMROOT%\system32\reg.exe" ( 35 | if exist "%SYSTEMROOT%\system32\where.exe" ( 36 | REM Fall back on the default path if it exists 37 | set "ComSpec=%SYSTEMROOT%\system32\cmd.exe" 38 | set "syspath=%SYSTEMROOT%\system32\" 39 | ) 40 | ) 41 | ) 42 | if "!syspath!" == "" ( 43 | cls 44 | echo ### ### 45 | echo # Warning # 46 | echo ### ### 47 | echo. 48 | echo Could not locate cmd.exe, reg.exe, or where.exe 49 | echo. 50 | echo Please ensure your ComSpec environment variable is properly configured and 51 | echo points directly to cmd.exe, then try again. 52 | echo. 53 | echo Current CompSpec Value: "%ComSpec%" 54 | echo. 55 | echo Press [enter] to quit. 56 | pause > nul 57 | exit /b 1 58 | ) 59 | ) 60 | 61 | if "%~1" == "--install-python" ( 62 | set "just_installing=TRUE" 63 | goto installpy 64 | ) 65 | 66 | goto checkscript 67 | 68 | :checkscript 69 | REM Check for our script first 70 | set "looking_for=!script_name!" 71 | if "!script_name!" == "" ( 72 | set "looking_for=%~n0.py or %~n0.command" 73 | set "script_name=%~n0.py" 74 | if not exist "!thisDir!\!script_name!" ( 75 | set "script_name=%~n0.command" 76 | ) 77 | ) 78 | if not exist "!thisDir!\!script_name!" ( 79 | echo Could not find !looking_for!. 80 | echo Please make sure to run this script from the same directory 81 | echo as !looking_for!. 82 | echo. 83 | echo Press [enter] to quit. 84 | pause > nul 85 | exit /b 1 86 | ) 87 | goto checkpy 88 | 89 | :checkpy 90 | call :updatepath 91 | for /f "USEBACKQ tokens=*" %%x in (`!syspath!where.exe python 2^> nul`) do ( call :checkpyversion "%%x" "py2v" "py2path" "py3v" "py3path" ) 92 | for /f "USEBACKQ tokens=*" %%x in (`!syspath!where.exe python3 2^> nul`) do ( call :checkpyversion "%%x" "py2v" "py2path" "py3v" "py3path" ) 93 | for /f "USEBACKQ tokens=*" %%x in (`!syspath!where.exe py 2^> nul`) do ( call :checkpylauncher "%%x" "py2v" "py2path" "py3v" "py3path" ) 94 | REM Walk our returns to see if we need to install 95 | if /i "!use_py3!" == "FALSE" ( 96 | set "targetpy=2" 97 | set "pypath=!py2path!" 98 | ) else if /i "!use_py3!" == "FORCE" ( 99 | set "pypath=!py3path!" 100 | ) else if /i "!use_py3!" == "TRUE" ( 101 | set "pypath=!py3path!" 102 | if "!pypath!" == "" set "pypath=!py2path!" 103 | ) 104 | if not "!pypath!" == "" ( 105 | goto runscript 106 | ) 107 | if !tried! lss 1 ( 108 | if /i "!toask!"=="yes" ( 109 | REM Better ask permission first 110 | goto askinstall 111 | ) else ( 112 | goto installpy 113 | ) 114 | ) else ( 115 | cls 116 | echo ### ### 117 | echo # Warning # 118 | echo ### ### 119 | echo. 120 | REM Couldn't install for whatever reason - give the error message 121 | echo Python is not installed or not found in your PATH var. 122 | echo Please install it from https://www.python.org/downloads/windows/ 123 | echo. 124 | echo Make sure you check the box labeled: 125 | echo. 126 | echo "Add Python X.X to PATH" 127 | echo. 128 | echo Where X.X is the py version you're installing. 129 | echo. 130 | echo Press [enter] to quit. 131 | pause > nul 132 | exit /b 1 133 | ) 134 | goto runscript 135 | 136 | :checkpylauncher 137 | REM Attempt to check the latest python 2 and 3 versions via the py launcher 138 | for /f "USEBACKQ tokens=*" %%x in (`%~1 -2 -c "import sys; print(sys.executable)" 2^> nul`) do ( call :checkpyversion "%%x" "%~2" "%~3" "%~4" "%~5" ) 139 | for /f "USEBACKQ tokens=*" %%x in (`%~1 -3 -c "import sys; print(sys.executable)" 2^> nul`) do ( call :checkpyversion "%%x" "%~2" "%~3" "%~4" "%~5" ) 140 | goto :EOF 141 | 142 | :checkpyversion 143 | set "version="&for /f "tokens=2* USEBACKQ delims= " %%a in (`"%~1" -V 2^>^&1`) do ( 144 | REM Ensure we have a version number 145 | call :isnumber "%%a" 146 | if not "!errorlevel!" == "0" goto :EOF 147 | set "version=%%a" 148 | ) 149 | if not defined version goto :EOF 150 | if "!version:~0,1!" == "2" ( 151 | REM Python 2 152 | call :comparepyversion "!version!" "!%~2!" 153 | if "!errorlevel!" == "1" ( 154 | set "%~2=!version!" 155 | set "%~3=%~1" 156 | ) 157 | ) else ( 158 | REM Python 3 159 | call :comparepyversion "!version!" "!%~4!" 160 | if "!errorlevel!" == "1" ( 161 | set "%~4=!version!" 162 | set "%~5=%~1" 163 | ) 164 | ) 165 | goto :EOF 166 | 167 | :isnumber 168 | set "var="&for /f "delims=0123456789." %%i in ("%~1") do set var=%%i 169 | if defined var (exit /b 1) 170 | exit /b 0 171 | 172 | :comparepyversion 173 | REM Exits with status 0 if equal, 1 if v1 gtr v2, 2 if v1 lss v2 174 | for /f "tokens=1,2,3 delims=." %%a in ("%~1") do ( 175 | set a1=%%a 176 | set a2=%%b 177 | set a3=%%c 178 | ) 179 | for /f "tokens=1,2,3 delims=." %%a in ("%~2") do ( 180 | set b1=%%a 181 | set b2=%%b 182 | set b3=%%c 183 | ) 184 | if not defined a1 set a1=0 185 | if not defined a2 set a2=0 186 | if not defined a3 set a3=0 187 | if not defined b1 set b1=0 188 | if not defined b2 set b2=0 189 | if not defined b3 set b3=0 190 | if %a1% gtr %b1% exit /b 1 191 | if %a1% lss %b1% exit /b 2 192 | if %a2% gtr %b2% exit /b 1 193 | if %a2% lss %b2% exit /b 2 194 | if %a3% gtr %b3% exit /b 1 195 | if %a3% lss %b3% exit /b 2 196 | exit /b 0 197 | 198 | :askinstall 199 | cls 200 | echo ### ### 201 | echo # Python Not Found # 202 | echo ### ### 203 | echo. 204 | echo Python !targetpy! was not found on the system or in the PATH var. 205 | echo. 206 | set /p "menu=Would you like to install it now? [y/n]: " 207 | if /i "!menu!"=="y" ( 208 | REM We got the OK - install it 209 | goto installpy 210 | ) else if "!menu!"=="n" ( 211 | REM No OK here... 212 | set /a tried=!tried!+1 213 | goto checkpy 214 | ) 215 | REM Incorrect answer - go back 216 | goto askinstall 217 | 218 | :installpy 219 | REM This will attempt to download and install python 220 | REM First we get the html for the python downloads page for Windows 221 | set /a tried=!tried!+1 222 | cls 223 | echo ### ### 224 | echo # Installing Python # 225 | echo ### ### 226 | echo. 227 | echo Gathering info from https://www.python.org/downloads/windows/... 228 | powershell -command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;(new-object System.Net.WebClient).DownloadFile('https://www.python.org/downloads/windows/','%TEMP%\pyurl.txt')" 229 | REM Extract it if it's gzip compressed 230 | powershell -command "$infile='%TEMP%\pyurl.txt';$outfile='%TEMP%\pyurl.temp';try{$input=New-Object System.IO.FileStream $infile,([IO.FileMode]::Open),([IO.FileAccess]::Read),([IO.FileShare]::Read);$output=New-Object System.IO.FileStream $outfile,([IO.FileMode]::Create),([IO.FileAccess]::Write),([IO.FileShare]::None);$gzipStream=New-Object System.IO.Compression.GzipStream $input,([IO.Compression.CompressionMode]::Decompress);$buffer=New-Object byte[](1024);while($true){$read=$gzipstream.Read($buffer,0,1024);if($read -le 0){break};$output.Write($buffer,0,$read)};$gzipStream.Close();$output.Close();$input.Close();Move-Item -Path $outfile -Destination $infile -Force}catch{}" 231 | if not exist "%TEMP%\pyurl.txt" ( 232 | if /i "!just_installing!" == "TRUE" ( 233 | echo Failed to get info 234 | exit /b 1 235 | ) else ( 236 | goto checkpy 237 | ) 238 | ) 239 | echo Parsing for latest... 240 | pushd "%TEMP%" 241 | :: Version detection code slimmed by LussacZheng (https://github.com/corpnewt/gibMacOS/issues/20) 242 | for /f "tokens=9 delims=< " %%x in ('findstr /i /c:"Latest Python !targetpy! Release" pyurl.txt') do ( set "release=%%x" ) 243 | popd 244 | if "!release!" == "" ( 245 | if /i "!just_installing!" == "TRUE" ( 246 | echo Failed to get python version 247 | exit /b 1 248 | ) else ( 249 | goto checkpy 250 | ) 251 | ) 252 | echo Found Python !release! - Downloading... 253 | REM Let's delete our txt file now - we no longer need it 254 | del "%TEMP%\pyurl.txt" 255 | REM At this point - we should have the version number. 256 | REM We can build the url like so: "https://www.python.org/ftp/python/[version]/python-[version]-amd64.exe" 257 | set "url=https://www.python.org/ftp/python/!release!/python-!release!-amd64.exe" 258 | set "pytype=exe" 259 | if "!targetpy!" == "2" ( 260 | set "url=https://www.python.org/ftp/python/!release!/python-!release!.amd64.msi" 261 | set "pytype=msi" 262 | ) 263 | REM Now we download it with our slick powershell command 264 | powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object System.Net.WebClient).DownloadFile('!url!','%TEMP%\pyinstall.!pytype!')" 265 | REM If it doesn't exist - we bail 266 | if not exist "%TEMP%\pyinstall.!pytype!" ( 267 | if /i "!just_installing!" == "TRUE" ( 268 | echo Failed to download installer 269 | exit /b 1 270 | ) else ( 271 | goto checkpy 272 | ) 273 | ) 274 | REM It should exist at this point - let's run it to install silently 275 | echo Installing... 276 | pushd "%TEMP%" 277 | if /i "!pytype!" == "exe" ( 278 | echo pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0 279 | pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0 280 | ) else ( 281 | set "foldername=!release:.=!" 282 | echo msiexec /i pyinstall.msi /qb ADDLOCAL=ALL TARGETDIR="%LocalAppData%\Programs\Python\Python!foldername:~0,2!" 283 | msiexec /i pyinstall.msi /qb ADDLOCAL=ALL TARGETDIR="%LocalAppData%\Programs\Python\Python!foldername:~0,2!" 284 | ) 285 | popd 286 | echo Installer finished with %ERRORLEVEL% status. 287 | REM Now we should be able to delete the installer and check for py again 288 | del "%TEMP%\pyinstall.!pytype!" 289 | REM If it worked, then we should have python in our PATH 290 | REM this does not get updated right away though - let's try 291 | REM manually updating the local PATH var 292 | call :updatepath 293 | if /i "!just_installing!" == "TRUE" ( 294 | echo. 295 | echo Done. 296 | ) else ( 297 | goto checkpy 298 | ) 299 | exit /b 300 | 301 | :runscript 302 | REM Python found 303 | cls 304 | set "args=%*" 305 | set "args=!args:"=!" 306 | if "!args!"=="" ( 307 | "!pypath!" "!thisDir!!script_name!" 308 | ) else ( 309 | "!pypath!" "!thisDir!!script_name!" %* 310 | ) 311 | if /i "!pause_on_error!" == "yes" ( 312 | if not "%ERRORLEVEL%" == "0" ( 313 | echo. 314 | echo Script exited with error code: %ERRORLEVEL% 315 | echo. 316 | echo Press [enter] to exit... 317 | pause > nul 318 | ) 319 | ) 320 | goto :EOF 321 | 322 | :undouble 323 | REM Helper function to strip doubles of a single character out of a string recursively 324 | set "string_value=%~2" 325 | :undouble_continue 326 | set "check=!string_value:%~3%~3=%~3!" 327 | if not "!check!" == "!string_value!" ( 328 | set "string_value=!check!" 329 | goto :undouble_continue 330 | ) 331 | set "%~1=!check!" 332 | goto :EOF 333 | 334 | :updatepath 335 | set "spath=" 336 | set "upath=" 337 | for /f "USEBACKQ tokens=2* delims= " %%i in (`!syspath!reg.exe query "HKCU\Environment" /v "Path" 2^> nul`) do ( if not "%%j" == "" set "upath=%%j" ) 338 | for /f "USEBACKQ tokens=2* delims= " %%i in (`!syspath!reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^> nul`) do ( if not "%%j" == "" set "spath=%%j" ) 339 | if not "%spath%" == "" ( 340 | REM We got something in the system path 341 | set "PATH=%spath%" 342 | if not "%upath%" == "" ( 343 | REM We also have something in the user path 344 | set "PATH=%PATH%;%upath%" 345 | ) 346 | ) else if not "%upath%" == "" ( 347 | set "PATH=%upath%" 348 | ) 349 | REM Remove double semicolons from the adjusted PATH 350 | call :undouble "PATH" "%PATH%" ";" 351 | goto :EOF 352 | 353 | :getsyspath 354 | REM Helper method to return a valid path to cmd.exe, reg.exe, and where.exe by 355 | REM walking the ComSpec var - will also repair it in memory if need be 356 | REM Strip double semi-colons 357 | call :undouble "temppath" "%ComSpec%" ";" 358 | 359 | REM Dirty hack to leverage the "line feed" approach - there are some odd side 360 | REM effects with this. Do not use this variable name in comments near this 361 | REM line - as it seems to behave erradically. 362 | (set LF=^ 363 | %=this line is empty=% 364 | ) 365 | REM Replace instances of semi-colons with a line feed and wrap 366 | REM in parenthesis to work around some strange batch behavior 367 | set "testpath=%temppath:;=!LF!%" 368 | 369 | REM Let's walk each path and test if cmd.exe, reg.exe, and where.exe exist there 370 | set /a found=0 371 | for /f "tokens=* delims=" %%i in ("!testpath!") do ( 372 | REM Only continue if we haven't found it yet 373 | if not "%%i" == "" ( 374 | if !found! lss 1 ( 375 | set "checkpath=%%i" 376 | REM Remove "cmd.exe" from the end if it exists 377 | if /i "!checkpath:~-7!" == "cmd.exe" ( 378 | set "checkpath=!checkpath:~0,-7!" 379 | ) 380 | REM Pad the end with a backslash if needed 381 | if not "!checkpath:~-1!" == "\" ( 382 | set "checkpath=!checkpath!\" 383 | ) 384 | REM Let's see if cmd, reg, and where exist there - and set it if so 385 | if EXIST "!checkpath!cmd.exe" ( 386 | if EXIST "!checkpath!reg.exe" ( 387 | if EXIST "!checkpath!where.exe" ( 388 | set /a found=1 389 | set "ComSpec=!checkpath!cmd.exe" 390 | set "%~1=!checkpath!" 391 | ) 392 | ) 393 | ) 394 | ) 395 | ) 396 | ) 397 | goto :EOF 398 | -------------------------------------------------------------------------------- /PlistPatchmaker.command: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import plistlib 3 | import os 4 | import sys 5 | import time 6 | 7 | script_path = os.path.dirname(os.path.realpath(__file__)) 8 | 9 | def create_patch(add_plist = {}, rem_plist = {}, desc = "", gen = None, strip = False): 10 | new_plist = { "Add": add_plist, "Remove": rem_plist, "Description": desc } 11 | if gen: 12 | new_plist["GenSMBIOS"] = gen 13 | if strip: 14 | new_plist["StripComments"] = True 15 | return new_plist 16 | 17 | def grab(prompt): 18 | if sys.version_info >= (3, 0): 19 | return input(prompt) 20 | else: 21 | return str(raw_input(prompt)) 22 | 23 | # OS Independent clear method 24 | def cls(): 25 | os.system('cls' if os.name=='nt' else 'clear') 26 | # Set Windows color to blue background, white foreground 27 | if os.name=='nt': 28 | os.system('COLOR 17') 29 | 30 | def check_path(path): 31 | # Add os checks for path escaping/quote stripping 32 | if os.name == 'nt': 33 | # Windows - remove quotes 34 | path = path.replace('"', "") 35 | else: 36 | # Unix - remove quotes and space-escapes 37 | path = path.replace("\\", "").replace('"', "") 38 | # Remove trailing space if drag and dropped 39 | if path[len(path)-1:] == " ": 40 | path = path[:-1] 41 | # Expand tilde 42 | path = os.path.expanduser(path) 43 | if not os.path.exists(path): 44 | print("That file doesn't exist!") 45 | return None 46 | return path 47 | 48 | def main(): 49 | 50 | add_plist = None 51 | rem_plist = None 52 | desc = "" 53 | smbios = "" 54 | name = "" 55 | strip = False 56 | existing_add = None 57 | existing_rem = None 58 | existing_des = None 59 | 60 | cls() 61 | 62 | print("This script can help make plist patches for Plist-Tool") 63 | print("Each entry must have at least an Add or Remove section") 64 | print("and a description.") 65 | print(" ") 66 | print("To leave a section empty (eg you're adding but not") 67 | print("removing), simply press enter at the prompt.") 68 | print(" ") 69 | print("If you'd like to edit an existing patch, drag and") 70 | print("drop it on the chat now - if you'd like to create") 71 | edit_plist = grab("a new patch, just press enter: ") 72 | print(" ") 73 | 74 | if not edit_plist == "": 75 | # We need to edit 76 | edit_plist = check_path(edit_plist) 77 | if not edit_plist: 78 | exit(1) 79 | test_plist = plistlib.readPlist(edit_plist) 80 | existing_add = test_plist["Add"] 81 | existing_rem = test_plist["Remove"] 82 | existing_des = test_plist["Description"] 83 | 84 | add_plist = grab("Please select the plist containing the information to add: ") 85 | if not add_plist == "": 86 | add_plist = check_path(add_plist) 87 | if not add_plist: 88 | exit(1) 89 | add_plist = plistlib.readPlist(add_plist) 90 | if "Add" in add_plist: 91 | # Only get the add sections 92 | add_plist = add_plist["Add"] 93 | else: 94 | add_plist = {} 95 | 96 | if add_plist == {} and existing_add: 97 | add_plist = existing_add 98 | 99 | print(" ") 100 | 101 | rem_plist = grab("Please select the plist containing the information to remove: ") 102 | if not rem_plist == "": 103 | rem_plist = check_path(rem_plist) 104 | if not rem_plist: 105 | exit(1) 106 | rem_plist = plistlib.readPlist(rem_plist) 107 | if "Remove" in rem_plist: 108 | # Only get the remove sections 109 | rem_plist = rem_plist["Remove"] 110 | else: 111 | rem_plist = {} 112 | 113 | if rem_plist == {} and existing_rem: 114 | rem_plist = existing_rem 115 | 116 | print(" ") 117 | 118 | while desc == "": 119 | desc = grab("Please enter the description for the patch: ") 120 | if existing_des and desc == "": 121 | break 122 | 123 | if desc == "" and existing_des: 124 | desc = existing_des 125 | 126 | print("") 127 | 128 | smbios = grab("Please enter the SMBIOS to gen (leave blank for none): ") 129 | if not len(smbios): 130 | smbios = None 131 | 132 | print("") 133 | 134 | while True: 135 | c = grab("Would you like to strip comments with this patch? (y/n): ") 136 | if c.lower() == "y": 137 | strip = True 138 | break 139 | elif c.lower() == "n": 140 | strip = False 141 | break 142 | 143 | if add_plist == {} and rem_plist == {} and strip == False: 144 | print("You need to at least add/remove something or strip comments...") 145 | exit(1) 146 | 147 | plist_patch = create_patch(add_plist, rem_plist, desc, smbios, strip) 148 | 149 | if not plist_patch: 150 | print("Something went wrong!") 151 | exit(1) 152 | 153 | print(" ") 154 | 155 | if edit_plist == "": 156 | 157 | while name == "": 158 | name = grab("Please enter the name for your patch - It will be \nlocated in the same directory as this script: ") 159 | if not name.lower().endswith(".plist"): 160 | name = name + ".plist" 161 | if os.path.exists(script_path + "/" + name): 162 | print("That file already exists...\n") 163 | name = "" 164 | print("\nWriting plist...\n") 165 | plistlib.writePlist(plist_patch, script_path + "/" + name) 166 | else: 167 | print("\nWriting plist...\n") 168 | plistlib.writePlist(plist_patch, edit_plist) 169 | 170 | print("Done!\n\n") 171 | again = grab("Work on another patch? (y/n): ") 172 | if again[:1].lower() == "y": 173 | main() 174 | else: 175 | exit(0) 176 | 177 | main() 178 | -------------------------------------------------------------------------------- /PlistTool.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Get our local path before delayed expansion - allows ! in path 3 | set "thisDir=%~dp0" 4 | 5 | setlocal enableDelayedExpansion 6 | REM Setup initial vars 7 | set "script_name=" 8 | set /a tried=0 9 | set "toask=yes" 10 | set "pause_on_error=yes" 11 | set "py2v=" 12 | set "py2path=" 13 | set "py3v=" 14 | set "py3path=" 15 | set "pypath=" 16 | set "targetpy=3" 17 | 18 | REM use_py3: 19 | REM TRUE = Use if found, use py2 otherwise 20 | REM FALSE = Use py2 21 | REM FORCE = Use py3 22 | set "use_py3=TRUE" 23 | 24 | REM We'll parse if the first argument passed is 25 | REM --install-python and if so, we'll just install 26 | set "just_installing=FALSE" 27 | 28 | REM Get the system32 (or equivalent) path 29 | call :getsyspath "syspath" 30 | 31 | REM Make sure the syspath exists 32 | if "!syspath!" == "" ( 33 | if exist "%SYSTEMROOT%\system32\cmd.exe" ( 34 | if exist "%SYSTEMROOT%\system32\reg.exe" ( 35 | if exist "%SYSTEMROOT%\system32\where.exe" ( 36 | REM Fall back on the default path if it exists 37 | set "ComSpec=%SYSTEMROOT%\system32\cmd.exe" 38 | set "syspath=%SYSTEMROOT%\system32\" 39 | ) 40 | ) 41 | ) 42 | if "!syspath!" == "" ( 43 | cls 44 | echo ### ### 45 | echo # Warning # 46 | echo ### ### 47 | echo. 48 | echo Could not locate cmd.exe, reg.exe, or where.exe 49 | echo. 50 | echo Please ensure your ComSpec environment variable is properly configured and 51 | echo points directly to cmd.exe, then try again. 52 | echo. 53 | echo Current CompSpec Value: "%ComSpec%" 54 | echo. 55 | echo Press [enter] to quit. 56 | pause > nul 57 | exit /b 1 58 | ) 59 | ) 60 | 61 | if "%~1" == "--install-python" ( 62 | set "just_installing=TRUE" 63 | goto installpy 64 | ) 65 | 66 | goto checkscript 67 | 68 | :checkscript 69 | REM Check for our script first 70 | set "looking_for=!script_name!" 71 | if "!script_name!" == "" ( 72 | set "looking_for=%~n0.py or %~n0.command" 73 | set "script_name=%~n0.py" 74 | if not exist "!thisDir!\!script_name!" ( 75 | set "script_name=%~n0.command" 76 | ) 77 | ) 78 | if not exist "!thisDir!\!script_name!" ( 79 | echo Could not find !looking_for!. 80 | echo Please make sure to run this script from the same directory 81 | echo as !looking_for!. 82 | echo. 83 | echo Press [enter] to quit. 84 | pause > nul 85 | exit /b 1 86 | ) 87 | goto checkpy 88 | 89 | :checkpy 90 | call :updatepath 91 | for /f "USEBACKQ tokens=*" %%x in (`!syspath!where.exe python 2^> nul`) do ( call :checkpyversion "%%x" "py2v" "py2path" "py3v" "py3path" ) 92 | for /f "USEBACKQ tokens=*" %%x in (`!syspath!where.exe python3 2^> nul`) do ( call :checkpyversion "%%x" "py2v" "py2path" "py3v" "py3path" ) 93 | for /f "USEBACKQ tokens=*" %%x in (`!syspath!where.exe py 2^> nul`) do ( call :checkpylauncher "%%x" "py2v" "py2path" "py3v" "py3path" ) 94 | REM Walk our returns to see if we need to install 95 | if /i "!use_py3!" == "FALSE" ( 96 | set "targetpy=2" 97 | set "pypath=!py2path!" 98 | ) else if /i "!use_py3!" == "FORCE" ( 99 | set "pypath=!py3path!" 100 | ) else if /i "!use_py3!" == "TRUE" ( 101 | set "pypath=!py3path!" 102 | if "!pypath!" == "" set "pypath=!py2path!" 103 | ) 104 | if not "!pypath!" == "" ( 105 | goto runscript 106 | ) 107 | if !tried! lss 1 ( 108 | if /i "!toask!"=="yes" ( 109 | REM Better ask permission first 110 | goto askinstall 111 | ) else ( 112 | goto installpy 113 | ) 114 | ) else ( 115 | cls 116 | echo ### ### 117 | echo # Warning # 118 | echo ### ### 119 | echo. 120 | REM Couldn't install for whatever reason - give the error message 121 | echo Python is not installed or not found in your PATH var. 122 | echo Please install it from https://www.python.org/downloads/windows/ 123 | echo. 124 | echo Make sure you check the box labeled: 125 | echo. 126 | echo "Add Python X.X to PATH" 127 | echo. 128 | echo Where X.X is the py version you're installing. 129 | echo. 130 | echo Press [enter] to quit. 131 | pause > nul 132 | exit /b 1 133 | ) 134 | goto runscript 135 | 136 | :checkpylauncher 137 | REM Attempt to check the latest python 2 and 3 versions via the py launcher 138 | for /f "USEBACKQ tokens=*" %%x in (`%~1 -2 -c "import sys; print(sys.executable)" 2^> nul`) do ( call :checkpyversion "%%x" "%~2" "%~3" "%~4" "%~5" ) 139 | for /f "USEBACKQ tokens=*" %%x in (`%~1 -3 -c "import sys; print(sys.executable)" 2^> nul`) do ( call :checkpyversion "%%x" "%~2" "%~3" "%~4" "%~5" ) 140 | goto :EOF 141 | 142 | :checkpyversion 143 | set "version="&for /f "tokens=2* USEBACKQ delims= " %%a in (`"%~1" -V 2^>^&1`) do ( 144 | REM Ensure we have a version number 145 | call :isnumber "%%a" 146 | if not "!errorlevel!" == "0" goto :EOF 147 | set "version=%%a" 148 | ) 149 | if not defined version goto :EOF 150 | if "!version:~0,1!" == "2" ( 151 | REM Python 2 152 | call :comparepyversion "!version!" "!%~2!" 153 | if "!errorlevel!" == "1" ( 154 | set "%~2=!version!" 155 | set "%~3=%~1" 156 | ) 157 | ) else ( 158 | REM Python 3 159 | call :comparepyversion "!version!" "!%~4!" 160 | if "!errorlevel!" == "1" ( 161 | set "%~4=!version!" 162 | set "%~5=%~1" 163 | ) 164 | ) 165 | goto :EOF 166 | 167 | :isnumber 168 | set "var="&for /f "delims=0123456789." %%i in ("%~1") do set var=%%i 169 | if defined var (exit /b 1) 170 | exit /b 0 171 | 172 | :comparepyversion 173 | REM Exits with status 0 if equal, 1 if v1 gtr v2, 2 if v1 lss v2 174 | for /f "tokens=1,2,3 delims=." %%a in ("%~1") do ( 175 | set a1=%%a 176 | set a2=%%b 177 | set a3=%%c 178 | ) 179 | for /f "tokens=1,2,3 delims=." %%a in ("%~2") do ( 180 | set b1=%%a 181 | set b2=%%b 182 | set b3=%%c 183 | ) 184 | if not defined a1 set a1=0 185 | if not defined a2 set a2=0 186 | if not defined a3 set a3=0 187 | if not defined b1 set b1=0 188 | if not defined b2 set b2=0 189 | if not defined b3 set b3=0 190 | if %a1% gtr %b1% exit /b 1 191 | if %a1% lss %b1% exit /b 2 192 | if %a2% gtr %b2% exit /b 1 193 | if %a2% lss %b2% exit /b 2 194 | if %a3% gtr %b3% exit /b 1 195 | if %a3% lss %b3% exit /b 2 196 | exit /b 0 197 | 198 | :askinstall 199 | cls 200 | echo ### ### 201 | echo # Python Not Found # 202 | echo ### ### 203 | echo. 204 | echo Python !targetpy! was not found on the system or in the PATH var. 205 | echo. 206 | set /p "menu=Would you like to install it now? [y/n]: " 207 | if /i "!menu!"=="y" ( 208 | REM We got the OK - install it 209 | goto installpy 210 | ) else if "!menu!"=="n" ( 211 | REM No OK here... 212 | set /a tried=!tried!+1 213 | goto checkpy 214 | ) 215 | REM Incorrect answer - go back 216 | goto askinstall 217 | 218 | :installpy 219 | REM This will attempt to download and install python 220 | REM First we get the html for the python downloads page for Windows 221 | set /a tried=!tried!+1 222 | cls 223 | echo ### ### 224 | echo # Installing Python # 225 | echo ### ### 226 | echo. 227 | echo Gathering info from https://www.python.org/downloads/windows/... 228 | powershell -command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;(new-object System.Net.WebClient).DownloadFile('https://www.python.org/downloads/windows/','%TEMP%\pyurl.txt')" 229 | REM Extract it if it's gzip compressed 230 | powershell -command "$infile='%TEMP%\pyurl.txt';$outfile='%TEMP%\pyurl.temp';try{$input=New-Object System.IO.FileStream $infile,([IO.FileMode]::Open),([IO.FileAccess]::Read),([IO.FileShare]::Read);$output=New-Object System.IO.FileStream $outfile,([IO.FileMode]::Create),([IO.FileAccess]::Write),([IO.FileShare]::None);$gzipStream=New-Object System.IO.Compression.GzipStream $input,([IO.Compression.CompressionMode]::Decompress);$buffer=New-Object byte[](1024);while($true){$read=$gzipstream.Read($buffer,0,1024);if($read -le 0){break};$output.Write($buffer,0,$read)};$gzipStream.Close();$output.Close();$input.Close();Move-Item -Path $outfile -Destination $infile -Force}catch{}" 231 | if not exist "%TEMP%\pyurl.txt" ( 232 | if /i "!just_installing!" == "TRUE" ( 233 | echo Failed to get info 234 | exit /b 1 235 | ) else ( 236 | goto checkpy 237 | ) 238 | ) 239 | echo Parsing for latest... 240 | pushd "%TEMP%" 241 | :: Version detection code slimmed by LussacZheng (https://github.com/corpnewt/gibMacOS/issues/20) 242 | for /f "tokens=9 delims=< " %%x in ('findstr /i /c:"Latest Python !targetpy! Release" pyurl.txt') do ( set "release=%%x" ) 243 | popd 244 | if "!release!" == "" ( 245 | if /i "!just_installing!" == "TRUE" ( 246 | echo Failed to get python version 247 | exit /b 1 248 | ) else ( 249 | goto checkpy 250 | ) 251 | ) 252 | echo Found Python !release! - Downloading... 253 | REM Let's delete our txt file now - we no longer need it 254 | del "%TEMP%\pyurl.txt" 255 | REM At this point - we should have the version number. 256 | REM We can build the url like so: "https://www.python.org/ftp/python/[version]/python-[version]-amd64.exe" 257 | set "url=https://www.python.org/ftp/python/!release!/python-!release!-amd64.exe" 258 | set "pytype=exe" 259 | if "!targetpy!" == "2" ( 260 | set "url=https://www.python.org/ftp/python/!release!/python-!release!.amd64.msi" 261 | set "pytype=msi" 262 | ) 263 | REM Now we download it with our slick powershell command 264 | powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object System.Net.WebClient).DownloadFile('!url!','%TEMP%\pyinstall.!pytype!')" 265 | REM If it doesn't exist - we bail 266 | if not exist "%TEMP%\pyinstall.!pytype!" ( 267 | if /i "!just_installing!" == "TRUE" ( 268 | echo Failed to download installer 269 | exit /b 1 270 | ) else ( 271 | goto checkpy 272 | ) 273 | ) 274 | REM It should exist at this point - let's run it to install silently 275 | echo Installing... 276 | pushd "%TEMP%" 277 | if /i "!pytype!" == "exe" ( 278 | echo pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0 279 | pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0 280 | ) else ( 281 | set "foldername=!release:.=!" 282 | echo msiexec /i pyinstall.msi /qb ADDLOCAL=ALL TARGETDIR="%LocalAppData%\Programs\Python\Python!foldername:~0,2!" 283 | msiexec /i pyinstall.msi /qb ADDLOCAL=ALL TARGETDIR="%LocalAppData%\Programs\Python\Python!foldername:~0,2!" 284 | ) 285 | popd 286 | echo Installer finished with %ERRORLEVEL% status. 287 | REM Now we should be able to delete the installer and check for py again 288 | del "%TEMP%\pyinstall.!pytype!" 289 | REM If it worked, then we should have python in our PATH 290 | REM this does not get updated right away though - let's try 291 | REM manually updating the local PATH var 292 | call :updatepath 293 | if /i "!just_installing!" == "TRUE" ( 294 | echo. 295 | echo Done. 296 | ) else ( 297 | goto checkpy 298 | ) 299 | exit /b 300 | 301 | :runscript 302 | REM Python found 303 | cls 304 | set "args=%*" 305 | set "args=!args:"=!" 306 | if "!args!"=="" ( 307 | "!pypath!" "!thisDir!!script_name!" 308 | ) else ( 309 | "!pypath!" "!thisDir!!script_name!" %* 310 | ) 311 | if /i "!pause_on_error!" == "yes" ( 312 | if not "%ERRORLEVEL%" == "0" ( 313 | echo. 314 | echo Script exited with error code: %ERRORLEVEL% 315 | echo. 316 | echo Press [enter] to exit... 317 | pause > nul 318 | ) 319 | ) 320 | goto :EOF 321 | 322 | :undouble 323 | REM Helper function to strip doubles of a single character out of a string recursively 324 | set "string_value=%~2" 325 | :undouble_continue 326 | set "check=!string_value:%~3%~3=%~3!" 327 | if not "!check!" == "!string_value!" ( 328 | set "string_value=!check!" 329 | goto :undouble_continue 330 | ) 331 | set "%~1=!check!" 332 | goto :EOF 333 | 334 | :updatepath 335 | set "spath=" 336 | set "upath=" 337 | for /f "USEBACKQ tokens=2* delims= " %%i in (`!syspath!reg.exe query "HKCU\Environment" /v "Path" 2^> nul`) do ( if not "%%j" == "" set "upath=%%j" ) 338 | for /f "USEBACKQ tokens=2* delims= " %%i in (`!syspath!reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^> nul`) do ( if not "%%j" == "" set "spath=%%j" ) 339 | if not "%spath%" == "" ( 340 | REM We got something in the system path 341 | set "PATH=%spath%" 342 | if not "%upath%" == "" ( 343 | REM We also have something in the user path 344 | set "PATH=%PATH%;%upath%" 345 | ) 346 | ) else if not "%upath%" == "" ( 347 | set "PATH=%upath%" 348 | ) 349 | REM Remove double semicolons from the adjusted PATH 350 | call :undouble "PATH" "%PATH%" ";" 351 | goto :EOF 352 | 353 | :getsyspath 354 | REM Helper method to return a valid path to cmd.exe, reg.exe, and where.exe by 355 | REM walking the ComSpec var - will also repair it in memory if need be 356 | REM Strip double semi-colons 357 | call :undouble "temppath" "%ComSpec%" ";" 358 | 359 | REM Dirty hack to leverage the "line feed" approach - there are some odd side 360 | REM effects with this. Do not use this variable name in comments near this 361 | REM line - as it seems to behave erradically. 362 | (set LF=^ 363 | %=this line is empty=% 364 | ) 365 | REM Replace instances of semi-colons with a line feed and wrap 366 | REM in parenthesis to work around some strange batch behavior 367 | set "testpath=%temppath:;=!LF!%" 368 | 369 | REM Let's walk each path and test if cmd.exe, reg.exe, and where.exe exist there 370 | set /a found=0 371 | for /f "tokens=* delims=" %%i in ("!testpath!") do ( 372 | REM Only continue if we haven't found it yet 373 | if not "%%i" == "" ( 374 | if !found! lss 1 ( 375 | set "checkpath=%%i" 376 | REM Remove "cmd.exe" from the end if it exists 377 | if /i "!checkpath:~-7!" == "cmd.exe" ( 378 | set "checkpath=!checkpath:~0,-7!" 379 | ) 380 | REM Pad the end with a backslash if needed 381 | if not "!checkpath:~-1!" == "\" ( 382 | set "checkpath=!checkpath!\" 383 | ) 384 | REM Let's see if cmd, reg, and where exist there - and set it if so 385 | if EXIST "!checkpath!cmd.exe" ( 386 | if EXIST "!checkpath!reg.exe" ( 387 | if EXIST "!checkpath!where.exe" ( 388 | set /a found=1 389 | set "ComSpec=!checkpath!cmd.exe" 390 | set "%~1=!checkpath!" 391 | ) 392 | ) 393 | ) 394 | ) 395 | ) 396 | ) 397 | goto :EOF 398 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plist-Tool 2 | A sloppy plist patching tool (yay!) 3 | -------------------------------------------------------------------------------- /Resources/Audio/[DSDT] HDAS to HDEF.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | Patches 12 | 13 | 14 | Comment 15 | Rename HDAS to HDEF 16 | Disabled 17 | 18 | Find 19 | 20 | SERBUw== 21 | 22 | Replace 23 | 24 | SERFRg== 25 | 26 | 27 | 28 | 29 | 30 | 31 | Remove 32 | 33 | Description 34 | Adds the HDAS to HDEF ACPI patch for Skylake and newer mobos. 35 | 36 | -------------------------------------------------------------------------------- /Resources/Audio/[KEXT] Remove AppleHDA Patches.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Remove 8 | 9 | KernelAndKextPatches 10 | 11 | KextsToPatch 12 | 13 | 14 | Name 15 | AppleHDA* 16 | 17 | 18 | 19 | 20 | Description 21 | Removes any KextsToPatch entries affecting AppleHDA. 22 | 23 | 24 | -------------------------------------------------------------------------------- /Resources/Base Setup/[BASE] Haswell.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | FixHeaders 12 | 13 | AutoMerge 14 | 15 | DropOEM_DSM 16 | 17 | Fixes 18 | 19 | FixIPIC 20 | 21 | FixRTC 22 | 23 | FixShutdown 24 | 25 | FixTMR 26 | 27 | 28 | Patches 29 | 30 | 31 | Comment 32 | change EHC1 to EH01 33 | Disabled 34 | 35 | Find 36 | RUhDMQ== 37 | Replace 38 | RUgwMQ== 39 | 40 | 41 | Comment 42 | change EHC2 to EH02 43 | Disabled 44 | 45 | Find 46 | RUhDMg== 47 | Replace 48 | RUgwMg== 49 | 50 | 51 | Comment 52 | change SAT0 to SATA 53 | Disabled 54 | 55 | Find 56 | U0FUMA== 57 | Replace 58 | U0FUQQ== 59 | 60 | 61 | 62 | DropTables 63 | 64 | 65 | Signature 66 | DMAR 67 | 68 | 69 | Signature 70 | MATS 71 | 72 | 73 | SSDT 74 | 75 | DropOem 76 | 77 | Generate 78 | 79 | PluginType 80 | 81 | 82 | 83 | 84 | Boot 85 | 86 | Arguments 87 | -v dart=0 shikigva=60 88 | 89 | Devices 90 | 91 | Properties 92 | 93 | PciRoot(0)/Pci(0x02,0) 94 | 95 | AAPL,ig-platform-id 96 | AwAiDQ== 97 | #Patchings 98 | Add your patches after the the framebuffer-patch-enable 99 | framebuffer-patch-enable 100 | 1 101 | 102 | 103 | Audio 104 | 105 | Inject 106 | 1 107 | ResetHDA 108 | 109 | 110 | USB 111 | 112 | FixOwnership 113 | 114 | AddClockID 115 | 116 | Inject 117 | 118 | 119 | 120 | Graphics 121 | 122 | Inject 123 | 124 | Intel 125 | 126 | 127 | 128 | KernelAndKextPatches 129 | 130 | AppleRTC 131 | 132 | DellSMBIOSPatch 133 | 134 | KernelPm 135 | 136 | KextsToPatch 137 | 138 | 139 | Comment 140 | External icons patch 141 | Disabled 142 | 143 | Find 144 | RXh0ZXJuYWw= 145 | InfoPlistPatch 146 | 147 | Name 148 | AppleAHCIPort 149 | Replace 150 | SW50ZXJuYWw= 151 | 152 | 153 | 154 | RtVariables 155 | 156 | BooterConfig 157 | 0x28 158 | CsrActiveConfig 159 | 0x3E7 160 | 161 | SystemParameters 162 | 163 | InjectKexts 164 | Yes 165 | 166 | 167 | Description 168 | Generalized settings for Haswell systems. 169 | Remove 170 | 171 | ACPI 172 | 173 | DSDT 174 | 175 | Fixes 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /Resources/Base Setup/[BASE] IvyBridge.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | FixHeaders 12 | 13 | AutoMerge 14 | 15 | DropOEM_DSM 16 | 17 | Fixes 18 | 19 | FixIPIC 20 | 21 | FixRTC 22 | 23 | FixShutdown 24 | 25 | FixTMR 26 | 27 | 28 | Patches 29 | 30 | 31 | Comment 32 | change EHC1 to EH01 33 | Disabled 34 | 35 | Find 36 | RUhDMQ== 37 | Replace 38 | RUgwMQ== 39 | 40 | 41 | Comment 42 | change EHC2 to EH02 43 | Disabled 44 | 45 | Find 46 | RUhDMg== 47 | Replace 48 | RUgwMg== 49 | 50 | 51 | Comment 52 | change SAT0 to SATA 53 | Disabled 54 | 55 | Find 56 | U0FUMA== 57 | Replace 58 | U0FUQQ== 59 | 60 | 61 | 62 | DropTables 63 | 64 | 65 | Signature 66 | DMAR 67 | 68 | 69 | Signature 70 | MATS 71 | 72 | 73 | SSDT 74 | 75 | DropOem 76 | 77 | Generate 78 | 79 | PluginType 80 | 81 | 82 | 83 | 84 | Boot 85 | 86 | Arguments 87 | -v dart=0 shikigva=60 88 | 89 | Devices 90 | 91 | Properties 92 | 93 | PciRoot(0)/Pci(0x02,0) 94 | 95 | AAPL,ig-platform-id 96 | CgBmAQ== 97 | #Patchings 98 | Add your patches after the the framebuffer-patch-enable 99 | framebuffer-patch-enable 100 | 1 101 | 102 | 103 | Audio 104 | 105 | Inject 106 | 1 107 | ResetHDA 108 | 109 | 110 | USB 111 | 112 | FixOwnership 113 | 114 | AddClockID 115 | 116 | Inject 117 | 118 | 119 | 120 | Graphics 121 | 122 | Inject 123 | 124 | Intel 125 | 126 | 127 | 128 | KernelAndKextPatches 129 | 130 | AppleRTC 131 | 132 | DellSMBIOSPatch 133 | 134 | KernelPm 135 | 136 | KextsToPatch 137 | 138 | 139 | Comment 140 | External icons patch 141 | Disabled 142 | 143 | Find 144 | RXh0ZXJuYWw= 145 | InfoPlistPatch 146 | 147 | Name 148 | AppleAHCIPort 149 | Replace 150 | SW50ZXJuYWw= 151 | 152 | 153 | 154 | RtVariables 155 | 156 | BooterConfig 157 | 0x28 158 | CsrActiveConfig 159 | 0x3E7 160 | 161 | SystemParameters 162 | 163 | InjectKexts 164 | Yes 165 | 166 | 167 | Description 168 | Generalized settings for Haswell systems. 169 | Remove 170 | 171 | ACPI 172 | 173 | DSDT 174 | 175 | Fixes 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /Resources/Base Setup/[BASE] KBL:CFL on 10.12.5-[CPU SPOOF].plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | FixHeaders 12 | 13 | AutoMerge 14 | 15 | DropOEM_DSM 16 | 17 | Fixes 18 | 19 | FixIPIC 20 | 21 | FixRTC 22 | 23 | FixShutdown 24 | 25 | FixTMR 26 | 27 | 28 | Patches 29 | 30 | 31 | Comment 32 | change SAT0 to SATA 33 | Disabled 34 | 35 | Find 36 | U0FUMA== 37 | Replace 38 | U0FUQQ== 39 | 40 | 41 | 42 | DropTables 43 | 44 | 45 | Signature 46 | DMAR 47 | 48 | 49 | Signature 50 | MATS 51 | 52 | 53 | SSDT 54 | 55 | DropOem 56 | 57 | Generate 58 | 59 | PluginType 60 | 61 | 62 | 63 | 64 | Boot 65 | 66 | Arguments 67 | -v shikigva=60 dart=0 68 | 69 | Devices 70 | 71 | Properties 72 | 73 | PciRoot(0)/Pci(0x02,0) 74 | 75 | AAPL,ig-platform-id 76 | AAASWQ== 77 | device-id 78 | FlkAAA== 79 | #Patchings 80 | Add your patches after the the framebuffer-patch-enable 81 | framebuffer-patch-enable 82 | 1 83 | 84 | 85 | Audio 86 | 87 | Inject 88 | 1 89 | ResetHDA 90 | 91 | 92 | USB 93 | 94 | FixOwnership 95 | 96 | AddClockID 97 | 98 | Inject 99 | 100 | 101 | 102 | Graphics 103 | 104 | Inject 105 | 106 | Intel 107 | 108 | 109 | 110 | KernelAndKextPatches 111 | 112 | AppleRTC 113 | 114 | DellSMBIOSPatch 115 | 116 | FakeCPUID 117 | 0x0506E3 118 | KernelPm 119 | 120 | KextsToPatch 121 | 122 | 123 | Comment 124 | External icons patch 125 | Disabled 126 | 127 | Find 128 | RXh0ZXJuYWw= 129 | InfoPlistPatch 130 | 131 | Name 132 | AppleAHCIPort 133 | Replace 134 | SW50ZXJuYWw= 135 | 136 | 137 | 138 | RtVariables 139 | 140 | BooterConfig 141 | 0x28 142 | CsrActiveConfig 143 | 0x3E7 144 | 145 | SystemParameters 146 | 147 | InjectKexts 148 | Yes 149 | 150 | 151 | Description 152 | Generalized settings for Kaby/Coffee systems on 10.13+ 153 | Remove 154 | 155 | ACPI 156 | 157 | DSDT 158 | 159 | Fixes 160 | 161 | 162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /Resources/Base Setup/[BASE] KBL:CFL on 10.13+.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | FixHeaders 12 | 13 | AutoMerge 14 | 15 | DropOEM_DSM 16 | 17 | Fixes 18 | 19 | FixIPIC 20 | 21 | FixRTC 22 | 23 | FixShutdown 24 | 25 | FixTMR 26 | 27 | 28 | Patches 29 | 30 | 31 | Comment 32 | change SAT0 to SATA 33 | Disabled 34 | 35 | Find 36 | U0FUMA== 37 | Replace 38 | U0FUQQ== 39 | 40 | 41 | 42 | DropTables 43 | 44 | 45 | Signature 46 | DMAR 47 | 48 | 49 | Signature 50 | MATS 51 | 52 | 53 | SSDT 54 | 55 | DropOem 56 | 57 | Generate 58 | 59 | PluginType 60 | 61 | 62 | 63 | 64 | Boot 65 | 66 | Arguments 67 | -v shikigva=60 dart=0 68 | 69 | Devices 70 | 71 | Properties 72 | 73 | PciRoot(0)/Pci(0x02,0) 74 | 75 | AAPL,ig-platform-id 76 | AAASWQ== 77 | device-id 78 | FlkAAA== 79 | #Patchings 80 | Add your patches after the the framebuffer-patch-enable 81 | framebuffer-patch-enable 82 | 1 83 | 84 | 85 | Audio 86 | 87 | Inject 88 | 1 89 | ResetHDA 90 | 91 | 92 | USB 93 | 94 | FixOwnership 95 | 96 | AddClockID 97 | 98 | Inject 99 | 100 | 101 | 102 | Graphics 103 | 104 | Inject 105 | 106 | Intel 107 | 108 | 109 | 110 | KernelAndKextPatches 111 | 112 | AppleRTC 113 | 114 | DellSMBIOSPatch 115 | 116 | KernelPm 117 | 118 | KextsToPatch 119 | 120 | 121 | Comment 122 | External icons patch 123 | Disabled 124 | 125 | Find 126 | RXh0ZXJuYWw= 127 | InfoPlistPatch 128 | 129 | Name 130 | AppleAHCIPort 131 | Replace 132 | SW50ZXJuYWw= 133 | 134 | 135 | 136 | RtVariables 137 | 138 | BooterConfig 139 | 0x28 140 | CsrActiveConfig 141 | 0x3E7 142 | 143 | SystemParameters 144 | 145 | InjectKexts 146 | Yes 147 | 148 | 149 | Description 150 | Generalized settings for Kaby/Coffee systems on 10.13+ 151 | Remove 152 | 153 | ACPI 154 | 155 | DSDT 156 | 157 | Fixes 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /Resources/Base Setup/[BASE] SKL:KBL:CFL [10.12.6+:10.12.6].plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | Base settings for SKL on 10.12.6 or later, Base settings for KBL/CFL on 10.12.6 only. Use [BASE] KBL/CFL on 10.13+ for HS or later 7 | Add 8 | 9 | ACPI 10 | 11 | DSDT 12 | 13 | FixHeaders 14 | 15 | AutoMerge 16 | 17 | DropOEM_DSM 18 | 19 | Fixes 20 | 21 | FixIPIC 22 | 23 | FixRTC 24 | 25 | FixShutdown 26 | 27 | FixTMR 28 | 29 | 30 | Patches 31 | 32 | 33 | Comment 34 | change SAT0 to SATA 35 | Disabled 36 | 37 | Find 38 | U0FUMA== 39 | Replace 40 | U0FUQQ== 41 | 42 | 43 | 44 | DropTables 45 | 46 | 47 | Signature 48 | DMAR 49 | 50 | 51 | Signature 52 | MATS 53 | 54 | 55 | SSDT 56 | 57 | DropOem 58 | 59 | Generate 60 | 61 | PluginType 62 | 63 | 64 | 65 | 66 | Boot 67 | 68 | Arguments 69 | -v shikigva=60 dart=0 70 | 71 | Devices 72 | 73 | Properties 74 | 75 | PciRoot(0)/Pci(0x02,0) 76 | 77 | AAPL,ig-platform-id 78 | AAASWQ== 79 | device-id 80 | FlkAAA== 81 | #Patchings 82 | Add your patches after the the framebuffer-patch-enable 83 | framebuffer-patch-enable 84 | 1 85 | 86 | 87 | Audio 88 | 89 | Inject 90 | 1 91 | ResetHDA 92 | 93 | 94 | USB 95 | 96 | FixOwnership 97 | 98 | AddClockID 99 | 100 | Inject 101 | 102 | 103 | 104 | Graphics 105 | 106 | Inject 107 | 108 | Intel 109 | 110 | 111 | 112 | KernelAndKextPatches 113 | 114 | AppleRTC 115 | 116 | DellSMBIOSPatch 117 | 118 | FakeCPUID 119 | 0x0906E9 120 | #Comment 121 | Spoofs your CPU as KabyLake 122 | KernelPm 123 | 124 | KextsToPatch 125 | 126 | 127 | Comment 128 | External icons patch 129 | Disabled 130 | 131 | Find 132 | RXh0ZXJuYWw= 133 | InfoPlistPatch 134 | 135 | Name 136 | AppleAHCIPort 137 | Replace 138 | SW50ZXJuYWw= 139 | 140 | 141 | 142 | RtVariables 143 | 144 | BooterConfig 145 | 0x28 146 | CsrActiveConfig 147 | 0x3E7 148 | 149 | SystemParameters 150 | 151 | InjectKexts 152 | Yes 153 | 154 | 155 | Remove 156 | 157 | ACPI 158 | 159 | DSDT 160 | 161 | Fixes 162 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /Resources/CPU/[CPU] IvyBridge.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DropTables 10 | 11 | 12 | Signature 13 | DMAR 14 | 15 | 16 | Signature 17 | MATS 18 | 19 | 20 | SSDT 21 | 22 | DropOem 23 | 24 | Generate 25 | 26 | PStates 27 | 28 | CStates 29 | 30 | 31 | 32 | 33 | KernelAndKextPatches 34 | 35 | AppleIntelCPUPM 36 | 37 | KernelPm 38 | 39 | 40 | 41 | Description 42 | Generalized settings for Kaby systems 10.11 - 10.12.5 43 | Remove 44 | 45 | ACPI 46 | 47 | DSDT 48 | 49 | SSDT 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Resources/CPU/[CPU] PluginType [Haswell+].plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DropTables 10 | 11 | 12 | Signature 13 | DMAR 14 | 15 | 16 | Signature 17 | MATS 18 | 19 | 20 | SSDT 21 | 22 | DropOem 23 | 24 | Generate 25 | 26 | PluginType 27 | 28 | 29 | 30 | 31 | KernelAndKextPatches 32 | 33 | KernelPm 34 | 35 | 36 | 37 | Description 38 | Generalized settings for Kaby systems 10.11 - 10.12.5 39 | Remove 40 | 41 | ACPI 42 | 43 | DSDT 44 | 45 | SSDT 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Resources/CPU/[CPU] SNB and prior PM.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DropTables 10 | 11 | 12 | Signature 13 | DMAR 14 | 15 | 16 | Signature 17 | MATS 18 | 19 | 20 | SSDT 21 | 22 | DropOem 23 | 24 | Generate 25 | 26 | PStates 27 | 28 | CStates 29 | 30 | 31 | 32 | 33 | KernelAndKextPatches 34 | 35 | AppleIntelCPUPM 36 | 37 | KernelPm 38 | 39 | 40 | 41 | Description 42 | Generalized settings for Kaby systems 10.11 - 10.12.5 43 | Remove 44 | 45 | ACPI 46 | 47 | DSDT 48 | 49 | SSDT 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Resources/CPU/[SSDT] Drop Tables CPU PM.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DropTables 10 | 11 | 12 | Signature 13 | DMAR 14 | 15 | 16 | Signature 17 | SSDT 18 | TableId 19 | CpuPm 20 | 21 | 22 | Signature 23 | SSDT 24 | TableId 25 | Cpu0Ist 26 | 27 | 28 | 29 | 30 | Remove 31 | 32 | Description 33 | Drops the CpuPm, Cpu0Ist, and DMAR SSDT tables for CPU power management. 34 | 35 | 36 | -------------------------------------------------------------------------------- /Resources/DSDT Fixes & Patches/[FIX] Fix Shutdown.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | Fixes 12 | 13 | FixShutdown_0004 14 | 15 | 16 | 17 | 18 | 19 | Remove 20 | 21 | Description 22 | Adds the FixShutdown DSDT fix - may help if your computer restarts instead of shutting down. 23 | 24 | 25 | -------------------------------------------------------------------------------- /Resources/DSDT Fixes & Patches/[FIX] Remove All Fixes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Remove 8 | 9 | ACPI 10 | 11 | DSDT 12 | 13 | Fixes 14 | 15 | 16 | 17 | 18 | Description 19 | Removes ALL the DSDT Fixes - can help if you get the "no driver for platform AHCI" kernel panic. 20 | 21 | 22 | -------------------------------------------------------------------------------- /Resources/DSDT Fixes & Patches/[PATCH] XOSI patch.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | XOSI patch to be paired with SSDT-XOSI to spoof Darwin (macOS) as a Windows release 7 | Add 8 | 9 | DSDT 10 | 11 | Patches 12 | 13 | 14 | Comment 15 | change _OSI to XOSI 16 | Find 17 | X09TSQ== 18 | Replace 19 | WE9TSQ== 20 | 21 | 22 | 23 | 24 | Remove 25 | 26 | 27 | -------------------------------------------------------------------------------- /Resources/Disable SIP/[SYS] Disable SIP - HS and later.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | RtVariables 8 | 9 | BooterConfig 10 | 0x28 11 | CsrActiveConfig 12 | 0x3E7 13 | 14 | 15 | Description 16 | Newer way to disable SIP (CsrActiveConfig = 0x3E7) 17 | Remove 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Resources/Disable SIP/[SYS] Disable SIP - Pre-HS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | RtVariables 8 | 9 | BooterConfig 10 | 0x28 11 | CsrActiveConfig 12 | 0x67 13 | 14 | 15 | Description 16 | Older way to disable SIP (CsrActiveConfig = 0x67) 17 | Remove 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Resources/Disk/Disks Not Showing In Installer.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | SSDT 10 | 11 | Generate 12 | 13 | CStates 14 | 15 | PStates 16 | 17 | 18 | 19 | 20 | 21 | Remove 22 | 23 | Description 24 | Adds the SSDT -> Generate section. May help if your drives don't show on series 100-200 mobos. 25 | 26 | 27 | -------------------------------------------------------------------------------- /Resources/Disk/External Icons Patch.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | External icons patch 14 | Disabled 15 | 16 | Find 17 | 18 | RXh0ZXJuYWw= 19 | 20 | Name 21 | AppleAHCIPort 22 | Replace 23 | 24 | SW50ZXJuYWw= 25 | 26 | 27 | 28 | 29 | 30 | Remove 31 | 32 | Description 33 | Patches AppleAHCIPort to make internal drives appear internal. 34 | 35 | 36 | -------------------------------------------------------------------------------- /Resources/GPU/HD 530 (10.12.4 down).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Devices 8 | 9 | AddProperties 10 | 11 | 12 | Device 13 | IntelGFX 14 | Disabled 15 | 16 | Key 17 | AAPL,GfxYTile 18 | Value 19 | 20 | AQAAAA== 21 | 22 | 23 | 24 | 25 | Graphics 26 | 27 | Inject 28 | 29 | Intel 30 | 31 | 32 | ig-platform-id 33 | 0x19120000 34 | 35 | KernelAndKextPatches 36 | 37 | KextsToPatch 38 | 39 | 40 | Comment 41 | 10.11-SKL-1912000-4_displays 42 | Disabled 43 | 44 | Find 45 | 46 | AQMDAw== 47 | 48 | Name 49 | AppleIntelSKLGraphicsFramebuffer 50 | Replace 51 | 52 | AQMEAw== 53 | 54 | 55 | 56 | 57 | 58 | Remove 59 | 60 | Description 61 | Adds general patches for the HD 530 in 10.12.4 on down. 62 | 63 | 64 | -------------------------------------------------------------------------------- /Resources/GPU/HD 530 or HD 630 (10.12.5 up).plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Devices 8 | 9 | AddProperties 10 | 11 | 12 | Device 13 | IntelGFX 14 | Disabled 15 | 16 | Key 17 | AAPL,GfxYTile 18 | Value 19 | 20 | AQAAAA== 21 | 22 | 23 | 24 | FakeID 25 | 26 | IntelGFX 27 | 0x19168086 28 | 29 | 30 | Graphics 31 | 32 | Inject 33 | 34 | Intel 35 | 36 | 37 | ig-platform-id 38 | 0x19120000 39 | 40 | KernelAndKextPatches 41 | 42 | KextsToPatch 43 | 44 | 45 | Comment 46 | 10.11-SKL-1912000-4_displays 47 | Disabled 48 | 49 | Find 50 | 51 | AQMDAw== 52 | 53 | Name 54 | AppleIntelSKLGraphicsFramebuffer 55 | Replace 56 | 57 | AQMEAw== 58 | 59 | 60 | 61 | 62 | 63 | Remove 64 | 65 | Description 66 | Adds general patches for the HD 530/630 in 10.12.5 and up. 67 | 68 | 69 | -------------------------------------------------------------------------------- /Resources/HDMI Audio/HD4000 Desktop AppleALC.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | Patches 12 | 13 | 14 | Comment 15 | change GFX0 to IGPU 16 | Disabled 17 | 18 | Find 19 | 20 | R0ZYMA== 21 | 22 | Replace 23 | 24 | SUdQVQ== 25 | 26 | 27 | 28 | 29 | 30 | Devices 31 | 32 | AddProperties 33 | 34 | 35 | Comment 36 | hda-gfx=onboard-1 for HDMI audio 37 | Device 38 | IntelGFX 39 | Disabled 40 | 41 | Key 42 | hda-gfx 43 | Value 44 | 45 | b25ib2FyZC0xAA== 46 | 47 | 48 | 49 | Comment 50 | hda-gfx=onboard-1 for HDMI audio 51 | Device 52 | HDA 53 | Disabled 54 | 55 | Key 56 | hda-gfx 57 | Value 58 | 59 | b25ib2FyZC0xAA== 60 | 61 | 62 | 63 | Comment 64 | layout-id=3 65 | Device 66 | HDA 67 | Disabled 68 | 69 | Key 70 | layout-id 71 | Value 72 | 73 | AwAAAA== 74 | 75 | 76 | 77 | 78 | Graphics 79 | 80 | Inject 81 | 82 | Intel 83 | 84 | 85 | ig-platform-id 86 | 0x0166000a 87 | 88 | 89 | Description 90 | HD4000 Desktop AppleALC HDMI audio patch. 91 | Remove 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /Resources/Kernel/[KERNEL] Disable Kext Logging.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | Disable panic kext logging on 10.13/10.14 release kernel 7 | Add 8 | 9 | KernelAndKextPatches 10 | 11 | KernelToPatch 12 | 13 | 14 | Comment 15 | Disable panic kext logging on 10.13 release kernel (credit Vandroiy) 16 | MatchOS 17 | 10.13.x 18 | Find 19 | igKEwHRE 20 | Replace 21 | igKEwOtE 22 | 23 | 24 | Comment 25 | Disable panic kext logging on 10.14 release kernel (credit Vandroiy) 26 | MatchOS 27 | 10.14.x 28 | Find 29 | igKEwHRC 30 | Replace 31 | igKEwOtC 32 | 33 | 34 | 35 | 36 | Remove 37 | 38 | 39 | -------------------------------------------------------------------------------- /Resources/Kernel/[KERNEL] MSR 0xE2 instant reboot.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | 7 | Add 8 | 9 | KernelAndKextPatches 10 | 11 | KernelToPatch 12 | 13 | 14 | Comment 15 | MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha 16 | Disabled 17 | 18 | Find 19 | ILniAAAADzA= 20 | Replace 21 | ILniAAAAkJA= 22 | 23 | 24 | 25 | 26 | Remove 27 | 28 | 29 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe Patches 10.12.4.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | weAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | weAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.4 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe Patches 10.12.5.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | weAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | weAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.5 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe Patches 10.12.6.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Name 17 | IONVMeFamily 18 | Find 19 | weAMBQAQAACJgw== 20 | Replace 21 | weAJBQAQAACJgw== 22 | 23 | 24 | Comment 25 | IONVMeFamily Pike R. Alpha Patch#2 26 | Disabled 27 | 28 | Name 29 | IONVMeFamily 30 | Find 31 | D7aMiIIAAACD+QwPhTIBAA== 32 | Replace 33 | D7aMiIIAAACD+QkPhTIBAA== 34 | 35 | 36 | Comment 37 | IONVMeFamily Pike R. Alpha Patch#3 38 | Disabled 39 | 40 | Name 41 | IONVMeFamily 42 | Find 43 | AMeDpAAAAAAQAABIi0gISA== 44 | Replace 45 | AMeDpAAAAAACAABIi0gISA== 46 | 47 | 48 | Comment 49 | IONVMeFamily Pike R. Alpha Patch#4 50 | Disabled 51 | 52 | Name 53 | IONVMeFamily 54 | Find 55 | SYnGTYX2dGFBwecMSWP/vg== 56 | Replace 57 | SYnGTYX2dGFBwecJSWP/vg== 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#5 62 | Disabled 63 | 64 | Name 65 | IONVMeFamily 66 | Find 67 | hv8PAABIwegMD7cPgeH/Dw== 68 | Replace 69 | hv8PAABIwegJD7cPgeH/Dw== 70 | 71 | 72 | Comment 73 | IONVMeFamily Pike R. Alpha Patch#6_7 74 | Disabled 75 | 76 | Name 77 | IONVMeFamily 78 | Find 79 | icGB4f8PAABIAdFIgfn/DwAAdzs= 80 | Replace 81 | icGB4f8BAABIAdFIgfn/AQAAdzs= 82 | 83 | 84 | Comment 85 | IONVMeFamily Pike R. Alpha Patch#8 86 | Disabled 87 | 88 | Name 89 | IONVMeFamily 90 | Find 91 | SYHF/w8AAEnB7QxJiwQkSA== 92 | Replace 93 | SYHF/w8AAEnB7QlJiwQkSA== 94 | 95 | 96 | Comment 97 | IONVMeFamily Pike R. Alpha Patch#9_10 98 | Disabled 99 | 100 | Name 101 | IONVMeFamily 102 | Find 103 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEAAEmJjiIBAABBvAAQAABJKfQ= 104 | Replace 105 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEAAEmJjiIBAABBvAACAABJKfQ= 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#11 110 | Disabled 111 | 112 | Name 113 | IONVMeFamily 114 | Find 115 | AABJiY4iAQAAugAQAABIKQ== 116 | Replace 117 | AABJiY4iAQAAugACAABIKQ== 118 | 119 | 120 | Comment 121 | IONVMeFamily Pike R. Alpha Patch#12 122 | Disabled 123 | 124 | Name 125 | IONVMeFamily 126 | Find 127 | yAAAAEkp17gAEAAATYskJA== 128 | Replace 129 | yAAAAEkp17gAAgAATYskJA== 130 | 131 | 132 | Comment 133 | IONVMeFamily Pike R. Alpha Patch#13 134 | Disabled 135 | 136 | Name 137 | IONVMeFamily 138 | Find 139 | 4b+AQBUGTYnWugAQAABFMQ== 140 | Replace 141 | 4b+AQBUGTYnWugACAABFMQ== 142 | 143 | 144 | Comment 145 | IONVMeFamily Pike R. Alpha Patch#14 146 | Disabled 147 | 148 | Name 149 | IONVMeFamily 150 | Find 151 | iWTY+EmBxAAQAABJgccA8A== 152 | Replace 153 | iWTY+EmBxAACAABJgccA8A== 154 | 155 | 156 | Comment 157 | IONVMeFamily Pike R. Alpha Patch#15 158 | Disabled 159 | 160 | Name 161 | IONVMeFamily 162 | Find 163 | Bf8PAABIwegMZvfB/w8PlQ== 164 | Replace 165 | Bf8PAABIwegJZvfB/w8PlQ== 166 | 167 | 168 | Comment 169 | IONVMeFamily Pike R. Alpha Patch#16 170 | Disabled 171 | 172 | Name 173 | IONVMeFamily 174 | Find 175 | weIIQQ+2wcHgDEQJ0EQJwA== 176 | Replace 177 | weIIQQ+2wcHgCUQJ0EQJwA== 178 | 179 | 180 | Comment 181 | IONVMeFamily Pike R. Alpha Patch#17 182 | Disabled 183 | 184 | Name 185 | IONVMeFamily 186 | Find 187 | RYTJD5XAD7bAweAMRAnYRA== 188 | Replace 189 | RYTJD5XAD7bAweAJRAnYRA== 190 | 191 | 192 | 193 | 194 | Description 195 | 10.12.6 NVMe patches. 196 | Remove 197 | 198 | KernelAndKextPatches 199 | 200 | KextsToPatch 201 | 202 | 203 | Name 204 | IONVMeFamily* 205 | 206 | 207 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe patches 10.12.0.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | ibPwAgAAweAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | ibPwAgAAweAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.0 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe patches 10.12.1 16B2555.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | ibP4AgAAweAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | ibP4AgAAweAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.1 16B2555 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe patches 10.12.1.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | ibP4AgAAweAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | ibP4AgAAweAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.1 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe patches 10.12.2.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | ibP4AgAAweAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | ibP4AgAAweAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.2 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/NVMe patches 10.12.3.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | KernelAndKextPatches 8 | 9 | KextsToPatch 10 | 11 | 12 | Comment 13 | IONVMeFamily Pike R. Alpha Patch#1 14 | Disabled 15 | 16 | Find 17 | 18 | ibP4AgAAweAMBQAQAACJgw== 19 | 20 | Name 21 | IONVMeFamily 22 | Replace 23 | 24 | ibP4AgAAweAJBQAQAACJgw== 25 | 26 | 27 | 28 | Comment 29 | IONVMeFamily Pike R. Alpha Patch#2 30 | Disabled 31 | 32 | Find 33 | 34 | D7aMiIIAAACD+QwPhTIBAA== 35 | 36 | Name 37 | IONVMeFamily 38 | Replace 39 | 40 | D7aMiIIAAACD+QkPhTIBAA== 41 | 42 | 43 | 44 | Comment 45 | IONVMeFamily Pike R. Alpha Patch#3 46 | Disabled 47 | 48 | Find 49 | 50 | AMeDpAAAAAAQAABIi0gISA== 51 | 52 | Name 53 | IONVMeFamily 54 | Replace 55 | 56 | AMeDpAAAAAACAABIi0gISA== 57 | 58 | 59 | 60 | Comment 61 | IONVMeFamily Pike R. Alpha Patch#4 62 | Disabled 63 | 64 | Find 65 | 66 | SYnGTYX2dGFBwecMSWP/vg== 67 | 68 | Name 69 | IONVMeFamily 70 | Replace 71 | 72 | SYnGTYX2dGFBwecJSWP/vg== 73 | 74 | 75 | 76 | Comment 77 | IONVMeFamily Pike R. Alpha Patch#5 78 | Disabled 79 | 80 | Find 81 | 82 | hv8PAABIwegMD7cPgeH/Dw== 83 | 84 | Name 85 | IONVMeFamily 86 | Replace 87 | 88 | hv8PAABIwegJD7cPgeH/Dw== 89 | 90 | 91 | 92 | Comment 93 | IONVMeFamily Pike R. Alpha Patch#6_7 94 | Disabled 95 | 96 | Find 97 | 98 | icGB4f8PAABIAdFIgfn/DwAAdzs= 99 | 100 | Name 101 | IONVMeFamily 102 | Replace 103 | 104 | icGB4f8BAABIAdFIgfn/AQAAdzs= 105 | 106 | 107 | 108 | Comment 109 | IONVMeFamily Pike R. Alpha Patch#8 110 | Disabled 111 | 112 | Find 113 | 114 | SYHF/w8AAEnB7QxJiwQkSA== 115 | 116 | Name 117 | IONVMeFamily 118 | Replace 119 | 120 | SYHF/w8AAEnB7QlJiwQkSA== 121 | 122 | 123 | 124 | Comment 125 | IONVMeFamily Pike R. Alpha Patch#9_10 126 | Disabled 127 | 128 | Find 129 | 130 | BgIAAEyNuAAQAABMiflIgeEA8P//SYmGGgEA 131 | AEmJjiIBAABBvAAQAABJKfQ= 132 | 133 | Name 134 | IONVMeFamily 135 | Replace 136 | 137 | BgIAAEyNuAACAABMiflIgeEA8P//SYmGGgEA 138 | AEmJjiIBAABBvAACAABJKfQ= 139 | 140 | 141 | 142 | Comment 143 | IONVMeFamily Pike R. Alpha Patch#11 144 | Disabled 145 | 146 | Find 147 | 148 | AABJiY4iAQAAugAQAABIKQ== 149 | 150 | Name 151 | IONVMeFamily 152 | Replace 153 | 154 | AABJiY4iAQAAugACAABIKQ== 155 | 156 | 157 | 158 | Comment 159 | IONVMeFamily Pike R. Alpha Patch#12 160 | Disabled 161 | 162 | Find 163 | 164 | yAAAAEkp17gAEAAATYskJA== 165 | 166 | Name 167 | IONVMeFamily 168 | Replace 169 | 170 | yAAAAEkp17gAAgAATYskJA== 171 | 172 | 173 | 174 | Comment 175 | IONVMeFamily Pike R. Alpha Patch#13 176 | Disabled 177 | 178 | Find 179 | 180 | 4b+AQBUGTYnWugAQAABFMQ== 181 | 182 | Name 183 | IONVMeFamily 184 | Replace 185 | 186 | 4b+AQBUGTYnWugACAABFMQ== 187 | 188 | 189 | 190 | Comment 191 | IONVMeFamily Pike R. Alpha Patch#14 192 | Disabled 193 | 194 | Find 195 | 196 | iWTY+EmBxAAQAABJgccA8A== 197 | 198 | Name 199 | IONVMeFamily 200 | Replace 201 | 202 | iWTY+EmBxAACAABJgccA8A== 203 | 204 | 205 | 206 | Comment 207 | IONVMeFamily Pike R. Alpha Patch#15 208 | Disabled 209 | 210 | Find 211 | 212 | Bf8PAABIwegMZvfB/w8PlQ== 213 | 214 | Name 215 | IONVMeFamily 216 | Replace 217 | 218 | Bf8PAABIwegJZvfB/w8PlQ== 219 | 220 | 221 | 222 | Comment 223 | IONVMeFamily Pike R. Alpha Patch#16 224 | Disabled 225 | 226 | Find 227 | 228 | weIIQQ+2wcHgDEQJ0EQJwA== 229 | 230 | Name 231 | IONVMeFamily 232 | Replace 233 | 234 | weIIQQ+2wcHgCUQJ0EQJwA== 235 | 236 | 237 | 238 | Comment 239 | IONVMeFamily Pike R. Alpha Patch#17 240 | Disabled 241 | 242 | Find 243 | 244 | RYTJD5XAD7bAweAMRAnYRA== 245 | 246 | Name 247 | IONVMeFamily 248 | Replace 249 | 250 | RYTJD5XAD7bAweAJRAnYRA== 251 | 252 | 253 | 254 | 255 | 256 | Description 257 | 10.12.3 NVMe patches. 258 | Remove 259 | 260 | KernelAndKextPatches 261 | 262 | KextsToPatch 263 | 264 | 265 | Name 266 | IONVMeFamily* 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /Resources/NVMe/Remove NVMe Patches.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Description 8 | Remove all NVMe patches. 9 | Remove 10 | 11 | KernelAndKextPatches 12 | 13 | KextsToPatch 14 | 15 | 16 | Name 17 | IONVMeFamily* 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Resources/USB/[DSDT] EHC1 and EHC2 Rename.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | ACPI 8 | 9 | DSDT 10 | 11 | Patches 12 | 13 | 14 | Comment 15 | change EHC1 to EH01 16 | Disabled 17 | 18 | Find 19 | 20 | RUhDMQ== 21 | 22 | Replace 23 | 24 | RUgwMQ== 25 | 26 | 27 | 28 | Comment 29 | change EHC2 to EH02 30 | Disabled 31 | 32 | Find 33 | 34 | RUhDMg== 35 | 36 | Replace 37 | 38 | RUgwMg== 39 | 40 | 41 | 42 | 43 | 44 | 45 | Remove 46 | 47 | Description 48 | Adds the EHC1 and EHC2 rename USB patches. 49 | 50 | 51 | -------------------------------------------------------------------------------- /Resources/USB/[DSDT] XHC Rename.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | XHCI device renaming in the DSDT. May help detecting USB3.0 devices and native management on macOS. 7 | Add 8 | 9 | ACPI 10 | 11 | DSDT 12 | 13 | Patches 14 | 15 | 16 | Comment 17 | change XHCI to XHC 18 | Find 19 | WEhDSQ== 20 | Replace 21 | WEhDXw== 22 | 23 | 24 | Comment 25 | change XHC1 to XHC 26 | Find 27 | WEhDMQ== 28 | Replace 29 | WEhDXw== 30 | 31 | 32 | 33 | 34 | 35 | Remove 36 | 37 | 38 | -------------------------------------------------------------------------------- /Resources/USB/[KEXT] Port Limit Increase.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | Bunch of patches to increase the USB port limit on macOS (10.11-10.14) 7 | Add 8 | 9 | KernelAndKextPatches 10 | 11 | KextsToPatch 12 | 13 | 14 | Comment 15 | change 15 port limit to 26 in XHCI kext 16 | MatchOS 17 | 10.11.x 18 | Name 19 | com.apple.driver.usb.AppleUSBXHCIPCI 20 | Find 21 | g72M/v//EA== 22 | Replace 23 | g72M/v//Gw== 24 | 25 | 26 | Comment 27 | change 15 port limit to 26 in XHCI kext 28 | MatchOS 29 | 10.12.x 30 | Name 31 | com.apple.driver.usb.AppleUSBXHCIPCI 32 | Find 33 | g710////EA== 34 | Replace 35 | g710////Gw== 36 | 37 | 38 | Comment 39 | change 15 port limit to 26 in XHCI kext 40 | MatchOS 41 | 10.13.0,10.13.1,10.13.2,10.13.3 42 | Name 43 | com.apple.driver.usb.AppleUSBXHCIPCI 44 | Find 45 | g32MEA== 46 | Replace 47 | g32MGw== 48 | 49 | 50 | Comment 51 | disable port limit in XHCI kext (credit PMHeart) 52 | MatchOS 53 | 10.13.4,10.13.5 54 | Name 55 | com.apple.driver.usb.AppleUSBXHCI 56 | Find 57 | g32UDw+DlwQAAA== 58 | Replace 59 | g32UD5CQkJCQkA== 60 | 61 | 62 | Comment 63 | change 15 port limit to 26 in XHCI kext (credit FredWst) 64 | MatchOS 65 | 10.13.4,10.13.5 66 | Name 67 | com.apple.driver.usb.AppleUSBXHCI 68 | Find 69 | g32UDw+DlwQ= 70 | Replace 71 | g32UGg+DlwQ= 72 | 73 | 74 | Comment 75 | disable port limit in XHCI kext (credit RehabMan, based prior PMHeart patch) 76 | MatchOS 77 | 10.13.6 78 | Name 79 | com.apple.driver.usb.AppleUSBXHCI 80 | Find 81 | g32IDw+DpwQAAA== 82 | Replace 83 | g32ID5CQkJCQkA== 84 | 85 | 86 | Comment 87 | disable port limit in XHCI kext (credit PMHeart) 88 | MatchOS 89 | 10.14.x 90 | Name 91 | com.apple.driver.usb.AppleUSBXHCI 92 | Find 93 | g/sPD4MDBQAA 94 | Replace 95 | g/sPkJCQkJCQ 96 | 97 | 98 | 99 | 100 | Remove 101 | 102 | 103 | -------------------------------------------------------------------------------- /Resources/USB/[USB] FixOwnership and Inject [ADD].plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Devices 8 | 9 | USB 10 | 11 | FixOwnership 12 | 13 | AddClockID 14 | 15 | Inject 16 | 17 | 18 | 19 | 20 | Remove 21 | 22 | Description 23 | Enables USB FixOwnership and Injection - can bypass stall at Enable Legacy Matching. 24 | 25 | -------------------------------------------------------------------------------- /Resources/USB/[USB] FixOwnership and Inject [REM].plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add 6 | 7 | Remove 8 | 9 | Devices 10 | 11 | USB 12 | 13 | 14 | 15 | Description 16 | Removes USB FixOwnership and Injection - can bypass stall at Enable Legacy Matching. 17 | 18 | -------------------------------------------------------------------------------- /Scripts/__init__.py: -------------------------------------------------------------------------------- 1 | from os.path import dirname, basename, isfile 2 | import glob 3 | modules = glob.glob(dirname(__file__)+"/*.py") 4 | __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] -------------------------------------------------------------------------------- /Scripts/downloader.py: -------------------------------------------------------------------------------- 1 | import sys, os, time, ssl, gzip 2 | from io import BytesIO 3 | # Python-aware urllib stuff 4 | if sys.version_info >= (3, 0): 5 | from urllib.request import urlopen, Request 6 | else: 7 | # Import urllib2 to catch errors 8 | import urllib2 9 | from urllib2 import urlopen, Request 10 | 11 | class Downloader: 12 | 13 | def __init__(self,**kwargs): 14 | self.ua = kwargs.get("useragent",{"User-Agent":"Mozilla"}) 15 | self.chunk = 1048576 # 1024 x 1024 i.e. 1MiB 16 | if os.name=="nt": os.system("color") # Initialize cmd for ANSI escapes 17 | # Provide reasonable default logic to workaround macOS CA file handling 18 | cafile = ssl.get_default_verify_paths().openssl_cafile 19 | try: 20 | # If default OpenSSL CA file does not exist, use that from certifi 21 | if not os.path.exists(cafile): 22 | import certifi 23 | cafile = certifi.where() 24 | self.ssl_context = ssl.create_default_context(cafile=cafile) 25 | except: 26 | # None of the above worked, disable certificate verification for now 27 | self.ssl_context = ssl._create_unverified_context() 28 | return 29 | 30 | def _decode(self, value, encoding="utf-8", errors="ignore"): 31 | # Helper method to only decode if bytes type 32 | if sys.version_info >= (3,0) and isinstance(value, bytes): 33 | return value.decode(encoding,errors) 34 | return value 35 | 36 | def open_url(self, url, headers = None): 37 | # Fall back on the default ua if none provided 38 | headers = self.ua if headers == None else headers 39 | # Wrap up the try/except block so we don't have to do this for each function 40 | try: 41 | response = urlopen(Request(url, headers=headers), context=self.ssl_context) 42 | except Exception as e: 43 | # No fixing this - bail 44 | return None 45 | return response 46 | 47 | def get_size(self, size, suffix=None, use_1024=False, round_to=2, strip_zeroes=False): 48 | # size is the number of bytes 49 | # suffix is the target suffix to locate (B, KB, MB, etc) - if found 50 | # use_2014 denotes whether or not we display in MiB vs MB 51 | # round_to is the number of dedimal points to round our result to (0-15) 52 | # strip_zeroes denotes whether we strip out zeroes 53 | 54 | # Failsafe in case our size is unknown 55 | if size == -1: 56 | return "Unknown" 57 | # Get our suffixes based on use_1024 58 | ext = ["B","KiB","MiB","GiB","TiB","PiB"] if use_1024 else ["B","KB","MB","GB","TB","PB"] 59 | div = 1024 if use_1024 else 1000 60 | s = float(size) 61 | s_dict = {} # Initialize our dict 62 | # Iterate the ext list, and divide by 1000 or 1024 each time to setup the dict {ext:val} 63 | for e in ext: 64 | s_dict[e] = s 65 | s /= div 66 | # Get our suffix if provided - will be set to None if not found, or if started as None 67 | suffix = next((x for x in ext if x.lower() == suffix.lower()),None) if suffix else suffix 68 | # Get the largest value that's still over 1 69 | biggest = suffix if suffix else next((x for x in ext[::-1] if s_dict[x] >= 1), "B") 70 | # Determine our rounding approach - first make sure it's an int; default to 2 on error 71 | try:round_to=int(round_to) 72 | except:round_to=2 73 | round_to = 0 if round_to < 0 else 15 if round_to > 15 else round_to # Ensure it's between 0 and 15 74 | bval = round(s_dict[biggest], round_to) 75 | # Split our number based on decimal points 76 | a,b = str(bval).split(".") 77 | # Check if we need to strip or pad zeroes 78 | b = b.rstrip("0") if strip_zeroes else b.ljust(round_to,"0") if round_to > 0 else "" 79 | return "{:,}{} {}".format(int(a),"" if not b else "."+b,biggest) 80 | 81 | def _progress_hook(self, bytes_so_far, total_size): 82 | if total_size > 0: 83 | percent = float(bytes_so_far) / total_size 84 | percent = round(percent*100, 2) 85 | t_s = self.get_size(total_size) 86 | try: b_s = self.get_size(bytes_so_far, t_s.split(" ")[1]) 87 | except: b_s = self.get_size(bytes_so_far) 88 | sys.stdout.write("\r\033[KDownloaded {} of {} ({:.2f}%)".format(b_s, t_s, percent)) 89 | else: 90 | b_s = self.get_size(bytes_so_far) 91 | sys.stdout.write("\r\033[KDownloaded {}".format(b_s)) 92 | 93 | def get_string(self, url, progress = True, headers = None, expand_gzip = True): 94 | response = self.get_bytes(url,progress,headers,expand_gzip) 95 | if response == None: return None 96 | return self._decode(response) 97 | 98 | def get_bytes(self, url, progress = True, headers = None, expand_gzip = True): 99 | response = self.open_url(url, headers) 100 | if response == None: return None 101 | bytes_so_far = 0 102 | try: total_size = int(response.headers['Content-Length']) 103 | except: total_size = -1 104 | chunk_so_far = b"" 105 | while True: 106 | chunk = response.read(self.chunk) 107 | bytes_so_far += len(chunk) 108 | if progress: self._progress_hook(bytes_so_far,total_size) 109 | if not chunk: break 110 | chunk_so_far += chunk 111 | if expand_gzip and response.headers.get("Content-Encoding","unknown").lower() == "gzip": 112 | fileobj = BytesIO(chunk_so_far) 113 | gfile = gzip.GzipFile(fileobj=fileobj) 114 | return gfile.read() 115 | if progress: print("") # Add a newline so our last progress prints completely 116 | return chunk_so_far 117 | 118 | def stream_to_file(self, url, file_path, progress = True, headers = None): 119 | response = self.open_url(url, headers) 120 | if response == None: return None 121 | bytes_so_far = 0 122 | try: total_size = int(response.headers['Content-Length']) 123 | except: total_size = -1 124 | with open(file_path, 'wb') as f: 125 | while True: 126 | chunk = response.read(self.chunk) 127 | bytes_so_far += len(chunk) 128 | if progress: self._progress_hook(bytes_so_far,total_size) 129 | if not chunk: break 130 | f.write(chunk) 131 | if progress: print("") # Add a newline so our last progress prints completely 132 | return file_path if os.path.exists(file_path) else None 133 | -------------------------------------------------------------------------------- /Scripts/plist.py: -------------------------------------------------------------------------------- 1 | ### ### 2 | # Imports # 3 | ### ### 4 | 5 | import datetime, os, plistlib, struct, sys, itertools, binascii 6 | from io import BytesIO 7 | 8 | if sys.version_info < (3,0): 9 | # Force use of StringIO instead of cStringIO as the latter 10 | # has issues with Unicode strings 11 | from StringIO import StringIO 12 | else: 13 | from io import StringIO 14 | 15 | try: 16 | basestring # Python 2 17 | unicode 18 | except NameError: 19 | basestring = str # Python 3 20 | unicode = str 21 | 22 | try: 23 | FMT_XML = plistlib.FMT_XML 24 | FMT_BINARY = plistlib.FMT_BINARY 25 | except AttributeError: 26 | FMT_XML = "FMT_XML" 27 | FMT_BINARY = "FMT_BINARY" 28 | 29 | ### ### 30 | # Helper Methods # 31 | ### ### 32 | 33 | def wrap_data(value): 34 | if not _check_py3(): return plistlib.Data(value) 35 | return value 36 | 37 | def extract_data(value): 38 | if not _check_py3() and isinstance(value,plistlib.Data): return value.data 39 | return value 40 | 41 | def _check_py3(): 42 | return sys.version_info >= (3, 0) 43 | 44 | def _is_binary(fp): 45 | if isinstance(fp, basestring): 46 | return fp.startswith(b"bplist00") 47 | header = fp.read(32) 48 | fp.seek(0) 49 | return header[:8] == b'bplist00' 50 | 51 | ### ### 52 | # Deprecated Functions - Remapped # 53 | ### ### 54 | 55 | def readPlist(pathOrFile): 56 | if not isinstance(pathOrFile, basestring): 57 | return load(pathOrFile) 58 | with open(pathOrFile, "rb") as f: 59 | return load(f) 60 | 61 | def writePlist(value, pathOrFile): 62 | if not isinstance(pathOrFile, basestring): 63 | return dump(value, pathOrFile, fmt=FMT_XML, sort_keys=True, skipkeys=False) 64 | with open(pathOrFile, "wb") as f: 65 | return dump(value, f, fmt=FMT_XML, sort_keys=True, skipkeys=False) 66 | 67 | ### ### 68 | # Remapped Functions # 69 | ### ### 70 | 71 | def load(fp, fmt=None, use_builtin_types=None, dict_type=dict): 72 | if _is_binary(fp): 73 | use_builtin_types = False if use_builtin_types is None else use_builtin_types 74 | try: 75 | p = _BinaryPlistParser(use_builtin_types=use_builtin_types, dict_type=dict_type) 76 | except: 77 | # Python 3.9 removed use_builtin_types 78 | p = _BinaryPlistParser(dict_type=dict_type) 79 | return p.parse(fp) 80 | elif _check_py3(): 81 | use_builtin_types = True if use_builtin_types is None else use_builtin_types 82 | # We need to monkey patch this to allow for hex integers - code taken/modified from 83 | # https://github.com/python/cpython/blob/3.8/Lib/plistlib.py 84 | if fmt is None: 85 | header = fp.read(32) 86 | fp.seek(0) 87 | for info in plistlib._FORMATS.values(): 88 | if info['detect'](header): 89 | P = info['parser'] 90 | break 91 | else: 92 | raise plistlib.InvalidFileException() 93 | else: 94 | P = plistlib._FORMATS[fmt]['parser'] 95 | try: 96 | p = P(use_builtin_types=use_builtin_types, dict_type=dict_type) 97 | except: 98 | # Python 3.9 removed use_builtin_types 99 | p = P(dict_type=dict_type) 100 | if isinstance(p,plistlib._PlistParser): 101 | # Monkey patch! 102 | def end_integer(): 103 | d = p.get_data() 104 | value = int(d,16) if d.lower().startswith("0x") else int(d) 105 | if -1 << 63 <= value < 1 << 64: 106 | p.add_object(value) 107 | else: 108 | raise OverflowError("Integer overflow at line {}".format(p.parser.CurrentLineNumber)) 109 | def end_data(): 110 | try: 111 | p.add_object(plistlib._decode_base64(p.get_data())) 112 | except Exception as e: 113 | raise Exception("Data error at line {}: {}".format(p.parser.CurrentLineNumber,e)) 114 | p.end_integer = end_integer 115 | p.end_data = end_data 116 | return p.parse(fp) 117 | else: 118 | # Is not binary - assume a string - and try to load 119 | # We avoid using readPlistFromString() as that uses 120 | # cStringIO and fails when Unicode strings are detected 121 | # Don't subclass - keep the parser local 122 | from xml.parsers.expat import ParserCreate 123 | # Create a new PlistParser object - then we need to set up 124 | # the values and parse. 125 | p = plistlib.PlistParser() 126 | parser = ParserCreate() 127 | parser.StartElementHandler = p.handleBeginElement 128 | parser.EndElementHandler = p.handleEndElement 129 | parser.CharacterDataHandler = p.handleData 130 | # We also need to monkey patch this to allow for other dict_types, hex int support 131 | # proper line output for data errors, and for unicode string decoding 132 | def begin_dict(attrs): 133 | d = dict_type() 134 | p.addObject(d) 135 | p.stack.append(d) 136 | def end_integer(): 137 | d = p.getData() 138 | value = int(d,16) if d.lower().startswith("0x") else int(d) 139 | if -1 << 63 <= value < 1 << 64: 140 | p.addObject(value) 141 | else: 142 | raise OverflowError("Integer overflow at line {}".format(parser.CurrentLineNumber)) 143 | def end_data(): 144 | try: 145 | p.addObject(plistlib.Data.fromBase64(p.getData())) 146 | except Exception as e: 147 | raise Exception("Data error at line {}: {}".format(parser.CurrentLineNumber,e)) 148 | def end_string(): 149 | d = p.getData() 150 | if isinstance(d,unicode): 151 | d = d.encode("utf-8") 152 | p.addObject(d) 153 | p.begin_dict = begin_dict 154 | p.end_integer = end_integer 155 | p.end_data = end_data 156 | p.end_string = end_string 157 | if isinstance(fp, unicode): 158 | # Encode unicode -> string; use utf-8 for safety 159 | fp = fp.encode("utf-8") 160 | if isinstance(fp, basestring): 161 | # It's a string - let's wrap it up 162 | fp = StringIO(fp) 163 | # Parse it 164 | parser.ParseFile(fp) 165 | return p.root 166 | 167 | def loads(value, fmt=None, use_builtin_types=None, dict_type=dict): 168 | if _check_py3() and isinstance(value, basestring): 169 | # If it's a string - encode it 170 | value = value.encode() 171 | try: 172 | return load(BytesIO(value),fmt=fmt,use_builtin_types=use_builtin_types,dict_type=dict_type) 173 | except: 174 | # Python 3.9 removed use_builtin_types 175 | return load(BytesIO(value),fmt=fmt,dict_type=dict_type) 176 | 177 | def dump(value, fp, fmt=FMT_XML, sort_keys=True, skipkeys=False): 178 | if fmt == FMT_BINARY: 179 | # Assume binary at this point 180 | writer = _BinaryPlistWriter(fp, sort_keys=sort_keys, skipkeys=skipkeys) 181 | writer.write(value) 182 | elif fmt == FMT_XML: 183 | if _check_py3(): 184 | plistlib.dump(value, fp, fmt=fmt, sort_keys=sort_keys, skipkeys=skipkeys) 185 | else: 186 | # We need to monkey patch a bunch here too in order to avoid auto-sorting 187 | # of keys 188 | writer = plistlib.PlistWriter(fp) 189 | def writeDict(d): 190 | if d: 191 | writer.beginElement("dict") 192 | items = sorted(d.items()) if sort_keys else d.items() 193 | for key, value in items: 194 | if not isinstance(key, basestring): 195 | if skipkeys: 196 | continue 197 | raise TypeError("keys must be strings") 198 | writer.simpleElement("key", key) 199 | writer.writeValue(value) 200 | writer.endElement("dict") 201 | else: 202 | writer.simpleElement("dict") 203 | writer.writeDict = writeDict 204 | writer.writeln("") 205 | writer.writeValue(value) 206 | writer.writeln("") 207 | else: 208 | # Not a proper format 209 | raise ValueError("Unsupported format: {}".format(fmt)) 210 | 211 | def dumps(value, fmt=FMT_XML, skipkeys=False, sort_keys=True): 212 | # We avoid using writePlistToString() as that uses 213 | # cStringIO and fails when Unicode strings are detected 214 | f = BytesIO() if _check_py3() else StringIO() 215 | dump(value, f, fmt=fmt, skipkeys=skipkeys, sort_keys=sort_keys) 216 | value = f.getvalue() 217 | if _check_py3(): 218 | value = value.decode("utf-8") 219 | return value 220 | 221 | ### ### 222 | # Binary Plist Stuff For Py2 # 223 | ### ### 224 | 225 | # From the python 3 plistlib.py source: https://github.com/python/cpython/blob/3.11/Lib/plistlib.py 226 | # Tweaked to function on both Python 2 and 3 227 | 228 | class UID: 229 | def __init__(self, data): 230 | if not isinstance(data, int): 231 | raise TypeError("data must be an int") 232 | # It seems Apple only uses 32-bit unsigned ints for UIDs. Although the comment in 233 | # CoreFoundation's CFBinaryPList.c detailing the binary plist format theoretically 234 | # allows for 64-bit UIDs, most functions in the same file use 32-bit unsigned ints, 235 | # with the sole function hinting at 64-bits appearing to be a leftover from copying 236 | # and pasting integer handling code internally, and this code has not changed since 237 | # it was added. (In addition, code in CFPropertyList.c to handle CF$UID also uses a 238 | # 32-bit unsigned int.) 239 | # 240 | # if data >= 1 << 64: 241 | # raise ValueError("UIDs cannot be >= 2**64") 242 | if data >= 1 << 32: 243 | raise ValueError("UIDs cannot be >= 2**32 (4294967296)") 244 | if data < 0: 245 | raise ValueError("UIDs must be positive") 246 | self.data = data 247 | 248 | def __index__(self): 249 | return self.data 250 | 251 | def __repr__(self): 252 | return "%s(%s)" % (self.__class__.__name__, repr(self.data)) 253 | 254 | def __reduce__(self): 255 | return self.__class__, (self.data,) 256 | 257 | def __eq__(self, other): 258 | if not isinstance(other, UID): 259 | return NotImplemented 260 | return self.data == other.data 261 | 262 | def __hash__(self): 263 | return hash(self.data) 264 | 265 | class InvalidFileException (ValueError): 266 | def __init__(self, message="Invalid file"): 267 | ValueError.__init__(self, message) 268 | 269 | _BINARY_FORMAT = {1: 'B', 2: 'H', 4: 'L', 8: 'Q'} 270 | 271 | _undefined = object() 272 | 273 | class _BinaryPlistParser: 274 | """ 275 | Read or write a binary plist file, following the description of the binary 276 | format. Raise InvalidFileException in case of error, otherwise return the 277 | root object. 278 | see also: http://opensource.apple.com/source/CF/CF-744.18/CFBinaryPList.c 279 | """ 280 | def __init__(self, use_builtin_types, dict_type): 281 | self._use_builtin_types = use_builtin_types 282 | self._dict_type = dict_type 283 | 284 | def parse(self, fp): 285 | try: 286 | # The basic file format: 287 | # HEADER 288 | # object... 289 | # refid->offset... 290 | # TRAILER 291 | self._fp = fp 292 | self._fp.seek(-32, os.SEEK_END) 293 | trailer = self._fp.read(32) 294 | if len(trailer) != 32: 295 | raise InvalidFileException() 296 | ( 297 | offset_size, self._ref_size, num_objects, top_object, 298 | offset_table_offset 299 | ) = struct.unpack('>6xBBQQQ', trailer) 300 | self._fp.seek(offset_table_offset) 301 | self._object_offsets = self._read_ints(num_objects, offset_size) 302 | self._objects = [_undefined] * num_objects 303 | return self._read_object(top_object) 304 | 305 | except (OSError, IndexError, struct.error, OverflowError, 306 | UnicodeDecodeError): 307 | raise InvalidFileException() 308 | 309 | def _get_size(self, tokenL): 310 | """ return the size of the next object.""" 311 | if tokenL == 0xF: 312 | m = self._fp.read(1)[0] 313 | if not _check_py3(): 314 | m = ord(m) 315 | m = m & 0x3 316 | s = 1 << m 317 | f = '>' + _BINARY_FORMAT[s] 318 | return struct.unpack(f, self._fp.read(s))[0] 319 | 320 | return tokenL 321 | 322 | def _read_ints(self, n, size): 323 | data = self._fp.read(size * n) 324 | if size in _BINARY_FORMAT: 325 | return struct.unpack('>' + _BINARY_FORMAT[size] * n, data) 326 | else: 327 | if not size or len(data) != size * n: 328 | raise InvalidFileException() 329 | return tuple(int(binascii.hexlify(data[i: i + size]),16) 330 | for i in range(0, size * n, size)) 331 | '''return tuple(int.from_bytes(data[i: i + size], 'big') 332 | for i in range(0, size * n, size))''' 333 | 334 | def _read_refs(self, n): 335 | return self._read_ints(n, self._ref_size) 336 | 337 | def _read_object(self, ref): 338 | """ 339 | read the object by reference. 340 | May recursively read sub-objects (content of an array/dict/set) 341 | """ 342 | result = self._objects[ref] 343 | if result is not _undefined: 344 | return result 345 | 346 | offset = self._object_offsets[ref] 347 | self._fp.seek(offset) 348 | token = self._fp.read(1)[0] 349 | if not _check_py3(): 350 | token = ord(token) 351 | tokenH, tokenL = token & 0xF0, token & 0x0F 352 | 353 | if token == 0x00: # \x00 or 0x00 354 | result = None 355 | 356 | elif token == 0x08: # \x08 or 0x08 357 | result = False 358 | 359 | elif token == 0x09: # \x09 or 0x09 360 | result = True 361 | 362 | # The referenced source code also mentions URL (0x0c, 0x0d) and 363 | # UUID (0x0e), but neither can be generated using the Cocoa libraries. 364 | 365 | elif token == 0x0f: # \x0f or 0x0f 366 | result = b'' 367 | 368 | elif tokenH == 0x10: # int 369 | result = int(binascii.hexlify(self._fp.read(1 << tokenL)),16) 370 | if tokenL >= 3: # Signed - adjust 371 | result = result-((result & 0x8000000000000000) << 1) 372 | 373 | elif token == 0x22: # real 374 | result = struct.unpack('>f', self._fp.read(4))[0] 375 | 376 | elif token == 0x23: # real 377 | result = struct.unpack('>d', self._fp.read(8))[0] 378 | 379 | elif token == 0x33: # date 380 | f = struct.unpack('>d', self._fp.read(8))[0] 381 | # timestamp 0 of binary plists corresponds to 1/1/2001 382 | # (year of Mac OS X 10.0), instead of 1/1/1970. 383 | result = (datetime.datetime(2001, 1, 1) + 384 | datetime.timedelta(seconds=f)) 385 | 386 | elif tokenH == 0x40: # data 387 | s = self._get_size(tokenL) 388 | if self._use_builtin_types or not hasattr(plistlib, "Data"): 389 | result = self._fp.read(s) 390 | else: 391 | result = plistlib.Data(self._fp.read(s)) 392 | 393 | elif tokenH == 0x50: # ascii string 394 | s = self._get_size(tokenL) 395 | result = self._fp.read(s).decode('ascii') 396 | result = result 397 | 398 | elif tokenH == 0x60: # unicode string 399 | s = self._get_size(tokenL) 400 | result = self._fp.read(s * 2).decode('utf-16be') 401 | 402 | elif tokenH == 0x80: # UID 403 | # used by Key-Archiver plist files 404 | result = UID(int(binascii.hexlify(self._fp.read(1 + tokenL)),16)) 405 | 406 | elif tokenH == 0xA0: # array 407 | s = self._get_size(tokenL) 408 | obj_refs = self._read_refs(s) 409 | result = [] 410 | self._objects[ref] = result 411 | result.extend(self._read_object(x) for x in obj_refs) 412 | 413 | # tokenH == 0xB0 is documented as 'ordset', but is not actually 414 | # implemented in the Apple reference code. 415 | 416 | # tokenH == 0xC0 is documented as 'set', but sets cannot be used in 417 | # plists. 418 | 419 | elif tokenH == 0xD0: # dict 420 | s = self._get_size(tokenL) 421 | key_refs = self._read_refs(s) 422 | obj_refs = self._read_refs(s) 423 | result = self._dict_type() 424 | self._objects[ref] = result 425 | for k, o in zip(key_refs, obj_refs): 426 | key = self._read_object(k) 427 | if hasattr(plistlib, "Data") and isinstance(key, plistlib.Data): 428 | key = key.data 429 | result[key] = self._read_object(o) 430 | 431 | else: 432 | raise InvalidFileException() 433 | 434 | self._objects[ref] = result 435 | return result 436 | 437 | def _count_to_size(count): 438 | if count < 1 << 8: 439 | return 1 440 | 441 | elif count < 1 << 16: 442 | return 2 443 | 444 | elif count < 1 << 32: 445 | return 4 446 | 447 | else: 448 | return 8 449 | 450 | _scalars = (str, int, float, datetime.datetime, bytes) 451 | 452 | class _BinaryPlistWriter (object): 453 | def __init__(self, fp, sort_keys, skipkeys): 454 | self._fp = fp 455 | self._sort_keys = sort_keys 456 | self._skipkeys = skipkeys 457 | 458 | def write(self, value): 459 | 460 | # Flattened object list: 461 | self._objlist = [] 462 | 463 | # Mappings from object->objectid 464 | # First dict has (type(object), object) as the key, 465 | # second dict is used when object is not hashable and 466 | # has id(object) as the key. 467 | self._objtable = {} 468 | self._objidtable = {} 469 | 470 | # Create list of all objects in the plist 471 | self._flatten(value) 472 | 473 | # Size of object references in serialized containers 474 | # depends on the number of objects in the plist. 475 | num_objects = len(self._objlist) 476 | self._object_offsets = [0]*num_objects 477 | self._ref_size = _count_to_size(num_objects) 478 | 479 | self._ref_format = _BINARY_FORMAT[self._ref_size] 480 | 481 | # Write file header 482 | self._fp.write(b'bplist00') 483 | 484 | # Write object list 485 | for obj in self._objlist: 486 | self._write_object(obj) 487 | 488 | # Write refnum->object offset table 489 | top_object = self._getrefnum(value) 490 | offset_table_offset = self._fp.tell() 491 | offset_size = _count_to_size(offset_table_offset) 492 | offset_format = '>' + _BINARY_FORMAT[offset_size] * num_objects 493 | self._fp.write(struct.pack(offset_format, *self._object_offsets)) 494 | 495 | # Write trailer 496 | sort_version = 0 497 | trailer = ( 498 | sort_version, offset_size, self._ref_size, num_objects, 499 | top_object, offset_table_offset 500 | ) 501 | self._fp.write(struct.pack('>5xBBBQQQ', *trailer)) 502 | 503 | def _flatten(self, value): 504 | # First check if the object is in the object table, not used for 505 | # containers to ensure that two subcontainers with the same contents 506 | # will be serialized as distinct values. 507 | if isinstance(value, _scalars): 508 | if (type(value), value) in self._objtable: 509 | return 510 | 511 | elif hasattr(plistlib, "Data") and isinstance(value, plistlib.Data): 512 | if (type(value.data), value.data) in self._objtable: 513 | return 514 | 515 | elif id(value) in self._objidtable: 516 | return 517 | 518 | # Add to objectreference map 519 | refnum = len(self._objlist) 520 | self._objlist.append(value) 521 | if isinstance(value, _scalars): 522 | self._objtable[(type(value), value)] = refnum 523 | elif hasattr(plistlib, "Data") and isinstance(value, plistlib.Data): 524 | self._objtable[(type(value.data), value.data)] = refnum 525 | else: 526 | self._objidtable[id(value)] = refnum 527 | 528 | # And finally recurse into containers 529 | if isinstance(value, dict): 530 | keys = [] 531 | values = [] 532 | items = value.items() 533 | if self._sort_keys: 534 | items = sorted(items) 535 | 536 | for k, v in items: 537 | if not isinstance(k, basestring): 538 | if self._skipkeys: 539 | continue 540 | raise TypeError("keys must be strings") 541 | keys.append(k) 542 | values.append(v) 543 | 544 | for o in itertools.chain(keys, values): 545 | self._flatten(o) 546 | 547 | elif isinstance(value, (list, tuple)): 548 | for o in value: 549 | self._flatten(o) 550 | 551 | def _getrefnum(self, value): 552 | if isinstance(value, _scalars): 553 | return self._objtable[(type(value), value)] 554 | elif hasattr(plistlib, "Data") and isinstance(value, plistlib.Data): 555 | return self._objtable[(type(value.data), value.data)] 556 | else: 557 | return self._objidtable[id(value)] 558 | 559 | def _write_size(self, token, size): 560 | if size < 15: 561 | self._fp.write(struct.pack('>B', token | size)) 562 | 563 | elif size < 1 << 8: 564 | self._fp.write(struct.pack('>BBB', token | 0xF, 0x10, size)) 565 | 566 | elif size < 1 << 16: 567 | self._fp.write(struct.pack('>BBH', token | 0xF, 0x11, size)) 568 | 569 | elif size < 1 << 32: 570 | self._fp.write(struct.pack('>BBL', token | 0xF, 0x12, size)) 571 | 572 | else: 573 | self._fp.write(struct.pack('>BBQ', token | 0xF, 0x13, size)) 574 | 575 | def _write_object(self, value): 576 | ref = self._getrefnum(value) 577 | self._object_offsets[ref] = self._fp.tell() 578 | if value is None: 579 | self._fp.write(b'\x00') 580 | 581 | elif value is False: 582 | self._fp.write(b'\x08') 583 | 584 | elif value is True: 585 | self._fp.write(b'\x09') 586 | 587 | elif isinstance(value, int): 588 | if value < 0: 589 | try: 590 | self._fp.write(struct.pack('>Bq', 0x13, value)) 591 | except struct.error: 592 | raise OverflowError(value) # from None 593 | elif value < 1 << 8: 594 | self._fp.write(struct.pack('>BB', 0x10, value)) 595 | elif value < 1 << 16: 596 | self._fp.write(struct.pack('>BH', 0x11, value)) 597 | elif value < 1 << 32: 598 | self._fp.write(struct.pack('>BL', 0x12, value)) 599 | elif value < 1 << 63: 600 | self._fp.write(struct.pack('>BQ', 0x13, value)) 601 | elif value < 1 << 64: 602 | self._fp.write(b'\x14' + value.to_bytes(16, 'big', signed=True)) 603 | else: 604 | raise OverflowError(value) 605 | 606 | elif isinstance(value, float): 607 | self._fp.write(struct.pack('>Bd', 0x23, value)) 608 | 609 | elif isinstance(value, datetime.datetime): 610 | f = (value - datetime.datetime(2001, 1, 1)).total_seconds() 611 | self._fp.write(struct.pack('>Bd', 0x33, f)) 612 | 613 | elif (_check_py3() and isinstance(value, (bytes, bytearray))) or (hasattr(plistlib, "Data") and isinstance(value, plistlib.Data)): 614 | if not isinstance(value, (bytes, bytearray)): 615 | value = value.data # Unpack it 616 | self._write_size(0x40, len(value)) 617 | self._fp.write(value) 618 | 619 | elif isinstance(value, basestring): 620 | try: 621 | t = value.encode('ascii') 622 | self._write_size(0x50, len(value)) 623 | except UnicodeEncodeError: 624 | t = value.encode('utf-16be') 625 | self._write_size(0x60, len(t) // 2) 626 | self._fp.write(t) 627 | 628 | elif isinstance(value, UID) or (hasattr(plistlib,"UID") and isinstance(value, plistlib.UID)): 629 | if value.data < 0: 630 | raise ValueError("UIDs must be positive") 631 | elif value.data < 1 << 8: 632 | self._fp.write(struct.pack('>BB', 0x80, value)) 633 | elif value.data < 1 << 16: 634 | self._fp.write(struct.pack('>BH', 0x81, value)) 635 | elif value.data < 1 << 32: 636 | self._fp.write(struct.pack('>BL', 0x83, value)) 637 | # elif value.data < 1 << 64: 638 | # self._fp.write(struct.pack('>BQ', 0x87, value)) 639 | else: 640 | raise OverflowError(value) 641 | 642 | elif isinstance(value, (list, tuple)): 643 | refs = [self._getrefnum(o) for o in value] 644 | s = len(refs) 645 | self._write_size(0xA0, s) 646 | self._fp.write(struct.pack('>' + self._ref_format * s, *refs)) 647 | 648 | elif isinstance(value, dict): 649 | keyRefs, valRefs = [], [] 650 | 651 | if self._sort_keys: 652 | rootItems = sorted(value.items()) 653 | else: 654 | rootItems = value.items() 655 | 656 | for k, v in rootItems: 657 | if not isinstance(k, basestring): 658 | if self._skipkeys: 659 | continue 660 | raise TypeError("keys must be strings") 661 | keyRefs.append(self._getrefnum(k)) 662 | valRefs.append(self._getrefnum(v)) 663 | 664 | s = len(keyRefs) 665 | self._write_size(0xD0, s) 666 | self._fp.write(struct.pack('>' + self._ref_format * s, *keyRefs)) 667 | self._fp.write(struct.pack('>' + self._ref_format * s, *valRefs)) 668 | 669 | else: 670 | raise TypeError(value) 671 | -------------------------------------------------------------------------------- /Scripts/run.py: -------------------------------------------------------------------------------- 1 | import sys, subprocess, time, threading, shlex 2 | try: 3 | from Queue import Queue, Empty 4 | except: 5 | from queue import Queue, Empty 6 | 7 | ON_POSIX = 'posix' in sys.builtin_module_names 8 | 9 | class Run: 10 | 11 | def __init__(self): 12 | return 13 | 14 | def _read_output(self, pipe, q): 15 | try: 16 | for line in iter(lambda: pipe.read(1), b''): 17 | q.put(line) 18 | except ValueError: 19 | pass 20 | pipe.close() 21 | 22 | def _create_thread(self, output): 23 | # Creates a new queue and thread object to watch based on the output pipe sent 24 | q = Queue() 25 | t = threading.Thread(target=self._read_output, args=(output, q)) 26 | t.daemon = True 27 | return (q,t) 28 | 29 | def _stream_output(self, comm, shell = False): 30 | output = error = "" 31 | p = None 32 | try: 33 | if shell and type(comm) is list: 34 | comm = " ".join(shlex.quote(x) for x in comm) 35 | if not shell and type(comm) is str: 36 | comm = shlex.split(comm) 37 | p = subprocess.Popen(comm, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0, universal_newlines=True, close_fds=ON_POSIX) 38 | # Setup the stdout thread/queue 39 | q,t = self._create_thread(p.stdout) 40 | qe,te = self._create_thread(p.stderr) 41 | # Start both threads 42 | t.start() 43 | te.start() 44 | 45 | while True: 46 | c = z = "" 47 | try: c = q.get_nowait() 48 | except Empty: pass 49 | else: 50 | sys.stdout.write(c) 51 | output += c 52 | sys.stdout.flush() 53 | try: z = qe.get_nowait() 54 | except Empty: pass 55 | else: 56 | sys.stderr.write(z) 57 | error += z 58 | sys.stderr.flush() 59 | if not c==z=="": continue # Keep going until empty 60 | # No output - see if still running 61 | p.poll() 62 | if p.returncode != None: 63 | # Subprocess ended 64 | break 65 | # No output, but subprocess still running - stall for 20ms 66 | time.sleep(0.02) 67 | 68 | o, e = p.communicate() 69 | return (output+o, error+e, p.returncode) 70 | except: 71 | if p: 72 | try: o, e = p.communicate() 73 | except: o = e = "" 74 | return (output+o, error+e, p.returncode) 75 | return ("", "Command not found!", 1) 76 | 77 | def _decode(self, value, encoding="utf-8", errors="ignore"): 78 | # Helper method to only decode if bytes type 79 | if sys.version_info >= (3,0) and isinstance(value, bytes): 80 | return value.decode(encoding,errors) 81 | return value 82 | 83 | def _run_command(self, comm, shell = False): 84 | c = None 85 | try: 86 | if shell and type(comm) is list: 87 | comm = " ".join(shlex.quote(x) for x in comm) 88 | if not shell and type(comm) is str: 89 | comm = shlex.split(comm) 90 | p = subprocess.Popen(comm, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 91 | c = p.communicate() 92 | except: 93 | if c == None: 94 | return ("", "Command not found!", 1) 95 | return (self._decode(c[0]), self._decode(c[1]), p.returncode) 96 | 97 | def run(self, command_list, leave_on_fail = False): 98 | # Command list should be an array of dicts 99 | if type(command_list) is dict: 100 | # We only have one command 101 | command_list = [command_list] 102 | output_list = [] 103 | for comm in command_list: 104 | args = comm.get("args", []) 105 | shell = comm.get("shell", False) 106 | stream = comm.get("stream", False) 107 | sudo = comm.get("sudo", False) 108 | stdout = comm.get("stdout", False) 109 | stderr = comm.get("stderr", False) 110 | mess = comm.get("message", None) 111 | show = comm.get("show", False) 112 | 113 | if not mess == None: 114 | print(mess) 115 | 116 | if not len(args): 117 | # nothing to process 118 | continue 119 | if sudo: 120 | # Check if we have sudo 121 | out = self._run_command(["which", "sudo"]) 122 | if "sudo" in out[0]: 123 | # Can sudo 124 | if type(args) is list: 125 | args.insert(0, out[0].replace("\n", "")) # add to start of list 126 | elif type(args) is str: 127 | args = out[0].replace("\n", "") + " " + args # add to start of string 128 | 129 | if show: 130 | print(" ".join(args)) 131 | 132 | if stream: 133 | # Stream it! 134 | out = self._stream_output(args, shell) 135 | else: 136 | # Just run and gather output 137 | out = self._run_command(args, shell) 138 | if stdout and len(out[0]): 139 | print(out[0]) 140 | if stderr and len(out[1]): 141 | print(out[1]) 142 | # Append output 143 | output_list.append(out) 144 | # Check for errors 145 | if leave_on_fail and out[2] != 0: 146 | # Got an error - leave 147 | break 148 | if len(output_list) == 1: 149 | # We only ran one command - just return that output 150 | return output_list[0] 151 | return output_list 152 | -------------------------------------------------------------------------------- /Scripts/utils.py: -------------------------------------------------------------------------------- 1 | import sys, os, time, re, json, datetime, ctypes, subprocess 2 | 3 | if os.name == "nt": 4 | # Windows 5 | import msvcrt 6 | else: 7 | # Not Windows \o/ 8 | import select 9 | 10 | class Utils: 11 | 12 | def __init__(self, name = "Python Script"): 13 | self.name = name 14 | # Init our colors before we need to print anything 15 | cwd = os.getcwd() 16 | os.chdir(os.path.dirname(os.path.realpath(__file__))) 17 | if os.path.exists("colors.json"): 18 | self.colors_dict = json.load(open("colors.json")) 19 | else: 20 | self.colors_dict = {} 21 | os.chdir(cwd) 22 | 23 | def check_admin(self): 24 | # Returns whether or not we're admin 25 | try: 26 | is_admin = os.getuid() == 0 27 | except AttributeError: 28 | is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0 29 | return is_admin 30 | 31 | def elevate(self, file): 32 | # Runs the passed file as admin 33 | if self.check_admin(): 34 | return 35 | if os.name == "nt": 36 | ctypes.windll.shell32.ShellExecuteW(None, "runas", '"{}"'.format(sys.executable), '"{}"'.format(file), None, 1) 37 | else: 38 | try: 39 | p = subprocess.Popen(["which", "sudo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 40 | c = p.communicate()[0].decode("utf-8", "ignore").replace("\n", "") 41 | os.execv(c, [ sys.executable, 'python'] + sys.argv) 42 | except: 43 | exit(1) 44 | 45 | def compare_versions(self, vers1, vers2, **kwargs): 46 | # Helper method to compare ##.## strings 47 | # 48 | # vers1 < vers2 = True 49 | # vers1 = vers2 = None 50 | # vers1 > vers2 = False 51 | 52 | # Sanitize the pads 53 | pad = str(kwargs.get("pad", "")) 54 | sep = str(kwargs.get("separator", ".")) 55 | 56 | ignore_case = kwargs.get("ignore_case", True) 57 | 58 | # Cast as strings 59 | vers1 = str(vers1) 60 | vers2 = str(vers2) 61 | 62 | if ignore_case: 63 | vers1 = vers1.lower() 64 | vers2 = vers2.lower() 65 | 66 | # Split and pad lists 67 | v1_parts, v2_parts = self.pad_length(vers1.split(sep), vers2.split(sep)) 68 | 69 | # Iterate and compare 70 | for i in range(len(v1_parts)): 71 | # Remove non-numeric 72 | v1 = ''.join(c.lower() for c in v1_parts[i] if c.isalnum()) 73 | v2 = ''.join(c.lower() for c in v2_parts[i] if c.isalnum()) 74 | # Equalize the lengths 75 | v1, v2 = self.pad_length(v1, v2) 76 | # Compare 77 | if str(v1) < str(v2): 78 | return True 79 | elif str(v1) > str(v2): 80 | return False 81 | # Never differed - return None, must be equal 82 | return None 83 | 84 | def pad_length(self, var1, var2, pad = "0"): 85 | # Pads the vars on the left side to make them equal length 86 | pad = "0" if len(str(pad)) < 1 else str(pad)[0] 87 | if not type(var1) == type(var2): 88 | # Type mismatch! Just return what we got 89 | return (var1, var2) 90 | if len(var1) < len(var2): 91 | if type(var1) is list: 92 | var1.extend([str(pad) for x in range(len(var2) - len(var1))]) 93 | else: 94 | var1 = "{}{}".format((pad*(len(var2)-len(var1))), var1) 95 | elif len(var2) < len(var1): 96 | if type(var2) is list: 97 | var2.extend([str(pad) for x in range(len(var1) - len(var2))]) 98 | else: 99 | var2 = "{}{}".format((pad*(len(var1)-len(var2))), var2) 100 | return (var1, var2) 101 | 102 | def check_path(self, path): 103 | # Let's loop until we either get a working path, or no changes 104 | test_path = path 105 | last_path = None 106 | while True: 107 | # Bail if we've looped at least once and the path didn't change 108 | if last_path != None and last_path == test_path: return None 109 | last_path = test_path 110 | # Check if we stripped everything out 111 | if not len(test_path): return None 112 | # Check if we have a valid path 113 | if os.path.exists(test_path): 114 | return os.path.abspath(test_path) 115 | # Check for quotes 116 | if test_path[0] == test_path[-1] and test_path[0] in ('"',"'"): 117 | test_path = test_path[1:-1] 118 | continue 119 | # Check for a tilde and expand if needed 120 | if test_path[0] == "~": 121 | tilde_expanded = os.path.expanduser(test_path) 122 | if tilde_expanded != test_path: 123 | # Got a change 124 | test_path = tilde_expanded 125 | continue 126 | # Let's check for spaces - strip from the left first, then the right 127 | if test_path[0] in (" ","\t"): 128 | test_path = test_path[1:] 129 | continue 130 | if test_path[-1] in (" ","\t"): 131 | test_path = test_path[:-1] 132 | continue 133 | # Maybe we have escapes to handle? 134 | test_path = "\\".join([x.replace("\\", "") for x in test_path.split("\\\\")]) 135 | 136 | def grab(self, prompt, **kwargs): 137 | # Takes a prompt, a default, and a timeout and shows it with that timeout 138 | # returning the result 139 | timeout = kwargs.get("timeout", 0) 140 | default = kwargs.get("default", None) 141 | # If we don't have a timeout - then skip the timed sections 142 | if timeout <= 0: 143 | if sys.version_info >= (3, 0): 144 | return input(prompt) 145 | else: 146 | return str(raw_input(prompt)) 147 | # Write our prompt 148 | sys.stdout.write(prompt) 149 | sys.stdout.flush() 150 | if os.name == "nt": 151 | start_time = time.time() 152 | i = '' 153 | while True: 154 | if msvcrt.kbhit(): 155 | c = msvcrt.getche() 156 | if ord(c) == 13: # enter_key 157 | break 158 | elif ord(c) >= 32: #space_char 159 | i += c 160 | if len(i) == 0 and (time.time() - start_time) > timeout: 161 | break 162 | else: 163 | i, o, e = select.select( [sys.stdin], [], [], timeout ) 164 | if i: 165 | i = sys.stdin.readline().strip() 166 | print('') # needed to move to next line 167 | if len(i) > 0: 168 | return i 169 | else: 170 | return default 171 | 172 | def cls(self): 173 | os.system('cls' if os.name=='nt' else 'clear') 174 | 175 | def cprint(self, message, **kwargs): 176 | strip_colors = kwargs.get("strip_colors", False) 177 | if os.name == "nt": 178 | strip_colors = True 179 | reset = u"\u001b[0m" 180 | # Requires sys import 181 | for c in self.colors: 182 | if strip_colors: 183 | message = message.replace(c["find"], "") 184 | else: 185 | message = message.replace(c["find"], c["replace"]) 186 | if strip_colors: 187 | return message 188 | sys.stdout.write(message) 189 | print(reset) 190 | 191 | # Needs work to resize the string if color chars exist 192 | '''# Header drawing method 193 | def head(self, text = None, width = 55): 194 | if text == None: 195 | text = self.name 196 | self.cls() 197 | print(" {}".format("#"*width)) 198 | len_text = self.cprint(text, strip_colors=True) 199 | mid_len = int(round(width/2-len(len_text)/2)-2) 200 | middle = " #{}{}{}#".format(" "*mid_len, len_text, " "*((width - mid_len - len(len_text))-2)) 201 | if len(middle) > width+1: 202 | # Get the difference 203 | di = len(middle) - width 204 | # Add the padding for the ...# 205 | di += 3 206 | # Trim the string 207 | middle = middle[:-di] 208 | newlen = len(middle) 209 | middle += "...#" 210 | find_list = [ c["find"] for c in self.colors ] 211 | 212 | # Translate colored string to len 213 | middle = middle.replace(len_text, text + self.rt_color) # always reset just in case 214 | self.cprint(middle) 215 | print("#"*width)''' 216 | 217 | # Header drawing method 218 | def head(self, text = None, width = 55): 219 | if text == None: 220 | text = self.name 221 | self.cls() 222 | print(" {}".format("#"*width)) 223 | mid_len = int(round(width/2-len(text)/2)-2) 224 | middle = " #{}{}{}#".format(" "*mid_len, text, " "*((width - mid_len - len(text))-2)) 225 | if len(middle) > width+1: 226 | # Get the difference 227 | di = len(middle) - width 228 | # Add the padding for the ...# 229 | di += 3 230 | # Trim the string 231 | middle = middle[:-di] + "...#" 232 | print(middle) 233 | print("#"*width) 234 | 235 | def resize(self, width, height): 236 | print('\033[8;{};{}t'.format(height, width)) 237 | 238 | def custom_quit(self): 239 | self.head() 240 | print("by CorpNewt\n") 241 | print("Thanks for testing it out, for bugs/comments/complaints") 242 | print("send me a message on Reddit, or check out my GitHub:\n") 243 | print("www.reddit.com/u/corpnewt") 244 | print("www.github.com/corpnewt\n") 245 | # Get the time and wish them a good morning, afternoon, evening, and night 246 | hr = datetime.datetime.now().time().hour 247 | if hr > 3 and hr < 12: 248 | print("Have a nice morning!\n\n") 249 | elif hr >= 12 and hr < 17: 250 | print("Have a nice afternoon!\n\n") 251 | elif hr >= 17 and hr < 21: 252 | print("Have a nice evening!\n\n") 253 | else: 254 | print("Have a nice night!\n\n") 255 | exit(0) 256 | --------------------------------------------------------------------------------