I have a headless pi3 running Android things. My app is an irrigation system. It's out in a greenhouse, so I connect to it via wifi. I have the app running by default on boot.
I can change code, uninstall/reinstall with Android Studio, and everything works as I'd expect.
However, if I reboot the pi, the code that runs when the pi reboots is about three weeks out of date - an old version I've superseded. Using ADB to uninstall the app doesn't remove this copy. I've tried cleaning the project too. I'd reinstall Things and start again, but the pi now has lots of wires connecting it to lots of solenoid valves, and I'd really rather not undo that, especially as this issue might reoccur later.
Any suggestions as to what's going on, and how I can get rid of this old code and get my pi to boot up and run the most recent version?