code: def main(host=None, port=None, serial=None, scale=1.0, out='screenshot.png', method='minicap'):
      
      print('Started screencap')
      start = time.time()
  
      client = adbkit.Client(host=host, port=port)
      device = client.device(serial)
      im = device.screenshot(scale=scale)
      im.save(out)
      print('Time spend: %.2fs' % (time.time() - start))
      print('File saved to "%s"' % out)
  
      try:
          import win32clipboard
  
          output = StringIO()
          im.convert("RGB").save(output, "BMP")
          data = output.getvalue()[14:]
          output.close()
  
          win32clipboard.OpenClipboard()
          win32clipboard.EmptyClipboard()
          win32clipboard.SetClipboardData(win32clipboard.CF_DIB, data)
          win32clipboard.CloseClipboard()
          print('Copied to clipboard')
      except:
          pass
docs: If minicap not avaliable then use uiautomator instead
  
      Disable scale for now.
      Because -s scale is conflict of -s serial