adb android launch settings shell

Android: launch app info dialog via adb shell am

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 -es -es pkg

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?