Merge changes I390aa702,I9084343c

* changes:
  Use a heuristic to correlate devices
  Fix DeviceInfo encoding and checks