Code Monkey home page Code Monkey logo

Comments (9)

aarmea avatar aarmea commented on May 16, 2024 2

it does not on my Debian

TIL. I just tried this out on Debian and I'm getting the same result as you. It looks like this is because Debian uses its own implementation of which while Arch uses which from coreutils.

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024

Currently, it does not work over adb connect.

What if you use it over usb instead?

from scrcpy.

stek29 avatar stek29 commented on May 16, 2024

exec: No such file or directory

Are you sure that adb is in PATH?

from scrcpy.

aarmea avatar aarmea commented on May 16, 2024

More specifically, the issue causing is that exec expects your PATH to be fully expanded. Apparently, tilde expansion is a feature of the shell.

Here are two workarounds that work for me:

  • Manually expand the tildes in your PATH: PATH="$PATH:$HOME/Android/Sdk/platform-tools" scrcpy
  • Set the ADB environment variable before calling scrcpy: ADB=$(which adb) scrcpy

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024

Apparently, tilde expansion is a feature of the shell.

Absolutely.

Manually expand the tildes in your PATH

Yes, that's a requirement.

Set the ADB environment variable before calling scrcpy: ADB=$(which adb) scrcpy

I think this should not change anything: if which adb gives a result, then it's in PATH, so scrcpy would find it.

from scrcpy.

aarmea avatar aarmea commented on May 16, 2024

On my machine (whose PATH contains "~/Android/Sdk/platform-tools") scrcpy does not work but ADB=$(which adb) scrpy does. I think this is because exec doesn't do tilde expansion, while which does.

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024

OK, that's weird. On my Debian, I have the reverse behavior:

mkdir z
echo 'echo ok' > z/blabla
chmod +x z/blabla
export PATH="~/z:$PATH"
$ which blabla
$ blabla
ok

from scrcpy.

aarmea avatar aarmea commented on May 16, 2024

Yeah - my point is that which will implicitly do the tilde expansion as expected, but calls to execvp (like this one in scrcpy) do not.

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024

Yeah - my point is that which will implicitly do the tilde expansion

Yes, but this surprises me.

as expected

IMO which should not expand ~ in PATH (and it does not on my Debian, cf my previous message, since blabla is not found) for consistency, since exec does not expand it.

from scrcpy.

Related Issues (20)

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.