Git Product home page Git Product logo

pyadb's People

Contributors

akatz2 avatar holmeszyx avatar jianhua-waves avatar promatik avatar sch3m4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyadb's Issues

Add support for python 3+

Are you able to do provide support for Python 3? There is a similar version which is called pyadb3, but it has issues with getting device list.

Global state confusion

ADB.set_target_device() sets state globally.

This design decision is a problem in environments where concurrency is a requirement, which is what ultimately drove me to switch to Google's catapult/devil project.

Rather a single global target device setting, a safer alternative is to have each ADB instance keep its own reference to its selected device.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Device Target Selection Fails When get_devices(mode="usb")

Demo of working target selection via mode="serial":

In [44]: adb = ADB(adb_path="/opt/android/sdk/r24.4.1/platform-tools/adb")

In [45]: adb.get_devices()
Out[45]: (0, ['XXX', 'c'])

In [46]: adb.set_target_device("XXX")
Out[46]: True

In [47]: adb.shell_command("ls")
Out[47]: 'acct\r\ncache\r\nconfig\r\nd\r\ndata\r\ndefault.prop\r\ndev\r\netc\r\ninit\r\ninit.goldfish.rc\r\ninit.rc\r\ninit.sun5i.rc\r\ninit.sun5i.usb.rc\r\ninit.trace.rc\r\ninit.usb.rc\r\ninitlogo.rle\r\nmnt\r\nnand.ko\r\nproc\r\nroot\r\nsbin\r\nsdcard\r\nsys\r\nsystem\r\nueventd.goldfish.rc\r\nueventd.rc\r\nueventd.sun5i.rc\r\nvendor\r\n'

In [48]: adb.set_target_device("XXX")
Out[48]: True

In [49]: adb.shell_command("ls")
Out[49]: 'acct\ncache\ncharger\nconfig\nd\ndata\ndev\netc\nfirmware\nmnt\noem\nproc\nproperty_contexts\nres\nroot\nsbin\nsdcard\nstorage\nsys\nsystem\nvendor\n'

Demo of unsuccessful target selection with mode="usb":

In [50]: adb = ADB(adb_path="/opt/android/sdk/r24.4.1/platform-tools/adb")

In [51]: adb.get_devices(mode="usb")
Out[51]: (0, ['2-2', '2-1'])

In [52]: adb.set_target_device("2-2")
Out[52]: True

In [53]: adb.shell_command("ls")

In [54]: adb.get_error()
Out[54]: "error: device '2-2' not found\n"


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ADB shows max 7 devices. PyADB shows all devices

If thread is alive...

Here is my case

I connect 8 devices

When i use Ubuntu 18.10
adb devices shows 7 devices
pyadb devices shows 8 devices

When i use Windows 7 x64
adb devices shows all 8 devices

As i get it right PyADB wraps ADB commands.
For sure the problem is in Ubuntu itself but results are different. Both commands should list 7 or 8 devices at once.

Where should i dig?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

PyPi package version is out of date

Hi,

The latest PyADB version on the PyPi package repository is 0.1.1 and on the git repository it is 0.1.4. Could you update the PyPi version, please?

Link to PyPi: https://pypi.python.org/pypi/pyadb

Thanks,
Ignas

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/11117582-pypi-package-version-is-out-of-date?utm_campaign=plugin&utm_content=tracker%2F1669292&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1669292&utm_medium=issues&utm_source=github).

License

pyadb is great python library, but currently it is missing clearly defined license (e.g. GPL, LGPL, BSD or etc). This make it bit unclear that what limitations there are in legal point of view.

I propose that that there should be LICENSE file which describe license terms of this library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.