MagiskHidePropsConf/common/propsconf_late
Didgeridoohan c4615b39a0
v3.5.1-v50
2019-04-02 21:42:29 +02:00

168 lines
2.9 KiB
Bash

#!/system/bin/sh
# MagiskHide Props Config
# Copyright (c) 2018-2019 Didgeridoohan @ XDA Developers
# Licence: MIT
# This is the settings file for the Magisk module "MagiskHide Props Config" By Didgeridoohan @ XDA Developers.
# DO NOT DELETE!
# Unless: If you don't have the module installed something has gone horribly wrong and this file is an orphan.
# In that case, feel free to delete it.
# Script version
SCRIPTV=25
SETTRANSF=2
NOTTRANSF=""
# Paths
COREPATHPH=CORE_PLACEHOLDER
IMGPATH=$COREPATH/img
MODPATH=$IMGPATH/MagiskHidePropsConf
CACHELOCPH=CACHE_PLACEHOLDER
LATELOGFILE=$CACHELOC/propsconf_latefile.log
# Fingerprint
FINGERPRINTENB=1
PRINTMODULE=0
PRINTEDIT=0
PRINTVEND=0
PRINTCHK=0
# Simulation
DEVSIM=0
# Prop files
BUILDPROPENB=1
FILESAFE=1
BUILDEDIT=0
DEFAULTEDIT=0
# Custom props
PROPCOUNT=0
PROPEDIT=0
CUSTOMEDIT=0
DELEDIT=0
# Boot stages
PRINTSTAGE=0
PATCHSTAGE=2
SIMSTAGE=0
# Script settings
OPTIONBOOT=0
OPTIONCOLOUR=1
OPTIONWEB=1
OPTIONUPDATE=1
# Device simulation
BRANDSET=1
NAMESET=1
DEVICESET=1
RELEASESET=1
IDSET=1
INCREMENTALSET=1
DESCRIPTIONSET=1
SDKSET=1
# Misc
REBOOTCHK=0
CACHEFILES="
propsconf_conf
reset_mhpc
"
# ---Original values---
# default.prop
ORIGDEBUGGABLE=""
ORIGSECURE=""
# build.prop
ORIGTYPE=""
ORIGTAGS=""
ORIGSELINUX=""
ORIGFINGERPRINT=""
ORIGVENDPRINT=""
ORIGPATCH=""
ORIGBRAND=""
ORIGNAME=""
ORIGDEVICE=""
ORIGRELEASE=""
ORIGID=""
ORIGINCREMENTAL=""
ORIGDESCRIPTION=""
ORIGSDK=""
# ---Module values---
MODULEDEBUGGABLE=""
MODULESECURE=""
MODULETYPE=""
MODULETAGS=""
MODULESELINUX=""
MODULEFINGERPRINT=""
# ---Device simulation values---
SIMBRAND=""
SIMNAME=""
SIMDEVICE=""
SIMRELEASE=""
SIMID=""
SIMINCREMENTAL=""
SIMDESCRIPTION=""
SIMSDK=""
# ---Custom prop values---
CUSTOMPROPS=""
CUSTOMPROPSPOST=""
CUSTOMPROPSLATE=""
CUSTOMPROPSLIST="$CUSTOMPROPS $CUSTOMPROPSPOST $CUSTOMPROPSLATE"
# ---Delete prop values---
DELETEPROPS=""
# ---MagiskHide sensitive props---
REDEBUGGABLE=false
RESECURE=false
RETYPE=false
RETAGS=false
RESELINUX=false
# ---Editing default.prop---
SETDEBUGGABLE=false
SETSECURE=false
# ---Editing build.prop---
SETTYPE=false
SETTAGS=false
SETSELINUX=false
SETFINGERPRINT=false
rm -f $LATELOGFILE
# Function to clean up some files after the module has been uninstalled
cleanup() {
echo "Cleaning up files in $CACHELOC." >> $LATELOGFILE 2>&1
for ITEM in $CACHEFILES; do
if [ -f "$CACHELOC/$ITEM" ]; then
echo "Deleting ${ITEM}." >> $LATELOGFILE 2>&1
rm -f $CACHELOC/$ITEM
fi
done
# Suicide.
echo "Removing script." >> $LATELOGFILE 2>&1
rm -f $0
}
# Checks if the module is installed. Deletes itself if it isn't.
if [ -d "$MODPATH" ]; then
# Checks if the module is set for removal
if [ -f "$MODPATH/remove" ]; then
echo "Module set for removal." >> $LATELOGFILE 2>&1
# Cleanup
cleanup
fi
else
echo "$MODPATH not found." >> $LATELOGFILE 2>&1
echo "Module no longer installed." >> $LATELOGFILE 2>&1
# Cleanup
cleanup
fi