I would like to launch Appium Inspector session to attach to the currently running Android app on my device. The problem I'm facing is that whenever I start the session, the running app is getting killed and launched again. Is there any way to avoid that?
I'm currently using the following config:
{
"appium:automationName": "UiAutomator2",
"platformName": "android",
"appium:app": "/my/path/to/apk",
"appium:noReset": true
}
Not sure, but those capabilities might help:
"appium:noReset": true,
"appium:autoLaunch": false,
Also, remove appium:app
capability and try to run without it (possibly appium will just create an empty session without app and will wait for new instructions).
If it doesn't work, replace appium:app
with:
"appium:appPackage": ...,
"appium:appActivity":...
Update
The final capabilities set
"appium:autoLaunch": false, // to disable app relaunch on Appium session start
"appium:noReset": true,
"appium:dontStopAppOnReset": true, // to prevent closing the app Appium Inspector's session stopped
"appium:app"