How to install Nano (terminal editor)

Step by Step Guides and Tutorials here. (older models)

How to install Nano (terminal editor)

Postby Kommander » January 30th, 2011, 5:47 am

For those of you who aren't a fan of using vi to edit files under terminal, here is a step by step How To for installing Nano and setting it up for use under Android Terminal Emulator.

----- This will probably void your warranty -----
If this damages your Tablet I am not responsible - I offer no warranty and absolve myself of all blame, this is done AT YOUR OWN RISK. If you don't understand any part(s) of this HowTo, don't know what nano is/is for or in any way feel uncomfortable using the terminal emulator, this HowTo is not for you!

Do not perform this if you want to be able to flash any original storage options updates with no further modifications - this does not effect comunity updates


Files

Nano for Android - http://www.mediafire.com/?t7pyi2sum1447m7
Terminfo Directory - http://www.mediafire.com/?a6bv1b0iv6vo2zo

Prerequisites

Rooted scroll - viewtopic.php?f=27&t=125
Android Terminal Emulator - Installed as part of Warpedflash's rooting HowTo above

Instructions

N.b. Where I've written Type "...." - type the command WITHOUT the speechmarks, they are only there to show you where the command begins and ends and to separate it from the surrounding text.

1. Download both zip files above
2. Extract contents of both zip files to your SDCard or plug your scroll into your PC and choose "USB Connected(Internal)" from the pull down menu on your scroll, click the "Mount" button, the internal nand drive will mount on your PC. Access it by opening the drive which shows up in Computer/My Computer - now copy the files to the nand drive - e.g. "downloads" folder. Then go back into the pull down menu, click "USB Connected(Internal)" again and choose to unmount.
3. Open Android Terminal Emulator.
4. Type "su", press Enter. (This will take you into root mode and allow you to make system wide changes).
5. type "mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system", press Enter (This will remount the system partition as read/write to allow you to make changes.
6. If you copied your files to the SDCard, replace [PATH] in the lines below with "/sdcard/...." e.g. if you copied them to the "download" folder on your SDCard, your path would be /sdcard/download/.

If you copied your files to the nand partition, replace [PATH] in the lines below with "/nand/...." e.g. if you copied them to the "download" folder on the nand partition of your scroll, your path would be /nand/download.

type "cp -r [PATH]/terminfo /system/etc", press Enter. (e.g. "cp -r /sdcard/download/terminfo /system/etc")
type "cp [PATH]/nano /system/bin", press Enter. (e.g. "cp /sdcard/download/nano /system/bin")
7. Type "chmod 755 /system/bin/nano", press Enter. (this changes the permissions for nano).
8. Type "chown shell.root /system/bin/nano", press Enter. (this changes ownership rights to shell.root for nano).
9. Here we have 2 options. If you just want to set access to the shell for this session only (while the terminal emulator is currently open), do the following :

Type "export TERMINFO=/etc/terminfo", press Enter.
Type "export TERM=linux", press Enter.

If you want to set Android Terminal Emulator to remember which terminal to use for nano every time you open it, do the following instead :

Press the menu button on your scroll (left hand button)
Click the "Preferences" button.
Scroll down to the "Shell" section and click on "Initial Command".
It should already be set to "export PATH=/data/local/bin:$PATH" change it to "export PATH=/data/local/bin:$PATH; export TERMINFO=/etc/terminfo; export TERM=linux"
Close Android Terminal Emulator and reopen.

10. To use nano, simply type "nano [FILENAME]" and press Enter - e.g. "nano build.prop"

Addendum : To use the control keys (Ctrl + x to exit for example) you need to make another preferences change.

i. Press the menu button on your scroll (left hand button)
ii. Click the "Preferences" button.
iii. Under "Keyboard" click "Control Key"
iv. The default is Jog Ball (present on many android phones, not this tablet however!)
If you have an attached keyboard or the SOPAK keyboard / case attached, choose "Left Alt", this will make it easier to use the commands with the keyboard attached.
If you do not have an attached keyboard, choose "Vol Up Key" (this should be familiar to all who have used recovery mode) this can then be used easily with the built in soft keyboard.
v. Press the Back key on your scroll (third button).

Any questions, feel free to ask :)
Last edited by Kommander on January 30th, 2011, 2:24 pm, edited 1 time in total.
David Kirkland

firmware version : v0.94
Kernel version : 2.6.29
Build number 2.1

Rooted | Clockworkmod'd | build.prop'd | PMT Slimmed | Nano installed
User avatar
Kommander
Donator
Donator
 
Posts: 80
Joined: January 13th, 2011, 3:39 am
Location: London, UK

Re: How to install Nano (terminal editor)

Postby Warpedflash » January 30th, 2011, 10:59 am

Nice. Glad to see you found it okay :-)
Nice tutorial but not for the non-techies :-)

Sent from my Dell Streak using Tapatalk
Firmware Version: 1.01 - Latest known update - Locked Bootloader - No Market
viewtopic.php?f=27&t=125 - How to Root your Scroll
viewtopic.php?f=27&t=127 - How to Install Clockwork
viewtopic.php?f=27&t=147 - How to Replace build.prop
User avatar
Warpedflash
Scroll Genuis
Scroll Genuis
 
Posts: 723
Joined: January 4th, 2011, 5:36 pm

Re: How to install Nano (terminal editor)

Postby idlemarvel » January 30th, 2011, 11:47 am

Excellent find @Kommander. Not for the faint hearted!
Hint: to get control characters go to settings / preferences in terminal emulator and set the control key to Left Alt or similar. Default is jog ball whatever that is!
Dave Miller
Linx Commtiva N700
User avatar
idlemarvel
Donator
Donator
 
Posts: 60
Joined: January 18th, 2011, 8:24 pm

Re: How to install Nano (terminal editor)

Postby Kommander » January 30th, 2011, 2:16 pm

@idlemarvel - You actually anticipated my addendum! Was far too tired to bother adding it last night (mainly due to the fact I was falling asleep as I was writing the last few term commands!)

I actually found it took me no longer than about 5-10 minutes from download to install - works first time every time now (and sooo much easier to use than vi) I actually look forward to editing system files now!

If you follow the instructions carefully, I think anyone with linux terminal experience should be able to install this without issue.

If any of the instructions seem convoluted, let me know and I'll try to simplify - it was finished at 5am after all!
David Kirkland

firmware version : v0.94
Kernel version : 2.6.29
Build number 2.1

Rooted | Clockworkmod'd | build.prop'd | PMT Slimmed | Nano installed
User avatar
Kommander
Donator
Donator
 
Posts: 80
Joined: January 13th, 2011, 3:39 am
Location: London, UK

Re: How to install Nano (terminal editor)

Postby Charlie » January 30th, 2011, 2:33 pm

@Kommander, Very nice post, thanks. I think i won't rush into using this yet. :D
" Just because you could, doesn't mean you should. "
User avatar
Charlie
Trusted Developer
Trusted Developer
 
Posts: 2471
Joined: December 28th, 2010, 8:41 pm
Location: UK
Real Name: Charlie
Scroll Version: Moto G 16GB (4.4.2 rooted)
Nexus 7 - G1 (4.4.2 rooted)
Huawei Y300 (4.1.1 rooted - TWRP)
MK809 (4.1.1 rooted - CWM)
Raspberry Pi B (512MB)

Retired: Excel (CM10) & 1st Gen' (2.1) Tab'.

Re: How to install Nano (terminal editor)

Postby Kommander » January 30th, 2011, 2:51 pm

When I get a free moment, i'll write an sh script that automates the fiddly bits and just asks you for the location of the files that need to be copied - that might make it easier for those who still fear the dreaded terminal - mwahahaha!

:lol:
David Kirkland

firmware version : v0.94
Kernel version : 2.6.29
Build number 2.1

Rooted | Clockworkmod'd | build.prop'd | PMT Slimmed | Nano installed
User avatar
Kommander
Donator
Donator
 
Posts: 80
Joined: January 13th, 2011, 3:39 am
Location: London, UK

Re: How to install Nano (terminal editor)

Postby Veng » January 30th, 2011, 2:54 pm

vi for ever!

^ZZ
Mark

DJ Steve's 2.2 (beta)
Old Firmware: v1.01
User avatar
Veng
Scroll Master
Scroll Master
 
Posts: 292
Joined: January 1st, 2011, 1:39 pm

Re: How to install Nano (terminal editor)

Postby Kommander » January 30th, 2011, 2:55 pm

boo!
David Kirkland

firmware version : v0.94
Kernel version : 2.6.29
Build number 2.1

Rooted | Clockworkmod'd | build.prop'd | PMT Slimmed | Nano installed
User avatar
Kommander
Donator
Donator
 
Posts: 80
Joined: January 13th, 2011, 3:39 am
Location: London, UK


Return to Guides and HOW TO Tutorials for Various Scroll Tablets

Who is online

Users browsing this forum: No registered users and 5 guests

cron