Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce post-mount stage scripts #8736

Closed
wants to merge 1 commit into from
Closed

Conversation

aviraxp
Copy link
Contributor

@aviraxp aviraxp commented Jan 26, 2025

Same as post-fs-data mode, only difference is that scripts run after magic mount completes. This provides a stage where scripts can be instantly executed after module mount is ready to keep a clean memory map/mount namespace for new exec.

Same as post-fs-data mode, only difference is that scripts run
after magic mount completes. This provides a stage where scripts
can be instantly executed after module mount is ready to keep a
clean memory map/mount namespace for new exec.
@vvb2060
Copy link
Collaborator

vvb2060 commented Jan 29, 2025

why not fork child process and wait on post-fs-data?

@aviraxp
Copy link
Contributor Author

aviraxp commented Jan 29, 2025

How can i know magic mount is completed easily?

@vvb2060
Copy link
Collaborator

vvb2060 commented Jan 29, 2025

add a file and wait until /system/bin/[yourfile] exists

@aviraxp
Copy link
Contributor Author

aviraxp commented Jan 29, 2025

This should work as magic mount is now atomic, but the point is providing additional stage without introducing more mounts. This stage is after magic mount and before zygote starts, making it a good stage to execute app_process, especially removing the need to run it in a standalone namespace.

@vvb2060
Copy link
Collaborator

vvb2060 commented Jan 29, 2025

The magic mount is atomic, so app_process can be exec at any time. If you don't want to add additional file, you can check /system/bin/magisk

@vvb2060 vvb2060 closed this Jan 29, 2025
@aviraxp
Copy link
Contributor Author

aviraxp commented Jan 30, 2025

The magic mount is atomic, so app_process can be exec at any time. If you don't want to add additional file, you can check /system/bin/magisk

What about A10-?They doesn't inject magisk bins to system by magisk mount.

@yujincheng08
Copy link
Collaborator

you can poll on /proc/1/mounts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants