Skip to content

Commit

Permalink
Add SSDT-USB-FingerBT, thx to @radmanz, and change SSDT-USB-SolderBT …
Browse files Browse the repository at this point in the history
…to SSDT-USB-WLAN_LTEBT
  • Loading branch information
stevezhengshiqi committed Aug 24, 2019
1 parent 40bffa9 commit 7a272d0
Show file tree
Hide file tree
Showing 9 changed files with 503 additions and 30 deletions.
49 changes: 36 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ function editEFI() {
echo "(1) Native Intel BT (Default)"
echo "(2) USB BT / Disable native BT / Solder BT on camera port"
echo "(3) Solder BT on WLAN_LTE port"
echo -e "${BOLD}Which option you want to choose? (1/2/3)${OFF}"
echo "(4) Solder BT on fingerprint port"
echo -e "${BOLD}Which option you want to choose? (1/2/3/4)${OFF}"
read -p ":" bt_selection
case ${bt_selection} in
1)
Expand All @@ -327,7 +328,12 @@ function editEFI() {

3)
rm -rf "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-SolderBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-WLAN_LTEBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
;;

4)
rm -rf "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-FingerBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
;;

*)
Expand Down Expand Up @@ -371,6 +377,18 @@ function updateEFI() {
unmountEFI
}

# Delete previous Bluetooth configurations(SSDT-USB, SSDT-USB-USBBT, SSDT-SolderBT(changed to SSDT-USB-WLAN_LTEBT), SSDT-USB-WLAN_LTEBT, and SSDT-USB-FingerBT)
function deleteBT() {
mountEFI
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-USBBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-SolderBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-WLAN_LTEBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-FingerBT.aml" >/dev/null 2>&1

# need unmountEFI after calling this function
}

function changeBT() {
echo
echo "---------------------------------------------------------"
Expand All @@ -379,7 +397,8 @@ function changeBT() {
echo "(1) Remain the same"
echo "(2) USB BT / Disable native BT / Solder BT on camera port"
echo "(3) Solder BT on WLAN_LTE port"
echo -e "${BOLD}Which option you want to choose? (1/2/3)${OFF}"
echo "(4) Solder BT on fingerprint port"
echo -e "${BOLD}Which option you want to choose? (1/2/3/4)${OFF}"
read -p ":" bt_selection_new
case ${bt_selection_new} in
1)
Expand All @@ -390,10 +409,7 @@ function changeBT() {
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-USBBT.aml"
curl --silent -O "${repoURL}" || networkWarn

mountEFI
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-USBBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-SolderBT.aml" >/dev/null 2>&1
deleteBT

cp -rf "SSDT-USB-USBBT.aml" "${EFI_DIR}/EFI/CLOVER/ACPI/patched/"

Expand All @@ -403,15 +419,22 @@ function changeBT() {
;;

3)
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-SolderBT.aml"
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-WLAN_LTEBT.aml"
curl --silent -O "${repoURL}" || networkWarn

deleteBT

cp -rf "SSDT-USB-WLAN_LTEBT.aml" "${EFI_DIR}/EFI/CLOVER/ACPI/patched/"
unmountEFI
;;

4)
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-FingerBT.aml"
curl --silent -O "${repoURL}" || networkWarn

mountEFI
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-USBBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-SolderBT.aml" >/dev/null 2>&1
deleteBT

cp -rf "SSDT-USB-SolderBT.aml" "${EFI_DIR}/EFI/CLOVER/ACPI/patched/"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-FingerBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
unmountEFI
;;

Expand Down
49 changes: 36 additions & 13 deletions install_cn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ function editEFI() {
echo "(1) 原厂英特尔蓝牙 (默认)"
echo "(2) USB蓝牙 / 屏蔽自带蓝牙 / 飞线蓝牙到摄像头"
echo "(3) 飞线蓝牙到WLAN_LTE接口"
echo -e "${BOLD}您想选择哪个模式? (1/2/3)${OFF}"
echo "(4) 飞线蓝牙到指纹接口"
echo -e "${BOLD}您想选择哪个模式? (1/2/3/4)${OFF}"
read -p ":" bt_selection
case ${bt_selection} in
1)
Expand All @@ -327,7 +328,12 @@ function editEFI() {

3)
rm -rf "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-SolderBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-WLAN_LTEBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
;;

4)
rm -rf "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-FingerBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
;;

*)
Expand Down Expand Up @@ -371,6 +377,18 @@ function updateEFI() {
unmountEFI
}

# 删除之前的蓝牙配置文件(SSDT-USB, SSDT-USB-USBBT, SSDT-SolderBT(更改为SSDT-USB-WLAN_LTEBT), SSDT-USB-WLAN_LTEBT, 和 SSDT-USB-FingerBT)
function deleteBT() {
mountEFI
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-USBBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-SolderBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-WLAN_LTEBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-FingerBT.aml" >/dev/null 2>&1

# 运行此方法后需要运行unmountEFI方法
}

function changeBT() {
echo
echo "--------------------------------------------"
Expand All @@ -379,7 +397,8 @@ function changeBT() {
echo "(1) 保持默认"
echo "(2) USB蓝牙 / 屏蔽自带蓝牙 / 飞线蓝牙到摄像头"
echo "(3) 飞线蓝牙到WLAN_LTE接口"
echo -e "${BOLD}您想选择哪个模式? (1/2/3)${OFF}"
echo "(4) 飞线蓝牙到指纹接口"
echo -e "${BOLD}您想选择哪个模式? (1/2/3/4)${OFF}"
read -p ":" bt_selection_new
case ${bt_selection_new} in
1)
Expand All @@ -390,10 +409,7 @@ function changeBT() {
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-USBBT.aml"
curl --silent -O "${repoURL}" || networkWarn

mountEFI
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-USBBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-SolderBT.aml" >/dev/null 2>&1
deleteBT

cp -rf "SSDT-USB-USBBT.aml" "${EFI_DIR}/EFI/CLOVER/ACPI/patched/"

Expand All @@ -403,15 +419,22 @@ function changeBT() {
;;

3)
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-SolderBT.aml"
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-WLAN_LTEBT.aml"
curl --silent -O "${repoURL}" || networkWarn

deleteBT

cp -rf "SSDT-USB-WLAN_LTEBT.aml" "${EFI_DIR}/EFI/CLOVER/ACPI/patched/"
unmountEFI
;;

4)
local repoURL="https://raw.githubusercontent.com/daliansky/XiaoMi-Pro-Hackintosh/master/wiki/SSDT-USB-FingerBT.aml"
curl --silent -O "${repoURL}" || networkWarn

mountEFI
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-USBBT.aml" >/dev/null 2>&1
rm -rf "${EFI_DIR}/EFI/CLOVER/ACPI/patched/SSDT-USB-SolderBT.aml" >/dev/null 2>&1
deleteBT

cp -rf "SSDT-USB-SolderBT.aml" "${EFI_DIR}/EFI/CLOVER/ACPI/patched/"
cp -r "${WORK_DIR}/XiaoMi_Pro-${ver}/SSDT-USB-FingerBT.aml" "${WORK_DIR}/XiaoMi_Pro-${ver}/EFI/CLOVER/ACPI/patched/"
unmountEFI
;;

Expand Down
Binary file added wiki/SSDT-USB-ALL.aml
Binary file not shown.
Loading

0 comments on commit 7a272d0

Please sign in to comment.