MagiskHidePropsConf/common/propsconf_late

149 lines
2.7 KiB
Plaintext
Raw Normal View History

2018-03-18 15:39:43 +00:00
#!/system/bin/sh
# MagiskHide Props Config
2019-02-02 12:37:20 +00:00
# Copyright (c) 2018-2019 Didgeridoohan @ XDA Developers
# Licence: MIT
2018-03-18 15:39:43 +00:00
2019-02-02 12:37:20 +00:00
# This is the settings file for the Magisk module "MagiskHide Props Config" By Didgeridoohan @ XDA Developers.
2018-03-18 15:39:43 +00:00
# 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=23
2018-08-07 11:50:01 +00:00
SETTRANSF=2
NOTTRANSF="OPTIONLATE"
2018-03-18 15:39:43 +00:00
# Variables
2018-07-26 09:03:13 +00:00
COREPATH=CORE_PLACEHOLDER
IMGPATH=$COREPATH/img
2018-03-18 15:39:43 +00:00
MODPATH=$IMGPATH/MagiskHidePropsConf
2018-04-29 09:14:35 +00:00
CACHELOC=CACHE_PLACEHOLDER
LATELOGFILE=$CACHELOC/propsconf_latefile.log
2018-03-18 15:39:43 +00:00
FINGERPRINTENB=1
2019-02-02 12:37:20 +00:00
PRINTMODULE=0
2018-03-18 15:39:43 +00:00
PRINTEDIT=0
2019-02-02 12:37:20 +00:00
PRINTVEND=0
DEVSIM=0
2018-03-18 15:39:43 +00:00
BUILDPROPENB=1
FILESAFE=1
BUILDEDIT=0
DEFAULTEDIT=0
PROPCOUNT=0
PROPEDIT=0
2018-04-15 22:05:33 +00:00
CUSTOMEDIT=0
2018-06-19 09:56:08 +00:00
DELEDIT=0
2018-03-18 15:39:43 +00:00
REBOOTCHK=0
2019-02-02 12:37:20 +00:00
PRINTCHK=0
2018-08-07 11:50:01 +00:00
OPTIONLATE=0
2018-04-15 22:05:33 +00:00
OPTIONCOLOUR=1
OPTIONWEB=1
2019-02-02 12:37:20 +00:00
OPTIONUPDATE=1
BRANDSET=1
NAMESET=1
DEVICESET=1
RELEASESET=1
IDSET=1
INCREMENTALSET=1
DESCRIPTIONSET=1
2018-04-15 22:05:33 +00:00
2018-05-29 07:29:19 +00:00
CACHEFILES="
propsconf_conf
reset_mhpc
"
2019-02-02 12:37:20 +00:00
# ---Original values---
# default.prop
ORIGDEBUGGABLE=""
ORIGSECURE=""
# build.prop
ORIGTYPE=""
ORIGTAGS=""
ORIGSELINUX=""
ORIGFINGERPRINT=""
ORIGVENDPRINT=""
ORIGPATCH=""
ORIGBRAND=""
ORIGNAME=""
ORIGDEVICE=""
ORIGRELEASE=""
ORIGID=""
ORIGINCREMENTAL=""
ORIGDESCRIPTION=""
# ---Module values---
MODULEDEBUGGABLE=""
MODULESECURE=""
MODULETYPE=""
MODULETAGS=""
MODULESELINUX=""
MODULEFINGERPRINT=""
# ---Device simulation values---
SIMBRAND=""
SIMNAME=""
SIMDEVICE=""
SIMRELEASE=""
SIMID=""
SIMINCREMENTAL=""
SIMDESCRIPTION=""
# ---Custom prop values---
CUSTOMPROPS=""
CUSTOMPROPSPOST=""
CUSTOMPROPSLATE=""
CUSTOMPROPSLIST="$CUSTOMPROPS $CUSTOMPROPSPOST $CUSTOMPROPSLATE"
2019-02-02 12:37:20 +00:00
# ---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
2018-05-29 07:29:19 +00:00
rm -f $LATELOGFILE
2019-02-02 12:37:20 +00:00
# Function to clean up some files after the module has been uninstalled
2018-04-15 22:05:33 +00:00
cleanup() {
2018-08-07 11:50:01 +00:00
echo "Cleaning up files in $CACHELOC." >> $LATELOGFILE 2>&1
2018-04-29 09:14:35 +00:00
for ITEM in $CACHEFILES; do
if [ -f "$CACHELOC/$ITEM" ]; then
2018-08-07 11:50:01 +00:00
echo "Deleting ${ITEM}." >> $LATELOGFILE 2>&1
rm -f $CACHELOC/$ITEM >> $LATELOGFILE 2>&1
2018-04-29 09:14:35 +00:00
fi
done
2018-04-15 22:05:33 +00:00
# Suicide.
2019-02-02 12:37:20 +00:00
echo "Removing script." >> $LATELOGFILE 2>&1
2018-08-07 11:50:01 +00:00
rm -f $0 >> $LATELOGFILE 2>&1
2018-04-15 22:05:33 +00:00
}
2018-03-18 15:39:43 +00:00
# Checks if the module is installed. Deletes itself if it isn't.
2018-04-15 22:05:33 +00:00
if [ -d "$MODPATH" ]; then
2018-03-18 15:39:43 +00:00
# Checks if the module is set for removal
2018-04-29 09:14:35 +00:00
if [ -f "$MODPATH/remove" ]; then
2018-08-07 11:50:01 +00:00
echo "Module set for removal." >> $LATELOGFILE 2>&1
2018-04-15 22:05:33 +00:00
# Cleanup
cleanup
2018-10-21 14:17:11 +00:00
fi
else
echo "$MODPATH not found." >> $LATELOGFILE 2>&1
echo "Module no longer installed." >> $LATELOGFILE 2>&1
# Cleanup
cleanup
fi