0
votes

I want to make web apps that run system shell scripts on my phone.

Of course when I import dart:io;, in the dart editor, I get;

Failed to load a file dart:io ...

I understand that dart:io is prohibited in client code. Is there a solution to execute such local system scripts from a web app or some alternative gui control on android?

Why?

Because these would be interesting for my daily use, simple to have up an running and can help me to learn about dart. Or is this a totally misguided (and prohibited) use of dart?

1

1 Answers

2
votes

I believe the short answer to your question is "no". It would be a significant breach of security if a web app could run shell scripts on a phone. Specifically, Dart code compiled to Javascript to run in the Android browser should certainly not be able to execute files. That would be a hole so big in security that you could drive a bus through it. You can't even execute shell scripts from Javascript in a browser on your desktop... why should it be any different on Android.