Termux 应用-Github 项目
本文章属 up 翻译,侵权即删
Termux
注意,本仓库仅针对应用自身( 用户界面与终端仿真 ),对于可用包 ( packages ) 则在应用内,请查看 termux/termux-packages
关于可用的 Temux 包管理快速指导位于 Package Management

#2366

@termux 正在寻找 Termux 应用维护者,他们将参与开发新功能,修复 bugs 以及评估当前(@fornwall)非活跃的 pull requests。
议题
Termux 应用与插件
安装
卸载
重要链接
调试
关于维护者与贡献者
Forking
Termux:API
Termux:Boot
Termux:Float
Termux:Styling
Termux:Tasker
Termux:Widget
最新版本是 v0.118.0
注意:非常推荐你更新到 v0.118.0
或者更高版本的 ASAP,以修复各种各样的 bug,包含严格的易损性全局可读(world-readable)报告位于此处
Termux 可通过以下列出不同的源处获得,当然仅支持 Android 7及以上。 Android 5
与 6
在 2020-01-01
部分,了解细节。你可能也考虑卸载前 ,然后在重新安装不同源的软件后进行恢复。
在下面的段落中,"bootstrap" 指的是极小的包,与 termux-app
一同装载以启动一个工作 shell 环境。它是一个 zip 文件,通过此处
此处
你不需要下载安装 F-Droid
应用来安装 Termux. 你可以直接在F-Droid
的 Termux 对应的网站上点击底部版本部分中任何一个下载 apk 的链接进行下载。
一旦在 Github
上发布了新的版本,F-Droid
通常要几天( 有些甚至一个星期或者更久 ) 才能完成可用的更新。F-Droid
的发布是根据检测
F-Droid
应用通常不会通知你更新,你需要手动的在 Update
( 更新 ) 页面下拉以检查更新。确保该应用的电池优化选项已关闭,请查阅 https://dontkillmyapp.com/ 以了解如何操作。
只有通用的应用才会被发布,该应用能运行在任何支持的架构上。应用与 bootstrap 安装将占用 ~180MB
的磁盘空间。F-Droid
不支持
Termux 应用可在 GitHub
的 GitHub Releases( i )
与 GitHub Build Action( j )
中获得,前者可获得大于大于等于 0.118.0
版本的 Termux,后者通过工作流程获取。
GitHub 发行版
应用将列于 Assets
发行版下拉菜单中。当一个新版本发布时,它们会自动的附加到其中。
当工作流程运行之后,GitHub Build
活动产生的应用将列在 Artifacts
中。此工作流程通过仓库每个 commit/push 参考生成应用,用户可用于无需等待发行版进行自主生成应用,用于立即尝试最新发布功能之外的特性,用于测试其拉请求。注意,对于活动工作流,你需要登录 Github
Github 中两个部分获取的应用都是 debuggable( l )
( 可调试的 ),并且可兼容其他 Github 源应用,但无法兼容除 Github 源之外的应用。
通用版与特定架构版都已发布。如果使用通用版,应用与 bootstrarp 安装大小为 ~180MB
,如果使用特定架构版安装大小为 ~120MB
。查阅此处
安全警告: Github 上的 APK 文件使用测试密钥,曾被 共享到社区( n )中。这不是官方开发者密钥,每个人都可以使用该密钥生成自己的测试版本。当使用除 https://github.com/termux/termux-app 链接之外的 Github 构建的 Termux 时,你要非常小心。任何人都有可能使用密钥伪装恶意的 Termux Github 可用的构建更新。再三考虑是否安装通过 Telegaram 或者其他社交媒体途径获取的 Termux,及其插件应用。如果你的设备被恶意软件劫持,我们也无力回天。
测试密钥不要用于模仿 @termux,而且要杜绝这种使用方式。我们不信任这个密钥,并且它在用户生成内容中时分简单地就能检测到。
(废弃)
Termux 及其插件应用不在更新于 Google Play 商店
Termux 开发者无法接触到 Play 商店 Termux 发行版控制台账户,因此无法移除 app. 我们鼓励,并且建议你尽快移步到 F-Droid
和 GitHub
发行版,对于其他通过社交媒体的了解 Termux 的用户也一样。
如果你在 Play 商店中购买了插件应用,你不需要再次购买。所有的插件在 F-Droid
和 Github
上都是免费的。
在切换安装源之前,你可以备份所有的基于 $HOME/
与 $PREFIX/
的数据,在切换源安装之后,再进行恢复。卸载之前,如需备份请跟随 Backing up Termux
当前没有任何办法解决安卓 10
的问题,同样也不会在任何时候恢复谷歌商店的更新。我们当前将继续针对 sdk 28
的更新。因此,构建谷歌商店的版本,以及等待更新恢复是没有意义的事情。如果当前你有任何理由不想转移到F-Driod
或者Github
源上,那至少检查 包管理器
注意,在升级过程中 python
可能会打断安装/执行脚本,这是因为 python 已经不再兼容了。更进一步的说,你将不能降级包的版本,这是由于 termux 储存库仅维持最新包的版本,如果需要与构建包
如果你计划将来一直待在谷歌商店源,那么需要在谷歌商店禁用 Termux 自动更新,这是由于谷歌商店最后的 termux 更新将禁用 Termux 应用,届时,你无法降级,并强制你转到其他源上(这是因为应用将不再工作)。只有一种方式备份 termux-app
数据,我们应该提供了。termux-tools
版本 >= 0.135 时,将在顶部显示横幅: You are likely using a very old version of Termux, probably installed from the Google Play Store.
(你似乎正在使用一个非常旧的 termux 版本,请移至其他源 ),你可以运行 rm -f /data/data/com.termux/files/usr/etc/motd-playstore
命令,然后重启应用以移除这个说明。
为何禁用?
谷歌商店应用有着多个严重的漏洞(报告位于 https://termux.github.io/general/2022/02/15/termux-apps-vulnerability-disclosures.html),由于不能通过更新修复,使用旧版本的用户将更容易遭受攻击。
由于不推荐的东西被删除,所以应当被禁用,并且之后某个时间将停止支持,这是最佳的做法。距离发布废弃的通知已经过去了数月,更新也在 2020 年 9 月 29 戛然而止。
新版本拥有海量的新特性并且修复众多问题,你可以在
GitHub Releases( t )
中查看几乎所有你错过的改变日志。额外的细节通常由commit messages( u ) 提供。使用旧版本的用户经常在数月之前多个库多个支持论坛中报告错误,我们不得不进行处理。@termux 的维护者通常在闲暇时间进行维护,最主要是不收一分钱(可能是这样翻译吧),来工作到开发中、提供相关支持,还不得不一遍又一遍花费仅有的那点时间的重复解决老的问题,狗都不做(皮一下)。谷歌商店中
termux-app
界面已经被标识为损坏的应用
,即便如此明显的停止更新提示,还有人看不见,下载安装后依然提交错误!😭在安装
termux-app
的插件应用时,支付页面不可用,这是因为一方面储存库某些错误,其中还有一些漏洞,另一方面是道德上过不去。旧版本没有像样的记录/调试,以及崩溃报告支持。没有日志或者细节信息的漏洞报告意义不大。
对于我们来说解决包相关的问题以及提供自定义的应用更新方法更加简单了,如果还在使用旧版本的用户那想必是惭凫企鹤了。举个例子, bintray shutdown
如果用户想从他们设备中移除 Termux 或者切换到不同安装源( 25 ) 时,卸载是必须的。你也可能会考虑在卸载之前备份Termux( 26 )
为完全卸载 Termux,你必须卸载任何以及所有存在的 Termux 或者它的插件应用,我们将其列在其中( a )
转到 Android Settings->
Applications (安卓设置->应用) ,然后寻找那些应用。如果你的设备支持搜索功能,你也可以在应用列表中搜索 termux
社区
所有可用的社区链接在此
主要社区如下:
Termux Reddit 社区
Termux User Matrix Channel (Gitter)( 29 )
Termux Dev Matrix Channel (Gitter)( 30 )
Termux Twitter
Termux 支持的邮箱
Termux Wiki
Termux App Wiki
Termux Packages Wiki
FAQ
Termux 文件系统布局
与 Linux 的差异
包管理
远程访问
备份 Termux
终端设置
触摸键盘
安卓储存及同其他应用共享数据
安卓 APIs
将 Termux 包从 Bintray 移动至 IPFS
其他应用通过 RUN_COMMAND intent 发送命令至 Termux 内运行
Termux 与 Android 10
终端资源
XTerm control sequences
vt100.net
终端代码 (ANSI 与 终端信息等价物)
VTE (libvte): 终端仿真器小组件 GTK+ ,主要用在 gnome-终端. Source
iTerm 2: OS X 终端应用. Source
Konsole: KDE 终端应用. Source( 59 ), 特定 测试( 60 ), Bugs( 61 ) 与 愿景( 62 )
hterm: 来自 Chromium JavaScript 终端 . Source
xterm: 终端仿真器的鼻祖. Source
Connectbot: Android SSH 客户端. Source
Android Terminal Emulator: 安卓终端应用,Termux 终端处理基于它。 Source
Termux
应用的问题,在 Termux
主界面,靠近左侧中间的部分,按住边缘向中间滑动,此时你会看到一个界面,这个界面左上方的齿轮是设置,突出显示的 [1]
是当前活动会话,左下方的KEYBAOARD
是调起键盘,NEW SESSION
是新建会话, 点击齿轮图标进入到 Termux
的设置,点击Termux
->Debugging
->Log Level
设置属性 logcat
Log Level
,Log Level
中有几个不同的属性供插件使用。默认的 Log Level
为 Normal
, 当前时期的 Verbose
记录额外的信息。最好在调试后将 log Level 设置回 Normal
,这是因为隐私数据可能出现另外的情况,如:在常规的操作或者其他操作中,隐私数据可能会传递到 logcat
中,额外的记录会增大执行时间。
插件应用 不会执行它们自己的命令,但是会发送执行的意图(intents)到 Termux
应用中,他有自己的 log Level ,可在Termux
应用中进行设置(Settings->Termux->Debugging->Log Level)。因此,你必须分别为 Termux
与 插件应用设置 log Level 以获取所有的信息。
一旦 log Level 被设置,你可以在 Termux
应用终端运行 logcat
命令以查看实时的日志( 可以使用 ctr+c 来停止 ),也可以使用 logcat -d > logcat.txt
来转储日志。你还可以通过电脑上的 ADB
来查看日志。要了解更多信息,请查阅官方安卓 logcat
指南
stat
信息以及 logcat 的自动转储信息。通过长按终端,termux 会出现一个上下文菜单,点击 More
->Report Issue
选项,在提示中选择 YES
来添加调试信息。这对于报告(错误)与调试其他问题非常有用。如果生成的报告太大,可以在报告生成页面点击右上角的三个点,然后选择 Save to File
(保存为一个文件),使用保存的文件替代报告信息。
当报告问题(Issues)时,用户必须发送完整的报告( 敏感信息可选 )。使用( 不完整的 )屏幕截图的错误报告代替文本报告时,该Issue可能被自动关闭或删除。
Log levels
Off
- 不记录任何信息Normal
- 开始记录错误,警告,信息消息以及栈追踪Debug
- 开始记录调试信息Verbose
termux-shared
关于新特性
Changed 关于在已存在的方法中做出的改变
Deprecated 关于不久将来要移除的特性
Removed 关于当前移除的特性
Fixed 关于任何 bug 的修复
Security 关于缺陷的场景
Docs
Keep a Changelog
versionName
(版本名) 位于 Termux 的 build.gradle
文件中,插件应用必须遵循 语义学 2.0.0
版本规范
检查
TermuxConstants
java文档以了解改变包名时,需要做出什么改变。你可能需要给新的包名重新编译 bootstrap zip。在 此处
当前,并非所有的插件使用
termux-shared
( termux共享 ) 库的TermuxConstants
,或是硬编码com.termux
的值,这需要你手动打补丁如果你 forking termux 插件,请查阅 Forking 与本地开发
所有链接的脚注:
1. https://termux.com/
2. https://github.com/termux/termux-packages
3. https://github.com/termux/termux-packages/wiki/Package-Management
4. https://github.com/termux/termux-app/issues/2366
5. https://issuetracker.google.com/u/1/issues/205156966
6. https://github.com/agnostic-apollo/Android-Docs/blob/master/en/docs/apps/processes/phantom-cached-and-empty-processes.md
7. https://github.com/termux/termux-app/issues/2366#issuecomment-1237468220
8. https://github.com/termux/termux-app/issues/1072
9. https://github.com/termux/termux-app#Termux-App-and-Plugins
10. https://github.com/termux/termux-app#Installation
11. https://github.com/termux/termux-app#Uninstallation
12. https://github.com/termux/termux-app#Important-Links
13. https://github.com/termux/termux-app#Debugging
14. https://github.com/termux/termux-app#For-Maintainers-and-Contributors
15. https://github.com/termux/termux-app#Forking
16. https://github.com/termux/termux-api
17. https://github.com/termux/termux-boot
18. https://github.com/termux/termux-float
19. https://github.com/termux/termux-styling
20. https://github.com/termux/termux-tasker
21. https://github.com/termux/termux-widget
22. https://termux.github.io/general/2022/02/15/termux-apps-vulnerability-disclosures.html
23. https://www.reddit.com/r/termux/comments/dnzdbs/end_of_android56_support_on_20200101/
24. https://archive.org/details/termux-repositories-legacy
25. https://github.com/termux/termux-app#Installation
26. https://wiki.termux.com/wiki/Backing_up_Termux
27. https://wiki.termux.com/wiki/Community
28. https://reddit.com/r/termux
29. https://matrix.to/#/#termux_termux:gitter.im
30. https://matrix.to/#/#termux_dev:gitter.im
31. https://twitter.com/termuxdevs
32. mailto:support@termux.dev
33. https://wiki.termux.com/wiki/
34. https://github.com/termux/termux-app/wiki
35. https://github.com/termux/termux-packages/wiki
36. https://wiki.termux.com/wiki/FAQ
37. https://github.com/termux/termux-packages/wiki/Termux-file-system-layout
38. https://wiki.termux.com/wiki/Differences_from_Linux
39. https://wiki.termux.com/wiki/Package_Management
40. https://wiki.termux.com/wiki/Remote_Access
41. https://wiki.termux.com/wiki/Backing_up_Termux
42. https://wiki.termux.com/wiki/Terminal_Settings
43. https://wiki.termux.com/wiki/Touch_Keyboard
44. https://wiki.termux.com/wiki/Internal_and_external_storage
45. https://wiki.termux.com/wiki/Termux:API
46. https://github.com/termux/termux-packages/issues/6348
47. https://github.com/termux/termux-app/wiki/RUN_COMMAND-Intent
48. https://github.com/termux/termux-packages/wiki/Termux-and-Android-10
49. https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
50. https://vt100.net/
51. https://wiki.bash-hackers.org/scripting/terminalcodes
52. https://github.com/GNOME/vte
53. https://bugzilla.gnome.org/buglist.cgi?quicksearch=product%3A%22vte%22+
54. https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&chfield=resolution&chfieldfrom=-2000d&chfieldvalue=FIXED&product=vte&resolution=FIXED
55. https://github.com/gnachman/iTerm2
56. https://gitlab.com/gnachman/iterm2/issues
57. https://iterm2.com/documentation.html
58. https://iterm2.com/documentation-escape-codes.html
59. https://projects.kde.org/projects/kde/applications/konsole/repository
60. https://projects.kde.org/projects/kde/applications/konsole/repository/revisions/master/show/tests
61. https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=konsole
62. https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=konsole
63. https://github.com/chromium/hterm
64. https://github.com/chromium/hterm/blob/master/js/hterm_vt_tests.js
65. https://groups.google.com/a/chromium.org/forum/#!forum/chromium-hterm
66. https://invisible-island.net/datafiles/release/xterm.tar.gz
67. https://github.com/connectbot/connectbot
68. https://github.com/jackpal/Android-Terminal-Emulator
69. https://developer.android.com/studio/command-line/logcat
70. https://github.com/termux/termux-app/blob/master/termux-shared
71. https://github.com/termux/termux-app/releases/tag/v0.109
72. https://github.com/termux/termux-app/blob/master/termux-shared/src/main/java/com/termux/shared/termux/TermuxConstants.java
73. https://github.com/termux/termux-packages/wiki/Building-packages
74. https://github.com/termux/termux-app/wiki/Termux-Libraries
75. https://github.com/termux/termux-app/wiki/Termux-Libraries#forking-and-local-development
76. https://www.conventionalcommits.org/
77. https://github.com/termux/create-conventional-changelog
78. https://github.com/olivierlacan/keep-a-changelog
79. https://semver.org/spec/v2.0.0.html
80. https://github.com/termux/termux-app/issues/1983
81. https://github.com/termux/termux-app/issues/2081#issuecomment-865280111
82. https://github.com/termux/termux-packages/wiki/For-maintainers#build-bootstrap-archives
83. https://github.com/termux/termux-app/wiki/Termux-Libraries#forking-and-local-development
a. https://github.com/termux/termux-app#Termux-App-and-Plugins
b. https://developer.android.com/guide/topics/manifest/manifest-element
c. https://github.com/termux/termux-app#uninstallation
d. https://wiki.termux.com/wiki/Backing_up_Termux
e. https://github.com/termux/termux-packages/releases
f. https://f-droid.org/en/packages/com.termux/
g. https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.termux.yml
h. https://github.com/termux/termux-app/pull/1904
i. https://github.com/termux/termux-app/releases
j. https://github.com/termux/termux-app/actions/workflows/debug_build.yml?query=branch%3Amaster+event%3Apush
k. https://github.com/login
l. https://developer.android.com/studio/debug
m. https://github.com/termux/termux-app/issues/2153
n. https://github.com/termux/termux-app/blob/master/app/testkey_untrusted.jks
o. https://play.google.com/store/apps/details?id=com.termux
p. https://github.com/termux/termux-packages/wiki/Termux-and-Android-10
q. https://wiki.termux.com/wiki/Backing_up_Termux
r. https://github.com/termux/termux-packages/wiki/Package-Management
s. https://github.com/termux/termux-packages/wiki/Building-packages
t. https://github.com/termux/termux-app/releases
u. https://github.com/termux/termux-app/commits/master
v. https://github.com/termux/termux-packages/wiki/Package-Management

up主能力有限,有些地方不通顺,或者出现错误,欢迎在评论区指正
本文原地址: https://github.com/termux/termux-app
B站不支持跳转站外链接,请复制到浏览器打开原文地址