This repository has been archived by the owner on Oct 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Variables
Zackptg5 edited this page Jan 4, 2020
·
12 revisions
- MODPATH - Working directory of installer (source directory/origin of files to be installed) - note that for magisk installs, this is also the destination path as well - files are all extracted to MODPATH in the beginning
- UNITY - Location to mod directory - equal to the magisk img directory if magisk, equal to nothing otherwise (destination directory). Note that almost every destination file/folder should be preceded by this variable (Ex: $UNITY/system/lib/file.so)
-
BOOTMODE - Equal to
true
if in magisk manager,false
otherwise -
SYS - Location of destination system folder - this is always equal to
/system
in the installer so it's real use is for boot and terminal scripts (always works due to how it's mounted during the install) - VEN - Location of destination vendor folder
- MODID - 'id' from module.prop - the unique identifier for your mod
- MODULEROOT - if magisk install - path to magisk update img
- MOUNTEDROOT - if magisk install - path to currently mounted magisk img (if in twrp, same as MODULEROOT)
- NVBASE - if magisk install - path to magisk files (usually /data/adb), if system install - path of boot scripts (like /system/etc/init.d)
- LIBDIR - If DYNAMICLIB=true: Equal to /vendor if rom is oreo+, /system otherwise
- LIBPATCH - Same as libdir but formatted for sed with standard '/' delimiter
- MAGISK - Set to 'true' if magisk is detected, 'false' otherwise - Useful if you want parts to only run with/without magisk installs
- API - Taken from build.prop. Equal to the API version of the rom installed
- ABILONG - Taken from build.prop. Equal to the ABI version of the device
-
ABI - Taken from build.prop. Equal to the ABI number (first 3 characters of ABILONG) of the device (equals either
arm
orx86
) - ABI2 - Taken from build.prop. Equal to the ABI2 number of the device (first 3 characters)
-
ARCH - Equal to the cpu type of the device - equal to
arm
,arm64
,x86
, orx86_64
- ARCH32 - Equal to the simplified cpu type of the device - 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
$MAGISKTMP/mirror
if in BOOTMODE, nothing otherwise (MAGISKTMP=/sbin/.magisk
for magisk 18+). This is useful if you're copying files from the device to your mod for modification. - ORIGVEN - Equal to the original vendor directory. This is more complex than you'd think with magisk or else I wouldn't have it here
-
ROOT - Location of root of file system such as with pixels using supersu (where instead of being nothing, is
/system_root
) - SYS - Location of system folder - equal to $ROOT/system
- VEN - Same as before
- MODID - Same as before
- MAGISK - 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 current directory