0

I am using Monkey to take measurements on an Android device. I launch a series of applications and after a certain amount of time I should kill one. Is it possible to do this without unlocking the root permissions on the smartphone? I've tried several commands, including:

adb shell am force-stop com.samsung.android.calendar

adb shell am kill com.samsung.android.calendar

Unfortunately these commands don't work or maybe they work on the spot, but after a few seconds Monkey relaunches the application. I found other commands that however require you to unlock the root permissions on the smartphone, which I should avoid.

Luigi
  • 181
  • 3
  • 15
  • Check https://stackoverflow.com/a/10002312/236465 – Diego Torres Milano Mar 29 '22 at 21:25
  • If monkey restarts the app then you should first stop monkey and then the app. – Robert Mar 30 '22 at 07:13
  • @Robert I can't stop Monkey because it has to generate the series of events set by the seed. If I stop it and then restart it, it generates a series from the beginning. – Luigi Mar 30 '22 at 08:44
  • Sorry but then your question is unclear what you actually want to do. Please describe why you want to stop the app but keep monkey running. I don't see any sense in doing so. – Robert Mar 30 '22 at 08:47
  • @Robert I launch 10 user apps with Monkey to take measurements. After a certain amount of time, I have to kill an app to measure the impact that app has on performance degradation. Out of 10 applications, I only have to kill one, while the other 9 must continue to be launched by Monkey. – Luigi Mar 30 '22 at 09:17
  • You didn't show how you start the 10 apps? 1 monkey? 10 monkeys? – Diego Torres Milano Mar 30 '22 at 16:10

0 Answers0