mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #189] Android App? #152
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RaghavRao on GitHub (Dec 1, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/189
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!
@BitFros7y commented on GitHub (Apr 5, 2019):
Any progress on this? It would be very useful if you are developing and/or testing on live android device...
@AdrianKoshka commented on GitHub (Apr 5, 2019):
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.
@RaghavRao commented on GitHub (Apr 9, 2019):
I'm willing to take a crack at it, if you can give me pointers.
@AdrianKoshka commented on GitHub (Apr 9, 2019):
I sadly can't give you any pointers really.
@dadosch commented on GitHub (Jun 24, 2019):
I built the app locally (had to do some updates to gradle etc). I get the following:
@nathaneltitane commented on GitHub (Sep 16, 2019):
@Genome36 might be able to help
@RaghavRao commented on GitHub (Sep 23, 2019):
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.
@mirh commented on GitHub (Sep 24, 2019):
You don't need root.
@RaghavRao commented on GitHub (Sep 24, 2019):
Could you link us to your fork with the updated grade?
On Mon, Jun 24, 2019, 09:15 dadosch notifications@github.com wrote:
@dadosch commented on GitHub (Sep 24, 2019):
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
2f05f239fcHowever, 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)
@dadosch commented on GitHub (Sep 24, 2019):
For testing, you need to run Barrier without "--enable-crypto".
Current state: No mouse shown on android phone, but events should be successfully received.
Keypress events succesfully received, but no keypress done. (I think you need to implement a soft keyboard here)
@dadosch commented on GitHub (Sep 25, 2019):
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.
@mirh commented on GitHub (Sep 26, 2019):
AFAIU the accessibility service can only interact with "accessible objects".
And I guess like it would have its security sense to just allow so much....
Root+adb (which can also wireless btw) seem the two most proper routes
@mister2d commented on GitHub (May 19, 2020):
Is there any traction on an Android application. It can be REALLY useful when I use Samsung Dex.
@shymega commented on GitHub (May 19, 2020):
Not officially. We have other pressing bugs and issues to catch up on, before even Android app development can be considered.. apologies.
@Kanteran commented on GitHub (May 21, 2020):
I will leave this here as reference: scrcpy
@ThibautVerron commented on GitHub (Dec 29, 2020):
DeskDock can be used as a bridge between barrier and android.
@baconicsynergy commented on GitHub (Apr 8, 2021):
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
@haivala commented on GitHub (Apr 21, 2021):
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
@dondell commented on GitHub (Apr 22, 2021):
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.
@dadosch commented on GitHub (May 23, 2021):
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.
@Kanteran commented on GitHub (May 23, 2021):
Also take a look at the scrcpy Project: https://github.com/Genymobile/scrcpy
On Sun, 23 May 2021, 13:56 dadosch, @.***> wrote:
@jswhisperer commented on GitHub (Jun 3, 2021):
came here to say this exact thing https://github.com/debauchee/barrier/issues/189?_pjax=%23js-repo-pjax-container#issuecomment-846551145
I reckon everything but the networking is done? but of course I'm not an expert.
keyboard, clipboard bi-directional, mouse, bi-directional, media controls all work
@jswhisperer commented on GitHub (Jun 3, 2021):
might have made some progress https://github.com/debauchee/barrier/issues/1184
@dadosch commented on GitHub (Jun 3, 2021):
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)
@jswhisperer commented on GitHub (Jun 3, 2021):
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.
@jswhisperer commented on GitHub (Jun 3, 2021):
Thanks for the response! I wish I knew more, not that this is mission critical, just a fun idea.
@jayesh83 commented on GitHub (Jun 12, 2021):
Willing to work on the app for barrier
@jayesh83 commented on GitHub (Jun 12, 2021):
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
@jswhisperer commented on GitHub (Jun 12, 2021):
I don't have any java experience or I'd jump on board with you @jayesh83
maybe @dadosch has some starting points for you if you have the time? :P
@RaghavRao commented on GitHub (Jun 12, 2021):
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:
@jayesh83 commented on GitHub (Jun 12, 2021):
@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.
@dadosch commented on GitHub (Jun 12, 2021):
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)
@jayesh83 commented on GitHub (Jun 13, 2021):
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.
@shymega commented on GitHub (Jun 13, 2021):
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:
--
Kind regards,
dom rodriguez (shymega)
@jayesh83 commented on GitHub (Jun 13, 2021):
Sure
@jayesh83 commented on GitHub (Jun 17, 2021):
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.
@jayesh83 commented on GitHub (Jun 17, 2021):
Pointers to work for barrier android
#1. First lets work on mouse clicks and movement
::Implementation::
Then listen for incoming pointer movement msgs from pc to phone and draw each msg in android client to depict mouse movement. msg could be of format (move x y) we'll parse that in android and draw pointer or move pointer from last location to this new location.
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.
@dadosch commented on GitHub (Jun 17, 2021):
@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 :)
@jayesh83 commented on GitHub (Jun 17, 2021):
Oh yes it would absolutely make sense. We'll initiate work here now
@capellan2000 commented on GitHub (Jun 21, 2021):
How is this possible? I have not found any information or tutorial that explains this.
@WillForan commented on GitHub (Jun 21, 2021):
@capellan2000 in
DeskDockServer_1.2.2.jar'sres/strings@capellan2000 commented on GitHub (Jun 21, 2021):
Now I understand. Thanks for answering this request!
@piovanId commented on GitHub (Aug 18, 2021):
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
@piovanId commented on GitHub (Aug 18, 2021):
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
@CrisSherban commented on GitHub (Oct 3, 2021):
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.
@shymega commented on GitHub (Oct 3, 2021):
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.