Search code examples
androidcshellterminalncurses

ncurses on adb shell android


I'm trying to create a minimalistic command line gui with ncurses on Android. I cross compiled ncurses for ARM64 etc and everything seems to run. However; when starting my test 'hello world' ncurses program in adb shell, I get the following error:

Error opening terminal: xterm-256color.

when i try to set TERM to xterm or something i get:

Error opening terminal: xterm.

Is there any particular way I need to compile ncurses and/or configure Android to allow a CLI gui like this to run?


Solution

  • So the trick was configuring ncurses like so:

    ./configure --without-database --with-fallbacks=xterm-256color,vt100 --without-xterm-new --disable-home-terminfo --with-termlib --enable-termcap --disable-database --host=arm-linux-gnue
    

    This allowed the fallbacks to be used internally without relying on a library