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

TypeError: from_buffer() cannot return the address of a unicode object #159

Closed

Description

@g1im2

code like this:
signer = sign_cryptography.CryptographySigner(os.path.expanduser('~/.android/adbkey'))
device = adb_commands.AdbCommands()

def __init__(self):
    AdbHelper.device = adb_commands.AdbCommands()
    AdbHelper.device.ConnectDevice(rsa_keys=[AdbHelper.signer])

if running this, the error will be happened, i install from setup use lasted code in github, what's happend, can help me

Activity

  1. g1im2 commented on Jun 17, 2019

    @g1im2
    Author

    i am sorry, the information less, i use ubuntu 18.04 and running adb with 1.0.41 vesion. clone this project and use setup.py to install. if i use sign_pycryptodome type to connect device, it can't auth and always throw the exception with DeviceAuthError if i run program. and i try working with sign_cryptography type to hope it can solve authError, but this error was happened, i don't know how to fix or skip it.

  2. anthonybm commented on Aug 8, 2019

    @anthonybm

    Did you resolve this issue? I have the same error on OSX running "pyadb shell". The .pub key should be valid.

  3. hamdya commented on Nov 5, 2019

    @hamdya

    You need to modify line 33 of sign_cryptography.py to add .encode('ascii') as follows:
    sa_prv_file.read().encode('ascii'), None, default_backend())

  4. added a commit that references this issue on Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions