that only works for adb,mtp and adb but not for diag,the port is set to null.