Reputation: 371
Actually, I always believe the answer is no: an Android application must run over a separate instance of ART (like Java over JVM) to translate and take care of cross-platform needs.
However, I then feel confused about the figure of the android stack that Google puts. The way it draws seems to imply that, System Apps + Java API framework could go to the bottom through Native c/c++ libraries without Android Runtime. But I would like to argue that, if Java needs to call to native space, Android Runtime (JVM/legacy Dalvik) is still needed to interpret the source and make calls to native via JNI. Simply putting Java API Framework over Native Libraries is misleading to me.
Please comment and correct me if anything is logically incomplete or incorrect. Thanks
Upvotes: 5
Views: 764
Reputation: 1342
I've been doubted that it is not possible. However, If you decompile an apk to smali, you will see that smali is a more easily read java byte code. Convert smali from an apk to java source code and you have ART's java translation. You can emulate/replace/recreate the Native/ART implementation and everything below that is self explanatory. It is linux based with hardware attributes that provide input to ART, retrieved by C++ only to be used by java producing the systems applications.
Upvotes: 3