title: Using ADB from Python
body: <p><br>
  I want to run adb commands from python and I've found google's own library for that but it doesn't work. <br>
  <a href="https://github.com/google/python-adb" rel="nofollow noreferrer">https://github.com/google/python-adb</a>
  <br>
  <br>
  This Is the Code I've used: (It's from the example)<br></p>
  
  <pre><code>import os.path as op
  
  from adb import adb_commands
  from adb import sign_m2crypto
  
  signer = sign_m2crypto.M2CryptoSigner(
      op.expanduser('~/.android/adbkey'))
  
  device = adb_commands.AdbCommands.ConnectDevice(rsa_keys=[signer])
  </code></pre>
  
  <p>This is the error I get:<br></p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/elichai2/PycharmProjects/Test/python_adb.py", line 9, in &lt;module&gt;
      device = adb_commands.AdbCommands.ConnectDevice(rsa_keys=[signer])
    File "/usr/local/lib/python2.7/dist-packages/adb/adb_commands.py", line 76, in ConnectDevice
      return cls.Connect(handle, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/adb/adb_commands.py", line 99, in Connect
      device_state = cls.protocol_handler.Connect(usb, banner=banner, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/adb/adb_protocol.py", line 277, in Connect
      cmd, arg0, arg1, banner = cls.Read(usb, ['CNXN', 'AUTH'])
    File "/usr/local/lib/python2.7/dist-packages/adb/adb_protocol.py", line 235, in Read
      actual_checksum = cls.CalculateChecksum(data)
    File "/usr/local/lib/python2.7/dist-packages/adb/adb_protocol.py", line 187, in CalculateChecksum
      return sum(map(ord, data)) &amp; 0xFFFFFFFF
  TypeError: ord() expected string of length 1, but int found
  </code></pre>
  
  <p>Any ideas?</p>