Giter Site home page Giter Site logo

Comments (11)

nitanmarcel avatar nitanmarcel commented on June 20, 2024

The proiect was mainly done for Waydroid and I don't have any plans to use it android.

Anyway the idea it's pretty simple: place the binaries into their places in /system/etc/init/magisk and replace the init.rc with the Magisk one.

from waydroid-magisk.

nitanmarcel avatar nitanmarcel commented on June 20, 2024

You can find the binaries after unpacking the magisk apk, under the libs folder/{your phone architecture)

And for init.rc you'll need:

on post-fs-data
	start logd
	exec u:r:su:s0 root root -- /system/etc/init/magisk/magisk64 --auto-selinux --setup-sbin /system/etc/init/magisk
	exec u:r:su:s0 root root -- /system/etc/init/magisk/magiskpolicy --live --magisk "allow * magisk_file lnk_file *"
	mkdir /sbin/.magisk 700
	mkdir /sbin/.magisk/mirror 700
	mkdir /sbin/.magisk/block 700
	copy /system/etc/init/magisk/config /sbin/.magisk/config
	rm /dev/.magisk_unblock
	start kBveseXEGX0Wuaj
	wait /dev/.magisk_unblock 40
	rm /dev/.magisk_unblock


service kBveseXEGX0Wuaj /sbin/magisk --auto-selinux --post-fs-data
	user root
	seclabel u:r:su:s0
	oneshot


service gy4aazawjGxaeCs /sbin/magisk --auto-selinux --service
	class late_start
	user root
	seclabel u:r:su:s0
	oneshot


on property:sys.boot_completed=1
	mkdir /data/adb/magisk 755
	exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --boot-complete


on property:init.svc.zygote=restarting
	exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart

on property:init.svc.zygote=stopped
	exec u:r:su:s0 root root -- /sbin/magisk --auto-selinux --zygote-restart

from waydroid-magisk.

Skorpion96 avatar Skorpion96 commented on June 20, 2024

Many thanks, I'll give it a try and if I will have any issues I'll report back hoping to not harass you

from waydroid-magisk.

Skorpion96 avatar Skorpion96 commented on June 20, 2024

Ok so there is the first issue, i pushed all files and modified the init.rc, but i'm having sepolicy issues, here a photo of the issue
photo_2023-07-04_23-53-58
as well the gsi i'm using:https://github.com/naz664/ArrowOS_gsi/releases/download/v2023.05.17/ArrowOS-13.1-arm64_bgN-Unofficial.img.xz

from waydroid-magisk.

nitanmarcel avatar nitanmarcel commented on June 20, 2024

./magiskpolicy --load /vendor/etc/selinux/precompiled_sepolicy --live --magisk

In /etc/init/magisk, where you have magiskpolicy binary, make it executable (chmod +x)

from waydroid-magisk.

nitanmarcel avatar nitanmarcel commented on June 20, 2024

P.S: you can find the scripts used by magisk delta canary installation here

https://github.com/nitanmarcel/Magisk/tree/waydroid/scripts

from waydroid-magisk.

Skorpion96 avatar Skorpion96 commented on June 20, 2024

About this ./magiskpolicy --load /vendor/etc/selinux/precompiled_sepolicy --live --magisk
I found the precompiled sepolicy, should I add that command to init.rc? And if yes I can copy paste it with the path edited or I should add some cd to /vendor/etc/selinux?
About the scripts I don't think that they are necessary as I placed all magisk files manually mounting the iso with loop command in Ubuntu

from waydroid-magisk.

Skorpion96 avatar Skorpion96 commented on June 20, 2024

i pasted that command but i still got the previous error, here is my init.rc
init.rc.txt

from waydroid-magisk.

nitanmarcel avatar nitanmarcel commented on June 20, 2024

What the hell is that?

from waydroid-magisk.

nitanmarcel avatar nitanmarcel commented on June 20, 2024

Oh my bad. It's bootanim.rc

from waydroid-magisk.

Skorpion96 avatar Skorpion96 commented on June 20, 2024

well i did the craziest thing possible adding before everything on init.rc the "setenforce 0" command but i still get that error abot sepolicy. I'll try with setenforce permissive and report back
Edit, it failed as well

from waydroid-magisk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.