GitXplorerGitXplorer
t

termux-api

public
2435 stars
480 forks
247 issues

Commits

List of commits on branch master.
Verified
724f275306765666def562990ea698fdf5c43f55

Fixed: Do not pass `-1` value to `Cursor.get*()` calls returned by `Cursor.getColumnIndex()` if column does not exist for when listing SAF documents

aagnostic-apollo committed 5 days ago
Verified
54679122b26e3d4105af758f57afdd140cdc03a1

Fixed: Remove `FLAG_GRANT_*_URI_PERMISSION` flags when starting document provider for `termux-saf-managedir` call

aagnostic-apollo committed 5 days ago
Verified
d5364ef33c4b42cac0e66a42b9d2f3063ca6ae95

Added|Changed|Fixed: Add `present`, `technology`, `voltage`, `current_avg`, `level`, `scale`, `charge_counter`, `energy` and `cycle` properties to battery API

aagnostic-apollo committed 11 days ago
Verified
ed867bc30dfb4294165347131e4b87698221605a

Added: Add Termux:API app settings activity directly in the app itself so that the main Termux app is not required

aagnostic-apollo committed 25 days ago
Verified
989a19b7f8eb9101e957c544987bf64c6f3669d4

Added: Add `DUMP` and `PACKAGE_USAGE_STATS` permissions

aagnostic-apollo committed a month ago
Verified
ea094b0af5896ca60e25591890f07199ff1896ed

Added: Add `INTERNET` permission

aagnostic-apollo committed a month ago

README

The README file for this repository.

Termux API

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

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 Termux app for permissions to work (only the main Termux app are allowed to call the API methods in this app).

Installation

Latest version is v0.50.1.

Termux: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 Termux application and all currently installed plugins. Check https://github.com/termux/termux-app#Installation for more info.

License

Released under the GPLv3 license.

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

The termux-api client binary in the termux-api package generates two linux anonymous namespace sockets, and passes their address to the TermuxApiReceiver 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 termux-api to the relevant API class and output from the API class to the stdout of termux-api.

Client scripts

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

Ideas

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