Source addon.d script from data

This commit is contained in:
topjohnwu 2018-06-21 11:54:21 +08:00
parent 9a8eeacee8
commit 14eebd582f
3 changed files with 4 additions and 3 deletions

View File

@ -327,7 +327,7 @@ def zip_main(args):
zipf.writestr(target, util_func)
# addon.d.sh
source = os.path.join('scripts', 'addon.d.sh')
target = os.path.join('common', '99-magisk.sh')
target = os.path.join('common', 'addon.d.sh')
zip_with_msg(zipf, source, target)
# Prebuilts

View File

@ -1,5 +1,4 @@
#!/sbin/sh
# ADDOND_VERSION=2
##########################################################################################
#
# Magisk Survival Script for ROMs with addon.d support

View File

@ -103,7 +103,9 @@ chmod -R 755 $MAGISKBIN
if [ -d /system/addon.d ]; then
ui_print "- Adding addon.d survival script"
mount -o rw,remount /system
cp -af $INSTALLER/common/99-magisk.sh /system/addon.d/99-magisk.sh
echo "#!/sbin/sh" > /system/addon.d/99-magisk.sh
echo "# ADDOND_VERSION=2" >> /system/addon.d/99-magisk.sh
echo ". /data/adb/magisk/addon.d.sh" >> /system/addon.d/99-magisk.sh
chmod 755 /system/addon.d/99-magisk.sh
fi