/ $ Terminal_

by Ricardo “Rudxain” Fernández Serrata

Version 61 (April 27, 2024)

Download (522 downloads)

⚠️ Known bug "CVE" ⚠️: Arbitrary HTML/JS injection vulnerability, caused by unescaped `hist` var. Be careful when using `cat` or any program that reads files! Don't execute suspicious cmds. Think twice before using `rm` (prefer `mv` instead). NEVER RUN AS SUPERUSER/ROOT (for security).
Please, someone suggest an appropriate HTML sanitization method!


This flow is a Command-Line-Interface terminal-emulator. Uses "Web Dialog" as term/console window. Communicates with the native shell (MKSH). Designed to be similar to ADB Shell in "interactive" mode.

It has a prompt that prints exit code (if truthy) and Working Directory. If WD contains a substring equal to Home, it will be shown as "~" (like Bash does). The flow auto-detects ⚫Dark🌙(night) and ⚪Light☀️(day) modes and sets theme accordingly.

The `$HOME` environment variable exists, but if assigned to, the change will last for the execution of the cmd line. When a new session starts, `$HOME` will be reset to `home`.

Each time text is sent to the shell, a new session starts, that's why the shell doesn't "remember" previous cmds (except "cd", because of this terminal), except when called from scripts AND/OR 1-liner multi-cmds. However, the cmds can have effects on your system (such as creating files).

If a user grants more privileges to AutoMate, they will be allowed to do more things (even if the flow doesn't request those privileges). If the user grants storage access, AM (and this terminal) will be allowed to read/write contents of user storage via shell.


ℹ️ More info/documentation:

MirBSD Korn Shell Manual: www.mirbsd.org/htman/i386/man1/mksh.htm

List of all pre-installed executables and symlink binaries for each Android version (doesn't include all Toybox subcmds): https://chromium.googlesource.com/aosp/platform/system/core/+/refs/heads/upstream/shell_and_utilities

https://developer.android.com/studio/command-line/adb#shellcommands


❔️ FAQ:

Terminal-side support for aliases and/or `env` variables is complicated and would require premium. I've decided to not implement them.

" Why isn't `color-scheme` set to "light dark"? Or why not use `@prefers-color-scheme` media query?".
Read this: https://groups.google.com/g/automate-user/c/1jGBFIMQiwM . TLDR: I want to support legacy Android versions (backwards-compatibility).


... etc:

If someone can, please make a crossover between this flow and llamalab.com/automate/community/flows/27224 . The result would be the ultimate Automate Terminal

4.5 average rating from 4 reviews

5 stars
2
4 stars
2
3 stars
0
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.