Created
May 13, 2023 13:38
-
-
Save prongbang/4ab50a34f32d226a9b6ea6eb85bd3a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
void main() { | |
// Get the current platform. | |
final platform = Platform.isAndroid ? 'android' : 'ios'; | |
// Disable remote desktop for the current platform. | |
if (platform == 'android') { | |
// Set the value of the "adb tcpip" command to 0. | |
Process.run('adb', ['tcpip', '0']); | |
} else if (platform == 'ios') { | |
// Set the value of the "defaults write" command to "NO". | |
Process.run('defaults', ['write', 'com.apple.RemoteDesktop', 'ARDAgentEnabled', 'NO']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment