To start a specific Android app on a given display using adb, you can use the am start command with the --display option. Here’s how you can do it:
shelladb shell am start --display <DISPLAY_ID> -n <PACKAGE_NAME>/<ACTIVITY_NAME>
<DISPLAY_ID>1 for the main display, 2 for a secondary display).<PACKAGE_NAME>com.example.app).<ACTIVITY_NAME>.MainActivity).Suppose you want to start the app with package name com.example.myapp and activity com.example.myapp.MainActivity on display 2:
shelladb shell am start --display 2 -n com.example.myapp/com.example.myapp.MainActivity
To list available displays, use:
shelladb shell dumpsys display
Look for the mDisplayId field in the output.