-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Could not list ADB devices ( new one, not like the others) #3386
Comments
What is the result of |
|
OK, so it's correct, the content can be parsed correctly. Maybe the process What is the result of |
before I got the new phone , my last phone-xiaomi11 could be displayed and controlled normally. But I still use the same computer and security software.
same as runing 'scrcpy' alone
|
OK, I added some more logs, please replace this binary in your v1.24 release.
diffdiff --git a/app/src/adb/adb.c b/app/src/adb/adb.c
index 344f7fcc..c3210d38 100644
--- a/app/src/adb/adb.c
+++ b/app/src/adb/adb.c
@@ -401,6 +401,7 @@ sc_adb_list_devices(struct sc_intr *intr, unsigned flags,
#define BUFSIZE 65536
char *buf = malloc(BUFSIZE);
if (!buf) {
+ LOG_OOM();
return false;
}
@@ -413,11 +414,13 @@ sc_adb_list_devices(struct sc_intr *intr, unsigned flags,
}
ssize_t r = sc_pipe_read_all_intr(intr, pid, pout, buf, BUFSIZE - 1);
+ LOGE("read() returned %d", (int) r);
sc_pipe_close(pout);
bool ok = process_check_success_intr(intr, pid, "adb devices -l", flags);
if (!ok) {
free(buf);
+ LOGE("'adb devices -l' failed");
return false;
}
@@ -440,6 +443,7 @@ sc_adb_list_devices(struct sc_intr *intr, unsigned flags,
// List all devices to the output list directly
ok = sc_adb_parse_devices(buf, out_vec);
+ LOGD("sc_adb_parse_device() ok? %d", ok);
free(buf);
return ok;
} |
Also, what is the result of |
well, I just got home. I try it with my computer with windows11, it works perfectly like this:
Before, I tried with my laptop in company actually. I will reply you tomorrow, to see if that new 'scrcpy' works and show you the log of running command and the value of 'echo %ADB%'. |
I didn't add it to the system viriable
|
OK, so reading the output of the process failed. Maybe a permission issue related to the OS, if it is only on your company computer :/ |
Well, I can not find any problem about the OS, so I give up. Maybe I should buy a new laptop just for work. Thanks a lot. |
phone:xiaomi12 pro
os: windows10
scrpcy: 1.24
android version: miui13 (based on android 12)
steps before 'scrcpy':
first, I just run adb.exe usb, the result seems right, but scrcpy cannot work,
then I searched a lot, run the commands as follows:
the output seems right, but scrcpy still can not work , what should I do to solve this problem? Thanks a lot !
The text was updated successfully, but these errors were encountered: