mirror of
https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf.git
synced 2024-07-01 02:18:44 +00:00
v2.3.6-v27
This commit is contained in:
parent
965990aebc
commit
3470bc2a79
15
README.md
15
README.md
|
@ -5,6 +5,12 @@
|
|||
[Support Thread @ XDA](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228)
|
||||
|
||||
|
||||
## What's this?
|
||||
This module is a very complicated way of doing something very simple. Complicated for me, that is... The aim is to make it easy for you, the user. The module changes prop values using the [Magisk resetprop tool](https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md#resetprop), something that is very easy to do with a [Magisk boot script](https://github.com/topjohnwu/Magisk/blob/master/docs/details.md#boot-stages) and some simple commands.
|
||||
|
||||
What this module does is that it adds a terminal based UI for those that don't want (or can't) create a boot script for themselves, making the process of creating such a boot script very simple. With this module I'm also maintaining a list of certified build fingerprints for a number of devices, so that it's easy to pick one you want to use.
|
||||
|
||||
|
||||
## Installation
|
||||
Install through the Magisk Manager Downloads section. Or, download the zip from the Manager or the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228), and install through the Magisk Manager -> Modules, or from recovery.
|
||||
|
||||
|
@ -151,6 +157,8 @@ See ["I still can't pass the ctsProfile check"](https://github.com/Magisk-Module
|
|||
|
||||
Also see ["Props don't seem to set properly"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#props-dont-seem-to-set-properly) below.
|
||||
|
||||
*NOTE* Xiaomi devices often have issus passing the ctsProfile check, particularly China releases. This is under investigation...
|
||||
|
||||
### I can't pass the basicIntegrity check
|
||||
This module can only really help with the ctsProfile check, by spoofing the device fingerprint. If you can't pass basicIntegrity, there's probably something else going on with your device. See ["Miscellaneous MagiskHide issues"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#miscellaneous-magiskhide-issues) above.
|
||||
|
||||
|
@ -179,11 +187,16 @@ If you can't run the `props` script for some reason, the logs are also stored in
|
|||
|
||||
## Credits
|
||||
@topjohnwu @ XDA Developers, for Magisk
|
||||
@osm0sis, for his busybox binaries
|
||||
@osm0sis, for his Busybox binaries
|
||||
@Zackptg5, @veez21 and @jenslody @ XDA Developers, for help and inspiration
|
||||
|
||||
|
||||
## Changelog
|
||||
### v2.3.6
|
||||
- Added md5 checksum when downloading the internal Busybox.
|
||||
- Changed the default boot stage from late_start service to post-fs-data.
|
||||
- Various fixes and improvements, as usual.
|
||||
|
||||
### v2.3.5
|
||||
- Fixed issue with busybox version detection.
|
||||
- Fixed the documentation. Some parts had been accidentally deleted. Oops...
|
||||
|
|
1
common/busybox-arm.md5
Normal file
1
common/busybox-arm.md5
Normal file
|
@ -0,0 +1 @@
|
|||
ef0f310f6a35e0afa735c36afd8135e3
|
1
common/busybox-arm64.md5
Normal file
1
common/busybox-arm64.md5
Normal file
|
@ -0,0 +1 @@
|
|||
bbb13cf8bb2b1de70ecbf495cbff1450
|
1
common/busybox-mips.md5
Normal file
1
common/busybox-mips.md5
Normal file
|
@ -0,0 +1 @@
|
|||
e4be280e6a3f8102a62c261110ff69a2
|
1
common/busybox-mips64.md5
Normal file
1
common/busybox-mips64.md5
Normal file
|
@ -0,0 +1 @@
|
|||
8a7f321ee8ed0fb85726de8d43d86ebf
|
1
common/busybox-x86.md5
Normal file
1
common/busybox-x86.md5
Normal file
|
@ -0,0 +1 @@
|
|||
170133693c4af03a6f311179793569ec
|
1
common/busybox-x86_64.md5
Normal file
1
common/busybox-x86_64.md5
Normal file
|
@ -0,0 +1 @@
|
|||
b8374521632f8e8520a1ea1ad2cc919c
|
|
@ -25,8 +25,8 @@ if [ ! -f "$POSTFILE" ]; then
|
|||
log_start
|
||||
log_handler "Post-fs-data boot script not found."
|
||||
log_handler "Restoring boot script (${POSTFILE})."
|
||||
cp -af $MODPATH/propsconf_post $POSTFILE >> $LOGFILE
|
||||
chmod -v 755 $POSTFILE >> $LOGFILE
|
||||
cp -af $MODPATH/propsconf_post $POSTFILE >> $LOGFILE 2>&1
|
||||
chmod -v 755 $POSTFILE >> $LOGFILE 2>&1
|
||||
placeholder_update $POSTFILE IMGPATH IMG_PLACEHOLDER $IMGPATH
|
||||
# Deleting settings script to force a restore
|
||||
rm -f $LATEFILE
|
||||
|
@ -39,8 +39,8 @@ if [ ! -f "$LATEFILE" ] || [ -f "$RESETFILE" ]; then
|
|||
log_handler "Late_start service boot script not found."
|
||||
fi
|
||||
log_handler "$RSTTXT boot script (${LATEFILE})."
|
||||
cp -af $MODPATH/propsconf_late $LATEFILE >> $LOGFILE
|
||||
chmod -v 755 $LATEFILE >> $LOGFILE
|
||||
cp -af $MODPATH/propsconf_late $LATEFILE >> $LOGFILE 2>&1
|
||||
chmod -v 755 $LATEFILE >> $LOGFILE 2>&1
|
||||
placeholder_update $LATEFILE IMGPATH IMG_PLACEHOLDER $IMGPATH
|
||||
placeholder_update $LATEFILE CACHELOC CACHE_PLACEHOLDER $CACHELOC
|
||||
|
||||
|
|
|
@ -27,21 +27,21 @@ CONFWEB=enabled
|
|||
# ========================== Instructions =========================
|
||||
# =================================================================
|
||||
# Set the above variables to the desired prop/configuration values.
|
||||
#
|
||||
|
||||
# CONFFINGERPRINT should be set to the fingerprint of a ROM that passes
|
||||
# the ctsProfile check. See the prints.sh file for usable prints,
|
||||
# or the documentation for information on how to find one.
|
||||
#
|
||||
|
||||
# CONFPROPFILES should be set to "true" if you want to mask the file
|
||||
# values in build.prop and default.prop. For better root hiding.
|
||||
#
|
||||
|
||||
# The MagiskHide prop variables can be set as follows:
|
||||
# CONFDEBUGGABLE - 0 or 1 (set to "0" by MagiskHide - sensitive value is "1")
|
||||
# CONFSECURE - 0 or 1 (set to "1" by MagiskHide - sensitive value is "0")
|
||||
# CONFTYPE - user or userdebug (set to "user" by MagiskHide - sensitive value is "userdebug")
|
||||
# CONFTAGS - release-keys or test-keys (set to "release-keys" by MagiskHide - sensitive value is "test-keys")
|
||||
# CONFSELINUX - 0 or 1 (set to "0" by MagiskHide - sensitive value is "1")
|
||||
#
|
||||
|
||||
# CONFPROPS should contain any custom props and the value you want the module to set.
|
||||
# Any props you've previously edited in build.prop, and more, can be set like this.
|
||||
# Add them to the CONFPROPS variable according to the following example:
|
||||
|
@ -58,7 +58,7 @@ CONFWEB=enabled
|
|||
# "add", or "preserve". The default option is to replace the list.
|
||||
# This option supersedes the preserve option described below, but only
|
||||
# for the CONFPROPS variable.
|
||||
#
|
||||
|
||||
# CONFDELPROPS is a list of props you want to remove from your system.
|
||||
# Be very careful when using this option, removing the wrong props might
|
||||
# cause issues.
|
||||
|
@ -75,7 +75,7 @@ CONFWEB=enabled
|
|||
# "add", or "preserve". The default option is to replace the list.
|
||||
# This option supersedes the preserve option described below, but only
|
||||
# for the CONFDELPROPS variable.
|
||||
#
|
||||
|
||||
# CONFLATE is by default set to "true". This loads the boot script during the
|
||||
# late_start service mode. If the setting is changed to "false", the boot script
|
||||
# will instead be loaded earlier during boot, in the post-fs-data mode. This is
|
||||
|
@ -84,17 +84,17 @@ CONFWEB=enabled
|
|||
#
|
||||
# CONFCOLOUR and CONFWEB are the options for colour and automatic fingerprints
|
||||
# list update. See the module documentation for more details.
|
||||
#
|
||||
|
||||
# If any variables are left unset, that particular prop/configuration
|
||||
# will be cleared and the device/MagiskHide default values will be used.
|
||||
# If you want to keep any current module settings, add "preserve" to the variable.
|
||||
# Example:
|
||||
# CONFFINGERPRINT=preserve
|
||||
#
|
||||
|
||||
# When placed in /cache or the root of your internal storage, the module will load these
|
||||
# values during boot and the configuration file will be deleted. Keep a backup of the
|
||||
# file if you want to reuse it at a later time (clean ROM flash, etc).
|
||||
#
|
||||
|
||||
# For more information, see the documentation:
|
||||
# https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md
|
||||
# and the support thread @ XDA Developers:
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
# In that case, feel free to delete it.
|
||||
|
||||
# Script version
|
||||
SCRIPTV=12
|
||||
SETTRANSF=1
|
||||
SCRIPTV=13
|
||||
SETTRANSF=2
|
||||
NOTTRANSF="OPTIONLATE"
|
||||
|
||||
# Variables
|
||||
COREPATH=CORE_PLACEHOLDER
|
||||
|
@ -30,7 +31,7 @@ PROPEDIT=0
|
|||
CUSTOMEDIT=0
|
||||
DELEDIT=0
|
||||
REBOOTCHK=0
|
||||
OPTIONLATE=1
|
||||
OPTIONLATE=0
|
||||
OPTIONCOLOUR=1
|
||||
OPTIONWEB=1
|
||||
|
||||
|
@ -46,24 +47,24 @@ rm -f $LATELOGFILE
|
|||
|
||||
# Function to clean up different files after the module has been uninstalled
|
||||
cleanup() {
|
||||
echo "Cleaning up files in $CACHELOC." >> $LATELOGFILE
|
||||
echo "Cleaning up files in $CACHELOC." >> $LATELOGFILE 2>&1
|
||||
for ITEM in $CACHEFILES; do
|
||||
if [ -f "$CACHELOC/$ITEM" ]; then
|
||||
echo "Deleting ${ITEM}." >> $LATELOGFILE
|
||||
rm -fv $CACHELOC/$ITEM >> $LATELOGFILE
|
||||
echo "Deleting ${ITEM}." >> $LATELOGFILE 2>&1
|
||||
rm -f $CACHELOC/$ITEM >> $LATELOGFILE 2>&1
|
||||
fi
|
||||
done
|
||||
# Suicide.
|
||||
echo "Removing scripts." >> $LATELOGFILE
|
||||
rm -fv $IMGPATH/.core/post-fs-data.d/propsconf_post >> $LATELOGFILE
|
||||
rm -fv $0 >> $LATELOGFILE
|
||||
echo "Removing scripts." >> $LATELOGFILE 2>&1
|
||||
rm -f $IMGPATH/.core/post-fs-data.d/propsconf_post >> $LATELOGFILE 2>&1
|
||||
rm -f $0 >> $LATELOGFILE 2>&1
|
||||
}
|
||||
|
||||
# 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
|
||||
echo "Module set for removal." >> $LATELOGFILE 2>&1
|
||||
# Cleanup
|
||||
cleanup
|
||||
else
|
||||
|
@ -162,8 +163,8 @@ if [ -d "$MODPATH" ]; then
|
|||
MODULEPROP=$(echo "MODULE${PROP}" | tr '[:lower:]' '[:upper:]')
|
||||
if [ "$(eval "echo \$$REPROP")" == "true" ]; then
|
||||
log_handler "Changing/writing $ITEM."
|
||||
resetprop -v $ITEM 2>> $LOGFILE
|
||||
resetprop -nv $ITEM $(eval "echo \$$MODULEPROP") 2>> $LOGFILE
|
||||
resetprop -v $ITEM >> $LOGFILE 2>&1
|
||||
resetprop -nv $ITEM $(eval "echo \$$MODULEPROP") >> $LOGFILE 2>&1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -186,14 +187,14 @@ if [ -d "$MODPATH" ]; then
|
|||
# Check if the late_start service log file exists.
|
||||
if [ -f "$LATELOGFILE" ]; then
|
||||
log_handler "Removing late_start service log ($LATELOGFILE)."
|
||||
rm -fv $LATELOGFILE >> $LOGFILE
|
||||
rm -f $LATELOGFILE >> $LOGFILE 2>&1
|
||||
fi
|
||||
|
||||
log_script_chk "Boot script finished.\n\n=================="
|
||||
fi
|
||||
else
|
||||
echo "$MODPATH not found." >> $LATELOGFILE
|
||||
echo "Module no longer installed." >> $LATELOGFILE
|
||||
echo "$MODPATH not found." >> $LATELOGFILE 2>&1
|
||||
echo "Module no longer installed." >> $LATELOGFILE 2>&1
|
||||
# Cleanup
|
||||
cleanup
|
||||
fi
|
||||
|
|
|
@ -18,7 +18,7 @@ POSTLOGFILE=$CACHELOC/propsconf_postfile.log
|
|||
if [ -d "$MODPATH" ]; then
|
||||
# Checks if the module is set for removal
|
||||
if [ -f "$MODPATH/remove" ]; then
|
||||
echo "Module set for removal." >> $POSTLOGFILE
|
||||
echo "Module set for removal." >> $POSTLOGFILE 2>&1
|
||||
else
|
||||
# Load functions
|
||||
. $MODPATH/util_functions.sh
|
||||
|
@ -64,7 +64,7 @@ if [ -d "$MODPATH" ]; then
|
|||
|
||||
# Edits prop values if set for post-fs-data
|
||||
if [ "$(get_file_value $LATEFILE "OPTIONLATE=")" == 0 ]; then
|
||||
echo "\n--------------------" >> $LOGFILE
|
||||
echo -e "\n--------------------" >> $LOGFILE 2>&1
|
||||
log_handler "Editing prop values in post-fs-data mode."
|
||||
# ---Setting/Changing fingerprint---
|
||||
print_edit
|
||||
|
@ -72,7 +72,7 @@ if [ -d "$MODPATH" ]; then
|
|||
custom_edit
|
||||
# ---Deleting props---
|
||||
prop_del
|
||||
echo "\n--------------------" >> $LOGFILE
|
||||
echo -e "\n--------------------" >> $LOGFILE 2>&1
|
||||
fi
|
||||
|
||||
# Edits build.prop
|
||||
|
@ -99,7 +99,7 @@ if [ -d "$MODPATH" ]; then
|
|||
# Copies the stock build.prop to the module. Only if set in propsconf_late.
|
||||
if [ "$(get_file_value $LATEFILE "BUILDPROPENB=")" == 1 ] && [ "$(get_file_value $LATEFILE "BUILDEDIT=")" == 1 ]; then
|
||||
log_handler "Stock build.prop copied from /system."
|
||||
cp -af $SYSTEMLOC/build.prop $MODPATH/system/build.prop >> $LOGFILE
|
||||
cp -af $SYSTEMLOC/build.prop $MODPATH/system/build.prop >> $LOGFILE 2>&1
|
||||
|
||||
# Edits the module copy of build.prop
|
||||
module_values
|
||||
|
@ -132,7 +132,7 @@ if [ -d "$MODPATH" ]; then
|
|||
log_script_chk "post-fs-data.d finished.\n\n===================="
|
||||
fi
|
||||
else
|
||||
echo "$MODPATH not found." >> $POSTLOGFILE
|
||||
echo "Module no longer installed." >> $POSTLOGFILE
|
||||
echo "$MODPATH not found." >> $POSTLOGFILE 2>&1
|
||||
echo "Module no longer installed." >> $POSTLOGFILE 2>&1
|
||||
fi
|
||||
|
||||
|
|
|
@ -69,11 +69,13 @@ alias cat="$BBPATH cat"
|
|||
alias chmod="$BBPATH chmod"
|
||||
alias cp="$BBPATH cp"
|
||||
alias grep="$BBPATH grep"
|
||||
alias md5sum="$BBPATH md5sum"
|
||||
alias mv="$BBPATH mv"
|
||||
alias printf="$BBPATH printf"
|
||||
alias sed="$BBPATH sed"
|
||||
alias sort="$BBPATH sort"
|
||||
alias tar="$BBPATH tar"
|
||||
alias tee="$BBPATH tee"
|
||||
alias tr="$BBPATH tr"
|
||||
alias wget="$BBPATH wget"
|
||||
PRINTSLOC=$MODPATH/prints.sh
|
||||
|
@ -114,23 +116,23 @@ get_file_value() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Logs
|
||||
# Log functions
|
||||
# Saves the previous log (if available) and creates a new one
|
||||
log_start() {
|
||||
if [ -f "$LOGFILE" ]; then
|
||||
mv -f $LOGFILE $LASTLOGFILE
|
||||
fi
|
||||
touch $LOGFILE
|
||||
echo "***************************************************" >> $LOGFILE
|
||||
echo "********* MagiskHide Props Config $MODVERSION ********" >> $LOGFILE
|
||||
echo "***************** By Didgeridoohan ***************" >> $LOGFILE
|
||||
echo "***************************************************" >> $LOGFILE
|
||||
echo "***************************************************" >> $LOGFILE 2>&1
|
||||
echo "********* MagiskHide Props Config $MODVERSION ********" >> $LOGFILE 2>&1
|
||||
echo "***************** By Didgeridoohan ***************" >> $LOGFILE 2>&1
|
||||
echo "***************************************************" >> $LOGFILE 2>&1
|
||||
log_script_chk "Log start."
|
||||
}
|
||||
log_handler() {
|
||||
if [ $(id -u) == 0 ] ; then
|
||||
echo "" >> $LOGFILE
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $LOGFILE
|
||||
echo "" >> $LOGFILE 2>&1
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $LOGFILE 2>&1
|
||||
fi
|
||||
}
|
||||
log_print() {
|
||||
|
@ -139,7 +141,7 @@ log_print() {
|
|||
}
|
||||
log_script_chk() {
|
||||
log_handler "$1"
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $RUNFILE
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $RUNFILE 2>&1
|
||||
}
|
||||
|
||||
#Divider
|
||||
|
@ -214,6 +216,7 @@ placeholder_update() {
|
|||
esac
|
||||
}
|
||||
|
||||
# Check for original prop values
|
||||
orig_check() {
|
||||
PROPSTMPLIST=$PROPSLIST"
|
||||
ro.build.fingerprint
|
||||
|
@ -229,6 +232,7 @@ orig_check() {
|
|||
done
|
||||
}
|
||||
|
||||
# Check if boot scripts ran during boot
|
||||
script_ran_check() {
|
||||
POSTCHECK=0
|
||||
if [ -f "$RUNFILE" ] && [ "$(cat $RUNFILE | grep "post-fs-data.d finished")" ]; then
|
||||
|
@ -240,23 +244,23 @@ script_ran_check() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Currently set values
|
||||
# Load currently set values
|
||||
curr_values() {
|
||||
CURRDEBUGGABLE=$(resetprop -v ro.debuggable) 2>> $LOGFILE
|
||||
CURRSECURE=$(resetprop -v ro.secure) 2>> $LOGFILE
|
||||
CURRTYPE=$(resetprop -v ro.build.type) 2>> $LOGFILE
|
||||
CURRTAGS=$(resetprop -v ro.build.tags) 2>> $LOGFILE
|
||||
CURRSELINUX=$(resetprop -v ro.build.selinux) 2>> $LOGFILE
|
||||
CURRFINGERPRINT=$(resetprop -v ro.build.fingerprint) 2>> $LOGFILE
|
||||
CURRDEBUGGABLE=$(resetprop -v ro.debuggable) >> $LOGFILE 2>&1
|
||||
CURRSECURE=$(resetprop -v ro.secure) >> $LOGFILE 2>&1
|
||||
CURRTYPE=$(resetprop -v ro.build.type) >> $LOGFILE 2>&1
|
||||
CURRTAGS=$(resetprop -v ro.build.tags) >> $LOGFILE 2>&1
|
||||
CURRSELINUX=$(resetprop -v ro.build.selinux) >> $LOGFILE 2>&1
|
||||
CURRFINGERPRINT=$(resetprop -v ro.build.fingerprint) >> $LOGFILE 2>&1
|
||||
if [ -z "$CURRFINGERPRINT" ]; then
|
||||
CURRFINGERPRINT=$(resetprop -v ro.bootimage.build.fingerprint) 2>> $LOGFILE
|
||||
CURRFINGERPRINT=$(resetprop -v ro.bootimage.build.fingerprint) >> $LOGFILE 2>&1
|
||||
if [ -z "$CURRFINGERPRINT" ]; then
|
||||
CURRFINGERPRINT=$(resetprop -v ro.vendor.build.fingerprint) 2>> $LOGFILE
|
||||
CURRFINGERPRINT=$(resetprop -v ro.vendor.build.fingerprint) >> $LOGFILE 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Original values
|
||||
# Load original values
|
||||
orig_values() {
|
||||
ORIGDEBUGGABLE=$(get_file_value $LATEFILE "ORIGDEBUGGABLE=")
|
||||
ORIGSECURE=$(get_file_value $LATEFILE "ORIGSECURE=")
|
||||
|
@ -266,7 +270,7 @@ orig_values() {
|
|||
ORIGFINGERPRINT=$(get_file_value $LATEFILE "ORIGFINGERPRINT=")
|
||||
}
|
||||
|
||||
# Module values
|
||||
# Load module values
|
||||
module_values() {
|
||||
MODULEDEBUGGABLE=$(get_file_value $LATEFILE "MODULEDEBUGGABLE=")
|
||||
MODULESECURE=$(get_file_value $LATEFILE "MODULESECURE=")
|
||||
|
@ -278,7 +282,7 @@ module_values() {
|
|||
DELETEPROPS=$(get_file_value $LATEFILE "DELETEPROPS=")
|
||||
}
|
||||
|
||||
# Run all value functions
|
||||
# Run all value loading functions
|
||||
all_values() {
|
||||
log_handler "Loading values."
|
||||
# Currently set values
|
||||
|
@ -289,6 +293,7 @@ all_values() {
|
|||
module_values
|
||||
}
|
||||
|
||||
# Run after updated props/settings
|
||||
after_change() {
|
||||
# Update the reboot variable
|
||||
reboot_chk
|
||||
|
@ -298,6 +303,7 @@ after_change() {
|
|||
reboot_fn "$1"
|
||||
}
|
||||
|
||||
# Run after changing props/settings with configuration file
|
||||
after_change_file() {
|
||||
# Update the reboot variable
|
||||
reboot_chk
|
||||
|
@ -308,21 +314,23 @@ after_change_file() {
|
|||
reboot_fn "$1" "$2"
|
||||
}
|
||||
|
||||
# Check if module needs a reboot
|
||||
reboot_chk() {
|
||||
replace_fn REBOOTCHK 0 1 $LATEFILE
|
||||
}
|
||||
|
||||
# Reset module
|
||||
reset_fn() {
|
||||
BUILDPROPENB=$(get_file_value $LATEFILE "BUILDPROPENB=")
|
||||
FINGERPRINTENB=$(get_file_value $LATEFILE "FINGERPRINTENB=")
|
||||
cp -af $MODPATH/propsconf_late $LATEFILE >> $LOGFILE
|
||||
cp -af $MODPATH/propsconf_late $LATEFILE >> $LOGFILE 2>&1
|
||||
if [ "$BUILDPROPENB" ] && [ "$BUILDPROPENB" != 1 ]; then
|
||||
replace_fn BUILDPROPENB 1 $BUILDPROPENB $LATEFILE
|
||||
fi
|
||||
if [ "$FINGERPRINTENB" ] && [ "$FINGERPRINTENB" != 1 ]; then
|
||||
replace_fn FINGERPRINTENB 1 $FINGERPRINTENB $LATEFILE
|
||||
fi
|
||||
chmod -v 755 $LATEFILE >> $LOGFILE
|
||||
chmod -v 755 $LATEFILE >> $LOGFILE 2>&1
|
||||
placeholder_update $LATEFILE IMGPATH IMG_PLACEHOLDER $IMGPATH
|
||||
placeholder_update $LATEFILE CACHELOC CACHE_PLACEHOLDER $CACHELOC
|
||||
|
||||
|
@ -472,17 +480,31 @@ config_file() {
|
|||
|
||||
# Connection test
|
||||
test_connection() {
|
||||
ping -c 1 -W 1 google.com >> $LOGFILE 2>> $LOGFILE && CNTTEST="true" || CNTTEST="false"
|
||||
ping -c 1 -W 1 google.com >> $LOGFILE 2>&1 && CNTTEST="true" || CNTTEST="false"
|
||||
}
|
||||
|
||||
# Download osm0sis' busybox
|
||||
download_bb() {
|
||||
log_print "Downloading busybox."
|
||||
wget -T 5 -O $MODPATH/busybox $BBWWWPATH >> $LOGFILE
|
||||
wget -T 5 -O $MODPATH/busybox $BBWWWPATH 2>&1 | tee -a $LOGFILE
|
||||
if [ -f "$MODPATH/busybox" ]; then
|
||||
chmod -v 755 $MODPATH/busybox >> $LOGFILE
|
||||
if [ -f "$MODPATH/busybox.md5" ]; then
|
||||
if md5sum -s -c $MODPATH/busybox.md5 2>/dev/null; then
|
||||
log_print "- Busybox downloaded"
|
||||
md5sum -c $MODPATH/busybox.md5 >> $LOGFILE 2>&1
|
||||
chmod -v 755 $MODPATH/busybox >> $LOGFILE 2>&1
|
||||
else
|
||||
log_print "! Busybox md5 mismatch!"
|
||||
log_print "! No busybox downloaded!"
|
||||
rm -f $MODPATH/busybox >> $LOGFILE 2>&1
|
||||
fi
|
||||
else
|
||||
log_print "- Busybox downloaded"
|
||||
log_handler "Couldn't check md5 checksum"
|
||||
chmod -v 755 $MODPATH/busybox >> $LOGFILE 2>&1
|
||||
fi
|
||||
else
|
||||
log_print "No connection."
|
||||
log_print "! No busybox downloaded!"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -494,8 +516,8 @@ print_edit() {
|
|||
log_handler "Changing fingerprint."
|
||||
for ITEM in $PRINTPROPS; do
|
||||
log_handler "Changing/writing $ITEM."
|
||||
resetprop -v $ITEM 2>> $LOGFILE
|
||||
resetprop -nv $ITEM "$MODPRINT" 2>> $LOGFILE
|
||||
resetprop -v $ITEM >> $LOGFILE 2>&1
|
||||
resetprop -nv $ITEM "$MODPRINT" >> $LOGFILE 2>&1
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
@ -516,12 +538,12 @@ download_prints() {
|
|||
# Checking and downloading fingerprints list
|
||||
if [ "$CNTTEST" == "true" ]; then
|
||||
log_print "Checking list version."
|
||||
wget -T 5 -O $PRINTSTMP $PRINTSWWW 2>> $LOGFILE
|
||||
wget -T 5 -O $PRINTSTMP $PRINTSWWW >> $LOGFILE 2>&1
|
||||
if [ -f "$PRINTSTMP" ]; then
|
||||
LISTVERSION=$(get_file_value $PRINTSTMP "PRINTSV=")
|
||||
if [ "$LISTVERSION" == "Dev" ] || [ "$LISTVERSION" -gt "$(get_file_value $PRINTSLOC "PRINTSV=")" ]; then
|
||||
if [ "$(get_file_value $PRINTSTMP "PRINTSTRANSF=")" -le "$(get_file_value $PRINTSLOC "PRINTSTRANSF=")" ]; then
|
||||
mv -f $PRINTSTMP $PRINTSLOC >> $LOGFILE
|
||||
mv -f $PRINTSTMP $PRINTSLOC >> $LOGFILE 2>&1
|
||||
# Updates list version in module.prop
|
||||
VERSIONTMP=$(get_file_value $MODPATH/module.prop "version=")
|
||||
replace_fn version $VERSIONTMP "${MODVERSION}-v${LISTVERSION}" $MODPATH/module.prop
|
||||
|
@ -615,7 +637,7 @@ reset_prop_files() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Editing prop files
|
||||
# Editing prop files settings
|
||||
edit_prop_files() {
|
||||
log_handler "Modifying prop files$3."
|
||||
|
||||
|
@ -674,6 +696,7 @@ edit_prop_files() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Edit the prop files
|
||||
change_prop_file() {
|
||||
case $1 in
|
||||
build)
|
||||
|
@ -840,8 +863,8 @@ custom_edit() {
|
|||
for ITEM in $TMPLST; do
|
||||
log_handler "Changing/writing $(get_eq_left "$ITEM")."
|
||||
TMPITEM=$( echo $(get_eq_right "$ITEM") | sed 's|_sp_| |g')
|
||||
resetprop -v $(get_eq_left "$ITEM") 2>> $LOGFILE
|
||||
resetprop -nv $(get_eq_left "$ITEM") "$TMPITEM" 2>> $LOGFILE
|
||||
resetprop -v $(get_eq_left "$ITEM") >> $LOGFILE 2>&1
|
||||
resetprop -nv $(get_eq_left "$ITEM") "$TMPITEM" >> $LOGFILE 2>&1
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
@ -905,8 +928,8 @@ prop_del() {
|
|||
for ITEM in $TMPLST; do
|
||||
log_handler "Deleting $ITEM."
|
||||
TMPITEM=$( echo $(get_eq_right "$ITEM") | sed 's|_sp_| |g')
|
||||
resetprop -v $ITEM 2>> $LOGFILE
|
||||
resetprop -v --delete $ITEM 2>> $LOGFILE
|
||||
resetprop -v $ITEM >> $LOGFILE 2>&1
|
||||
resetprop -v --delete $ITEM >> $LOGFILE 2>&1
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
@ -964,7 +987,7 @@ reset_delprop() {
|
|||
collect_logs() {
|
||||
log_handler "Collecting logs and information."
|
||||
# Create temporary directory
|
||||
mkdir -pv $TMPLOGLOC 2>> $LOGFILE
|
||||
mkdir -pv $TMPLOGLOC >> $LOGFILE 2>&1
|
||||
|
||||
# Saving Magisk and module log files and device original build.prop
|
||||
for ITEM in $TMPLOGLIST; do
|
||||
|
@ -975,7 +998,7 @@ collect_logs() {
|
|||
*) BPNAME=""
|
||||
;;
|
||||
esac
|
||||
cp -af $ITEM ${TMPLOGLOC}/${BPNAME} >> $LOGFILE
|
||||
cp -af $ITEM ${TMPLOGLOC}/${BPNAME} >> $LOGFILE 2>&1
|
||||
else
|
||||
case "$ITEM" in
|
||||
*/cache)
|
||||
|
@ -986,7 +1009,7 @@ collect_logs() {
|
|||
fi
|
||||
ITEMTPM=$(echo $ITEM | sed 's|$CACHELOC|$CACHELOCTMP|')
|
||||
if [ -f "$ITEMTPM" ]; then
|
||||
cp -af $ITEMTPM $TMPLOGLOC >> $LOGFILE
|
||||
cp -af $ITEMTPM $TMPLOGLOC >> $LOGFILE 2>&1
|
||||
else
|
||||
log_handler "$ITEM not available."
|
||||
fi
|
||||
|
@ -1002,13 +1025,13 @@ collect_logs() {
|
|||
|
||||
# Package the files
|
||||
cd $CACHELOC
|
||||
tar -zcvf propslogs.tar.gz propslogs >> $LOGFILE
|
||||
tar -zcvf propslogs.tar.gz propslogs >> $LOGFILE 2>&1
|
||||
|
||||
# Copy package to internal storage
|
||||
mv -f $CACHELOC/propslogs.tar.gz /storage/emulated/0 >> $LOGFILE
|
||||
mv -f $CACHELOC/propslogs.tar.gz /storage/emulated/0 >> $LOGFILE 2>&1
|
||||
|
||||
# Remove temporary directory
|
||||
rm -rf $TMPLOGLOC >> $LOGFILE
|
||||
rm -rf $TMPLOGLOC >> $LOGFILE 2>&1
|
||||
|
||||
log_handler "Logs and information collected."
|
||||
|
||||
|
|
114
config.sh
114
config.sh
|
@ -85,16 +85,16 @@ set_permissions() {
|
|||
# set_perm $MODPATH/system/lib/libart.so 0 0 0644
|
||||
|
||||
# The following is default permissions, DO NOT remove
|
||||
set_perm_recursive $MODPATH 0 0 0755 0644 >> $INSTLOG
|
||||
set_perm_recursive $MODPATH 0 0 0755 0644
|
||||
|
||||
# Permissions for the props file
|
||||
set_perm $MODPATH/system/$BIN/props 0 0 0777 >> $INSTLOG
|
||||
set_perm $MODPATH/system/$BIN/props 0 0 0777
|
||||
# Permissions for boot scripts
|
||||
set_perm $LATEFILE 0 0 0755 >> $INSTLOG
|
||||
set_perm $POSTFILE 0 0 0755 >> $INSTLOG
|
||||
set_perm $LATEFILE 0 0 0755
|
||||
set_perm $POSTFILE 0 0 0755
|
||||
# Busybox permissions
|
||||
if [ -f "$MODPATH/busybox" ]; then
|
||||
set_perm $MODPATH/busybox 0 0 0755 >> $INSTLOG
|
||||
set_perm $MODPATH/busybox 0 0 0755
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -139,14 +139,15 @@ else
|
|||
fi
|
||||
INSTLOG=$CACHELOC/propsconf_install.log
|
||||
UPDATEV=$(get_file_value $UPDATELATEFILE "SCRIPTV=")
|
||||
SETTRANSF=$(get_file_value $UPDATELATEFILE "SETTRANSF=")
|
||||
BBCURR=1.29.1
|
||||
UPDATETRANSF=$(get_file_value $UPDATELATEFILE "SETTRANSF=")
|
||||
NOTTRANSF=$(get_file_value $UPDATELATEFILE "NOTTRANSF=")
|
||||
BBCURR=1.29.2
|
||||
if [ "$ARCH" == "x64" ]; then
|
||||
BBARCH=x86_64
|
||||
else
|
||||
BBARCH=$ARCH
|
||||
fi
|
||||
BBWWWPATH="https://raw.githubusercontent.com/Magisk-Modules-Repo/Busybox-Installer/master/busybox-${BBARCH}"
|
||||
BBWWWPATH="https://raw.githubusercontent.com/Didgeridoohan/MHPCBB/master/busybox-${BBARCH}"
|
||||
SETTINGSLIST="
|
||||
FINGERPRINTENB
|
||||
PRINTEDIT
|
||||
|
@ -183,19 +184,20 @@ fingerprint
|
|||
"
|
||||
USNFLIST="xiaomi-safetynet-fix safetynet-fingerprint-fix VendingVisa DeviceSpoofingTool4Magisk"
|
||||
|
||||
# Log functions
|
||||
log_handler() {
|
||||
echo "" >> $INSTLOG
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $INSTLOG
|
||||
echo -e "$(date +"%m-%d-%Y %H:%M:%S") - $1" >> $INSTLOG 2>&1
|
||||
}
|
||||
log_start() {
|
||||
if [ -f "$INSTLOG" ]; then
|
||||
rm -f $INSTLOG
|
||||
fi
|
||||
touch $INSTLOG
|
||||
echo "***************************************************" >> $INSTLOG
|
||||
echo "******** MagiskHide Props Config $MODVERSION ********" >> $INSTLOG
|
||||
echo "**************** By Didgeridoohan ***************" >> $INSTLOG
|
||||
echo "***************************************************" >> $INSTLOG
|
||||
echo "***************************************************" >> $INSTLOG 2>&1
|
||||
echo "******** MagiskHide Props Config $MODVERSION ********" >> $INSTLOG 2>&1
|
||||
echo "**************** By Didgeridoohan ***************" >> $INSTLOG 2>&1
|
||||
echo "***************************************************" >> $INSTLOG 2>&1
|
||||
log_handler "Starting module installation script"
|
||||
}
|
||||
log_print() {
|
||||
|
@ -207,30 +209,53 @@ log_print() {
|
|||
script_placement() {
|
||||
if [ -f "$LATEFILE" ]; then
|
||||
FILEV=$(get_file_value $LATEFILE "SCRIPTV=")
|
||||
FILETRANSF=$(get_file_value $LATEFILE "SETTRANSF=")
|
||||
else
|
||||
FILEV=0
|
||||
FILETRANSF=$UPDATETRANSF
|
||||
fi
|
||||
log_print "- Installing scripts"
|
||||
cp -af $INSTALLER/common/util_functions.sh $MODPATH/util_functions.sh >> $INSTLOG
|
||||
cp -af $INSTALLER/common/prints.sh $MODPATH/prints.sh >> $INSTLOG
|
||||
cp -af $UPDATEPOSTFILE $MODPATH/propsconf_post >> $INSTLOG
|
||||
cp -af $UPDATEPOSTFILE $POSTFILE >> $INSTLOG
|
||||
cp -af $UPDATELATEFILE $MODPATH/propsconf_late >> $INSTLOG
|
||||
cp -af $INSTALLER/common/util_functions.sh $MODPATH/util_functions.sh >> $INSTLOG 2>&1
|
||||
cp -af $INSTALLER/common/prints.sh $MODPATH/prints.sh >> $INSTLOG 2>&1
|
||||
cp -af $UPDATEPOSTFILE $MODPATH/propsconf_post >> $INSTLOG 2>&1
|
||||
cp -af $UPDATEPOSTFILE $POSTFILE >> $INSTLOG 2>&1
|
||||
cp -af $UPDATELATEFILE $MODPATH/propsconf_late >> $INSTLOG 2>&1
|
||||
# New script
|
||||
if [ "$UPDATEV" -gt "$FILEV" ]; then
|
||||
# Fresh install
|
||||
if [ "$FILEV" == 0 ]; then
|
||||
log_print "- Placing settings script"
|
||||
elif [ "$SETTRANSF" -gt "$FILEV" ]; then
|
||||
# Updated script with a required clearing of settings
|
||||
elif [ "$UPDATETRANSF" -gt "$FILETRANSF" ] && [ -z "$NOTTRANSF" ]; then
|
||||
log_print "- Settings cleared (script updated)"
|
||||
# Updated script
|
||||
else
|
||||
log_print "- Script updated"
|
||||
log_print "- Transferring settings from old script"
|
||||
# Prop settings
|
||||
for ITEM in $SETTINGSLIST; do
|
||||
SOLD=$(get_file_value $LATEFILE "${ITEM}=")
|
||||
SNEW=$(get_file_value $UPDATELATEFILE "${ITEM}=")
|
||||
if [ "$SOLD" ] && [ "$SOLD" != "$SNEW" ]; then
|
||||
log_handler "Setting ${ITEM} from ${SNEW} to ${SOLD}."
|
||||
sed -i "s|${ITEM}=${SNEW}|${ITEM}=${SOLD}|" $UPDATELATEFILE
|
||||
# Checking if a script update requires some options not to transfer
|
||||
case "$NOTTRANSF" in
|
||||
*${ITEM}*)
|
||||
if [ "$UPDATETRANSF" -gt "$FILETRANSF" ]; then
|
||||
TRANSFOPT=1
|
||||
else
|
||||
TRANSFOPT=0
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
TRANSFOPT=0
|
||||
;;
|
||||
esac
|
||||
if [ "$TRANSFOPT" == 1 ]; then
|
||||
log_handler "Not transfering settings for ${ITEM}."
|
||||
else
|
||||
SOLD=$(get_file_value $LATEFILE "${ITEM}=")
|
||||
SNEW=$(get_file_value $UPDATELATEFILE "${ITEM}=")
|
||||
if [ "$SOLD" ] && [ "$SOLD" != "$SNEW" ]; then
|
||||
log_handler "Setting ${ITEM} from ${SNEW} to ${SOLD}."
|
||||
sed -i "s|${ITEM}=${SNEW}|${ITEM}=${SOLD}|" $UPDATELATEFILE
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# Prop values
|
||||
|
@ -258,10 +283,12 @@ script_placement() {
|
|||
done
|
||||
fi
|
||||
log_handler "Setting up late_start settings script."
|
||||
cp -af $UPDATELATEFILE $LATEFILE >> $INSTLOG
|
||||
cp -af $UPDATELATEFILE $LATEFILE >> $INSTLOG 2>&1
|
||||
# Downgraded script (flashed old module version)
|
||||
elif [ "$UPDATEV" -lt "$FILEV" ]; then
|
||||
log_print "- Settings cleared (script downgraded)"
|
||||
cp -af $UPDATELATEFILE $LATEFILE >> $INSTLOG
|
||||
cp -af $UPDATELATEFILE $LATEFILE >> $INSTLOG 2>&1
|
||||
# No update of script
|
||||
else
|
||||
log_print "- Module settings preserved"
|
||||
fi
|
||||
|
@ -323,7 +350,7 @@ bin_check() {
|
|||
BIN=bin
|
||||
fi
|
||||
log_handler "Using /system/$BIN."
|
||||
mv -f $MODPATH/system/binpath $MODPATH/system/$BIN >> $INSTLOG
|
||||
mv -f $MODPATH/system/binpath $MODPATH/system/$BIN >> $INSTLOG 2>&1
|
||||
}
|
||||
|
||||
# Magisk installation check
|
||||
|
@ -331,8 +358,8 @@ install_check() {
|
|||
if [ ! -d "$SERVICEPATH" ] || [ ! -d "$POSTPATH" ]; then
|
||||
log_handler "Fresh Magisk installation detected."
|
||||
log_handler "Creating path for boot script."
|
||||
mkdir -pv $POSTPATH >> $INSTLOG
|
||||
mkdir -pv $SERVICEPATH >> $INSTLOG
|
||||
mkdir -pv $POSTPATH >> $INSTLOG 2>&1
|
||||
mkdir -pv $SERVICEPATH >> $INSTLOG 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -351,7 +378,7 @@ check_bb() {
|
|||
log_handler "Current/installed busybox - v${BBCURR}/v${BBV}."
|
||||
if [ "$(echo $BBCURR | sed 's|\.||g')" -le "$(echo $BBV | sed 's|\.||g')" ]; then
|
||||
log_handler "Backing up current busybox."
|
||||
cp -af $IMGPATH/$MODID/busybox $CACHELOC/busybox_post >> $INSTLOG
|
||||
cp -af $IMGPATH/$MODID/busybox $CACHELOC/busybox_post >> $INSTLOG 2>&1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -360,19 +387,38 @@ check_bb() {
|
|||
download_bb() {
|
||||
if [ -f "$CACHELOC/busybox_post" ]; then
|
||||
log_handler "Restoring current busybox."
|
||||
mv -f $CACHELOC/busybox_post $MODPATH/busybox >> $INSTLOG
|
||||
mv -f $CACHELOC/busybox_post $MODPATH/busybox >> $INSTLOG 2>&1
|
||||
elif [ "$BOOTMODE" == "true" ]; then
|
||||
# Creating md5 file
|
||||
log_handler "Creating md5 checksum file"
|
||||
MD5TMP=$(cat $INSTALLER/common/busybox-${BBARCH}.md5)
|
||||
log_handler "Checksum - $MD5TMP"
|
||||
echo "$MD5TMP $MODPATH/busybox" > $INSTALLER/busybox.md5 2>&1 | tee -a $INSTLOG
|
||||
echo "$MD5TMP $BIMGPATH/$MODID/busybox" > $MODPATH/busybox.md5 2>&1 | tee -a $INSTLOG
|
||||
|
||||
# Testing connection
|
||||
log_print "- Testing connection"
|
||||
log_print "- Wait..."
|
||||
ping -c 1 -W 1 google.com >> $INSTLOG 2>> $INSTLOG && CNTTEST="true" || CNTTEST="false"
|
||||
ping -c 1 -W 1 google.com >> $INSTLOG 2>&1 && CNTTEST="true" || CNTTEST="false"
|
||||
|
||||
# Downloading busybox
|
||||
if [ "$CNTTEST" == "true" ]; then
|
||||
log_print "- Downloading busybox"
|
||||
wget -T 5 -O $MODPATH/busybox $BBWWWPATH 2>> $INSTLOG
|
||||
wget -T 5 -O $MODPATH/busybox $BBWWWPATH 2>&1 | tee -a $INSTLOG
|
||||
if [ -f "$MODPATH/busybox" ]; then
|
||||
log_print "- Busybox downloaded"
|
||||
if [ -f "$INSTALLER/busybox.md5" ]; then
|
||||
if md5sum -s -c $INSTALLER/busybox.md5 2>/dev/null; then
|
||||
log_print "- Busybox downloaded"
|
||||
md5sum -c $INSTALLER/busybox.md5 >> $INSTLOG 2>&1
|
||||
else
|
||||
log_print "! Busybox md5 mismatch!"
|
||||
log_print "! No busybox downloaded!"
|
||||
rm -f $MODPATH/busybox >> $INSTLOG 2>&1
|
||||
fi
|
||||
else
|
||||
log_print "- Busybox downloaded"
|
||||
log_handler "Couldn't check md5 checksum"
|
||||
fi
|
||||
else
|
||||
log_print "! No busybox downloaded!"
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
id=MagiskHidePropsConf
|
||||
name=MagiskHide Props Config
|
||||
version=v2.3.5-v27
|
||||
versionCode=21
|
||||
version=v2.3.6-v27
|
||||
versionCode=22
|
||||
author=Didgeridoohan
|
||||
description=Change your device's fingerprint, to pass SafetyNet's CTS Profile check. Edit prop files for better root hiding. Set/reset prop values set by MagiskHide. Change any prop values easily.
|
||||
minMagisk=1500
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user