Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

RSA public keyfile - TypeError: can only concatenate str (not "bytes") to str #141

Open
joeleong opened this issue Dec 11, 2018 · 0 comments

Comments

@joeleong
Copy link

$ pyadb shell ls
Traceback (most recent call last):
  File "/usr/local/bin/pyadb", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/adb/adb_debug.py", line 207, in main
    rsa_keys=[rsa_signer(path) for path in args.rsa_key_path])
  File "/usr/local/lib/python3.7/site-packages/adb/common_cli.py", line 151, in StartCli
    **device_kwargs)
  File "/usr/local/lib/python3.7/site-packages/adb/adb_commands.py", line 137, in ConnectDevice
    self._Connect(**kwargs)
  File "/usr/local/lib/python3.7/site-packages/adb/adb_commands.py", line 168, in _Connect
    conn_str = self.protocol_handler.Connect(self._handle, banner=banner, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/adb/adb_protocol.py", line 331, in Connect
    data=rsa_keys[0].GetPublicKey() + b'\0')
TypeError: can only concatenate str (not "bytes") to str

I assume this has to do with python3 compatibility as it seems to work fine on python2.
To repro you can seemingly connect to any device that doesn't already have your public key approved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant