So adb shell
has an annoying bug where it doesn't realize that your graphical terminal app is larger than 80x24, so when you try to run any kind of full-screen console apps like vi or emacs (or any ncurses app), it does not take up the full screen, only a small portion of it. Is there a way to fix this easily?
UPDATE (Feb. 2015): By now, you can just use "phablet-shell". No need to fiddle around with self built scripts any more. That said, if you want to, they should still work.
What I usually do is to use ssh instead of adb. That one configures the terminal properly (besides setting many other things up better than adb does).
Put this into your ~/.bash_aliases (on the host computer, not the device)
and close/reopen the terminal window.
Now you can just do a "sd" (short for ssh device) and you'll be logged in as user phablet on the phone, with a properly configured terminal and a properly set up user environment.
It's not a bug in the terminal - the default setup of the shell on android is just not configured to handle changing window sizes.
After you resize the actual terminal window, use the
resize
command - then use your fullscreen program.Building off of mzanetti's answer above, I've expanded it to have a couple advantages that I'm now using regularly:
It remembers your credentials so you don't have to type your password every time
It copies your bash config from the host to the device so you can use all your favorite aliases (and custom prompt config!)
When I plan to be in {adb shell} for any length of time, I usually start off with
I use it regularly on both rooted and un-rooted devices.
Acknowledging that it's a manual command everytime you start a shell (and not automatic like the mzanetti/robru solution) it's simple and doesn't require a change to using SSH.