Code Monkey home page Code Monkey logo

Comments (5)

 avatar commented on May 24, 2024 1

Not sure whether it is possible to stop random activities but you can stop service with something like

am stopservice com.termux/.app.TermuxService

Replace package name & service class name with appropriate values.

from dextop.

 avatar commented on May 24, 2024 1

For example, if you use VNC Viewer by RealVNC, try this command:

am stopservice com.realvnc.viewer.android/.app.ConnectionService

from dextop.

nathaneltitane avatar nathaneltitane commented on May 24, 2024

@xeffyr can I bug you on this one:

what would be the command to pass through termux's am to kill a specific application?

Thank you

from dextop.

nathaneltitane avatar nathaneltitane commented on May 24, 2024

Thank you @xeffyr! i will look into the manifests to get the info :)

EDIT:

so having realvnc viewer already installed, even when launching a vnc connection, there does not seem to be any active service running that calls on com.realvnc.viewer.android.app.ConnectionService although the manifest clearly lists
<service android:exported="false" android:name="com.realvnc.viewer.android.app.ConnectionService" android:stopWithTask="true"/>

Am I doing this wrong? Should i explicitly launch the service from termux to have it be closed by am afterwards?

Sidenote:

Just for discussion's sake and the possible use cases made of termux such as my project: what are the odds termux could build it's own vnc viewer that ties into the already existing product and has users control the session à la LinuxOnDex?

from dextop.

 avatar commented on May 24, 2024

there does not seem to be any active service

This is not true. com.realvnc.viewer.android.app.ConnectionService is a background job responsible for VNC connection.

Seems like regular application can stop only its own services. I was not able to stop it from Termux but from ADB with root permissions command from #1 (comment) worked fine:

heroltexx:/ # am stopservice com.realvnc.viewer.android/.app.ConnectionService
Stopping service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.realvnc.viewer.android/.app.ConnectionService }
Service stopped

from dextop.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.