termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.85k stars 290 forks source link

[Feature request]: Pls. add compile instructions #592

Closed xaverm closed 4 months ago

xaverm commented 4 months ago

Problem description

@twaik I am running termux-x11 with the xfce desktop on a Samsung Tab S8 Ultra, happily ever after (Keep up this phantastic work!). After initial issues with German keyboard layouts, at some point, the system has become stable enought to actually 'do work' on it. Ever since that point I have not dared to update termux-x11 anymore, such as to not to break things again. Because of that, I have this rather naive (feature?) request: Could the project contributors pls. be so kind as to consider adding a description to the intro page on 1) How to determine the termux-x11build number one is currently running, 2) How to retrieve the commit specific to that number, 3) How to compile termux-x11 This would be of great help to regularly try recent versions, but to get back to whatever build number one had installed that was definitely working. If the preceding should not be placed into an issue list ... delete it ... but maybe still consider it ... Thx.

What steps will reproduce the bug?

This is not a bug

What is the expected behavior?

No response

twaik commented 4 months ago

I am running termux-x11 with the xfce desktop on a Samsung Tab S8 Ultra, happily ever after (Keep up this phantastic work!). After initial issues with German keyboard layouts, at some point, the system has become stable enought to actually 'do work' on it.

Thank you.

1) How to determine the termux-x11 build number one is currently running

2) How to retrieve the commit specific to that number

After some point of time (september 23) I understood that we should somehow identify builds so I decided to make a small change (5e0f484f9deace404fccbb1b6454978ba9264fa9) to make this possible.

But it was much later than you updated the app so it will not really help you. You can dump your version of application with adb or one of available package managers or similar apps (I know only Airdroid which lets you connect your phone from desktop browser and do some stuff).

Also you should make a backup of $PREFIX/libexec/termux-x11/loader.apk because I changed loader's ABI a few times. All other parts should be compatible.

3) How to compile termux-x11

  1. Install SDK and the following build dependencies:
    sudo apt install -y libarchive-tools binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf
  2. Build
    ./gradlew assembleDebug

    Pretty standard instruction for Android Java/JNI projects so I decided to not add it to README.md.

If you have some problems you can look into the workflow used for building apk and deb in CI.

This would be of great help to regularly try recent versions, but to get back to whatever build number one had installed that was definitely working.

It would be better to open issue so I can fix broken stuff. This kind of contributing is very valuable.

xaverm commented 4 months ago

@twaik Let me pls. try to hang in some more. I can certainly do an 'adb dumpsys' to get some info. In my case. adb shell dumpsys package com.termux.x11 | grep Package, amongst other things, yields stuff like this:

Package [com.termux.x11] (3c709f9)
pkg=Package{50c3af3 com.termux.x11}
signatures=PackageSignatures{b1d53b0 version:2, signatures:[db86cf3c], past signatures:[]}

Would any of those hex numbers lead me to a valid commit that I can download from the repo? Or did you mean to say that for earlier builds this is not possible?

twaik commented 4 months ago

I said it is possible to read commit hash in output of logcat produced by termux-x11. But only in builds after 24/sep/23. There is no other way to identify commit. But you can get path to apk with adb shell pm path com.termux.x11 and download it from device with adb pull <path> for backup needs.

xaverm commented 4 months ago

get path to apk with adb shell pm path com.termux.x11 and download it from device with adb pull <path> for backup needs.

Cool. Much simpler. Thx.

twaik commented 4 months ago

So did you move to the newer build?

xaverm commented 4 months ago

I'm just such a pussy ... I have to decide between working away on a nicely functioning X11 environment and getting stuck with issues again ... but I swear I'll install the new build soon ... and then I get back here to whine ;)