topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.6k stars 12.09k forks source link

Magisk Props Hide won't start if busybox not exist #1944

Closed sabpprook closed 4 years ago

sabpprook commented 4 years ago

props hiding will not triggered if "/data/adb/magisk/busybox" not exist https://github.com/topjohnwu/Magisk/blob/78daa2eb62fefde8ad7049d3224572b2819b7bbc/native/jni/core/bootstages.cpp#L408-L409

but resetprop should be work fine without busybox, can this be improved?

Didgeridoohan commented 4 years ago

Are you sure you're reading the code correctly? Resetprop isn't dependent on Busybox, but will be disabled on Android 4.2 and 4.3.

Magisk is dependent on it's Busybox though and won't load properly if it doesn't exist.

What's your actual issue?

sabpprook commented 4 years ago

Yes, I'm talking about magisk built-in busybox.

Actually in Magisk v19.3, prop hide will be triggered as well, but not in v20.0.

Didgeridoohan commented 4 years ago

I know you're talking about Magisk's built-in Busybox... That was apparent by you writing "/data/adb/magisk/busybox".

You need to be much more specific than you are right now. As it stands, this issue says nothing and will likely just be closed.

If there actually is some kind of issue with Magisk you need to make a proper report with logs and details. https://github.com/topjohnwu/Magisk/blob/master/README.MD#bug-reports

sabpprook commented 4 years ago

Found a place can add code to start magiskhide, just like "core only" does. https://github.com/topjohnwu/Magisk/blob/78daa2eb62fefde8ad7049d3224572b2819b7bbc/native/jni/core/bootstages.cpp#L656-L659

if (!magisk_env()) {
    LOGE("* Magisk environment setup incomplete, abort\n");
    auto_start_magiskhide();
    unblock_boot_process();
}
Didgeridoohan commented 4 years ago

But, why? You still haven't showed that there is any reason to do so... Again: what is the issue?

sabpprook commented 4 years ago

In some case, I need to modify system partition but don't want to keep root permission and I have made a service script to do some stuff after boot complete to un-root.

Thus I need magiskhide (hide props) work in post-fs-data stage, even "/data/adb/magisk" environment is not prepared, Magisk v19.3 can handle this, but not in v20.0.

Just a little problem for me to use Magisk.

topjohnwu commented 4 years ago

If the environment is incomplete, Magisk simply just quit doing anything before it is fixed. It can be fixed by opening Magisk Manager and go through additional setup and reboot. I refuse to support running Magisk in an incomplete environment.