Smali Crate
A pure rust implementation of a parser, writer and set of types for the smali file format.
Smali is used in the Android reversing community to examine and modify Android APK files. It's a human readable text format that represents the complete structure of a Dex VM class including all of its instructions.
With this crate you can use it in conjunction with apktool to perform analysis and/or patches to Android applications.
There is a simple example in examples/main.rs that illustrates this. The example, will invoke apktool to expand any application and then parse all the smali files looking for RootBeer (an open source root detection framework), it will then patch RootBeer's methods to always return false so that the app can be run on a rooted device. Finally, it calls apktool again to repackage the app.
Here's the simple example :-
/* Expand the APK and patch RootBeer */