这是indexloc提供的服务,不要输入任何密码
Skip to content

Feature Request: Add the ability to run Termux commands via. ADB without root. #924

@JacobTDC

Description

@JacobTDC

Currently, in order to run a command, you have to do something like this:

adb shell am start -n com.termux/.app.TermuxActivity
adb shell input text "[command here]"
adb shell input keyevent 113 && adb shell input keyevent 66

which, in my opinion, is a little hackey... There are a lot of things that could stop this script, like the screen being locked or a Termux session already being open with text typed in.

I propose that a new Activity/Service is added (or an extension of com.termux/.app.TermuxService to allow use by ADB). You could possibly even allow another app (with user granted permission) to run a command!

This would be BEYOND useful (and a little cool, too), like being able to start up sshd and setup port forwarding completely from the computer! You wouldn't even have to unlock the screen, assuming that you have already accepted the computer's RSA Fingerprint on your phone.


If something to allow this already exists, just let me know and I can change the title and close the "Issue".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions