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

'sign_cryptography' import error #175

Closed
seungbum-hong opened this issue Feb 25, 2020 · 1 comment
Closed

'sign_cryptography' import error #175

seungbum-hong opened this issue Feb 25, 2020 · 1 comment

Comments

@seungbum-hong
Copy link

I am just trying to test sample code. but this error is occured.
I think this problem is related with cryptography thing, so i installed cryptography package.
but I could not solve it.

File "test.py", line 4, in
from adb import sign_cryptography
ImportError: cannot import name 'sign_cryptography'

installed package
M2Crypto==0.26.4
cryptography==2.8
rsa==4.0
certifi==2019.9.11
pure-python-adb==0.2.2.dev0
adb==1.3.0
python==3.6.5


this is my test code

import os.path as op

from adb import adb_commands
from adb import sign_cryptography

KitKat+ devices require authentication

signer = sign_cryptography.CryptographySigner( op.expandduser('~/.android/adbkey'))

Connect to the device

device = adb_commands.AdbCommands()
device.ConnectDevice( rsa_keys=[signer])

Now we can use Shell, Pull, Push, etc!

for i in xrange(10):
print( device.Shell('echo %d' % i) )

@seungbum-hong
Copy link
Author

seungbum-hong commented Feb 25, 2020

sorry, python-adb was not installed via pip command.
it caused this error.

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