Skip to content

Commit

Permalink
v2.3.6-v27
Browse files Browse the repository at this point in the history
  • Loading branch information
Didgeridoohan authored Aug 7, 2018
1 parent 965990a commit 3470bc2
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 122 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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...
Expand Down
1 change: 1 addition & 0 deletions common/busybox-arm.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ef0f310f6a35e0afa735c36afd8135e3
1 change: 1 addition & 0 deletions common/busybox-arm64.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bbb13cf8bb2b1de70ecbf495cbff1450
1 change: 1 addition & 0 deletions common/busybox-mips.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e4be280e6a3f8102a62c261110ff69a2
1 change: 1 addition & 0 deletions common/busybox-mips64.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8a7f321ee8ed0fb85726de8d43d86ebf
1 change: 1 addition & 0 deletions common/busybox-x86.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
170133693c4af03a6f311179793569ec
1 change: 1 addition & 0 deletions common/busybox-x86_64.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b8374521632f8e8520a1ea1ad2cc919c
8 changes: 4 additions & 4 deletions common/post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
18 changes: 9 additions & 9 deletions common/propsconf_conf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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:
Expand Down
31 changes: 16 additions & 15 deletions common/propsconf_late
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +31,7 @@ PROPEDIT=0
CUSTOMEDIT=0
DELEDIT=0
REBOOTCHK=0
OPTIONLATE=1
OPTIONLATE=0
OPTIONCOLOUR=1
OPTIONWEB=1

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
12 changes: 6 additions & 6 deletions common/propsconf_post
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -64,15 +64,15 @@ 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
# ---Setting custom props---
custom_edit
# ---Deleting props---
prop_del
echo "\n--------------------" >> $LOGFILE
echo -e "\n--------------------" >> $LOGFILE 2>&1
fi

# Edits build.prop
Expand All @@ -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
Expand Down Expand Up @@ -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

Loading

0 comments on commit 3470bc2

Please sign in to comment.