Must Android 7.0 devices be rooted to UI test on them?

Hey guys, I just ran into a problem using an Android 7.0 Nexus 9 with Appium. When trying to launch tests on the device, I get an error from appium:

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: Command ‘/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s <device_id> shell stop’ exited with code 1{“stdout”:"",“stderr”:“stop: must be root\n”,“code”:1}

Manually running adb shell stop also throws that error.

Do we have to root Android 7.0 devices to be able to run UI tests on them?


Check the id of the adb server – sounds like it’s not owned by you. If you kill it as root, then access adb as yourself, your problem should resolve itself.

I got feedback from appium git issue. There seems to a problem with adb stop on android 7.0 that the appium devs haven’t resolved yet, but they are working on it.

Problem occurs when changing the language/locale of the device to anything else than standard english.