Magisk-Modules-Repo / energizedprotection

Energized Protection Magisk Module.
https://energized.pro
MIT License
318 stars 54 forks source link

Not compatible with Android 11 #25

Closed Zackptg5 closed 3 years ago

Zackptg5 commented 4 years ago

Android 11 got rid of sbin completely and so magisk now uses /dev/randomstring/.magisk

The random string changes each boot so you need to use the

magisk --path

Command each time the script is run to get the proper path. I forget when this functionality was added though (some point early this year) so it'd probably be best to use sbin if it exists, the path command otherwise

AvinashReddy3108 commented 4 years ago

I see, does the command works on devices below Android 11?

Zackptg5 commented 4 years ago

Ya but I think it was added to magisk earlier this year so it's only in recent versions of magisk. After playing around with it more, I favor doing this instead:

[ -d "/sbin/.magisk" ] && MAGISKTMP="/sbin/.magisk" || MAGISKTMP="$(find /dev -mindepth 2 -maxdepth 2 -type d -name ".magisk")"

It should work with older magisk versions. Either way, you get the idea

ciblus commented 4 years ago

Ya but I think it was added to magisk earlier this year so it's only in recent versions of magisk. After playing around with it more, I favor doing this instead:

[ -d "/sbin/.magisk" ] && MAGISKTMP="/sbin/.magisk" || MAGISKTMP="$(find /dev -mindepth 2 -maxdepth 2 -type d -name ".magisk")"

It should work with older magisk versions. Either way, you get the idea

it works like a charm.