Variables - Zackptg5/MMT-Extended GitHub Wiki

Usable Variables (Other than ones in customize.sh)

  • MODPATH - Working directory of installer - where all files are extracted to - currently equivalent to /data/adb/modules_update/$MODID
  • MODID - 'id' from module.prop - the unique identifier for your mod
  • MODULEROOT - The directory containing MODPATH (currently /data/adb/modules_update)
  • NVBASE - if magisk install - path to magisk files (currently /data/adb)
  • LIBDIR - If DYNAMICLIB=true: Equal to /system/vendor if rom is oreo+, /system otherwise
  • LIBPATCH - Same as libdir but formatted for sed with standard '/' delimiter
  • API - Taken from build.prop. Equal to the API level (android version) of the device (e.g. 21 for Android 5.0)
  • ABI - Taken from build.prop. Equal to the cpu architecture of the device - equal to arm, arm64-v8a, x86 or x86_64
  • ARCH - Truncated form of ABI - equal to arm, arm64, x86, or x86_64
  • ARCH32 - Equal to the simplified cpu type of the device (useful for differentiating between 32 and 64bit cpus) - equal to arm or x86
  • IS64BIT - Set to 'true' if 64 bit capable device is detected, set to 'false' otherwise
  • ORIGDIR - The original directory for device files (original files unaffected by magisk mounting). Equals $INTERNALDIR/mirror (INTERNALDIR=$(magisk --path)/.magisk). This is useful if you're copying files from the device to your mod for modification.
  • EXTRAPART - true if KSU or magisk delta detected (support extra partitions like odm), false otherwise

Variables for uninstall.sh and boot scripts (differ slightly from main installer ones)

  • MODID - Same as before
  • LIBDIR - Same as before
  • INFO - Equal to the INFO file (contains a list of all installed files not in magisk mod directory)
  • MODPATH - Equal to module directory
  • MODDIR - Equal to current directory, will be different that $MODPATH if script isn't installed in $MODPATH directory (such as with .core scripts)