-
Notifications
You must be signed in to change notification settings - Fork 720
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 port #32
Comments
I've made some progress on this. We can now build When I run this
I'll investigate this next. |
That's fantastic! My guess is that your ioctl( STDIN_FILENO, TIOCGWINSZ, &window_size ) is somehow not getting a reasonable window size, perhaps because Android doesn't support that ioctl on ptys or the terminal emulator didn't set it? |
I was able to get past the s_height error by using stty to set rows and columns on the terminal. I can set MOSH_KEY and connect by IP and it seems to work pretty well! Now I just need to get IO::Pty installed on my non-rooted device. I got perl on there but CPAN needs File::Spec::Unix Any thoughts? Did I just duplicate work you already did quietly? |
That's great news! You didn't duplicate any work as far as I know. We have a pull request in the pipeline to replace that |
Cool. Note that this was via adb, I'm working on duplicating it in Terminal Emulator now. |
OK, stty isn't required in Terminal Emulator (https://play.google.com/store/apps/details?id=jackpal.androidterm) I wrote a wrapper script in bash since I couldn't be bothered to get perl working. As a prereq you'll need kbox (http://kevinboone.net/android_nonroot.html) or some equivalent set of utilities. CyanogenMod should come with everything needed. Here's the script: MOSH_HOST=$(echo $1 | cut -f2 -d@) Note that you'll need to install mosh-client in /data/local/bin/ (or change the script). The syntax is "mosh user@ip". On stock ROMs you'll have to use the IP, AFAIK, but on CM7 you should have DNS in the shell. Really all the hard work was your doing, I just kludged the last little bit, as I usually do ;-) |
Oh, and in case you were wondering: I switched back and forth between wifi and mobile data on my phone and the connection didn't drop! Huzzah! |
BTW I was running kbox_shell first and then running my mosh script, but if you don't want to do that (e.g. you're running cyanogenmod and don't need/want kbox, or you installed kbox but you want to skip the step of running kbox_shell first) you just need to add to the top of the script: export TERM=linux the terminfo file that comes with kbox is in $KBOX/etc/terminfo, e.g. if you install kbox in /data/local/kbox like I did, you'll add the following to the top of the script: export TERM=linux then you can just run terminal emulator or btep and run "mosh user@ip" directly from the default command prompt |
@keithw @kmcallister So what's next? Fork ConnectBot and/or IRSSI ConnectBot? BTW I did manage to get a crash out of it running irssi on a remote Linux host, with mosh running under BTEP, while I was stress testing it. I'll keep at it and see if I can reproduce it reliably, and post the error either here or as a new issue. |
Sure, I think forking ConnectBot is the way to go, but somebody who actually knows about Android development is probably more qualified to make that call. We should give the ConnectBot folks a courtesy heads-up. It looks to be Apache 2 so I think that will work. Excited to see so much (rapid!) progress on this! |
I'm sure the ConnectBot folks would be pretty happy about getting some added capability. What route would you want to go? Boot ConnectBot and run mosh locally? Or use mosh as a library through JNI method calls? |
Ideally we would be more tightly integrated (e.g. JNI method calls), because we would like to do things like freeze the STMClient state when the process is expelled and restore it (and reinitialize the UDP socket, perhaps from a different port number) when the user reloads us, with the connection intact. |
I'm trying to compile based on the instructions at https://github.com/kmcallister/mosh/blob/android/android/README.md. Building on Ubuntu 10.10 x64. Getting the following error. Any suggestions?
|
It's trying to build the ncurses library for Ada. o_O Should be easy enough to disable that; let me look into it. |
@mlevin2: I updated the branch; does this fix your problem? |
Much closer this time! It built fine but is having trouble on the install.
|
Oh, well, my primitive script |
Yeah, looks like it never got built. After the build script ends, no binary.
Full output of the build script is at http://dl.dropbox.com/u/570859/mosh-build.txt |
Oh, I see, the failure is in protobuf's
Anyway, we don't really need to run the protobuf test suite. Perhaps there's a way to stub it out. |
I have 2.3.0.
But isn't the script downloading a newer one (2.4.1)? Shouldn't it be using that one instead? |
The protobuf build runs some tests, which invoke the |
@kmcallister The build script I'm using for protobuf in Telesphoreo (an entirely cross-compiled ARM distribution for iOS) is as follows, which demonstrates how to easily bypass the protoc test suite with the stock distribution of protobuf (the pkg:* stuff is fairly boring boilerplate; the trick is in what is being passed to what makefile): pkg:setup
pkg:configure
cd src
make all-am
make install-am DESTDIR="${PKG_DEST}" |
If this ends up being a fork of connect bot, it would be very nice for me if it also integrated the changes in this fork of connectbot, which adds support for the keyboard dock on the Asus Transformer. |
What about the VX ConnectBot fork that adds remote file copying capabilities (via SCP)? |
Why is ConnectBot fragmented into all of these forks? Is there an upstream developer who will eventually merge these enhancements? |
@kmcallister Because the main developers haven't updated their source at all since December 2011. The original project seems to be dead. @mythmon Why does the keyboard dock require extra work? Doesn't it just hook into the normal Android input methods? |
@kmcallister, @ticky It is even worse with the officially released binary on Android Market, that is still from October 2010... @mythmon VX ConnectBot has a more intuitive way of switching keymap customizations to more suite certain devices, but no Asus Transformer support yet. |
I took kmcallister's android changes, the c++ replacement for the perl mosh script, and combined them with my mosh ipv6 branch and created a binary package. My android branch: https://github.com/ddrown/mosh/tree/android mosh binary, install via opkg-cl: http://dan.drown.org/android/ This binary is suitable for running under "adb shell" or "Android Terminal Emulator" (jackpal.androidterm) |
Where are we at on this? Anywhere close enough to package up and put in play? |
ddrown has a (beta) Android APK up here: http://dan.drown.org/android/mosh/ I'm sure he would love more testers! |
Im useing ddrowns binary via opkg-cl, works like a charm. Will try the apk as soon as setting a port is possible. |
Worked great on my S3 w/ ICS! Although I wish it were based on vx connectbot, it fixes a lot of nuances that irssi connectbot has. |
I would hope for vx connectbot aswell, I use it for the physical qwerty keyboard fixes on Xperia Pro, The keyboard is missing for example ctrl so vx connectbot has this fixed by remapping another key. I bet a lot of users wanting to have mosh also have alot of help from vx connectbot |
Get the hackers keyboard.
|
It doesnt help me with a physical keyboard right? isnt hackers keyboard virtual? or am I missing something? |
You are not, @kiranos, "Hacker's Keyboard" is a virtual keyboard and really of no use to your specific request. |
@kiranos VX ConnectBot also displays an on-screen Ctrl key if you tap on the left side. |
I have been working with ddrown's binary inside android term emulator but am having problems with the UTF-8 locale. Setting the default UTF-8 preference inside Android term doesn't help. Still get the error that the client-supplied environ is "US-ASCII." Those that have this working, any suggestions? |
Regarding this comment on the apk:
I think it would be nice to persist the session so that it outlives killing the service, or even device restarts/crashes! Otoh that might mean security issues. |
I've got the same problem like bpostlethwaite:
|
ddrown, your http://dan.drown.org/android/mosh/ works perfectly on my panasonic eluga. very nice, thank you! |
Just wanting to say a mosh fork of connect bot would be very handy indeed. I've never done any android development, but I'd be happy to do some testing on my Galaxy SII. |
To say the truth, a java client library would be the best way to go for Android & co. |
JuiceSSH beta supports mosh, for those who are interested - see https://plus.google.com/117449819357635567610 . It's also a very good SSH client, IMHO better than anything else previously available on Android. Have not tried the mosh support yet myself as I'm just trying out mosh for the first time right now, but saw this ticket on the site and figured some people might want to know. |
It would be great to get Keiths mosh patch for ConnectBot into VXConnectbot (http://connectbot.vx.sk/) - which seems to be the best maintained fork. |
Termux now has both a mosh-client and a mosh-server which can be installed with |
+1 Termux should be added alongside Juicessh on the main page. |
It looks like this was completed in mobile-shell/mobile-shell.github.io#39 |
It would be wonderful to have persistent remote-terminal sessions from an Android device. Theoretically the Mosh code should be compilable on Android and should be runnable from an existing GUI terminal emulator without needing to jailbreak.
The text was updated successfully, but these errors were encountered: