BluetoolFixup: Add another patch to skip Internal Bluetooth Controller NVRAM checking. #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
From Ventura 13.4(maybe), Apple adds two NVRAM check:
bluetoothInternalControllerInfo
: which stores the internal Bluetooth controller(always real mac)'s mac address.bluetoothExternalDongleFailed
: which to indicates that the bluetoothd had failure initialization with external bluetooth Dongle(Stupid design).original code:
![image](https://private-user-images.githubusercontent.com/16227538/246157402-3a7899f8-37e2-4898-b3c4-15181d9de5fb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2MDM3NDUsIm5iZiI6MTcyNTYwMzQ0NSwicGF0aCI6Ii8xNjIyNzUzOC8yNDYxNTc0MDItM2E3ODk5ZjgtMzdlMi00ODk4LWIzYzQtMTUxODFkOWRlNWZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA2MTcyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4NWQ0MzZiNzdjYzhlZWJiNGI0ZTdjNWFmMGRmZDQ1NjU3NmM3YjE3Y2NkMzdjNDI0MzhmYjY3NmQ2YjFmYWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.k7-lYv2YQqPktectEKV6ScLiI_azfqIM80AbYzQ3RNU)
![image](https://private-user-images.githubusercontent.com/16227538/246157233-ad1bf901-700f-4c6b-ba8c-e4ecc44d08bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2MDM3NDUsIm5iZiI6MTcyNTYwMzQ0NSwicGF0aCI6Ii8xNjIyNzUzOC8yNDYxNTcyMzMtYWQxYmY5MDEtNzAwZi00YzZiLWJhOGMtZTRlY2M0NGQwOGJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA2MTcyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkYjEzZmYyNGZiYjYxZWU1MzlmY2Y1NmQ1ZDdjMTgzNGM1YjIzNTQzNGNiYzhkYmEyYmUxNTgyZGJlNDZlMDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.s_ahOpF71jM7jG-G1mdXb9xb2Jcnq0megrBytE06tco)
after patched:
![image](https://private-user-images.githubusercontent.com/16227538/246157907-f4bb0fb4-51f0-4eae-a97b-d54cd43adb2b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX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WFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA2MTcyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg5ZjUwMWY5NTRiYjZmZGE5ZTQ4M2ZhMjJhODBmZTAxZTFlZTI0ZWE1OGRkZTlmYjNmY2RmOGNhNDU0OTdmZDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-pO2r4l-TxxiGoO3Rrpgm418b2GTh8RT3AlX7t0qSU4)
these two section are created by bluetoothd self, but if the user clean/reset NVRAM, then the bluetoothd will not treat the device as external Dongle at all, so it is foreseeable that Bluetooth will not be able to be used.
Here I make a patch to skip these two conditions, and seems working so well.