Android: launch app details dialog via adb shell am

I am trying to write a script that will launch the "application information" system dialog via adb for the application that I am testing.

I did some investigation and came up with this command that will run “application information” but will not work with force closure (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 

It seems that the package name is not being transmitted properly.

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

+4
source share
2 answers
 adb shell am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d package:<package-name> 
+4
source

Also check the following: fooobar.com/questions/20087 / ...

 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 instance:

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

It looks like start -a is a good way.

0
source

Source: https://habr.com/ru/post/1500275/


All Articles