v0.109
版本发布时间: 2021-04-13 22:07:52
termux/termux-app最新发布版本:v0.119.0-beta.1(2024-06-18 08:11:25)
Change Log:
- Updated bootstrap archives.
- Lots of fixes and improvements (see expandable list below).
Full change log
Added
-
Added
SettingsActivity
(Termux Settings)
which can be accessed byLong pressing terminal view
->More
->Settings
. This will allow GUI based management of settings in future, like keyboard key mapping, etc. Currently supports controlling log level, plugin errors and softkeyboard state. (d39972b3) -
Add
SettingsActivity
to launcher shortcuts. (2b3f6817, 325a6f7d) -
Added
ReportActivity
andReportInfo
to be used as base for showing reports to users. Currently supports plugin errors, app crashes and issue reports. (9d36e9ad) -
Added centralized
Logging
framework to the entire app andterminal-view
andterminal-emulator
libraries which has 4 levels,Off
,Normal
(default),Debug
,Verbose
which can be used by users vialogcat
to debug problems. Users can set the log level fromTermux Settings
->Debugging
->Log Level
. Terminal view key logging can now also be enabled with theTerminal View Key Logging
toggle without having to recompile the app. Support for writing to files in addition to writing tologcat
will/can be added in future. (d39972b3) -
Added logging for termux bootstrap package installation and setup of storage symlinks. (92b804dc).
-
Requested
android.permission.DUMP permission
so that users can usedumsys
commands without root after runningadb shell pm grant com.termux android.permission.DUMP
. (356a442c) -
Requested
android.permission.REQUEST_INSTALL_PACKAGES permission
to allow users to accessAndroid/obb
on android 11 after explicitly granting Termux the permission by going to TermuxApp Info
in AndroidSettings
->Advance
->Install unknown apps
. (93a5bf8d) -
Added support to warn users if
Draw over other apps permission
is missing when attempting to start Termux foreground session from the background with plugin commands, like forRUN_COMMAND
intent. Check android background restrictions for more info. Now, the Termux foreground session will not even be attempted to be started if permission is missing since it would fail randomly otherwise and users would report bugs for it. (d3ddb217) -
Added
hide-soft-keyboard-on-startup
termux.properties
property which when set totrue
will automatically hide the soft keyboard on Termux startup to solve issues for when users use hardware keyboard and soft keyboard wastes screen space. Fixes #1978. (1ef8eb92) -
Added support for disabling soft keyboard completely for when users use hardware keyboard. Users can toggle the state from
Termux Settings
->Keyboard I/O
->Soft Keyboard
toggle. (2a8d5e29) -
Added support for adjusting termux toolbar height with
terminal-toolbar-height
termux.properties
property. The user can set a float value between0.4
and3.0
which will be used as the scaling factor for the default height. The default scaling factor is1
. So adding an entry liketerminal-toolbar-height=2.0
totermux.properties
file will make the toolbar height twice its original height. Fixes #1857. (ff0440d7) -
Added executable and working directory validation for
RUN_COMMAND
intent. The working directory will also also be created if its underTermuxConstants.TERMUX_FILES_DIR_PATH
. (b4995ef9) -
Added support for session actions for foreground session commands received via
RUN_COMMAND
intent ortermux-tasker
. (ec7568d2) -
Added support for sending back background and foreground command results for
RUN_COMMAND
intent and foreground command results forTermux:Tasker
. CheckRUN_COMMAND
Intent Wiki for more info. (a2209ddd) -
Added support to notify users of errors via flashes and notifications for plugin commands, like for
allow-external-apps
not set totrue
whenRUN_COMMAND
intent is received. Clicking the notification will open theReportActivity
to show the report. The flashes and notifications can be controlled with theTermux Settings
->Debugging
->Plugin Error Notifications
toggle. (8612a1d0, 31371b5e) -
Added support for
stdin
for backgroundRUN_COMMAND
intent,TERMUX_SERVICE.ACTION_SERVICE_EXECUTE
andTermux:Tasker
(will require update) commands. This will allow users to pass (bash
,python
, etc) scripts or other data viastdin
to the executable. Arguments would still be passed to the executable and not the script. (192b2088, f1034c2e) -
Added crash reporting so that whenever the Termux app crashes, the crash report (stacktrace, app and device info) will be logged to
~/crash_log.md
file in markdown format. When the user will reopen the app, a notification will be shown which when clicked will show the crash report content inReportActivity
. The activity will have important links like email (termuxreports@groups.io), reddit, github issues of termux app and packages at which the user can optionally report an issue if necessary after copying the crash report text. The~/crash_log.md
file will be moved to~/crash_log-backup.md
so that a notification is not shown again on next startup and can be viewed again viaSAF
, etc. The notifications can be controlled with theTermux Settings
->Debugging
->Crash Report Notifications
toggle. (69e4b575, cf5bb69f) -
Added support to allow users to report an issue based on terminal transcript with
Long pressing terminal view
->More
->Report Issue
. Selecting the option will open theReportActivity
with the terminal transcript, app device and APT info with important links like email (termuxreports@groups.io), reddit, github issues of termux app and packages at which the user can optionally report an issue after copying the report text. The report text will be in markdown format so that it is more readable and will take a few seconds to generate. (939338aa, df4d8ac7, 6293f5f1) -
Added
termux-shared
library. This defines shared constants and utils of Termux app and its plugins. This allows for removal of all hardcoded paths in Termux app. The termux plugins should use this in future as well. (682ce083) -
Added
TermuxConstants
class to store all shared constants of Termux app and its plugins. This also has info on what changes need to be made if forking Termux app and changing its package name. (14c49867, 0225a8b1) -
Added
TermuxPropertyConstants
class that defines shared constants ofSharedProperties
used by Termux app and its plugins. Also addedTermuxSharedProperties
class that acts as manager for handling termux properties. (7b4acb53) -
Added
TermuxPreferenceConstants
class that defines shared constants of theSharedPreferences
used by Termux app and its plugins. Also addedTermuxSharedPreferences
class that acts as manager for handling termux preferences. (93b506a0, 9e825618) -
Added
SharedProperties
class which is an implementation similar to android'sSharedPreferences
interface for reading from.properties
files which also maintains an in-memory cache for the key/value pairs. Write support is currently not there since.properties
files also have comments and escapes, so in-place editing would be required to update values. For this apron library could be looked into. (7b4acb53) -
Added
ExecutionCommand
to stores all data related to an execution command. This allows easier management and passing of execution command data between classes and management of it, like post processing and failure management. (bccc35bc, 31371b5e, 1b5e5b56) -
Added
ShellUtils
to provide utilities for shell related stuff, since they don't belong inBackgroundJob
which has been removed. (dff27945, 249f7c6b, 8598b92d) -
Added the
TermuxSession
class for linking aTerminalSession
to anExecutionCommand
and to maintain info for foreground Termux sessions. (78a99fdd, 0cd7cb81) -
Added the
TermuxTask
class for linking aProcess
to anExecutionCommand
and to maintain info for background Termux tasks. It also supports synchronous command execution as well to run shell commands and scripts from anywhere for internal use by termux app and its plugins. (f62febbf, 0cd7cb81) -
Added
StreamGobbler
class which has been imported from libsuperuser and partially modified to readstdout
andstderr
of background commands. (f62febbf) -
Added interface methods to
TerminalViewClient
interminal-view
library so that it becomes agnostic oftermux.properties
files. (10d6eaa5) -
Added
MarkdownUtitls
to provide utilities for markdown support in the app, like for error and crash reports. It uses the commonmark-spec via the markwon library. (131f4817) -
Added
ShareUtils
to provide utilities for sharing data from termux apps. It will also try to preventandroid.os.TransactionTooLargeException
exceptions when sharing large data. (c28990a1) -
Added
TermuxUtils
to provide utilities for termux app specific operations, like getting termux app info, device info, report info,Context
object of each termux plugin app, etc. (c9e18e5b, 34919563, 69e4b575, 15eb56d4) -
Added
NotificationUtils
to provide utilities to build and manage notifications. (20d20f42) -
Added
PackageUtils
to provide utilities to get various package related info. This will be used to get info based on appContext
objects instead of usingBuildConfig
which wouldn't have been available across termux plugins. (15eb56d4) -
Added
FileUtils
to provide utilities to safely manage files. Also added support to get detailedUNIX
file attributes by porting classes from android'slibcore/ojluni
. (d4fc34ca)
Changed
-
Refactored
TermuxActivity
. Dedicated classes and functions have been created for various actions and commands. (c9e18e5b) -
The dedicated
TerminalToolbarViewPager
class has been created to handle the now called toolbar that shows on the bottom of the terminal view. (c9e18e5b) -
The dedicated
TermuxSessionsListViewController
class has been created to handle view related functionality of the termux sessions list shown in the left drawer. (c9e18e5b) -
The dedicated
TermuxTerminalSessionClient
class has been created to handleTerminalSession
classTerminalSessionClient
interface (previouslySessionChangedCallback
). (c9e18e5b, 824b3e65) -
Refactored
TermuxService
. Dedicated classes and functions have been created for various actions and commands. (d9b5344b) -
Refactored
terminal-view
. Dedicated classes and functions have been created for various actions and commands. (ada5087f) -
The dedicated
CursorController
,TextSelectionCursorController
(previouslySelectionModifierCursorController
) andTextSelectionHandleView
(previouslyHandleView
) classes have been created to handle text selection and have been moved fromTerminalView
. (ada5087f) -
Get
TERMUX_VERSION
while building shell environment via Termux package context instead ofBuildConfig
so that termux plugin apps can use it too. (d4653d05) -
Use
FileUtils
for bootstrap and shared storage symlinks setup. (b2cd20c0) -
Use
FileUtils
for clearingTMPDIR
and move clearing function toShellUtils
fromTermuxService
. (8598b92d) -
Disable obfuscation of termux-app in release builds without disabling optimizations and shrinking to allow stacktraces to have full class and method names when a crash report is generated. (067709bf)
-
Changed
compileSdkVersion
(NOTtargetSdkVersion
) to29
so that newer APIs can be used. (8e80e889) -
Moved activities and fragments to respective packages. (b856e169)
-
Fixed xml files naming convention. (c9e18e5b, 4eced52c)
-
Fixed string resources naming convention. (eeb85545)
Fixed
-
Fixed
Duplicate finish request for ActivityRecord
errors. (f50d15d3) -
Fixed executable and working directory path expansion in
RunCommandService
where it was not expanding path if exactly$PREFIX
is passed and was adding extra trailing slashes in some cases. (80858bab) -
Fixed the issue when
cwd
is empty and is passed toRuntime.getRuntime().exec(progArray, env, new File(cwd));
, it raises theNo such file or directory
exceptions when targeting sdk29
. (85b2c44a) -
Fixed non-crashing
NoClassDefFoundError
exceptions forTermuxActivity
. (9fd2cf98) -
Fixed few potential
null
pointer exceptions (and probably added a few more). (dbf84773) -
Fix old issue where termux app would crash if sessions list
ListView
was not notified of new sessions. (ae260fad) -
Fixed issue which caused the
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
exception to be thrown when long pressing the down key while simultaneously long pressing the terminal view for text selection and crashed the app. Fixes #1501. (ada5087f) -
Fixed issue to restore keyboard input into terminal view when toggling extra-keys slider input with
VOL_UP
+q
. Fixes #1420. (395759cc) -
Fixed
TermuxActivityBroadcastReceiver
wrongly designed intent actions and extras. (e5c5174f) -
Fixed potential crashes of
TermuxService
due tostartForeground()
andstopForeground()
not being called in all the right places. (d9b5344b) -
Fixed performance degradation of background commands since logging of every line separately was enabled. They will now only be logged if log level is set to verbose. This will also prevent potentially private user data from being sent to
logcat
by default. (f62febbf) -
Fixed issue where
TermuxService
was stopped and Termux notification canceled if background tasks were still running but all sessions had been closed. (f888f35e) -
Fixed issue where
Termux:Tasker
would hang indefinitely when the command was executed withRuntime.getRuntime().exec()
and it raised an exception, like for invalid or missing interpreter errors andTermux:Tasker
was not notified of it. Now theerrmsg
will be used to send any exceptions back toTermux:Tasker
and other 3rd party calls. (f62febbf) -
Fixed issue where
stdout
orstderr
were too large in size and theTransactionTooLargeException
exception was raised and result of background commands was not sent back to the caller. This previously only applied toTermux:Tasker
which would hang indefinitely. Nowstdout
andstderr
will be truncated from the start to max100KB
combined. The original size ofstdout
andstderr
will now also be sent to the caller so that they can check if either of them were truncated, these additional variables need to be implemented inTermux:Tasker
but will be available for the now supportedRUN_COMMAND
intent results. Theerrmsg
will also be truncated from end to max25KB
to preserve start of stacktraces. (f62febbf) -
Fixed issue where
Termux:Tasker
would hang indefinitely for background commands whenTermuxService
was killed before the commands completed or before they even started becauseTermuxService
was about to be killed sinceTermux:Tasker
was not notified of it. Now,TermuxService
will kill all background commands started by plugins for which the result is expect back via a pending intent before it is destroyed and notifyTermux:Tasker
. For commands that have not even started,Termux:Tasker
will be notified that they have been canceled. This previously only applied toTermux:Tasker
and notRUN_COMMAND
intent, but now will apply to the later as well if result is expected back. Note that there may still be cases whereTermuxService
is killed without even having the chance to notify the command sender, in which case reasonable timeout values should be used, like the one available forTasker
actions. (0cd7cb81)
Deprecated
-
TERMUX_ACTIVITY.EXTRA_RELOAD_STYLE
(com.termux.app.reload_style
) which was previously used for requesting storage permissions if its value equaledstorage
has been deprecated. (e5c5174f)