Change ProductName to MacBookAir7,2 , Remove VoodooHDA, Using AppleALC.

This commit is contained in:
EchoEsprit
2019-11-08 20:05:59 +08:00
parent 2e59173ebf
commit e49f3a4e59
21 changed files with 11400 additions and 257 deletions
BIN
View File
Binary file not shown.
+21
View File
@@ -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/bin/ALCPlugFix</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
<!--Shuold be directory that hda-verb at-->
<key>WorkingDirectory</key>
<string>/usr/bin/</string>
</dict>
</plist>
BIN
View File
Binary file not shown.
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
DAEMON_PATH=/Library/LaunchDaemons/
BIN_PATH=/usr/bin/
DAEMON_FILE=good.win.ALCPlugFix.plist
VERB_FILE=hda-verb
FIX_FILE=ALCPlugFix
echo "Installing 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
# stop the daemon if it's already running
if sudo launchctl list | grep --quiet ALCPlugFix; then
echo "Stopping existing ALCPlugFix daemon."
sudo launchctl unload $DAEMON_PATH$DAEMON_FILE
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 good.win.ALCPlugFix.plist $DAEMON_PATH
# set permissions and ownership
sudo chmod 755 $BIN_PATH$FIX_FILE
sudo chown $USER:admin $BIN_PATH$FIX_FILE
sudo chmod 755 $BIN_PATH$VERB_FILE
sudo chown $USER:admin $BIN_PATH$VERB_FILE
sudo chmod 644 $DAEMON_PATH$DAEMON_FILE
sudo chown root:wheel $DAEMON_PATH$DAEMON_FILE
# load and start the daemon
sudo launchctl load -w $DAEMON_PATH$DAEMON_FILE
echo "Done!"
exit 0
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
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/good.win.ALCPlugFix.plist
sudo launchctl remove good.win.ALCPlugFix
sudo rm /Library/LaunchDaemons/good.win.ALCPlugFix.plist
echo "Done!"
exit 0