Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux don't work after updated to 0.105 (Android 10) #1896

Closed
mehdiMj-ir opened this issue Jan 21, 2021 · 39 comments
Closed

termux don't work after updated to 0.105 (Android 10) #1896

mehdiMj-ir opened this issue Jan 21, 2021 · 39 comments

Comments

@mehdiMj-ir
Copy link

installations running on Huawei Nova 7i Android 10 EMUI 10.1.0 (witch does not support Google play services)
Problem description
after update to 0.105 from F-Droid, application don't work and don't even show the shell!

Steps to reproduce
I tried to clear cache, clear data and even restart my phone 😅, but the app don't work.

Expected behavior

A gif explains 1000 words
5976_1

@Grimler91 Grimler91 transferred this issue from termux/termux-packages Jan 21, 2021
@Grimler91
Copy link
Member

Yeah, this is my fault. Fixed in 05bb399, which was released as 0.106 but which is not available yet.

@Grimler91
Copy link
Member

Grimler91 commented Jan 21, 2021

If you are rooted you can touch /data/data/com.termux/files/home/.termux/termux.properties from an adb shell, or another terminal app, as a workaround

@NoseyNick
Copy link

NoseyNick commented Jan 21, 2021

+1, same issue, or at least same symptoms, I could almost have recorded the same video...
Except Android 8.1.0.

F-Droid also won't let me downgrade, but will let me completely uninstall, then carefully reinstall 0.104. This did lose all my data (EG SSH keys and stuff) and had to start again from scratch, but luckily I have ALMOST entirely scripted that 😐

Look forward to 0.106 👍

@bglover
Copy link

bglover commented Jan 21, 2021

If you are rooted you can touch /data/data/com.termux/files/home/.termux/termux.properties from an adb shell, or another terminal app, as a workaround

I can confirm that this workaround fixed the issue for me, thanks!

@Massedil
Copy link

I had to create the directory .termux before :

mkdir /data/data/com.termux/files/home/.termux
touch /data/data/com.termux/files/home/.termux/termux.properties

I can confirm after that termux works again. Thanks.

@Grimler91
Copy link
Member

After you all have upgraded to v0.106 it is good idea to restore the owner and permissions of the /data/data/com.termux/files/home/.termux folder, which can done by moving the folder to /sdcard and back, first run as root:

mv /data/data/com.termux/files/home/.termux /sdcard/

and then as the normal termux user:

mv /sdcard/.termux /data/data/com.termux/files/home/.termux

(chown + /system/bin/restorecon should work as well but I have had problems with that on some ROMs so I usually do this instead)

@angelog0
Copy link

Same issue here after the upgrade this evening. I can confirm that trying to revert to 0.104 does not work (App is not installed)

I am not rooted so it seems that for me do not exist workarounds...

Sure that waiting for 0.106 will fix it? I can just wait..

@ojz0r
Copy link

ojz0r commented Jan 21, 2021

Had this problem as well.

Luckily Termux Float still works so you can use it with Grimler91's fix (touch /data/data/com.termux/files/home/.termux/termux.properties) and get it to work.

@ghost
Copy link

ghost commented Jan 21, 2021

Luckily Termux Float still works

Yeah, Float add-on works because uses outdated copy of terminal-view component of Termux.

@Grimler91
Copy link
Member

@angelog0

Sure that waiting for 0.106 will fix it? I can just wait..

Yeah, just installing 0.106 will give you a working app again, and all your files and everything will still be there

@angelog0
Copy link

@Grimler91, maybe you have to contact F-Droid people to stop the release of this buggy version otherwise this thread will increase....

@gerazo
Copy link

gerazo commented Jan 22, 2021

The shit also hit the fan on Android 7. I see that 0.105 came to f-droid yesterday while 0.105 was committed 16 days ago. How much time does it take for f-droid to deploy a new release? (Why is it so slow?)

@ghost
Copy link

ghost commented Jan 22, 2021

How much time does it take for f-droid to deploy a new release? (Why is it so slow?)

APKs are built by F-Droid. Sometimes its build environment doesn't have necessary versions of dependencies and as result builds are delayed a lot.

@trenttobler
Copy link

I hit this as well, while trying to migrate from play store version to f-droid version (android 9). Maybe until fixed (new) release is available, or the buggy version removed on f-droid, it may be worth mentioning in the wiki page referenced by the play store version, noting the 0.105 version should be avoided.

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Jan 23, 2021

A non-root solution would be to use Storage Access Framework (SAF) to manually create the ~/.termux directory and the ~.termux/termux.properties file. First install Termux v0.105 (the current latest) from F-Droid if you haven't already and let it run its Installing stage, it will automatically crash afterwards (not required if you already are on v0.105 and are stuck). Main point is that Installing stage that comes on new install should have run. Then open your system Files app (or custom file manager) and use its SAF opener to open Termux provider, likely in the left sidebar. Then from options (3 dots on top right), enable show hidden files, then create the .termux directory with the Add Folder option. The system Files app likely won't have an option to create an empty file. So use QuickEdit (or other text editor or your custom file manager app) and save a new file named termux.properties in /storage/emulated/0/ and then copy it to ~/.termux directory with the Files app. Then open Termux.

Since v0.104 fixed the hidden files issue, the ~/.termux directory should show in SAF.

Working on A11 avd.

@angelog0
Copy link

the 0.105 version should be avoided

Removed... Wouldn't people be discouraged from installing an app that doesn't work?

Hi @agnostic-apollo, you write about v. 0.106.. maybe you meant . 0.105... @Grimler91 wrote v. 0.106 will fix this issue..

@agnostic-apollo
Copy link
Member

right, sorry, editing.

@ghost
Copy link

ghost commented Jan 23, 2021

@angelog0 exactly described my situation. Had already dropped the app, until I luckily discovered this issue.

@angelog0
Copy link

angelog0 commented Jan 23, 2021

@Grimler91, many (Android) apps on GitHub have the binary packages in Releases section. Why you do not add the apk package of Termux?

Is there some alternative repo from which to download the apk for v. 0.106 (F-Droid equivalent)?

The risk is that we have to wait some month before we come back to use Termux unless we rooted the device or follow the @agnostic-apollo suggestions (which, really, I do not understand; maybe they have to be explained with more details for people not so much familiar with Android).

@agnostic-apollo
Copy link
Member

F-Droid delays are usually a few days and not months.

What exactly don't you understand and what have you tried till now?

@ghost
Copy link

ghost commented Jan 24, 2021

Why you do not add the apk package of Termux?

Would be a fourth (currently Google Play, F-Droid and Nethunter Store) installation source with another incompatible signature. APKs can be provided on Github as soon as @fornwall either share his signature key used for Google Play or purge EOLed builds from it.

Otherwise there will be a mess from lots of same apks but incompatible with each other due to signature.

@ghost
Copy link

ghost commented Jan 24, 2021

Someone who really needs v0.106, can open a related Github Actions and download needed version: https://github.com/termux/termux-app/suites/1845709433/artifacts/35744160

As I wrote in comment above, signature is different. Uninstall add-ons and older app before using this.

@ailin-nemui
Copy link

ailin-nemui commented Jan 24, 2021

you may have luck downgrading from a computer with adb install -d -r com.termux_104.apk without root

  1. download com.termux_104.apk from https://f-droid.org/en/packages/com.termux/
  2. install adb to your computer if you haven't yet from https://developer.android.com/studio/releases/platform-tools
  3. become developer in your phone (tap 7 times on Build Number in Settings > About Phone)
  4. connect data cable to computer
  5. check if the phone is recognised with adb devices
  6. grant USB debugging permission on the phone
  7. run above command

@angelog0
Copy link

@ailin-nemui, what we need to run that command. Please, describe the method step by step..

@abdullah3102

This comment has been minimized.

@abdullah3102

This comment has been minimized.

@ghost
Copy link

ghost commented Jan 24, 2021

@abdullah3102 Why needing to do factory reset if workarounds are posted above? no need to do factory reset as it can be fixed next update (You can update fixed termux version without data loss and you're Termux data is still intact Unless you're planning to migrate to F-Droid)

@alephalpha0
Copy link

alephalpha0 commented Jan 24, 2021

open your system Files app (or custom file manager) and use its SAF opener to open Termux provider, likely in the left sidebar.
Then from options (3 dots on top right), enable show hidden files, then create the .termux directory with the Add Folder option. Then use QuickEdit (or other text editor or your custom file manager app) and save a new file named termux.properties
Then open Termux.

v0.104 fixed the hidden files issue

I'm bored so I made a gif showing the steps to add termux as a connected storage and create directories and blank files through SAF via FX and Material Files.
FX :: flow
fxSAFTermux
Material Files :: flow
materialFilesTermuxSAF

@lars-vom-mars-x
Copy link

@alephalpha0, many thanks. I didn't know how to get to termux's $HOME. Thanks for the pictures.

@angelog0
Copy link

angelog0 commented Jan 27, 2021

Version v. 0.106 has been released on F-Droid site and it fixes the issue discussed here...

BTW, in my home I do not find a .termux directory:

$ pwd
/data/data/com.temux/files/home

$ ls -lrt .termux
ls: cannot access '.termux': No such file or directory

Really I need that directory?

@kcubeterm
Copy link
Member

@angelog0 if not found then create it.

Closing as latest version has released.

@NoseyNick
Copy link

Version v. 0.106 has been released on F-Droid site and it fixes the issue discussed here...

Confirmed. YAY! Thanks! 🕺

BTW, in my home I do not find a .termux directory:

Me neither... Until I heard (too late) that it might be safest to touch the config file.
I think I have to assume there are some preferences we could set? 😆

@ghost
Copy link

ghost commented Jan 27, 2021

I think I have to assume there are some preferences we could set?

As shown in https://wiki.termux.com/wiki/Terminal_Settings

@angelog0
Copy link

if not found then create it

OK, but empty? Really Termux to work needs this empty folder?

For what I understand this folder should contain a file with personal preferences of the user (termux.properties)... And if I have not preferences but just want/accept the default?

@Grimler91
Copy link
Member

OK, but empty? Really Termux to work needs this empty folder?

You do not need it, it is just for optional changes/fixes. If you are happy with for example the default extra-keys layout then there is no reason for creating it.

The app crashed without the termux.properties file because I messed up the check for if the file exists. Without the file default settings are used by the terminal.

@termux termux deleted a comment from snug Feb 2, 2021
@tallship
Copy link

tallship commented Feb 6, 2021

Hi @Grimler91 :)

Hey I considered opening up an issue to address this question, but decided to just ping you here (at least first, to glean your opinion first) because it might open up a volley of commenting that just results in unneccessary noise, distracting you dev's from focusing on important things like, um... development of Termux and hanging out with your families ;)

Anyway, have you given much thought to this?

https://f-droid.org/en/docs/Setup_an_F-Droid_App_Repo/

It could do a couple of things:

  • Beta / Dev versions could be available to those who choose to help test or be early adopters instead of having to d/l and install apks from the git repo here.
  • Quick fixes could be as quickly deployed as when you discover the fixes, instead of having to wait on the limited time resources of F-Droid staff members, as well meaning as they may be.

If you'd prefer I open an issue just lemme know as I don't have a problem doing so, but this is a bit more informal I think, and not (usually) that important of an issue.

@Grimler91
Copy link
Member

@tallship Hi,

For testing purposes a custom F-droid repository would come in handy. Using it as the main distribution path would be inconvenient for users though as they then have to first install a new app (fdroid) and then manually add another repository in that app.

If we set up a custom repository those apps also have to be signed with a different key than the apps on the main fdroid repo or on google play, meaning that users cannot simply try out the development version and then switch back, at least not without uninstalling termux fully in between (and loosing all data). We have have few issues being opened every now and then where people try to mix installation sources and become confused about the non-informative error message that is shown in this case.

All-in-all I think setting up a custom fdroid repository creates more inconveniences for users than it solves for us. Maybe others have other opinions.

@NoseyNick
Copy link

would be inconvenient for users though as they then have to first install a new app (fdroid) and then manually add another repository in that app

I thought f-droid was the normal way to install Termux, personally 😆

agnostic-apollo added a commit that referenced this issue Jul 8, 2021
…erface$SidecarCallback.onDeviceStateChanged

The crash was reported for `Microsoft Surface Duo`, which would affect some samsung and other devices as well, mainly dual screens/foldables. It was caused by androidx:window library that has been used by termux-shared since v0.115 having a typo in its proguard rules which didn't stop the removal of the required method for release builds (not debug) by proguard.

The library has been patched and fix should be available on next version but doing an emergency patch now for termux as well.

For people who are getting the crash should set `disable-terminal-margin-adjustment=true` in `termux.properties` created as per instructions in the link below and then start termux again and see if it fixes the issue. If you had termux installed before updating, you should be able to directly access the `~/.termux/termux.properties` file with SAF.

#1896 (comment)

------

**Crash Message**:
```
abstract method "void androidx.window.sidecar.SidecarInterface$SidecarCallback.onDeviceStateChanged(androidx.window.sidecar.SidecarDeviceState)"
```

### Stacktrace

```
java.lang.AbstractMethodError: abstract method "void androidx.window.sidecar.SidecarInterface$SidecarCallback.onDeviceStateChanged(androidx.window.sidecar.SidecarDeviceState)"
at androidx.window.sidecar.MicrosoftSurfaceSidecar.updateDeviceState(MicrosoftSurfaceSidecar.java:159)
at androidx.window.sidecar.MicrosoftSurfaceSidecar$1.deviceStateChanged(MicrosoftSurfaceSidecar.java:192)
at android.vendor.screenlayout.service.IWindowExtensionCallbackInterface$Stub.onTransact(IWindowExtensionCallbackInterface.java:94)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)

```

https://issuetracker.google.com/issues/189001730
https://android-review.googlesource.com/c/platform/frameworks/support/+/1757630
@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

17 participants