I don't know the particular reason in which the old command wasn't working, but it was deadlocking on the Popen(kill_cmd) line. Even spawning the command on a adb shell did not work. If I'd to guess, maybe something related to newer devices, SDK versions, etc.?
Notwithstanding, it seems to me that the proposed implementation is more robust, at least based on the little knowledge I have :)
I don't know the particular reason in which the old command wasn't working, but it was deadlocking on the
Popen(kill_cmd)
line. Even spawning the command on aadb shell
did not work. If I'd to guess, maybe something related to newer devices, SDK versions, etc.?Notwithstanding, it seems to me that the proposed implementation is more robust, at least based on the little knowledge I have :)