I need that every time before running the tests, run the task with the command for adb
adb shell pm reset-permissions
I tried doing this in my gradle file, it`s compilling, but how does it run?
buildscript {
...
}
android {
...
}
task resetPermission(type: Exec) {
commandLine 'adb', 'shell', 'pm', 'reset-permissions'
}
You'll need to edit your test running configurations, to add the task.
See my (similar) answer here : https://stackoverflow.com/a/35157119/4706693
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With