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

Can't install from f-droid #4

Open
whymzml opened this issue Dec 16, 2021 · 65 comments
Open

Can't install from f-droid #4

whymzml opened this issue Dec 16, 2021 · 65 comments

Comments

@whymzml
Copy link

whymzml commented Dec 16, 2021

Screenshot_20211217_045338

IDK what's wrong, but I'm just installed all termux app from f-droid

@tareksander
Copy link
Member

I know what the error is. The app is accidentally signed with the Termux development keys and not with the f-droid keys, so the signature doesn't match with the f-droid version of Termux and it can't install. I submitted a PR for f-droid to hopefully get that fixed.

@pavan3999
Copy link

same here, downloaded from f-droid.org

@whymzml
Copy link
Author

whymzml commented Jan 12, 2022

I think new version available, and it can be installed

so I close this issue

@whymzml whymzml closed this as completed Jan 12, 2022
@captain0xff
Copy link

@whymzml can you share a link?

@tareksander
Copy link
Member

I checked the signature of the new version on f-droid and it shouldn't work, the signature still doesn't match the one of Termux. You can watch this PR for progress.

@rysson
Copy link

rysson commented Jan 14, 2022

@whymzml, please reopen this issue. F-droid 1.0.4 installation still fails.
It's better keep open to avoid new issues about it IMHO.

@tareksander, thanks for link to PR. And for your work of course.

@tareksander tareksander reopened this Jan 14, 2022
@whymzml
Copy link
Author

whymzml commented Jan 14, 2022

@tareksander @rysson sorry about my decision, for now I installed GitHub version, and when check from f-droid I got this
Screenshot_20220113_063711
That's why I close this issue

@rysson
Copy link

rysson commented Jan 14, 2022

OK, I can't install GUI at all.

F-droid example.
20220115-002656-595x1310a

@thelearn-tech
Copy link

thelearn-tech commented Jan 18, 2022

Screenshot_20211217_045338

IDK what's wrong, but I'm just installed all termux app from f-droid

Exactly same Termux:gui v0.1.4

@jasonsyoung
Copy link

Is there a fix for this? I still can't install it.

@TheRealOne78
Copy link

Same here. Screenshot_20220207-114303_F-Droid.png

@plowsof
Copy link

plowsof commented Feb 9, 2022

I've just had the same issue. After reading the other issues on this i see that it is because of different versions of the app(s) e.g. termux from fdroid but the termux-gui from github (avoid installing anything from F-Droid to make this work)
Solution:

This fixed it for me

@jasonsyoung
Copy link

This isn't good advice as the F-Droid versions are the only ones being updated from now on. Termux should be removed from the Play Store.

@Grimler91
Copy link
Member

Grimler91 commented Feb 9, 2022

This isn't good advice as the F-Droid versions are the only ones being updated from now on.

I think you misread the previous comment. Both fdroid and github releases are being updated.

Termux should be removed from the Play Store.

Yes, it should, but none of us who are active here have access to the google account that have control of the old apps

@indrawanalghifary
Copy link

Cant install from f-droid

@sqrtrev

This comment was marked as duplicate.

@stedf
Copy link

stedf commented Feb 22, 2022

I've just had the same issue. After reading the other issues on this i see that it is because of different versions of the app(s) e.g. termux from fdroid but the termux-gui from github (avoid installing anything from F-Droid to make this work) Solution:

* Uninstall everything termux related in F-Droid

* Download termux from Github (use the universal one for simplicity sake) https://github.com/termux/termux-app/releases/tag/v0.118.0

* Download termux-gui from Github https://github.com/termux/termux-gui/releases

This fixed it for me

The problem persists installing from f-droid. I understand that the above solution is a fix (thank you for that), however that means losing everything already done in termux-app. Can anyone please upload a termux-gui package in f-droid that matches the current f-droid termux-app ?

Thank you in advance.

@tareksander
Copy link
Member

however that means losing everything already done in termux-app

You could put all you need in an archive, copy it out of the Termux home folder, reinstall Termux from Github, copy the archive back and unpack it again.

Can anyone please upload a termux-gui package in f-droid that matches the current f-droid termux-app ?

I can't do that, the people at f-droid have to to that. I already have a PR open, but I'm waiting for a response.

@Grimler91
Copy link
Member

You could put all you need in an archive, copy it out of the Termux home folder, reinstall Termux from Github, copy the archive back and unpack it again.

The wiki has steps and suggestions on how to backup: https://wiki.termux.com/wiki/Backing_up_Termux

@stedf
Copy link

stedf commented Feb 22, 2022

however that means losing everything already done in termux-app

You could put all you need in an archive, copy it out of the Termux home folder, reinstall Termux from Github, copy the archive back and unpack it again.

Can anyone please upload a termux-gui package in f-droid that matches the current f-droid termux-app ?

I can't do that, the people at f-droid have to to that. I already have a PR open, but I'm waiting for a response.

You could put all you need in an archive, copy it out of the Termux home folder, reinstall Termux from Github, copy the archive back and unpack it again.

The wiki has steps and suggestions on how to backup: https://wiki.termux.com/wiki/Backing_up_Termux

thank you both @tareksander and @Grimler91 for the replies and good suggestions. I was trying to avoid the backup and reinstall due to the various symlinks that would be followed or lost.

@DaRandomCube
Copy link

I've just had the same issue. After reading the other issues on this i see that it is because of different versions of the app(s) e.g. termux from fdroid but the termux-gui from github (avoid installing anything from F-Droid to make this work)
Solution:

This fixed it for me

Still doesn't work for me

@base-13
Copy link

base-13 commented Mar 12, 2022

I've just had the same issue. After reading the other issues on this i see that it is because of different versions of the app(s) e.g. termux from fdroid but the termux-gui from github (avoid installing anything from F-Droid to make this work)
Solution:

This fixed it for me

I have installed termux from github but api and style plugin is from f-droid i still cant install

@tareksander
Copy link
Member

I've just had the same issue. After reading the other issues on this i see that it is because of different versions of the app(s) e.g. termux from fdroid but the termux-gui from github (avoid installing anything from F-Droid to make this work)
Solution:

This fixed it for me

I have installed termux from github but api and style plugin is from f-droid i still cant install

You have to install everything from Github, including Termux:API and Termux:Styling:
https://github.com/termux/termux-api/releases/tag/v0.50.1

For Termux:Styling there doesn't seem to be a apk available in the releases, and all the Github Action builds have already expired, so you just have to uninstall it for now.

@tareksander
Copy link
Member

Can you install other apps from f-droid?

@linusjf
Copy link

linusjf commented Nov 14, 2022

Apparently not! An f-droid issue then?

@linusjf
Copy link

linusjf commented Nov 14, 2022

I do have termux installed... Probably installed through f-droid ... some time back.... need to increase the font size...

@TheRealOne78
Copy link

TheRealOne78 commented Nov 14, 2022

It's kinda odd, I can't even see termux:gui in fdroid anymore.
Is termux:gui still available in the latest fdroid repo?
Screenshot_20221114-120611_F-Droid.png
Screenshot_20221114-120613_F-Droid.png

@linusjf
Copy link

linusjf commented Nov 14, 2022

Screenshot_20221114_155344
Screenshot_20221114_155335

This shows it. Apk downloaded from website.
https://f-droid.org/

@TheRealOne78
Copy link

This shows it. Apk downloaded from website.
https://f-droid.org/

I am looking at the fdroid website and it just doesn't show termux:gui at all.

Screenshot_20221114-123153_Fennec.png

Did you update the repositories?

@TheRealOne78
Copy link

TheRealOne78 commented Nov 14, 2022

I am looking at the gitlab repo of fdroid, and I can't find the com.termux.gui dir, except com.termux.gui.yml
Screenshot_20221114-124141_Fennec.png

@tareksander
Copy link
Member

F-droid reports not having an apk for the app, it seems it got somehow deleted: https://monitor.f-droid.org/builds/nopackages
Nothing I can do about that.

@tareksander
Copy link
Member

I am looking at the gitlab repo of fdroid, and I can't find the com.termux.gui dir, except com.termux.gui.yml

That is normal, I have the f-droid metadata in my git repo, not on the fdroid-repo, do I don't need to make a pr for every changelog or description change.

Seems like they disabled the build because it didn't install anyways: https://gitlab.com/fdroid/fdroiddata/-/commit/507757a11f5343900f50ba4a592e4045371761a5

@linusjf
Copy link

linusjf commented Nov 14, 2022

This shows it. Apk downloaded from website.
https://f-droid.org/

I am looking at the fdroid website and it just doesn't show termux:gui at all.

Screenshot_20221114-123153_Fennec.png

Did you update the repositories?

F-droid is not installing anything for me with the same error. Should I move this to f-droid repo?

@linusjf
Copy link

linusjf commented Nov 14, 2022

@khimaros
Copy link

khimaros commented May 9, 2023

this is still an issue and seems to be blocked by https://gitlab.com/fdroid/admin/-/issues/354

@licaon-kter
Copy link

@khimaros
Copy link

@tareksander mentioned that there was a fix in Termux coming. it may resolve this issue: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/10240#note_1462521781

@tareksander
Copy link
Member

termux/termux-app#2921 will fix this, as sharedUID won't be needed then to establish a secure connection to the plugin. And when the sharedUID is removed from the manifest, installing from f-droid will work even when the apps are signed with a different key.

@twaik
Copy link
Member

twaik commented Jul 14, 2023

Actually sharedUid is not really necessary for this. You can start some Java code in apk like it is done in termux-x11.
i.e. you can do the following:
[0]. starting TermuxGuiCmdEntryPoint::main() by app_process.

  1. Checking if main apk of termux-gui is installed.
  2. Cheking if it's signature fits to apk executed by app_process (comparing with self signature or comparing with string).
  3. Sending secure broadcast containing Binder connection (for calling back).
  4. Main activity/service receives this broadcast and sends handshake back to process.
  5. Connection is established, activity/service requests ParcelFileDescriptor of server socket (Unix socket).
  6. Process instantiates a socket, wraps it's fd to ParcelFileDescriptor and sends it to activity/service.

In this case you need not sharedUid but connection is still safe and clean.

@tareksander
Copy link
Member

tareksander commented Jul 14, 2023

That's possible, but can you use app_process as a library? Termux:GUI has another architecture than Termux:X11, there is no server program running in the background, every program connects to the plugin on its own. Also app_process has quite a big startup performance hit, I recently updated the python bindings to avoid am and use termux-am instead if possible, using app_process would make that worse again. Does Termux:X11 keep the app_process open or is the fd just passed to a new instance of xwayland?

@twaik
Copy link
Member

twaik commented Jul 15, 2023

That's possible, but can you use app_process as a library?

No, but that is not needed. App_process itself will not handle client connections, it is needed only to establish connection with the main code in activity/service and pass there file descriptor of server socket. In the case if you are sure it is enough you can shut down app_process.

Termux:GUI has another architecture than Termux:X11, there is no server program running in the background, every program connects to the plugin on its own

As far as I understand clients connect to Unix socket, is it right? Or you send some intent using termux-am?

Does Termux:X11 keep the app_process open or is the fd just passed to a new instance of xwayland?

It works a bit different way. Main code of termux-x11 is running in app_process, the code running in activity is pretty stupid client which sends input events to server with my own protocol and passes Surface to server when it is changed. It is written to establish new connection when client (activity) considers it is broken or must be renewed. So app_process must work all the time.

You can start server with termux-services and keep it open. It can send new intent every time you are establishing new connection or when you need it.

@tareksander
Copy link
Member

The current model is like Termux:API, clients open 2 random sockets in the abstract namespace and send the addresses to the plugin via a broadcast. How does Termux:X11 handle the app process getting killed? Is it automatically restarted?

@twaik
Copy link
Member

twaik commented Jul 15, 2023

Actually you can make it work with one socket since sockets work like bidirectional pipes.

@tareksander
Copy link
Member

tareksander commented Jul 15, 2023

No, I need 2 sockets: one for the requests and responses, and one for the asynchronous events. Having events mix in with the responses would make the client side unneccessarily complex. We can move this discussion to Matrix if you want to continue, to not abuse this issue (everyone who replied here gets notified when another comment is added I think).

@twaik
Copy link
Member

twaik commented Jul 15, 2023

X server is contained in the code started with app_process so restarting it is pretty much useless.

But Activity is stupid client. I intentionally made this to avoid situations when user accidentally closes/kills activity and that kills the whole X session. When it starts it sends signal to app_process based server and server sends broadcast (targeted/restricted to com.termux.x11 package) with Binder instance. When activity receives this broadcast it establishes connection with server (simply requests socket fd obtained by socketpair) and passes socket to native part (which is X client working with libxcb instead of libX11). It is pretty much simple and reliable. Since activity does not have any important parts and does not keep any states it can be restarted easily.

In your case it will be better to make termux-am somehow pass file descriptor to activity/service.
I am advicing somethig like this.

  1. termux-am passes commandline and related fds to socket.
  2. termux-am sends intent containing Binder instance in Bundle. This binder will be used for getting ParcelFileDescriptor-wrapped fd (sending ParcelFileDescriptors itself in Bundle is restricted).
  3. Your activity/service receives this intent and sends through Binder a command like getFd to get needed file descriptor.
  4. It connects uses file descriptor it gets like in any other case.

@twaik
Copy link
Member

twaik commented Jul 15, 2023

Ok.

@khimaros
Copy link

any word on this? I would love to use but don't want to uninstall and lose all of my configuration

@now0clock
Copy link

now0clock commented Sep 25, 2023 via email

@khimaros
Copy link

see also termux/termux-app#2654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests