Appium with android device

Trying to setup Appium with Android but keep getting errors. I have an APK manually installed to an actual device. I have followed the instructions on the error message with no luck.

My Desired capabilities are set to:

“appPackage”: “”,
“appActivity”: “”,
“platformName”: “Android”, “deviceName”:
“Google Pixel 3a”,
“udid”: “99NBY3DL9K”,
“automationName”: “UiAutomator2”,

Get this error:

An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘’ application. Visit for troubleshooting. Original error: Error executing adbExec. Original error: ‘Command ‘/Users/pops/Library/Android/sdk/platform-tools/adb -P 5037 -s 99NBY3DL9K shell am start -W -n -S’ exited with code 255’; Stderr: ‘Exception occurred while executing ‘start’: java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 } from null (pid=7171, uid=2000) not exported from uid 10304 at at at at at at at at android.os.BasicShellCommandHandler.exec( at android.os.ShellCommand.exec( at at android.os.Binder.shellCommand( at android.os.Binder.onTransact( at$Stub.onTransact( at at android.os.Binder.execTransactInternal( at android.os.Binder.execTransact(’; Code: ‘255’ …

The error and possible solution is documented here:

Have you tried inspecting the device thru appium desktop? You can try adding the minimum desired cap and see if you can open the device then check the logs for the detected appPackage and appActivity

 "platformName": "Android",
 "platformVersion": "11",
 "deviceName": "Pixel_3a_API_30_x86",
 "app": "<app location>"
 “automationName”: “UiAutomator2”,

Thanks. Tried that but it didn’t work

sorry it did work, thanks. But how to access the installed app then?

BTW I know the app package and activity using-

adb shell dumpsys window windows

but when i enter them in the desired capabilities it throws the error

“app”: “” ?

For the app i entered :

“appPackage”: “”,

Am I suppose to enter “app” ?