Home

Awesome

Introduction Rust Actions Status GitHub all releases

This is my very first public rust project for fun purposes.

Obviously this was written in Rust - a systems programming language by a noob rustacean with a few hours of experience with rust 😝

My code may seem funny in some parts since I've just tried to apply what I've learnt so far apart from the better ways of doing such tasks

So, kindly ignore as long I'm a noob LoL

Build instructions

It'll also autoinstall rustc and cargo for you.

https://www.rust-lang.org/tools/install

rustup target add x86_64-unknown-linux-musl

Or if you wan to make for 32bit arch then the target should be i686-unknown-linux-musl.

RUSTFLAGS='-C link-arg=-s' cargo build --release --target x86_64-unknown-linux-musl  # For 64bit

# or

RUSTFLAGS='-C link-arg=-s' cargo build --release --target i686-unknown-linux-musl    # For 32bit

Then you should find the output as target/x86_64-unknown-linux-musl/release/rusty-magisk (64bit)

Installation

For Android-9 and below

su
mkdir ramdisk && ( cd ramdisk && zcat ../ramdisk.img | cpio -iud && mv init init.real )
rsync rusty-magisk ramdisk/init && chmod 777 ramdisk/init && ( cd ramdisk && find . | cpio -o -H newc | gzip > ../ramdisk.img )

Tl;dr: In short, you need to rename init executable to init.real and put rusty-magisk as init inside your ramdisk.img.

For Android-10 and above

Note

I'm assuming that you have rusty-magisk binary at the same dir as your android-x86 OS files.

Quick-tip: You can also get pre-built rusty-magisk binaries at https://github.com/AXIM0S/rusty-magisk/releases : Rusty-Magisk can be easily installed from GearLock.