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
There is a bug in pushing files to the device #4876
Comments
What if you execute the exact same command with adb push manually?
? |
What is the result of:
? |
Successfully pushed the ABC.zip file to mobile phone /storage/emulated/0/Download/ `
D:\Tools\Scrcpy>adb shell ls -l /storage/emulated/0/Download/ D:\Tools\Scrcpy>adb push D:\Documents\Downloads\DEF.zip /storage/emulated/0/Download/ D:\Tools\Scrcpy>adb shell ls -l /storage/emulated/0/Download/ |
I don't understand, because scrcpy executes exactly this command. 🤔 |
Please test with more logs: diff --git a/app/src/adb/adb.c b/app/src/adb/adb.c
index 15c9c85a9..d669ed59d 100644
--- a/app/src/adb/adb.c
+++ b/app/src/adb/adb.c
@@ -317,6 +317,11 @@ sc_adb_push(struct sc_intr *intr, const char *serial, const char *local,
const char *const argv[] =
SC_ADB_COMMAND("-s", serial, "push", local, remote);
+ LOGI("[adb push]\n");
+ for (unsigned i = 0; i < ARRAY_LEN(argv); ++i) {
+ LOGI("=== [%u]: [%s]\n", i, argv[i]);
+ }
+
sc_pid pid = sc_adb_execute(argv, flags);
#ifdef __WINDOWS__ Here is a binary to replace in your scrcpy 2.4 folder:
|
After replacing the scrcpy.exe you provided, execute scrcpy.exe -K --push-target=/storage/emulated/0/Download/ `
|
|
ABC.zip
This one worked. 正式版-规则整合.zip
What is the result of: adb -s 208b0638 push "D:\Documents\Downloads\姝e紡鐗?瑙勫垯鏁村悎.zip" "/storage/emulated/0/Download/" ? It seems the problem is with chinese characters. Probably #2184. |
I execute scrcpy.exe -K --push-target=/storage/emulated/0/Download/ 1、ABC.zip
` |
adb -s 208b0638 push "D:\Documents\Downloads\ABC.zip" "/storage/emulated/0/Download/" adb -s 208b0638 push "D:\Documents\Downloads\书源校 验工具-v1.0.0 - 副本.zip" "/storage/emulated/0/Download/" adb -s 208b0638 push "D:\Documents\Downloads\书源校验工具-v1.0.0.zip" "/storage/emulated/0/Download/" adb -s 208b0638 push "D:\Documents\Downloads\CDE.zip" "/storage/emulated/0/Download/" adb -s 208b0638 push "D:\Documents\Downloads\正式版 规则整合 - 副本.zip" "/storage/emulated/0/Download/" adb -s 208b0638 push "D:\Documents\Downloads\正式版-规则整合.zip" "/storage/emulated/0/Download/" `
D:\Tools\Scrcpy>adb -s 208b0638 push "D:\Documents\Downloads\书源校 验工具-v1.0.0 - 副本.zip" "/storage/emulated/0/Download/" D:\Tools\Scrcpy>adb -s 208b0638 push "D:\Documents\Downloads\书源校验工具-v1.0.0.zip" "/storage/emulated/0/Download/" D:\Tools\Scrcpy>adb -s 208b0638 push "D:\Documents\Downloads\CDE.zip" "/storage/emulated/0/Download/" D:\Tools\Scrcpy>adb -s 208b0638 push "D:\Documents\Downloads\正式版 规则整合 - 副本.zip" "/storage/emulated/0/Download/" D:\Tools\Scrcpy>adb -s 208b0638 push "D:\Documents\Downloads\正式版-规则整合.zip" "/storage/emulated/0/Download/" |
OK, so you get the same behavior with adb alone (some files work, some files don't, maybe randomly). This is a problem in adb (maybe the adb server on your specific device). Try (with adb alone) to push to Does it work on another device? |
I will start my vacation tomorrow, and after the vacation ends, I will try (with adb alone) to push to /storage/emulated/0/Download I only have this one phone |
Environment
Describe the bug
Drag & drop non-APK file;Push file to device
There is a bug in pushing files to the device
On errors, please provide the output of the console (and
adb logcat
if relevant).Please do not post screenshots of your terminal, just post the content as text instead.
The text was updated successfully, but these errors were encountered: