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

Please consider making PREINITDEVICE optional. #7125

Closed
mohrezaei opened this issue Jun 27, 2023 · 5 comments
Closed

Please consider making PREINITDEVICE optional. #7125

mohrezaei opened this issue Jun 27, 2023 · 5 comments

Comments

@mohrezaei
Copy link

With the introduction of the PREINITDEVICE in v26, the following usages of Magisk has become much harder:

  • Per the docs: "any installation of Magisk v26+ using custom recovery will be incomplete"
  • It's no longer possible to run boot_patch.sh on anything other than the actual device, because it invokes a new dependency: magisk32/64 (it was only dependent on magiskinit and widely available OS utils before).
  • It's much harder to streamline Magisk in a build-from-source environment.
  • It's much harder to use Magisk on a bootlocked (with a custom key) device. On such a device, installation requires properly signing of the bootimg.

I don't really know how many modules make use of sepolicy.rules, nor how many different devices can use that now vs before PREINITDEVICE.

If it is at all possible, please consider making PREINITDEVICE optional.

Device: Any
Android version: Any
Magisk version name: 26103
Magisk version code: 26103

@mohrezaei
Copy link
Author

Logs of running boot_patch.sh on a Linux x86 host for an arm boot img.
patch-26103.txt
patch-25001.txt

@mohrezaei
Copy link
Author

The coredump in 26103 might be #7109 . If not, I can file another bug for it.

@yujincheng08
Copy link
Collaborator

PREINITDEVICE is actually optional. You can predefine the PREINITDEVICE environment variable.

@yujincheng08 yujincheng08 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
@mohrezaei
Copy link
Author

What value can I set the env variable to for it not to interfere with the boot process?

@yujincheng08
Copy link
Collaborator

If you know the actual device that can be used as the PREINITDEVICE, set to it. If you don't, set anything u like. It should not break the boot process.

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

No branches or pull requests

2 participants