{"id":16129571,"url":"https://github.com/axonasif/rusty-magisk","last_synced_at":"2025-03-18T14:30:48.650Z","repository":{"id":45115692,"uuid":"320008473","full_name":"axonasif/rusty-magisk","owner":"axonasif","description":"Magisk support layer for android-x86","archived":false,"fork":false,"pushed_at":"2022-08-25T06:50:51.000Z","size":5366,"stargazers_count":35,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:03:44.014Z","etag":null,"topics":["android-x86","magisk","root","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axonasif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-09T16:04:31.000Z","updated_at":"2025-02-09T10:10:57.000Z","dependencies_parsed_at":"2022-09-02T22:33:47.699Z","dependency_job_id":null,"html_url":"https://github.com/axonasif/rusty-magisk","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axonasif%2Frusty-magisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axonasif%2Frusty-magisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axonasif%2Frusty-magisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axonasif%2Frusty-magisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axonasif","download_url":"https://codeload.github.com/axonasif/rusty-magisk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933413,"owners_count":20370987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-x86","magisk","root","rust"],"created_at":"2024-10-09T22:11:24.818Z","updated_at":"2025-03-18T14:30:46.115Z","avatar_url":"https://github.com/axonasif.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction [![Rust Actions Status](https://github.com/AXIM0S/rusty-magisk/workflows/Rust/badge.svg)](https://github.com/AXIM0S/rusty-magisk/actions) ![GitHub all releases](https://img.shields.io/github/downloads/AXIM0S/rusty-magisk/total)\n\nThis is my very first public `rust` project for fun purposes.\n\nObviously this was written in  `Rust - a systems programming language` by a noob rustacean with a few hours of experience with rust 😝\n\nMy 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\n\nSo, kindly ignore as long I'm a noob LoL\n\n\n\n# Build instructions\n\n* First of all you need rust. Follow the link below and you will know what to do.\n\n\u003e It'll also autoinstall rustc and cargo for you.\n\n\u003e https://www.rust-lang.org/tools/install\n\n* Once you have rust and everything it brings, we add a new target. Run the following command:\n\n```bash\nrustup target add x86_64-unknown-linux-musl\n```\n\n\u003e Or if you wan to make for 32bit arch then the target should be `i686-unknown-linux-musl`.\n\n* After you have the build targets installed simply run the following command:\n\n```bash\nRUSTFLAGS='-C link-arg=-s' cargo build --release --target x86_64-unknown-linux-musl  # For 64bit\n\n# or\n\nRUSTFLAGS='-C link-arg=-s' cargo build --release --target i686-unknown-linux-musl    # For 32bit\n```\n\n\u003e Then you should find the output as `target/x86_64-unknown-linux-musl/release/rusty-magisk` (64bit)\n\n\n# Installation\n\n## For Android-9 and below\n\n* Copy your `ramdisk.img` and the `rusty-magisk` binary in an ext4 partition directory and run the following commands:\n\n```bash\nsu\nmkdir ramdisk \u0026\u0026 ( cd ramdisk \u0026\u0026 zcat ../ramdisk.img | cpio -iud \u0026\u0026 mv init init.real )\nrsync rusty-magisk ramdisk/init \u0026\u0026 chmod 777 ramdisk/init \u0026\u0026 ( cd ramdisk \u0026\u0026 find . | cpio -o -H newc | gzip \u003e ../ramdisk.img )\n```\n\n\u003e Tl;dr: In short, you need to rename `init` executable to `init.real` and put `rusty-magisk` as `init` inside your `ramdisk.img`.\n\n## For Android-10 and above\n\n* If your system image is `system.sfs` then you need to extract it, an quick way to do that is: `7z x system.sfs \u0026\u0026 rm system.sfs`\n\n* Once you have `system.img` you need to mount it: `mkdir mdir \u0026\u0026 sudo mount -o loop system.img mdir`\n\n* Now rename `init` to `init.real` by running the following command: `sudo mv mdir/init mdir/init.real`\n\n* Lastly put `rusty-magisk` binary as `init` executable at `/` of system.img: `sudo rsync rusty-magisk mdir/init \u0026\u0026 chmod 777 mdir/init`\n\n\n### Note\n\u003e I'm assuming that you have `rusty-magisk` binary at the same dir as your android-x86 OS files.\n\u003e\n\u003e Quick-tip: You can also get pre-built `rusty-magisk` binaries at https://github.com/AXIM0S/rusty-magisk/releases\n\u003e          : Rusty-Magisk can be easily installed from [GearLock](https://supreme-gamers.com/r/gearlock-custom-recovery-replacement-for-android-x86.40).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxonasif%2Frusty-magisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxonasif%2Frusty-magisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxonasif%2Frusty-magisk/lists"}