-
-
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
Features implemented in a fork #679
Comments
Hi, Thank you for sharing all your work. 👍 You implemented a lot of things in your corner!
When features are "general" enough and would benefit everyone, yes you should propose to merge them (one PR per feature based on the current
This is definitely a feature to merge (#22). I investigated locally, especially to support pinch-to-zoom (#24) with
(didn't look yet, also see #431 (comment))
Is it necessary? (every system already has it own shortcut, typically Alt+F4, don't they?)
I disabled a similar feature on purpose before the last release: 8c8649c. Is it the same?
Could you explain what it does and what is the use case?
Did you implemented additional cleanup on the server side on exit? What is the required cleanup?
(the client installs its associated server, so using an old server with a new client is not a goal, and it would require far more than backward compatibility of command-line arguments)
Indeed, I removed (before the first release) the NIO usage on this specific part to use Unix sockets on the device side (because we don't need TCP here), and NIO/channels does not support UNIX sockets. Why do you need a TCP socket on the device side? (oh, the answer is probably in the next point)
IIUC, you start the server then connect over TCP directly? The problem I see here is that anyone on your network can connect (with the right timing) to your device without any authentication. If you use Lurker00@32b0fb0?full#diff-2b1a6238bf364c50a82e0f738e186e23R40-R41 My understanding is that this flag only impacts the "sender":
The purpose here is to send the control messages earlier? Lurker00@32b0fb0?full#diff-2b1a6238bf364c50a82e0f738e186e23R43-R44 I just set these flags locally, I still receive packets of 4096 bytes. Probably due to the adb tunnel ( |
It's a huge work! I was very limited in time: tomorrow going to vacations for full August to the place with very poor Internet, and I need this my scrcpy mod fully working. Now I have to separate different parts... Definitely not now :(
My notebook has no F-keys. Alt-Fn-4 didn't work well with 1.8 on the previous (already died!) notebook for a reason... Now I see it works, but Ctrl-Q still works better for me.
I see... Yes, sometimes it works weird, but it was handy for tests - to save power, but sometimes to look to the phone. I don't insist :)
This is my primary goal, and what I can't live without! I have small phone (Unihertz Atom, 2.45" 240x432 screen), and a small convertible notebook (One Netbook Mix 3, 8.4" 2560x1600 screen). With my mod of scrcpy, I connect Atom to Mix 3 in full screen mode, forcing high resolution and low DPI on the phone, and I end up with powerful Android tablet! Notebook rotation forces Android screen rotation (even apps that, in general, refuse landscape, work in landscape), screen is dimmed to save power. Lots of apps (banking, messengers with video and pics) require Android, but work better on big screens. On the other hand, a person with very high resolution device and lower resolution notebook/PC may want to decrease device's screen resolution, and decrease density to force tablet mode of Android.
I found my approach of passing parameters is more convenient during development, and more easy to maintain. No magic numbers, all in all!
NIO does implement WritableByteChannel directly. In fact, I've deleted your IO.java, because channels work with ByteBuffer directly. The resulting code is shorter and, I think, faster, even via Unix sockets.
To eliminate adb as the proxy via WiFi. With NIO and TCP I have direct connection with full control. I even disconnect adb from the device in such a use.
The server listens only for two connections (video and control), then stops listening. The "right timing" is a few milliseconds during the startup. Moreover, the listening port is assigned by the client side, and can be changed from the command line. I see no a problem here. But in my use, I set up the device as the WiFi access point, connect notebook to it, and nobody else exists in this private network. No problems whatsoever.
Yes. It works for direct TCP connection over WiFi, to minimize delays between touch, mouse, keyboard events. Touch and mouse events are assigned timestamps on the device, and a touch may become long touch, or vice versa.
That's why I eliminated adb as the proxy! I just have committed a number of more changes that I forgot yesterday:
For the remaining hours (before I go to vacations), I plan to write a public description and release a binary build for those who wants to try. But this is also my last day at work before long vacations... |
Thank you for your answer.
OK, I understand. Could I take parts of your code if I need to? (probably not now too 😉) Executing cleanup even if adb is killed can indeed be interesting (for example for issues #96 #101 #181). I always considered that a wrapper script was sufficient for this "advanced usage", but it is better if it always cleanup. I keep that in mind. 👍 Btw, maybe it is possible to use
Not for UNIX sockets.
It seems you either don't use channels for UNIX sockets or add just add a wrapper to the
Oh, that's bad. (TBH I never use scrcpy over wifi) |
Of course! If you save me some time merging all the useful changes yourself, it would be great! That's what I've published my changes for - to be used by other developers, just like I've used your product.
Yes:
I found it quite useful in a long trip in a bus or train: phone in the belt pouch, little notebook in hands, I can switch between Android and Windows, and no wires. Small lags are acceptable. For me, scrcpy is the app that I use several times per day. Clipboard transfer from Android to Windows in 1.9 was the feature pushed me to perform the merge. Did I thank you? I will! :) |
Published Windows 64-bit package for those who want to test it. |
If I follow the default build instructions, can I make this fork work on Linux? |
I think it should work. Build it per original instruction. You may extract ADBKeyBoard's apk file from my Windows release package. I never tried it under native Linux myself, but it worked somehow with Ubuntu 18.04 LTS from WLS and an X-server under Windows. You may try and let me know :) |
I tried yesterday and couldn't get it to work. But since I don't recall ever building anything, I'm probably doing something wrong.
, when running the application I get
). |
You may use prebuild server from my Windows package as well. |
When using your prebuilt server and trying to 'sudo ninja install', I get the same error I got when I last tried:
And when I try to run the application I get a different error:
|
What Android version do you have on your device?
ср, 7 авг. 2019 г. в 03:12, Daniel-Brum <notifications@github.com>:
… When using your prebuilt server and trying to 'sudo ninja install', I get
the same error I got when I last tried:
WARNING: Duplicate name in Manifest: Manifest-Version.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
ago 06, 2019 8:03:36 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Built-By.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
ago 06, 2019 8:03:36 PM java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Created-By.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
And when I try to run the application I get a different error:
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.ClassNotFoundException: android.app.IActivityManager$Stub
at com.genymobile.scrcpy.wrappers.ServiceManager.getService(ServiceManager.java:39)
at com.genymobile.scrcpy.wrappers.ServiceManager.getActivityManager(ServiceManager.java:87)
at com.genymobile.scrcpy.DeviceControl.<init>(DeviceControl.java:43)
at com.genymobile.scrcpy.Server.main(Server.java:192)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)
Caused by: java.lang.ClassNotFoundException: android.app.IActivityManager$Stub
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at java.lang.Class.forName(Class.java:285)
at com.genymobile.scrcpy.wrappers.ServiceManager.getService(ServiceManager.java:36)
... 5 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.app.IActivityManager$Stub" on path: DexPathList[[zip file "/data/local/tmp/scrcpy-server.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 9 more
Suppressed: java.lang.ClassNotFoundException: android.app.IActivityManager$Stub
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 10 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#679?email_source=notifications&email_token=ACCHAZVXV5WWIVLQTR5SPJTQDIANFA5CNFSM4IIWDWG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3WW6QQ#issuecomment-518876994>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACCHAZWCTHTTSG7R3USTTDDQDIANFANCNFSM4IIWDWGQ>
.
|
I have Android 6.0.1. |
I just published a new release: https://github.com/Lurker00/scrcpy/releases/latest But I have no pure Android 6 device in hands, only with MIUI under which almost everything does not work silently. |
I'm still unable to sudo ninja install, with the same warnings from before. Edit 2: The warnings didn't actually get in the way or anything, it looks like the application is installed correctly. Sorry for my hasty complain, and thank you again! |
These are just warnings, not errors. See #458 (comment) |
Oh, I see. Dunno why, but I simply assumed the program wouldn't be installed properly because of that, I should've searched about it first. I'm sorry and thank you. |
Just wanted to give my experience here; @rom1v I attempted to run your changes from the latest release, and while I get a message stating
|
@codycodes, Sorry, I overlooked an additional thread introduced in 1.9, which caused malfunction sometimes. I've comitted the fix. Here is an update: https://github.com/Lurker00/scrcpy/releases/latest Note: you must use both server and client binaries from my fork! The typical session is like this:
where 14191 is a PID of the server launched from PC via adb, and 14200 is the secondary copy of the server, which actually performs the job in my fork. Please note that while this build works for me, I have no abilities to perform thorough tests with different devices, but I try to resolve reported problems. I use the following command line: |
I have the same problem, starting your latest release version i only get this in my console : Then nothing, no window opens... |
@Pixelstudio , is it L2 build for Windows, or a custom build for Linux (then which revision)? Which Android version do you have? Is it pure stock Android or what? Currently I can only answer that it works for me flawlessly ;) |
Also tested but not working here. I'm on a Surface Pro so hoping to be able
to use these features at some point. I have the same output, which is
nothing after the info logs. Thanks for your work and help!
…On Thu, Aug 22, 2019 at 12:45 AM Lurker00 ***@***.***> wrote:
@Pixelstudio <https://github.com/Pixelstudio> , is it L2 build for Windows
<https://github.com/Lurker00/scrcpy/releases/tag/v1.9L2>, or a custom
build for Linux (then which revision)? Which Android version do you have?
Is it pure stock Android or what? Currently I can only answer that it works
for me flawlessly ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#679?email_source=notifications&email_token=AB5CPWLC7G6JDGFRYU6YFSLQFY7YLA5CNFSM4IIWDWG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44GPJY#issuecomment-523790247>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5CPWKJN6LFM2JURLDQEP3QFY7YLANCNFSM4IIWDWGQ>
.
|
@codycodes , again:
You (all who experience problem with my build) may also type open logcat.txt in a text editor and search for possible exception stack traces for scrcpy, to provide a clue. I'd glad to make this fork to work for more people, but I need details about the problems. |
Here are some details (i cannot find something that would cause an error)... I'm using your latest win64 build "scrcpy-win64-0.9-L2" here is part of the logcat:
|
Sorry, but this dump gives no a clue :( |
I tested this version, same problem. |
@Pixelstudio , I thought it would be more information in the Windows console, right after |
Nope nothing in the console |
I'll have to find Android 9 device or install a simulator to work it out, but this may happen not earlier than September. |
I am so excited to report that the multitouch also works great with the KMS/DRM support. Don't even need X or Wayland running! |
How is the IME implemented? (Along with wireless mode) I compiled the fork along with compiling the server jar in the same step. I don't see anything extra on the phone when connecting. |
Oh I see now. I didn't realize ADBKeyboard was its own aplication. |
Tested wireless here (killing adb after launch) Works well (for wireless) Only note is that after exit: it still tried to run adb disconnect (I assume because it wasn't aware I killed manually) |
@parkerlreed, thank you for the report! My build of ADBKeyBoard (included into Windows packages) has an additional service to force Android screen rotation.
Actually, when it connects directly (with |
@Lurker00 If I kill the adb wifi from the phone side, the program exits. Does it still rely on that running? |
I can't reproduce it: my phone is not rooted. I may only guess that killing adbd also kills its child processes. adbd with direct connection is only used to proxy server's stdout. For Windows, there is |
Seems to work now: Please give me your feedbacks. I will rewrite the commits properly when I have time. |
@rom1v 👍 Added benefit of not crashing scrcpy when show pointer location is enabled :) |
thank you so much for this form!! love it!! |
Thanks for finding! Yes, it works, but I've also added the same check into |
(just for info, multitouch is now implemented on |
This would be fantastic. If you want to spin up an issue for it, I'd be happy to chime in and help test any possible implementations. |
@andrizmitnick, @parkerlreed: don't know about desktop mode, but, from my experience, Android switches from phone to tablet mode with lower density. You may try |
@Lurker00 That was waaaay back on 4.4.2 and earlier. This new desktop mode is activated somehow and gives you floating windows and such. https://www.androidauthority.com/android-q-desktop-mode-demo-991055/ Granted it not in that form yet but there's some basic things in place |
Here is a specific thread for #495 (comment) (@Lurker00):
The text was updated successfully, but these errors were encountered: