Page 1 of 1
A flow wich kill al the app running in backgroud, possible?
Posted: 29 Mar 2016 11:39
by wfrcrd
My device is rooted and I'd like to perform that action but I don't know how.
There is a complete guide to commands and so on ?
Thank you in advice.
Re: A flow wich kill al the app running in backgroud, possib
Posted: 29 Mar 2016 18:20
by Martin
Hi,
You can try action
Execute Root Command with command
am kill-all. The documentation provided by Google reads:
am kill-all: Kill all background processes.
You can find other interesting stuff by executing command
am (without options). I recommend to connect the device to a PC and use adb to experiment with such command line tools. There are other tools available on Android that provide other interesting features: pm, input, svc, dumpsys.
Regards,
Martin
Re: A flow wich kill al the app running in backgroud, possib
Posted: 29 Mar 2016 19:36
by wfrcrd
Thank you !
Re: A flow wich kill al the app running in backgroud, possib
Posted: 04 Apr 2016 20:21
by wfrcrd
Im sorry to say that the command don't kill the app (on my rooted device) too bad ...
Re: A flow wich kill al the app running in backgroud, possib
Posted: 05 Apr 2016 19:02
by Martin
Maybe it's not a background process or Android restarts the process. You can use command am force-stop <package> to kill the app.
Re: A flow wich kill al the app running in backgroud, possib
Posted: 06 Apr 2016 09:48
by wfrcrd
Martin wrote:Maybe it's not a background process or Android restarts the process. You can use command am force-stop <package> to kill the app.
To me still don't work, I have a terminal emulator too: someone can tell me the command to run on a terminal emulator to killa an app?
So I can check if it's a system problem or an app problem.
Thank you !
Re: A flow wich kill al the app running in backgroud, possib
Posted: 06 Apr 2016 16:40
by andy
Hi,
Following line is working for me
service call activity 79 s16 <package name>
Re: A flow wich kill al the app running in backgroud, possib
Posted: 06 Apr 2016 17:05
by wfrcrd
andy wrote:Hi,
Following line is working for me
service call activity 79 s16 <package name>
Thank you , but where are you givin this line ? In a terminal emulator or in a flow ?
What does it means " 79 s16" ?
Thank you
Re: A flow wich kill al the app running in backgroud, possib
Posted: 06 Apr 2016 18:57
by andy
I use it in a flow. Create an action for root command. I use it inside my sidebar overlay
I cannot explain what it does. For sure google knows more.
Re: A flow wich kill al the app running in backgroud, possib
Posted: 06 Apr 2016 19:31
by Martin
service call activity 79... is probably the same as am force-stop...
activity is the name of the system service. The relevant part of source can be found here:
https://android.googlesource.com/platfo ... nager.java
Scroll down to line 544 which reads
int FORCE_STOP_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+78;
IBinder.FIRST_CALL_TRANSACTION is 1 + 78 --> 79
am is a utility to call the same functions on the activity manager that are also accessible with
service call however
am is more stable since Google will ensure that it works on different versions of Android. The number 79 could be wrong on other versions of Android so 79 might suddenly uninstall an app or clear the data.