Code Monkey home page Code Monkey logo

Comments (27)

emansih avatar emansih commented on May 23, 2024 2

I am having the same issue. Running on Windows 10

Running from cmd.exe

C:\Users\User\Downloads\scrcpy-windows-with-deps-v1.0\scrcpy-windows-v1.0>adb kill-server

C:\Users\User\Downloads\scrcpy-windows-with-deps-v1.0\scrcpy-windows-v1.0>scrcpy.exe

C:\Users\User\Downloads\scrcpy-windows-with-deps-v1.0\scrcpy-windows-v1.0>adb devices
List of devices attached
<snip>      device

Running from mingw64 gives a slightly more detailed output albeit a short one.

MINGW64 ~/Downloads/scrcpy-windows-with-deps-v1.0/scrcpy-windows-v1.0
$ ./scrcpy.exe
ERROR: "adb reverse" returned with value 1

MINGW64 ~/Downloads/scrcpy-windows-with-deps-v1.0/scrcpy-windows-v1.0
$ adb devices
List of devices attached
<snip>      device

from scrcpy.

banjaloupe avatar banjaloupe commented on May 23, 2024 1

I had this same issue and installing the drivers appeared to be the solution:

  1. Installing the appropriate drivers/software from the page redwolf2 linked above: https://developer.android.com/studio/run/oem-usb.html
  2. Using "adb devices" now starts the daemon and listed the phone-- mine was initially unauthorized, so I had to agree to a modal pop-up on the phone's screen (which allows me to set the computer as trusted).
  3. Running scrcpy.exe after this brings up the phone's screen as expected.

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024 1
ERROR: "adb reverse" returned with value 1

Is it Android >= 5? scrcpy only works for device from Android 5.0.

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024 1

Is your device connected using adb connect? #5

from scrcpy.

aezaekill avatar aezaekill commented on May 23, 2024 1

I already tried running it using a Git-Bash. This results in the following:

usr@PC MINGW64 /d/Downloads/scrcpy-windows-v1.0
$ adb devices
List of devices attached
adb server is out of date.  killing...
* daemon started successfully *
710KPXV*****  device

usr@PC MINGW64 /d/Downloads/scrcpy-windows-v1.0
$ ./scrcpy.exe

After that bash is waiting but it seems like it is not responding anymore.

NVM: Got it! It is working now. Sorry for the confusion but it seems like the scrcpy-server.jar has been corrupt.

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

If you open a cmd.exe and go to the scrcpy directory, what is the result of adb devices (while your device is plugged)?

from scrcpy.

pyluyten avatar pyluyten commented on May 23, 2024

it says "List of devices attached", but i do not see any result (looking in scrcpy directory - maybe i should look elsewhere)

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

OK, so that's the problem: your device is not detected by adb.

Did you enable "USB debugging"? Maybe some driver is needed for your device?

from scrcpy.

pyluyten avatar pyluyten commented on May 23, 2024

"USB debugging" is already enabled. Unfortunately i will not be able to test installation of driver on this computer. Maybe someone else can reproduce issue

from scrcpy.

redwolf2 avatar redwolf2 commented on May 23, 2024

@pyluyten You need to install the adb driver in order to connect. Then you should be able to see the plugged device using adb devices. https://developer.android.com/studio/run/oem-usb.html

from scrcpy.

AHrubik avatar AHrubik commented on May 23, 2024

@pyluyten Also make sure the device isn't in Media Transfer mode (MTP). Set it to charge only.

from scrcpy.

pyluyten avatar pyluyten commented on May 23, 2024

I do not have admin rights on this workstation, so i think the oem-usb cannot be installed. I think you might close the issue, and as soon as i have another windows workstation where i can install driver i will check with this one.

Maybe should i open another issue because there is not output in cmd (scrcpy should tell me no device was found by adb)

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

Since the portable binary does not display output (unless run in MSYS2), always check that adb devices detect your device before trying scrcpy (at least until we find a solution so that the binary built is MSYS2 print output when run in cmd.exe).

from scrcpy.

emansih avatar emansih commented on May 23, 2024

yes, it running Android 7.0

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

OK. Then, what is the result of:

adb reverse localabstract:scrcpy tcp:1234

?

from scrcpy.

emansih avatar emansih commented on May 23, 2024

interesting...

C:\Users\User\Downloads\scrcpy-windows-with-deps-v1.0\scrcpy-windows-v1.0>adb kill-server

C:\Users\User\Downloads\scrcpy-windows-with-deps-v1.0\scrcpy-windows-v1.0>adb reverse localabstract:scrcpy tcp:1234
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: more than one device/emulator

C:\Users\User\Downloads\scrcpy-windows-with-deps-v1.0\scrcpy-windows-v1.0>adb devices
List of devices attached
<snip>      device

from scrcpy.

emansih avatar emansih commented on May 23, 2024

yikes, it was previously running adb connect.(i did kill adb server on my pc though) toggling adb works. thanks!

from scrcpy.

konatachan avatar konatachan commented on May 23, 2024

I have the same issue, but my ADB sees the device

C:\Users\Ni\Desktop\scrcpy-windows-v1.0
λ adb devices
List of devices attached
16c9a4dc        device

C:\Users\Ni\Desktop\scrcpy-windows-v1.0
λ scrcpy

C:\Users\Ni\Desktop\scrcpy-windows-v1.0
λ

from scrcpy.

aezaekill avatar aezaekill commented on May 23, 2024

Hi,
i have the same issue using my Windows 10 PC and Pixel 2 XL.

adb devices shows the device:

List of devices attached
710KPX**********  device

adb reverse localabstract:scrcpy tcp:1234 leads to:

* daemon not running; starting now at tcp:5037
* daemon started successfully

scrcpy does nothing at all.
Is there a verbose mode or a logfile i could provide to support further investigation of the problem?

Regards and thanks for your help.

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

Is there a verbose mode or a logfile i could provide to support further investigation of the problem?

In theory, scrcpy prints some output on stdout (in the console).

There is a problem with the Windows version when started in a cmd.exe though: it prints nothing. I don't know why yet.

However, if you run the very same scrcpy.exe from MSYS2 (mingw64), then it correctly prints output. If scrcpy does not work, it may help to know why.

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

I already tried running it using a Git-Bash

So there is no output in git bash :( You should have output on MSYS2…

Got it! It is working now.

👍

from scrcpy.

 avatar commented on May 23, 2024

I've had a very similar issue when attempting to run scrcpy for the first time on two computers that were not authorized for debug access. Once approved via the trust access dialog on the phone, nothing happens but adb.exe is left running and on the first computer scrcpy.exe was still running with no visible UI.

It worked as intended after killing / restarting the executable.

from scrcpy.

Ruhul768 avatar Ruhul768 commented on May 23, 2024

Ruhul768

from scrcpy.

TheInitializer avatar TheInitializer commented on May 23, 2024

I'm having the same issue...

$ ./scrcpy.exe
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'

$

I'm trying to connect over WiFi as the USB connection with this device is hard to get to work.

edit: nevermind, I had forgotten to put adb on my path. Now I'm getting

ERROR: "adb push" returned with value 1

edit 2: running it with the SCRCPY_SERVER_PATH environment variable gives me the first message.

edit 3: I did alias adb=./adb.exe and it worked 🎉

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

@TheInitializer Your issue is probably more related to #5 (comment). Could you test with the current master version?

from scrcpy.

rom1v avatar rom1v commented on May 23, 2024

I added a workaround in the FAQ, this may be useful to find the cause in case of errors.

from scrcpy.

PanCrucian avatar PanCrucian commented on May 23, 2024

One more note. If more than 1 android devices are connected to your PC, then manually "adb connect" (which device u need)

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.