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

Am integration into Termux #2458

Merged
merged 26 commits into from
Apr 22, 2022
Merged

Conversation

tareksander
Copy link
Member

This PR includes:

  • a UNIX socket interface for termux-shared (LocalFilesystemSocket.java)
  • an interface to handle socket connections on a separate thread and a simple protocol to use CLI-like functions (parameters as a String array, stdout, stderr) (LocalSocketListener.java)
  • a simpler implementation of am using the Android API (Am.java)
  • Creating a socket at startup and handling connections using the new am implementation

The new am implementation lacks some features (some warnings can't be displayed because the Android API doesn't give them), but is about 10x faster, because there is no need to create a dalvik VM for am to run, the process is already there.
Because the new implementation isn't a 1:1 copy of am it shouldn't replace am, but can be used as a replacement if tested, e.g. for termux-wake-lock, termux-notification... to get better speed.

More details can be found in this PR that gave me the idea.

tareksander added a commit to tareksander/termux-packages that referenced this pull request Dec 8, 2021
Client to use the new am implementation from this PR: termux/termux-app#2458
@tareksander
Copy link
Member Author

The test seems to fail because the native library for termux-shared cannot be found during the test. It works fine when running though.

@agnostic-apollo
Copy link
Member

I am currently busy with work and lot of other stuff so will look into this in next few days. This and other changes in termux-api require lot of testing as well so its time consuming stuff. This will have to merged after I have pushed my local changes to master anyways since I am far ahead of master and there are conflicts with this pull request, which would be easier to resolve here. Additional work in master is left as well.

The new design itself is good and should be merge-able, just need time.

@Grimler91
Copy link
Member

@tareksander so with this, and the corresponding changes in termux-api changes, termux-am-socket and the termux-api-package changes, we can drop termux-am?

Just want to check so that I understand it correctly (and if yes, then dependency of termux-tools on termux-am needs to be removed, or rather changed to termux-am-socket)

@agnostic-apollo
Copy link
Member

In my opinion termux-am should be kept at $PREFIX/bin/am for backward compatibility and in case termux-am-socket doesn't work. We can add the dependency of termux-am-socket for termux-tools.

@tareksander
Copy link
Member Author

@tareksander so with this, and the corresponding changes in termux-api changes, termux-am-socket and the termux-api-package changes, we can drop termux-am?

I made the changes to termux-api to make it faster, but then I realized that am is the main cause of the slow commands, and since other commands like termux-wake-lock etc. also use am, integrating am into Termux could also make them faster. The changes to termux-api aren't needed if this is merged, except maybe the service users can start with am to let Android keep the process around for longer, so there is no need to create a new Android process every now and then, which also slows it down.

Replacing the use of am with termux-am has to be tested, but that can also be done after this is merged, there is no need to use it right away.

In my opinion termux-am should be kept at $PREFIX/bin/am for backward compatibility and in case termux-am-socket doesn't work. We can add the dependency of termux-am-socket for termux-tools.

I'm also against removing am completely, because the implementation inside Termux has a bit less informational warnings and lacks the warnings for Activity starts, because the Android API provides no way to get these warnings.

@Grimler91
Copy link
Member

Alright, I have been confusing the two features here, we have:

Integration of termuxAm into termux-app:

  • this PR makes termux-app listen for api commands sent through a new socket (currently in /data/data/com.termux/files/sockets/am-socket)
  • termux-am-socket is the userspace program that passes termux-api-package script commands to the socket
  • the termux-api-package scripts then only need to be changed so that they use termux-am instead of am

We then also have the improvement of making termux-api use a unix socket instead of (termux-)am broadcast:

Please let me know if I am totally misunderstanding how something here works

@tareksander
Copy link
Member Author

Basically you got everything right, but this PR can not only be used with termux-api-package, but can also speed up the communication with the Termux app for things like termux-wake-lock, termux-wake-unlock ..., basically all communication that uses intents. That's why I would prefer this to be merged, as it is a more general solution.

@Grimler91
Copy link
Member

@tareksander aha, great!

I have been using a build with this PR, and the termux-api{,-package} PRs, merged for the last ~two weeks and haven't noticed any issues, so LGTM. I'll merge the other parts, and upload the termux-am-socket package. Leaving this PR for @agnostic-apollo to merge though, as it might conflict will the other pending changes

Grimler91 pushed a commit to tareksander/termux-packages that referenced this pull request Dec 23, 2021
Client to use the new am implementation from this PR: termux/termux-app#2458
Grimler91 pushed a commit to termux/termux-packages that referenced this pull request Dec 23, 2021
Client to use the new am implementation from this PR: termux/termux-app#2458
@agnostic-apollo
Copy link
Member

agnostic-apollo commented Apr 10, 2022

@tareksander Is there a specific reason why you have enforced a 1000s custom deadline for am server? Do you think client will take too long or won't send data after connecting? And where did you decide or get the 100ms timeout and 1000ms deadline values, they are very low, under heavy system load, data transfer will definitely not be fast. In AOSP, its a few seconds at least.

NativeCrashListener has timeout at 10s, logd at 32s, bluetooth audio a2dp at 5s, some have it at 1s, but those are mostly system daemons which would have much higher priorities than app processes.

https://cs.android.com/android/platform/superproject/+/android-12.0.0_r32:frameworks/base/services/core/java/com/android/server/am/NativeCrashListener.java;l=55

https://cs.android.com/android/platform/superproject/+/android-12.0.0_r32:system/logging/logd/LogUtils.h;l=28

https://cs.android.com/android/_/android/platform/packages/modules/Bluetooth/+/f2047664a24b859a729608d807a689c7fc7b6803:system/audio_a2dp_hw/src/audio_a2dp_hw.cc;l=60

@tareksander
Copy link
Member Author

I wanted some sort of timeout so if something goes wrong, it doesn't block until the Termux process is restarted. I just picked some timeout with no particular reason, you can set it higher. 1s was more than enough for me, but that was on an emulator and with practically no load.

@agnostic-apollo
Copy link
Member

Okay. Yeah, will set it at a higher value.

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Apr 18, 2022

Hey @tareksander and @Grimler91, so did some refactoring and some variable name changes. Also pushed changes to https://github.com/termux/termux-am-socket

Read the commit messages for details, specially b2a6487, 3054836, 4392e57 and termux/termux-am-socket@f0473023. Test is passing now too.

This should be tested and reviewed before its merged.

You can get apk from https://github.com/termux/termux-app/actions/runs/2192198078 and termux-am-socket aarch64 is attached. I can push a new release for it too if needed. If someone wants a different arch, let me know. Just run commands with termux-am after installing apk and deb.

I tested from within termux and root and it worked on Android 7 and 11. From other app with rwxrwxrwx permissions for socket file and directory and selinux disabled, connection still failed. Tried 200 RUN_COMMAND intents in a for loop and they all succeeded, backlog 50 is not really used by linux as is. https://stackoverflow.com/questions/5111040/listen-ignores-the-backlog-argument

termux-am-socket_1.02_aarch64.zip

termux-am-socket_1.02_x86_64.zip

@tareksander
Copy link
Member Author

Great! Making the socket API more general is something I would have needed for the new plugin system anyways. I'll try and do better with variable naming in the future, this is the first time I really coded something others have to understand outside of class. I can't test anything new, my devices are also Android 7 and 11. I do have some Android emulators set up though, but those are x86.

@Grimler91
Copy link
Member

After Installing latest termux-am-socket (and termux-api, and termux-api-package), and then installing app from this branch I get an error on socket creation which I can't seem to figure out the reason for:

Exception in createServerSocketNative():
java.lang.NoSuchMethodError: no non-static method "Lcom/termux/shared/jni/models/JniResult;.<init>(IILjava/lang/String;I)V"
	at com.termux.shared.net.socket.local.LocalSocketManager.createServerSocketNative(Native Method)
	at com.termux.shared.net.socket.local.LocalSocketManager.createServerSocket(LocalSocketManager.java:125)
	at com.termux.shared.net.socket.local.LocalServerSocket.start(LocalServerSocket.java:100)
	at com.termux.shared.net.socket.local.LocalSocketManager.start(LocalSocketManager.java:84)
	at com.termux.shared.shell.am.AmSocketServer.start(AmSocketServer.java:68)
	at com.termux.shared.termux.shell.am.TermuxAmSocketServer.start(TermuxAmSocketServer.java:101)
	at com.termux.shared.termux.shell.am.TermuxAmSocketServer.setupTermuxAmSocketServer(TermuxAmSocketServer.java:77)
	at com.termux.app.TermuxApplication.onCreate(TermuxApplication.java:53)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6719)
	at android.app.ActivityThread.access$1300(ActivityThread.java:237)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

All log output

Report Info

User Action: plugin execution command
Sender: TermuxAmSocketServer
Report Timestamp: 2022-04-19 20:05:57.433 UTC

TermuxAm Socket Server Error

Error Code: 154
Error Message (LocalSocket Error):

Create "TermuxAm" server socket failed.
Retval: `-1`
Errmsg:
```
Exception in createServerSocketNative():
java.lang.NoSuchMethodError: no non-static method "Lcom/termux/shared/jni/models/JniResult;.<init>(IILjava/lang/String;I)V"
	at com.termux.shared.net.socket.local.LocalSocketManager.createServerSocketNative(Native Method)
	at com.termux.shared.net.socket.local.LocalSocketManager.createServerSocket(LocalSocketManager.java:125)
	at com.termux.shared.net.socket.local.LocalServerSocket.start(LocalServerSocket.java:100)
	at com.termux.shared.net.socket.local.LocalSocketManager.start(LocalSocketManager.java:84)
	at com.termux.shared.shell.am.AmSocketServer.start(AmSocketServer.java:68)
	at com.termux.shared.termux.shell.am.TermuxAmSocketServer.start(TermuxAmSocketServer.java:101)
	at com.termux.shared.termux.shell.am.TermuxAmSocketServer.setupTermuxAmSocketServer(TermuxAmSocketServer.java:77)
	at com.termux.app.TermuxApplication.onCreate(TermuxApplication.java:53)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6719)
	at android.app.ActivityThread.access$1300(ActivityThread.java:237)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

```

TermuxAm Socket Server Run Config

Path: /data/data/com.termux/files/apps/termux-app/termux-am/am.sock
AbstractNamespaceSocket: false
LocalSocketManagerClient: com.termux.shared.termux.shell.am.TermuxAmSocketServer$TermuxAmSocketServerClient
FD: -1
ReceiveTimeout: 10000
SendTimeout: 10000
Deadline: 0
Backlog: 50

Termux App Info

APP_NAME: Termux
PACKAGE_NAME: com.termux
VERSION_NAME: 0.118.0
VERSION_CODE: 118
UID: 10159
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
APK_RELEASE: Unknown
SIGNING_CERTIFICATE_SHA256_DIGEST: E1F43C8DB063BEB96E8C322E0AF182BA8207C32DE116E16EE3E44BEE6BBAF84D

Device Info

Software

OS_VERSION: 4.4.111-ge6e6b41f98d8
SDK_INT: 30
RELEASE: 11
ID: RQ3A.210805.001.A1
DISPLAY: lineage_dream2lte-userdebug 11 RQ3A.210805.001.A1 eng.grimle.20210821.092214
INCREMENTAL: eng.grimle.20210821.092214
SECURITY_PATCH: 2021-08-05
IS_DEBUGGABLE: 1
IS_TREBLE_ENABLED: false
TYPE: userdebug
TAGS: release-keys

Hardware

MANUFACTURER: samsung
BRAND: samsung
MODEL: SM-G955F
PRODUCT: dream2ltexx
BOARD: universal8895
HARDWARE: samsungexynos8895
DEVICE: dream2lte
SUPPORTED_ABIS: arm64-v8a, armeabi-v7a, armeabi

Have I perhaps missed a pending PR somewhere?

@agnostic-apollo
Copy link
Member

this is the first time I really coded something others have to understand outside of class.

Don't feel taken down by the refactor even a bit, it was seriously a great first version, specially if it was the first time after uni. As for the non-general design, that was an issue but writing better designs takes experience and time to learn, read other people's code and see how they do it, eventually you get better. One should also think a few steps ahead for how else the code may be used in future, so that you need fewer changes in future and don't waste time making lot of changes. Even current design may have issues, I guess time will tell.

I'll try and do better with variable naming in the future

Yeah, variable names should be more descriptive. Deciding on variable names is like one of the hardest and time taking part.

I can't test anything new, my devices are also Android 7 and 11

The testing is done for missed cases that I may not have tested or for device or build specific issues. I will do a basic test on android 12 and 13 as well in avd.

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Apr 19, 2022

After Installing latest termux-am-socket (and termux-api, and termux-api-package), and then installing app from this branch I get an error on socket creation which I can't seem to figure out the reason for:

IS_DEBUGGABLE_BUILD: false

Proguard was removing specific methods only used by JNI for JNIResult class, hence the issue. Fixed it with 45450eb. Would have caught this in my pre-release check, but good that its fixed now. Thanks for that! I tested release build on Android 13 with termux user and root and both are working. Also attached x86_64 version above for avd testing.

The public JniResult(int retval, int errno, String errmsg, int intData) method is missing.

https://github.com/termux/termux-app/blob/3054836049fc4b5ef38e3b3a472a0564df520346/termux-shared/src/main/java/com/termux/shared/jni/models/JniResult.java

jmethodID constructor = env->GetMethodID(clazz, "<init>", "(IILjava/lang/String;I)V");

public class JniResult {
    public String errmsg;
    public int errno;
    public int intData;
    public int retval;

    public JniResult(int i, int i2, String str) {
        this.retval = i;
        this.errno = i2;
        this.errmsg = str;
    }

    public JniResult(String str, Throwable th) {
        this(-1, 0, Logger.getMessageAndStackTraceString(str, th));
    }

    public static String getErrorString(JniResult jniResult) {
        return jniResult == null ? "null" : jniResult.getErrorString();
    }

    public String getErrorString() {
        StringBuilder sb = new StringBuilder();
        sb.append(Logger.getSingleLineLogStringEntry("Retval", Integer.valueOf(this.retval), "-"));
        if (this.errno != 0) {
            sb.append("\n");
            sb.append(Logger.getSingleLineLogStringEntry("Errno", Integer.valueOf(this.errno), "-"));
        }
        String str = this.errmsg;
        if (str != null && !str.isEmpty()) {
            sb.append("\n");
            sb.append(Logger.getMultiLineLogStringEntry("Errmsg", this.errmsg, "-"));
        }
        return sb.toString();
    }
}

And termux-api-package is not using termux-am-socket currently. Its using abstract namespace socket started by termux-api. That can be removed now.

https://github.com/termux/termux-api-package/blob/v0.57/termux-api.c#L25

https://github.com/termux/termux-api/blob/ba2836ba60083b54dcdb6a3a926777f3f0704829/app/src/main/java/com/termux/api/SocketListener.java#L23

INCREMENTAL: eng.grimle.20210821.092214

And someone builds their own lineageOS. :D I need to start doing that, but first need to get a 1TB SSD. :p

@Grimler91
Copy link
Member

After Installing latest termux-am-socket (and termux-api, and termux-api-package), and then installing app from this branch I get an error on socket creation which I can't seem to figure out the reason for:

IS_DEBUGGABLE_BUILD: false

Proguard was removing specific methods only used by JNI for JNIResult class, hence the issue. Fixed it with 45450eb. Would have caught this in my pre-release check, but good that its fixed now.

Thanks! Seems to work fine both on my aarch64 phone and an arm tablet as normal user

Running a termux-api command from a su shell seem to work as well, but not when run from a tsu shell (then it just hangs), due to some env var I guess.

INCREMENTAL: eng.grimle.20210821.092214

And someone builds their own lineageOS. :D I need to start doing that, but first need to get a 1TB SSD. :p

Yeah, so I have only myself to blame for all the bugs in the ROM ;) yeah, it takes an ridiculous amount of disk space, especially for later android versions..

@agnostic-apollo
Copy link
Member

Thanks! Seems to work fine both on my aarch64 phone and an arm tablet as normal user

Great.

tsu shell (then it just hangs), due to some env var I guess

I installed tsu on android 11 and it worked fine from within tsu shell and with sudo termux-am. Since tsu is so broken, try this sudo, its a very good script, from some random guy ;)

I guess pull request should be mergable, unless someone has an objection.

Yeah, so I have only myself to blame for all the bugs in the ROM ;)

Your security patch is even older than mine! :p

yeah, it takes an ridiculous amount of disk space, especially for later android versions..

Yeah, that's why I am gonna wait for the 1TB SSD, gonna need lot of space to build different test versions.

…ilesystem. The UID of connecting programs is automatically checked against the processes UID and connections where the UID doesn't match are automatically rejected and logged.

Changed: LocalSocketListener now uses sockets in the filesystem.
tareksander and others added 23 commits April 23, 2022 00:36
…s now part of the Termux github organization.
Using the TermuxConstants.TERMUX_FILES_DIR variable to get full path
TermuxConstants.TERMUX_FILES_DIR_PATH/api/am-socket.
…d.termux.plugins.TermuxPluginUtils`

This will allow plugins and `termux-shared` library to trigger plugin error notifications too and process plugin command results.
…ring()` and `getArgumentsMarkdownString()` functions for external usage
…by `CrashHandler` receives an exception on a non main thread

Rename function that should be used by main thread of apps to `setDefaultCrashHandler()`.

Functions for other threads will be added in a later commit.
…shHandler` as the `UncaughtExceptionHandler`
… log errors that may contain potentially private info unless log level is debug or higher

Execution commands and other errors that may contain potentially private info should not be logged unless user has explicitly allowed it since apps with `READ_LOGS` permission would be able to read the data. A notification for failed executions commands would still be shown if enabled and required.
…create them at application startup.

The termux files directory will also be checked and created if required at startup and code related to it will only be run if it is accessible. This can later also be used for init execution commands.

The `TERMUX_APP.APPS_DIR_PATH` will act as app specific directory for `termux-app` app related files. Other plugin apps will have their own directories under `TERMUX_APPS_DIR_PATH` if required.
The user can add `run-termux-am-socket-server=false` entry to `termux.properties` file to disable the `termux-am` server to run at app startup which is connected to by `$PREFIX/bin/termux-am` from the `termux-am-socket` package. The default value is `true`. Changes require `termux-app` to be force stopped and restarted to provide consistent state for all termux sessions and tasks.

The prop will be used in a later commit.
…make client handling abstract

- Added `LocalSocketManager` to manage the server, `LocalServerSocket` to represent server socket, `LocalClientSocket` to represent client socket, `LocalSocketRunConfig` to store server run config and `ILocalSocketManager` as interface for the `LocalSocketManager` to handle callbacks from the server to handle clients.
- Added support to get full `PeerCred` for client socket, including `pid`, `pname`, `uid`, `uname`, `gid`, `gname` and `cmdline` instead of just `uid`. This should provide more info for error logs about which client failed or tried to connect in case of disallowed clients. Some data is filled in native code and some in java. Native support for added to get process name and `cmdline` of a process with a specific pid.
- Added `JniResult` to get results for JNI calls. Previously only an int was returned and incomplete errors logged. With `JniResult`, both `retval` and `errno` will be returned and full error messages in `errmsg`, including all `strerror()` output for `errno`s. This would provide more helpful info on errors.
- Added `Error` support via `LocalSocketErrno` which contains full error messages and stacktraces for all native and java calls, allowing much better error reporting to users and devs. The errors will be logged by `LocalSocketManagerClientBase` if log level is debug or higher since `PeerCred` `cmdline` may contain private info of users.
- Added support in java to check if socket path was an absolute path and not greater than `108` bytes, after canonicalizing it since otherwise it would result in creation of useless parent directories on failure.
- Added `readDataOnInputStream()` and `sendDataToOutputStream()` functions to `LocalClientSocket` so that server manager client can easily read and send data.

- Renamed the variables and functions as per convention, specially one letter variables. https://source.android.com/setup/contribute/code-style#follow-field-naming-conventions
- Rename `local-filesystem-socket` to `local-filesystem` since abstract namespace sockets can also be created.
- Previously, it was assumed that all local server would expect a shell command string that should be converted to command args with `ArgumentTokenizer` and then should be passed to `LocalSocketHandler.handle()` and then result sent back to client with exit code, stdout and stderr, but there could be any kind of servers in which behaviour is different. Such client handling should not be hard coded and the server manager client should handle the client themselves however they like, including closing the client socket. This will now be done with `ILocalSocketManager. onClientAccepted(LocalSocketManager, LocalClientSocket)`.

- Ensure app does not crash if `local-socket` library is not found or for any other exceptions in the server since anything running in the `Application` class is critical that it does not fail since user would not be able to recover from it, specially non rooted users without SAF support to disable the server with a prop.
- Make sure all reasonable JNI exceptions are caught instead of crashing the app.
- Fixed issue where client logic (`LocalSocketHandler.handle()` was being run in the same thread as the new client acceptable thread, basically blocking new clients until previous client's am command was fully processed. Now all client interface callbacks are started in new threads by `LocalSocketManager`.
- Fix bug where timeout would not be greater than `1000ms` due to only using `tv_usec` which caps at `999,999`.
The `AmSocketServer` now handles the entire logic for processing of am commands sent by clients and its results. This can be used by other apps as well to run their own am servers. The server started by `termux-app` will be managed by `TermuxAmSocketServer`. Read their javadocs for details.

The extended implementation `TermuxAmSocketServerClient` of `AmSocketServer.AmSocketServerClient`/`ILocalSocketManager` will also send a plugin error notification for all errors to the user instead of just logging to logcat since users are not very good at checking those, this should save dev time debugging problems. We may need to ignore notifications for some errors like broken pipe, based on their `Error` objects if they are normally expected, this requires further investigation.

The `TERMUX_APP_AM_SOCKET_SERVER_ENABLED` env variable will also be exported for all shell sessions and tasks for whether the server was successfully started on app startup. The user can disable the server by adding "run-termux-am-socket-server=false" to the "~/.termux/termux.properties" as implemented in 5f8a922. The env variable will be checked by `$PREFIX/bin/termux-am` before attempting to connect.

The new path for the server socket is `/data/data/com.termux/files/apps/termux-app/termux-am/am.sock` as per `TERMUX_APP.APPS_DIR_PATH` added in bcd8f4c.
```
Exception in createServerSocketNative():
java.lang.NoSuchMethodError: no non-static method "Lcom/termux/shared/jni/models/JniResult;.<init>(IILjava/lang/String;I)V"
	at com.termux.shared.net.socket.local.LocalSocketManager.createServerSocketNative(Native Method)
	at com.termux.shared.net.socket.local.LocalSocketManager.createServerSocket(LocalSocketManager.java:125)
	at com.termux.shared.net.socket.local.LocalServerSocket.start(LocalServerSocket.java:100)
	at com.termux.shared.net.socket.local.LocalSocketManager.start(LocalSocketManager.java:84)
	at com.termux.shared.shell.am.AmSocketServer.start(AmSocketServer.java:68)
	at com.termux.shared.termux.shell.am.TermuxAmSocketServer.start(TermuxAmSocketServer.java:101)
	at com.termux.shared.termux.shell.am.TermuxAmSocketServer.setupTermuxAmSocketServer(TermuxAmSocketServer.java:77)
	at com.termux.app.TermuxApplication.onCreate(TermuxApplication.java:53)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6719)
	at android.app.ActivityThread.access$1300(ActivityThread.java:237)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
```
@agnostic-apollo agnostic-apollo merged commit 7f7d889 into termux:master Apr 22, 2022
Grimler91 pushed a commit to termux/termux-packages that referenced this pull request Apr 27, 2022
Client to use the new am implementation from this PR: termux/termux-app#2458
@tareksander tareksander deleted the am-integration branch March 26, 2024 08:01
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

Successfully merging this pull request may close these issues.

None yet

3 participants