v2.5.0-v31

This commit is contained in:
Didgeridoohan 2018-10-21 16:17:11 +02:00 committed by GitHub
parent f2203f9502
commit a9b0be7875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 133 additions and 216 deletions

View File

@ -104,8 +104,6 @@ mount_magisk_img
log_start
# Check for fresh Magisk installation
install_check
# Check busybox version
check_bb
# Create mod paths
rm -rf $MODPATH 2>/dev/null

View File

@ -30,7 +30,10 @@ This might be because your device simply hasn't been certified or that the ROM y
To fix this, you can use a known working fingerprint (one that has been certified by Google), usually from a stock ROM/firmware/factory image, and replace your device's current fingerprint with this. You can also use a fingerprint from another device, but this will change how your device is perceived.
There are a few pre-configured certified fingerprints available in the module, just in case you can't get a hold of one for your device. If you have a working fingerprint that could be added to the list, or an updated one for one already on there, please post that in the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228) toghether with device details.
There are a few pre-configured certified fingerprints available in the module, just in case you can't get a hold of one for your device. If you have a working fingerprint that could be added to the list, or an updated one for one already on there, please post that in the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228) toghether with device details. If it's a fingerprint for Android Pie (9), please also include the Android security patch date that corresponds to the fingerprint.
### Matching the Android security patch date
For some devices, if the fingerprint is for Android Pie (9), it is necessary to use a security patch date that matches the fingerprint used. For the module provided fingerprints this is done automatically, but if you enter a fingerprint manually you will have to update the security patch date yourself (if they don't already match). Use the [Custom prop](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#changeset-custom-prop-values) function of this module to change `ro.build.version.security_patch` to the desired date.
### Can I use any fingerprint?
It's possible to use any fingerprint that's certified for your device. It doesn't have to match, either device or Android version. If you don't use a fingerprint for your device, the device might be percieved as the device that the fingerprint belongs to, in certain situations (Play Store, etc). The Android version doesn't matter much, and if you're using a ROM with an Android version much newer than what is officially available for your device, you are going to have to use an older fingerprint if you want to use the one for your device. But, like already stated, that doesn't really matter.
@ -65,11 +68,12 @@ Take a look below for an example of what a device fingerprint looks like.
Sometimes you can also find up to date and certified fingerprints at [firmware.mobi](https://desktop.firmware.mobi/).
### Custom fingerprints list
You can add your own fingerprint to the list by placing a file, named `printslist`, in the root of your internal storage with the fingerprint. It needs to be formated as follows: `device name=fingerprint`.
You can add your own fingerprint to the list by placing a file, named `printslist` (no file extension), in the root of your internal storage with the fingerprint. It needs to be formated as follows: `device name=fingerprint`.
Here's an example:
```
Google Nexus 6=google/shamu/shamu:7.1.1/N8I11B/4171878:user/release-keys
```
NOTE: If you're using a fingerprint for Android Pie (9) you might have to change the security patch date to one that matches the fingerprint used. This can be done directly in the fingerprints list, by adding a paragraph sign (`§`) at the end of the fingerprint directly followed by the date (`§2018-09-05`). You can also use the [Custom prop](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#changeset-custom-prop-values) function of this module to change `ro.build.version.security_patch` to the desired date.
### I still can't pass the ctsProfile check
@ -98,13 +102,13 @@ The fingerprints list will update without the need to update the entire module.
Just run the `props` command and the list will be updated automatically. Use the -nw option to disable or disable it completely in the script settings (see ["Prop script settings"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#prop-script-settings) below). If you've disabled the this setting you can update the list manually in the `Edit device fingerprint` menu.
**_Current fingerprints list version - v30_**
**_Current fingerprints list version - v31_**
## Please add support for device X
Adding device fingerprints to the list relies heavily on the users. You guys. I've looked up a fingerprint from time to time, but it is a bit time consuming and I don't have that time...
If you want a specific device fingerprint to be added to the module, take a look in the docs, under [Finding a certified fingerprint](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#finding-a-certified-fingerprint). If you can find a fingerprint for the device you have in mind, post it in the thread. I'll test it out and if it passes the ctsProfile check I'll add it to the list.
If you want a specific device fingerprint to be added to the module, take a look in the docs, under [Finding a certified fingerprint](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#finding-a-certified-fingerprint). If you can find a fingerprint for the device you have in mind, post it in the thread. I'll test it out and if it passes the ctsProfile check I'll add it to the list. If it's a fingerprint for Android Pie (9), please also include the Android security patch date that corresponds to the fingerprint.
## Improved root hiding - Editing build.prop and default.prop
@ -126,10 +130,12 @@ If, for some reason, you need one or more of these to be kept as their original
It's quite easy to change prop values with Magisk. With this module it's even easier. Just enter the prop you want to change and the new value and the module does the rest, nice and systemless. Any changes that you've previously done directly to build.prop, default.prop, etc, you can now do with this module instead.
When setting a custom prop you can also pick in what boot stage it should be set in. This can also be changed later for each individual custom prop. There are three options:
- Default - The main module option will decide (see Prop script settings below).
- Default - The main module option will decide (see [Prop script settings](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#boot-stage) below).
- post-fs-data - The prop will always be set in post-fs-data, regardless of the main module option.
- late_start service - The prop will always be set in late_start service, regardless of the main module option.
Note: post-fs-data runs earlier than late_start service.
### My build.prop doesn't change after setting a custom prop
Magisk doesn't alter the build.prop file when changing a custom prop value, it simply loads the new value instead of the one in build.prop. If you want to check if the new value has been loaded you can see this by selecting the prop in the "Add/edit custom props" menu of the `props` script.
@ -156,6 +162,8 @@ There are a couple of persistent options that you can set for the `props` script
### Boot stage
It's possible to move the execution of the boot script from the default post-fs-data to late_start service. Running the script in post-fs-data is required for the SafetyNet fix and custom props to work on some ROM/device combinations, and is also more reliable overall. If there are any kind of issues during boot, try changing the boot stage to late_start service instead. Just keep in mind that this might cause setting the build fingerprint to fail.
Note: post-fs-data runs earlier than late_start service.
### Script colours
This option will disable or enable colours for the `props` script.
@ -182,7 +190,7 @@ But first: have you tried turning it off and on again? Toggling MagiskHide off a
If you have questions, suggestions or are experiencing some kind of issue, visit the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228) @ XDA.
### Known issues
- Xiaomi devices (MIUI) often have issues passing the ctsProfile check, particularly China releases. This is under investigation...
- Xiaomi devices (MIUI) often have issues passing the ctsProfile check, particularly China releases. Try using [ShellHide](https://forum.xda-developers.com/apps/magisk/magisk-shellhide-t3855616) by @JayminSuthar together with this module. They might work in conjunction to get the device to pass SafetyNet.
- If you're on Android Pie you will have to use Magisk v17.2+. Any version prior to that will not be able to change the required prop values. This is because of a change in Android Pie, and in Magisk v17.2 the resetprop tool has been updated for this change.
### An option is marked as "disabled"
@ -201,6 +209,9 @@ This module can only really help with the ctsProfile check, by spoofing the devi
### Props don't seem to set properly
If it seems like props you're trying to set with the module don't get set properly (ctsProfile still doesn't pass, custom props don't work, etc), go into the script options and change the execution of the boot script to post-fs-data. See ["Boot stage"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#boot-stage) above.
### My device's Android security patch date changed
For some devices, when using an Android Pie fingerprint, it is necessary to also change the security patch date to match the fingerprint. This is automatically done by the module when using a Pie fingerprint. If you do not want this to happen you can manually add `ro.build.version.security_patch` to the custom props and add back the original date.
### Device issues because of the module
In case of issues, if you've set a prop value that doesn't work on your device causing it not to boot, etc, don't worry. There are options. You can follow the advice in the [Magisk troubleshooting guide](https://www.didgeridoohan.com/magisk/Magisk#hn_Module_causing_issues_Magisk_functionality_bootloop_loss_of_root_etc) to remove or disable the module, or you can use the module's built-in options to reset all module settings to the defaults.
@ -225,12 +236,18 @@ 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
@topjohnwu @ XDA Developers, for Magisk
@Zackptg5, @veez21 and @jenslody @ XDA Developers, for help and inspiration
## Changelog
### v2.5.0
- Improved/fixed the SafetyNet fix when using Android Pie fingerprints.
- Updated/changed Busybox logic.
- It is sometimes an appropriate response to reality to go insane.
- Added and updated fingerprints for Essential PH-1, Google Pixel and Pixel XL (all three variants) and Nokia 7 Plus. Fingerprints list v31.
- Various bugfixes and improvements.
### v2.4.3
- Another small update, fixing my bad memory (I wish).
@ -288,7 +305,7 @@ If you can't run the `props` script for some reason, the logs are also stored in
- Updated and clarified the documentation on how to use the configuration file.
- A bunch of improvements and tweaks. Several of which may go horribly wrong.
- Updated and added bunch of new fingerprints (Asus ZenPad S 8.0, Huawei P20 Pro, Samsung Galaxy S8, Sony Xperia XZ1 Dual and XZ1 Compact, Xiaomi Mi 4C and Redmi Note 3 Pro SE), list v19.
- Dont turn your back, dont look away, and *dont blink!* Good luck.
- Don't turn your back, don't look away, and *don't blink!* Good luck.
### v2.2.2
- This is not the changelog you're looking for. You can go about your business. Move along.
@ -375,10 +392,11 @@ If you can't run the `props` script for some reason, the logs are also stored in
## Current fingerprints list
### List v30
### List v31
- Asus Zenfone 2 Laser (6.0.1)
- Asus Zenfone 4 Max (7.1.1)
- Asus ZenPad S 8.0 (6.0.1)
- Essential PH-1 (9)
- Google Nexus 4 (5.1.1)
- Google Nexus 5 (6.0.1)
- Google Nexus 6 (7.1.1)
@ -388,6 +406,8 @@ If you can't run the `props` script for some reason, the logs are also stored in
- Google Pixel XL (9)
- Google Pixel 2 (9)
- Google Pixel 2 XL (9)
- Google Pixel 3 (9)
- Google Pixel 3 XL (9)
- HTC 10 (6.0.1)
- HTC U11 (8.0.0)
- Huawei Honor 6X (8.0.0)
@ -408,6 +428,7 @@ If you can't run the `props` script for some reason, the logs are also stored in
- Motorola Moto G6 Play (8.0.0)
- Motorola Moto X4 (8.0.0)
- Motorola Moto Z2 Play (8.0.0)
- Nokia 7 Plus (9)
- Nvidia Shield K1 (7.0)
- Nvidia Shield Tablet (7.0)
- OnePlus 2 (6.0.1)

View File

@ -49,4 +49,4 @@ fi
log_handler "post-fs-data.sh finished.\n\n===================="
# Deletes the post-fs-data control file
rm -f $POSTCHKFILE
rm -f $POSTCHKFILE

View File

@ -3,7 +3,7 @@
# MagiskHide Props Config
# By Didgeridoohan @ XDA Developers
PRINTSV=30
PRINTSV=31
PRINTSTRANSF=1
PRINTSFILE=/sdcard/printslist
@ -13,15 +13,18 @@ PRINTSLIST="
Asus Zenfone 2 Laser (6.0.1)=asus/WW_Z00L/ASUS_Z00L_63:6.0.1/MMB29P/WW_user_21.40.1220.2196_20180308:user/release-keys
Asus Zenfone 4 Max (7.1.1)=asus/WW_Phone/ASUS_X00HD_4:7.1.1/NMF26F/14.2016.1801.372-20180119:user/release-keys
Asus ZenPad S 8.0 (6.0.1)=asus/WW_P01M/P01M_3:6.0.1/MMB29P/WW_P01M-V5.6.0-20170608:user/release-keys
Essential PH-1 (9)=essential/mata/mata:9/PPR1.180610.091/249:user/release-keys§2018-07-05
Google Nexus 4 (5.1.1)=google/occam/mako:5.1.1/LMY48T/2237560:user/release-keys
Google Nexus 5 (6.0.1)=google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys
Google Nexus 6 (7.1.1)=google/shamu/shamu:7.1.1/N6F27M/4299435:user/release-keys
Google Nexus 5X (8.1.0)=google/bullhead/bullhead:8.1.0/OPM2.171019.029/4657601:user/release-keys
Google Nexus 6P (8.1.0)=google/angler/angler:8.1.0/OPM5.171019.019/4619337:user/release-keys
Google Pixel (9)=google/sailfish/sailfish:9/PPR2.180905.006/4945130:user/release-keys
Google Pixel XL (9)=google/marlin/marlin:9/PPR2.180905.006/4945130:user/release-keys
Google Pixel 2 (9)=google/walleye/walleye:9/PPR2.180905.005/4928864:user/release-keys
Google Pixel 2 XL (9)=google/taimen/taimen:9/PPR2.180905.005/4928864:user/release-keys
Google Pixel (9)=google/sailfish/sailfish:9/PPR2.181005.003/4984323:user/release-keys§2018-10-05
Google Pixel XL (9)=google/marlin/marlin:9/PPR2.181005.003/4984323:user/release-keys§2018-10-05
Google Pixel 2 (9)=google/walleye/walleye:9/PPR2.181005.003/4984323:user/release-keys§2018-10-05
Google Pixel 2 XL (9)=google/taimen/taimen:9/PPR2.181005.003/4984323:user/release-keys§2018-10-05
Google Pixel 3 (9)=google/blueline/blueline:9/PD1A.180720.030/4972053:user/release-keys§2018-09-05
Google Pixel 3 XL (9)=google/crosshatch/crosshatch:9/PD1A.180720.030/4972053:user/release-keys§2018-09-05
HTC 10 (6.0.1)=htc/HTCOneM10vzw/htc_pmewl:6.0.1/MMB29M/774095.8:user/release-keys
HTC U11 (8.0.0)=htc/ocndtwl_01405/htc_ocndtwl:8.0.0/OPR6.170623.013/1017190.2:user/release-keys
Huawei Honor 6X (8.0.0)=HONOR/BLN-AL10/HWBLN-H:8.0.0/HONORBLN-AL10/528(C00):user/release-keys
@ -42,6 +45,7 @@ Motorola Moto G5S (7.1.1)=motorola/montana/montana:7.1.1/NPPS26.102-49-8/6:user/
Motorola Moto G6 Play (8.0.0)=motorola/jeter_sprint/jeter:8.0.0/OCP27.91-23/23:user/release-keys
Motorola Moto X4 (8.0.0)=motorola/payton/payton:8.0.0/OPWS27.57-25-6-10/12:user/release-keys
Motorola Moto Z2 Play (8.0.0)=motorola/albus/albus:8.0.0/OPS27.76-12-25/26:user/release-keys
Nokia 7 Plus (9)=Nokia/Onyx_00WW/B2N_sprout:9/PPR1.180610.011/00WW_3_22C:user/release-keys§2018-09-01
Nvidia Shield K1 (7.0)=nvidia/sb_na_wf/shieldtablet:7.0/NRD90M/1928188_1065.2559:user/release-keys
Nvidia Shield Tablet (7.0)=nvidia/wx_na_wf/shieldtablet:7.0/NRD90M/1928188_904.2811:user/release-keys
OnePlus 2 (6.0.1)=OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447858500:user/release-keys
@ -50,7 +54,7 @@ OnePlus 3 (8.0.0)=OnePlus/OnePlus3/OnePlus3:8.0.0/OPR1.170623.032/05171653:user/
OnePlus 3T (8.0.0)=OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR1.170623.032/05171658:user/release-keys
OnePlus 5 (8.1.0)=OnePlus/OnePlus5/OnePlus5:8.1.0/OPM1.171019.011/06131715:user/release-keys
OnePlus 5T (8.1.0)=OnePlus/OnePlus5T/OnePlus5T:8.1.0/OPM1.171019.011/06131716:user/release-keys
OnePlus 6 (9)=OnePlus/OnePlus6/OnePlus6:9/PKQ1.180716.001/1809150000:user/release-keys
OnePlus 6 (9)=OnePlus/OnePlus6/OnePlus6:9/PKQ1.180716.001/1809150000:user/release-keys§2018-09-05
Samsung Galaxy A8 Plus (7.1.1)=samsung/jackpot2ltexx/jackpot2lte:7.1.1/NMF26X/A730FXXU2ARD1:user/release-keys
Samsung Galaxy Grand Prime (5.0.2)=samsung/fortuna3gdtvvj/fortuna3gdtv:5.0.2/LRX22G/G530BTVJU1BPH4:user/release-keys
Samsung Galaxy J2 (5.1.1)=samsung/j23gdd/j23g:5.1.1/LMY48B/J200HXXU0AQK2:user/release-keys

View File

@ -33,6 +33,9 @@ CONFWEB=enabled
# 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.
# Note that Android Pie fingerprints often also need to match the Android
# security patch date. Use the CONFPROPS setting to set ro.build.version.security_patch
# to the matching date (example: 2018-10-05).
# CONFPROPFILES should be set to "true" if you want to mask the file
# values in build.prop and default.prop. For better root hiding.
@ -88,7 +91,7 @@ CONFWEB=enabled
# useful if the module's boot script seems to be causing issues during boot.
#
# CONFCOLOUR and CONFWEB are the options for colour and automatic fingerprints
# list update. See the module documentation for more details.
# list update. See the module documentation for more details. Set to "enabled" or "disabled".
# If any variables are left unset, that particular prop/configuration
# will be cleared and the device/MagiskHide default values will be used.

View File

@ -83,21 +83,6 @@ if [ -d "$MODPATH" ]; then
log_start
log_handler "Module disabled."
else
# Checks for the Universal SafetyNet Fix module and similar modules editing the device fingerprint
PRINTMODULE=false
for USNF in $USNFLIST; do
if [ -d "$IMGPATH/$USNF" ]; then
NAME=$(get_file_value $IMGPATH/$USNF/module.prop "name=")
log_handler "'$NAME' installed (modifies the device fingerprint)."
PRINTMODULE=true
fi
done
if [ "$PRINTMODULE" == "true" ]; then
replace_fn FINGERPRINTENB 1 0 $LATEFILE
log_handler "Fingerprint modification disabled."
else
replace_fn FINGERPRINTENB 0 1 $LATEFILE
fi
# Check the reboot variable
if [ "$(get_file_value $LATEFILE "REBOOTCHK\=")" == 1 ]; then
@ -203,3 +188,27 @@ else
# Cleanup
cleanup
fi
s /
else
log_handler "Default.prop editing disabled."
fi
fi
# Get currently saved values
log_handler "Checking current values."
curr_values
# Check if the late_start service log file exists.
if [ -f "$LATELOGFILE" ]; then
log_handler "Removing late_start service log ($LATELOGFILE)."
rm -f $LATELOGFILE >> $LOGFILE 2>&1
fi
log_script_chk "Boot script finished.\n\n=================="
fi
else
echo "$MODPATH not found." >> $LATELOGFILE 2>&1
echo "Module no longer installed." >> $LATELOGFILE 2>&1
# Cleanup
cleanup
fi

View File

@ -37,6 +37,22 @@ if [ -d "$MODPATH" ]; then
# Clears out the script control file
rm -f $POSTCHKFILE
touch $POSTCHKFILE
# Checks for the Universal SafetyNet Fix module and similar modules editing the device fingerprint
PRINTMODULE=false
for USNF in $USNFLIST; do
if [ -d "$IMGPATH/$USNF" ]; then
NAME=$(get_file_value $IMGPATH/$USNF/module.prop "name=")
log_handler "'$NAME' installed (modifies the device fingerprint)."
PRINTMODULE=true
fi
done
if [ "$PRINTMODULE" == "true" ]; then
replace_fn FINGERPRINTENB 1 0 $LATEFILE
log_handler "Fingerprint modification disabled."
else
replace_fn FINGERPRINTENB 0 1 $LATEFILE
fi
# Get default values
log_handler "Checking device default values."
@ -109,7 +125,7 @@ if [ -d "$MODPATH" ]; then
# ro.build props
change_prop_file "build"
# Fingerprint
if [ "$MODULEFINGERPRINT" ] && [ "$(get_file_value $LATEFILE "SETFINGERPRINT=")" == "true" ]; then
if [ "$MODULEFINGERPRINT" ] && [ "$(get_file_value $LATEFILE "SETFINGERPRINT=")" == "true" ] && [ "$(get_file_value $LATEFILE "FINGERPRINTENB=")" == 1 ]; then
PRINTSTMP="$(cat $SYSTEMLOC/build.prop | grep "$ORIGFINGERPRINT")"
for ITEM in $PRINTSTMP; do
replace_fn $(get_eq_left "$ITEM") $(get_eq_right "$ITEM") $MODULEFINGERPRINT $MODPATH/system/build.prop && log_handler "$(get_eq_left "$ITEM")=$MODULEFINGERPRINT"
@ -137,4 +153,3 @@ else
echo "$MODPATH not found." >> $POSTLOGFILE 2>&1
echo "Module no longer installed." >> $POSTLOGFILE 2>&1
fi

View File

@ -27,41 +27,7 @@ $LATEFILE
CONFFILE=$CACHELOC/propsconf_conf
RESETFILE=$CACHELOC/reset_mhpc
MAGISKLOC=/data/adb/magisk
BBWWWPATH=BB_PLACEHOLDER
BBLOC=$MODPATH/busybox
if [ "$BBT" ]; then
case $BBT in
module)
if [ -f "$BBLOC" ]; then
BBPATH=$BBLOC
elif [ -d "$IMGPATH/busybox-ndk" ]; then
BBPATH=$(find $IMGPATH/busybox-ndk -name 'busybox')
else
BBPATH=$MAGISKLOC/busybox
fi
;;
osm0sis)
if [ -d "$IMGPATH/busybox-ndk" ]; then
BBPATH=$(find $IMGPATH/busybox-ndk -name 'busybox')
elif [ -f "$BBLOC" ]; then
BBPATH=$BBLOC
else
BBPATH=$MAGISKLOC/busybox
fi
;;
topjohnwu)
BBPATH=$MAGISKLOC/busybox
;;
esac
else
if [ -f "$BBLOC" ]; then
BBPATH=$BBLOC
elif [ -d "$IMGPATH/busybox-ndk" ]; then
BBPATH=$(find $IMGPATH/busybox-ndk -name 'busybox')
else
BBPATH=$MAGISKLOC/busybox
fi
fi
BBPATH=$MAGISKLOC/busybox
if [ -z "$(echo $PATH | grep /sbin:)" ]; then
alias resetprop="$MAGISKLOC/magisk resetprop"
fi
@ -70,7 +36,6 @@ alias chmod="$BBPATH chmod"
alias cp="$BBPATH cp"
alias grep="$BBPATH grep"
alias id="$BBPATH id"
alias md5sum="$BBPATH md5sum"
alias mv="$BBPATH mv"
alias printf="$BBPATH printf"
alias sed="$BBPATH sed"
@ -201,6 +166,28 @@ get_device_used() {
fi
}
# Get Android version for current fingerprint
get_android_version() {
VERTMP="$(echo $1 | sed 's|:user.*||' | sed 's|.*:||' | sed 's|/.*||' | sed 's|\.||g')"
if [ "${#VERTMP}" -lt 3 ]; then
until [ "${#VERTMP}" == 3 ]
do
VERTMP="$(echo ${VERTMP}0)"
done
fi
echo $VERTMP
}
# Get security patch date for current fingerprint
get_sec_patch() {
echo $1 | sed 's|.*§||'
}
# Get the fingerprint for displaying in the ui
get_print_display() {
echo $1 | sed 's|§.*||'
}
# Replace file values
replace_fn() {
sed -i "s|${1}=${2}|${1}=${3}|" $4
@ -499,59 +486,24 @@ test_connection() {
ping -c 1 -W 1 google.com >> $LOGFILE 2>&1 && CNTTEST="true" || CNTTEST="false"
}
# Busybox md5 check
md5_bb() {
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
}
# Download osm0sis' busybox
download_bb() {
log_print "Downloading busybox."
wget -T 5 -O $MODPATH/busybox $BBWWWPATH 2>&1 | tee -a $LOGFILE
if [ -s "$MODPATH/busybox" ]; then
md5_bb
elif [ -f "$MODPATH/busybox" ]; then
log_print "! Download failed!"
log_print "! Second attempt!"
rm -f $MODPATH/busybox >> $LOGFILE 2>&1
log_print "Downloading without progress bar"
wget -T 5 -q -O $MODPATH/busybox $BBWWWPATH 2>&1 | tee -a $LOGFILE
if [ -s "$MODPATH/busybox" ]; then
md5_bb
else
log_print "! No busybox downloaded!"
rm -f $MODPATH/busybox >> $LOGFILE 2>&1
fi
else
log_print "! No busybox downloaded!"
fi
}
# ======================== Fingerprint functions ========================
# Set new fingerprint
print_edit() {
MODPRINT=$(get_file_value $LATEFILE "MODULEFINGERPRINT=")
if [ "$(get_file_value $LATEFILE "FINGERPRINTENB=")" == 1 -o "$(get_file_value $LATEFILE "PRINTMODULE=")" == "false" ] && [ "$(get_file_value $LATEFILE "PRINTEDIT=")" == 1 ]; then
log_handler "Changing fingerprint."
PRINTCHNG="$(get_file_value $LATEFILE "MODULEFINGERPRINT=" | sed 's|§.*||')"
for ITEM in $PRINTPROPS; do
log_handler "Changing/writing $ITEM."
resetprop -v $ITEM >> $LOGFILE 2>&1
resetprop -nv $ITEM "$MODPRINT" >> $LOGFILE 2>&1
resetprop -nv $ITEM $PRINTCHNG >> $LOGFILE 2>&1
done
# Edit security patch date if the print is for Android Pie+
SECPATCH="$(get_sec_patch $(get_file_value $LATEFILE "MODULEFINGERPRINT="))"
if [ "$(get_android_version $PRINTCHNG)" -ge 900 ] && [ "$SECPATCH" ]; then
log_handler "Update security patch date to match fingerprint used."
resetprop -v ro.build.version.security_patch >> $LOGFILE 2>&1
resetprop -v ro.build.version.security_patch $SECPATCH >> $LOGFILE 2>&1
fi
fi
}
@ -922,7 +874,15 @@ set_custprop() {
fi
TMPVALUE=$(echo "$2" | sed 's| |_sp_|g')
CURRCUSTPROPS=$(get_file_value $LATEFILE "${PROPSBOOTSTAGE}=")
TMPCUSTPROPS=$(echo "$CURRCUSTPROPS ${1}=${TMPVALUE}" | sed 's|^[ \t]*||')
case "$CURRCUSTPROPS" in
*$1*)
TMPORIG=$(echo "$4" | sed 's| |_sp_|g')
TMPCUSTPROPS=$(echo "$CURRCUSTPROPS" | sed "s|${1}=${TMPORIG}|${1}=${TMPVALUE}|")
;;
*)
TMPCUSTPROPS=$(echo "$CURRCUSTPROPS ${1}=${TMPVALUE}" | sed 's|^[ \t]*||')
;;
esac
SORTCUSTPROPS=$(echo $(printf '%s\n' $TMPCUSTPROPS | sort -u))
log_handler "Setting custom prop $1."
@ -1127,6 +1087,4 @@ collect_logs() {
}
# Log print
BBV=$($BBPATH | grep "BusyBox v" | sed 's|.*BusyBox ||' | sed 's| (.*||')
log_handler "Functions loaded."
log_handler "Using busybox: ${BBPATH} (${BBV})."

View File

@ -92,10 +92,6 @@ set_permissions() {
# Permissions for boot scripts
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
fi
}
##########################################################################################
@ -141,13 +137,6 @@ INSTLOG=$CACHELOC/propsconf_install.log
UPDATEV=$(get_file_value $UPDATELATEFILE "SCRIPTV=")
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/Didgeridoohan/MHPCBB/master/busybox-${BBARCH}"
SETTINGSLIST="
FINGERPRINTENB
PRINTEDIT
@ -184,7 +173,7 @@ tags
selinux
fingerprint
"
USNFLIST="xiaomi-safetynet-fix safetynet-fingerprint-fix VendingVisa DeviceSpoofingTool4Magisk"
USNFLIST="xiaomi-safetynet-fix safetynet-fingerprint-fix VendingVisa DeviceSpoofingTool4Magisk universal-safetynet-fix samodx-safetyskipper"
# Log functions
log_handler() {
@ -344,7 +333,6 @@ usnf_check() {
log_print "! Fingerprint modification disabled!"
log_print ""
sed -i 's/FINGERPRINTENB=1/FINGERPRINTENB=0/' $UPDATELATEFILE
break
fi
done
}
@ -379,89 +367,12 @@ post_check() {
fi
}
# Check installed busybox
check_bb() {
if [ -f "$IMGPATH/$MODID/busybox" ]; then
BBV=$($IMGPATH/$MODID/busybox | grep "BusyBox v" | sed 's|.*BusyBox v||' | sed 's|-osm0sis.*||')
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 2>&1
fi
fi
}
# Busybox md5 check
md5_bb() {
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
}
# Download osm0sis' busybox
download_bb() {
if [ -f "$CACHELOC/busybox_post" ]; then
log_handler "Restoring current busybox."
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>&1 && CNTTEST="true" || CNTTEST="false"
# Downloading busybox
if [ "$CNTTEST" == "true" ]; then
log_print "- Downloading busybox (${BBARCH})"
wget -T 5 -O $MODPATH/busybox $BBWWWPATH 2>&1 | tee -a $INSTLOG
if [ -s "$MODPATH/busybox" ]; then
md5_bb
elif [ -f "$MODPATH/busybox" ]; then
log_print "! Download failed!"
log_print "! Second attempt!"
rm -f $MODPATH/busybox >> $INSTLOG 2>&1
log_print "- Downloading without progress bar"
wget -T 5 -q -O $MODPATH/busybox $BBWWWPATH 2>&1 | tee -a $INSTLOG
if [ -s "$MODPATH/busybox" ]; then
md5_bb
else
log_print "! No busybox downloaded!"
rm -f $MODPATH/busybox >> $INSTLOG 2>&1
fi
else
log_print "! No busybox downloaded!"
fi
else
log_print "! No connection!"
fi
elif [ "$BOOTMODE" == "false" ]; then
log_handler "Recovery installation, can't download busybox."
fi
}
# Installs everything
script_install() {
build_prop_check
usnf_check
bin_check
post_check
download_bb
script_placement
log_print "- Updating placeholders"
placeholder_update $LATEFILE CACHELOC CACHE_PLACEHOLDER "$CACHELOC"
@ -470,9 +381,7 @@ script_install() {
placeholder_update $MODPATH/util_functions.sh SYSTEMLOC SYSTEM_PLACEHOLDER "$SYSTEMLOC"
placeholder_update $MODPATH/util_functions.sh CACHELOC CACHE_PLACEHOLDER "$CACHELOC"
placeholder_update $MODPATH/util_functions.sh MODVERSION VER_PLACEHOLDER "$MODVERSION"
placeholder_update $MODPATH/util_functions.sh BBWWWPATH BB_PLACEHOLDER "$BBWWWPATH"
placeholder_update $POSTFILE COREPATH CORE_PLACEHOLDER "$COREPATH"
placeholder_update $LATEFILE COREPATH CORE_PLACEHOLDER "$COREPATH"
placeholder_update $MODPATH/system/$BIN/props COREPATH CORE_PLACEHOLDER "$COREPATH"
}

View File

@ -1,7 +1,7 @@
id=MagiskHidePropsConf
name=MagiskHide Props Config
version=v2.4.3-v30
versionCode=26
version=v2.5.0-v31
versionCode=27
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.
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, and set your own custom props.
minMagisk=17000

Binary file not shown.