How to open any application available in phone or installed through termux command line? I can run only chrome with this command but how to open other applications?
am start --user 0 -n com.android.chrome/com.google.android.apps.chrome.Main
How to open any application available in phone or installed through termux command line? I can run only chrome with this command but how to open other applications?
am start --user 0 -n com.android.chrome/com.google.android.apps.chrome.Main
$ adb shell pm list packages -f -3
this is easiest if you grep for what you want (example: X server):
$ adb shell pm list packages -f -3 | grep -i server
package:/data/app/x.org.server-pn6gNfAPA-hplcvZLS-JsA==/base.apk=x.org.server
$ PACKAGE=x.org.server
$ adb shell dumpsys package | grep -Eo $(printf "^[[:space:]]+[0-9a-f]+[[:space:]]+%s/[^[:space:]]+" "${PACKAGE}") | grep -oE "[^[:space:]]+$"
x.org.server/.RunFromOtherApp
x.org.server/.MainActivity
x.org.server/.MainActivity
am start
command with the above found activity name:am start --user 0 -n x.org.server/.RunFromOtherApp
It is just the same answer for termux
am start --user 0 -n com.Package.name/activityclass
You can find activity class through apk info
app available in Google Playstore.
Here's how you should do it.
am start --user 0 -n com.Package.name/activityclass
To find the activity class and stuff, there is an app called Dev Tools. You can inspect any personal app, using this app. You can also find the Activity class there, and much more.
You can use Termux Launcher
This app provides a command launch [ShortAppName]
to open any app.
© 2022 - 2024 — McMap. All rights reserved.
adb
at all: you can runam
andsudo dumpsys
from Termux. – Roast