AirtestProject / AirtestProject/Airtest

permission error with adb after pip install on MacOS

Offen
#45 0 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
9.6k
Forks
1.5k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Airtest uses `adb` to do android automation. The `adb` binary file [here](https://github.com/AirtestProject/Airtest/tree/master/airtest/core/android/static/adb/mac) does have +x permission:
```
➜ mac git:(refactor) ls -l adb
-rwxr-xr-x 1 liuxin staff 2326156 1 24 11:57 adb
```

But if installed with `pip install -U airtest`, the permission is wrong.

```
>>> from airtest.core.android import Android
>>> a = Android()
[10:40:32][DEBUG] /Users/liuxin/Library/Python/2.7/lib/python/site-packages/airtest/core/android/static/adb/mac/adb devices
Traceback (most recent call last):
File "", line 1, in
File "/Users/liuxin/Library/Python/2.7/lib/python/site-packages/airtest/core/android/android.py", line 31, in __init__
self.serialno = serialno or ADB().devices(state="device")[0][0]
File "/Users/liuxin/Library/Python/2.7/lib/python/site-packages/airtest/core/android/adb.py", line 196, in devices
output = self.cmd("devices", device=False)
File "/Users/liuxin/Library/Python/2.7/lib/python/site-packages/airtest/core/android/adb.py", line 167, in cmd
proc = self.start_cmd(cmds, device)
File "/Users/liuxin/Library/Python/2.7/lib/python/site-packages/airtest/core/android/adb.py", line 146, in start_cmd
stderr=subprocess.PIPE
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
```

Is it a bug of pypi? Any elegant solution to solve this issue? @felixonmars

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.