MyGit

v0.115

termux/termux-app

版本发布时间: 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 with am 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 internal errmsgs as long as result files extras are valid. This can be used to run synchronous commands from inside termux, with other apps that have Run commands in Termux environment (com.termux.permission.RUN_COMMAND) like Tasker, from pc over adb or inside adb shell if you have a rooted device, or from pc if you have setup termux sshd. The RUN_COMMAND intent can only be sent by the termux user itself, by an app that has the permission or by the root user. The shell user of adb cannot send it. A script will be provided at a later time that will automatically detect these cases to easily run RUN_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 for termux-boot and termux-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 to termux.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 is false. So adding the entry disable-terminal-margin-adjustment=true to termux.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 to 2021.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 to Jitpack. 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 to MIT 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 and TermuxPropertyConstants should be MIT licensed as well so that other non-FOSS or non-GPLv3 apps can use them, like for RUN_COMMAND intent. Any code not listed in exceptions of LICENSE.md files is still under GPLv3, 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 the LICENSE.md files and see if they are okay with contributing code as MIT and if they are not, then they should create separate file/package in termux-shared. Check termux-app/LICENSE.md and termux-app/termux-shared/LICENSE.md for exceptions. (70e1acca, 49265160)

  • Implement Errno system. This commit adds onto 679e0de0. Now Error class has been implemented which will used to return errors, including suppressed throwables. Requirement for Context object has been removed from FileUtils so that they can be called from anywhere in code instead of having to pass around Context 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 to ResultData and result configuration to ResultConfig 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. The ResultData instead of a String errmsg now stores a list of Error 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, the ResultSender returns an additional error because result configuration like result directory or result output format was invalid. In these situations PluginUtils will show a notification to the user with info of each error thrown. In addition to above, in ResultData, the stdout and stderr are converted to StringBuilder instead of a String so that data can appended to each from various places in code. This commit also adds onto 679e0de0 and 4494bc66. (2aafcf84)

  • Move ReportActivity to termux-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 and TermuxSession 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 to TermuxFileUtils. (4494bc66)

  • Move Termux app specific logic out of PermissionUtils. (12f910c3)

  • Move Android specific utils from TermuxUtils to AndroidUtils. (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 to TermuxTask 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 with termux-widget, termux-boot or RUN_COMMAND intent. This should make it easier for users to debug problems, since otherwise logcat needs to be looked. But logcat 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 the Plugin 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 for FileUtils where guava MoreUtils 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 with log*Extended() functions so that logcat entries longer than LOGGER_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 arg 0 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.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2021-07-01发行的版本