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

.android/adbkey missing #95

Open
Vxer-Lee opened this issue Mar 20, 2018 · 3 comments
Open

.android/adbkey missing #95

Vxer-Lee opened this issue Mar 20, 2018 · 3 comments

Comments

@Vxer-Lee
Copy link

"pkg_resources.DistributionNotFound: The 'python-rsa' distribution was not found and is required by adb"

op.expanduser('~/.android/adbkey'))

File "/home/vxerlee/python-adb/adb/sign_m2crypto.py", line 24, in init
with open(rsa_key_path + '.pub') as rsa_pub_file:
IOError: [Errno 2] No such file or directory: '/home/vxerlee/.android/adbkey.pub'

@fahhem
Copy link
Contributor

fahhem commented May 31, 2018

Hmm, python-rsa isn't depended on anywhere (just in the docs, will fix in master). You need rsa installed or M2Crypto or pycryptodome. It looks like you have M2Crypto installed, but no adbkey available. Typically, the adbkey is created by android's adb because it's not documented how else to create it.

Theoretically, it's a standard RSA private/public key pair, so if you find how to create it using the three libraries we support, then we can create the file when it doesn't exist rather than error out like we're doing now.

@fahhem fahhem changed the title "pkg_resources.DistributionNotFound: The 'python-rsa' distribution was not found and is required by adb" .android/adbkey missing May 31, 2018
@zgoda-mobica
Copy link

I have similar problem - application is distributed in Docker container and runs almost completely isolated from host filesystem, we don't have even adb installed in host system so we're not able to run adb keygen <filename> to generate key pair. Now we either have to distribute pregenerated keys along with application data (I consider this viable only for dev/debug/test), or generate keys with android's adb in subprocess. It would be great if we had a command for this.

@bibz
Copy link

bibz commented Dec 20, 2018

Isn't this a duplicate of #131 now?

joeleong added a commit to joeleong/python-adb that referenced this issue Jan 6, 2019
joeleong added a commit to joeleong/python-adb that referenced this issue Jul 24, 2019
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

4 participants