Ashish Jain
Ashish Jain

Reputation: 770

How to close android application completely using adb or appium or any command line+python

I have tried to close android application using adb command and appium server but it is minimizing the app, not closing. I used below command for closing.

adb shell am force-stop com.package.name

AND if i try this command to kill process then it says,

adb shell kill 21860

Error:Operation omitted

Please let me know any way or command line to close android app completely, not run in background.

Thanks in advance!

I don't want to see in the background application list like below image.enter image description here

Upvotes: 1

Views: 5867

Answers (2)

nby
nby

Reputation: 99

Why not just:

  1. un-installing app (it will stop any service or running process of it):
adb -s <udid> uninstall <appPackage>
  1. and then installing it again:
adb -s <udid> install <apkPath>

Note:

In my case it is not working, because my app need to be registered each time re-installed, and working around it with 3rd app (e.g. Appium) is taking too long.

Upvotes: -1

lobi
lobi

Reputation: 58

adb shell am force-stop <PACKAGE-NAME>

Force stopS everything associated with <PACKAGE-NAME>

should work since honeycomb

Upvotes: -1

Related Questions