
Negligible lookup maps used for matching fingerprints have been removed to reduce the likelihood of OOM when the maps are instantiated, commonly observed with 400M RAM. Additionally, lookup maps previously kept for the duration of the patcher instance are now cleared before the classes are compiled. This reduces the likelihood of OOM when compiling classes. On a related note, a linear increase in memory usage is observed with every compiled class until all classes are compiled implying compiled classes not being freed by GC because they are still referenced. After compiling a class, the class is technically free-able though. The classes are assumed to be referenced in the `multidexlib2` library that takes the list of all classes to compile multiple DEX with and seems to hold the reference to all these classes in memory until all DEX are compiled. A clever fix would involve splitting the list of classes into chunks and getting rid of the list of all classes so that after every DEX compilation, the corresponding split of classes can be freed.
Continuing the legacy of Vanced
💉 ReVanced Patcher
ReVanced Patcher used to patch Android applications.
❓ About
ReVanced Patcher is a library that is used to patch Android applications.
It powers ReVanced Manager,
ReVanced CLI
and ReVanced Library and a rich set of patches have been developed
using ReVanced Patcher in the ReVanced Patches repository.
💪 Features
Some of the features the ReVanced Patcher provides are:
- 🔧 Patch Dalvik VM bytecode: Disassemble and assemble Dalvik bytecode
- 📦 Patch APK resources: Decode and build Android APK resources
- 📂 Patch arbitrary APK files: Read and write arbitrary files directly from and to APK files
- 🧩 Write modular patches: Extensive API to write modular patches that can patch Dalvik VM bytecode, APK resources and arbitrary APK files
🚀 How to get started
To use ReVanced Patcher in your project, follow these steps:
-
Add the repository to your project
-
Add the dependency to your project:
dependencies { implementation("app.revanced:revanced-patcher:{$version}") }
For a minimal project configuration, see ReVanced Patches template.
📚 Everything else
📙 Contributing
Thank you for considering contributing to ReVanced Patcher. You can find the contribution guidelines here.
🛠️ Building
To build ReVanced Patcher, you can follow the ReVanced documentation.
📃 Documentation
The documentation contains the fundamentals of ReVanced Patcher and how to use ReVanced Patcher to create patches. You can find it here.
📜 Licence
ReVanced Patcher is licensed under the GPLv3 license. Please see the licence file for more information. tl;dr you may copy, distribute and modify ReVanced Patcher as long as you track changes/dates in source files. Any modifications to ReVanced Patcher must also be made available under the GPL, along with build & install instructions.