30 Commits

Author SHA1 Message Date
Racka98 bff06108e7 Update README.md 2021-02-04 12:13:09 +03:00
Racka98 29ef835fd5 Update README.md 2021-02-04 12:12:22 +03:00
Racka98 c37fc703f9 Update README.md 2021-02-04 12:06:13 +03:00
Racka98 5aba24cd5d Update README.md 2021-02-04 12:05:19 +03:00
Racka98 634d12f96d Update README.md 2021-02-04 12:04:55 +03:00
Racka98 4d513d2b1b Update README.md 2021-02-04 11:54:53 +03:00
Racka98 db04bf1c95 Delete PlistEditPro_187.zip 2020-12-17 06:05:53 +03:00
Racka98 08fb2ff29e Create LICENSE 2020-11-30 08:17:55 +03:00
racka98 8bf6bfca49 Updated Intel wifi kexts 2020-11-29 23:45:48 +03:00
racka98 9e20c6a16f Added Big Sur Boot picker + Boot chime 2020-11-29 22:32:41 +03:00
Racka98 354a346f5a Update README.md 2020-11-29 10:09:55 +03:00
Racka98 bef864c125 Update bug_report.md 2020-11-29 10:07:52 +03:00
Racka98 4148925e71 Update bug_report.md 2020-11-29 09:53:17 +03:00
racka98 3c46260f97 Update card reader kext 2020-11-29 09:44:37 +03:00
racka98 377a66f3bb Some changes to utilities 2020-11-24 09:47:51 +03:00
racka98 4d13411a11 Some changes to Utilities folder 2020-11-24 09:43:27 +03:00
Racka98 fe91be23fa Update README.md 2020-11-23 23:53:40 +03:00
Racka98 79e6b7968f Update README.md 2020-11-23 23:52:17 +03:00
Racka98 b843e549f8 Added some Big Sur install usb creation procedures 2020-11-23 23:47:57 +03:00
Racka98 cdaf58a7c7 Update README.md 2020-11-23 23:34:44 +03:00
Racka98 dab5524995 Updated Read Me for changes made for Big Sur 2020-11-17 09:34:43 +03:00
Racka98 678fe7c04a Update README.md 2020-11-17 08:36:02 +03:00
racka98 3f2853b111 Renamed sound card to Realtek High Definition Audio Controller 2020-11-17 08:30:26 +03:00
racka98 5826895644 Added Big Sur Airportitlwm & Updated config.plist & CodecCommander 2020-11-17 08:26:28 +03:00
Racka98 c1dfa4a79d Update README.md 2020-11-14 18:02:27 +03:00
Racka98 2da3cabdfa Update README.md 2020-11-14 15:10:35 +03:00
racka98 b8b306cb3e Added custom Intel WiFi kexts 2020-11-14 14:58:40 +03:00
racka98 5ed7f38c5d Added custom Intel WiFi Kexts that are much smaller and load faster 2020-11-14 14:51:34 +03:00
racka98 3a4a994942 Removed my Serial number in Config.plist 2020-11-12 10:26:05 +03:00
Racka98 3b81ada05d Updated Post Install 2020-11-12 10:23:33 +03:00
83 changed files with 2634 additions and 130 deletions
+4 -10
View File
@@ -23,16 +23,10 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**macOS Info:**
- OS: [e.g. Big Sur]
- Version [e.g. 11.0.1]
- Laptop Model: [e.g. T450 or T450s]
**Additional context**
Add any other context about the problem here.
+11 -19
View File
@@ -1032,8 +1032,6 @@
<dict>
<key>PciRoot(0x0)/Pci(0x1b,0x0)</key>
<dict>
<key>AAPL,slot-name</key>
<string>Internal</string>
<key>hda-gfx</key>
<string>onboard-1</string>
<key>hda-idle-support</key>
@@ -1042,10 +1040,6 @@
<data>
IAAAAA==
</data>
<key>model</key>
<string>Intel Wildcat Point-LP High Definition Audio Controller</string>
<key>name</key>
<string>Sound Card</string>
</dict>
<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
<dict>
@@ -1053,8 +1047,6 @@
<data>
BgAmFg==
</data>
<key>AAPL,slot-name</key>
<string>Internal@0,2,0</string>
<key>device-id</key>
<data>
FhYAAA==
@@ -1495,7 +1487,7 @@
<key>Comment</key>
<string>Intel WiFi Native</string>
<key>Enabled</key>
<false/>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/Airportitlwm</string>
<key>MaxKernel</key>
@@ -1513,7 +1505,7 @@
<key>Comment</key>
<string>Intel WiFi</string>
<key>Enabled</key>
<true/>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/itlwm</string>
<key>MaxKernel</key>
@@ -1891,7 +1883,7 @@
<key>ConsoleAttributes</key>
<integer>0</integer>
<key>HibernateMode</key>
<string>None</string>
<string>Auto</string>
<key>HideAuxiliary</key>
<false/>
<key>PickerAttributes</key>
@@ -2125,12 +2117,11 @@
<key>AdviseWindows</key>
<false/>
<key>MLB</key>
<string>C02601902J9GDVV1H</string>
<string>0</string>
<key>ProcessorType</key>
<integer>0</integer>
<key>ROM</key>
<data>
TDSI5L4b
</data>
<key>SpoofVendor</key>
<true/>
@@ -2139,9 +2130,9 @@
<key>SystemProductName</key>
<string>MacBookPro12,1</string>
<key>SystemSerialNumber</key>
<string>C02R2XYZH1DP</string>
<string>0</string>
<key>SystemUUID</key>
<string>F88C6745-FD16-44F3-9F94-329A7B622C00</string>
<string>0</string>
</dict>
<key>UpdateDataHub</key>
<true/>
@@ -2178,13 +2169,13 @@
<key>AudioOut</key>
<integer>0</integer>
<key>AudioSupport</key>
<false/>
<true/>
<key>MinimumVolume</key>
<integer>20</integer>
<integer>50</integer>
<key>PlayChime</key>
<false/>
<true/>
<key>VolumeAmplifier</key>
<integer>0</integer>
<integer>143</integer>
</dict>
<key>ConnectDrivers</key>
<true/>
@@ -2193,6 +2184,7 @@
<string>HfsPlus.efi</string>
<string>OpenRuntime.efi</string>
<string>OpenCanopy.efi</string>
<string>AudioDxe.efi</string>
</array>
<key>Input</key>
<dict>
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19H2</string>
<string>20B29</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -50,8 +50,8 @@
<string>AirportItlwm</string>
<key>IOMatchCategory</key>
<string>IODefaultMatchCategory</string>
<key>IOPCIPrimaryMatch</key>
<string>0x00008086&amp;0x0000ffff</string>
<key>IOPCIMatch</key>
<string>0x27238086 0x43F08086 0xA0F08086 0x34F08086 0x4DF08086 0x02F08086 0x3DF08086 0x06F08086 0x27208086 0x08b18086 0x08b28086 0x08b38086 0x08b48086 0x095a8086 0x095b8086 0x31658086 0x31668086 0x24f38086 0x24f48086 0x24f58086 0x24f68086 0x24fb8086 0x24fd8086 0x25268086 0x9df08086 0xa3708086 0x31DC8086 0x30DC8086 0x271C8086 0x271B8086 0x42a48086 0x00a08086 0x00a48086 0x02a08086 0x40a48086 0x00608086 0x00648086 0x02608086 0x02648086 0x42298086 0x422b8086 0x422c8086 0x42308086 0x42328086 0x42358086 0x42368086 0x42378086 0x42388086 0x42398086 0x423a8086 0x423b8086 0x423c8086 0x423d8086 0x00828086 0x00838086 0x00848086 0x00858086 0x00878086 0x00898086 0x008a8086 0x008b8086 0x00908086 0x00918086 0x08928086 0x08938086 0x08948086 0x08958086 0x08968086 0x08978086 0x08ae8086 0x08af8086 0x088e8086 0x088f8086 0x08908086 0x08918086 0x08878086 0x08888086</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
+11 -11
View File
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18A391</string>
<string>19C57</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.7.1</string>
<string>2.7.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@@ -27,21 +27,21 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.7.1</string>
<string>2.7.2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9F2000</string>
<string>11C29</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>10M2518</string>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.6</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>0941</string>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>9F2000</string>
<string>11C29</string>
<key>IOKitPersonalities</key>
<dict>
<key>CodecCommander</key>
@@ -262,9 +262,7 @@
<array>
<dict>
<key>Command</key>
<data>
AacHJA==
</data>
<string>0x01a70724</string>
<key>Comment</key>
<string>Node 0x1a - Pin Control (In Enable / VRefEn)</string>
<key>On Init</key>
@@ -449,6 +447,8 @@
<string>CodecCommanderClient</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2013-2014 TimeWalker/RehabMan. All rights reserved.</string>
<key>OSBundleLibraries</key>
@@ -1,7 +1,7 @@
// CodecCommander configuration for ALC1220
// provided by daliansky @github
DefinitionBlock ("", "SSDT", 1, "hack", "ALC1220", 0)
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC1220", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
@@ -1,7 +1,7 @@
// CodecCommander configuration for ALC256 to fix various issue
// repo: https://github.com/insanelydeepak/cloverHDA-for-Mac-OS-Sierra-10.12
DefinitionBlock ("", "SSDT", 1, "hack", "ALC256", 0)
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC256i", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
@@ -43,4 +43,4 @@ DefinitionBlock ("", "SSDT", 1, "hack", "ALC256", 0)
},
})
}
//EOF
//EOF
@@ -1,7 +1,7 @@
// CodecCommander configuration for ALC256
// From: https://github.com/vbourachot/XPS13-9350-OSX/blob/master/ssdt/SSDT-ALC256.dsl
DefinitionBlock ("", "SSDT", 1, "hack", "ALC256", 0x00003000)
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC256v", 0x00003000)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
@@ -0,0 +1,45 @@
// This SSDT demonstrates a custom configuration for ALC280.
// If you had a codec that needed the same configuration, you could
// load this SSDT in order to implement it without modifying the kext.
// It will override the defaults specfied by the CodecCommander Info.plist
// Customize to suit your needs.
// This data provided by @zirkaiva.
// See here: http://www.tonymacx86.com/el-capitan-laptop-guides/175935-guide-lenovo-t430-el-capitan-34.html#post1239765
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC280", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
{
"CodecCommander", Package()
{
"Custom Commands", Package()
{
Package(){}, // signifies Array instead of Dictionary
Package()
{
// 0x15 SET_UNSOLICITED_ENABLE 0x83
"Command", Buffer() { 0x01, 0x57, 0x08, 0x83 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
Package()
{
// 0x1a SET_PIN_WIDGET_CONTROL 0x24
// Node 0x1a - Pin Control (In Enable / VRefEn)
"Command", Buffer() { 0x01, 0xa7, 0x07, 0x24 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
},
//"Perform Reset", ">n", // enable if using AppleALC
//"Perform Reset on External Wake", ">n", // enable if using AppleALC
},
})
}
//EOF
@@ -0,0 +1,44 @@
// This SSDT demonstrates a custom configuration for ALC283.
// It is the same data that is currently in the Info.plist
// If you had a codec that needed the same configuration, you could
// load this SSDT in order to implement it without modifying the kext.
// It will override the defaults specfied by the CodecCommander Info.plist
// Customize to suit your needs.
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC283", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
{
"CodecCommander", Package()
{
"Custom Commands", Package()
{
Package(){}, // signifies Array instead of Dictionary
Package()
{
// 0x19 SET_PIN_WIDGET_CONTROL 0x25
"Command", Buffer() { 0x01, 0x97, 0x07, 0x25 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
Package()
{
// 0x21 SET_UNSOLICITED_ENABLE 0x83
"Command", Buffer() { 0x02, 0x17, 0x08, 0x83 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
},
"Perform Reset", ">n",
//"Perform Reset on External Wake", ">n", // enable if using AppleALC
"Send Delay", 10,
"Sleep Nodes", ">n",
},
})
}
//EOF
@@ -0,0 +1,52 @@
// This SSDT demonstrates a custom configuration for ALC298.
// It is the same data that is currently in the Info.plist
// If you had a codec that needed the same configuration, you could
// load this SSDT in order to implement it without modifying the kext.
// It will override the defaults specfied by the CodecCommander Info.plist
// Customize to suit your needs.
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC298", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
{
"CodecCommander", Package()
{
"Custom Commands", Package()
{
Package(){}, // signifies Array instead of Dictionary
Package()
{
// 0x18 SET_PIN_WIDGET_CONTROL 0x22
"Command", Buffer() { 0x01, 0x87, 0x07, 0x22 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
Package()
{
// 0x1a SET_PIN_WIDGET_CONTROL 0x23
"Command", Buffer() { 0x01, 0xa7, 0x07, 0x23 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
Package()
{
// 0x21 SET_UNSOLICITED_ENABLE 0x83
"Command", Buffer() { 0x02, 0x17, 0x08, 0x83 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
},
"Perform Reset", ">n",
//"Perform Reset on External Wake", ">n", // enable if using AppleALC
"Send Delay", 10,
"Sleep Nodes", ">n",
},
})
}
//EOF
@@ -0,0 +1,61 @@
// This SSDT demonstrates a custom configuration for ALC298.
//
// It is reportedly needed to solve problems of jack sense and
// distorted sound with headphone.
//
// See here for details:
// http://www.tonymacx86.com/threads/alc3266-10ec0298-files-for-applehdapatcher.191231/page-5#post-1323829
//
// Customize to suit your needs.
// Compile to SSDT-ALC298.aml, place in ACPI/patched. Make sure SortedOrder includes it.
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC298a", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
{
"CodecCommander", Package()
{
"Custom Commands", Package()
{
Package(){}, // signifies Array instead of Dictionary
Package()
{
// 0x01 SET_CODEC_RESET 0x00
"Command", Buffer() { 0x00, 0x17, 0xff, 0x00 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">n",
},
Package()
{
// 0x01 SET_CODEC_RESET 0x00
"Command", Buffer() { 0x00, 0x17, 0xff, 0x00 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">n",
},
Package()
{
// 0x1 SET_POWER_STATE 0x03
"Command", Buffer() { 0x00, 0x17, 0x05, 0x03 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">n",
},
Package()
{
// 0x21 SET_UNSOLICITED_ENABLE 0x83
"Command", Buffer() { 0x02, 0x17, 0x08, 0x83 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
},
//"Perform Reset", ">n", // enable if using AppleALC
//"Perform Reset on External Wake", ">n", // enable if using AppleALC
},
})
}
//EOF
@@ -0,0 +1,63 @@
// This SSDT demonstrates a custom configuration for ALC668.
//
// It is reportedly needed to solve a problem with booting
// OS X after Windows.
//
// See here for details:
// http://www.tonymacx86.com/el-capitan-laptop-support/185808-alc668-no-sound-after-reboot-windows-10-a.html#post1201248
//
// Customize to suit your needs.
// Compile to SSDT-ALC668.aml, place in ACPI/patched. Make sure SortedOrder includes it.
DefinitionBlock ("", "SSDT", 1, "hack", "_ALC668", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
{
"CodecCommander", Package()
{
"Custom Commands", Package()
{
Package(){}, // signifies Array instead of Dictionary
// correcting headphones (this is in the Info.plist too)
Package()
{
// 0x15 SET_UNSOLICITED_ENABLE 0x83
"Command", Buffer() { 0x01, 0x57, 0x08, 0x83 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">y",
},
Package()
{
// Node 0x1b - Pin Control (In Enable)
"Command", Buffer() { 0x01, 0xb7, 0x07, 0x20 },
"On Init", ">n",
"On Sleep", ">n",
"On Wake", ">y",
},
// correcting audio after Windows (not in current Info.plist)
Package()
{
// 0x20 SET_COEF_INDEX 0x07
"Command", Buffer() { 0x02, 0x05, 0x00, 0x07 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">n",
},
Package()
{
// 0x20 SET_PROC_COEF 0x0F80
"Command", Buffer() { 0x02, 0x04, 0x0f, 0x80 },
"On Init", ">y",
"On Sleep", ">n",
"On Wake", ">n",
},
},
//"Perform Reset", ">n", // enable if using AppleALC
//"Perform Reset on External Wake", ">n", // enable if using AppleALC
},
})
}
//EOF
@@ -8,7 +8,7 @@
// As of CodecCommander v2.7.1, CodecCommander detects AppleALC for setting the default
// of these two options false.
DefinitionBlock ("", "SSDT", 1, "hack", "CC-ALC", 0)
DefinitionBlock ("", "SSDT", 1, "hack", "_CCALC", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
Name(_SB.PCI0.HDEF.RMCF, Package()
@@ -4,7 +4,7 @@
//
// created by nayeweiyang/XuWang
DefinitionBlock ("", "SSDT", 1, "hack", "CX20752", 0)
DefinitionBlock ("", "SSDT", 1, "hack", "_CX20752", 0)
{
External(_SB.PCI0.HDEF, DeviceObj)
@@ -0,0 +1,267 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Resources/Samples/SSDT-ALC1220.dsl</key>
<data>
EIES+l9rMGoeBieSkUNddrD5bWo=
</data>
<key>Resources/Samples/SSDT-ALC256-insanelydeepak.dsl</key>
<data>
VZkOsssBJ6T1/BsvNJsxIgN6sZY=
</data>
<key>Resources/Samples/SSDT-ALC256-vbourachot.dsl</key>
<data>
4Kgmc2FJT1dIg9N7ykidCcuhPVI=
</data>
<key>Resources/Samples/SSDT-ALC280.dsl</key>
<data>
I0LQ4c40vPqO7KQyWKJ2MnsfiIU=
</data>
<key>Resources/Samples/SSDT-ALC283.dsl</key>
<data>
3C5d98Yawh/48mwCelHDHJ4GINQ=
</data>
<key>Resources/Samples/SSDT-ALC298.dsl</key>
<data>
VKDMTH2YOrg+Y+z3VS9OHrPS0Fk=
</data>
<key>Resources/Samples/SSDT-ALC298a.dsl</key>
<data>
uZMK4TFxYyvCnF64GKMCkmIj+D0=
</data>
<key>Resources/Samples/SSDT-ALC668.dsl</key>
<data>
pxe3Mfkqdxto0CYYP1QQNnR/yYw=
</data>
<key>Resources/Samples/SSDT-AppleALC.dsl</key>
<data>
VPP+WvDCKf8Tw2HAbI6mGSApZec=
</data>
<key>Resources/Samples/SSDT-CX20752.dsl</key>
<data>
2Dc4I1jWG0/CmJeTVaO3ci4K3B0=
</data>
</dict>
<key>files2</key>
<dict>
<key>Resources/Samples/SSDT-ALC1220.dsl</key>
<dict>
<key>hash</key>
<data>
EIES+l9rMGoeBieSkUNddrD5bWo=
</data>
<key>hash2</key>
<data>
jqBgCuISRIgDEohB6eJL6S35hXiT4avRWCIQkoG/7jE=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC256-insanelydeepak.dsl</key>
<dict>
<key>hash</key>
<data>
VZkOsssBJ6T1/BsvNJsxIgN6sZY=
</data>
<key>hash2</key>
<data>
sfT2TRn4QDdpacpab2BQO0EUosUxxjYP+H67YVrFxSM=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC256-vbourachot.dsl</key>
<dict>
<key>hash</key>
<data>
4Kgmc2FJT1dIg9N7ykidCcuhPVI=
</data>
<key>hash2</key>
<data>
OJ1gIMJ54LeFpxyxQ4BNebpxAspZWngZsLotyXRav1E=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC280.dsl</key>
<dict>
<key>hash</key>
<data>
I0LQ4c40vPqO7KQyWKJ2MnsfiIU=
</data>
<key>hash2</key>
<data>
VXWVuyccAWvOYtVBGFby4wtGs8w3rgemCSrDsfU9Y4w=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC283.dsl</key>
<dict>
<key>hash</key>
<data>
3C5d98Yawh/48mwCelHDHJ4GINQ=
</data>
<key>hash2</key>
<data>
wrBGgW4l9PJROiSBO70+4LDlxtKuTClEHurWIKbAqWw=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC298.dsl</key>
<dict>
<key>hash</key>
<data>
VKDMTH2YOrg+Y+z3VS9OHrPS0Fk=
</data>
<key>hash2</key>
<data>
4wJ+O/VDersVdLXH6wdYyd8Giyj5sp39FYFacOMgWMo=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC298a.dsl</key>
<dict>
<key>hash</key>
<data>
uZMK4TFxYyvCnF64GKMCkmIj+D0=
</data>
<key>hash2</key>
<data>
35qUmgVJmTFC09kAKboui1WfOeWpx8EZiuw0Ak11KqM=
</data>
</dict>
<key>Resources/Samples/SSDT-ALC668.dsl</key>
<dict>
<key>hash</key>
<data>
pxe3Mfkqdxto0CYYP1QQNnR/yYw=
</data>
<key>hash2</key>
<data>
LyyMqlOlDDUkN/V9UfdYEo4NdzbruFwX9AtjqfzikHw=
</data>
</dict>
<key>Resources/Samples/SSDT-AppleALC.dsl</key>
<dict>
<key>hash</key>
<data>
VPP+WvDCKf8Tw2HAbI6mGSApZec=
</data>
<key>hash2</key>
<data>
Sqi40XOwc8QaXlqUngUwxY66utwbKX2zXrdXprwkCoA=
</data>
</dict>
<key>Resources/Samples/SSDT-CX20752.dsl</key>
<dict>
<key>hash</key>
<data>
2Dc4I1jWG0/CmJeTVaO3ci4K3B0=
</data>
<key>hash2</key>
<data>
sDRLVLSx27tOfnytpsAD7S23OOmox6NE4EeMafkvxzk=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>16D32</string>
<string>19E287</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -17,47 +17,49 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>2.3</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<string>7</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>8C1002</string>
<string>11E608c</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>16C58</string>
<string>17A315g</string>
<key>DTSDKName</key>
<string>macosx10.12</string>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0821</string>
<string>1150</string>
<key>DTXcodeBuild</key>
<string>8C1002</string>
<string>11E608c</string>
<key>IOKitPersonalities</key>
<dict>
<key>rtsx_softc</key>
<key>Sinetek_rtsx</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.sinet3k.Sinetek-rtsx</string>
<key>IOClass</key>
<string>rtsx_softc</string>
<string>Sinetek_rtsx</string>
<key>IOKitDebug</key>
<integer>65535</integer>
<key>IOPCIMatch</key>
<string>0x520910EC 0x522710EC 0x522910EC 0x522A10EC 0x524910EC 0x528610EC 0x528710EC 0x528910EC</string>
<string>0x520910EC 0x522710EC 0x522910EC 0x522A10EC 0x524910EC 0x528610EC 0x528710EC 0x528910EC 0x525A10EC</string>
<key>IOProbeScore</key>
<integer>1000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 sinetek. All rights reserved.</string>
<string>Copyright © 2017 sinetek (modified by cholonam). All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOPCIFamily</key>
+14 -12
View File
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19H2</string>
<string>20B29</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -27,17 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11E801a</string>
<string>12A7300</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<string>10.15.6</string>
<key>DTSDKBuild</key>
<string>19G68</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1170</string>
<string>1201</string>
<key>DTXcodeBuild</key>
<string>11E801a</string>
<string>12A7300</string>
<key>IOKitPersonalities</key>
<dict>
<key>itlwm</key>
@@ -90,23 +92,23 @@
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 钟先耀. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>3.2</string>
<string>1.5.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>2.9</string>
<string>1.7</string>
<key>com.apple.kpi.bsd</key>
<string>16.7</string>
<string>8.10.0</string>
<key>com.apple.kpi.iokit</key>
<string>16.7</string>
<string>8.10.0</string>
<key>com.apple.kpi.libkern</key>
<string>16.7</string>
<string>8.10.0</string>
<key>com.apple.kpi.mach</key>
<string>16.7</string>
<string>8.10.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20B29</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>AirportItlwm</string>
<key>CFBundleIdentifier</key>
<string>com.zxystd.AirportItlwm</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AirportItlwm</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.2.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12A7300</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>10.15.6</string>
<key>DTSDKBuild</key>
<string>19G68</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1201</string>
<key>DTXcodeBuild</key>
<string>12A7300</string>
<key>IOKitPersonalities</key>
<dict>
<key>itlwm</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.zxystd.AirportItlwm</string>
<key>IOClass</key>
<string>AirportItlwm</string>
<key>IOMatchCategory</key>
<string>IODefaultMatchCategory</string>
<key>IOPCIMatch</key>
<string>0x27238086 0x43F08086 0xA0F08086 0x34F08086 0x4DF08086 0x02F08086 0x3DF08086 0x06F08086 0x27208086 0x08b18086 0x08b28086 0x08b38086 0x08b48086 0x095a8086 0x095b8086 0x31658086 0x31668086 0x24f38086 0x24f48086 0x24f58086 0x24f68086 0x24fb8086 0x24fd8086 0x25268086 0x9df08086 0xa3708086 0x31DC8086 0x30DC8086 0x271C8086 0x271B8086 0x42a48086 0x00a08086 0x00a48086 0x02a08086 0x40a48086 0x00608086 0x00648086 0x02608086 0x02648086 0x42298086 0x422b8086 0x422c8086 0x42308086 0x42328086 0x42358086 0x42368086 0x42378086 0x42388086 0x42398086 0x423a8086 0x423b8086 0x423c8086 0x423d8086 0x00828086 0x00838086 0x00848086 0x00858086 0x00878086 0x00898086 0x008a8086 0x008b8086 0x00908086 0x00918086 0x08928086 0x08938086 0x08948086 0x08958086 0x08968086 0x08978086 0x08ae8086 0x08af8086 0x088e8086 0x088f8086 0x08908086 0x08918086 0x08878086 0x08888086</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 钟先耀. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IO80211Family</key>
<string>1200.12.2b1</string>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>3.2</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>2.9</string>
<key>com.apple.kpi.bsd</key>
<string>16.7</string>
<key>com.apple.kpi.iokit</key>
<string>16.7</string>
<key>com.apple.kpi.libkern</key>
<string>16.7</string>
<key>com.apple.kpi.mach</key>
<string>16.7</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20B29</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>AirportItlwm</string>
<key>CFBundleIdentifier</key>
<string>com.zxystd.AirportItlwm</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AirportItlwm</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.2.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12A7300</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>10.15.6</string>
<key>DTSDKBuild</key>
<string>19G68</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1201</string>
<key>DTXcodeBuild</key>
<string>12A7300</string>
<key>IOKitPersonalities</key>
<dict>
<key>itlwm</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.zxystd.AirportItlwm</string>
<key>IOClass</key>
<string>AirportItlwm</string>
<key>IOMatchCategory</key>
<string>IODefaultMatchCategory</string>
<key>IOPCIMatch</key>
<string>0x27238086 0x43F08086 0xA0F08086 0x34F08086 0x4DF08086 0x02F08086 0x3DF08086 0x06F08086 0x27208086 0x08b18086 0x08b28086 0x08b38086 0x08b48086 0x095a8086 0x095b8086 0x31658086 0x31668086 0x24f38086 0x24f48086 0x24f58086 0x24f68086 0x24fb8086 0x24fd8086 0x25268086 0x9df08086 0xa3708086 0x31DC8086 0x30DC8086 0x271C8086 0x271B8086 0x42a48086 0x00a08086 0x00a48086 0x02a08086 0x40a48086 0x00608086 0x00648086 0x02608086 0x02648086 0x42298086 0x422b8086 0x422c8086 0x42308086 0x42328086 0x42358086 0x42368086 0x42378086 0x42388086 0x42398086 0x423a8086 0x423b8086 0x423c8086 0x423d8086 0x00828086 0x00838086 0x00848086 0x00858086 0x00878086 0x00898086 0x008a8086 0x008b8086 0x00908086 0x00918086 0x08928086 0x08938086 0x08948086 0x08958086 0x08968086 0x08978086 0x08ae8086 0x08af8086 0x088e8086 0x088f8086 0x08908086 0x08918086 0x08878086 0x08888086</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 钟先耀. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IO80211Family</key>
<string>1200.12.2b1</string>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>3.2</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>2.9</string>
<key>com.apple.kpi.bsd</key>
<string>16.7</string>
<key>com.apple.kpi.iokit</key>
<string>16.7</string>
<key>com.apple.kpi.libkern</key>
<string>16.7</string>
<key>com.apple.kpi.mach</key>
<string>16.7</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20B29</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>AirportItlwm</string>
<key>CFBundleIdentifier</key>
<string>com.zxystd.AirportItlwm</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AirportItlwm</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.2.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12A7300</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>10.15.6</string>
<key>DTSDKBuild</key>
<string>19G68</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1201</string>
<key>DTXcodeBuild</key>
<string>12A7300</string>
<key>IOKitPersonalities</key>
<dict>
<key>itlwm</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.zxystd.AirportItlwm</string>
<key>IOClass</key>
<string>AirportItlwm</string>
<key>IOMatchCategory</key>
<string>IODefaultMatchCategory</string>
<key>IOPCIMatch</key>
<string>0x27238086 0x43F08086 0xA0F08086 0x34F08086 0x4DF08086 0x02F08086 0x3DF08086 0x06F08086 0x27208086 0x08b18086 0x08b28086 0x08b38086 0x08b48086 0x095a8086 0x095b8086 0x31658086 0x31668086 0x24f38086 0x24f48086 0x24f58086 0x24f68086 0x24fb8086 0x24fd8086 0x25268086 0x9df08086 0xa3708086 0x31DC8086 0x30DC8086 0x271C8086 0x271B8086 0x42a48086 0x00a08086 0x00a48086 0x02a08086 0x40a48086 0x00608086 0x00648086 0x02608086 0x02648086 0x42298086 0x422b8086 0x422c8086 0x42308086 0x42328086 0x42358086 0x42368086 0x42378086 0x42388086 0x42398086 0x423a8086 0x423b8086 0x423c8086 0x423d8086 0x00828086 0x00838086 0x00848086 0x00858086 0x00878086 0x00898086 0x008a8086 0x008b8086 0x00908086 0x00918086 0x08928086 0x08938086 0x08948086 0x08958086 0x08968086 0x08978086 0x08ae8086 0x08af8086 0x088e8086 0x088f8086 0x08908086 0x08918086 0x08878086 0x08888086</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 钟先耀. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IO80211Family</key>
<string>1200.12.2b1</string>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>3.2</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>2.9</string>
<key>com.apple.kpi.bsd</key>
<string>16.7</string>
<key>com.apple.kpi.iokit</key>
<string>16.7</string>
<key>com.apple.kpi.libkern</key>
<string>16.7</string>
<key>com.apple.kpi.mach</key>
<string>16.7</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20B29</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>itlwm</string>
<key>CFBundleIdentifier</key>
<string>com.zxystd.itlwm</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>itlwm</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.2.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12A7300</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>10.15.6</string>
<key>DTSDKBuild</key>
<string>19G68</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1201</string>
<key>DTXcodeBuild</key>
<string>12A7300</string>
<key>IOKitPersonalities</key>
<dict>
<key>itlwm</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.zxystd.itlwm</string>
<key>IOClass</key>
<string>itlwm</string>
<key>IOMatchCategory</key>
<string>IODefaultMatchCategory</string>
<key>IOPCIPrimaryMatch</key>
<string>0x00008086&amp;0x0000ffff</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>IOUserClientClass</key>
<string>ItlNetworkUserClient</string>
<key>WiFiConfig</key>
<dict>
<key>WiFi_1</key>
<dict>
<key>password</key>
<string>zxyssdt112233</string>
<key>ssid</key>
<string>ssdt</string>
</dict>
<key>WiFi_2</key>
<dict>
<key>password</key>
<string>zxyssdt112233</string>
<key>ssid</key>
<string>ssdt_5G</string>
</dict>
<key>WiFi_3</key>
<dict>
<key>password</key>
<string></string>
<key>ssid</key>
<string>Redmi</string>
</dict>
<key>WiFi_4</key>
<dict>
<key>password</key>
<string>9utc5c5f</string>
<key>ssid</key>
<string>CMCC-KtG6</string>
</dict>
</dict>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 钟先耀. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>1.5.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.7</string>
<key>com.apple.kpi.bsd</key>
<string>8.10.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.10.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.10.0</string>
<key>com.apple.kpi.mach</key>
<string>8.10.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
Binary file not shown.
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Racka Nurdin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+58 -13
View File
@@ -1,16 +1,18 @@
# Lenovo Thinkpad T450 & T450s Hackintosh Guide for Catalina with Opencore
This repo contains the installation guide and EFI files required to get a perfectly functional Catalina 10.15.7 hackintosh on your T450 or T450s since they share the same hardware. Everything is stable and functional as described in this Readme.
# Lenovo Thinkpad T450 & T450s Hackintosh Guide for Mojave, Catalina & Big Sur with Opencore
This repo contains the installation guide and EFI files required to get a perfectly functional Big Sur Public Release, Catalina and Mojave hackintosh on your T450 or T450s since they share the same hardware. Everything is stable and functional as described in this Readme.
## A few worthy mentions about this repo:
- **This guide is not for models with Haswell 4th gen CPU**
- **The EFI folder and the patched ACPI were first created by [EchoEspirit](https://github.com/EchoEsprit/Hackintosh-Catalina-OpenCore-Lenovo-T450s-efi) and futher optimized by [i3p9](https://github.com/i3p9/Hackintosh-Catalina-OpenCore-Lenovo-T450s-efi). I tweaked a couple of things and fixed some errors that were happening on T450 + added Intel WiFi drivers from [Openintelwireless](https://github.com/OpenIntelWireless)**
- **I will try my best to keep the repo updated with the latest kexts and Opencore version**
- **This EFI works with Big Sur Beta 10 but compatibility with future versions is not guaranteed until i update the kexts and Opencore version that will support the latest version of Big Sur**
- **This EFI works with Big Sur Public Release (11.x), Catalina and Mojave**
- **This EFI is Configured with Big Sur in mind. If you are using it on Catalina or Mojave read the the whole guide to know where to make the necessary changes**
- **With every EFI update you retrieve from here please remember to transfer your Device details like Serial number, MLB, ROM, Sytem-UUID and all of them under Platforminfo -> Generic**
![img](https://img.shields.io/github/last-commit/racka98/Lenovo-Thinkpad-T450-T450s-Hackintosh-Guide-Catalina-Opencore.svg?color=green&label=last-commit) ![img](https://img.shields.io/badge/macOS%20support-Catalina--10.15.7-blue) ![img](https://img.shields.io/badge/Opencore%20version-0.6.2-red)
![img](https://img.shields.io/github/last-commit/racka98/Lenovo-Thinkpad-T450-T450s-Hackintosh-Guide-Opencore.svg?color=red&label=Last%20Update) ![img](https://img.shields.io/badge/macOS%20Support-Big%20Sur--11-blue) ![img](https://img.shields.io/badge/OpenCore%20Version-0.6.6-yellow)
![About Mac Big Sur](https://imgur.com/xAIkJh0.png)
![About Mac Big Sur](https://imgur.com/vYo3Jt4.png)
# Introduction
@@ -35,10 +37,13 @@ EFI folder and Guide for Thinkpad T450 and T450s Hackintosh Catalina.
- `Fingerprint Sensor`: **Disabled** `(Causes issues with wake from sleep)`;
- `CSM Support`: **Yes**.
**Note: If you can't see any boot entries with CMS support set to Yes, change it to NO. After this you will get a garbled screen, to fix this put the laptop to sleep by closing the lid till the light starts blinking and wake it up**
# What works
- Sleep / Wake
- Wifi and Bluetooth (Built-in Intel 7265 or 7260 cards with Heliport + itlwm.kext) **Airportitlwm.kext is not recommended, it causes issues with Trackpad after wake from sleep {See on Post Install}**
- Wifi and Bluetooth (Built-in Intel 7265 or 7260 cards with Airportitlwm.kext) **itlwm.kext is recommended for those on Catalina because Airportitlwm causes issues with Trackpad after wake from sleep {See on Post Install}**
- AirPort Extreme (Broadcom BCM94360CSAX & NGFF A/E Adapter) **Recommended Upgrade to get native WiFi & Bluetooth**
- Handoff, Continuity, AirDrop
- iMessage, FaceTime, App Store, iTunes Store (Change Config.plist -> PlatformInfo -> Generic -> MLB and SystemSerialNumber)
@@ -49,7 +54,7 @@ EFI folder and Guide for Thinkpad T450 and T450s Hackintosh Catalina.
- Touchpad
- Trackpoint
- miniDP
- SD Card Reader (Thanks to @willmav5000)
- SD Card Reader (Enable Sinetek-rtsx.kext in Config.plist because it is unstable to be left on by default)
- Use [one-key-hidpi](https://github.com/xzhih/one-key-hidpi) to enable HiDPI
- If you are using a usb mouse with side buttons, you can spoof apple usb mouse by change the pid and vid in AnyAppleUSBMouse.kext/Info.plist and enable it in config.plist.
@@ -57,13 +62,45 @@ EFI folder and Guide for Thinkpad T450 and T450s Hackintosh Catalina.
- VGA
- Sidecar (Wired Sidecar works but only in Macbook9,1 SMBIOS, which has bad battery life, you can choose what you want)
- With the IntelBluetoothFirmware.kext and itlwm.kext enabled Bluetooth headphones only work when you are not connected to any wifi network or turn off wifi. This is a known issue with 7265 and 7260 cards. You can get 8x series cards to fix this or buy the recomended cards (DW1820A 00JT494 or Broadcom BCM94360CSAX)
- With the IntelBluetoothFirmware.kext and Airportitlwm.kext or itlwm.kext enabled Bluetooth headphones only work when you are not connected to any wifi network or turn off wifi. This is a known issue with 7265 and 7260 cards. You can get 8x series cards to fix this or buy the recomended cards (DW1820A 00JT494 or Broadcom BCM94360CSAX)
## Note: If you need to edit config.plist, don't use OpenCore configurator or Clover configurator, use PlistEdit pro (Included in Utilities) or Xcode.
# Installation Guide
**COMING SOON**
## macOS Big Sur
**For this release it is essential you use macOS to create the install USB. An install USB created in Linux or windows won't work. If you don't have a real mac or another hackintosh you can always use a VM (See Note no. 2)**
**This is a simple and quick summary of the install USB creation**
1. Download gibMacOS: https://github.com/corpnewt/gibMacOS
2. Right click then choose open on gibMacOS.command (it will launch in terminal)
3. Choose a number from the list provided (Big Sur will probably be number 1 in the list as 11.0.1 Public release)
4. It will download Big Sur (12.19 GB) and it will place the contents in gibMacOS folder under `macOS Downloads/publicrelease/11.0.1 macOS Big Sur`
5. Open the InstallAssistant.pkg that will extract the installer to your Applications folder
6. Format your usb drive to Mac OS Extentended (Journaled) with GUID partition scheme
7. Now run: `sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume`
> MyVolume will be replaced by the name you gave to your usb when formatting it. Or you could name the usb as MyVolume when you were formatting.
> This will create the bootable usb that works on a real mac.
8. Now you can proceed with "Setting up OpenCore's EFI environment" from [here](https://dortania.github.io/OpenCore-Install-Guide/installer-guide/mac-install.html#setting-up-the-installer).
9. Copy the OC and BOOT files from my EFI and fireup the installer.
10. Select Install macOS Big Sur from the boot menu and not the recovery partition.
The [Dortania Installation Guide](https://dortania.github.io/OpenCore-Install-Guide/installer-guide/) is more detailed and you easily refer to it for more details. I haven't gotten time to write a detailed guide.
## Note:
## 1. If you are installing Catalina or Mojave it is important that you disable Airportitlwm.kext in Kernel/Add/20 of Config.plist and enable itlwm.kext instead. Read Post Install #4.
## 2. For those having a black screen or frozen installer when booting the install USB, create the USB using macOS and not Linux or Windows. Details on that [here](https://github.com/racka98/Lenovo-Thinkpad-T450-T450s-Hackintosh-Guide-Opencore/issues/2#issuecomment-732408469)
# Post Install
Once you have verifed that your machine boots properly without any issues as described in the "What Works section", proceed to do the following
@@ -76,11 +113,19 @@ In the config.plist, naviaget to Misc -> Debug and change both AppleDebug and Ap
You can also disable the boot picker screen so that you boot straight to th Apple logo by setting ShowPicker under Misc -> Boot to False (NO)
### 3. Enable native WiFi with the Intel card
You can enable native WiFi on the Intel card by navigating (in config.plist) to Kernel -> Add -> 20 and set Enabled to True/YES (Enabling Airportitlwm.kext) and in 21 set Enabled to False/NO (Disabling itlwm.kext).
### 3. Enable WiFi with the Intel card on Catalina and Mojave
If you are on Catalina or Mojave, you can enable WiFi on the Intel card by navigating (in config.plist) to Kernel -> Add -> 20 and set Enabled to False/NO (Disabling Airportitlwm.kext) and in 21 set Enabled to True/YES (Enabling itlwm.kext). After enabling these and rebooting install Heliport App (included in Utilities).
Or you can use Airportitlwm.kext for Catalina from Intel WiFi Kexts folder and get native wifi on Catalina in the expense of loosing trackpad after wake from sleep.
**For those on Big Sur you can comfortably use the Airportitlwm.kext included as the trackpad issues after sleep do not happen on Big Sur.**
**Note:**
**1. This kext gives you native WiFi menu and enables location services, but often causes issues with the trackpad & trackpoint after waking from sleep (it doesn't work). A quick fix is to put the laptop to sleep again by closing the lid until the red sleep light starts to blink then waking the laptop again. Also it only happens when you put the laptop to sleep for a very long time (more than 2 or 3 hours). So for those who don't put their laptop to sleep for a very long time and just turn it off after use, this kext is ok to use.**
**1. Airportitlwm.kext gives you native WiFi menu and enables location services, but often causes issues with the trackpad & trackpoint after waking from sleep (it doesn't work) on Catalina and Mojave (not Big Sur). A quick fix is to put the laptop to sleep again by closing the lid until the red sleep light starts to blink then waking the laptop again. Also it only happens when you put the laptop to sleep for a very long time (more than 2 or 3 hours). So for those who don't put their laptop to sleep for a very long time and just turn it off after use, this kext is ok to use.**
**2. The kext included in this EFI is only for Catalina. For those in Big Sur you should download the corresponding Airportitlwm.kext from [Openintelwireless](https://github.com/OpenIntelWireless) for Big Sur and replace the one in EFI -> Kexts.**
**2. The Airportitlwm.kext included in this EFI is only for Big Sur. For those in Catalina or Mojave you should download the corresponding Airportitlwm.kext from [Openintelwireless](https://github.com/OpenIntelWireless) or use the one in Intel WiFi Kexts Folder of this repo (Recommended) and replace the one in EFI -> Kexts.**
### 4. Add Device Properties for Serial number and other info
Follow this [guide](https://dortania.github.io/OpenCore-Post-Install/universal/iservices.html#generate-a-new-serial) to set up serial number and the accompanying info to get iServices
Binary file not shown.
+345
View File
@@ -0,0 +1,345 @@
#!/usr/bin/env python
# 0.0.0
from Scripts import *
import os, tempfile, datetime, shutil, time, plistlib, json, sys, argparse
class MountEFI:
def __init__(self, **kwargs):
self.r = run.Run()
self.d = disk.Disk()
self.dl = downloader.Downloader()
self.u = utils.Utils("MountEFI")
self.re = reveal.Reveal()
# Get the tools we need
self.script_folder = "Scripts"
self.update_url = "https://raw.githubusercontent.com/corpnewt/MountEFIv2/master/MountEFI.command"
self.settings_file = kwargs.get("settings", None)
cwd = os.getcwd()
os.chdir(os.path.dirname(os.path.realpath(__file__)))
if self.settings_file and os.path.exists(self.settings_file):
self.settings = json.load(open(self.settings_file))
else:
self.settings = {
# Default settings here
"default_disk" : None,
"after_mount" : None,
"full_layout" : False,
"skip_countdown" : False,
}
os.chdir(cwd)
self.full = self.settings.get("full_layout", False)
def check_update(self):
# Checks against https://raw.githubusercontent.com/corpnewt/MountEFIv2/master/MountEFI.command to see if we need to update
self.u.head("Checking for Updates")
print(" ")
with open(os.path.realpath(__file__), "r") as f:
# Our version should always be the second line
version = get_version(f.read())
print(version)
try:
new_text = _get_string(url)
new_version = get_version(new_text)
except:
# Not valid json data
print("Error checking for updates (network issue)")
return
if version == new_version:
# The same - return
print("v{} is already current.".format(version))
return
# Split the version number
try:
v = version.split(".")
cv = new_version.split(".")
except:
# not formatted right - bail
print("Error checking for updates (version string malformed)")
return
if not need_update(cv, v):
print("v{} is already current.".format(version))
return
# Update
with open(os.path.realpath(__file__), "w") as f:
f.write(new_text)
# chmod +x, then restart
run_command(["chmod", "+x", __file__])
os.execv(__file__, sys.argv)
def flush_settings(self):
if self.settings_file:
cwd = os.getcwd()
os.chdir(os.path.dirname(os.path.realpath(__file__)))
json.dump(self.settings, open(self.settings_file, "w"))
os.chdir(cwd)
def after_mount(self):
self.u.resize(80, 24)
self.u.head("After Mount Action")
print(" ")
print("1. Return to Menu")
print("2. Quit")
print("3. Open EFI and Return to Menu")
print("4. Open EFI and Quit")
if not self.settings.get("skip_countdown", False):
print("5. Skip After-Mount Countdown")
else:
print("5. Use After-Mount Countdown")
print(" ")
print("M. Main Menu")
print("Q. Quit")
print(" ")
menu = self.u.grab("Please pick an option: ")
if not len(menu):
self.after_mount()
return
menu = menu.lower()
if menu in ["1","2","3","4"]:
self.settings["after_mount"] = [
"Return to Menu",
"Quit",
"Reveal and Return to Menu",
"Reveal and Quit"
][int(menu)-1]
self.flush_settings()
return
elif menu == "5":
cd = self.settings.get("skip_countdown", False)
cd ^= True
self.settings["skip_countdown"] = cd
self.flush_settings()
self.after_mount()
return
elif menu == "m":
return
elif menu == "q":
self.u.custom_quit()
self.after_mount()
def default_disk(self):
self.d.update()
clover = bdmesg.get_bootloader_uuid()
print(clover)
self.u.resize(80, 24)
self.u.head("Select Default Disk")
print(" ")
print("1. None")
print("2. Boot Disk")
if clover:
print("3. Booted EFI (Clover/OC)")
print(" ")
print("M. Main Menu")
print("Q. Quit")
print(" ")
menu = self.u.grab("Please pick a default disk: ")
if not len(menu):
self.default_disk()
menu = menu.lower()
if menu in ["1","2"]:
self.settings["default_disk"] = [None, "boot"][int(menu)-1]
self.flush_settings()
return
elif menu == "3" and clover:
self.settings["default_disk"] = "clover"
self.flush_settings()
return
elif menu == "m":
return
elif menu == "q":
self.u.custom_quit()
self.default_disk()
def get_efi(self):
self.d.update()
clover = bdmesg.get_bootloader_uuid()
i = 0
disk_string = ""
if not self.full:
clover_disk = self.d.get_parent(clover)
mounts = self.d.get_mounted_volume_dicts()
for d in mounts:
i += 1
disk_string += "{}. {} ({})".format(i, d["name"], d["identifier"])
if self.d.get_parent(d["identifier"]) == clover_disk:
# if d["disk_uuid"] == clover:
disk_string += " *"
disk_string += "\n"
else:
mounts = self.d.get_disks_and_partitions_dict()
disks = mounts.keys()
for d in disks:
i += 1
disk_string+= "{}. {}:\n".format(i, d)
parts = mounts[d]["partitions"]
part_list = []
for p in parts:
p_text = " - {} ({})".format(p["name"], p["identifier"])
if p["disk_uuid"] == clover:
# Got Clover
p_text += " *"
part_list.append(p_text)
if len(part_list):
disk_string += "\n".join(part_list) + "\n"
height = len(disk_string.split("\n"))+16
if height < 24:
height = 24
self.u.resize(80, height)
self.u.head()
print(" ")
print(disk_string)
if not self.full:
print("S. Switch to Full Output")
else:
print("S. Switch to Slim Output")
lay = self.settings.get("full_layout", False)
l_str = "Slim"
if lay:
l_str = "Full"
print("L. Set As Default Layout (Current: {})".format(l_str))
print("B. Mount the Boot Drive's EFI")
if clover:
print("C. Mount the Booted EFI (Clover/OC)")
print("")
dd = self.settings.get("default_disk", None)
if dd == "clover":
dd = clover
elif dd == "boot":
dd = "/"
di = self.d.get_identifier(dd)
if di:
print("D. Pick Default Disk ({} - {})".format(self.d.get_volume_name(di), di))
else:
print("D. Pick Default Disk (None Set)")
am = self.settings.get("after_mount", None)
if not am:
am = "Return to Menu"
print("M. After Mounting: "+am)
print("Q. Quit")
print(" ")
print("(* denotes the booted EFI (Clover/OC))")
menu = self.u.grab("Pick the drive containing your EFI: ")
if not len(menu):
if not di:
return self.get_efi()
return self.d.get_efi(di)
menu = menu.lower()
if menu == "q":
self.u.resize(80,24)
self.u.custom_quit()
elif menu == "s":
self.full ^= True
return self.get_efi()
elif menu == "b":
return self.d.get_efi("/")
elif menu == "c" and clover:
return self.d.get_efi(clover)
elif menu == "m":
self.after_mount()
return
elif menu == "d":
self.default_disk()
return
elif menu == "l":
self.settings["full_layout"] = self.full
self.flush_settings()
return
try:
disk_iden = int(menu)
if not (disk_iden > 0 and disk_iden <= len(mounts)):
# out of range!
self.u.grab("Invalid disk!", timeout=3)
return self.get_efi()
if type(mounts) is list:
# We have the small list
disk = mounts[disk_iden-1]["identifier"]
else:
# We have the dict
disk = mounts.keys()[disk_iden-1]
except:
disk = menu
iden = self.d.get_identifier(disk)
name = self.d.get_volume_name(disk)
if not iden:
self.u.grab("Invalid disk!", timeout=3)
return self.get_efi()
# Valid disk!
return self.d.get_efi(iden)
def main(self):
while True:
efi = self.get_efi()
if not efi:
# Got nothing back
continue
# Mount the EFI partition
self.u.head("Mounting {}".format(efi))
print(" ")
out = self.d.mount_partition(efi)
if out[2] == 0:
print(out[0])
else:
print(out[1])
# Check our settings
am = self.settings.get("after_mount", None)
if not am:
continue
if "reveal" in am.lower():
# Reveal
mp = self.d.get_mount_point(efi)
if mp:
self.r.run({"args":["open", mp]})
# Hang out for a couple seconds
if not self.settings.get("skip_countdown", False):
self.u.grab("", timeout=3)
if "quit" in am.lower():
# Quit
self.u.resize(80,24)
self.u.custom_quit()
def quiet_mount(self, disk_list, unmount=False):
ret = 0
for disk in disk_list:
ident = self.d.get_identifier(disk)
if not ident:
continue
efi = self.d.get_efi(ident)
if not efi:
continue
if unmount:
out = self.d.unmount_partition(efi)
else:
out = self.d.mount_partition(efi)
if not out[2] == 0:
ret = out[2]
exit(ret)
if __name__ == '__main__':
# Setup the cli args
parser = argparse.ArgumentParser(prog="MountEFI.command", description="MountEFI - an EFI Mounting Utility by CorpNewt")
parser.add_argument("-u", "--unmount", help="unmount instead of mount the passed EFIs", action="store_true")
parser.add_argument("-p", "--print-efi", help="prints the disk#s# of the EFI attached to the passed var")
parser.add_argument("disks",nargs="*")
args = parser.parse_args()
m = MountEFI(settings="./Scripts/settings.json")
# Gather defaults
unmount = False
if args.unmount:
unmount = True
if args.print_efi:
print("{}".format(m.d.get_efi(args.print_efi)))
# Check for args
if len(args.disks):
# We got command line args!
m.quiet_mount(args.disks, unmount)
elif not args.print_efi:
m.main()
+18
View File
@@ -0,0 +1,18 @@
# MountEFI
An *even* more robust edition of my previous MountEFI scripts.
Other scripts can call this script to do a silent mount - and receive a 0 on succes, or 1 (or higher) on failure.
For example: If another script calls `MountEFI.command disk0` then my script would mount without user interaction, and return a 0 on success, or a 1 on failure. This can also take multiple EFIs to mount - `MountEFI.command disk0 / disk3` would mount the EFIs connected to `disk0`, the boot drive (`/`), and `disk3` if they exist.
***
## To install:
Do the following one line at a time in Terminal:
git clone https://github.com/corpnewt/MountEFI
cd MountEFI
chmod +x MountEFI.command
Then run with either `./MountEFI.command` or by double-clicking *MountEFI.command*
+4
View File
@@ -0,0 +1,4 @@
from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
Binary file not shown.
+70
View File
@@ -0,0 +1,70 @@
import binascii, subprocess, sys
def get_clover_uuid():
bd = bdmesg()
if not len(bd):
return ""
# Get bdmesg output - then parse for SelfDevicePath
if not "SelfDevicePath=" in bd:
# Not found
return ""
try:
# Split to just the contents of that line
line = bd.split("SelfDevicePath=")[1].split("\n")[0]
# Get the HD section
hd = line.split("HD(")[1].split(")")[0]
# Get the UUID
uuid = hd.split(",")[2]
return uuid
except:
pass
return ""
def get_oc_uuid():
p = subprocess.Popen(["nvram","4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path"], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
oc, oe = p.communicate()
oc = _decode(oc)
try:
path = oc.split("GPT,")[1].split(",")[0]
except:
path = ""
return path
def get_bootloader_uuid():
b_uuid = get_clover_uuid()
if not b_uuid:
b_uuid = get_oc_uuid()
return b_uuid
def bdmesg(just_clover = True):
b = "" if just_clover else _bdmesg(["ioreg","-l","-p","IOService","-w0"])
if b == "":
b = _bdmesg(["ioreg","-l","-p","IODeviceTree","-w0"])
return b
def _decode(var):
if sys.version_info >= (3,0) and isinstance(var, bytes):
var = var.decode("utf-8","ignore")
return var
def _bdmesg(comm):
# Runs ioreg -l -p IODeviceTree -w0 and searches for "boot-log"
p = subprocess.Popen(comm, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
bd, be = p.communicate()
bd = _decode(bd)
for line in bd.split("\n"):
# We're just looking for the "boot-log" property, then we need to format it
if not '"boot-log"' in line:
# Skip it!
continue
# Must have found it - let's try to split it, then get the hex data and process it
try:
# Split it up, then convert from hex to ascii
ascii_bytes = binascii.unhexlify(line.split("<")[1].split(">")[0].encode("utf-8"))
ascii_bytes = _decode(ascii_bytes)
return ascii_bytes
except:
# Failed to convert
return ""
# Didn't find it
return ""
Binary file not shown.
+469
View File
@@ -0,0 +1,469 @@
import subprocess, plistlib, sys, os, time, json
sys.path.append(os.path.abspath(os.path.dirname(os.path.realpath(__file__))))
import run
if sys.version_info < (3,0):
# Force use of StringIO instead of cStringIO as the latter
# has issues with Unicode strings
from StringIO import StringIO
class Disk:
def __init__(self):
self.r = run.Run()
self.diskutil = self.get_diskutil()
self.os_version = ".".join(
self.r.run({"args":["sw_vers", "-productVersion"]})[0].split(".")[:2]
)
self.full_os_version = self.r.run({"args":["sw_vers", "-productVersion"]})[0]
if len(self.full_os_version.split(".")) < 3:
# Add .0 in case of 10.14
self.full_os_version += ".0"
self.sudo_mount_version = "10.13.6"
self.sudo_mount_types = ["efi"]
self.apfs = {}
self._update_disks()
def _get_str(self, val):
# Helper method to return a string value based on input type
if (sys.version_info < (3,0) and isinstance(val, unicode)) or (sys.version_info >= (3,0) and isinstance(val, bytes)):
return val.encode("utf-8")
return str(val)
def _get_plist(self, s):
p = {}
try:
if sys.version_info >= (3, 0):
p = plistlib.loads(s.encode("utf-8"))
else:
# p = plistlib.readPlistFromString(s)
# We avoid using readPlistFromString() as that uses
# cStringIO and fails when Unicode strings are detected
# Don't subclass - keep the parser local
from xml.parsers.expat import ParserCreate
# Create a new PlistParser object - then we need to set up
# the values and parse.
pa = plistlib.PlistParser()
# We also monkey patch this to encode unicode as utf-8
def end_string():
d = pa.getData()
if isinstance(d,unicode):
d = d.encode("utf-8")
pa.addObject(d)
pa.end_string = end_string
parser = ParserCreate()
parser.StartElementHandler = pa.handleBeginElement
parser.EndElementHandler = pa.handleEndElement
parser.CharacterDataHandler = pa.handleData
if isinstance(s, unicode):
# Encode unicode -> string; use utf-8 for safety
s = s.encode("utf-8")
# Parse the string
parser.Parse(s, 1)
p = pa.root
except Exception as e:
print(e)
pass
return p
def _compare_versions(self, vers1, vers2, pad = -1):
# Helper method to compare ##.## strings
#
# vers1 < vers2 = True
# vers1 = vers2 = None
# vers1 > vers2 = False
#
# Must be separated with a period
# Sanitize the pads
pad = -1 if not type(pad) is int else pad
# Cast as strings
vers1 = str(vers1)
vers2 = str(vers2)
# Split to lists
v1_parts = vers1.split(".")
v2_parts = vers2.split(".")
# Equalize lengths
if len(v1_parts) < len(v2_parts):
v1_parts.extend([str(pad) for x in range(len(v2_parts) - len(v1_parts))])
elif len(v2_parts) < len(v1_parts):
v2_parts.extend([str(pad) for x in range(len(v1_parts) - len(v2_parts))])
# Iterate and compare
for i in range(len(v1_parts)):
# Remove non-numeric
v1 = ''.join(c for c in v1_parts[i] if c.isdigit())
v2 = ''.join(c for c in v2_parts[i] if c.isdigit())
# If empty - make it a pad var
v1 = pad if not len(v1) else v1
v2 = pad if not len(v2) else v2
# Compare
if int(v1) < int(v2):
return True
elif int(v1) > int(v2):
return False
# Never differed - return None, must be equal
return None
def update(self):
self._update_disks()
def _update_disks(self):
self.disks = self.get_disks()
self.disk_text = self.get_disk_text()
if self._compare_versions("10.12", self.os_version):
self.apfs = self.get_apfs()
else:
self.apfs = {}
def get_diskutil(self):
# Returns the path to the diskutil binary
return self.r.run({"args":["which", "diskutil"]})[0].split("\n")[0].split("\r")[0]
def get_disks(self):
# Returns a dictionary object of connected disks
disk_list = self.r.run({"args":[self.diskutil, "list", "-plist"]})[0]
return self._get_plist(disk_list)
def get_disk_text(self):
# Returns plain text listing connected disks
return self.r.run({"args":[self.diskutil, "list"]})[0]
def get_disk_info(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
disk_list = self.r.run({"args":[self.diskutil, "info", "-plist", disk_id]})[0]
return self._get_plist(disk_list)
def get_disk_fs(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
return self.get_disk_info(disk_id).get("FilesystemName", None)
def get_disk_fs_type(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
return self.get_disk_info(disk_id).get("FilesystemType", None)
def get_apfs(self):
# Returns a dictionary object of apfs disks
output = self.r.run({"args":"echo y | " + self.diskutil + " apfs list -plist", "shell" : True})
if not output[2] == 0:
# Error getting apfs info - return an empty dict
return {}
disk_list = output[0]
p_list = disk_list.split("<?xml")
if len(p_list) > 1:
# We had text before the start - get only the plist info
disk_list = "<?xml" + p_list[-1]
return self._get_plist(disk_list)
def is_apfs(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
# Takes a disk identifier, and returns whether or not it's apfs
for d in self.disks.get("AllDisksAndPartitions", []):
if not "APFSVolumes" in d:
continue
if d.get("DeviceIdentifier", "").lower() == disk_id.lower():
return True
for a in d.get("APFSVolumes", []):
if a.get("DeviceIdentifier", "").lower() == disk_id.lower():
return True
return False
def is_apfs_container(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
# Takes a disk identifier, and returns whether or not that specific
# disk/volume is an APFS Container
for d in self.disks.get("AllDisksAndPartitions", []):
# Only check partitions
for p in d.get("Partitions", []):
if disk_id.lower() == p.get("DeviceIdentifier", "").lower():
return p.get("Content", "").lower() == "apple_apfs"
return False
def is_cs_container(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
# Takes a disk identifier, and returns whether or not that specific
# disk/volume is an CoreStorage Container
for d in self.disks.get("AllDisksAndPartitions", []):
# Only check partitions
for p in d.get("Partitions", []):
if disk_id.lower() == p.get("DeviceIdentifier", "").lower():
return p.get("Content", "").lower() == "apple_corestorage"
return False
def is_core_storage(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
if self._get_physical_disk(disk_id, "Logical Volume on "):
return True
return False
def get_identifier(self, disk):
# Should be able to take a mount point, disk name, or disk identifier,
# and return the disk's identifier
# Iterate!!
if not disk or not len(self._get_str(disk)):
return None
disk = self._get_str(disk).lower()
if disk.startswith("/dev/r"):
disk = disk[len("/dev/r"):]
elif disk.startswith("/dev/"):
disk = disk[len("/dev/"):]
if disk in self.disks.get("AllDisks", []):
return disk
for d in self.disks.get("AllDisksAndPartitions", []):
for a in d.get("APFSVolumes", []):
if disk in [ self._get_str(a.get(x, "")).lower() for x in ["DeviceIdentifier", "VolumeName", "VolumeUUID", "DiskUUID", "MountPoint"] ]:
return a.get("DeviceIdentifier", None)
for a in d.get("Partitions", []):
if disk in [ self._get_str(a.get(x, "")).lower() for x in ["DeviceIdentifier", "VolumeName", "VolumeUUID", "DiskUUID", "MountPoint"] ]:
return a.get("DeviceIdentifier", None)
# At this point, we didn't find it
return None
def get_top_identifier(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
return disk_id.replace("disk", "didk").split("s")[0].replace("didk", "disk")
def _get_physical_disk(self, disk, search_term):
# Change disk0s1 to disk0
our_disk = self.get_top_identifier(disk)
our_term = "/dev/" + our_disk
found_disk = False
our_text = ""
for line in self.disk_text.split("\n"):
if line.lower().startswith(our_term):
found_disk = True
continue
if not found_disk:
continue
if line.lower().startswith("/dev/disk"):
# At the next disk - bail
break
if search_term.lower() in line.lower():
our_text = line
break
if not len(our_text):
# Nothing found
return None
our_stores = "".join(our_text.strip().split(search_term)[1:]).split(" ,")
if not len(our_stores):
return None
for store in our_stores:
efi = self.get_efi(store)
if efi:
return store
return None
def get_physical_store(self, disk):
# Returns the physical store containing the EFI
disk_id = self.get_identifier(disk)
if not disk_id:
return None
if not self.is_apfs(disk_id):
return None
return self._get_physical_disk(disk_id, "Physical Store ")
def get_core_storage_pv(self, disk):
# Returns the core storage physical volume containing the EFI
disk_id = self.get_identifier(disk)
if not disk_id:
return None
if not self.is_core_storage(disk_id):
return None
return self._get_physical_disk(disk_id, "Logical Volume on ")
def get_parent(self, disk):
# Disk can be a mount point, disk name, or disk identifier
disk_id = self.get_identifier(disk)
if self.is_apfs(disk_id):
disk_id = self.get_physical_store(disk_id)
elif self.is_core_storage(disk_id):
disk_id = self.get_core_storage_pv(disk_id)
if not disk_id:
return None
if self.is_apfs(disk_id):
# We have apfs - let's get the container ref
for a in self.apfs.get("Containers", []):
# Check if it's the whole container
if a.get("ContainerReference", "").lower() == disk_id.lower():
return a["ContainerReference"]
# Check through each volume and return the parent's container ref
for v in a.get("Volumes", []):
if v.get("DeviceIdentifier", "").lower() == disk_id.lower():
return a.get("ContainerReference", None)
else:
# Not apfs - go through all volumes and whole disks
for d in self.disks.get("AllDisksAndPartitions", []):
if d.get("DeviceIdentifier", "").lower() == disk_id.lower():
return d["DeviceIdentifier"]
for p in d.get("Partitions", []):
if p.get("DeviceIdentifier", "").lower() == disk_id.lower():
return d["DeviceIdentifier"]
# Didn't find anything
return None
def get_efi(self, disk):
disk_id = self.get_parent(self.get_identifier(disk))
if not disk_id:
return None
# At this point - we should have the parent
for d in self.disks["AllDisksAndPartitions"]:
if d.get("DeviceIdentifier", "").lower() == disk_id.lower():
# Found our disk
for p in d.get("Partitions", []):
if p.get("Content", "").lower() == "efi":
return p.get("DeviceIdentifier", None)
return None
def mount_partition(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
sudo = False
if not self._compare_versions(self.full_os_version, self.sudo_mount_version) and self.get_content(disk_id).lower() in self.sudo_mount_types:
sudo = True
out = self.r.run({"args":[self.diskutil, "mount", disk_id], "sudo":sudo})
self._update_disks()
return out
def unmount_partition(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
out = self.r.run({"args":[self.diskutil, "unmount", disk_id]})
self._update_disks()
return out
def is_mounted(self, disk):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
m = self.get_mount_point(disk_id)
return (m != None and len(m))
def get_volumes(self):
# Returns a list object with all volumes from disks
return self.disks.get("VolumesFromDisks", [])
def _get_value_apfs(self, disk, field, default = None):
return self._get_value(disk, field, default, True)
def _get_value(self, disk, field, default = None, apfs_only = False):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
# Takes a disk identifier, and returns the requested value
for d in self.disks.get("AllDisksAndPartitions", []):
for a in d.get("APFSVolumes", []):
if a.get("DeviceIdentifier", "").lower() == disk_id.lower():
return a.get(field, default)
if apfs_only:
# Skip looking at regular partitions
continue
if d.get("DeviceIdentifier", "").lower() == disk_id.lower():
return d.get(field, default)
for a in d.get("Partitions", []):
if a.get("DeviceIdentifier", "").lower() == disk_id.lower():
return a.get(field, default)
return None
# Getter methods
def get_content(self, disk):
return self._get_value(disk, "Content")
def get_volume_name(self, disk):
return self._get_value(disk, "VolumeName")
def get_volume_uuid(self, disk):
return self._get_value(disk, "VolumeUUID")
def get_disk_uuid(self, disk):
return self._get_value(disk, "DiskUUID")
def get_mount_point(self, disk):
return self._get_value(disk, "MountPoint")
def open_mount_point(self, disk, new_window = False):
disk_id = self.get_identifier(disk)
if not disk_id:
return None
mount = self.get_mount_point(disk_id)
if not mount:
return None
out = self.r.run({"args":["open", mount]})
return out[2] == 0
def get_mounted_volumes(self):
# Returns a list of mounted volumes
vol_list = self.r.run({"args":["ls", "-1", "/Volumes"]})[0].split("\n")
vol_list = [ x for x in vol_list if x != "" ]
return vol_list
def get_mounted_volume_dicts(self):
# Returns a list of dicts of name, identifier, mount point dicts
vol_list = []
for v in self.get_mounted_volumes():
i = self.get_identifier(os.path.join("/Volumes", v))
if i == None:
i = self.get_identifier("/")
if not self.get_volume_name(i) == v:
# Not valid and not our boot drive
continue
vol_list.append({
"name" : self.get_volume_name(i),
"identifier" : i,
"mount_point" : self.get_mount_point(i),
"disk_uuid" : self.get_disk_uuid(i),
"volume_uuid" : self.get_volume_uuid(i)
})
return vol_list
def get_disks_and_partitions_dict(self):
# Returns a list of dictionaries like so:
# { "disk0" : { "partitions" : [
# {
# "identifier" : "disk0s1",
# "name" : "EFI",
# "mount_point" : "/Volumes/EFI"
# }
# ] } }
disks = {}
for d in self.disks.get("AllDisks", []):
# Get the parent and make sure it has an entry
parent = self.get_parent(d)
top_disk = self.get_top_identifier(d)
if top_disk == d and not self.is_core_storage(d):
# Top level, skip
continue
# Not top level - make sure it's not an apfs container or core storage container
if self.is_apfs_container(d):
continue
if self.is_cs_container(d):
continue
if not parent in disks:
disks[parent] = { "partitions" : [] }
disks[parent]["partitions"].append({
"name" : self.get_volume_name(d),
"identifier" : d,
"mount_point" : self.get_mount_point(d),
"disk_uuid" : self.get_disk_uuid(d),
"volume_uuid" : self.get_volume_uuid(d)
})
return disks
Binary file not shown.
+130
View File
@@ -0,0 +1,130 @@
import sys, os, time, ssl, gzip
from io import BytesIO
# Python-aware urllib stuff
if sys.version_info >= (3, 0):
from urllib.request import urlopen, Request
else:
# Import urllib2 to catch errors
import urllib2
from urllib2 import urlopen, Request
class Downloader:
def __init__(self,**kwargs):
self.ua = kwargs.get("useragent",{"User-Agent":"Mozilla"})
self.chunk = 1048576 # 1024 x 1024 i.e. 1MiB
# Provide reasonable default logic to workaround macOS CA file handling
cafile = ssl.get_default_verify_paths().openssl_cafile
try:
# If default OpenSSL CA file does not exist, use that from certifi
if not os.path.exists(cafile):
import certifi
cafile = certifi.where()
self.ssl_context = ssl.create_default_context(cafile=cafile)
except:
# None of the above worked, disable certificate verification for now
self.ssl_context = ssl._create_unverified_context()
return
def _decode(self, value, encoding="utf-8", errors="ignore"):
# Helper method to only decode if bytes type
if sys.version_info >= (3,0) and isinstance(value, bytes):
return value.decode(encoding,errors)
return value
def open_url(self, url, headers = None):
# Fall back on the default ua if none provided
headers = self.ua if headers == None else headers
# Wrap up the try/except block so we don't have to do this for each function
try:
response = urlopen(Request(url, headers=headers), context=self.ssl_context)
except Exception as e:
# No fixing this - bail
return None
return response
def get_size(self, size, suffix=None, use_1024=False, round_to=2, strip_zeroes=False):
# size is the number of bytes
# suffix is the target suffix to locate (B, KB, MB, etc) - if found
# use_2014 denotes whether or not we display in MiB vs MB
# round_to is the number of dedimal points to round our result to (0-15)
# strip_zeroes denotes whether we strip out zeroes
# Failsafe in case our size is unknown
if size == -1:
return "Unknown"
# Get our suffixes based on use_1024
ext = ["B","KiB","MiB","GiB","TiB","PiB"] if use_1024 else ["B","KB","MB","GB","TB","PB"]
div = 1024 if use_1024 else 1000
s = float(size)
s_dict = {} # Initialize our dict
# Iterate the ext list, and divide by 1000 or 1024 each time to setup the dict {ext:val}
for e in ext:
s_dict[e] = s
s /= div
# Get our suffix if provided - will be set to None if not found, or if started as None
suffix = next((x for x in ext if x.lower() == suffix.lower()),None) if suffix else suffix
# Get the largest value that's still over 1
biggest = suffix if suffix else next((x for x in ext[::-1] if s_dict[x] >= 1), "B")
# Determine our rounding approach - first make sure it's an int; default to 2 on error
try:round_to=int(round_to)
except:round_to=2
round_to = 0 if round_to < 0 else 15 if round_to > 15 else round_to # Ensure it's between 0 and 15
bval = round(s_dict[biggest], round_to)
# Split our number based on decimal points
a,b = str(bval).split(".")
# Check if we need to strip or pad zeroes
b = b.rstrip("0") if strip_zeroes else b.ljust(round_to,"0") if round_to > 0 else ""
return "{:,}{} {}".format(int(a),"" if not b else "."+b,biggest)
def _progress_hook(self, response, bytes_so_far, total_size):
if total_size > 0:
percent = float(bytes_so_far) / total_size
percent = round(percent*100, 2)
t_s = self.get_size(total_size)
try: b_s = self.get_size(bytes_so_far, t_s.split(" ")[1])
except: b_s = self.get_size(bytes_so_far)
sys.stdout.write("Downloaded {} of {} ({:.2f}%)\r".format(b_s, t_s, percent))
else:
b_s = self.get_size(bytes_so_far)
sys.stdout.write("Downloaded {}\r".format(b_s))
def get_string(self, url, progress = True, headers = None, expand_gzip = True):
response = self.get_bytes(url,progress,headers,expand_gzip)
if response == None: return None
return self._decode(response)
def get_bytes(self, url, progress = True, headers = None, expand_gzip = True):
response = self.open_url(url, headers)
if response == None: return None
bytes_so_far = 0
try: total_size = int(response.headers['Content-Length'])
except: total_size = -1
chunk_so_far = b""
while True:
chunk = response.read(self.chunk)
bytes_so_far += len(chunk)
if progress: self._progress_hook(response, bytes_so_far, total_size)
if not chunk: break
chunk_so_far += chunk
if expand_gzip and response.headers.get("Content-Encoding","unknown").lower() == "gzip":
fileobj = BytesIO(chunk_so_far)
gfile = gzip.GzipFile(fileobj=fileobj)
return gfile.read()
return chunk_so_far
def stream_to_file(self, url, file_path, progress = True, headers = None):
response = self.open_url(url, headers)
if response == None: return None
bytes_so_far = 0
try: total_size = int(response.headers['Content-Length'])
except: total_size = -1
with open(file_path, 'wb') as f:
while True:
chunk = response.read(self.chunk)
bytes_so_far += len(chunk)
if progress: self._progress_hook(response, bytes_so_far, total_size)
if not chunk: break
f.write(chunk)
return file_path if os.path.exists(file_path) else None
Binary file not shown.
@@ -0,0 +1,39 @@
import os, sys
sys.path.append(os.path.abspath(os.path.dirname(os.path.realpath(__file__))))
import run, utils
class Rebuild:
def __init__(self):
self.r = run.Run()
return
def _compare_versions(self, vers1, vers2):
# Helper method to compare ##.## strings
#
# vers1 < vers2 = True
# vers1 = vers2 = None
# vers1 > vers2 = False
#
try:
v1_parts = vers1.split(".")
v2_parts = vers2.split(".")
except:
# Formatted wrong - return None
return None
for i in range(len(v1_parts)):
if int(v1_parts[i]) < int(v2_parts[i]):
return True
elif int(v1_parts[i]) > int(v2_parts[i]):
return False
# Never differed - return None, must be equal
return None
def rebuild(self, stream = True):
# Get os version
os_vers = self.r.run({"args":["sw_vers", "-productVersion"]})[0]
if self._compare_versions(os_vers, "10.11.0") == True:
# We're on an OS version prior to 10.11
return self.r.run({"args":"sudo touch /System/Library/Extensions && sudo kextcache -u /", "stream" : stream, "shell" : True})
else:
# 10.11 or above
return self.r.run({"args":"sudo kextcache -i / && sudo kextcache -u /", "stream" : stream, "shell" : True})
Binary file not shown.
+70
View File
@@ -0,0 +1,70 @@
import sys, os
sys.path.append(os.path.abspath(os.path.dirname(os.path.realpath(__file__))))
import run
class Reveal:
def __init__(self):
self.r = run.Run()
return
def get_parent(self, path):
return os.path.normpath(os.path.join(path, os.pardir))
def reveal(self, path, new_window = False):
# Reveals the passed path in Finder - only works on macOS
if not sys.platform == "darwin":
return ("", "macOS Only", 1)
if not path:
# No path sent - nothing to reveal
return ("", "No path specified", 1)
# Build our script - then convert it to a single line task
if not os.path.exists(path):
# Not real - bail
return ("", "{} - doesn't exist".format(path), 1)
# Get the absolute path
path = os.path.abspath(path)
command = ["osascript"]
if new_window:
command.extend([
"-e", "set p to \"{}\"".format(path.replace("\"", "\\\"")),
"-e", "tell application \"Finder\"",
"-e", "reveal POSIX file p as text",
"-e", "activate",
"-e", "end tell"
])
else:
if path == self.get_parent(path):
command.extend([
"-e", "set p to \"{}\"".format(path.replace("\"", "\\\"")),
"-e", "tell application \"Finder\"",
"-e", "reopen",
"-e", "activate",
"-e", "set target of window 1 to (POSIX file p as text)",
"-e", "end tell"
])
else:
command.extend([
"-e", "set o to \"{}\"".format(self.get_parent(path).replace("\"", "\\\"")),
"-e", "set p to \"{}\"".format(path.replace("\"", "\\\"")),
"-e", "tell application \"Finder\"",
"-e", "reopen",
"-e", "activate",
"-e", "set target of window 1 to (POSIX file o as text)",
"-e", "select (POSIX file p as text)",
"-e", "end tell"
])
return self.r.run({"args" : command})
def notify(self, title = None, subtitle = None, sound = None):
# Sends a notification
if not title:
return ("", "Malformed dict", 1)
# Build our notification
n_text = "display notification with title \"{}\"".format(title.replace("\"", "\\\""))
if subtitle:
n_text += " subtitle \"{}\"".format(subtitle.replace("\"", "\\\""))
if sound:
n_text += " sound name \"{}\"".format(sound.replace("\"", "\\\""))
command = ["osascript", "-e", n_text]
return self.r.run({"args" : command})
Binary file not shown.
+151
View File
@@ -0,0 +1,151 @@
import sys, subprocess, time, threading, shlex
try:
from Queue import Queue, Empty
except:
from queue import Queue, Empty
ON_POSIX = 'posix' in sys.builtin_module_names
class Run:
def __init__(self):
return
def _read_output(self, pipe, q):
try:
for line in iter(lambda: pipe.read(1), b''):
q.put(line)
except ValueError:
pass
pipe.close()
def _create_thread(self, output):
# Creates a new queue and thread object to watch based on the output pipe sent
q = Queue()
t = threading.Thread(target=self._read_output, args=(output, q))
t.daemon = True
return (q,t)
def _stream_output(self, comm, shell = False):
output = error = ""
p = None
try:
if shell and type(comm) is list:
comm = " ".join(shlex.quote(x) for x in comm)
if not shell and type(comm) is str:
comm = shlex.split(comm)
p = subprocess.Popen(comm, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0, universal_newlines=True, close_fds=ON_POSIX)
# Setup the stdout thread/queue
q,t = self._create_thread(p.stdout)
qe,te = self._create_thread(p.stderr)
# Start both threads
t.start()
te.start()
while True:
c = z = ""
try: c = q.get_nowait()
except Empty: pass
else:
sys.stdout.write(c)
output += c
sys.stdout.flush()
try: z = qe.get_nowait()
except Empty: pass
else:
sys.stderr.write(z)
error += z
sys.stderr.flush()
if not c==z=="": continue # Keep going until empty
# No output - see if still running
p.poll()
if p.returncode != None:
# Subprocess ended
break
# No output, but subprocess still running - stall for 20ms
time.sleep(0.02)
o, e = p.communicate()
return (output+o, error+e, p.returncode)
except:
if p:
try: o, e = p.communicate()
except: o = e = ""
return (output+o, error+e, p.returncode)
return ("", "Command not found!", 1)
def _decode(self, value, encoding="utf-8", errors="ignore"):
# Helper method to only decode if bytes type
if sys.version_info >= (3,0) and isinstance(value, bytes):
return value.decode(encoding,errors)
return value
def _run_command(self, comm, shell = False):
c = None
try:
if shell and type(comm) is list:
comm = " ".join(shlex.quote(x) for x in comm)
if not shell and type(comm) is str:
comm = shlex.split(comm)
p = subprocess.Popen(comm, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
c = p.communicate()
except:
if c == None:
return ("", "Command not found!", 1)
return (self._decode(c[0]), self._decode(c[1]), p.returncode)
def run(self, command_list, leave_on_fail = False):
# Command list should be an array of dicts
if type(command_list) is dict:
# We only have one command
command_list = [command_list]
output_list = []
for comm in command_list:
args = comm.get("args", [])
shell = comm.get("shell", False)
stream = comm.get("stream", False)
sudo = comm.get("sudo", False)
stdout = comm.get("stdout", False)
stderr = comm.get("stderr", False)
mess = comm.get("message", None)
show = comm.get("show", False)
if not mess == None:
print(mess)
if not len(args):
# nothing to process
continue
if sudo:
# Check if we have sudo
out = self._run_command(["which", "sudo"])
if "sudo" in out[0]:
# Can sudo
if type(args) is list:
args.insert(0, out[0].replace("\n", "")) # add to start of list
elif type(args) is str:
args = out[0].replace("\n", "") + " " + args # add to start of string
if show:
print(" ".join(args))
if stream:
# Stream it!
out = self._stream_output(args, shell)
else:
# Just run and gather output
out = self._run_command(args, shell)
if stdout and len(out[0]):
print(out[0])
if stderr and len(out[1]):
print(out[1])
# Append output
output_list.append(out)
# Check for errors
if leave_on_fail and out[2] != 0:
# Got an error - leave
break
if len(output_list) == 1:
# We only ran one command - just return that output
return output_list[0]
return output_list
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
{"after_mount": "Reveal and Quit", "default_disk": null, "full_layout": false, "skip_countdown": false}
+255
View File
@@ -0,0 +1,255 @@
import sys, os, time, re, json, datetime, ctypes, subprocess
if os.name == "nt":
# Windows
import msvcrt
else:
# Not Windows \o/
import select
class Utils:
def __init__(self, name = "Python Script"):
self.name = name
# Init our colors before we need to print anything
cwd = os.getcwd()
os.chdir(os.path.dirname(os.path.realpath(__file__)))
if os.path.exists("colors.json"):
self.colors_dict = json.load(open("colors.json"))
else:
self.colors_dict = {}
os.chdir(cwd)
def check_admin(self):
# Returns whether or not we're admin
try:
is_admin = os.getuid() == 0
except AttributeError:
is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
return is_admin
def elevate(self, file):
# Runs the passed file as admin
if self.check_admin():
return
if os.name == "nt":
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, file, None, 1)
else:
try:
p = subprocess.Popen(["which", "sudo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
c = p.communicate()[0].decode("utf-8", "ignore").replace("\n", "")
os.execv(c, [ sys.executable, 'python'] + sys.argv)
except:
exit(1)
def compare_versions(self, vers1, vers2, **kwargs):
# Helper method to compare ##.## strings
#
# vers1 < vers2 = True
# vers1 = vers2 = None
# vers1 > vers2 = False
# Sanitize the pads
pad = str(kwargs.get("pad", ""))
sep = str(kwargs.get("separator", "."))
ignore_case = kwargs.get("ignore_case", True)
# Cast as strings
vers1 = str(vers1)
vers2 = str(vers2)
if ignore_case:
vers1 = vers1.lower()
vers2 = vers2.lower()
# Split and pad lists
v1_parts, v2_parts = self.pad_length(vers1.split(sep), vers2.split(sep))
# Iterate and compare
for i in range(len(v1_parts)):
# Remove non-numeric
v1 = ''.join(c.lower() for c in v1_parts[i] if c.isalnum())
v2 = ''.join(c.lower() for c in v2_parts[i] if c.isalnum())
# Equalize the lengths
v1, v2 = self.pad_length(v1, v2)
# Compare
if str(v1) < str(v2):
return True
elif str(v1) > str(v2):
return False
# Never differed - return None, must be equal
return None
def pad_length(self, var1, var2, pad = "0"):
# Pads the vars on the left side to make them equal length
pad = "0" if len(str(pad)) < 1 else str(pad)[0]
if not type(var1) == type(var2):
# Type mismatch! Just return what we got
return (var1, var2)
if len(var1) < len(var2):
if type(var1) is list:
var1.extend([str(pad) for x in range(len(var2) - len(var1))])
else:
var1 = "{}{}".format((pad*(len(var2)-len(var1))), var1)
elif len(var2) < len(var1):
if type(var2) is list:
var2.extend([str(pad) for x in range(len(var1) - len(var2))])
else:
var2 = "{}{}".format((pad*(len(var1)-len(var2))), var2)
return (var1, var2)
def check_path(self, path):
# Let's loop until we either get a working path, or no changes
test_path = path
last_path = None
while True:
# Bail if we've looped at least once and the path didn't change
if last_path != None and last_path == test_path: return None
last_path = test_path
# Check if we stripped everything out
if not len(test_path): return None
# Check if we have a valid path
if os.path.exists(test_path):
return os.path.abspath(test_path)
# Check for quotes
if test_path[0] == test_path[-1] and test_path[0] in ('"',"'"):
test_path = test_path[1:-1]
continue
# Check for a tilde and expand if needed
if test_path[0] == "~":
tilde_expanded = os.path.expanduser(test_path)
if tilde_expanded != test_path:
# Got a change
test_path = tilde_expanded
continue
# Let's check for spaces - strip from the left first, then the right
if test_path[0] in (" ","\t"):
test_path = test_path[1:]
continue
if test_path[-1] in (" ","\t"):
test_path = test_path[:-1]
continue
# Maybe we have escapes to handle?
test_path = "\\".join([x.replace("\\", "") for x in test_path.split("\\\\")])
def grab(self, prompt, **kwargs):
# Takes a prompt, a default, and a timeout and shows it with that timeout
# returning the result
timeout = kwargs.get("timeout", 0)
default = kwargs.get("default", None)
# If we don't have a timeout - then skip the timed sections
if timeout <= 0:
if sys.version_info >= (3, 0):
return input(prompt)
else:
return str(raw_input(prompt))
# Write our prompt
sys.stdout.write(prompt)
sys.stdout.flush()
if os.name == "nt":
start_time = time.time()
i = ''
while True:
if msvcrt.kbhit():
c = msvcrt.getche()
if ord(c) == 13: # enter_key
break
elif ord(c) >= 32: #space_char
i += c
if len(i) == 0 and (time.time() - start_time) > timeout:
break
else:
i, o, e = select.select( [sys.stdin], [], [], timeout )
if i:
i = sys.stdin.readline().strip()
print('') # needed to move to next line
if len(i) > 0:
return i
else:
return default
def cls(self):
os.system('cls' if os.name=='nt' else 'clear')
def cprint(self, message, **kwargs):
strip_colors = kwargs.get("strip_colors", False)
if os.name == "nt":
strip_colors = True
reset = u"\u001b[0m"
# Requires sys import
for c in self.colors:
if strip_colors:
message = message.replace(c["find"], "")
else:
message = message.replace(c["find"], c["replace"])
if strip_colors:
return message
sys.stdout.write(message)
print(reset)
# Needs work to resize the string if color chars exist
'''# Header drawing method
def head(self, text = None, width = 55):
if text == None:
text = self.name
self.cls()
print(" {}".format("#"*width))
len_text = self.cprint(text, strip_colors=True)
mid_len = int(round(width/2-len(len_text)/2)-2)
middle = " #{}{}{}#".format(" "*mid_len, len_text, " "*((width - mid_len - len(len_text))-2))
if len(middle) > width+1:
# Get the difference
di = len(middle) - width
# Add the padding for the ...#
di += 3
# Trim the string
middle = middle[:-di]
newlen = len(middle)
middle += "...#"
find_list = [ c["find"] for c in self.colors ]
# Translate colored string to len
middle = middle.replace(len_text, text + self.rt_color) # always reset just in case
self.cprint(middle)
print("#"*width)'''
# Header drawing method
def head(self, text = None, width = 55):
if text == None:
text = self.name
self.cls()
print(" {}".format("#"*width))
mid_len = int(round(width/2-len(text)/2)-2)
middle = " #{}{}{}#".format(" "*mid_len, text, " "*((width - mid_len - len(text))-2))
if len(middle) > width+1:
# Get the difference
di = len(middle) - width
# Add the padding for the ...#
di += 3
# Trim the string
middle = middle[:-di] + "...#"
print(middle)
print("#"*width)
def resize(self, width, height):
print('\033[8;{};{}t'.format(height, width))
def custom_quit(self):
self.head()
print("by CorpNewt\n")
print("Thanks for testing it out, for bugs/comments/complaints")
print("send me a message on Reddit, or check out my GitHub:\n")
print("www.reddit.com/u/corpnewt")
print("www.github.com/corpnewt\n")
# Get the time and wish them a good morning, afternoon, evening, and night
hr = datetime.datetime.now().time().hour
if hr > 3 and hr < 12:
print("Have a nice morning!\n\n")
elif hr >= 12 and hr < 17:
print("Have a nice afternoon!\n\n")
elif hr >= 17 and hr < 21:
print("Have a nice evening!\n\n")
else:
print("Have a nice night!\n\n")
exit(0)
Binary file not shown.
Binary file not shown.
+2 -3
View File
@@ -1,14 +1,13 @@
# Utilities for T450s
# Utilities for T450/T450s
This is where I'll store useful but optional hacks for the laptop
## alc_fix
This is a fix for Headphone jack not working after sleep. To install this, cd into the repository, then:
- `sudo spctl --master-disable`
- `cd alc_fix`
- `chmod +x install.sh`
- `./install.sh`
## DW1820A
This folder contains instructions and kexts needed to run DW1820A which enables native WiFi/Bluetooth as well as Airdrop, Instant Hotspot, Hand-off and Continuity.
Binary file not shown.
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.echo.ALCPlugFix</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ALCPlugFix</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
<key>WorkingDirectory</key>
<string>/usr/bin/</string>
</dict>
</plist>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>good.win.ALCPlugFix</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/ALCPlugFix</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
<!--Shuold be directory that hda-verb at-->
<key>WorkingDirectory</key>
<string>/usr/local/bin/</string>
</dict>
</plist>
+9 -9
View File
@@ -1,18 +1,17 @@
#!/bin/bash
DAEMON_PATH=/Library/LaunchDaemons/
BIN_PATH=/usr/bin/
DAEMON_FILE=com.echo.ALCPlugFix.plist
BIN_PATH=/usr/local/bin/
DAEMON_FILE=good.win.ALCPlugFix.plist
VERB_FILE=hda-verb
FIX_FILE=ALCPlugFix
echo "Installing ALCPlugFix. Root user is required."
echo "Installing ALCPlugFix v1.7"
# check if the root filesystem is writeable (starting with macOS 10.15 Catalina, the root filesystem is read-only by default)
if sudo test ! -w "/"; then
echo "Root filesystem is not writeable. Remounting as read-write and restarting Finder."
sudo mount -uw /
sudo killall Finder
# check if the directory "usr/local/bin" exist, if not then create the directory
if [ ! -d "$BIN_PATH" ] ; then
mkdir "$BIN_PATH" ;
fi
# stop the daemon if it's already running
@@ -22,9 +21,10 @@ if sudo launchctl list | grep --quiet ALCPlugFix; then
fi
# copy over the files to their respective locations (overwrite automatically if files exist)
sudo cp -f ALCPlugFix $BIN_PATH
sudo cp -f hda-verb $BIN_PATH
sudo cp -f com.echo.ALCPlugFix.plist $DAEMON_PATH
sudo cp -f good.win.ALCPlugFix.plist $DAEMON_PATH
# set permissions and ownership
sudo chmod 755 $BIN_PATH$FIX_FILE
+5 -12
View File
@@ -2,18 +2,11 @@
echo "Uninstalling ALCPlugFix. Root user is required."
# check if the root filesystem is writeable (starting with macOS 10.15 Catalina, the root filesystem is read-only by default)
if sudo test ! -w "/"; then
echo "Root filesystem is not writeable. Remounting as read-write and restarting Finder."
sudo mount -uw /
sudo killall Finder
fi
sudo rm /usr/bin/ALCPlugFix
sudo rm /usr/bin/hda-verb
sudo launchctl unload -w /Library/LaunchDaemons/com.echo.ALCPlugFix.plist
sudo launchctl remove com.echo.ALCPlugFix
sudo rm /Library/LaunchDaemons/com.echo.ALCPlugFix.plist
sudo rm /usr/local/bin/ALCPlugFix
sudo rm /usr/local/bin/hda-verb
sudo launchctl unload -w /Library/LaunchDaemons/good.win.ALCPlugFix.plist
sudo launchctl remove good.win.ALCPlugFix
sudo rm /Library/LaunchDaemons/good.win.ALCPlugFix.plist
echo "Done!"
exit 0