It happens all time when i try to open Termux
highscreen pure
android 5.0.2 with kernel 3.10.54


Well, do you have a network connection? Can you access http://termux.net/bootstrap/ in a browser?
yep, i have

@DrLafa Are you connected through a proxy? If you are, is everything configured correctly?
No, I do not have a proxy
I guess the error dialog should be improved to actually show the stack trace happening (and add a button to copy it to the clipboard).
@DrLafa in your screenshot you are using wifi and 3G. Try with only one connection, the 3G one.
Hello, I have exactly the same problem. Two days ago I installed Termux successfully on my (rooted) tablet. Then I wiped out the tablet, rooted it again, and have turned on the Android adaptable storage. And now I'm getting the above error.
Samsung Galaxy Tab A (2016) Wi-Fi version, Android 7.0. Yes, I've got my wi-fi turned on and internet available. I have tested that several times with the same result.
Problem resolved. It was caused by Termux being installed into the adoptable storage on the SD-card.
After moving Termux to the internal storage, the problem disappeared and Termux began to work.
Today I just downloaded this from my 3G. It still working now with wifi.
Don't close this . We need to fix this. Termux should be able to run in Adoptable storage. Termux installation can get very large
@biojet1 we can't fix it fully. It isn't allowed to execute files in shared (adoptable) storage due to Androids security so it wouldn't be possible to have all of termux there.
It would be possible to move some files to shared storage but I'm not sure if we would save that much space.
@Grimler91
It isn't allowed to execute files in shared (adoptable) storage due to Androids security
It maybe true for normal devices, but it's not true for rooted devices, I moved termux files folder to external sd (adopted as internal) and were able to execute binaries in usr/bin like gpg and login.
So I think termux should be able to install its bootstrap packages. My termux files folder is ~600MB and I don't want it to be in my main storage.
its due to the permission issue, set the permissions as it is
Experiencing the same problem after upgrading my Nexus 5X from LineageOS 14.01 to 15.01 (Android 7 to Android 8) and reinstalling after factory reset. Termux is installed on "internal storage" ( /data/app/. Nexus 5X only has one storage). Tried Wi-Fi and 3G, no luck so far. Any ideas?
is use network line cable is also having this problem
How long after "./start-ubuntu.sh script" should it take to install /launch Ubuntu in my note 4? It's just sitting there and has been for a while (5-10 minutes) should I be seeing some kind of activity?
Keeps saying "not found" after "./start-ubuntu.sh script".
Can I download the files needed, place them in a proper folder (and where should that be) and launch it that way?
I found a solution. I just turned on my vpn. I was connected to Norway. the application that I used is "usa vpn"
I'm from Iran. I had the same problem but I could access http://termux.net/bootstrap/ from browser, I connected myself to tor and used vpn mode from orbot and then termux worked.
Hi guys I'm really confused what's going on ? 😑
I also have the same problem .
App is installed in internal storage .
I used 4G and WiFi .
I used VPN ( turbo VPN , Orbot , USA VPN ) .
I also 2 times reinstalled Termux .
I have rooted Redmi 4X ( Santoni ) with custom ROM android pie .
What should i do then ? Any idea ?🤔
This is unbelievable 😧
i just reinstalled it again and it's working properly , anyway i didn't understand what was wrong please tell us your thoughts maybe it will be useful for another person .
I am not able to finish Termux installation on 4k AndroidTV (Android 8.0, kernel 3.10.79). When launching the app for the first time, the "Installing..." window appears, remains couple of seconds, disappears and Android home screen comes back. Every other attempt to launch Termux fails too. Screen just blinks and Android comes back. I tried last tree versions (0.73 0.74, 0.75).
Is there any idea how make Termux running on this AndroidTV? At least any hint on how to inspect what is happening.
BTW: http://termux.net/bootstrap/ is accessible from this TV.
Make sure Termux isn't installed on "external storage" or something like this.
Make sure Termux isn't installed on "external storage" or something like this.
Thanks for reply. No, it is not. There is no external storage in this TV set. Just internal. BTW according to Android application info Termux occupies some 40MB on storage. But I cannot find it anywhere. Tried to find "com.termux" and just "termux" too, but have found nothing.
BTW I have Termux installed and working on my phone too. According to Android info it takes 50MB on internal storage. I found its dir in Android/data/com.termux. But it is empty (no files, just one empty subdir "files"). So where is Termux installed actually?
It installs stuff to /data/data/com.termux/files/usr which inaccessible from other applications. All kinds of "external" storage (including shared storage) are unsupported due to permissions and handled file-type issues.
Thx for explanation. But this unfortunately means I cannot inspect the installation directory in order to find the reason why it cannot finish the install on Android TV.
You can. You just need to:
When received dialog "installation aborted", tap somewhere outside of dialog box to dismiss it.
Swipe right to open the drawer.
In drawer, long tap on "new session" then click "failsafe".
You are now inside shell and can inspect the private Termux folders even in case if environment can't be bootstrapped.
There should be more simple way to do so (at least with Android version higher than 7) - long tap on application icon, then just click "failsafe". But I'm unsure whether installation dialog will appear or not.
Unfortunately I do not receive any dialog "Installation aborted". Installation just silently crash at dialog "Installing...". If I run the application again, it crash immediately afterwards. I have no chance to open the drawer. And there is no "failsafe" option on long tap the app icon even though this is Android 8. I cannot get into the app in any way.
In the meanwhile I successfully installed Termux on tablet. Have it already installed and working on phone. But on AndroidTV still no luck.
I still cannot install Termux on Android TV (running on TCL), here is the logcat output during Termux installation:
130|tcl_eu:/ $ logcat | grep Termux
10-08 20:46:50.647 11428 11428 I Finsky : [2] ozk.a(12): Showing notification: [ID=package installing, Tag=null, Title=Termux, Message=Installing "Termux"…, returnCode=-1, uiElementType=929]
10-08 20:46:52.719 11428 11428 I Finsky : [2] ozk.a(12): Showing notification: [ID=com.termux, Tag=null, Title=Termux, Message=Successfully installed, returnCode=-1, uiElementType=901]
10-08 20:46:54.135 3089 11854 I BI_Se/com.tcl.bi.service.BiReportService.onHandleIntent(L:36)1.9.100: IntentService[BiReportService]:extraString : {"userId":"xxx","projectId":"xxx","channel":"tcl","packageNm":"com.tcl.appmarket2","appNm":"App store","appVersionName":"6.0.1011","appVersionCode":"601011","type":"3IX60BWSC6","extra_map":[{"key":"newVersionCode","value":"0"},{"key":"apkName","value":"Termux"},{"key":"oldVersionCode","value":"0"},{"key":"operateTimes","value":"1"},{"key":"isAppstoreInside","value":"1"},{"key":"operateType","value":"install"},{"key":"installFrom","value":"otherAppInstall"},{"key":"packageName","value":"com.termux"}]}
10-08 20:46:54.152 11764 11818 I BI_SDK __/com.tcl.appmarket2/bi.com.tcl.bi.DataReport.sendMessageToService(L:372)3.1: BI_SDK_workThread : start Service message : {"userId":"xxx","projectId":"xxx","channel":"tcl","packageNm":"com.tcl.appmarket2","appNm":"App store","appVersionName":"6.0.1011","appVersionCode":"601011","type":"3IX60BWSC6","extra_map":[{"key":"newVersionCode","value":"0"},{"key":"apkName","value":"Termux"},{"key":"oldVersionCode","value":"0"},{"key":"operateTimes","value":"1"},{"key":"isAppstoreInside","value":"1"},{"key":"operateType","value":"install"},{"key":"installFrom","value":"otherAppInstall"},{"key":"packageName","value":"com.termux"}]}
After installation I do allow the storage permission in Android apps settings. I already know it needs that but do not asks itself for. Then I run Termux for the first time after installation, concat output follows:
130|tcl_eu:/ $ logcat | grep Termux
10-08 20:49:55.020 1572 2213 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LEANBACK_LAUNCHER] flg=0x10000000 pkg=com.termux cmp=com.termux/.app.TermuxActivity} from uid 1000
10-08 20:49:55.089 1572 2771 I ActivityManager: Start proc 12223:com.termux/u0a86 for activity com.termux/.app.TermuxActivity
10-08 20:49:55.919 1281 1281 D SurfaceFlinger: duplicate layer name: changing com.termux/com.termux.app.TermuxActivity to com.termux/com.termux.app.TermuxActivity#1
10-08 20:49:56.179 1572 1785 I ActivityManager: Displayed com.termux/.app.TermuxActivity: +1s125ms
10-08 20:49:57.178 12223 12223 W ViewRootImpl[TermuxActivity]: Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MOVE_END, scanCode=0, metaState=0, flags=0x6, repeatCount=0, eventTime=6396992, downTime=6396992, deviceId=-1, source=0x0 }
10-08 20:49:57.178 12223 12223 W ViewRootImpl[TermuxActivity]: Cancelling event due to no window focus: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MOVE_END, scanCode=0, metaState=0, flags=0x26, repeatCount=0, eventTime=6396992, downTime=6396992, deviceId=-1, source=0x0 }
10-08 20:50:07.660 12223 12223 E AndroidRuntime: at com.termux.app.TermuxService.b(SourceFile:3)
10-08 20:50:07.660 12223 12223 E AndroidRuntime: at com.termux.app.TermuxService.a(SourceFile:18)
10-08 20:50:07.660 12223 12223 E AndroidRuntime: at com.termux.app.TermuxActivity.a(SourceFile:27)
10-08 20:50:07.660 12223 12223 E AndroidRuntime: at com.termux.app.TermuxActivity.g(SourceFile:4)
10-08 20:50:07.665 1572 4509 W ActivityManager: Force finishing activity com.termux/.app.TermuxActivity
10-08 20:50:07.754 1572 4508 I WindowManager: WIN DEATH: Window{aeed427 u0 com.termux/com.termux.app.TermuxActivity}
10-08 20:50:07.756 1572 1594 W ActivityManager: Scheduling restart of crashed service com.termux/.app.TermuxService in 1000ms
10-08 20:50:07.780 1572 1976 W InputDispatcher: channel '508b779 com.termux/com.termux.app.TermuxActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
10-08 20:50:07.781 1572 1976 E InputDispatcher: channel '508b779 com.termux/com.termux.app.TermuxActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
10-08 20:50:07.786 1572 4509 I WindowManager: WIN DEATH: Window{508b779 u0 com.termux/com.termux.app.TermuxActivity}
10-08 20:50:07.786 1572 4509 W InputDispatcher: Attempted to unregister already unregistered input channel '508b779 com.termux/com.termux.app.TermuxActivity (server)'
Any idea on where could be the problem?
Your log doesn't show anything what can cause a problem. Execute logcat without grep.
OK, I followed your recommendation and it seems the problem has been located. This is the crash report that has happened during the first Termux run after installation.
--------- beginning of crash
10-09 20:16:21.740 8379 8379 E AndroidRuntime: FATAL EXCEPTION: main
10-09 20:16:21.740 8379 8379 E AndroidRuntime: Process: com.termux, PID: 8379
10-09 20:16:21.740 8379 8379 E AndroidRuntime: java.lang.SecurityException: ConnectivityService: Neither user 10088 nor current process has android.permission.ACCESS_NETWORK_STATE.
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1943)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1889)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:1248)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.app.NotificationManager.notifyAsUser(NotificationManager.java:317)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.app.NotificationManager.notify(NotificationManager.java:289)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.app.NotificationManager.notify(NotificationManager.java:273)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.termux.app.TermuxService.b(SourceFile:3)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.termux.app.TermuxService.a(SourceFile:18)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.termux.app.TermuxActivity.a(SourceFile:27)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.termux.app.TermuxActivity.g(SourceFile:4)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.termux.app.i.run(Unknown Source:2)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
10-09 20:16:21.740 8379 8379 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
10-09 20:16:21.749 1556 2923 W ActivityManager: Force finishing activity com.termux/.app.TermuxActivity
10-09 20:16:21.752 1556 2923 W ActivityManager: top process: com.android.tv.settings
10-09 20:16:21.762 8379 8379 I Process : Sending signal. PID: 8379 SIG: 9
The whole logcat from installation and first run is huge, so can be found here: https://drive.google.com/file/d/13kXG6100LB1-PGB7NbK1a4gUZfBAruRp/view?usp=sharing
The Termux version is 0.75. But as I wrote earlier the two previous versions crashes too.
You have
java.lang.SecurityException: ConnectivityService: Neither user 10088 nor current process has android.permission.ACCESS_NETWORK_STATE.
So I guess we just need to add permission android.permission.ACCESS_NETWORK_STATE to Termux app.
Hopefully yes. Seems to be specific to Android TV or just to the TCL manufacturer, because I hadn't this issue on any other (non-android TV) device.
I am available for testing the fixed version.
I created fixed apk: https://api.cirrus-ci.com/v1/artifact/task/6329343940231168/output/app/build/outputs/apk/debug/app-debug.apk
Uninstall previous one before installing this.
Tested that and it finishes installation and works as expected.
Thanks a lot!
I am also having the same issue on Xiaomi note 7 with miui global 10.3.7 update.
1.To uninstall and install termux from play-store multiple times.
2.Install previous versions of the app but with no success.
3.The fixed apk provided above by xeffyr.
4.Used vpn and proxy with no luck.
By opening the failsafe as xeffyr suggested.
The logfile is as follows.
chdir("/data/data/com.termux/files/home"): Permission denied
:/ $ logcat
--------- beginning of system
10-11 15:43:15.055 26979 26979 W Looper : Slow Looper main: Activity com.termux/.app.TermuxActivity is 341ms late (wall=104ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 337ms (late=8ms h=android.app.ActivityThread$H w=110)
--------- beginning of main
10-11 16:31:19.193 28535 28535 W Choreographer: OPTS_INPUT: First frame was drawed before optimized, so skip!
10-11 16:31:20.186 28535 28535 W Choreographer: OPTS_INPUT: First frame was drawed before optimized, so skip!
10-11 16:31:21.020 28535 28535 W Choreographer: OPTS_INPUT: First frame was drawed before optimized, so skip!
10-11 16:32:01.786 28535 28535 E SharedPreferencesImpl: Couldn't create directory for SharedPreferences file /data/user/0/com.termux/shared_prefs/com.termux_preferences.xml
10-11 16:32:04.270 28535 28535 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@65bcf8c
10-11 16:32:04.324 28535 28535 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
10-11 16:32:04.389 28535 4844 I OMXClient: IOmx service obtained
10-11 16:32:04.400 28535 4844 W ExtendedACodec: Failed to get extension for extradata parameter
10-11 16:32:04.490 28535 28535 I Toast : Show toast from OpPackageName:com.termux, PackageName:com.termux
10-11 16:32:05.530 28535 28535 E SharedPreferencesImpl: Couldn't create directory for SharedPreferences file /data/user/0/com.termux/shared_prefs/com.termux_preferences.xml
10-11 16:32:09.108 4864 4864 E com.termux: Not starting debugger since process cannot load the jdwp agent.
10-11 16:32:09.177 4864 4864 W com.termux: JIT profile information will not be recorded: profile file does not exits.
10-11 16:32:09.177 4864 4864 I chatty : uid=10286(com.termux) identical 1 line
10-11 16:32:09.177 4864 4864 W com.termux: JIT profile information will not be recorded: profile file does not exits.
10-11 16:32:09.177 4864 4864 W com.termux: JIT profile information will not be recorded: profile file does not exits.
10-11 16:32:09.225 4864 4864 I Perf : Connecting to perf service.
10-11 16:32:09.230 4864 4864 W ContextImpl: Failed to ensure /data/user/0/com.termux/cache: mkdir failed: EACCES (Permission denied)
10-11 16:32:09.231 4864 4864 W ContextImpl: Failed to update user.inode_cache: stat failed: EACCES (Permission denied)
10-11 16:32:09.231 4864 4864 W ContextImpl: Failed to ensure /data/user_de/0/com.termux/code_cache: mkdir failed: ENOENT (No such file or directory)
10-11 16:32:09.231 4864 4864 W ContextImpl: Failed to update user.inode_code_cache: stat failed: ENOENT (No such file or directory)
10-11 16:32:09.264 4864 4864 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
10-11 16:32:09.316 4864 4883 I OMXClient: IOmx service obtained
10-11 16:32:09.319 4864 4883 W ExtendedACodec: Failed to get extension for extradata parameter
10-11 16:32:09.385 4864 4884 I Adreno : QUALCOMM build : cf57c9c, I1cb5c4d1cc
10-11 16:32:09.385 4864 4884 I Adreno : Build Date : 09/23/18
10-11 16:32:09.385 4864 4884 I Adreno : OpenGL ES Shader Compiler Version: EV031.25.03.01
10-11 16:32:09.385 4864 4884 I Adreno : Local Branch :
10-11 16:32:09.385 4864 4884 I Adreno : Remote Branch :
10-11 16:32:09.385 4864 4884 I Adreno : Remote Branch :
10-11 16:32:09.385 4864 4884 I Adreno : Reconstruct Branch :
10-11 16:32:09.385 4864 4884 I Adreno : Build Config : S L 6.0.7 AArch64
10-11 16:32:09.391 4864 4884 I Adreno : PFP: 0x005ff112, ME: 0x005ff066
10-11 16:32:09.397 4864 4884 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
10-11 16:32:09.397 4864 4884 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
10-11 16:32:09.398 4864 4884 I OpenGLRenderer: Initialized EGL, version 1.4
10-11 16:32:09.398 4864 4884 D OpenGLRenderer: Swap behavior 2
10-11 16:32:09.578 4864 4892 D NetworkSecurityConfig: No Network Security Config specified, using platform default
10-11 16:32:09.578 4864 4892 I DpmTcmClient: RegisterTcmMonitor from: com.android.okhttp.TcmIdleTimerMonitor
10-11 16:32:10.894 4864 4892 E termux : Bootstrap error
10-11 16:32:10.894 4864 4892 E termux : java.lang.RuntimeException: Unable to create directory: /data/data/com.termux/files/usr-staging/bin
10-11 16:32:10.894 4864 4892 E termux : at com.termux.app.g0.c(SourceFile:2)
10-11 16:32:10.894 4864 4892 E termux : at com.termux.app.g0.a(SourceFile:2)
10-11 16:32:10.894 4864 4892 E termux : at com.termux.app.g0$a.run(SourceFile:21)
10-11 16:32:13.171 4864 4884 D OpenGLRenderer: endAllActiveAnimators on 0x7439b51b00 (RippleDrawable) with handle 0x74393f5280
10-11 16:32:13.470 4864 4890 E libEGL : error creating cache file /data/user_de/0/com.termux/code_cache/com.android.opengl.shaders_cache: No such file or directory (2)
10-11 16:32:13.892 4864 4917 E termux : Bootstrap error
10-11 16:32:13.892 4864 4917 E termux : java.lang.RuntimeException: Unable to create directory: /data/data/com.termux/files/usr-staging/bin
10-11 16:32:13.892 4864 4917 E termux : at com.termux.app.g0.c(SourceFile:2)
10-11 16:32:13.892 4864 4917 E termux : at com.termux.app.g0.a(SourceFile:2)
10-11 16:32:13.892 4864 4917 E termux : at com.termux.app.g0$a.run(SourceFile:21)
10-11 16:32:14.813 4864 4864 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
10-11 16:32:20.099 4864 4884 D OpenGLRenderer: endAllActiveAnimators on 0x7438e77700 (RippleDrawable) with handle 0x74390a95a0
10-11 16:32:20.165 4864 4864 I Toast : Show toast from OpPackageName:com.termux, PackageName:com.termux
10-11 16:32:21.699 4864 4923 E libEGL : error creating cache file /data/user_de/0/com.termux/code_cache/com.android.opengl.shaders_cache: No such file or directory (2)
10-11 16:32:28.406 4864 4864 W Choreographer: OPTS_INPUT: First frame was drawed before optimized, so skip!
10-11 16:32:36.079 4864 4864 E SharedPreferencesImpl: Couldn't create directory for SharedPreferences file /data/user/0/com.termux/shared_prefs/com.termux_preferences.xml
read: unexpected EOF!
@nikhil3752 You messed up permissions with root. Now you will know that playing with root shell doesn't end with anything good.
ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
ContextImpl: Failed to ensure /data/user/0/com.termux/cache: mkdir failed: EACCES (Permission denied)
Luckily that only Termux dir permissions are messed, otherwise you would end with bootloop.
Now do as root rm -rf /data/user/0/com.termux.
I encountered a similar issue. I tracked its root cause to be SSL errors in the network connection due to my having disabled many of the built in certificates in the android system settings.
I encountered a similar issue,
then i download apk to pc from external source then move apk to fone
after insatll that all work fine for me
This could be so easily fixed if instead of aborting it would allow install from local. Seems no one has an issue downloading the required zip file, I have bootstrap-aarch64.zip but Termux - no idea where to put it. It wants it over the internet. Which is 100% accessible.
This could be so easily fixed if instead of aborting it would allow install from local.
Latest Termux versions for Android 7.0 and higher install bootstraps from local (they are embedded into APK file).
Termux for Android 5 will never have offline installer since its support is ended since 01.01.2020.
Possibility of installing through Internet (old Termux versions) will be disabled soon as we need to free certain amount of bandwidth.
It wants it over the internet. Which is 100% accessible.
If you have problems with bootstrap, problem may not be with Internet:
Most helpful comment
Problem resolved. It was caused by Termux being installed into the adoptable storage on the SD-card.
After moving Termux to the internal storage, the problem disappeared and Termux began to work.