How to launch an Android app using ADB commands?

Android Debug Bridge (ADB) is a command-line tool that lets you communicate with a device which can be either an Emulator or Real Android device.
If you want to launch an app without actual manually launching the app, then we can use an ADB command to do that.
Precondition:
1. Debugging mode should be turned ON in the device.
2. ADB tool should be configured in the desktop.
3. Mobile drivers should be installed after connecting the real device.( Not Applicable for Emulator)
4. Package name and Activity name should be noticed.
 Firstly check if the device is connected successfully or not.
ADB-1
Then launch the shell from the command prompt using adb shell command
ADB-2
Then provide the below command from the command prompt with the package name and activity name.
ADB-3
adb shell
am start -n com.package.name/com.package.name.ActivityName
This adb command will be launching the app using the package name and activity name. This particular command is largely helpful usually while automating the maintenance activities during mobile automation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: