[BINARY] GNU Nano editor v2.2.6 for Android

Search This thread

bgcngm

Recognized Developer
Apr 2, 2007
7,091
21,556
Lisbon
HTC One (M8)
Xiaomi Mi 5
I have managed to successfully cross-compile GNU Nano editor 2.2.6 to run on Android and decided to share it here.

Please note that you need to set up terminfo (if your ROM doesn't have it already), by running:

Code:
export TERMINFO=/system/etc/terminfo
export TERM=linux

Unfortunately, it doesn't fully work through adb shell due to the fact that [enter]-key can't be used (this is a bug of adb shell).
It works flawlessly over ssh, although. :D

2u7m329.png


EDIT: Fully working version is here.
 
Last edited:

bgcngm

Recognized Developer
Apr 2, 2007
7,091
21,556
Lisbon
HTC One (M8)
Xiaomi Mi 5
ARM cross-compiling how-to

Assuming a toolchain is already present on the build environment, here are the instructions on how to cross-compile Nano 2.2.6 for ARM devices:

Set the path to C compiler:
Code:
export CC=~/toolchain/bin/arm-none-linux-gnueabi-gcc

After you have unpacked the sources change to the source directory:
Code:
cd nano-2.2.6

Now configure the source:
Code:
./configure --host=arm-none-linux-gnueabi

To compile the sources (statically) type this:
Code:
make LDFLAGS=--static
 

daboss5

Member
Mar 31, 2015
37
9
London
I have managed to successfully cross-compile GNU Nano editor 2.2.6 to run on Android and decided to share it here.

Please note that you need to set up terminfo (if your ROM doesn't have it already), by running:

Code:
export TERMINFO=/system/etc/terminfo
export TERM=linux

Unfortunately, it doesn't fully work through adb shell due to the fact that [enter]-key can't be used (this is a bug of adb shell).
It works flawlessly over ssh, although. :D

2u7m329.png


EDIT: Fully working version is here.
How do I exit Nano in the android Terminal emulator
Edit: I found out hacker's keyboard's ctrl key helps with this problem
 
Last edited:

idoit

Senior Member
Jan 5, 2012
347
45
Canada <3 Iran
If anyone has this issue, let me help out:
In Windows, running nano and vim through ADB returns weird characters on the terminal, and you need ansicon.

Or better use ConEmu.
 
Last edited:
  • Like
Reactions: osm0sis

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,773
40,450
Halifax
GT-i9250
Google Nexus 4

CipherSwami

Member
Jan 25, 2021
16
1
If you are a termux user and want to install a nano or vi or any other binaries of termux in Andriod su mode. Here is the link to Termux superuser.

Give it a star if it was helpful !!!
 

rahaaatul

Member
Aug 1, 2022
9
2
Near you
ARM cross-compiling how-to

Assuming a toolchain is already present on the build environment, here are the instructions on how to cross-compile Nano 2.2.6 for ARM devices:

Set the path to C compiler:
Code:
export CC=~/toolchain/bin/arm-none-linux-gnueabi-gcc

After you have unpacked the sources change to the source directory:
Code:
cd nano-2.2.6

Now configure the source:
Code:
./configure --host=arm-none-linux-gnueabi

To compile the sources (statically) type this:
Code:
make LDFLAGS=--static
How to do this on termux? @bgcngm I got the latest 6.4 tarball.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    I have managed to successfully cross-compile GNU Nano editor 2.2.6 to run on Android and decided to share it here.

    Please note that you need to set up terminfo (if your ROM doesn't have it already), by running:

    Code:
    export TERMINFO=/system/etc/terminfo
    export TERM=linux

    Unfortunately, it doesn't fully work through adb shell due to the fact that [enter]-key can't be used (this is a bug of adb shell).
    It works flawlessly over ssh, although. :D

    2u7m329.png


    EDIT: Fully working version is here.
    14
    Here is the fully working version of Nano 2.2.6 for Android (without the [enter]-key bug). Enjoy. :victory:
    4
    Great job!

    I went ahead and packaged this in a flashable zip for people, it also adds a script to /sbin so you can (temporarily) use nano from the recovery console in AROMA Filemanager during that recovery session. :)

    http://xdaforums.com/showpost.php?p=47402916&postcount=133
    4
    ARM cross-compiling how-to

    Assuming a toolchain is already present on the build environment, here are the instructions on how to cross-compile Nano 2.2.6 for ARM devices:

    Set the path to C compiler:
    Code:
    export CC=~/toolchain/bin/arm-none-linux-gnueabi-gcc

    After you have unpacked the sources change to the source directory:
    Code:
    cd nano-2.2.6

    Now configure the source:
    Code:
    ./configure --host=arm-none-linux-gnueabi

    To compile the sources (statically) type this:
    Code:
    make LDFLAGS=--static