v0.115
版本发布时间: 2021-07-01 11:40:04
termux/termux-app最新发布版本:v0.119.0-beta.1(2024-06-18 08:11:25)
0.115 - 2021-07-01
Changelog
Added
-
Add support to send back or store
RUN_COMMAND
intent command results in files and provide way to fix argument splitting sent witham
command caused by commas,
in arguments itself. Native support has been added inside termux to store results of both foreground and background commands inside files, that also sends back internalerrmsgs
as long as result files extras are valid. This can be used to run synchronous commands from inside termux, with other apps that haveRun commands in Termux environment
(com.termux.permission.RUN_COMMAND
) like Tasker, from pc overadb
or insideadb shell
if you have a rooted device, or from pc if you have setup termuxsshd
. TheRUN_COMMAND
intent can only be sent by thetermux
user itself, by an app that has the permission or by theroot
user. Theshell
user ofadb
cannot send it. A script will be provided at a later time that will automatically detect these cases to easily runRUN_COMMAND
intent commands which will also automatically create temp directories and do cleanup. This can also be useful inside termux itself, like if you want to start a new foreground session and to automatically store its output to a log file when you exit. Support can also be added for this to be done fortermux-boot
andtermux-widget
as well but will require updates for them. Check the commit message for full details and examples for this since too long to be added here. (2aafcf84) -
Add termux settings button to left drawer too since apparently people can't find the one in context menu. (59877a08)
-
Allow users to disable terminal margin adjustment. The user can add
disable-terminal-margin-adjustment=true
entry totermux.properties
file to disable terminal view margin adjustment that is done to prevent soft keyboard from covering bottom part of terminal view on some devices. Margin adjustment may cause screen flickering on some devices and so should be disabled. The default value isfalse
. So adding the entrydisable-terminal-margin-adjustment=true
totermux.properties
file will disable margin adjustment. Exit termux and restart for changes to take affect after updating value. In case e5a9b99a did not fix screen flickering issues for #2127, then this can be used to disable it. Closes #2127. -
Show crash notification when bootstrap installation or setup storage failures. Sometimes users report that bootstrap installation failed on their devices but provide no details. Since they don't check logcat for the exception or exception is one time only, we can't know what happened. Although, reasons are likely root ownership files. The notification will show the full stacktrace including suppressed ones for why failure occurred and hopefully be easier to find the problems and we can get reports too. (e408fdcc)
-
Updated
bootstrap
to2021.06.30-r1
. (56701282)
Changed
-
Move from github packages to https://jitpack.io for hosting termux library packages. Github Package hosting is considered a private repository since it requires github APIs keys if a hosted library needs to be imported as a dependency. Importing from private repositories is not allowed as per
F-Droid
policy so termux plugin apps can't import termux libraries as dependencies so hence we move toJitpack
. Usage details for importing termux libraries in your own app as dependencies are in the commit message. (b7b12ebe, 69e5deed, 886e52dc) -
Change license for non-termux utils from
GPLv3
toMIT
so that they can be used by other termux plugin apps or apps that may be released under a different license. Termux is already using a lot of libraries that are not GPL and such general utils shouldn't be restrictive anyways. Moreover,TermuxConstants
andTermuxPropertyConstants
should beMIT
licensed as well so that other non-FOSS or non-GPLv3 apps can use them, like forRUN_COMMAND
intent. Any code not listed in exceptions ofLICENSE.md
files is still underGPLv3
, mainly termux specific code and it will and should remain that way. All code in files whose license is changed was authored by me (@agnostic-apollo) as far as I can tell, but if any code in them is not that I missed, let me know, so that changes can be made since I can't and won't change the license of code authored by someone else. If some other objection is raised, let me know too. Future contributors should check theLICENSE.md
files and see if they are okay with contributing code asMIT
and if they are not, then they should create separate file/package intermux-shared
. Checktermux-app/LICENSE.md
andtermux-app/termux-shared/LICENSE.md
for exceptions. (70e1acca, 49265160) -
Implement
Errno
system. This commit adds onto 679e0de0. NowError
class has been implemented which will used to return errors, including suppressed throwables. Requirement forContext
object has been removed fromFileUtils
so that they can be called from anywhere in code instead of having to pass aroundContext
objects. Previously,string.xml
was used to store error messages in case multi language support had to be added in future since error messages are displayed to users and not just for dev usage. However, now this will have to handled in java code if needed, based on locale. (4494bc66) -
The
ExecutionCommand
has been updated and command result variables have been moved toResultData
and result configuration toResultConfig
since the later two should be agnostic of what type of command there are for. They don't necessarily have to be for terminal/shell commands and can be used for plugin APIs, etc. TheResultData
instead of aString
errmsg
now stores a list ofError
objects. This is necessary since multiple errors may be picked up while a command is run, like say working directory is invalid and an error is returned by FileUtils and while sending the result to the caller, theResultSender
returns an additional error because result configuration like result directory or result output format was invalid. In these situationsPluginUtils
will show a notification to the user with info of each error thrown. In addition to above, inResultData
, thestdout
andstderr
are converted toStringBuilder
instead of aString
so that data can appended to each from various places in code. This commit also adds onto 679e0de0 and 4494bc66. (2aafcf84) -
Move
ReportActivity
totermux-shared
so that other termux plugins can use it too. (7f36d7bb) -
Move storage permission logic to
PermissionUtils
and add disable battery optimizations code. Option to disable battery optimizations will be added in termux settings later. (80b495e5) -
Make
TermuxTask
andTermuxSession
agnostic to termux environment. Those classes shouldn't be tied to termux environment like variables, interpreters and working directory since commands may need to be executed with a different environment like android's or with a different logic. (53c1a49b) -
Move termux related file utils from
FileUtils
toTermuxFileUtils
. (4494bc66) -
Move Termux app specific logic out of
PermissionUtils
. (12f910c3) -
Move Android specific utils from
TermuxUtils
toAndroidUtils
. (6bca378c) -
Divide
DialogUtils
. (553913cd) -
Move Termux app specific logic out of
NotificationUtils
. (1c7f9166) -
Move Termux app specific logic out of
CrashHandler
. (23a900c4)
Fixed
-
Fix issues with
TermuxActivityRootView
margin adjustment. Margin adjustment was causing screen flickering due to invalid values being calculated in landscape and split screen mode. Attempts to fix issue #2127. (e5a9b99a) -
Redo fix for execution commands exceptions not being logged or sent back to plugin. The f62febbf commit mentioned that it solved
the bug where Termux:Tasker would hang indefinitely if Runtime.getRuntime().exec raised an exception, like for invalid or missing interpreter errors and Termux:Tasker wasn't notified of it. Now the errmsg will be used to send any exceptions back to Termux:Tasker and other 3rd party calls.
. This however was still broken due to local design changes made toTermuxTask
after testing was already done. This commit should solve that problem. Moreover, now a notification will be shown if execution commands fail to start that are run by plugins that don't expect the result back, like withtermux-widget
,termux-boot
orRUN_COMMAND
intent. This should make it easier for users to debug problems, since otherwiselogcat
needs to be looked. Butlogcat
would still need to be looked if commands/scripts fail after they have started due to internal errors. Notifications can be disabled from Termux Settings by disabling thePlugin Error Notifications
toggle. (5f2ccca4) -
Fix issue where terminal cursor blinking would not automatically start again if termux activity is started after device display timeout with double tap and not power button. Fixes #2138. (f77c8863)
-
Fix issue where cursor blinker wouldn't automatically start after session change. (d3c34ad1)
-
Fix issue where cursor blinker wouldn't automatically start after terminal reset if it was disabled before reset. (00f805f7)
-
Fix suppressed exceptions not being logged and long logcat message being truncated. If an exception is thrown, the exception message might not contain the full errors. Individual failures may get added to suppressed throwables which can be extracted from the exception object by calling
Throwable[] getSuppressed()
. So just logging the exception message may not be enough, the throwable and its suppressed throwables need to be logged as well. This was mainly a concern forFileUtils
where guavaMoreUtils
library was used to delete directories but exceptions weren't being fully logged on failures, like bootstrap failures, so user wouldn't know what really caused the failure. This also adds support withlog*Extended()
functions so that logcat entries longer thanLOGGER_ENTRY_MAX_PAYLOAD
do not get truncated by android. This is done by splitting the log message into multiple messages if the limit is crossed. This is specially necessary for logging long stacktraces, suppressed throwables and errmsg of ExecutionCommand, etc. (679e0de0, 5a511a2b) -
Fixed issue where back button would not exit the activity if bootstrap installation failed and users dismissed the error dialog. (9c922515)
-
Do not start login shell and load
~/.profile
if starting a failsafe session. This is done by not starting arg0
with-
. The/system/etc/mkshrc
must still be valid for failsafe session to start properly. Fixes #2150. (94c5f367, 93a7525d) -
Fix issues where crash throwable message wasn't been added to crash log. (20341217)
Github Build
APK. Check Installation for more info on Github Build
APKs.