Is it possible to run classes.dex without apk in Android Runtime like Dalvik?

968 Views Asked by At

I know how to run classes.dex on DalvikVM via adb using command adb shell dalvikvm -cp /sdcard/App.zip HelloWorld where App.zip contains classes.dex, or adb shell app_process -Djava.class.path=/sdcard/classes.dex /sdcard HelloWorld.

So is it possible to execute classes.dex on Android Runtime (ART) like this, without any resource files and apk? I know ART use dex2oat to compile, is there any way to manually compile classes.dex into oat file, and execute the oat file later, by adb?

1

There are 1 best solutions below

1
On

You can still use both of those methods to on the latest versions of Android. The "dalvikvm" command is still present, although it's not actually dalvik, it's just a frontend for art.