APK manifest & resources parser in Rust.

Overview

BXMLRS

bxmlrs is a Rust library (WIP) for parsing binary Android XML files (AndroidManifest.xml).

Usage

use bxmlrs::parser;
use quick_xml::reader::Reader;

let mut parser = parser::Parser::from_file(file_path.to_str().unwrap())?;
let manifest_bytes = parser.parse()?;

let mut xml_reader = Reader::from_str(std::str::from_utf8(&manifest_bytes)?);
xml_reader.trim_text(true);

let mut package_name = String::new();
loop {
        match xml_reader.read_event() {
            Ok(quick_xml::events::Event::Eof) => break,
            Ok(event) => match event {
                quick_xml::events::Event::Start(e) => match e.name() {
                    QName(b"manifest") => {
                        if let Some(attr) = e.try_get_attribute("package")? {
                            package_name = attr.unescape_value().unwrap_or_default().into_owned();
                        }
                    }
                    _ => {}
                },
                _ => {}
            },
            Err(e) => {}
        }
    }

Check bxmlrs-bin for a full example.

You might also like...
A manifest.json generator

manifest-gen manifest-gen is a CLI tool that helps you in creating a manifest.json file for your pwa. Installation cargo install manifest-gen Usage ma

 apkeep - A command-line tool for downloading APK files from various sources
apkeep - A command-line tool for downloading APK files from various sources

apkeep - A command-line tool for downloading APK files from various sources Installation Precompiled binaries for apkeep on various platforms can be d

Extracting react native app source code from apk file.

extract-myreact Extracting React Native app source code from apk file.

Give me your APK, I will give you framework name

APK-FiD Give me your APK, I will give you framework name Usage ❯ apk-fid -h APK-FiD 1.0 Petruknisme [email protected] Give me your APK, I will giv

Parameterized routing for generic resources in Rust

Usher Usher provides an easy way to construct parameterized routing trees in Rust. The nodes of these trees is naturally generic, allowing Usher to le

Curated list of awesome projects and resources related to Rust and computer security

Awesome Rust Security Curated list of awesome projects and resources related to Rust and computer security Table of Contents Tools Web and Cloud Secur

A curated list of Rust code and resources.

Awesome Rust A curated list of Rust code and resources. If you want to contribute, please read this. Table of contents Applications Audio and Music Cr

An open source, programmed in rust, privacy focused tool for reading programming resources (like stackoverflow) fast, efficient and asynchronous from the terminal.

Falion An open source, programmed in rust, privacy focused tool for reading programming resources (like StackOverFlow) fast, efficient and asynchronou

Rust implementation of reactor pattern for I/O resources

I/O reactor Concurrent I/O without rust async problems This repository provides a set of libraries for concurrent access to I/O resources (file, netwo

Rust library for scheduling, managing resources, and running DAGs 🌙

🌙 moongraph 📈 moongraph is a Rust library for scheduling, managing resources, and running directed acyclic graphs. In moongraph, graph nodes are nor

A comprehensive collection of resources and learning materials for Rust programming, empowering developers to explore and master the modern, safe, and blazingly fast language.

🦀 Awesome Rust Lang ⛰️ Project Description : Welcome to the Awesome Rust Lang repository! This is a comprehensive collection of resources for Rust, a

A curated list of wgpu code and resources.

Awesome wgpu A curated list of wgpu code and resources. PRs welcome. About wgpu https://github.com/gfx-rs/wgpu-rs matrix chat https://matrix.to/#/#wgp

Bevy plugin for an AssetServer that can load embedded resources, or use other AssetServers based on the path.

Bevy-Embasset Embed your asset folder inside your binary. bevy-embasset adds support for loading assets embedded into the binary. Furthermore, it can

DDoS Utility which distributes the available resources across different targets

DDoS utility for education purposes only. Allows to specify a number of targets inside a json file and send a tremendous amount of request. The requests are distributed across the specified targets, to allow keeping as much targets down as possible, while limiting the necessary resources.

▦⧉□▣ A curated list of links to miniquad/macroquad-related code & resources

Awesome Quads A curated list of links to miniquad/macroquad-related code & resources. Game engines miniquad - main crate, engines below build on top o

Cost saving K8s controller to scale down and up of resources during non-business hours

Kube-Saver Motivation Scale down cluster nodes by scaling down Deployments, StatefulSet, CronJob, Hpa during non-business hours and save $$, but if yo

A Bevy helper to easily manage resources that need to persist across game sessions.

bevy-persistent A Bevy helper to easily manage resources that need to persist across game sessions. Background In games, there are a lot of resources

A command-line tool which can move CloudFormation resources between stacks
A command-line tool which can move CloudFormation resources between stacks

cfn-teleport A command-line tool which can move CloudFormation resources between stacks. Installation On a Mac you can install via Homebrew: brew inst

Awesome books, tutorials, courses, and resources for the Tokio asynchronous runtime ecosystem. ⚡
Awesome books, tutorials, courses, and resources for the Tokio asynchronous runtime ecosystem. ⚡

Awesome Tokio Tokio is an asynchronous runtime for the Rust programming language. It provides the building blocks needed for writing network applicati

Owner
null
Using Rust to create an iOS static library

ObjCrust A modified ObjCrust which uses Rust cross-compiler. Cross-compiler needs to be built first (note: it is on a separate branch now, so don't fo

Valerii Hiora 39 May 10, 2021
rust on pebble - functional with limited capabilities

Pebble.rs Pebble.rs is a crate that allows rust to be used to develop Pebble applications. It is compatible with SDK 3.0 and is known to work on the a

Andrew Foote 44 Aug 13, 2022
Android / iOS app with shared Rust logic

Rust core for native Android and iOS apps [TODO iOS badge] This is an example that shows how to use a shared Rust core in native Android and iOS apps.

Ivan Schütz 193 Dec 5, 2022
Cross-platform GUI written in Rust using ADB to debloat non-rooted android devices. Improve your privacy, the security and battery life of your device.

Universal Android Debloater GUI DISCLAIMER: Use it at your own risk. I am not responsible for anything that could happen to your phone. This software

w1nst0n 7k Jan 7, 2023
A Rust crate to load a shared library into a target process without using ptrace.

Intruducer A Rust crate to load a shared library into a target process without using ptrace. This is a portable rewrite of dlinject. Compatibility It

null 90 Jan 3, 2023
Fable Rust Raytracer - iOS version

Fable Rust Raytracer - iOS version Originally made by @ncave (https://github.com/ncave/fable-raytracer), port to iOS by @delneg Pre-requisites Rust, b

Denis 4 May 2, 2022
🤖🦀 A rust native replacement for Android's `sdkmanager`

???? A rust native replacement for Android's `sdkmanager`

Traverse Research 13 Dec 13, 2022
Android / iOS app with shared Rust logic

Rust core for native Android and iOS apps [TODO iOS badge] This is an example that shows how to use a shared Rust core in native Android and iOS apps.

null 193 Dec 5, 2022
Rust implementation of NearbyShare/QuickShare from Android for Linux.

rquickshare NearbyShare/QuickShare for Linux (WIP) How to use rquickshare offers two options for using its file sharing capabilities: command line (CM

Martin André 3 Feb 28, 2024
'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files.

apk-yara-checker 'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files. You have to pass the folde

alberto__segura 15 Oct 5, 2022