dokterdok / Continuity-Activation-Tool

An all-in-one tool to activate and diagnose macOS 10.10-12 Continuity on compatible Mac configurations.
MIT License
1.6k stars 150 forks source link

ERROR: ioreg: error: can't obtain properties. #100

Open UberEclectic opened 9 years ago

UberEclectic commented 9 years ago

On my Mac Pro 2010 (Westmere), I have a bunch of 3rd-party PCI cards installed and one of them must have a driver bug which causes "ioreg -l" to bail with the following error:

 ioreg: error: can't obtain properties.

That message was filling up the Continuity Activation Tool display, but worse than that, it was breaking the check for the installed Bluetooth module version and that was blocking the normal usage of the tool to enable Continuity.

Through a process of trial and error, I determined that "ioreg -l" was bombing only after recurring deeper than 14 levels in the device tree. Rather than digging into all the places that contitool.sh calls ioreg (and reverse engineering exactly how many levels of recursion each call needs), I simply changed the ioreg call to globally limit the output to 14 levels of recursion.

That fixed it.

Here is the one line change that I made:

 ioregPath="/usr/sbin/ioreg -d 14"

Because every machine is different, my suggestion to the developer would be to look at each contitool.sh ioreg call and determine how many levels of recursion should be sufficient to get the values that are needed and set the -d option for ioreg, accordingly.

dokterdok commented 9 years ago

Thank you @UberEclectic for the suggestion, I'll look into it for a future release.

dokterdok commented 9 years ago

I've included a fix in the latest beta version (v.2.0.1).