v0.118.0
v0.118.0 - 2022-01-07 22.35
Changelog
Added
-
Allow users to directly open URL links in terminal transcript when clicked or tapped. The user can add
terminal-onclick-url-open=true
entry totermux.properties
file to enable opening of URL links in terminal transcript when clicked or tapped. The default value isfalse
. Runningtermux-reload-settings
command will also update the behaviour instantaneously if changed. Implemented by @trygveaa in #2146. (af16e79b
,1a5a66d0
) -
Allow users to disable auto capitalization of extra keys text. The user can add
extra-keys-text-all-caps=false
entry totermux.properties
file to disable auto capitalization of extra keys text for both normal and popup buttons. The default value istrue
. Runningtermux-reload-settings
command will also update the behaviour instantaneously if changed. (5c72c3ca
) -
Allow users to adjust terminal horizontal and vertical margin. The
terminal-margin-horizontal
key can be used to adjust the terminal left/right margin and theterminal-margin-vertical
can be used to adjust the terminal top/bottom margin. This will also affect drawer. The user can set an integer value between0
and100
asdp
units. The default value is still3
for horizontal and0
for vertical margin. So adding an entry liketerminal-margin-horizontal=10
totermux.properties
file will allow users to set a horizontal margin of10dp
. After updating the value, either restart termux or runtermux-reload-settings
for changes to take effect.This was added since for some users text on edges would not be shown on the screen or they had screen protectors/cases that covered screen edges (Of course, that would require fixing every single app and android system UI itself, so kinda stupid to use). Moreover, horizontal margin of like
10dp
may be helpful with peek-and-slide for people having gesture navigation enabled on android10+
since they won't be to touch at exactly the edge of the screen to trigger peek (#1325).
Closes #2210(
63504f0a
) -
Allow users to disable hardware keyboard shortcuts. The user can add
disable-hardware-keyboard-shortcuts=true
entry totermux.properties
file to disable hardware keyboard shortcuts. The default value isfalse
. Runningtermux-reload-settings
command will also update the behaviour instantaneously if changed. Note that forctrl+alt+p
to work, you need to unsetshortcut.rename-session = ctrl + n
. https://wiki.termux.com/wiki/Terminal_Settings. Closes #1825. (829cc398
,fcc0d362
) -
Request
android.permission.PACKAGE_USAGE_STATS
permission. The permission can be granted fromAndroid Settings
->System
->Usage Access
. Closes #2269. (865f29d4
) -
Add
TERMUX_API_VERSION
to termux shell environment. This can be used to check ifTermux:API
is installed and enabled for cases where users try to runtermux-api
commands and it hangs. (0cf3cef7
) -
Add
TERMUX_IS_DEBUGGABLE_BUILD
,TERMUX_APK_RELEASE
andTERMUX_APP_PID
to termux shell environment.The
TERMUX_IS_DEBUGGABLE_BUILD
env variable will be set to1
if termux APK is a debuggable APK and0
otherwise. Note that thedev_keystore.jks
shipped with termux app and plugin source code can also be used to create a release APK even though its mainly used for Github Debug Builds, in which case value will be0
.The
TERMUX_APK_RELEASE
will be set toGITHUB
,F_DROID
orGOOGLE_PLAY_STORE
depending on release type. It will be set toUNKNOWN
if signed with a custom key.The
TERMUX_APP_PID
will be set to the process of the main app process of the termux app package (com.termux
), assuming its running when shell is started, like fortermux-float
. This variable is included sincepidof com.termux
does not return anything for release builds. It does work for debug builds and over adb/root. However, you still won't be able to get additional process info withps
, like that of threads, even with the pid and will need to use adb/root. However,kill $TERMUX_APP_PID
will work fromtermux-app
andtermux-float
.These variables can be used by termux devs and users for custom logic in future depending on release type.
-
Add support for
~/.termux/termux.float.properties
. (bc779d2f
) -
! Convert
extra-keys
to agnosticism by moving them totermux-shared
library so that they can be imported and used by other apps for their own needs as long as they comply with GPLv3 license. Almost everything is customizable and has no dependency on termux specific logic. (2a74d43c
) -
Add support for
SHIFT
orSHFT
extra-keys
. Closes #1038. (2a74d43c
,91172409
) -
Add support for
PASTE
extra-keys
for pasting text from clipboard. (7d76e8b1
) -
Add support to long hold on
CTRL
,ALT
,SHIFT
andFN
to lock those control keys. They will not be released when you press another key and will only be released by pressing the respective control key again. Closes #2049, Closes #1861.2a74d43c
) -
Add support for
com.termux.execute.background_custom_log_level
andcom.termux.RUN_COMMAND_BACKGROUND_CUSTOM_LOG_LEVEL
. Check the commit and https://github.com/termux/termux-tasker#custom-log-level for details. (60f37bde
,e889d84d
,1259a212
,197979fd
) -
Add warning that hax support is not provided and asking questions will likely result in issue automatically closed or even ban. (
6409019a
) -
Add warning reports with (partial) screenshots of error reports instead of text will likely be automatically closed/deleted. (
7047bbef
) -
Add
termux-api
log level settings in termux app settings. (582e5693
) -
Add
termux-float
log level settings in termux app settings. (d55c1001
) -
Add
termux-widget
log level settings in termux app settings. (4953b126
) -
Add
isTermuxAppInstalled()
andisTermuxAppAccessible()
functions toTermuxUtils
. TheTermuxUtils.isTermuxAppInstalled()
function can be used by external apps to check if termux app is installed and enabled. TheTermuxUtils.isTermuxAppAccessible()
function can be used by termux plugin apps to check if termux app is installed, enabled, accessible as persharedUserId
andTERMUX_PREFIX_DIR_PATH
is accessible and has read, write and execute permission. (e5c05489
) -
Bootstrap error and report issue (optionally) will contain primary termux files
stat
info andlogcat
dumpUsers have been reporting issues with bootstrap installation (and
login
file access) failure on email and github but "most" have been useless since they don't follow instructions to debug the issue and report back. The real reason may depend on device. One could be that/data/data/com.termux
does not exist on the device in which case termux won't work on the device, at least without root. Other reasons could be wrong ownership or selinux context, selinux denials or attempting to install on external sd card (as reported by a user) where likely files dir was different from/data/data/com.termux/files
.This commit will save dev and possibly user time and automatically generate the required info to debug such issues. The
ls
command will generatestat
info for all the major termux directories and files so that existence or ownership issues can be shown. It will also runlogcat
command to take a dump (last3000
lines) in case other failures are being logged, like selinux denials as peravc
entries. It will also show if app is installed on external sd card. This info will automatically be shown on bootstrap install failure report.Moreover, users can generate termux files
stat
info andlogcat
dump manually too with terminal's long hold options menuMore
->Report Issue
option and selectingYES
in the prompt shown to add debug info. This can be helpful for reporting and debugging other issues. If the report generated is too large, thenSave To File
option in context menu (3 dots on top right) ofReportActivity
can be used and the file viewed/shared instead.Users must post complete report (optionally without sensitive info) when reporting issues, instead of (partial) screenshots which won't be accepted anymore.
There has been some design changes in android 11 for
/data/data
and/data/user/0
directory. You can check javadoc forisTermuxFilesDirectoryAccessible()
function inTermuxFileUtils
for details.(
24ea83d6
) -
! Added support to save reports to files and fixed large reports generating
TransactionTooLargeException
If
ReportActivity
was started with a large report, i.e a few hundredKB
, like for terminal transcript or other command output, the activity start would fail. To solve the issue, if the serialized size of the ReportInfo info object is aboveDataUtils.TRANSACTION_SIZE_LIMIT_IN_BYTES
(100KB
), it will be saved to a file in a cache directory/data/data/com.termux/cache/report_activity
as a serialized object and loaded when activity is started. Now these large reports can't be copied or shared with other apps since that would again result inTransactionTooLargeException
exceptions andShareUtils
automatically truncates the data (now from end) to100KB
length so that the exception doesn't occur. So now aSave To File
option has been added in context menu (3 dots on top right) ofReportActivity
so that large or small reports can be saved to a file if needed. They will be save in root of/storage/emulated/0
or whatever is the default public external storage directory. The filename would depend on type of report. The storage permissions will be asked if missing. On android11
, if you get permission denied errors even after granting permission, disable permission and grant it again. To solve privacy issues of report being saved to public storage since it may contain private info, an option for custom path will be added in future. The default directory is public storage instead of termux home since its easily accessible via all file managers or from pc. Instructing amateur users to get files viaSAF
from termux home is not something I wanna take on.Another issue is that
ReportActivity
itself may not be able to show the entire report since Android may throwOutOfMemoryError
exceptions if device memory is low. To solve this issue,ReportActivity
will truncate the report to1MB
from end that's shown to the user. It will add a header showing that report was truncated. To view the full report, the user will have to use theSave To File
option and view the file in an external app or on pc that supports opening large files. TheQuickEdit
app on Android has been a reliable one in my experience that supports large files, although it has max row/column limits too at a few hundred thousand, depending on android version.Despite all this,
OutOfMemoryError
exceptions could still be thrown if you try to view too large a report, like a few MB, since original report + the truncated report is still held in memory by the app and will consume2-3
times memory when saving. It's fun coding for android, right?The terminal transcript will not be truncated anymore that's generated via
Report Issue
option in terminal.(
351934a6
) -
Add
TextIOActivity
andTextIOInfo
. TheTextIOActivity
can be used to edit or view text based on various config options defined byTextIOInfo
and supportsmonospace
font and horizontal scrolling for editing scripts, etc. Current max text limit is95KB
, which can be increased in future. (c3280a94
) -
Add constants for launcher activities of termux plugins. (
5e2bec0f
) -
Add
Theme.MaterialComponents.DayNight.TermuxPrimaryActivity
theme can be used by activities for day and night mode. (0bf4b1ec
) -
! Support for delete intent for Notification.Builder in NotificationUtils. (
baacabdf
)
Changed
-
! Only allow
ContentProvider
access ifallow-external-apps
is set to true. Thetermux-open
andxdg-open
commands will now silently fail if value is not set totrue
. An error notification will be added in future versions. The caller app likeQuickEdit
may still show a flash error. Check https://github.com/termux/termux-tasker#allow-external-apps-property-optional on info on how to change the value. (dcedf394
) -
Move to semantic versioning for app and library versions and add commit hash and
github
to APK file names and add support forTERMUX_APP_VERSION_NAME
andTERMUX_APK_VERSION_TAG
,TERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS
,TERMUX_SPLIT_APKS_FOR_RELEASE_BUILDS
environmental variable inapp/build.gradle
. TheRELEASE_TAG
variable will not be used anymore since it may conflict with possibly other variables used by users. TheTERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS
can be set to0
to disable building split APKs which may be helpful for users building termux on device considering they will extra space and build time. Instructions for building are at termux/termux-packages#7227 (comment).export TERMUX_SPLIT_APKS_FOR_DEBUG_BUILDS=0 ./gradlew assembleDebug
The APK will be found at
./app/build/outputs/apk/debug/termux-app_debug_universal.apk
Note that F-Droid uses algorithm at https://gitlab.com/fdroid/fdroidserver/-/blob/2.1a0/fdroidserver/build.py#L746 to automatically detect built APKs, so ensure any modifications to location or file name are compliant. Auto updates are detected by
checkupdates
bot at https://gitlab.com/fdroid/fdroidserver/-/blob/master/fdroidserver/checkupdates.py(
177fb048
) -
Store
termux-widget
token synchronously to theSharedPreferences
file on creation. Attempt to solve termux/termux-widget#16. (4f66786b
) -
! Do not wait for the user to press enter for failed terminal session commands if plugin expects the result back. (
c19e01fc
) -
Make sure full path is included in
FileUtilsErrnos
. (f00738fe
) -
Disable
shrinkResources
for testing reproducible builds. (23b707a8
) -
Ensure bootstrap installation creates prefix and prefix staging directory before extraction. (
4e5f2c7e
) -
Ensure termux files directory is accessible before bootstrap installation and provide better info when running as secondary user/profile. Related issue #2168. (
6fa4b9b7
) -
Add selinux context info to termux files info of debug output. (
f97f07df
) -
Use multi-process SharedPrefernces for log level of plugin apps. Since termux-app runs in a separate process from other apps, if a user sets log level in termux settings, then it would require exiting the
termux-app
completely since android cachesSharedPrefernces
in memory and only writes to the file on app exit. Now updated value will be instantly written to the file so that plugins can directly read at startup. If plugins are already running, they would need to be restarted since usually log levels are loaded at startup. (9f1203f0
) -
Drawer
extra-keys
button will toggle instead of just opening. (16c56a96
) -
Renamed typo
TERMUX_ACTIVITY.ACTION_FAILSAFE_SESSION
toTERMUX_ACTIVITY.EXTRA_FAILSAFE_SESSION
. (b68a398f
) -
Set default cursor color to white. (
4a74618f
) -
Use millisecond timestamps for reports. (
98edf1fb
) -
Add gemini to the list of url regex protocols. Implemented by @the-blank-x in #2217. (
cac9a769
) -
Convert issue templates to forms. (
23d2c1f0
) -
Bump bootstrap to
v2022.01.07-r1
. (d37cd405
) -
Update LICENSE.md. (
fefbf2ec
)
Fixed
-
Fix
TermuxFileReceiverActivity
incorrect handling of intent extras. Closes #2247. (5a8c4f10
) -
Fix terminal cursor blinker not stopping when typing a character in non-gboard keyboards. (
8387b70f
) -
Fix extra-keys shift key not uppercasing for all soft keyboards and added docs for keyboard key characters mapping. (
994df1c4
) -
Ensure
FN
extra key is read by the terminal. (d1478fb6
) -
Use default values if
extra-keys
orextra-keys-style
termux.properties
values are empty. (fbb91149
) -
Fix
NullPointerException
when running bell/vibrate on Samsung devices on android 8 and handled deprecated codeApparently occurs on only Samsung android 8 devices and there is no fix for vibrator except catching the exception so that app doesn't crash. (
956e20e5
) -
Fix
Stdin
value not being logged for background execution commands. (486faf7f
) -
Prevent new plugin error or crash notifications overriding content of old ones. (
e7fc60af
) -
Fix
RunCommandService
notification not being cleared if an error was raised. (fabcc4fa
) -
Fix issue where wrong IME inputType would be set if termux was returned to from another app with text input view mode selected. (
2b7aa5e8
) -
Fix
extra-keys
repeatable input from getting stuck in some cases. Related issue #2156. (0308d6a6
) -
Fix calculation of row number for selection and URL clicking. Implemented by @trygveaa in #2146. (
54bb83de
) -
Ensure failsafe session can still be opened if files directory is not accessible and fix comment. (
a189f636
) -
Fix bootstrap checksum check if it contained leading zeros. (
97af7943
,32dcea72
) -
Fix markdown link generation. (
8ee0c5a6
) -
Fix permissions for
lib/apt/apt-helper
. (1b62f7c9
) -
Invert text color under block cursor. Implemented in #2228. Related issue #219. (
f65f384a
,19c6134c
) -
Revert "Changed: Bump compileSdkVersion to 31" commit
296ee60d
. We do not need to bump tocompileSdkVersion
31 currently, since I have decided not to bumpandroidx.window
to1.0.0-alpha10
or higher currently, since it has changed APIs and ViewUtils will break. Moreover, bumping compileSdkVersion to 31 requires openjdk 11 in build environment, which will break Jitpack library build and possibly still F-Droid as well, unless changes are made. (c59835ed
) -
Fix Discord badge. Implemented by @wmcbtech30 in #2199. (
1578ab55
) -
Update urls to https. Implemented by @TotalCaesar659 in #2190. (
9a306ca1
)