2025-11-20 16:37:57 +08:00
|
|
|
#!/system/bin/sh
|
|
|
|
|
############################################
|
|
|
|
|
# meta-mm metainstall.sh
|
|
|
|
|
############################################
|
|
|
|
|
|
2025-11-20 15:18:02 +08:00
|
|
|
export KSU_HAS_METAMODULE="true"
|
|
|
|
|
export KSU_METAMODULE="meta-mm"
|
|
|
|
|
|
2025-11-20 16:37:57 +08:00
|
|
|
# Main installation flow
|
|
|
|
|
ui_print "- Using meta-mm metainstall"
|
|
|
|
|
|
2025-11-20 18:01:12 +08:00
|
|
|
# we no-op handle_partition
|
|
|
|
|
# this way we can support normal hierarchy that ksu changes
|
|
|
|
|
handle_partition() {
|
|
|
|
|
echo 0 > /dev/null ; true
|
2025-11-20 15:18:02 +08:00
|
|
|
}
|
|
|
|
|
|
2025-11-22 15:12:54 +08:00
|
|
|
mark_replace() {
|
|
|
|
|
replace_target="$1"
|
|
|
|
|
mkdir -p "$replace_target"
|
|
|
|
|
setfattr -n trusted.overlay.opaque -v y "$replace_target"
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-20 15:18:02 +08:00
|
|
|
# call install function, this is important!
|
|
|
|
|
install_module
|
|
|
|
|
|
2025-11-21 21:02:41 +08:00
|
|
|
mm_handle_partition() {
|
|
|
|
|
partition="$1"
|
|
|
|
|
|
|
|
|
|
if [ ! -d "$MODPATH/system/$partition" ]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -L "/system/$partition" ] && [ -d "/$partition" ]; then
|
|
|
|
|
ui_print "- Handle partition /$partition"
|
|
|
|
|
ln -sf "./system/$partition" "$MODPATH/$partition"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mm_handle_partition system_ext
|
|
|
|
|
mm_handle_partition vendor
|
|
|
|
|
mm_handle_partition product
|
|
|
|
|
|
2025-11-20 16:37:57 +08:00
|
|
|
ui_print "- Installation complete"
|