symless / synergy

Synergy lets you share one mouse and keyboard between multiple computers on Windows, macOS and Linux.
https://symless.com/synergy
GNU General Public License v2.0
10.31k stars 3.65k forks source link

Client application for Android (without being rooted/hacked) #531

Closed nbolton closed 6 years ago

nbolton commented 9 years ago

Imported issue:

Related programs: Share KM (Android app)

What is the problem you wish to solve?
Control the Android interface via input-device on network-connected host

What is your new feature idea?
Port or build of the Synergy client (synergyc) for the Android OS

Is there already a less convenient way?
No; not that I'm aware of

How useful would the feature be to others?
Extremely.
Will vastly improve Android's appeal & versatility.

It would be extremely valuable to be able to control the Android mobile from HID's; definitely keyboard, mouse would be nice.
Taking hands off keyboad & mouse (which may already be controlling numerous systems), to "fiddle" with mobile device or Android MID disrupts productivity flow/pace.
Entering values, such as strong passwords on small mobiles with compound keyboard is also overly time-consuming, that could be done quickly & easily with a standard keyboard.

Since Android is also POSIX-based (Linux kernel derivative), it would seem "simple" to rebuild the source the the new architecture, but unfortunately this is beyond my own skill-set.

[NOTE: this may be a possible duplicate of an existing thread @ "https://code.google.com/p/synergy-plus/issues/detail?id=57":https://code.google.com/p/synergy-plus/issues/detail?id=57 ]

nbolton commented 9 years ago

-Missing comment-

nbolton commented 9 years ago

We'll accept this feature request on the condition that only the client will be ported; i.e. so that you can control your Android phone from your PC (to bypass the need for the touch screen). See also issue #google:3 .

nbolton commented 9 years ago

Yes please. I'd love to control my iPad from my pc mouse and kb.

nbolton commented 9 years ago

Controlling the mobile from regular keyboard/mouse would be awesome, especially for typing out text messages on the phone and for debugging applications during development.

nbolton commented 9 years ago

You may want to look at "http://code.google.com/p/androidscreencast/":http://code.google.com/p/androidscreencast/ for code inspiration, this currently uses a vnc-style connection through the ADB USB Debugging feature. This would perhaps be similar in execution for Synergy+

Also, it should be noted that official android devices do not (afaik) have support for cursor driven devices, however, phones rooted with CyanogenMod 6.0 do (proved by bluetooth mouse support).

nbolton commented 9 years ago

I just wanted to bump this, this would be an awesome addition. I use synergy daily and to be able to include my android phone into the mix would be a truely welcome feature.

nbolton commented 9 years ago

I've been working on a Java port of the client for a few weeks now. I've set up a sourceforge project -- I'll upload the code later today when I get home. Anyone is welcome to join.

My plan was to create a Java client that'll work with Windows/Linux and then implement the Android specific features. The code is pretty rough right now but I basically have a Java client semi-working right now. Mouse movements work and basic keystrokes work. Anyone's welcome to join and the design is relatively new so... go screw around, change the design.

If anyone has Android experience that would be very helpful -- I don't even own an Android phone yet.

[[https://sourceforge.net/projects/synergyandroid/]]

nbolton commented 9 years ago

I've made some progress on this and I'm about ready to test with a real device. I think to inject keystrokes and mouse movements I'm going to need access to /dev/input/uinput and I think the only way to achieve this is with the Cyanogen mod.

However, I do not currently have an Android phone and I can't seem to get Cyanogen 6 working on the emulator. I've looked and looked online but I can't really find anything. Can anyone help me out here? If I can't get it to work I guess my only other option is to buy a real phone. Does anyone have an old G1 lying around collecting dust that they would like to sell to me?

nbolton commented 9 years ago

I am not sure this helps, but if you have an apk, I would be willing to test it.

Thanks again for the work, synergy on my android would be huge!

Cheers

nbolton commented 9 years ago

I too would be glad to do any testing for you as well. I have an Evo4G running on 2.2

nbolton commented 9 years ago

Cool thanks. I'll keep you guys in mind for testing. I recently acquired a G1 phone for cheap so I'm back to work. I have a single keystroke working on the client now. I'll be trying out the mouse pointer later tonight.

On that note, I've searched and searched but it seems the only option for an Android client is using a mod that exposes /dev/uinput (I'm using the Cyanogen Mod). I wish it didn't come down to that...

nbolton commented 9 years ago

I don't mind having to run a ROM, in fact since I got my G1, and now my N1, its pretty much been ROM'd 95%% of the time. As far as I understand it, even if you want to use a bluetooth kb you need HID, which just isn't exposed in stock Android.

Thanks for the work and please let me(us? =)) know when you have an apk we can test!

nbolton commented 9 years ago

Okay I need some help testing. I've put an apk up at https://sourceforge.net/projects/synergyandroid/. I damn near gave up on this... I'm running a crappy G1 with Cyanogen 6.1 and apparently it really doesn't have enough RAM to run background apps. It took me forever to figure out some background process was killing my app because of low memory parameters. So if you're running a G1 have a look at http://forum.xda-developers.com/showthread.php?p=5442369#post5442369.

Anyway, only space a-z, numbers, and enter are working. Let me know if it crashes when you backgroud the app. That's what was happening to me but now I'm convinced it's my G1's small RAM size.

nbolton commented 9 years ago

for me its ok, been running modded ROMS from near day one. Would be great if
not needed, but not an issue for me.

John H

On Fri, Oct 29, 2010 at 1:46 PM, The Synergy Project <
redmine@synergy-foss.org> wrote:

Issue #redmine:572 has been updated by Shaun Patterson.

Cool thanks. I'll keep you guys in mind for testing. I recently acquired a
G1 phone for cheap so I'm back to work. I have a single keystroke working on
the client now. I'll be trying out the mouse pointer later tonight.

On that note, I've searched and searched but it seems the only option for
an Android client is using a mod that exposes /dev/uinput (I'm using the
Cyanogen Mod). I wish it didn't come down to that...


Feature #572: Client application for Androidhttp://synergy-foss.org/pm/issues/572

  • Author: Issue Importer
  • Status: Accepted
  • Priority: Low
  • Assigned to:
  • Category:
  • Target version: 1.8.0
  • Legacy ID: gc-533
  • Found in: 1.3.5
  • Platform:

Google user: freakalad

What is the problem you wish to solve?
Control the Android interface via input-device on network-connected host

What is your new feature idea?
Port or build of the Synergy client (synergyc) for the Android OS

Is there already a less convenient way?
No; not that I'm aware of

How useful would the feature be to others?
Extremely.
Will vastly improve Android's appeal & versatility.

It would be extremely valuable to be able to control the Android mobile
from HID's; definitely keyboard, mouse would be nice.
Taking hands off keyboad & mouse (which may already be controlling numerous
systems), to "fiddle" with mobile device or Android MID disrupts
productivity flow/pace.
Entering values, such as strong passwords on small mobiles with compound
keyboard is also overly time-consuming, that could be done quickly & easily
with a standard keyboard.

Since Android is also POSIX-based (Linux kernel derivative), it would seem
"simple" to rebuild the source the the new architecture, but unfortunately
this is beyond my own skill-set.

[NOTE: this may be a possible duplicate of an existing thread @

https://code.google.com/p/synergy-plus/issues/detail?id=57 ]

To change your notification preferences, visit:
http://www.synergy-foss.org/pm/my/account

nbolton commented 9 years ago

Okay, for me the client says "Connected" but the server never finds the client. My server is a 64 bit computer running 1.3.4.

nbolton commented 9 years ago

Yeah it always says Connected -- for now. Make sure you set up a client name on your server with the same name as the client name you filled in on the screen. Also make sure you can ping the server. If that doesn't work and you have the android sdk. Run "adb logcat" run synergy and try to connect. Maybe something is crashing

nbolton commented 9 years ago

It pings just fine. I'll try to get the log info tonight.

nbolton commented 9 years ago

Sorry I made a stupid mistake and hardcoded my Server's ip address into the connect function. I've uploaded a new version that should work...

nbolton commented 9 years ago

Just tested, mouse didn't "seem" to work, keyboard did though...except my space bar worked as a backspace.

Excellent progress though!

nbolton commented 9 years ago

It does work for me, but you can't actually see the mouse. I also had the space acting as a backspace, and In order to get the mouse and keyboard to work again on my server, I had to power down my phone.

nbolton commented 9 years ago

Okay, I was able to test it on my beta server today and it did not hold my keyboard and mouse hostage, so that is much better. Also, it seems ANY non alphanumeric key is treated like a backspace (even things like shift)

Very well done. This has me very excited. Right now having a third "computer" in my lineup at work is pretty cool even if it does not work perfectly.

nbolton commented 9 years ago

Interesting. The mouse is probably held hostage because I hardcoded the screen to my G1s size. Strange that alpha keys don't work you guys -- they seem to be working for me. I'll take a look into this tonight. One more thing - how was the mouse "speed"? On my G1 it's very sluggish but I don't think I can really do anything about that. Hopefully it's much faster on a more modern phone

nbolton commented 9 years ago

Alpha keys are working just fine. Anything NOT alpha numeric acts as a backspace. This includes function keys (like shift, tab etc) and even includes number pad keys.

The mouse seems to be fast, but I can't actually see it. I can only see any effects it is causing on the screen. It would be nice if there was a cursor of some sort we could see. Also click/click drag do not seem to work either.

Thanks again for doing this. If I can be of any further assistance, please let me know.

nbolton commented 9 years ago

New version for testing available on Sourceforge. Mouse movements should work a bit better this time. Space key now works.

nbolton commented 9 years ago

Once again, great progress! I am glad the space now works. The mouse seems to be about the same as it was before.

quite a number of times while I was typing, it acted like a key got stuck, and repeated it a dozen or so times

I'm looking forward to the next iteration.

nbolton commented 9 years ago

Hi Guys - been using synergy for years. Absolutely sware by it. I'm glad to see there is a move to add the Android OS to the list of clients. I have my HTC Evo docked during the work day right next to all my other screens and have often wished I could just roll the mouse over to the droid and use it and the keyboard to text, answer the phone etc. Seems like a natural. I would love to help so if you need more testers I'm in.

nbolton commented 9 years ago

Guys this all sounds great and can't wait for the completed product.
There's been better phones out now with more ram and processing power (AKA Motorola Atrix)
I have it rooted and with the HDMI webtop modification which turns it into a computer.
Would be willing to test any beta or similar client as it would run great with the monitor/webtop.

Let me know if anyone wants to test the client on an Atrix. :)

nbolton commented 9 years ago

Hey, has there been any progress on this? any word on whether the device needs to be rooted?

nbolton commented 9 years ago

+1 for this! I would find this a wonderful addition.

nbolton commented 9 years ago

Please this will be a sweet add on...

nbolton commented 9 years ago

Slatted for release in 1.4.11? AWESOME!!! I know everyone in my office here is looking forward to this feature!

nbolton commented 9 years ago

OH my gosh, this would be sick nasty awesome! How can I get updated when this is released???!!

nbolton commented 9 years ago

Another +1. I almost always have an Asus Transformer Prime sitting next to my laptop. It already has mouse and keyboard support though it's 'transformer' dock and it will be a killer to be able to use Synergy to unify yet another device.

Keep up the awesome work!

nbolton commented 9 years ago

I would love for a native android synergy client. I use Synergy everyday at work between my Ubuntu desktop development machine, my windows laptop. I would love to be able to just mouse over to my Nexus 7 (or soon Note 2) to text/im/change music.

As a developer myself I totally understand the limitations of the system though. Perhaps this would require cooperation between Google and Synergy to accomplish as I can't see an easy way of it working without root access.

nbolton commented 9 years ago

I'd love to have this as well. I use my Ubuntu desktop with a Macbook air and would like to share my keyboard/mouse on an Android tablet mounted next to the monitor. I have a gazillion ebooks on different types of readers (kindle, google play etc) and would like to work on projects while referencing docs on the tablet. Using a mouse/keyboard to scroll up/down will be very convenient.

nbolton commented 9 years ago

This would definitely be a killer app. I wonder if it would be possible to add Synergy as an input method like the Android Keyboard/Swype/Swiftkey in order to get access to all the forms of input on the system. This would inform the user that the data "could" be logged, but would allow for them to turn it on/off as an input method at will, and without seeing the screen someone trying to "take over" remotely wouldn't get far.

nbolton commented 9 years ago

I'd welcome this port. There are tons of appliances on Android basis, that would benefit from this, like for example tablets.

Another example is the Motorola Droid 4 with a Lapdock or in Webdock mode connected to a HD Dock. In both cases, there is already a mouse cursor displayed and they are used like a normal desktop or laptop.

nbolton commented 9 years ago

Me to wish the project to be full-filled for Android, it will take long time for me to learn how to compile linux soft for android. Is there anybody out whos reading. I am using to mices.

nbolton commented 9 years ago

How's this coming along? I'd be willing to help build this if necessary.

nbolton commented 9 years ago

Willing to assist as well, I've been developing for Android for quite a while now - can we start as a community developing this?

nbolton commented 9 years ago

Nick said earlier "We'll accept this feature request on the condition that only the client will be ported; i.e. so that you can control your Android phone from your PC (to bypass the need for the touch screen)."

If this project for Android is pursued, I STRONGLY RECOMMEND the developers include support for Google TV. This makes perfect sense, because if the Synergy for Android app is purely client only, touch input within the app can be limited (if not removed altogether), just as Nick suggested.

To allow this to work with Google TV, simply edit the Android Manifest. See here: https://developers.google.com/tv/android/docs/gtv_android

The ability to control my TV (as well as my tablet) from my existing keyboard and mouse would be incredible.

Keep up the good work guys!

nbolton commented 9 years ago

Donated just to vote for this feature.

nbolton commented 9 years ago

For what its worth I have an Android client up on Sourceforge. It was a quick hack and Ive lost interest. Maybe someone would like to continue where i left off. The main problem with Android is that your phone needs to be rooted... Not a huge deal but a barrier nonetheless to some.

nbolton commented 9 years ago

specifically casting vote for Google TV support.

p.s. if I were stranded on desert island, synergy would be the only app I would bring.

nbolton commented 9 years ago

I would absolutely love to see this move forward as well. donated just to voice my support, too.

nbolton commented 9 years ago

The alpha on Sourceforge seems to be running well enough - I just installed it on my rooted Galaxy Nexus running the "Shiny" (almost completely unaltered from stock) 4.2.1 ROM and it works, albeit with some bugs (the cursor frequently "hits the edge" in the middle of the screen). I'd gauge it as complete enough to include in the main project tree.

nbolton commented 9 years ago

there are so many free apps that do this for you...

nbolton commented 9 years ago

So is it looking likely that we'll see at least keyboard input on non rooted, stock Android devices? Does the current code work on non rooted devices? It's not clear reading through the comments.

nbolton commented 9 years ago

@Huy - there are some apps that do similar functions, but none (AFAIK) that are: 1) Open Source 2) Support Multiple OS's 3) Small overhead If you know of any, I'd be interested to know for reference.

@Dom - it may be possible to do it on non-rooted devices, but I think it might be tricky to hook into low-level device functions without root, or some other escalated privilege (maybe developer mode?)

nbolton commented 9 years ago

I just gave the latest alpha from sourceforge a try and its working okay so far. The application has force closed twice but started back up without issue and the cursor is a little choppy (which may be caused by my wifi at work as I've had a similar experience on my laptop). But besides that it works well.

I cant seem to find a way to send a stack trace or any debug info on the force closes or I would.

I'm using a Galaxy Note 2 with a build of Paranoid Android (t0lte).

By the way thanks for the effort on this project, it is very much appreciated! And having this work on Android as well as Linux and Windows, I have one of each device in front of me, is fantastic!