vmalyi / adb_android Goto Github PK
View Code? Open in Web Editor NEWEnables android adb in your python script
License: BSD 3-Clause "New" or "Revised" License
Enables android adb in your python script
License: BSD 3-Clause "New" or "Revised" License
I use the package on python 36 and got the mistake .
Is the package compatible with python3?
Traceback (most recent call last):
File "CPU.py", line 7, in
from adb_android import adb_android
File "C:\Users\v_michen\AppData\Local\Programs\Python\Python36\lib\site-packag
es\adb_android\adb_android.py", line 37
print "IOError: Failed to create a log file"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("IOError
: Failed to create a log file")?
Hi,
Overall I found this great altogether and it is much appreciated. For me though to get it to work as per reading the "How to use?" section I had to type
from adb_android import adb_android
rather than the suggested
import adb_android
at the top of my file containing my python code.
-M
*** Executing adb push /tmp/file.txt /data/media/0 command
Traceback (most recent call last):
File "/Users/apple/Desktop/check.py", line 7, in
adb_android.push('/tmp/file.txt', '/data/media/0')
File "/usr/local/lib/python2.7/site-packages/adb_android/adb_android.py", line 58, in push
return _exec_command(adb_full_cmd)
File "/usr/local/lib/python2.7/site-packages/adb_android/adb_android.py", line 194, in _exec_command
output = check_output(final_adb_cmd, stderr=t)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 390, in init
errread, errwrite)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Unit test fails with [INSTALL_FAILED_CONTAINER_ERROR].
It has to be checked on real device.
PS: test_install_p_sdcard has the same issue
PPS: can be realated to http://stackoverflow.com/questions/5744298/what-does-this-mean-failure-install-failed-container-error
adb wait-for-device goes into infinite wait - waiting for device if not connected. So there should be a timeout where this function exits.
Make imports just working without need to install adb-lib package each time after modifying it
"AssertionError: (0, '') should be the same object as (0, ''), but it is not"
Unittests are failing on Travis CI because of too old version of android avd (19)
'-k'
It seems like this library is unable to allow a user to select a single device when multiple devices are connected.
The original command is
adb -s [device ID] shell am start -a android.intent.action.CALL -d tel:123-456-7890
However the library does not include -s [device ID]
portion .
Any plans to fix this?
Hello,
I am unable to push any files to the device/emulator and it always return the ('1','')
When i debug it says permission denied to copy.
Please help me.
Thanks
Yakub.
"-s, -l"
During unit test execution:
*** preparing temporary file with name c:\users\malyi\appdata\local\temp\tmpdrjulf
*** executing ['adb', 'push', 'c:\\users\\malyi\\appdata\\local\\temp\\tmpdrjulf', '/data/media/0/']
cannot open 'c:\users\malyi\appdata\local\temp\tmpdrjulf': No such file or directory
*** getting path to tmp_file c:\users\malyi\appdata\local\temp\tmpdrjulf
*** getting path to dest_folder_host c:\users\malyi\appdata\local\temp
.cannot create 'c:\users\malyi\appdata\local\temp\tmpdrjulf': No such file or directory
Fcannot open 'c:\users\malyi\appdata\local\temp\tmpdrjulf': No such file or directory
....*** executing ['adb', 'pull', '/data/media/0/tmpdrjulf', '/non-existing-dir/']
cannot create '/non-existing-dir\': No such file or directory
.*** executing ['adb', 'pull', '/data/media/0/tmpdrjulf', 'c:\\users\\malyi\\appdata\\local\\temp']
cannot create 'c:\users\malyi\appdata\local\temp\tmpdrjulf': No such file or directory
F..*** executing ['adb', 'push', '/non-existing-dir/', '/data/media/0/']
cannot stat '/non-existing-dir/': No such file or directory
.*** executing ['adb', 'push', 'c:\\users\\malyi\\appdata\\local\\temp\\tmpdrjulf', '/data/media/0/']
cannot open 'c:\users\malyi\appdata\local\temp\tmpdrjulf': No such file or directory```
Make "exec_command" function use verbose mode by default (function should output than stdout to console) and introduce a possibility to redirect stdout to DEVNULL in order to supress it.
Function signature should look like: exec_command(adb_full_cmd, verbose=True)
error in the adb_android.py file. help?
Generate new project structure with help of cookiecutter.
To be done after #5
adb shell
su -c 'sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value=5000 where name='screen_off_timeout'"
But I am getting the following error:
Error: no such column: screen_off_timeout
how to fix it?
Hey @vmalyi ,
pip install adb_android
still installs the old package. Could you update the package lists with the latest version?
Thanks!
This can be done as soon as travis-ci/travis-cookbooks#489 is merged.
Prior do select the framework to adapt the documentation strings for
'-s' option specifies exact device who the command to be issued to.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.