Android: launch app info dialog via adb shell am
Asked Answered
S

2

7

I'm trying to write a script which will launch the "app info" system dialog via adb for an app I'm testing.

I have done some investigation and came up with this command, which will launch "app info" but fails with a force close (NullPointerException in logcat):

adb shell am start -a android.intent.action.VIEW -n com.android.settings/.applications.InstalledAppDetails -es com.android.settings.ApplicationPkgName com.my.app -es pkg com.my.app

Seems that the package name isn't being properly passed.

What is the correct way to pass the package name parameter to the am command in this case?

Seitz answered 3/9, 2013 at 10:27 Comment(2)
Try out this one: adb shell am start -n com.android.settings/com.android.settings.applications.InstalledAppDetailsSchematism
is that the whole command? I can't see how to pass the package name as a parameter to the InstalledAppDetails app.Quenna
T
11
adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:<package-name>
Thanos answered 21/1, 2016 at 15:41 Comment(0)
L
1

Also, check this: https://mcmap.net/q/64181/-how-to-start-an-application-using-android-adb-tools

adb shell am start -n com.package.name/com.package.name.ActivityName

http://developer.android.com/tools/help/shell.html#am

You can also issue an activity manager command directly from adb without entering a remote shell.

For example:

adb shell am start -a android.intent.action.VIEW

Seems like, start -a is a good way.

Leonie answered 21/1, 2016 at 15:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.