5

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?

André Fernandes
  • 2,335
  • 3
  • 25
  • 33
  • Try out this one: adb shell am start -n com.android.settings/com.android.settings.applications.InstalledAppDetails – Zax Sep 03 '13 at 10:46
  • 1
    is that the whole command? I can't see how to pass the package name as a parameter to the InstalledAppDetails app. – André Fernandes Sep 03 '13 at 12:31

2 Answers2

9
adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:<package-name>
Anton Rutkevich
  • 592
  • 1
  • 7
  • 11
1

Also, check this: https://stackoverflow.com/a/4567928/4409113

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.

Community
  • 1
  • 1
ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108