topjohnwu / Magisk

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

General scripts not working anymore #2101

Closed felsd closed 4 years ago

felsd commented 4 years ago

Devices: Doogee X20L and X50L Magisk: 7.4.0 Magisk Manager: 20.1(20100) Android: 7.0 and 8.1.0 Magisk Logfile: https://pastebin.com/jmrmaf1m

I have around 60 X50L and X20L devices with a script in /data/adb/service.d that is executed on boot. It was working just fine but recently the script didn't get triggered anymore for more and more devices. Now it doesn't work anymore at all.

The weird thing is that as you can see in the magisk logfile, magisk detects the script(s) but they don't get executed.

Script test.sh just touches a file on /sdcard/, so I don't think it's an issue with my script.

This is how I created test.sh:

X50L:/ # echo "#!/system/bin/sh" > /data/adb/service.d/test.sh
X50L:/ # echo "touch /sdcard/SCRIPT_WAS_TRIGGERED" >> /data/adb/service.d/test.sh
X50L:/ # chmod +x /data/adb/service.d/test.sh

After a reboot there is no file /sdcard/SCRIPT_WAS_TRIGGERED:

X50L:/ # ls /sdcard/
Alarms Android DCIM Download Movies Music Notifications Pictures Podcasts Ringtones mtklog
wilsonhlacerda commented 4 years ago

Do you have EdXposed on those devices?

EdXposed is known to break Magisk boot scripts, specially the service.d ones. Magisk bug? EdXposed bug? Both due to the way they work together? I don't know, but this is happening since long time on lots of devices.

If you have it, try disable/uninstall it from Magisk.

I myself never had this bug on my Lineage OS 16 (Android 9) till Magisk v19.3, but then from v19.4+ till current Canary my service.d scripts are broken cause I use EdXposed Magisk module.

osm0sis commented 4 years ago

What version of Magisk last worked? Have you tried the latest Magisk Canary?

Scripts are working fine here on my device.

eMPee584 commented 4 years ago

Experienced the same problem on my device on the stable channel, going to canary first didn't change anything, then after toggling MagiskHide service.sh scripts suddenly came back again.