Installing the nano editor on Android with ROOT


This guide will describe the steps needed to install nano and setup ssh to utilize nano on your Android device.

GNU nano is a text editor for Unix-like computing systems or operating environments using a command line interface. It emulates the Pico text editor, part of the Pine email client, and also provides additional functionality. Unlike Pico, nano is licensed under the GNU General Public License(GPL). Released as free software by Chris Allegretta in 1999, nano became part of the GNU Project in 2001.


Download and extract the zip.
copy androidforlinux directory to your android phones memory card. [Example: /sdcard/Download]
Follow these steps using a terminal downloadeded from the playstore or adb shell.

  1. cp /sdcard/Download/nanoforandroid/etc/profile /system/etc
  2. cp -r /sdcard/Download/nanoforandroid/etc/terminfo /system/etc
  3. cp /sdcard/Download/nanoforandroid/xbin/nano /system/xbin

Now we will install SimpleSSHD from the google playstore.

  1. Open the Google Play Store on your Android device
  2. Search for SimpleSSHD or click the link in this article.
  3. Tap Install
  4. Allow the installation to complete

You will need to start SimpleSSHD and make note of the IP listed and connect to that IP and the default port of 2222.
SSH into the android phone using this as an example: ssh IP -p 2222
You will be prompted for a password, the password is automatically generated and will be displayed on the phone.
Obtain superuser (root) access in the terminal using this command: su

Access the Android device from Windows or Linux terminal with this command: adb shell
Obtain superuser (root) access in the terminal using this command: su
Copy and paste this command in the terminal and press enter: export TERMINFO=/system/etc/terminfo;export TERM=linux

You will need to modify the initial command on your terminal emulator so that terminfo variables are correctly exported at startup.
Use: ;export TERMINFO=/system/etc/terminfo;export TERM=linux;
Remember to add the semicolon (;) at the beginning and end.

** Simply type nano to open the nano editor with this command: nano
** Side Note, the popular vi editor is included with BusyBox installation on rooted devices.