actually  please use try with resources wherever possible  ioutils closequietly is only needed for unbundled code that needs to run on pre kitkat platforms  try  parcelfiledescriptor pfd parcelfiledescriptor dup fd mbluetooth dump pfd catch  remoteexception re writer println  remoteexception while calling bluetooth service catch  ioexception ioe writer println  ioexception attempting to dup fd 