I don't know if anyone else has run into this problem, but when I try to use AndroidViewClient/Monkeyrunner to click on the checkboxes for the "Stay Awake" and "Allow mock locations" options, they do not persist after navigating away from the Developer options settings or leaving the Settings app. Here's the code I'm using to access them:
def enable_developer_setting(vc, name):
setting = vc.findViewWithTextOrRaise(name).getParent().getParent()
if not setting.children[len(setting.children) - 1].children[0].isChecked():
print(name + " not enabled...enabling")
setting.touch()
enable_developer_setting(vc, "Stay awake")
enable_developer_setting(vc, "USB debugging")
enable_developer_setting(vc, "Allow mock locations")