Why is it, that android apps are required to run inside a VM(dalvik/art)?

225 views

is this OS level restriction?

if so why did android decide to go this route? also why java? c# is also platform independent

​

another stupid question if there were a jvm implementation like dalvik or ART on iOS would the programme compiled for android run-on iOS?

if so, can anybody create said implementation or can it only be provided by apple?

In: 0

3 Answers

Anonymous 0 Comments

Yes, it is a security restriction. Desktop is also moving towards offering a similar system with Windows Store applications and Ubuntu Snap Store, both of which severely restrict access to the system with a permissions based approach.

Android went this route because the no. 1 reason for virus infections is the user downloading some sus program that then has access to most of the system because it runs with the security access of the user. The vast majority of mobile applications don’t need access to anything other than maybe the photos folder, so why give them the keys to the house? Note that a phone is basically the perfect spy bug, with GPS, multiple cameras, microphones, even an NFC reader to skim credit cards that brush against it in your pocket. It is imperative to restrict access to the systems.

Why java instead of C#? Because C# was not open source until 2016 and it was *very* platform dependent. The only cross platform C# runtime at the time android was being developed was mono, which while being very impressive and the basis of crossplatform Unity games, had many drawbacks and is still behind on implementing language features. Java was made to be crossplatform from the start, and Google had tons of java developers.

You are viewing 1 out of 3 answers, click here to view all answers.