2

We can able to launch activity using the following adb shell command.

adb shell am start -n <PackageName>/<ActivityName>

But some of apps the above command is not working, we need to remove "-n" option from the above command. Like following.

adb shell am start <PackageName>/<ActivityName>

What is the use of "-n" option? why sometimes we can not able to launch app using "-n" option?

2 Answers 2

2

According to Specification for intent arguments:

-n component

Specify the component name with package name prefix to create an explicit intent, such as com.example.app/.ExampleActivity.

-3

Short answer: none.

Because according to the Android ADB Command Line Documentation there is no option -n for the activity manager. So there's no need to have that option there in the first place.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.