pidcat icon indicating copy to clipboard operation
pidcat copied to clipboard

pidcat can't find adb

Open delor opened this issue 11 years ago • 8 comments

system: Arch Linux 3.9.6-1 x86_64 python version: 2.7.5 and 3.3.2 pidcat version: 571826e8c03b18402025c6d8bd8bad1d367401a8

Traceback (most recent call last):
  File ".bin/pidcat.py", line 142, in <module>
    adb = subprocess.Popen(adb_command, stdin=PIPE, stdout=PIPE, stderr=PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception                                                                                                                                                                                                                                                      
OSError: [Errno 2] No such file or directory

~/.bashrc

export ANDROID_HOME="~/android-sdk-linux"
export PATH="$ANDROID_HOME/platform-tools:$PATH"

delor avatar Jun 20 '13 06:06 delor

Can you try with shell=True on the subprocess.Popen call?

JakeWharton avatar Jun 20 '13 06:06 JakeWharton

adb = subprocess.Popen(adb_command, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True)

Pidcat exits without any output.

delor avatar Jun 20 '13 07:06 delor

subprocess was supposed to fix bugs, not introduce them. I'm getting more and more of my old Python chops back so I think we can actually stick with the old os.popen. I'll make the switch back tomorrow.

Thanks for the detailed reports.

JakeWharton avatar Jun 20 '13 07:06 JakeWharton

copy adb to a location under the path, i copied it to /usr/bin and all worked well

devzer01 avatar Aug 03 '13 09:08 devzer01

Perform the following procedure to

start up a terminal and navigate to home directory cd create or open file. bash_profile vim. bash_profile

Add the following lines export PATH = $PATH:/ Users/username/custompath/adt-bundle-mac-x86/sdk/platform-tools /

save file and reload file ready!

felipeska avatar Feb 11 '14 14:02 felipeska

Is ~/.bashrc executed for every shell? Or just login shells? Can you try ~/.bash_profile instead?

JakeWharton avatar Mar 12 '14 03:03 JakeWharton

With a21ee6e I no longer have this issue.

delor avatar Sep 27 '14 06:09 delor

I had the same problem, removing the tilda in SDK Path location and putting an absolute Path (/Users/...) fixed the issue.

GoMino avatar Apr 09 '15 10:04 GoMino