Termux 應用-Github 項目
本文章屬 up 翻譯,侵權即刪
Termux
注意,本倉庫僅針對應用自身( 用戶界面與終端仿真 ),對于可用包 ( packages ) 則在應用內,請查看 ?termux/termux-packages
關于可用的 Temux 包管理快速指導位于 ?Package Management

?#2366

@termux 正在尋找 Termux 應用維護者,他們將參與開發(fā)新功能,修復 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
部分,了解細節(jié)。你可能也考慮卸載前 ,然后在重新安裝不同源的軟件后進行恢復。
在下面的段落中,"bootstrap" 指的是極小的包,與 termux-app
一同裝載以啟動一個工作 shell 環(huán)境。它是一個 zip 文件,通過此處
此處
你不需要下載安裝 F-Droid
應用來安裝 Termux. 你可以直接在F-Droid
的 Termux 對應的網站上點擊底部版本部分中任何一個下載 apk 的鏈接進行下載。
一旦在 Github
上發(fā)布了新的版本,F-Droid
通常要幾天( 有些甚至一個星期或者更久 ) 才能完成可用的更新。F-Droid
的發(fā)布是根據檢測
F-Droid
應用通常不會通知你更新,你需要手動的在 Update
( 更新 ) 頁面下拉以檢查更新。確保該應用的電池優(yōu)化選項已關閉,請查閱 https://dontkillmyapp.com/ 以了解如何操作。
只有通用的應用才會被發(fā)布,該應用能運行在任何支持的架構上。應用與 bootstrap 安裝將占用 ~180MB
的磁盤空間。F-Droid
不支持
Termux 應用可在 GitHub
的 ?GitHub Releases( i )
與 GitHub Build Action( j )
中獲得,前者可獲得大于大于等于 0.118.0
版本的 Termux,后者通過工作流程獲取。
GitHub 發(fā)行版
應用將列于 Assets
發(fā)行版下拉菜單中。當一個新版本發(fā)布時,它們會自動的附加到其中。
當工作流程運行之后,GitHub Build
活動產生的應用將列在 Artifacts
中。此工作流程通過倉庫每個 commit/push 參考生成應用,用戶可用于無需等待發(fā)行版進行自主生成應用,用于立即嘗試最新發(fā)布功能之外的特性,用于測試其拉請求。注意,對于活動工作流,你需要登錄 Github
Github 中兩個部分獲取的應用都是 debuggable( l )
( 可調試的 ),并且可兼容其他 Github 源應用,但無法兼容除 Github 源之外的應用。
通用版與特定架構版都已發(fā)布。如果使用通用版,應用與 bootstrarp 安裝大小為 ~180MB
,如果使用特定架構版安裝大小為 ~120MB
。查閱此處
安全警告: Github 上的 APK 文件使用測試密鑰,曾被 共享到社區(qū)( n )中。這不是官方開發(fā)者密鑰,每個人都可以使用該密鑰生成自己的測試版本。當使用除 https://github.com/termux/termux-app 鏈接之外的 Github 構建的 Termux 時,你要非常小心。任何人都有可能使用密鑰偽裝惡意的 Termux Github 可用的構建更新。再三考慮是否安裝通過 Telegaram 或者其他社交媒體途徑獲取的 Termux,及其插件應用。如果你的設備被惡意軟件劫持,我們也無力回天。
測試密鑰不要用于模仿 @termux,而且要杜絕這種使用方式。我們不信任這個密鑰,并且它在用戶生成內容中時分簡單地就能檢測到。
(廢棄)
Termux 及其插件應用不在更新于 Google Play 商店
Termux 開發(fā)者無法接觸到 Play 商店 Termux 發(fā)行版控制臺賬戶,因此無法移除 app. 我們鼓勵,并且建議你盡快移步到 F-Droid
和 GitHub
發(fā)行版,對于其他通過社交媒體的了解 Termux 的用戶也一樣。
如果你在 Play 商店中購買了插件應用,你不需要再次購買。所有的插件在 F-Droid
和 Github
上都是免費的。
在切換安裝源之前,你可以備份所有的基于 $HOME/
與 $PREFIX/
的數據,在切換源安裝之后,再進行恢復。卸載之前,如需備份請跟隨 Backing up Termux
當前沒有任何辦法解決安卓 10
的問題,同樣也不會在任何時候恢復谷歌商店的更新。我們當前將繼續(xù)針對 sdk 28
的更新。因此,構建谷歌商店的版本,以及等待更新恢復是沒有意義的事情。如果當前你有任何理由不想轉移到F-Driod
或者Github
源上,那至少檢查 包管理器
注意,在升級過程中 python
可能會打斷安裝/執(zhí)行腳本,這是因為 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),由于不能通過更新修復,使用舊版本的用戶將更容易遭受攻擊。
由于不推薦的東西被刪除,所以應當被禁用,并且之后某個時間將停止支持,這是最佳的做法。距離發(fā)布廢棄的通知已經過去了數月,更新也在 2020 年 9 月 29 戛然而止。
新版本擁有海量的新特性并且修復眾多問題,你可以在
GitHub Releases( t )
中查看幾乎所有你錯過的改變日志。額外的細節(jié)通常由commit messages( u ) 提供。使用舊版本的用戶經常在數月之前多個庫多個支持論壇中報告錯誤,我們不得不進行處理。@termux 的維護者通常在閑暇時間進行維護,最主要是不收一分錢(可能是這樣翻譯吧),來工作到開發(fā)中、提供相關支持,還不得不一遍又一遍花費僅有的那點時間的重復解決老的問題,狗都不做(皮一下)。谷歌商店中
termux-app
界面已經被標識為損壞的應用
,即便如此明顯的停止更新提示,還有人看不見,下載安裝后依然提交錯誤!??在安裝
termux-app
的插件應用時,支付頁面不可用,這是因為一方面儲存庫某些錯誤,其中還有一些漏洞,另一方面是道德上過不去。舊版本沒有像樣的記錄/調試,以及崩潰報告支持。沒有日志或者細節(jié)信息的漏洞報告意義不大。
對于我們來說解決包相關的問題以及提供自定義的應用更新方法更加簡單了,如果還在使用舊版本的用戶那想必是慚鳧企鶴了。舉個例子, bintray shutdown
如果用戶想從他們設備中移除 Termux 或者切換到不同安裝源( 25 )?時,卸載是必須的。你也可能會考慮在卸載之前備份Termux( 26 )
為完全卸載 Termux,你必須卸載任何以及所有存在的 Termux 或者它的插件應用,我們將其列在其中( a?)
轉到 Android Settings->
Applications (安卓設置->應用) ,然后尋找那些應用。如果你的設備支持搜索功能,你也可以在應用列表中搜索 termux
社區(qū)
所有可用的社區(qū)鏈接在此
主要社區(qū)如下:
Termux Reddit 社區(qū)
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 發(fā)送命令至 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
,這是因為隱私數據可能出現另外的情況,如:在常規(guī)的操作或者其他操作中,隱私數據可能會傳遞到 logcat
中,額外的記錄會增大執(zhí)行時間。
插件應用 不會執(zhí)行它們自己的命令,但是會發(fā)送執(zhí)行的意圖(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)時,用戶必須發(fā)送完整的報告( 敏感信息可選 )。使用( 不完整的 )屏幕截圖的錯誤報告代替文本報告時,該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
版本規(guī)范
檢查
TermuxConstants
java文檔以了解改變包名時,需要做出什么改變。你可能需要給新的包名重新編譯 bootstrap zip。在 此處
當前,并非所有的插件使用
termux-shared
( termux共享 ) 庫的TermuxConstants
,或是硬編碼com.termux
的值,這需要你手動打補丁如果你 forking termux 插件,請查閱 ?Forking 與本地開發(fā)
所有鏈接的腳注:
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主能力有限,有些地方不通順,或者出現錯誤,歡迎在評論區(qū)指正
本文原地址:?https://github.com/termux/termux-app
B站不支持跳轉站外鏈接,請復制到瀏覽器打開原文地址