We want to be able to upgrade our apk on our Android device when we start appium.
Doing this manually, I would use "adb install -r ". I notice Lookout uses adb pm install -r . There appears to be some behavior differences for these two commands – notice this output:
I’ve seen some oddness in the past with Android, for example, “adb logcat” and “adb shell logcat” do not behave the same on all devices. I wonder if anyone knows anything about this behavior for Android. I also wonder if there is any reason “shell pm install -r” was chosen instead of “install -r”.
install -r spends a considerable amount of time pushing the apk to the device. pm install will install an on device apk. If pm install fails then that’s a bug and I recommend opening an issue on GitHub.
I only ran it manually because this is the error that I get when I run this through Appium and I wanted to isolate this from Appium itself. I’ll run this test later and post the server logs.
Sure enough, when I tried this again, the problem did not manifest itself. I’ll keep an eye out for the failure and grab the server logs next time it happens.