Unable to start the Android app through CMD

Hi Any one knows what is exact issue with below issue:

java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.searchnow.SearchNowActivity } from null (pid=17627, uid=2000) not exported from uid 10078

It seems that app activity is not correct but not able to get correct app activity

Every app activity cannot be launched using adb command due to security reasons.
Few activities of app only will be exported. More you export activity higher the chances of vulnerability in app. In general app launch activities are exported so this activity might not be the launch activity of the app you are trying to launch or all the activities are protected from launching using intent.

Thanks a lot Prajith_KP, but then how to find the initial launch activity? I tried with dumpsys window windows | grep -E ‘mCurrentFocus’ but when i used this one in CMD to open it then it is throwing error. How to then find correct initial app launch activity?

Use the command

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'

try executing this along with the app launch dont wait for app to launch fully.
Mostly there will be some splash screen activity before main.

If that also not working in playstore search for “Activity launcher” you will find some apps which retrieves all the activities from that which ever is launchable will be first activity.

Last option if u have apk decompile it check in manifest file what is launch activity.