v2.3.0-v19

This commit is contained in:
Didgeridoohan 2018-06-19 11:56:08 +02:00 committed by GitHub
parent 988abdb433
commit 89aec6af9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 434 additions and 141 deletions

View File

@ -104,6 +104,8 @@ 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

@ -64,11 +64,11 @@ Google Nexus 6=google/shamu/shamu:7.1.1/N8I11B/4171878:user/release-keys
### I still can't pass the ctsProfile check
If you've picked a certified fingerprint from the provided list, or you're using a fingerprint that you know is certified but still can't pass the ctsProfile check, try one or more of the following:
- First, do you pass basicIntegrity? If you don't, there's something else going on that this module can't help you with. Take a look under "Miscellaneous MagiskHide issues" below.
- Go into the script options and move the execution of the boot script to post-fs-data. See "Boot stage" below.
- Go into the script options and move the execution of the boot script to post-fs-data. See ["Boot stage"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#boot-stage) below.
- Try a different fingerprint (pick one from the provided list).
- Some ROMs will just not be able to pass the ctsProfile check, if they contain signs of a rooted/modified device that Magisk can't hide. Check in your ROM thread or with the creator/developer.
- You might have remnants of previous tampering on your device. A clean install of your system may be required.
- If you can't get things working, and want help, make sure to provide logs and details. See "Logs, etc" below.
- If you can't get things working, and want help, make sure to provide logs and details. See ["Logs, etc"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#logs-etc) below.
## Keeping your device "certified"
@ -84,13 +84,13 @@ If you're having issues getting your device certified, take a look in the Magisk
## Current fingerprints list version
The fingerprints list will update without the need to update the entire module. Keep an eye on the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228) for info.
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 below). If you've disabled the this setting you can update the list manually in the `Edit device fingerprint` menu.
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 - v18_**
**_Current fingerprints list version - v19_**
## Improved root hiding - Editing build.prop and default.prop
Some apps and services look at the actual files, rather than the set prop values. With this module feature you can make sure that the actual prop in build.prop and default.prop is changed to match whatever value the prop has been set to by either MagiskHide or the module. If there's a prop value set by the module (see below), that value takes precedence.
Some apps and services look at the actual files, rather than the set prop values. With this module feature you can make sure that the actual prop in build.prop and default.prop is changed to match whatever value the prop has been set to by either MagiskHide or the module. If there's a prop value set by the module (see ["Set/reset MagiskHide Sensitive props"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#setreset-magiskhide-sensitive-props) below), that value takes precedence.
## Set/reset MagiskHide Sensitive props
@ -108,8 +108,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.
## Removing prop values
If you would like to delete a certain prop value from your system, that can be done with the [Magisk resetprop tool](https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md#resetprop). With this module you can easily set that up by adding whatever prop you want removed to the "Delete props" list. Be very careful when using this option, since removing the wrong prop may cause isses with your device. See ["Device issues because of the module"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#device-issues-because-of-the-module) below if this happens.
## Prop script settings
There are a couple of persistent options that you can set for the `props` script. These are currently "Boot stage", "Script colours" and "Fingerprints list check". The options are found under "Script settings" when running the `props` script. The settings menu can also be opened by using the -s option when running the `props` script (use -h for details).
There are a couple of persistent options that you can set for the props script. These are currently "Boot stage", "Script colours" and "Fingerprints list check". The options are found under "Script settings" when running the props script. The settings menu can also be opened by using the -s option when running the props script (use -h for details).
### Boot stage
It's possible to move the execution of the boot script from the default late_start service to post-fs-data.d. This is required for the SafetyNet fix and custom props to work on some ROM/device combinations (known: LineageOS 15.1). The reason late_start service is default is that it's best to try to keep the number of scripts running during post-fs-data mode as low as possible, but if late_start service doesn't work, it needs to run in post-fs-data instead.
@ -118,11 +122,16 @@ It's possible to move the execution of the boot script from the default late_sta
This option will disable or enable colours for the `props` script.
### Fingerprints list check
This option will disable or enable the automatic updating of the fingerprints list when the `props` script starts. If the fingerprints list check is disabled, the list can be manually updated from within the script, under the `Edit device fingerprint` menu, or with the -f option when running the `props` script (use -h for details).
This option will disable or enable the automatic updating of the fingerprints list when the `props` script starts. If the fingerprints list check is disabled, the list can be manually updated from within the script, under the `Edit device fingerprint` menu, or with the -f option when running the props script (use -h for details).
## Configuration file
You can use a configuration file to set your desired options, rather than running the `props` command. Download the [settings file](https://raw.githubusercontent.com/Magisk-Modules-Repo/MagiskHide-Props-Config/master/common/propsconf_conf) or extract it from the module zip (in the common folder), fill in the desired options (follow the instructions in the file), place it in /cache (or /data/cache if you're using an A/B device) and reboot. This can also be done directly at the first install (through Manager or recovery) and even on a brand new clean install of Magisk, before even rebooting your device. Instant settings.
You can use a configuration file to set your desired options, rather than running the `props` command. Download the [settings file](https://raw.githubusercontent.com/Magisk-Modules-Repo/MagiskHide-Props-Config/master/common/propsconf_conf) or extract it from the module zip (in the common folder), fill in the desired options (follow the instructions in the file), place it in /cache (or /data/cache if you're using an A/B device) and reboot.
This can also be done directly at the first install (through Manager or recovery) and even on a brand new clean install of Magisk, before even rebooting your device. Upon detecting the file, the module boot script will load the configured values and then delete the the configuration file. Instant settings.
### Setting up the module on a clean ROM flash
After having made a clean ROM flash, the configuration file can be used to set the module up as you want without even having to boot first. Just flash the ROM, Magisk and then the module. If you then place a configuration file with your desired settings (fingerprint, custom props, etc) in /cache (or /data/cache if you're using an A/B device), this will be loaded during the first boot. It is possible that this won't work an all device/ROM combinations. If you experience issues, let the ROM boot once before setting everything up.
## Miscellaneous MagiskHide issues
@ -135,7 +144,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.
### 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" above.
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.
### 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.
@ -145,7 +154,9 @@ Place a file named `reset_mhpc` in /cache (or /data/cache on A/B devices) and re
It is possible to use this in combination with the configuration file described above to keep device fingerprint or any other settings intact past the reset. Just make sure to remove any custom props that might have been causing issues from the configuration file.
### Logs, etc
In case of issues, please provide the different log files, found in /cache (or /data/cache for A/B devices), together with a detailed description of your problem. The logs available could include "magisk.log" and any files starting with "propsconf". Providing the output from terminal might also be useful.
In case of issues, please provide the logs by either running the `props` script and selecting the "Collect logs" option (or running the `props` script with the -l command, use -h for details). All the relevant logs, together with the Magisk logs, the stock build.prop file and current prop values will be packaged into a file that'll be stored in the root of your internal storage, ready for attaching to a post in the [module support thread](https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228), together with a detailed description of your problem.
The logs are stored in /cache (or /data/cache for A/B devices), and the Magisk log and any files starting with "propsconf" would be useful for troubleshooting (if you don't use the "Collect logs" option mentioned above. Providing the output from terminal might also be useful.
If you have the latest beta release of Magisk installed, the "magisk_debug.log" is also useful. If there's no new beta released, there's always a beta version of the latest stable Magisk release (the only difference is the more verbose logging), so that you can collect the debug log.
@ -160,6 +171,14 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log"
## Changelog
### v2.3.0
- Added a function for removing props. See the documentation for details.
- Added a function to collect and package the logs and relevant troubleshooting files for easy uploading.
- 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.
### v2.2.2
- This is not the changelog you're looking for. You can go about your business. Move along.
- Fixed a bug with setting custom props where the value contains spaces.
@ -245,8 +264,9 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log"
## Current fingerprints list
### List v18 
### List v19 
- Asus Zenfone 2 Laser (6.0.1)
- Asus ZenPad S 8.0 (6.0.1)
- Google Nexus 4 (5.1.1)
- Google Nexus 5 (6.0.1)
- Google Nexus 6 (7.1.1)
@ -263,6 +283,7 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log"
- HTC 10 (6.0.1)
- Huawei Honor 9 (8.0.0)
- Huawei Mate 10 Pro (8.0.0)
- Huawei P20 Pro (8.1.0)
- Motorola Moto E4 (7.1.1)
- Motorola Moto G4 (7.0)
- Motorola Moto G5 (7.0)
@ -286,12 +307,14 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log"
- Samsung Galaxy S6 Edge (7.0)
- Samsung Galaxy S7 (8.0.0)
- Samsung Galaxy S7 Edge (8.0.0)
- Samsung Galaxy S8 (8.0.0)
- Samsung Galaxy S8 Plus (8.0.0)
- Samsung Galaxy S9 (8.0.0)
- Samsung Galaxy S9 Plus (8.0.0)
- Sony Xperia X (8.0.0)
- Sony Xperia X Performance (8.0.0)
- Sony Xperia XZ (8.0.0)
- Sony Xperia XZ1 Dual (8.0.0)
- Sony Xperia XZ1 Compact (8.0.0)
- Sony Xperia Z (5.1.1)
- Sony Xperia Z1 (5.1.1)
@ -304,6 +327,7 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log"
- Sony Xperia Z5 Dual (7.1.1)
- Vodafone Smart Ultra 6 (5.1.1)
- Xiaomi Mi 3/4 (6.0.1)
- Xiaomi Mi 4C (7.0)
- Xiaomi Mi 5/5 Pro (7.0)
- Xiaomi Mi 5S (7.0)
- Xiaomi Mi 5S Plus (6.0.1)
@ -315,6 +339,7 @@ If you have the latest beta release of Magisk installed, the "magisk_debug.log"
- Xiaomi Redmi 4 Prime (6.0.1)
- Xiaomi Redmi 4X (6.0.1)
- Xiaomi Redmi Note 3 Pro (6.0.1)
- Xiaomi Redmi Note 3 Pro SE (6.0.1)
- Xiaomi Redmi Note 4/4X (7.0)
- Xiaomi Redmi Note 5/5 Plus (7.1.2)
- Xiaomi Redmi Note 5 Pro (8.1.0)

View File

@ -26,7 +26,7 @@ if [ ! -f "$POSTFILE" ]; then
log_handler "Post-fs-data boot script not found."
log_handler "Restoring boot script (${POSTFILE})."
cp -afv $MODPATH/propsconf_post $POSTFILE >> $LOGFILE
chmod 755 $POSTFILE
chmod -v 755 $POSTFILE >> $INSTLOG
# Deleting settings script to force a restore
rm -f $LATEFILE
fi
@ -39,7 +39,7 @@ if [ ! -f "$LATEFILE" ] || [ -f "$RESETFILE" ]; then
fi
log_handler "$RSTTXT boot script (${LATEFILE})."
cp -afv $MODPATH/propsconf_late $LATEFILE >> $LOGFILE
chmod 755 $LATEFILE
chmod -v 755 $LATEFILE >> $INSTLOG
fi
log_handler "post-fs-data.sh finished.\n\n===================="

View File

@ -3,7 +3,7 @@
# MagiskHide Props Config
# By Didgeridoohan @ XDA Developers
PRINTSV=18
PRINTSV=19
PRINTSTRANSF=1
PRINTSFILE=/sdcard/printslist
@ -11,6 +11,7 @@ PRINTSFILE=/sdcard/printslist
# Certified fingerprints
PRINTSLIST="
Asus Zenfone 2 Laser (6.0.1)=asus/WW_Z00L/ASUS_Z00L_63:6.0.1/MMB29P/WW_user_21.40.1220.2179_20170803: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
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
@ -27,6 +28,7 @@ Google Pixel 2 XL (P DP1)=google/taimen/taimen:P/PPP1.180208.014/4633861:user/re
HTC 10 (6.0.1)=htc/HTCOneM10vzw/htc_pmewl:6.0.1/MMB29M/774095.8:user/release-keys
Huawei Honor 9 (8.0.0)=HONOR/STF-L09/HWSTF:8.0.0/HUAWEISTF-L09/364(C432):user/release-keys
Huawei Mate 10 Pro (8.0.0)=HUAWEI/BLA-L29/HWBLA:8.0.0/HUAWEIBLA-L29S/137(C432):user/release-keys
Huawei P20 Pro (8.1.0)=HUAWEI/CLT-L29/HWCLT:8.1.0/HUAWEICLT-L29/128(C432):user/release-keys
Motorola Moto E4 (7.1.1)=motorola/sperry_sprint/sperry:7.1.1/NCQ26.69-64/68:user/release-keys
Motorola Moto G4 (7.0)=motorola/athene/athene:7.0/NPJS25.93-14-13/3:user/release-keys
Motorola Moto G5 (7.0)=motorola/cedric/cedric:7.0/NPPS25.137-15-11/11:user/release-keys
@ -35,7 +37,7 @@ Motorola Moto X4 (8.0.0)=motorola/payton/payton:8.0.0/OPWS27.57-25-6-10/12:user/
Nvidia Shield K1 (7.0)=nvidia/sb_na_wf/shieldtablet:7.0/NRD90M/1928188_1065.2559:user/release-keys
OnePlus 3T (8.0.0)=OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR6.170623.013/12041042:user/release-keys
OnePlus 5T (8.0.0)=OnePlus/OnePlus5T/OnePlus5T:8.0.0/OPR1.170623.032/02040656:user/release-keys
OnePlus 6 (8.1.0)=OnePlus/OnePlus6/OnePlus6:8.1.0/OPM1.171019.011/05172042:user/release-keys
OnePlus 6 (8.1.0)=OnePlus/OnePlus6/OnePlus6:8.1.0/OPM1.171019.011/06140300:user/release-keys
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 J5 (7.1.1)=samsung/j5xnltexx/j5xnlte:7.1.1/NMF26X/J510FNXXS2BRA2:user/release-keys
@ -50,13 +52,15 @@ Samsung Galaxy S6 (7.0)=samsung/zerofltexx/zeroflte:7.0/NRD90M/G920FXXS5EQL1:use
Samsung Galaxy S6 Edge (7.0)=samsung/zeroltexx/zerolte:7.0/NRD90M/G925FXXS5EQL1:user/release-keys
Samsung Galaxy S7 (8.0.0)=samsung/heroltexx/herolte:8.0.0/R16NW/G930FXXU2ERD5:user/release-keys
Samsung Galaxy S7 Edge (8.0.0)=samsung/hero2ltexx/hero2lte:8.0.0/R16NW/G935FXXU2ERD5:user/release-keys
Samsung Galaxy S8 (8.0.0)=samsung/dreamltexx/dreamlte:8.0.0/R16NW/G950FXXU1CRC7:user/release-keys
Samsung Galaxy S8 Plus (8.0.0)=samsung/dream2ltexx/dream2lte:8.0.0/R16NW/G955FXXU1CRC7:user/release-keys
Samsung Galaxy S9 (8.0.0)=samsung/starltexx/starlte:8.0.0/R16NW/G960FXXU1ARCC:user/release-keys
Samsung Galaxy S9 Plus (8.0.0)=samsung/star2ltexx/star2lte:8.0.0/R16NW/G965FXXU1ARCC:user/release-keys
Sony Xperia X (8.0.0)=Sony/F5121/F5121:8.0.0/34.4.A.2.32/1455699507:user/release-keys
Sony Xperia X Performance (8.0.0)=Sony/F8131/F8131:8.0.0/41.3.A.2.99/1455830589:user/release-keys
Sony Xperia XZ (8.0.0)=Sony/F8331/F8331:8.0.0/41.3.A.2.99/1455830589:user/release-keys
Sony Xperia XZ1 Compact (8.0.0)=Sony/G8441/G8441:8.0.0/47.1.A.12.119/1601781803:user/release-keys
Sony Xperia XZ1 Dual (8.0.0)=Sony/G8342/G8342:8.0.0/47.1.A.12.179/1909673090:user/release-keys
Sony Xperia XZ1 Compact (8.0.0)=Sony/G8441/G8441:8.0.0/47.1.A.12.179/1909673090:user/release-keys
Sony Xperia Z (5.1.1)=Sony/C6603/C6603:5.1.1/10.7.A.0.228/58103698:user/release-keys
Sony Xperia Z1 (5.1.1)=Sony/C6903/C6903:5.1.1/14.6.A.1.236/2031203603:user/release-keys
Sony Xperia Z2 (6.0.1)=Sony/D6503/D6503:6.0.1/23.5.A.1.291/2769308465:user/release-keys
@ -68,6 +72,7 @@ Sony Xperia Z5 Compact (7.1.1)=Sony/E5823/E5823:7.1.1/32.4.A.1.54/3761073091:use
Sony Xperia Z5 Dual (7.1.1)=Sony/E6633/E6633:7.1.1/32.4.A.1.54/3761073091:user/release-keys
Vodafone Smart Ultra 6 (5.1.1)=Vodafone/P839V55/P839V55:5.1.1/LMY47V/20161227.134319.15534:user/release-keys
Xiaomi Mi 3/4 (6.0.1)=Xiaomi/cancro/cancro:6.0.1/MMB29M/V9.5.2.0.MXDMIFA:user/release-keys
Xiaomi Mi 4C (7.0)=Xiaomi/libra/libra:7.0/NRD90M/V9.5.2.0.NXKCNFA:user/release-keys
Xiaomi Mi 5/5 Pro (7.0)=Xiaomi/gemini/gemini:7.0/NRD90M/V9.2.1.0.NAAMIEK:user/release-keys
Xiaomi Mi 5S (7.0)=Xiaomi/capricorn/capricorn:7.0/NRD90M/V9.2.1.0.NAGMIEK:user/release-keys
Xiaomi Mi 5S Plus (6.0.1)=Xiaomi/natrium/natrium:6.0.1/MXB48T/V8.5.2.0.MBGMIED:user/release-keys
@ -79,6 +84,7 @@ Xiaomi Mi Note 2 (7.0)=Xiaomi/scorpio/scorpio:7.0/NRD90M/V9.2.1.0.NADMIEK:user/r
Xiaomi Redmi 4 Prime (6.0.1)=Xiaomi/markw/markw:6.0.1/MMB29M/V9.5.3.0.MBEMIFA:user/release-keys
Xiaomi Redmi 4X (6.0.1)=Xiaomi/santoni/santoni:6.0.1/MMB29M/V8.5.4.0.MAMCNED:user/release-keys
Xiaomi Redmi Note 3 Pro (6.0.1)=Xiaomi/kenzo/kenzo:6.0.1/MMB29M/V8.2.1.0.MHOCNDL:user/release-keys
Xiaomi Redmi Note 3 Pro SE (6.0.1)=Xiaomi/kate/kate:6.0.1/MMB29M/V8.1.3.0.MHRMIDI:user/release-keys
Xiaomi Redmi Note 4/4X (7.0)=xiaomi/mido/mido:7.0/NRD90M/V9.2.1.0.NCFMIEK:user/release-keys
Xiaomi Redmi Note 5/5 Plus (7.1.2)=xiaomi/vince/vince:7.1.2/N2G47H/V9.5.4.0.NEGMIFA:user/release-keys
Xiaomi Redmi Note 5 Pro (8.1.0)=xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.6.0.OEIMIFA:user/release-keys

View File

@ -16,6 +16,9 @@ CONFSELINUX=""
CONFPROPS=""
PROPOPTION=replace
CONFDELPROPS=""
DELPROPOPTION=replace
CONFLATE=true
CONFCOLOUR=enabled
CONFWEB=enabled
@ -53,6 +56,22 @@ CONFWEB=enabled
# 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.
# Add the props you want to remove to the CONFDELPROPS variable according to
# the following example:
# CONFDELPROPS="
# ro.sf.lcd_density
# ro.config.media_vol_steps
# net.tethering.noprovisioning
# "
# With DELPROPOPTION you can decide if the current custom prop list should
# be replaced, added to or preserved. Add the corresponding words "replace",
# "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
@ -68,8 +87,9 @@ CONFWEB=enabled
# Example:
# CONFFINGERPRINT=preserve
#
# When placed in /cache, 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.
# 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

View File

@ -9,7 +9,7 @@
# In that case, feel free to delete it.
# Script version
SCRIPTV=8
SCRIPTV=10
SETTRANSF=1
# Variables
@ -27,6 +27,7 @@ DEFAULTEDIT=0
PROPCOUNT=0
PROPEDIT=0
CUSTOMEDIT=0
DELEDIT=0
REBOOTCHK=0
OPTIONLATE=1
OPTIONCOLOUR=1
@ -67,6 +68,8 @@ if [ -d "$MODPATH" ]; then
else
# Load functions
. $MODPATH/util_functions.sh
log_handler "Functions loaded."
log_handler "Using busybox: ${BBPATH}."
if [ "$OPTIONLATE" == 0 ]; then
until [ ! -f "$POSTCHKFILE" ]; do
@ -121,6 +124,9 @@ if [ -d "$MODPATH" ]; then
# ---Custom prop values---
CUSTOMPROPS=""
# ---Delete prop values---
DELETEPROPS=""
# ---MagiskHide sensitive props---
REDEBUGGABLE=false
@ -145,6 +151,8 @@ if [ -d "$MODPATH" ]; then
print_edit
# ---Setting custom props---
custom_edit
# ---Deleting props---
prop_del
fi
# Edit MagiskHide sensitive values
if [ "$PROPEDIT" == 1 ]; then
@ -172,11 +180,16 @@ if [ -d "$MODPATH" ]; then
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 -fv $LATELOGFILE >> $LOGFILE
fi
log_script_chk "Boot script finished.\n\n=================="
fi
else

View File

@ -22,10 +22,6 @@ if [ -d "$MODPATH" ]; then
# Load functions
. $MODPATH/util_functions.sh
# Clears out the script control file
rm -f $POSTCHKFILE
touch $POSTCHKFILE
# Clears out the script check file
rm -f $RUNFILE
touch $RUNFILE
@ -33,93 +29,105 @@ if [ -d "$MODPATH" ]; then
# Start logging
log_start
# Get default values
log_handler "Checking device default values."
curr_values
# Get the current original values saved in propsconf_late
log_handler "Checking currently saved values."
orig_values
if [ -f "$MODPATH/disable" ]; then
log_start
log_handler "Module disabled."
else
# Clears out the script control file
rm -f $POSTCHKFILE
touch $POSTCHKFILE
# Get default values
log_handler "Checking device default values."
curr_values
# Get the current original values saved in propsconf_late
log_handler "Checking currently saved values."
orig_values
# Save default file values in propsconf_late
replace_fn ORIGDEBUGGABLE "\"$ORIGDEBUGGABLE\"" "\"$CURRDEBUGGABLE\"" $LATEFILE
replace_fn ORIGSECURE "\"$ORIGSECURE\"" "\"$CURRSECURE\"" $LATEFILE
replace_fn ORIGTYPE "\"$ORIGTYPE\"" "\"$CURRTYPE\"" $LATEFILE
replace_fn ORIGTAGS "\"$ORIGTAGS\"" "\"$CURRTAGS\"" $LATEFILE
replace_fn ORIGSELINUX "\"$ORIGSELINUX\"" "\"$CURRSELINUX\"" $LATEFILE
replace_fn ORIGFINGERPRINT "\"$ORIGFINGERPRINT\"" "\"$CURRFINGERPRINT\"" $LATEFILE
log_handler "Default values saved to $LATEFILE."
# Loading the new values
orig_values
# Save default file values in propsconf_late
replace_fn ORIGDEBUGGABLE "\"$ORIGDEBUGGABLE\"" "\"$CURRDEBUGGABLE\"" $LATEFILE
replace_fn ORIGSECURE "\"$ORIGSECURE\"" "\"$CURRSECURE\"" $LATEFILE
replace_fn ORIGTYPE "\"$ORIGTYPE\"" "\"$CURRTYPE\"" $LATEFILE
replace_fn ORIGTAGS "\"$ORIGTAGS\"" "\"$CURRTAGS\"" $LATEFILE
replace_fn ORIGSELINUX "\"$ORIGSELINUX\"" "\"$CURRSELINUX\"" $LATEFILE
replace_fn ORIGFINGERPRINT "\"$ORIGFINGERPRINT\"" "\"$CURRFINGERPRINT\"" $LATEFILE
log_handler "Default values saved to $LATEFILE."
# Loading the new values
orig_values
# Check if original file values are safe
orig_safe
# Check if original file values are safe
orig_safe
# Checks for configuration file
config_file
# Checks for configuration file
config_file
# Edits prop values if set for post-fs-data
if [ "$(get_file_value $LATEFILE "OPTIONLATE=")" == 0 ]; then
echo "\n--------------------" >> $LOGFILE
log_handler "Setting prop values in post-fs-data mode."
# ---Setting/Changing fingerprint---
print_edit
# ---Setting custom props---
custom_edit
echo "\n--------------------" >> $LOGFILE
fi
# Edits build.prop
if [ "$(get_file_value $LATEFILE "FILESAFE=")" == 0 ]; then
log_handler "Checking for conflicting build.prop modules."
# Checks if any other modules are using a local copy of build.prop
BUILDMODULE=false
MODID=$(get_file_value $MODPATH/module.prop "id=")
for D in $(ls $IMGPATH); do
if [ $D != "$MODID" ]; then
if [ -f "$IMGPATH/$D/system/build.prop" ]; then
NAME=$(get_file_value $IMGPATH/$D/module.prop "name=")
log_handler "Conflicting build.prop editing in module '$NAME'."
BUILDMODULE=true
fi
fi
done
if [ "$BUILDMODULE" == "true" ]; then
replace_fn BUILDPROPENB 1 0 $LATEFILE
else
replace_fn BUILDPROPENB 0 1 $LATEFILE
# Edits prop values if set for post-fs-data
if [ "$(get_file_value $LATEFILE "OPTIONLATE=")" == 0 ]; then
echo "\n--------------------" >> $LOGFILE
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
fi
# 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 -afv /system/build.prop $MODPATH/system/build.prop >> $LOGFILE
# Edits the module copy of build.prop
module_values
log_handler "Editing build.prop."
# ro.build props
change_prop_file "build"
# Fingerprint
if [ "$MODULEFINGERPRINT" ] && [ "$(get_file_value $LATEFILE "SETFINGERPRINT=")" == "true" ]; then
PRINTSTMP="$(cat /system/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"
done
# Edits build.prop
if [ "$(get_file_value $LATEFILE "FILESAFE=")" == 0 ]; then
log_handler "Checking for conflicting build.prop modules."
# Checks if any other modules are using a local copy of build.prop
BUILDMODULE=false
MODID=$(get_file_value $MODPATH/module.prop "id=")
for D in $(ls $IMGPATH); do
if [ $D != "$MODID" ]; then
if [ -f "$IMGPATH/$D/system/build.prop" ]; then
NAME=$(get_file_value $IMGPATH/$D/module.prop "name=")
log_handler "Conflicting build.prop editing in module '$NAME'."
BUILDMODULE=true
fi
fi
done
if [ "$BUILDMODULE" == "true" ]; then
replace_fn BUILDPROPENB 1 0 $LATEFILE
else
replace_fn BUILDPROPENB 0 1 $LATEFILE
fi
# 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 -afv $SYSTEMLOC/build.prop $MODPATH/system/build.prop >> $LOGFILE
# Edits the module copy of build.prop
module_values
log_handler "Editing build.prop."
# ro.build props
change_prop_file "build"
# Fingerprint
if [ "$MODULEFINGERPRINT" ] && [ "$(get_file_value $LATEFILE "SETFINGERPRINT=")" == "true" ]; 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"
done
fi
else
rm -f $MODPATH/system/build.prop
log_handler "Build.prop editing disabled."
fi
else
rm -f $MODPATH/system/build.prop
log_handler "Build.prop editing disabled."
log_handler "Prop file editing disabled. All values ok."
fi
else
rm -f $MODPATH/system/build.prop
log_handler "Prop file editing disabled. All values ok."
fi
# Check if the late_start service log file exists.
if [ -f "$POSTLOGFILE" ]; then
log_handler "Removing post-fs-data log ($POSTLOGFILE)."
rm -f $POSTLOGFILE
# Check if the late_start service log file exists.
if [ -f "$POSTLOGFILE" ]; then
log_handler "Removing post-fs-data log ($POSTLOGFILE)."
rm -f $POSTLOGFILE
fi
fi
log_script_chk "post-fs-data.d finished.\n\n===================="
fi
else

View File

@ -7,31 +7,41 @@
MODVERSION=VER_PLACEHOLDER
POSTFILE=$IMGPATH/.core/post-fs-data.d/propsconf_post
LATEFILE=$IMGPATH/.core/service.d/propsconf_late
SYSTEMLOC=SYSTEM_PLACEHOLDER
CACHELOC=CACHE_PLACEHOLDER
POSTCHKFILE=$CACHELOC/propsconf_postchk
RUNFILE=$MODPATH/script_check
LOGFILE=$CACHELOC/propsconf.log
LASTLOGFILE=$CACHELOC/propsconf_last.log
TMPLOGLOC=$CACHELOC/propslogs
TMPLOGLIST="
$CACHELOC/magisk.log
$CACHELOC/magisk.log.bak
/data/adb/magisk_debug.log
$CACHELOC/propsconf*
/sbin/.core/mirror/system/build.prop
"
CONFFILE=$CACHELOC/propsconf_conf
RESETFILE=$CACHELOC/reset_mhpc
MAGISKLOC=/data/adb/magisk
if [ -d "$IMGPATH/busybox-ndk" ]; then
BBWWWPATH=BB_PLACEHOLDER
BBLOC=$MODPATH/busybox
if [ -f "$BBLOC" ]; then
BBPATH=$BBLOC
elif [ -d "$IMGPATH/busybox-ndk" ]; then
BBPATH=$(find $IMGPATH/busybox-ndk -name 'busybox')
elif [ -f "/system/bin/busybox" ]; then
BBPATH=/system/bin/busybox
elif [ -f "/system/xbin/busybox" ]; then
BBPATH=/system/xbin/busybox
else
BBPATH=$MAGISKLOC/busybox
fi
if [ -z "$(echo $PATH | grep /sbin:)" ]; then
alias resetprop="$MAGISKLOC/magisk resetprop"
fi
alias cat="$BBPATH cat"
alias grep="$BBPATH grep"
alias printf="$BBPATH printf"
if [ -z "$(echo $PATH | grep /sbin:)" ]; then
alias resetprop="$MAGISKLOC/magisk resetprop"
fi
alias sed="$BBPATH sed"
alias sort="$BBPATH sort"
alias tar="$BBPATH tar"
alias tr="$BBPATH tr"
alias wget="$BBPATH wget"
PRINTSLOC=$MODPATH/prints.sh
@ -101,7 +111,7 @@ DIVIDER="${Y}=====================================${N}"
# Header
menu_header() {
if [ -z "$LOGNAME" ]; then
if [ -z "$LOGNAME" ] && [ "$DEVTESTING" == "false" ]; then
clear
fi
if [ "$MODVERSION" == "VER_PLACEHOLDER" ]; then
@ -229,10 +239,12 @@ module_values() {
MODULESELINUX=$(get_file_value $LATEFILE "MODULESELINUX=")
MODULEFINGERPRINT=$(get_file_value $LATEFILE "MODULEFINGERPRINT=")
CUSTOMPROPS=$(get_file_value $LATEFILE "CUSTOMPROPS=")
DELETEPROPS=$(get_file_value $LATEFILE "DELETEPROPS=")
}
# Run all value functions
all_values() {
log_handler "Loading values."
# Currently set values
curr_values
# Original values
@ -274,7 +286,7 @@ reset_fn() {
if [ "$FINGERPRINTENB" ] && [ "$FINGERPRINTENB" != 1 ]; then
replace_fn FINGERPRINTENB 1 $FINGERPRINTENB $LATEFILE
fi
chmod 755 $LATEFILE
chmod-v 755 $LATEFILE >> $INSTLOG
placeholder_update $LATEFILE IMGPATH IMG_PLACEHOLDER $IMGPATH
placeholder_update $LATEFILE CACHELOC CACHE_PLACEHOLDER $CACHELOC
@ -309,7 +321,7 @@ orig_safe() {
config_file() {
log_handler "Checking for configuration file."
if [ -f "$CONFFILE" ]; then
log_handler "Configuration file detected."
log_handler "Configuration file detected (${CONFFILE})."
# Loads custom variables
. $CONFFILE
# Updates prop values (including fingerprint)
@ -366,6 +378,22 @@ config_file() {
fi
fi
# Updates props to delete
if [ "$DELPROPOPTION" != "preserve" ]; then
if [ "$CONFDELPROPS" ]; then
if [ "$DELPROPOPTION" == "add" ] || [ "$DELPROPOPTION" == "replace" ]; then
if [ "$DELPROPOPTION" == "replace" ]; then
reset_all_delprop "file"
fi
for ITEM in $CONFDELPROPS; do
set_delprop "$ITEM" "file"
done
fi
else
reset_all_delprop "file"
fi
fi
# Updates options
OPTLCURR=$(get_file_value $LATEFILE "OPTIONLATE=")
OPTCCURR=$(get_file_value $LATEFILE "OPTIONCOLOUR=")
@ -402,6 +430,20 @@ config_file() {
fi
}
# Connection test
test_connection() {
ping -c 1 -W 1 google.com >> $LOGFILE 2>> $LOGFILE && CNTTEST="true" || CNTTEST="false"
}
# Download osm0sis' busybox
download_bb() {
log_print "Downloading busybox."
wget -T 5 -O $MODPATH/busybox $BBWWWPATH >> $LOGFILE
if [ -f "$MODPATH/busybox" ]; then
chmod -v 755 $MODPATH/busybox >> $LOGFILE
fi
}
# ======================== Fingerprint functions ========================
# Set new fingerprint
print_edit() {
@ -417,7 +459,7 @@ print_edit() {
# Checks and updates the prints list
download_prints() {
if [ -z "$LOGNAME" ]; then
if [ -z "$LOGNAME" ] && [ "$DEVTESTING" == "false" ]; then
clear
fi
if [ "$1" == "Dev" ]; then
@ -425,24 +467,32 @@ download_prints() {
fi
menu_header "Updating fingerprints list"
echo ""
log_print "Checking list version."
wget -T 10 -O $PRINTSTMP $PRINTSWWW 2>> $LOGFILE
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
# Updates list version in module.prop
VERSIONTMP=$(get_file_value $MODPATH/module.prop "version=")
replace_fn version $VERSIONTMP "${MODVERSION}-v${LISTVERSION}" $MODPATH/module.prop
log_print "Updated list to v${LISTVERSION}."
# Testing connection
log_print "Checking connection."
test_connection
# Checking and downloading fingerprints list
if [ "$CNTTEST" == "true" ]; then
log_print "Checking list version."
wget -T 5 -O $PRINTSTMP $PRINTSWWW 2>> $LOGFILE
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
# Updates list version in module.prop
VERSIONTMP=$(get_file_value $MODPATH/module.prop "version=")
replace_fn version $VERSIONTMP "${MODVERSION}-v${LISTVERSION}" $MODPATH/module.prop
log_print "Updated list to v${LISTVERSION}."
else
rm -f $PRINTSTMP
log_print "New fingerprints list requires module update."
fi
else
rm -f $PRINTSTMP
log_print "New fingerprints list requires module update."
log_print "Fingerprints list up-to-date."
fi
else
rm -f $PRINTSTMP
log_print "Fingerprints list up-to-date."
log_print "File not downloaded."
fi
else
log_print "No connection."
@ -536,7 +586,7 @@ edit_prop_files() {
else
# Checking if the device fingerprint is set by the module
if [ "$(get_file_value $LATEFILE "FINGERPRINTENB=")" == 1 ] && [ "$(get_file_value $LATEFILE "PRINTEDIT=")" == 1 ]; then
if [ "$(cat /system/build.prop | grep "$ORIGFINGERPRINT")" ]; then
if [ "$(cat $SYSTEMLOC/build.prop | grep "$ORIGFINGERPRINT")" ]; then
log_handler "Enabling prop file editing for device fingerprint."
replace_fn SETFINGERPRINT "false" "true" $LATEFILE
fi
@ -555,7 +605,7 @@ edit_prop_files() {
if [ "$PROPTYPE" == "ro.debuggable" ] || [ "$PROPTYPE" == "ro.secure" ]; then
PROPVALUE=$(get_file_value /default.prop "${PROPTYPE}=")
else
PROPVALUE=$(get_file_value /system/build.prop "${PROPTYPE}=")
PROPVALUE=$(get_file_value $SYSTEMLOC/build.prop "${PROPTYPE}=")
fi
fi
@ -801,4 +851,117 @@ reset_custprop() {
fi
after_change "$1"
}
# ======================== Delete Props functions ========================
# Delete props
prop_del() {
if [ "$(get_file_value $LATEFILE "DELEDIT=")" == 1 ]; then
log_handler "Deleting props."
TMPLST="$(get_file_value $LATEFILE "DELETEPROPS=")"
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
done
fi
}
# Set prop to delete
set_delprop() {
if [ "$1" ]; then
CURRDELPROPS=$(get_file_value $LATEFILE "DELETEPROPS=")
TMPDELPROPS=$(echo "$CURRDELPROPS ${1}" | sed 's|^[ \t]*||')
SORTDELPROPS=$(echo $(printf '%s\n' $TMPDELPROPS | sort -u))
log_handler "Setting prop to delete, $1."
replace_fn DELETEPROPS "\"$CURRDELPROPS\"" "\"$SORTDELPROPS\"" $LATEFILE
replace_fn DELEDIT 0 1 $LATEFILE
if [ "$2" != "file" ]; then
after_change "Delete $1"
fi
fi
}
# Reset all props to delete
reset_all_delprop() {
CURRDELPROPS=$(get_file_value $LATEFILE "DELETEPROPS=")
log_handler "Resetting list of props to delete."
# Removing all props to delete
replace_fn DELETEPROPS "\"$CURRDELPROPS\"" "\"\"" $LATEFILE
replace_fn DELEDIT 1 0 $LATEFILE
if [ "$1" != "file" ]; then
after_change "Delete $1"
fi
}
# Reset prop to delete
reset_delprop() {
CURRDELPROPS=$(get_file_value $LATEFILE "DELETEPROPS=")
log_handler "Resetting prop to delete, $1."
TMPDELPROPS=$(echo $CURRDELPROPS | sed "s|${1}||" | tr -s " " | sed 's|^[ \t]*||')
# Resetting prop to delete
replace_fn DELETEPROPS "\"$CURRDELPROPS\"" "\"$TMPDELPROPS\"" $LATEFILE
CURRDELPROPS=$(get_file_value $LATEFILE "DELETEPROPS=")
if [ -z "$CURRDELPROPS" ]; then
replace_fn DELEDIT 1 0 $LATEFILE
fi
after_change "Delete $1"
}
# ======================== Log collecting functions ========================
# Collects useful logs and info for troubleshooting
collect_logs() {
log_handler "Collecting logs and information."
# Create temporary directory
mkdir -pv $TMPLOGLOC 2>> $LOGFILE
# Saving Magisk and module log files and device original build.prop
for ITEM in $TMPLOGLIST; do
cp -afv $ITEM $TMPLOGLOC >> $LOGFILE
done
# Saving the current prop values
resetprop > $TMPLOGLOC/props.txt
# Package the files
cd $CACHELOC
tar -zcvf propslogs.tar.gz propslogs >> $LOGFILE
# Copy package to internal storage
mv -fv $CACHELOC/propslogs.tar.gz /storage/emulated/0 >> $LOGFILE
# Remove temporary directory
rm -rf $TMPLOGLOC >> $LOGFILE
log_handler "Logs and information collected."
INPUTTMP=""
menu_header "${C}$1${N}"
echo ""
echo "Logs and information collected."
echo ""
echo "The packaged file has been saved to the"
echo "root of your device's internal storage."
echo ""
echo "Attach the file to a post in the support"
echo "thread @ XDA, with a detailed description"
echo "of your issue."
echo ""
echo -n "Press enter to continue..."
read -r INPUTTMP
case "$INPUTTMP" in
*)
if [ "$2" == "l" ]; then
exit_fn
fi
;;
esac
}

View File

@ -89,6 +89,10 @@ set_permissions() {
# Permissions for the props file
set_perm $MODPATH/system/$BIN/props 0 0 0777
# Busybox permissions
if [ -f "$MODPATH/busybox" ]; then
set_perm $MODPATH/busybox 0 0 0755
fi
}
##########################################################################################
@ -101,6 +105,12 @@ set_permissions() {
# difficult for you to migrate your modules to newer template versions.
# Make update-binary as clean as possible, try to only do function calls in it.
##########################################################################################
# Installation variables and functions for the Magisk module "MagiskHide Props Config"
# by Didgeridoohan @ XDA Developers.
##########################################################################################
# Finding file values
get_file_value() {
cat $1 | grep $2 | sed "s|.*$2||" | sed 's|\"||g'
@ -117,27 +127,27 @@ LATEFILE=$SERVICEPATH/propsconf_late
POSTLATEFILE=$POSTPATH/propsconf_late
UPDATELATEFILE=$INSTALLER/common/propsconf_late
if [ -z $SLOT ]; then
SYSTEMLOC=/system
CACHELOC=/cache
else
SYSTEMLOC=/system/system
CACHELOC=/data/cache
fi
INSTLOG=$CACHELOC/propsconf_install.log
UPDATEV=$(get_file_value $UPDATELATEFILE "SCRIPTV=")
SETTRANSF=$(get_file_value $UPDATELATEFILE "SETTRANSF=")
if [ -f "$LATEFILE" ]; then
FILEV=$(get_file_value $LATEFILE "SCRIPTV=")
if [ "$ARCH" == "x64" ]; then
BBARCH=x86_64
else
FILEV=0
fi
if [ -d "$IMGPATH/busybox-ndk" ]; then
BBPATH=$(find $IMGPATH/busybox-ndk -name 'busybox')
else
BBPATH=/data/adb/magisk/busybox
BBARCH=$ARCH
fi
BBWWWPATH="https://raw.githubusercontent.com/Magisk-Modules-Repo/Busybox-Installer/master/busybox-${BBARCH}"
BBPATH=/data/adb/magisk/busybox
$BOOTMODE && alias grep="$BBPATH grep"
$BOOTMODE && alias sed="$BBPATH sed"
$BOOTMODE && alias tr="$BBPATH tr"
$BOOTMODE && alias ls="$BBPATH ls"
$BOOTMODE && alias wget="$BBPATH wget"
SETTINGSLIST="
FINGERPRINTENB
PRINTEDIT
@ -148,7 +158,7 @@ DEFAULTEDIT
PROPCOUNT
PROPEDIT
CUSTOMEDIT
CUSTOMCHK
DELEDIT
REBOOTCHK
OPTIONLATE
OPTIONCOLOUR
@ -162,6 +172,7 @@ MODULETAGS
MODULESELINUX
MODULEFINGERPRINT
CUSTOMPROPS
DELETEPROPS
"
PROPSLIST="
debuggable
@ -195,12 +206,17 @@ log_print() {
# Places various module scripts in their proper places
script_placement() {
if [ -f "$LATEFILE" ]; then
FILEV=$(get_file_value $LATEFILE "SCRIPTV=")
else
FILEV=0
fi
log_print "- Installing scripts"
cp -afv $INSTALLER/common/util_functions.sh $MODPATH/util_functions.sh >> $INSTLOG
cp -afv $INSTALLER/common/prints.sh $MODPATH/prints.sh >> $INSTLOG
cp -afv $UPDATEPOSTFILE $MODPATH/propsconf_post >> $INSTLOG
cp -afv $UPDATEPOSTFILE $POSTFILE >> $INSTLOG
chmod 755 $POSTFILE
chmod -v 755 $POSTFILE >> $INSTLOG
cp -afv $UPDATELATEFILE $MODPATH/propsconf_late >> $INSTLOG
if [ "$UPDATEV" -gt "$FILEV" ]; then
if [ "$FILEV" == 0 ]; then
@ -243,12 +259,13 @@ script_placement() {
fi
done
fi
log_handler "Setting up late_start settings script."
cp -afv $UPDATELATEFILE $LATEFILE >> $INSTLOG
chmod 755 $LATEFILE
chmod -v 755 $LATEFILE >> $INSTLOG
elif [ "$UPDATEV" -lt "$FILEV" ]; then
log_print "- Settings cleared (script downgraded)"
cp -afv $UPDATELATEFILE $LATEFILE >> $INSTLOG
chmod 755 $LATEFILE
chmod -v 755 $LATEFILE >> $INSTLOG
else
log_print "- Module settings preserved"
fi
@ -314,7 +331,7 @@ bin_check() {
# Magisk installation check
install_check() {
if [ ! -d "$SERVICEPATH"]; then
if [ ! -d "$SERVICEPATH" ]; then
log_handler "Fresh Magisk installation detected."
log_handler "Creating path for boot script."
mkdir -pv $SERVICEPATH >> $INSTLOG
@ -329,19 +346,58 @@ post_check() {
fi
}
# Check installed busybox
check_bb() {
BBCURR=1.28.4
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 [ "$BBCURR" == "$BBV" ]; then
log_handler "Backing up current busybox."
cp -afv $IMGPATH/$MODID/busybox $CACHELOC/busybox_post >> $INSTLOG
fi
fi
}
# Download osm0sis' busybox
download_bb() {
if [ -f "$CACHELOC/busybox_post" ]; then
log_handler "Restoring current busybox."
mv -fv $CACHELOC/busybox_post $MODPATH/busybox >> $INSTLOG
elif [ "$BOOTMODE" == "true" ]; then
# Testing connection
log_print "- Testing connection"
log_print "- Wait..."
ping -c 1 -W 1 google.com >> $INSTLOG 2>> $INSTLOG && CNTTEST="true" || CNTTEST="false"
# Downloading busybox
if [ "$CNTTEST" == "true" ]; then
log_print "- Downloading busybox"
wget -T 5 -O $MODPATH/busybox $BBWWWPATH 2>> $INSTLOG
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"
placeholder_update $MODPATH/util_functions.sh BIN BIN_PLACEHOLDER "$BIN"
placeholder_update $MODPATH/util_functions.sh USNFLIST USNF_PLACEHOLDER "$USNFLIST"
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 IMGPATH IMG_PLACEHOLDER "$BIMGPATH"
placeholder_update $LATEFILE IMGPATH IMG_PLACEHOLDER "$BIMGPATH"
placeholder_update $MODPATH/system/$BIN/props IMGPATH IMG_PLACEHOLDER "$BIMGPATH"

View File

@ -1,7 +1,7 @@
id=MagiskHidePropsConf
name=MagiskHide Props Config
version=v2.2.2-v18
versionCode=15
version=v2.3.0-v19
versionCode=16
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.