code: static IDevice obtainRealDevice(AndroidDebugBridge adb, String serial) {
      // Get an existing real device.
      for (IDevice adbDevice : adb.getDevices()) {
        if (adbDevice.getSerialNumber().equals(serial)) {
          return adbDevice;
        }
      }
      throw new IllegalArgumentException("Unknown device serial: " + serial);
    }
docs: Fetch or create a real device that corresponds to a device model.