docs.rs failed to build kittymemory-rs-0.2.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
kittymemory-rs-0.3.4
kittymemory-rs
Production-ready Rust bindings for KittyMemory — a comprehensive memory manipulation library for Android and iOS.
Features
Core Functionality
- Memory Operations: Read, write, and protect memory with automatic permission handling
- Memory Patching: Create patches from bytes, hex strings, or assembly code (with Keystone)
- Memory Backup: Save and restore memory regions
- Pattern Scanning: Find byte patterns, hex patterns, IDA-style patterns, or arbitrary data
- Pointer Validation: Verify if pointers are readable, writable, or executable
Android-Specific Features
- ELF Scanner: Comprehensive ELF analysis with symbol lookup, debug symbols, and metadata
- LinkerScanner: Access Android linker internals and enumerate all loaded libraries
- Process Maps: Parse and filter /proc/self/maps entries
- RegisterNativeFn: Find JNI native method registrations by name and signature
- SoInfo Access: Get detailed information about loaded shared objects
iOS-Specific Features
- MemoryFileInfo: Access Mach-O binary information for dylibs and frameworks
- Segment/Section Access: Query __TEXT, __DATA and other segments/sections
- Symbol Lookup: Find symbols in specific files or libraries
- Address Translation: Convert relative offsets to absolute addresses
Utility Functions
- Hex Conversion: Convert between bytes and hex strings
- Hex Dump: Format memory dumps with ASCII representation
- Page Helpers: Calculate page-aligned addresses
Architecture
sys: Raw FFI bindings (auto-generated with bindgen)safe: Safe Rust wrappers with RAII and error handlingprelude: Convenient imports for common use cases
Installation
Add to your Cargo.toml:
[]
= "0.2"
With Keystone assembler support:
[]
= { = "0.2", = ["keystone"] }
Or from GitHub:
[]
= { = "https://github.com/rodroidmods/kittymemory-rs", = "main" }
Requirements
- Rust 1.70+
- C++ compiler (g++/clang++)
libclang(for bindgen)- Android NDK (for Android targets)
- Xcode (for iOS targets)
Quick Examples
Memory Operations
use *;
let addr = 0x12345678;
let value: i32 = mem_read?;
mem_write?;
Memory Patching
use *;
let mut patch = with_hex?;
patch.modify?;
patch.restore?;
With assembly (requires keystone feature):
let mut patch = with_asm?;
patch.modify?;
Pattern Scanning
use *;
if let Some = find_pattern_first
let all_matches = find_hex_all;
for addr in all_matches
Android: ELF Scanner
use *;
let elf = find.expect;
if let Some = elf.find_symbol
println!;
println!;
println!;
Android: LinkerScanner
use *;
let linker = get;
for lib in linker.all_soinfo
if let Some = linker.find_soinfo
Android: Process Maps
use *;
let maps = get_all_maps;
for map in maps
let lib_maps = get_maps_filtered;
iOS: MemoryFileInfo
use *;
let base = get_base_info;
println!;
if let Some = get_file_info
Utility Functions
use *;
let data = vec!;
let hex = data_to_hex;
println!;
let bytes = hex_to_data?;
let dump = hex_dump;
println!;
Building
Desktop (Development)
Android
iOS
Examples
Run the comprehensive example:
Documentation
Generate and open the documentation:
Feature Flags
keystone: Enable assembly patching with Keystone assemblerandroid: Android-specific features (auto-detected)ios: iOS-specific features (auto-detected)
Safety
safemodule: RAII wrappers with automatic cleanup and error handlingsysmodule: Raw FFI - requires manual memory management andunsafeblocks
Platform Support Matrix
| Feature | Android | iOS | Cross-Platform |
|---|---|---|---|
| Memory R/W | ✅ | ✅ | ✅ |
| Patching | ✅ | ✅ | ✅ |
| Pattern Scanning | ✅ | ✅ | ✅ |
| ELF Analysis | ✅ | N/A | - |
| Mach-O Analysis | N/A | ✅ | - |
| LinkerScanner | ✅ | N/A | - |
| Process Maps | ✅ | N/A | - |
| JNI Support | ✅ | N/A | - |
| Pointer Validation | ✅ | ✅ | ✅ |
License
MIT
Credits
- Original Library: KittyMemory by MJx0
- Rust Bindings: Rodroid Dev
- Community:
- Telegram Group: https://t.me/+QylrYL1GNsJiYjc0
- Telegram Channel: https://t.me/+WmudnO0-xoNhMDQ8
Contributing
Contributions welcome! Open issues or submit pull requests.
Disclaimer
Intended for education, research, and legitimate reverse engineering only. Users are responsible for compliance with applicable laws and platform terms.