Skip to content

A demo Android project showcasing dynamic DEX loading using DexClassLoader, PathClassLoader, and in-memory execution. For educational purposes only.

License

Notifications You must be signed in to change notification settings

BEND0US/DexLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšกDex Loader (Android)

This project demonstrates different methods of loading and executing DEX files in Android, with a focus on dynamic loading techniques such as DexClassLoader, PathClassLoader, and in-memory execution.


๐Ÿ“ฆ Project Structure

  • Dex Loader: Loads and executes contacts.dex, which simulates reading device contacts.
  • PathClassLoader / In-Memory Dex Loader: Load classes.dex, which contains a simple method that generates a random number and displays it on screen.
    • The In-Memory Dex Loader simulates fetching the dex file from a remote server before executing it.

โš ๏ธ Android Version Limitations

DexClassLoader usage is restricted on Android 10 and above. The demo may not function properly on newer devices due to scoped storage and runtime execution limitations.


๐Ÿ“‹ Permissions

The app requests the READ_CONTACTS permission because the contacts.dex file simulates accessing the user's contact list.


๐Ÿš€ How It Works

  1. contacts.dex is executed through DexClassLoader and prints contact data to logcat.
  2. classes.dex is used in both PathClassLoader and In-Memory loaders to generate a random number, which is shown in the UI.
  3. The In-Memory Dex Loader simulates downloading and executing a dex file directly from memory, without saving it to disk.

๐Ÿ“Œ Disclaimer

This project is intended for educational and research purposes only.
Do not use it for malicious, unethical, or illegal activities.
The author takes no responsibility for any misuse or damage caused.

About

A demo Android project showcasing dynamic DEX loading using DexClassLoader, PathClassLoader, and in-memory execution. For educational purposes only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages