• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root rooted power users, this is for you

novox77

Leeeroy Jennnkinnns!
Jul 7, 2010
3,964
3,257
If you don't use adb shell much, disregard this post.

For the rest of you, this is a quick procedure that allows you to terminal to your phone wirelessly from anywhere on the Internet.

First, you need a SSH daemon. There's an app for that: QuickSSHd on the market. It can be set to keep your phone awake (screen dimmed) so your connection is preserved and remains fast.

Next, you need a way to map your ever-changing phone IP address to a hostname. There's an app for that. It's called DynDNS. You may have used this service for your home computer that has a dynamic IP address. This app will communicate with the DynDNS servers about IP address changes. The TTL for the DNS mapping is < 1min, which is awesome, and there doesn't appear to be any limits on how often you update the IP. You can give your phone a fixed domain name like my1337evo.dyndns.org and use that to communicate with your phone permantly.

Once you have this set up, you can set up a web server, FTP server, or whatever you want on your phone, and people can access it easily with that domain name. Optionally, you may want to install bash or a linux shell of your choice. This will give you additional conveniences like tab completion and text coloring, et. al., and will make your terminal render better with terminal software like PuTTY.

Speaking of PuTTY, that's what you'll use to SSH into your phone. That's a free download for your computer. For transferring files wirelessly to your phone, you can download WinSCP, also a free product. You can use this to move files anywhere on your phone, not just your SD card. Google these to download them.

This setup requires a fully rooted phone (NAND unlocked), specifically the ability to remount the system read/write with Android fully loaded.

This setup has been a godsend for me. Now I can administrate my phone while it's still in my pocket. No need to USB tether and adb in. Just another aspect of rooting your phone in case you're sick of just flashing ROMs all the time.
 
The idea was to emulate a linux box and ditch adb entirely. Adb shell on a windows box cmd.exe window sucks, and transferring files via adb push/pull sucks too. My setup above allows you to use the typical progs that linux sysadmins are used to using. And the dyndns allows you to set up any daemon and reliably access them from remote. This is way more than wireless adb.
 
Upvote 0
can i putty with android the same as i could on my pre? i used putty to delete sprintware off of it and to write patches in. i know theres no need for quilt on android because everything seems to be hacked rom based, which is fine, but i dont want to wipe phone and redownload everything just to delete a few apps i dont want. would rather shhh in and delete them manually. thanks.
 
Upvote 0
can i putty with android the same as i could on my pre? i used putty to delete sprintware off of it and to write patches in. i know theres no need for quilt on android because everything seems to be hacked rom based, which is fine, but i dont want to wipe phone and redownload everything just to delete a few apps i dont want. would rather shhh in and delete them manually. thanks.

Yes, what I described in the OP allows you to putty (or your SSH client of choice) in to your rooted phone wirelessly. As long as the phone has a data connection of any kind, you will be able to ssh in from anywhere.

And because that's how I now access my phone, I decided to install bash (took the existing sh symlink and pointed it to bash) so that I can have syntax highlighting, tab completion, and better terminal rendering. I can actually use vi (impossible with cmd.exe via adb due to windows' failure to render the terminal escape codes) to edit files directly on the phone.

For transferring files to my phone, I use WinSCP. The QuickSSH daemon automatically allows support for SCP. Again, I can do this wirelessly from any computer with internet.

I recommend anyone with unix experience to set this up on their android phone.
 
  • Like
Reactions: redninja
Upvote 0
Yes, what I described in the OP allows you to putty (or your SSH client of choice) in to your rooted phone wirelessly. As long as the phone has a data connection of any kind, you will be able to ssh in from anywhere.

And because that's how I now access my phone, I decided to install bash (took the existing sh symlink and pointed it to bash) so that I can have syntax highlighting, tab completion, and better terminal rendering. I can actually use vi (impossible with cmd.exe via adb due to windows' failure to render the terminal escape codes) to edit files directly on the phone.

For transferring files to my phone, I use WinSCP. The QuickSSH daemon automatically allows support for SCP. Again, I can do this wirelessly from any computer with internet.

I recommend anyone with unix experience to set this up on their android phone.


thanks for reply, i'll read up on android and its folder structure. Pretty new to it, but on my pre i learned basic linux stuff, back before the ease of preware was around. I'm in no way a hacker or coder, but pushed my way through using putty,vi, and winscp alot on it, with never a problem,and it was well worth the reading and learning time.
 
Upvote 0
Wow, I didn't know this thread existed, but it's almost exactly what I do. It's an excellent setup. I use it with both Quicksshd as was suggested, and also something called PAW server. With that combination (and dyndns) you can administrate anything. Props to novox77 for getting the word out there (even if this is several months old).

Lafcadio, to answer your question - yes, both dyndns and quicksshd can be configured to start at boot. Dyndns will just pick up whatever it was set to at shutdown. If it was on, it stays on. If it was off, it stays off. Quicksshd has a setting to start at boot. If you're going to try this out, I recommend you take a look at PAW server as well.
 
Upvote 0
Secure Shell - Wikipedia, the free encyclopedia
QuickSSHd - Android app on AppBrain
PuTTY: a free telnet/ssh client

Domain Name System - Wikipedia, the free encyclopedia
Dynamic DNS - Wikipedia, the free encyclopedia
DynDNS - Android app on AppBrain

Secure copy - Wikipedia, the free encyclopedia
WinSCP :: Free SFTP and FTP client for Windows

Basically, if you don't already have/don't want to set up adb to use a shell, and you want to remotely use a shell, this is a great setup. You don't have to connect it via usb (yes, I know there are wireless adb solutions), but this has the added benefit of allowing you to connect from anywhere, even if you don't have your phone with you.

The part I use in addition to this is PAW server:

PAW Server for Android - Android app on AppBrain

It's basically a way of remotely controlling your phone through a browser.
 
Upvote 0
Well, if you mean the exact reverse (use your phone as an ssh client), this is the best (only?) option:

ConnectBot - Android app on AppBrain

If you need to set up a VPN, there are ways of doing that too. You can also set up port forwarding without a VPN, but be careful doing that sort of thing :). No need to open your network to the whole world. The same concepts can apply though, using dyndns if you don't want to pay for a domain name. You need to use it when connecting to your phone because your IP address constantly changes.

There are also a host of remote desktop clients for Android on the market. I'm sure you can search for them easily enough.
 
Upvote 0
yeah I will prolly hit you up in pm's when I really get into it.

I know one major diffence in what we use for work vs. phone and home stuff is the static ip

I would like to have something similar to what we use at work....basically vpn ...our displays show what is running on a server back at the main office.

I want to be able to do that with my laptop to my home puter etc but really haven't messed with it at all yet.
 
Upvote 0
Another benefit of sshd vs wireless adb is that ssh is encrypted. I think it's a pretty bad idea to open up adb to your wireless connections.

True. That kind of depends on how paranoid you are, though. If you know your wireless network is secure, then don't worry about it *that* much. Of course, this implies you know what you're doing, and you're being smart about it. That being said, sshd is still easier and gives you more options, so I do agree with you.
 
Upvote 0
you guys are speaking jibberish. I don't like it.

what ever happened to novox77 anyway????????


I have been resurrected along with this thread :)

Actually, if you can believe it, I got busy with work and put aside my Evo tinkering. I haven't done any tweaking since 3.29 came out. And as I type this, I'm restoring apps on a freshly flashed 3.70. Looks like the 2 recovery images finally got some updates! So... getting caught back up, and I am rusty!

Which is why I'm back here reading up on what's been happening. Looks like there's 2 new ROMs out that I'm interested in trying: Myns and Miui.

Anyway, back on topic: glad to see that this thread gets resurrected every once in a while. It didn't get a lot of attention when I first posted about it, but yeah, I like to think of my Evo as my portable linux box :) And like I've always said, there's so much more to rooting than just flashing ROMs.
 
  • Like
Reactions: akazabam and Mr. Ed
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones