I'm trying to run an end to end test on my device thus I have to ask permission to access position through adb When I run the command from a terminal it's working as expected but when dart:io is executing it throw this exception (and it's the same for every adb commands)
Enviroment :
- MacOs
- Android Studio
Code :
void main() {
group('Testing full app flow', () {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
setUpAll(() async {
await Process.run('adb' , ['shell' ,'pm', 'grant', 'com.MYSERVICE', 'android.permission.ACCESS_FINE_LOCATION']);
});
testWidgets('test the password input on real device/emulator', (tester) async {
//TESTS
});
});
}