Hi developers of scrcpy,
Thank you for developing this awesome tool. I have a problem when I tried to connect to my device with the following configuration:
Device ---USB--- Server ---WiFi--- Client
I tried the following steps:
adb -a nodaemon serverssh -CN -L5037:localhost:5037 -R27183:localhost:27183 <server ip address>adb devices, it successfully listed the device on client machine.scrcpy --force-adb-forwrad and it doesn't work. I try again with the following command scrcpy --force-adb-forward and it doesn't work. I tried without any argument, just run the command scrcpy and it doesn't work.Seems like the readme is outdated or the feature is no longer supported. If it is still supported, would you tell me how to do it? I will make a PR to update the readme if you want.
I tried the following command from README
scrcpy --force-adb-forwradand it doesn't work.
If you pass --force-adb-forward, then you must pass -L27183:localhost:27183 instead of -R27183:localhost:27183.
I tried without any argument, just run the command
scrcpyand it doesn't work.
What is the output?
I tried the following command from README
scrcpy --force-adb-forwradand it doesn't work.If you pass
--force-adb-forward, then you must pass-L27183:localhost:27183instead of-R27183:localhost:27183.I tried without any argument, just run the command
scrcpyand it doesn't work.What is the output?
Since I am not that experienced with port forwarding; in which cases are --force-adb-forward to be used? I have tried both reverse and forward and they both seem to work fine for me and I have the same or similar setup as OP.
--force-adb-forward could be useful when remote port forwarding is not authorized (by default, it's often disabled for non-localhost address).
In addition, adb reverse does not work with adb connect before Android 9 or 10 (see #5), so a fortiori it does not work in that case via a ssh tunnel.
Hi @rom1v,
If you pass --force-adb-forward, then you must pass -L27183:localhost:27183 instead of -R27183:localhost:27183.
I tried again with -L argument, and run scrcpy --force-adb-forward and it outputs:
scrcpy: unknown option -- force-adb-forward
I tried without any argument, just run the command scrcpy and it doesn't work.
What is the output?
It will output the following text on terminal, and no other window to show device screen.
INFO: scrcpy 1.13 <https://github.com/Genymobile/scrcpy>
C:\Users\eric2\Documents\Eric\bin\scrcpy-win64-v1.13\scrcpy-server: 1 file pushed. 0.0 MB/s (27694 bytes in 0.812s)
[server] INFO: Device: Xiaomi Redmi Note 4 (Android 7.0)
java.io.FileNotFoundException: /data/system/theme_config/theme_compatibility.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileInputStream.<init>(FileInputStream.java:99)
at java.io.FileReader.<init>(FileReader.java:58)
at miui.content.res.ThemeCompatibilityLoader.getVersion(SourceFile:108)
at miui.content.res.ThemeCompatibilityLoader.getConfigDocumentTree(SourceFile:126)
at miui.content.res.ThemeCompatibilityLoader.loadConfig(SourceFile:59)
at miui.content.res.ThemeCompatibility.<clinit>(SourceFile:31)
at miui.content.res.ThemeCompatibility.isThemeEnabled(SourceFile:111)
at android.content.res.MiuiResourcesImpl.<clinit>(MiuiResourcesImpl.java:40)
at android.content.res.Resources.<init>(Resources.java:253)
at android.content.res.MiuiResources.<init>(MiuiResources.java:49)
at android.content.res.Resources.getSystem(Resources.java:182)
at android.app.LoadedApk.<init>(LoadedApk.java:205)
at android.app.ContextImpl.createSystemContext(ContextImpl.java:2013)
at android.app.ActivityThread.getSystemContext(ActivityThread.java:2137)
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.Workarounds.fillAppInfo(Workarounds.java:66)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:50)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:35)
at com.genymobile.scrcpy.Server.main(Server.java:177)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:379)
Is ADB forward new feature? As you can see, I am using scrcpy v1.13 on Windows x64.
Is ADB forward new feature? As you can see, I am using scrcpy v1.13 on Windows x64.
Yes, it has been added in v1.14: https://github.com/Genymobile/scrcpy/releases/tag/v1.14
So I just tested it again with scrcpy v1.14 and it works! Thanks @rom1v!
Shall I close this issue?