-
Notifications
You must be signed in to change notification settings - Fork 1.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Android App? #189
Comments
Any progress on this? It would be very useful if you are developing and/or testing on live android device... |
If somebody wants to step up and contribute, I'm more than happy to have the Android support, but as it stands, we don't really have enough developers to justify this. |
I'm willing to take a crack at it, if you can give me pointers. |
I sadly can't give you any pointers really.
|
I built the app locally (had to do some updates to gradle etc). I get the following:
|
@Genome36 might be able to help |
Only tangentially related, but I got it to build on Linux on Dex on Samsung, so it works in a Linux Container (not the main phone though). I have also read that you need root to control an actual pointer? But i have seen "Wireless Mouse" applications that send it over wifi so I know it's possible. |
You don't need root. |
Could you link us to your fork with the updated grade?
…On Mon, Jun 24, 2019, 09:15 dadosch ***@***.***> wrote:
I built the app locally (had to do some updates to gradle etc). I get the
following:
2019-06-24 15:11:32.497 2134-15547/org.synergy W/System.err: org.synergy.io.msgs.InvalidMessageException
2019-06-24 15:11:32.498 2134-15547/org.synergy W/System.err: at org.synergy.io.msgs.HelloMessage.<init>(HelloMessage.java:60)
2019-06-24 15:11:32.499 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.handleHello(Client.java:195)
2019-06-24 15:11:32.500 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.access$300(Client.java:48)
2019-06-24 15:11:32.501 2134-15547/org.synergy W/System.err: at org.synergy.client.Client$4.run(Client.java:237)
2019-06-24 15:11:32.501 2134-15547/org.synergy W/System.err: at org.synergy.base.EventQueue.dispatchEvent(EventQueue.java:135)
2019-06-24 15:11:32.503 2134-15547/org.synergy W/System.err: at org.synergy.Synergy$MainLoopThread.run(Synergy.java:64)
2019-06-24 15:11:32.504 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:11:32.506 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:11:32.509 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:11:32.510 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:11:33.519 2134-15547/org.synergy W/System.err: org.synergy.io.msgs.InvalidMessageException
2019-06-24 15:11:33.522 2134-15547/org.synergy W/System.err: at org.synergy.io.msgs.HelloMessage.<init>(HelloMessage.java:60)
2019-06-24 15:11:33.523 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.handleHello(Client.java:195)
2019-06-24 15:11:33.524 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.access$300(Client.java:48)
2019-06-24 15:11:33.525 2134-15547/org.synergy W/System.err: at org.synergy.client.Client$4.run(Client.java:237)
2019-06-24 15:11:33.526 2134-15547/org.synergy W/System.err: at org.synergy.base.EventQueue.dispatchEvent(EventQueue.java:135)
2019-06-24 15:11:33.527 2134-15547/org.synergy W/System.err: at org.synergy.Synergy$MainLoopThread.run(Synergy.java:64)
2019-06-24 15:11:33.529 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:11:33.530 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:11:33.534 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:11:33.536 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:11:34.540 2134-15547/org.synergy W/System.err: org.synergy.io.msgs.InvalidMessageException
2019-06-24 15:11:34.545 2134-15547/org.synergy W/System.err: at org.synergy.io.msgs.HelloMessage.<init>(HelloMessage.java:60)
2019-06-24 15:11:34.546 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.handleHello(Client.java:195)
2019-06-24 15:11:34.546 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.access$300(Client.java:48)
2019-06-24 15:11:34.547 2134-15547/org.synergy W/System.err: at org.synergy.client.Client$4.run(Client.java:237)
2019-06-24 15:11:34.548 2134-15547/org.synergy W/System.err: at org.synergy.base.EventQueue.dispatchEvent(EventQueue.java:135)
2019-06-24 15:11:34.548 2134-15547/org.synergy W/System.err: at org.synergy.Synergy$MainLoopThread.run(Synergy.java:64)
2019-06-24 15:11:34.550 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:11:34.551 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:11:34.553 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:11:34.554 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:11:34.557 2134-15547/org.synergy W/System.err: org.synergy.io.msgs.InvalidMessageException
2019-06-24 15:11:34.560 2134-15547/org.synergy W/System.err: at org.synergy.io.msgs.HelloMessage.<init>(HelloMessage.java:60)
2019-06-24 15:11:34.563 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.handleHello(Client.java:195)
2019-06-24 15:11:34.565 2134-15547/org.synergy W/System.err: at org.synergy.client.Client.access$300(Client.java:48)
2019-06-24 15:11:34.566 2134-15547/org.synergy W/System.err: at org.synergy.client.Client$4.run(Client.java:237)
2019-06-24 15:11:34.567 2134-15547/org.synergy W/System.err: at org.synergy.base.EventQueue.dispatchEvent(EventQueue.java:135)
2019-06-24 15:11:34.568 2134-15547/org.synergy W/System.err: at org.synergy.Synergy$MainLoopThread.run(Synergy.java:64)
2019-06-24 15:12:01.870 2134-2134/org.synergy W/org.synergy: type=1400 audit(0.0:27): avc: denied { write } for name="uinput" dev="tmpfs" ino=12413 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:uhid_device:s0 tclass=chr_file permissive=0
2019-06-24 15:12:01.906 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:12:01.907 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
2019-06-24 15:12:01.908 2134-15547/org.synergy I/Synergy: Event grabbed:org.synergy.base.Log:153
2019-06-24 15:12:01.909 2134-15547/org.synergy I/Synergy: ***@***.***:org.synergy.base.Log:153
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#189?email_source=notifications&email_token=ABUBDU3K7NU23UBRXHABDVLP4DCF3A5CNFSM4GHTPJTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYM4FFI#issuecomment-505004693>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUBDUYLAH3T6UUPPA2WKFTP4DCF3ANCNFSM4GHTPJTA>
.
|
It should be here https://github.com/dadosch/synergy-android-7/ Please note that I think (but I don't remember exactly) that I was able to fix the message I wrote earlier (InvalidMessageException) with dadosch/synergy-android-7@2f05f23 However, when I tested the app connecting worked fine, but the mouse emulation part didn't (I think it had something to do with this file https://github.com/dadosch/synergy-android-7/blob/master/app/src/main/jni/synergy-jni.c not working properly) (But the mouse not working might also be because of my LineageOS not running some commands properly) |
For testing, you need to run Barrier without "--enable-crypto". Current state: No mouse shown on android phone, but events should be successfully received. |
scrcpy https://github.com/Genymobile/scrcpy/blob/master/DEVELOP.md#input-events-injection also does injecting key and mouse events. Note that they handle special keys like umlauts or fancy French characters quite well. (But I don't know wether it works without adb, but no root should be required) EDIT: I think the key part IS that it works via adb so it has the permissions to install the server with appropriate permissions. However, no cursor is shown on the device when controlled via scrcpy. If it would be possible to use their way to emulate keypresses (even if that would mean a slightly more complex installation process than simply installing a APK), I think I would prefer their way over a root-only route. Steps needed: (IMHO)
@mirh I tried out that app . While moving the "cursor" (basically a large image of a curser) with the python script worked, clicking didn't work. A different approach would be to use a bluetooth adapter on the computer to act as HID device (a bit like https://github.com/xenogenesi/hidclient, but only used when the mouse would be leaving the computer's screen), but then you would need to configure the resolution of the phone screen on the computer I suppose (Since HID mice send only relative data, don't they?) This would be universal and could be used not only for phones. |
AFAIU the accessibility service can only interact with "accessible objects". Root+adb (which can also wireless btw) seem the two most proper routes |
Is there any traction on an Android application. It can be REALLY useful when I use Samsung Dex. |
Not officially. We have other pressing bugs and issues to catch up on, before even Android app development can be considered.. apologies. |
I will leave this here as reference: scrcpy |
DeskDock can be used as a bridge between barrier and android. |
Just chiming in, I would absolutely love Android support. Once other pressing matters have been attended to and settled, perhaps this could be a possibility 🦖 Love the work you all do |
Just thought of this. Would love to use barrier client on my android tv to connect my linux barrier server. I already use the client in gpu passthrough windows and work laptop |
I'm an Android Developer. Can someone point me how can I contribute here? I am using this app and I want to support the android development. |
KDE connect for android added mouse input recently, it works through the accessibility services. I think this can be a starting point: https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/MouseReceiverPlugin For keyboard input, they use a softkeyboard which has to be selected in order to work. But after all, no root is required with those methods so this would be really great. |
Also take a look at the scrcpy Project: https://github.com/Genymobile/scrcpy
…On Sun, 23 May 2021, 13:56 dadosch, ***@***.***> wrote:
KDE connect for android added mouse input recently, it works through the
accessibility services. I think this can be a starting point:
https://github.com/KDE/kdeconnect-android/tree/master/src/org/kde/kdeconnect/Plugins/MouseReceiverPlugin
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD7N56T6RSIHBUVDMHUD4ILTPDUQFANCNFSM4GHTPJTA>
.
|
came here to say this exact thing #189 |
might have made some progress #1184 |
Networking is not the issue, the barrier protocol is nearly identical to synergy. Two years ago, I did the necessary change here: https://github.com/dadosch/synergy-android-7 It was just a small adjustement in the packets. However, encryption is not implemented. As you can see, I removed the old injection code a few days ago. What is now needed is to implement the cursor movement and key input using the accessibility service, just like kdeconnect did. Then it would be possible to control an android phone using barrier, but not controlling a pc running barrier using the phone. (But I think the main use case is the first one) |
Ah ok so forwarding the x11 over ssh to something like :DISPLAY0 is irrelevant, you've basically taken care of the data transfer with a small protocol shim, as I understand. The work is in implementing the accessibility features, allowing cursors movement. Agreed I only want to use my desktop mouse on computer, vice versa can use vnc viewer. Security is important but I think it's fairly safe to assume a LAN will not allow port ranges outside 80 etc to access from outside by default, would be difficult to hack. |
Thanks for the response! I wish I knew more, not that this is mission critical, just a fun idea. |
Willing to work on the app for barrier |
I have worked on a project in which I did touch injections using Accessibility service in android. Willing to have a discussion on building app for barrier to share mouse and keyboard |
I'm on board too. I have the next few months free and have some android Dev
experience
…On Sat, Jun 12, 2021, 10:56 Greg Palaci ***@***.***> wrote:
I don't have any java experience or I'd jump on board with you @jayesh83
<https://github.com/jayesh83>
maybe @dadosch <https://github.com/dadosch> has some starting points for
you if you have the time? :P
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUBDU5A6XKZO3BWICR67SLTSNYTPANCNFSM4GHTPJTA>
.
|
@gregpalaci @dadosch @RaghavRao Alright guys then. No issues let's give it a shot. I'm having my final year college exam from 15 till 16. Two days. After that I can devote myself to this project. |
Nice :) I'm quite busy at the moment, but will contribute whenever I find the time. I see two possibilities: Use the base from synergy (https://github.com/dadosch/synergy-android-7), which would mean we can focus on functionality, but there is a ton of legacy and even unused code in there. Also most stuff hasn't been touched in years and Android has changed quite a lot since then. The alternative would be to start from scratch with everything and at most only copy single files (if the license matches of course) |
Yup you're right @dadosch We'll start from scratch as android has changed alot from then. though we'll use any code required from synergy-android-7. but we must start from scratch. |
Be aware that Barrier no longer appears to have active development, so expect stagnation on our end, but you're more than welcome to work on an Android app regardless.
…On Sun, Jun 13, 2021, at 4:16 AM, Jayesh wrote:
Yup you're right @dadosch <https://github.com/dadosch> We'll start from
scratch as android has changed alot from then. though we'll use any
code required from synergy-android-7. but we must start from scratch.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#189 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAKF2QHAYEC4BCIMJBQFZ3LTSQPINANCNFSM4GHTPJTA>.
--
Kind regards,
--
dom rodriguez (shymega)
|
Sure |
Somebody create empty android studio project and push here so that any one willing to work can clone and starting working on their on part. Just to initiate barrier_android work I had create an empty android studio project and tried pushing on opening PR to my fork but couldn't do "can't push no history match" some error was showing (refer ss for error) so anyone have idea about initiating android work by creating new branch here would help. |
Pointers to work for barrier android
::Implementation::
As I have worked on same kind of remote touch injection project I can work on touch injection part. Once I have a msg (ACTION_DOWN x y) I can perform touch leave this part on me. but first we need a way to get this message (click message) from server. |
@jayesh83 I think it would make much sense to do the android development in a separate repo, with issues and a discussion tab. This way, we can develop without much friction, but it can still be merged here as a separate branch later if needed. I created https://github.com/dadosch/barrier-android, so feel free to open a PR towards that :) |
Oh yes it would absolutely make sense. We'll initiate work here now |
How is this possible? I have not found any information or tutorial that explains this. |
@capellan2000 in
|
Now I understand. Thanks for answering this request! |
While this is true, this solution is still pretty inconsistent, since the mouse almost never shows on my screen while using deskdock (almost never since it randomly appeared once, only for disappearing after I rebooted my PC) and it's really unusable without the cursor |
so, I was fidgeting with the app after some good time I had it installed and it didn't show the cursor, and I found out that the app or android automatically switches the accessibility settings for the app that regard the cursor off, and if you manually turn it on it works! hope this can be helpful |
How did you manage to turn it on manually? I was also able to connect with the synergy app and use my android tablet as a client, but the cursor does not show even if the log on the server tells that the cursor has moved to the client's screen. |
Moving this is to a discussion, better suited to IMHO. I will also create a tracker issue for progress - recommendation is to use discussion for design, and tracker issue for development progress. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
There seems to be an Android client for Synergy floating around (https://github.com/symless/synergy-android-7). I tried connecting to Barrier (and Synergy 1.10 Pro before I switched to Barrier) and I get this:
[2018-12-01T07:18:05] NOTE: accepted client connection
but nothing more.
This is probably too time-intensive to incorporate but would be nice to have if it's easy to integrate into the project linked above.
Thanks for making an awesome product!
The text was updated successfully, but these errors were encountered: