root method
Implementation
Future<void> root(List<String> arguments, {bool debug = false}) async {
await init();
await execute([...arguments, 'root'], debug: debug);
final now = DateTime.now();
while (DateTime.now().difference(now) < _kRootTimeout) {
await Future.delayed(_kRootInterval);
if (await isRooted(arguments)) {
return;
}
}
throw Exception('Failed to start adb as root');
}