Skip to content

juic3b0x/neoterm-api

Repository files navigation

NeoTerm API

Build status Join the chat at https://gitter.im/neoterm/neoterm

This is an app exposing Android API to command line usage and scripts or programs.

When developing or packaging, note that this app needs to be signed with the same key as the main NeoTerm app for permissions to work (only the main NeoTerm app are allowed to call the API methods in this app).

Installation

NeoTerm:API application can be obtained from F-Droid.

Additionally we provide per-commit debug builds for those who want to try out the latest features or test their pull request. This build can be obtained from one of the workflow runs listed on Github Actions page.

Signature keys of all offered builds are different. Before you switch the installation source, you will have to uninstall the NeoTerm application and all currently installed plugins. Check https://github.io.neoterm/neoterm-app#Installation for more info.

License

Released under the GPLv3 license.

How API calls are made through the neoterm-api helper binary

The neoterm-api client binary in the neoterm-api package generates two linux anonymous namespace sockets, and passes their address to the NeoTermApiReceiver broadcast receiver as in:

/system/bin/am broadcast ${BROADCAST_RECEIVER} --es socket_input ${INPUT_SOCKET} --es socket_output ${OUTPUT_SOCKET}

The two sockets are used to forward stdin from neoterm-api to the relevant API class and output from the API class to the stdout of neoterm-api.

Client scripts

Client scripts which processes command line arguments before calling the neoterm-api helper binary are available in the neoterm-api package.

Ideas

  • Wifi network search and connect.
  • Add extra permissions to the app to (un)install apps, stop processes etc.