Giter Site home page Giter Site logo

adb_android's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar

adb_android's Issues

Is it compatible with python3?

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")?

from adb_android import adb_android

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

Does not seem to work on Mac

*** 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

Selecting from multiple devices

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?

Unable to push the file to folder /data/

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.

Can't open tmp file generated by generate_tmp_file() function on WinPC

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```

Add "verbose" option to "exec_command" function

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)

How to write a SQL update command with root privilege

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?

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.