diff --git a/BrcmPatchRAM/BlueToolFixup.cpp b/BrcmPatchRAM/BlueToolFixup.cpp index 0fa891a..e68f28e 100644 --- a/BrcmPatchRAM/BlueToolFixup.cpp +++ b/BrcmPatchRAM/BlueToolFixup.cpp @@ -50,7 +50,11 @@ bool BlueToolFixup::start(IOService *provider) { static const uint8_t kSkipUpdateFilePathOriginal[] = "/etc/bluetool/SkipBluetoothAutomaticFirmwareUpdate"; static const uint8_t kSkipUpdateFilePathPatched[] = "/System/Library/CoreServices/boot.efi"; +static const uint8_t kBluetoothUSBNameOriginal[] = "Bluetooth USB Host Controller"; +static const uint8_t kBluetoothUSBNamePatched[] = "BRCM2046 Hub Host Controller"; + static const char *blueToolPath = "/usr/sbin/BlueTool"; +static const char *bluetoothdPath = "/usr/sbin/bluetoothd"; static mach_vm_address_t orig_cs_validate {}; @@ -74,6 +78,9 @@ static void patched_cs_validate_page(vnode_t vp, memory_object_t pager, memory_o if (vn_getpath(vp, path, &pathlen) == 0 && UNLIKELY(strcmp(path, blueToolPath) == 0)) { searchAndPatch(data, PAGE_SIZE, path, kSkipUpdateFilePathOriginal, kSkipUpdateFilePathPatched); } + if (vn_getpath(vp, path, &pathlen) == 0 && UNLIKELY(strcmp(path, bluetoothdPath) == 0)) { + searchAndPatch(data, PAGE_SIZE, path, kBluetoothUSBNameOriginal, kBluetoothUSBNamePatched); + } }