rooted power users, this is for you


Last Updated:

  1. novox77

    novox77 Leeeroy Jennnkinnns! VIP Member This Topic's Starter

    Joined:
    Jul 7, 2010
    Messages:
    3,965
    Likes Received:
    3,256
    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.
     

    Advertisement
  2. uniquenameEVO

    uniquenameEVO Well-Known Member

    Joined:
    Jun 4, 2010
    Messages:
    649
    Likes Received:
    103
    Or, assuming you don't need to administer your phone from across the planet, search the market for adbWireless.

    ADB connection over wifi. Still, cool work OP.
     
  3. novox77

    novox77 Leeeroy Jennnkinnns! VIP Member This Topic's Starter

    Joined:
    Jul 7, 2010
    Messages:
    3,965
    Likes Received:
    3,256
    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.
     
  4. uniquenameEVO

    uniquenameEVO Well-Known Member

    Joined:
    Jun 4, 2010
    Messages:
    649
    Likes Received:
    103
    That it is. It is also way more than 99% of root users can handle so I offered another option :)

    Yours is more complex with a far more intricate list of options available...but most of them are pretty hardcore for the above average user.
     
  5. redninja

    redninja Well-Known Member

    Joined:
    Jun 9, 2010
    Messages:
    89
    Likes Received:
    10
    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.
     
  6. novox77

    novox77 Leeeroy Jennnkinnns! VIP Member This Topic's Starter

    Joined:
    Jul 7, 2010
    Messages:
    3,965
    Likes Received:
    3,256
    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.
     
    redninja likes this.
  7. redninja

    redninja Well-Known Member

    Joined:
    Jun 9, 2010
    Messages:
    89
    Likes Received:
    10

    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.
     
  8. Lafcadio

    Lafcadio Member

    Joined:
    Nov 17, 2010
    Messages:
    18
    Likes Received:
    0
    Can anybody comment on the battery usage of this approach?

    Also, do dyndns and sshd both restart automatically if the phone is rebooted?

    Thanks.
     
  9. akazabam

    akazabam Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    4,418
    Likes Received:
    1,387
    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.
     
  10. Lafcadio

    Lafcadio Member

    Joined:
    Nov 17, 2010
    Messages:
    18
    Likes Received:
    0
    Thanks a lot, akazabam, I'll give it a shot.
     
  11. Mr. Ed

    Mr. Ed Well-Known Member

    Joined:
    Jun 27, 2010
    Messages:
    6,675
    Likes Received:
    1,464
    you guys are speaking jibberish. I don't like it.

    what ever happened to novox77 anyway????????
     
  12. akazabam

    akazabam Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    4,418
    Likes Received:
    1,387
    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.
     
  13. Mr. Ed

    Mr. Ed Well-Known Member

    Joined:
    Jun 27, 2010
    Messages:
    6,675
    Likes Received:
    1,464
    that is really awesome. I have been trying to learn more about this and the reverse..accessing my computer from the phone, and accessing the computer network at home from my laptop while I am at work. all new to me
     
  14. akazabam

    akazabam Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    4,418
    Likes Received:
    1,387
    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.
     
  15. Mr. Ed

    Mr. Ed Well-Known Member

    Joined:
    Jun 27, 2010
    Messages:
    6,675
    Likes Received:
    1,464
    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.
     
  16. akazabam

    akazabam Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    4,418
    Likes Received:
    1,387
    Sure, hit me up whenever. That would be an interesting exercise for me too. I've done stuff like it in the past, but I've never had to throw a phone in the mix. Connecting to the phone as described in this thread, though, is quite easy. I highly recommend it.
     
  17. Lafcadio

    Lafcadio Member

    Joined:
    Nov 17, 2010
    Messages:
    18
    Likes Received:
    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.
     
  18. akazabam

    akazabam Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    4,418
    Likes Received:
    1,387
    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.
     
  19. novox77

    novox77 Leeeroy Jennnkinnns! VIP Member This Topic's Starter

    Joined:
    Jul 7, 2010
    Messages:
    3,965
    Likes Received:
    3,256

    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.
     
    akazabam and Mr. Ed like this.
  20. akazabam

    akazabam Well-Known Member

    Joined:
    Jun 7, 2010
    Messages:
    4,418
    Likes Received:
    1,387
    Ain't that the truth.
     

Share This Page

Loading...