Can Android execute a classes.dex (or .jar converted from classes.dex) without a manifest, drawables, etc?

StackOverflow https://stackoverflow.com/questions/22970760

  •  30-06-2023
  •  | 
  •  

Question

I have a bunch of DEX files but were not extracted from an APK by myself so I do not have the manifest, drawables, plus the rest of the resources/etc that are typically wrapped inside an APK. Is it possible to execute these in Android? I have tried dalvikvm to run the .dex itself as well as the .dex contained inside a .jar. I have also found what I believe to be the main activity to call but still no luck. Is this even possible?

Was it helpful?

Solution

It is not possible to run an Android application like that. It must be packaged into an apk with an AndroidManifest.xml, etc.

Using dalvikvm with a dex/jar from the terminal like what you describe only works for a public void main(String[] args) style command-line java application.

OTHER TIPS

You can run only a jar(contains a classes.dex) or a dex file in the command line mode. dalvikvm works like the java in the command line.

Here is an Example: How to execute the dex file in android with command?

Nope is not possible...just go through how it is done!!

enter image description here

For more details check out: http://www.alittlemadness.com/2010/06/07/understanding-the-android-build-process/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top