Terminal Emulator for Android

repository·master·Indexed 25 days ago

https://github.com/jackpal/android-terminal-emulator

A terminal emulator for Android that provides a shell interface with VT-100 terminal code emulation. It enables compatibility with text-based programs such as vi, Emacs, and NetHack. The project includes a TerminalEmulator class for managing buffers, cursor state, and UTF-8 mode, as well as a TranscriptScreen implementation for maintaining scrolled data history via a ring buffer.

Tokens
3.3K
Snippets
2
Records
39
Agent score
85%

What's inside android-terminal-emulator

  1. Overview of Terminal Emulator for Android

    master
    Terminal Emulator for Android is a terminal emulator designed for communicating with the built-in Android shell. It emulates a subset of Digital Equipment Corporation VT-100 terminal codes, enabling compatibility with text-based programs such as vi, Emacs, and NetHack.
  2. Build TEA from the command line

    master

    For automated testing or publishing, use the command line tools. Ensure local.properties exists in the root directory before proceeding.

    1. Open a terminal and navigate to the main TEA directory.
    2. Build the debug version:
    ./tools/build-debug
    1. Copy the built executable to a connected device:
    ./tools/push-and-run-debug
  3. Configure Android SDK and NDK paths

    master

    To build TEA, you must tell Gradle where your Android SDK and NDK are located.

    1. Create a file named local.properties in the root directory of the TEA project.
    2. Add the following lines to the file, replacing the paths with your actual local installation paths:
    ndk.dir=path/to/ndk
    sdk.dir=path/to/sdk

    If you are building from the command line, you must also define the ANDROID_SDK_ROOT environment variable in your shell profile (e.g., .profile or .bashrc):

    export ANDROID_SDK_ROOT=/path/to/sdk
    ndk.dir=/Users/jack/code/android-ndk-r10d
    sdk.dir=/Users/jack/Library/Android/sdk
  4. Install required Android SDK packages

    master

    TEA requires the Android 3.0 (API 11) SDK version to be installed. You can install this in two ways:

    Option 1: Command Line Run the provided installation script from the project root:

    tools/install-sdk-packages

    Option 2: Android Studio

    1. Open Android Studio.
    2. Navigate to Configure > SDK Manager.
    3. Select the Android 3.0 (API 11) > SDK Platform package and install it.
    tools/install-sdk-packages
  5. Publish a pre-compiled APK to GitHub Pages

    master

    To provide a direct download for users who cannot access the Play Store, publish the APK to the gh-pages branch in the downloads/ directory. You must also update the version number in index.html on that branch.

    cp ./term/build/outputs/apk/Term.apk /tmp
    git checkout gh-pages
    mv /tmp/Term.apk downloads/Term.apk
    git add downloads/Term.apk
    subl index.html
    # Update version in index.html
    git add index.html
    git commit -m "Update to version v1.0.xx"
    git push
    git checkout master

    Public Download URL: http://jackpal.github.com/Android-Terminal-Emulator/downloads/Term.apk

  6. Publish to the Google Play Store

    master

    To publish a new version, use the Android Developer Console at https://play.google.com/apps/publish.

    Recommended Workflow to avoid UI errors:

    1. Click on the "Terminal Emulator for Android" link.
    2. Click on the APK files tab.
    3. Upload your new APK.
    4. Click the Activate link.
    5. Click Save.
    6. Click the Product Details button.
    7. Fill in the Listing Details for the new version.
    8. Click Save.
    9. Verify the new version is listed as current at the publishing URL.
    10. Verify the version is live on the Play Store (check the "What's New" section) at: https://play.google.com/store/apps/details?id=jackpal.androidterm.
  7. Build TEA with Android Studio

    master

    For active development, use the Android Studio IDE:

    1. Open Android Studio.
    2. Select Open an existing Android Studio project from the Quick Start wizard.
    3. Select the top-level TEA directory (often named Android-Terminal-Emulator).
    4. Use the menu command Run > Run 'term' to build and run the application.