diff --git a/README.md b/README.md index cc68b9b..9110951 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,6 @@ Keep reading below to find out more details about the different parts of the mod - [Please update fingerprint X](https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/blob/master/README.md#please-update-fingerprint-x) ##### Device simulation - [Device simulation](https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/blob/master/README.md#device-simulation) -##### Improved root hiding -- [Improved root hiding - Editing build.prop and default.prop](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#improved-root-hiding---editing-buildprop-and-defaultprop) ##### MagiskHide props - [Set/reset MagiskHide Sensitive props](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#setreset-magiskhide-sensitive-props) ##### Custom props @@ -190,7 +188,7 @@ Just run the `props` command and the list will be updated automatically. Use the If you already have a device fingerprint set by the module, and it has been updated in the current fingerprints list, it will be automatically updated when the prints list gets an update. Just reboot to apply. This function can be turned of in the script settings (see ["Prop script settings"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config#prop-script-settings) below) -**_Current fingerprints list version - v63_** +**_Current fingerprints list version - v64_** ## Please add support for device X @@ -217,6 +215,7 @@ If you want to simulate a specific device (to get access to device specific apps - ro.build.version.release - ro.build.id - ro.build.version.incremental +- ro.build.display.id - ro.build.version.sdk By default all props are set when this option is activated, but it is possible to deactivate and activate each prop individually. @@ -224,10 +223,6 @@ By default all props are set when this option is activated, but it is possible t Whenever a fingerprint is set by the module, the `ro.build.description` prop will be set automatically independently from if the general device simulation option is enabled or not. -## Improved root hiding - Editing build.prop and default.prop -In some rare cases, apps and services look at the actual files (build.prop and default.prop), 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 By default, if MagiskHide detects certain sensitive prop values they will be changed to known safe values. These are currently: - ro.debuggable (set to "0" by MagiskHide - sensitive value is "1") @@ -290,7 +285,7 @@ This option will disable or enable the automatic updating of the fingerprints li Whenever there is an update to the fingerprints list and if you have a fingerprint applied for a device that is on the list, the fingerprint will automatically be updated (if there is an update to that particular fingerprint). This option will not update a fingerprint to one for a different Android version if there are several fingerprints available for the same device. ## Configuration file -You can use a configuration file to set your desired options, rather than running the `props` command. This is particularly useful if you have a large amount of custom props you want to set. 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 ('propsconf_conf' in the common folder), fill in the desired options (follow the instructions in the file), place it /data or /cache (or /data/cache if you're using an A/B device) and reboot. You can also use the configuration file when first installing the module. Just place the file in the root of your internal storage (or one of the other previously mentioned locations) before flashing the module and the installation script will set everything up. +You can use a configuration file to set your desired options, rather than running the `props` command. This is particularly useful if you have a large amount of custom props you want to set. 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 ('propsconf_conf' in the common folder), fill in the desired options (follow the instructions in the file), place it in the root of your internal storage (/sdcard), in /data or in /cache (or /data/cache if you're using an A/B device) and reboot. You can also use the configuration file when first installing the module. Just place the file in the root of your internal storage (or one of the other previously mentioned locations) before flashing the module and the installation script will set everything up. If you edit the configuration file in Windows, make sure that you use a text editor that can handle [Unix file endings](https://en.m.wikipedia.org/wiki/Newline), such as Notepad++ and similar editors (not regular Windows Notepad). @@ -299,7 +294,7 @@ This can also be done directly at the first install (through Manager or recovery **NOTE!** Upon detecting the file, the module installation/boot script will load the configured values into the module and then delete the the configuration file, so keep a copy somewhere if you want to use the same settings later. ### Setting up the module on a clean Magisk/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. First flash the ROM and Magisk. After that you can place the configuration file (see above) with your desired settings (fingerprint, custom props, etc) in the root of your internal storage (/sdcard), /data or /cache (or /data/cache if you're using an A/B device) and then install the module. This will set the module up just as you want it without having to do anything else. It is also possible to place the configuration file after having installed the module and rebooting (although you can only use /data or /cache as a location for the file, /sdcard will not be mounted in time). This will set everything up during boot, but 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. +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. First flash the ROM and Magisk. After that you can place the configuration file (see above) with your desired settings (fingerprint, custom props, etc) in the root of your internal storage (/sdcard), in /data or in /cache (or /data/cache if you're using an A/B device) and then install the module. This will set the module up just as you want it without having to do anything else. It is also possible to place the configuration file after having installed the module and rebooting. This will set everything up during boot, but 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 @@ -312,7 +307,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 -- EdXposed sometimes causes Magisk's boot process to fail, resulting in one or the other of the module boot scripts not running as they should. Until this has been fixed with EdXposed, there are a couple of ways to work around this. Use the [Configuration file](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#configuration-file) to set everything up during installation, or disable EdXposed before setting the module up and enable it again after the module works as you want it. Just make sure to use the default settings for boot stages. +- EdXposed sometimes causes Magisk's boot process to fail, resulting in the module boot scripts (mainly service.sh) not running as they should. Until this has been fixed with EdXposed, there are a couple of ways to work around this. Use the [Configuration file](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#configuration-file) to set everything up during installation, or disable EdXposed before setting the module up and enable it again after the module works as you want it. Just make sure to use the default settings for boot stages. ### Requires Magisk v19+ If the module won't install, with the message that Magisk v19+ is required, but you have Magisk v19+ installed, that means that your Magisk installation is broken. It's likely that you did not update properly (always update directly from the Manager) from a previous Magisk version (or something along those lines) and core parts of Magisk are still from an old install. The solution is to do a reinstallation by using "Direct install" in the Magisk Manager. If you for some reason can't do a direct install you're likely going to have to uninstall Magisk and start over. @@ -321,7 +316,6 @@ If the module won't install, with the message that Magisk v19+ is required, but A couple of the options in the `props` script will be automatically disabled in some circumstances. These are: - _"Edit device fingerprint"_ will be disabled if another Magisk module that is known to also edit the device fingerprint is installed. - _"Device simulation"_ will be disabled if there is no device fingerprint set by the module. -- _"Improved hiding"_ will be disable if all relevant prop values already are "safe" (in other words: the option isn't needed), or if a conflicting module that also Magic Mounts build.prop is found. ### I can't pass the ctsProfile check See ["I still can't pass the ctsProfile check"](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#i-still-cant-pass-the-ctsprofile-check) above. @@ -342,9 +336,11 @@ A common reason for issues with booting the device or with system apps force clo 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. -Place a file named `reset_mhpc` in /cache (or /data/cache on A/B devices) and reboot. +Place a file named `reset_mhpc` in the root of your internal storage (/sdcard), in /data or in /cache (or /data/cache if you're using an A/B device) and reboot. -It is possible to use this in combination with the [configuration file](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#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. +If your device does not have access to /sdcard, /data or /cache through recovery (there's no custom recovery available), you can disable Magisk by flashing a stock boot image, boot up the device, place the reset file in the root of your internal storage, and lastly reinstall Magisk by flashing a patched boot image again. At the next boot the module will be reset and you should be up and running again. + +The reset file can be use this in combination with the [configuration file](https://github.com/Magisk-Modules-Repo/MagiskHide-Props-Config/blob/master/README.md#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. ### The Play Store is "uncertified" If your device's Play Store reports that the device is "uncertified", this is usually fixed by making sure that you pass SafetyNet and then clearing data for the Play Store (and possibly rebooting). More details in the [Magisk troubleshooting guide](https://www.didgeridoohan.com/magisk/MagiskHide#hn_Device_uncertified_in_Play_storeNetflix_and_other_apps_wont_install_or_doesnt_show_up). @@ -357,7 +353,7 @@ The logs will also automatically be saved to the root of the device's internal s If there are issues with other apps or your system as a result of using this module, a logcat/recovery log/etc showing the issue will most likely be necessary. Take a look in my [Magisk troubleshooting guide](https://www.didgeridoohan.com/magisk/MagiskHelp) for guidance on that. ### Collecting logs manually -If you can't run the `props` script for some reason, the logs are also stored in /cache (or /data/cache for A/B devices). The Magisk log and any files starting with "propsconf" would be useful for troubleshooting (if you don't, or can't, use the "Collect logs" option mentioned above). Providing the output from terminal might also be useful. +If you can't run the `props` script for some reason, the logs are also stored in /data/adb/mhpc. The Magisk log and any files starting with "propsconf" would be useful for troubleshooting (if you don't, or can't, use the "Collect logs" option mentioned above). Providing the output from terminal might also be useful. ## Donations @@ -371,6 +367,7 @@ If you've had any help from me or this module, any kind of [donation](https://fo ## Credits @topjohnwu @ XDA Developers, for Magisk @Zackptg5, @veez21 and @jenslody @ XDA Developers, for help and inspiration +@ipdev, for being always helpful and bringing tons of fingerprints to the module list ## Previous releases @@ -379,9 +376,25 @@ Any previous releases can be found on [GitHub](https://github.com/Magisk-Modules Releases up until v2.4.0 are compatible with Magisk v15 to v16.7. Releases from v2.4.1 are compatible with Magisk v17+. Releases from v4.0.0 are compatible with Magisk v19+. - +Releases from v5.0.0 are recommended for Magisk v19.4+. ## Changelog +### v5.0.0 +- Updated possible locations for both the configuration and reset files (can now be placed in the root of internal storage, in /data or in /cache). +- Updated device simulation so that all props now are disabled by default. Should hopefully make a few less careless users experience issues caused by the feature. NOTE! All simulation prop values will be disabled with this update. If you did have basic simulation enabled prior to the update, you have to manually enable it again. +- Updated device simulation and added ro.build.display.id. +- Updated reboot function. +- Fixed a bug with the reset file (reset_mhpc) where system.prop would not be reset. +- Fixed the setting of fingerprint props so that props that aren't already present on the device won't be set. +- Fixed a bug where too similar custom props could not be set. +- Fixed removal of old settings file on a fresh install. +- Fixed possible issues with retrieving default file values on some devices/ROMs. +- Fixed an issue where colours and clearing of the screen between menus don't work on Magisk v19.4+. Credits to @veez21 for the fix. +- Stopped using /cache for logs and other module files. New location is /data/adb/mhpc. See the documentation for details. +- Removed the "Improved root hiding" feature. It is most likely just placebo, but more importantly will also mount the system partition as rw on SAR devices. Big no-no... Might make a reworked reapperance in the future. +- Slight tweaks to the ui and on-screen instructions, for (hopefully) better clarity and understanding. +- Updated fingerprints for Asus Zenfone 6, Essential PH-1, Google Pixel 1-3a (regular and XL) and Pixel C, Huawei Mate 20 Pro, Motorola Moto G5S, OnePlus 5, 5T, 6T and 7 Pro, Samsung Galaxy A5 2017, Xiaomi Mi A2, Pocophone F1, Redmi 5A, Redmi K20 Pro, Redmi Note 5 Pro and Redmi Note 7. Added prints for Asus Zenfone 3 Max, Nokia 6.1 Plus, OnePlus One, Walmart Onn 8, Xiaomi Mi 9 Lite, Mi 9T, Mi A3, Redmi 4A and Redmi Note 4 Mediatek. Removed fingerprint for the LG G6 H872. List updated to v64. + ### v4.0.3 - Tiny bugfix release. A couple of messed up variables restored to their full glory. - Updated fingerprint for the Xiaomi Redmi Note 5/5 Plus. List at v55. @@ -643,17 +656,18 @@ Releases from v4.0.0 are compatible with Magisk v19+. ## Current fingerprints list -### List v63 +### List v64 - Asus Zenfone 2 Laser (6.0.1) +- Asus Zenfone 3 Max (7.1.1 & 8.1.0) - Asus Zenfone 4 Max (7.1.1) - Asus ZenFone 5Z (9) -- Asus Zenfone 6 (9.0) +- Asus Zenfone 6 (9) - Asus Zenfone Max M1 (8.0.0) - Asus Zenfone Max Pro M1 (8.1.0) - Asus ZenPad S 8.0 (6.0.1) - BLU R1 HD 2018 (7.0) - Elephone U Pro (8.0.0) -- Essential PH-1 (9) +- Essential PH-1 (9 & 10) - Google Nexus 4 (5.1.1) - Google Nexus 5 (6.0.1) - Google Nexus 5X (8.1.0) @@ -667,14 +681,14 @@ Releases from v4.0.0 are compatible with Magisk v19+. - Google Nexus 9 LTE (7.1.1) - Google Nexus 10 (5.1.1) - Google Nexus Player (6.0.1) -- Google Pixel (8.1.0 & 9) -- Google Pixel XL (8.1.0 & 9) -- Google Pixel 2 (8.1.0 & 9) -- Google Pixel 2 XL (8.1.0 & 9) -- Google Pixel 3 (9) -- Google Pixel 3 XL (9) -- Google Pixel 3a (9) -- Google Pixel 3a XL (9) +- Google Pixel (8.1.0 & 9 & 10) +- Google Pixel XL (8.1.0 & 9 & 10) +- Google Pixel 2 (8.1.0 & 9 & 10) +- Google Pixel 2 XL (8.1.0 & 9 & 10) +- Google Pixel 3 (9 & 10) +- Google Pixel 3 XL (9 & 10) +- Google Pixel 3a (9 & 10) +- Google Pixel 3a XL (9 & 10) - Google Pixel C (8.1.0) - HTC 10 (6.0.1) - HTC U11 (8.0.0) @@ -700,7 +714,6 @@ Releases from v4.0.0 are compatible with Magisk v19+. - LG G5 H830 (8.0.0) - LG G5 RS988 (7.0) - LG G6 H870 (7.0 & 8.0.0) -- LG G6 H872 (8.0.0) - LG V20 H918 (8.0.0) - LG V20 H910 (8.0.0) - LG V20 H990DS (7.0) @@ -724,9 +737,11 @@ Releases from v4.0.0 are compatible with Magisk v19+. - Motorola Moto X4 (8.0.0) - Motorola Moto Z2 Play (8.0.0) - Nextbook Ares 8A (6.0.1) +- Nokia 6.1 Plus (9) - Nokia 7 Plus (9) - Nvidia Shield K1 (7.0) - Nvidia Shield Tablet (7.0) +- OnePlus One (6.0.1) - OnePlus 2 (6.0.1) - OnePlus X (6.0.1) - OnePlus 3 (8.0.0 & 9) @@ -737,7 +752,7 @@ Releases from v4.0.0 are compatible with Magisk v19+. - OnePlus 6T (9) - OnePlus 7 GM1901/GM1905 (9) - OnePlus 7 GM1903 (9) -- OnePlus 7 Pro GM1911/GM1917 (9) +- OnePlus 7 Pro GM1911/GM1917 (9 & 10) - OnePlus 7 Pro GM1913 (9) - OnePlus 7 Pro NR GM1920 (9) - OPPO Neo 7 A33w (5.1) @@ -806,6 +821,7 @@ Releases from v4.0.0 are compatible with Magisk v19+. - Sony Xperia Z5 Premium (7.1.1) - Sony Xperia Z5 Premium Dual (7.1.1) - Vodafone Smart Ultra 6 (5.1.1) +- Walmart Onn 8 (9) - Xiaomi Mi 3/4 (6.0.1) - Xiaomi Mi 4C (7.0) - Xiaomi Mi 5/5 Pro (7.0 & 8.0.0) @@ -814,9 +830,12 @@ Releases from v4.0.0 are compatible with Magisk v19+. - Xiaomi Mi 6 (8.0.0) - Xiaomi Mi 8 (8.1.0 & 9) - Xiaomi Mi 9 (9) +- Xiaomi Mi 9 Lite (9) +- Xiaomi Mi 9T (9) - Xiaomi Mi A1 (8.0.0 & 9) - Xiaomi Mi A2 (8.1.0 & 9) - Xiaomi Mi A2 Lite (9) +- Xiaomi Mi A3 (9) - Xiaomi Mi Max (6.0.1) - Xiaomi Mi Max 2 (7.1.1) - Xiaomi Mi Max 3 (9) @@ -830,14 +849,16 @@ Releases from v4.0.0 are compatible with Magisk v19+. - Xiaomi Redmi 3/3 Pro (5.1.1) - Xiaomi Redmi 3S/X Prime (6.0.1) - Xiaomi Redmi 4 Prime (6.0.1) +- Xiaomi Redmi 4A (7.1.2) - Xiaomi Redmi 4X (6.0.1) -- Xiaomi Redmi 5A (7.1.2) +- Xiaomi Redmi 5A (7.1.2 & 8.1.0) - Xiaomi Redmi Go (8.1.0) -- Xiaomi Redmi K20 Pro (9) +- Xiaomi Redmi K20 Pro (9 & 10) - Xiaomi Redmi Note 2 (5.0.2) - 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 4 Mediatek (6.0) - Xiaomi Redmi Note 5/5 Plus (7.1.2 & 8.1.0) - Xiaomi Redmi Note 5 Pro (8.1.0 & 9) - Xiaomi Redmi Note 5A Lite (7.1.2) diff --git a/common/post-fs-data.sh b/common/post-fs-data.sh index 32adcc3..6f38cb3 100644 --- a/common/post-fs-data.sh +++ b/common/post-fs-data.sh @@ -10,9 +10,6 @@ BOOTSTAGE="post" # Load functions . $MODPATH/util_functions.sh -# Variables -MODULESPATH=$(dirname "$MODPATH") - # Start logging log_start bb_check @@ -33,16 +30,26 @@ if [ "$PRINTCHK" == 1 ]; then fi # Check for the boot script and restore backup if deleted, or if the resetfile is present +RESETFILE="" +for ITEM in $RESETFILELST; do + if [ -f "$ITEM" ]; then + RESETFILE="$ITEM" + break + fi +done if [ ! -f "$LATEFILE" ] || [ -f "$RESETFILE" ]; then if [ -f "$RESETFILE" ]; then RSTTXT="Resetting" - rm -f $RESETFILE + for ITEM in $RESETFILELST; do + rm -f $ITEM + done else RSTTXT="Restoring" log_handler "The module settings file could not be found." fi log_handler "$RSTTXT module settings file (${LATEFILE})." cp -af $MODPATH/propsconf_late $LATEFILE >> $LOGFILE 2>&1 + rm -f $MODPATH/system.prop >> $LOGFILE 2>&1 fi # Checks for the Universal SafetyNet Fix module and similar modules editing the device fingerprint @@ -65,38 +72,12 @@ else replace_fn PRINTMODULE 1 0 $LATEFILE fi -# Get default values -log_handler "Checking device default values." +# Save default values +log_handler "Saving device prop values." +resetprop > $MHPCPATH/defaultprops +log_handler "Prop values saved to $MHPCPATH/defaultprops." -# Save default file values in propsconf_late -for ITEM in $VALPROPSLIST; do - TMPPROP=$(get_prop_type $ITEM | tr '[:lower:]' '[:upper:]') - ORIGPROP="ORIG${TMPPROP}" - ORIGTMP="$(get_file_value $LATEFILE "${ORIGPROP}=")" - CURRPROP="CURR${TMPPROP}" - CURRTMP="$(resetprop $ITEM)" - replace_fn $ORIGPROP "\"$ORIGTMP\"" "\"$CURRTMP\"" $LATEFILE -done -log_handler "Default values saved to $LATEFILE." - -# Check if default file values are safe -replace_fn FILESAFE 0 1 $LATEFILE -for V in $PROPSLIST; do - FILEVALUE=$(resetprop $V) - log_handler "Checking ${V}=${FILEVALUE}" - safe_props $V $FILEVALUE - if [ "$SAFE" == 0 ]; then - echo "Prop $V set to triggering value in prop file." >> $LOGFILE 2>&1 - replace_fn FILESAFE 1 0 $LATEFILE - else - if [ -z "$FILEVALUE" ]; then - echo "Could not retrieve value for prop $V." >> $LOGFILE 2>&1 - elif [ "$SAFE" == 1 ]; then - echo "Prop $V set to \"safe\" value in prop file." >> $LOGFILE 2>&1 - fi - fi -done -# Loading the new values +# Loading module settings . $LATEFILE # Checks for configuration file @@ -139,54 +120,6 @@ custom_edit "CUSTOMPROPSPOST" prop_del echo -e "\n----------------------------------------" >> $LOGFILE 2>&1 -# Edits build.prop -if [ "$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 $MODULESPATH); do - if [ $D != "$MODID" ]; then - if [ -f "$MODULESPATH/$D/system/build.prop" ] || [ "$D" == "safetypatcher" ]; then - if [ ! -f "$MODULESPATH/$D/disable" ]; then - NAME=$(get_file_value $MODULESPATH/$D/module.prop "name=") - log_handler "Conflicting build.prop editing in module '$NAME'." - BUILDMODULE=true - fi - 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 [ "$BUILDPROPENB" == 1 ] && [ "$BUILDEDIT" == 1 ]; then - log_handler "Stock build.prop copied to module." - cp -af $MIRRORLOC/build.prop $MODPATH/system/build.prop >> $LOGFILE 2>&1 - - # Edits the module copy of build.prop - log_handler "Editing build.prop." - # ro.build props - change_prop_file "build" - # Fingerprint - if [ "$MODULEFINGERPRINT" ] && [ "$SETFINGERPRINT" == "true" ] && [ "$FINGERPRINTENB" == 1 ]; then - PRINTSTMP="$(grep "$ORIGFINGERPRINT" $MIRRORLOC/build.prop)" - for ITEM in $PRINTSTMP; do - replace_fn $(get_eq_left "$ITEM") $(get_eq_right "$ITEM") $(echo $MODULEFINGERPRINT | sed 's|\_\_.*||') $MODPATH/system/build.prop && log_handler "$(get_eq_left "$ITEM")=$(echo $MODULEFINGERPRINT | sed 's|\_\_.*||')" - 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 "Prop file editing disabled. All values ok." -fi - log_script_chk "post-fs-data.sh module script finished.\n\n====================" # Deletes the post-fs-data control file diff --git a/common/prints.sh b/common/prints.sh index 1ef782b..32af02a 100644 --- a/common/prints.sh +++ b/common/prints.sh @@ -4,21 +4,22 @@ # Copyright (c) 2018-2019 Didgeridoohan @ XDA Developers # Licence: MIT -PRINTSV=63 +PRINTSV=64 PRINTSTRANSF=350 # 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.2196_20180308:user/release-keys +Asus Zenfone 3 Max (7.1.1 & 8.1.0)=asus/WW_Phone/ASUS_X00DD:7.1.1/NMF26F/14.0200.1712.347-20171214:user/release-keys;asus/WW_Phone/ASUS_X00DD:8.1.0/OPM1.171019.011/15.0200.1812.503-0:user/release-keys__2018-12-05 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 ZenFone 5Z (9)=asus/WW_Z01RD/ASUS_Z01R_1:9/PPR1.180610.009/WW_90.11.162.72_20190531:user/release-keys__2019-05-01 -Asus Zenfone 6 (9.0)=asus/WW_I01WD/ASUS_I01WD:9/PPR2.181005.003/16.1210.1906.156-0:user/release-keys__2019-06-01 +Asus Zenfone 6 (9)=asus/WW_I01WD/ASUS_I01WD:9/PPR2.181005.003/16.1220.1909.193-0:user/release-keys__2019-09-01 Asus Zenfone Max M1 (8.0.0)=asus/WW_X00PD/ASUS_X00P_4:8.0.0/OPR1.170623.032/15.00.1907.103:user/release-keys__2019-07-05 Asus Zenfone Max Pro M1 (8.1.0)=asus/RU_X00TD/ASUS_X00T_6:8.1.0/OPM1/15.2016.1902.340-20190216:user/release-keys__2019-02-01 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 BLU R1 HD 2018 (7.0)=BLU/BLU_S1/S0320WW:7.0/NRD90M/1514191903:user/release-keys Elephone U Pro (8.0.0)=Elephone/U_Pro/U_Pro:8.0.0/Elephone_U_Pro_20180917/09172123:user/release-keys__2018-09-05 -Essential PH-1 (9)=essential/mata/mata:9/PQ1A.190105.112/550:user/release-keys__2019-08-05 +Essential PH-1 (9 & 10)=essential/mata/mata:9/PQ1A.190105.112/550:user/release-keys__2019-08-05;essential/mata/mata:10/QP1A.190711.148/446:user/release-keys__2019-10-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 5X (8.1.0)=google/bullhead/bullhead:8.1.0/OPM7.181205.001/5080180:user/release-keys__2018-12-05 @@ -32,15 +33,15 @@ Google Nexus 9 WiFi (7.1.1)=google/volantis/flounder:7.1.1/N9F27M/4333998:user/r Google Nexus 9 LTE (7.1.1)=google/volantisg/flounder_lte:7.1.1/N4F27P/4333386:user/release-keys Google Nexus 10 (5.1.1)=google/mantaray/manta:5.1.1/LMY49J/2640980:user/release-keys Google Nexus Player (6.0.1)=google/fugu/fugu:6.0.1/MMB29U/2495654:user/release-keys -Google Pixel (8.1.0 & 9)=google/sailfish/sailfish:8.1.0/OPM2.171019.029/4657601:user/release-keys;google/sailfish/sailfish:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01 -Google Pixel XL (8.1.0 & 9)=google/marlin/marlin:8.1.0/OPM2.171019.029/4657601:user/release-keys;google/marlin/marlin:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01 -Google Pixel 2 (8.1.0 & 9)=google/walleye/walleye:8.1.0/OPM2.171019.029/4657601:user/release-keys;google/walleye/walleye:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01 -Google Pixel 2 XL (8.1.0 & 9)=google/taimen/taimen:8.1.0/OPM4.171019.016.B1/4720843:user/release-keys;google/taimen/taimen:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01 -Google Pixel 3 (9)=google/blueline/blueline:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01 -Google Pixel 3 XL (9)=google/crosshatch/crosshatch:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01 -Google Pixel 3a (9)=google/sargo/sargo:9/PQ3B.190801.002/5674421:user/release-keys__2019-08-01 -Google Pixel 3a XL (9)=google/bonito/bonito:9/PQ3B.190801.002/5674421:user/release-keys__2019-08-01 -Google Pixel C (8.1.0)=google/ryu/dragon:8.1.0/OPM8.190605.003/5524042:user/release-keys__2019-06-05 +Google Pixel (8.1.0 & 9 & 10)=google/sailfish/sailfish:8.1.0/OPM2.171019.029/4657601:user/release-keys;google/sailfish/sailfish:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01;google/sailfish/sailfish:10/QP1A.191005.007.A1/5908163:user/release-keys__2019-10-06 +Google Pixel XL (8.1.0 & 9 & 10)=google/marlin/marlin:8.1.0/OPM2.171019.029/4657601:user/release-keys;google/marlin/marlin:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01;google/marlin/marlin:10/QP1A.191005.007.A1/5908163:user/release-keys__2019-10-06 +Google Pixel 2 (8.1.0 & 9 & 10)=google/walleye/walleye:8.1.0/OPM2.171019.029/4657601:user/release-keys;google/walleye/walleye:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01;google/walleye/walleye:10/QP1A.191005.007.A1/5908163:user/release-keys__2019-10-06 +Google Pixel 2 XL (8.1.0 & 9 & 10)=google/taimen/taimen:8.1.0/OPM4.171019.016.B1/4720843:user/release-keys;google/taimen/taimen:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01;google/taimen/taimen:10/QP1A.191005.007.A1/5908163:user/release-keys__2019-10-06 +Google Pixel 3 (9 & 10)=google/blueline/blueline:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01;google/blueline/blueline:10/QP1A.191005.007/5878874:user/release-keys__2019-10-05 +Google Pixel 3 XL (9 & 10)=google/crosshatch/crosshatch:9/PQ3A.190801.002/5670241:user/release-keys__2019-08-01;google/crosshatch/crosshatch:10/QP1A.191005.007/5878874:user/release-keys__2019-10-05 +Google Pixel 3a (9 & 10)=google/sargo/sargo:9/PQ3B.190801.002/5674421:user/release-keys__2019-08-01;google/sargo/sargo:10/QP1A.191005.007/5878874:user/release-keys__2019-10-05 +Google Pixel 3a XL (9 & 10)=google/bonito/bonito:9/PQ3B.190801.002/5674421:user/release-keys__2019-08-01;google/bonito/bonito:10/QP1A.191005.007/5878874:user/release-keys__2019-10-05 +Google Pixel C (8.1.0)=google/ryu/dragon:8.1.0/OPM8.190605.005/5749003:user/release-keys__2019-06-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 HTC U12 Plus (8.0.0)=htc/imeuhl_00617/htc_imeuhl:8.0.0/OPR1.170623.032/1041457.3:user/release-keys__2018-06-01 @@ -49,7 +50,7 @@ Huawei Honor 8X (8.1.0)=HONOR/JSN-L21RU/HWJSN-H:8.1.0/HONORJSN-L21/101(C10):user Huawei Honor 9 (8.0.0 & 9)=HONOR/STF-L09/HWSTF:8.0.0/HUAWEISTF-L09/364(C432):user/release-keys;HONOR/STF-L09/HWSTF:9/HUAWEISTF-L09/157C432R1:user/release-keys__2019-02-01 Huawei Mate 10 (8.0.0)=HUAWEI/ALP-L29/HWALP:8.0.0/HUAWEIALP-L29S/143(C636):user/release-keys__2018-10-01 Huawei Mate 10 Pro (8.0.0)=HUAWEI/BLA-L29/HWBLA:8.0.0/HUAWEIBLA-L29S/137(C432):user/release-keys -Huawei Mate 20 Pro (9)=HUAWEI/LYA-L29/HWLYA:9/HUAWEILYA-L29/310C432:user/release-keys__2019-07-05 +Huawei Mate 20 Pro (9)=HUAWEI/LYA-L29/HWLYA:9/HUAWEILYA-L29/320C432:user/release-keys__2019-08-01 Huawei P8 Lite (8.0.0)=HUAWEI/PRA-LX1/HWPRA-H:8.0.0/HUAWEIPRA-LX1/401(C432):user/release-keys__2019-01-01 Huawei P9 (7.0)=HUAWEI/EVA-L09/HWEVA:7.0/HUAWEIEVA-L09/C432B502:user/release-keys Huawei P9 Lite (7.0)=HUAWEI/VNS-L31/HWVNS-H:7.0/HUAWEIVNS-L31/C432B414:user/release-keys__2018-06-01 @@ -65,7 +66,6 @@ LG G5 H850 (8.0.0)=lge/h1_global_com/h1:8.0.0/OPR1.170623.032/190380127377a:user LG G5 H830 (8.0.0)=lge/h1_tmo_us/h1:8.0.0/OPR1.170623.032/182251913485f:user/release-keys__2018-08-01 LG G5 RS988 (7.0)=lge/h1_lra_us/h1:7.0/NRD90U/1707917149a1b:user/release-keys LG G6 H870 (7.0 & 8.0.0)=lge/lucye_global_com/lucye:7.0/NRD90U/171732341982c:user/release-keys;lge/lucye_global_com/lucye:8.0.0/OPR1.170623.032/183301757502c:user/release-keys__2018-11-01 -LG G6 H872 (8.0.0)=lge/lucye_tmo_us/lucye:8.0.0/OPR1.170623.032/183621644ce05:user/release-keys__2019_01-01 LG V20 H918 (8.0.0)=lge/elsa_tmo_us/elsa:8.0.0/OPR1.170623.032/1831917495b33:user/release-keys__2018-11-01 LG V20 H910 (8.0.0)=lge/elsa_att_us/elsa:8.0.0/OPR1.170623.032/181871124f959:user/release-keys__2018-06-01 LG V20 H990DS (7.0)=lge/elsa_global_com/elsa:7.0/NRD90M/1801800193678:user/release-keys @@ -82,27 +82,29 @@ Motorola Moto E5 Plus (8.0.0)=motorola/hannah_sprint/hannah:8.0.0/OCPS27.91-32-4 Motorola Moto G4 (7.0 & 8.1.0)=motorola/athene/athene:7.0/NPJS25.93-14-13/3:user/release-keys;motorola/athene/athene:8.1.0/OPJ28.111-22/532da:user/release-keys__2018-12-01 Motorola Moto G5 (7.0)=motorola/cedric/cedric:7.0/NPPS25.137-15-11/11:user/release-keys Motorola Moto G5 Plus (7.0)=motorola/potter_n/potter_n:7.0/NPNS25.137-33-11/11:user/release-keys -Motorola Moto G5S (7.1.1 & 8.1.0)=motorola/montana/montana:7.1.1/NPPS26.102-49-8/6:user/release-keys;motorola/montana/montana:8.1.0/OPPS28.65-37-7-4/1dd5:user/release-keys__2019-02-01 +Motorola Moto G5S (7.1.1 & 8.1.0)=motorola/montana/montana:7.1.1/NPPS26.102-49-8/6:user/release-keys;motorola/montana/montana:8.1.0/OPPS28.65-37-7-11/7f8a6:user/release-keys__2019-08-01 Motorola Moto G6 (9)=motorola/ali/ali:9/PPS29.55-34/0c5d:user/release-keys__2019-02-01 Motorola Moto G6 Play (8.0.0 & 9)=motorola/jeter_sprint/jeter:8.0.0/OCP27.91-23/23:user/release-keys;motorola/aljeter/aljeter:9/PPP29.55-25/08c6:user/release-keys__2019-01-01 Motorola Moto G6 Plus (9)=motorola/evert_amx_n/evert_n:9/PPWS29.116-16-6/5cbfe:user/release-keys__2019-05-01 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 Nextbook Ares 8A (6.0.1)=NextBook/NX16A8116K/NX16A8116K:6.0.1/MMB29M/V4.0.3:user/release-keys +Nokia 6.1 Plus (9)=Nokia/Dragon_00WW/DRG_sprout:9/PPR1.180610.011/00WW_3_54J:user/release-keys__2019-08-01 Nokia 7 Plus (9)=Nokia/Onyx_00WW/B2N_sprout:9/PPR1.180610.011/00WW_3_53B:user/release-keys__2019-05-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 One (6.0.1)=oneplus/bacon/A0001:6.0.1/MMB29X/ZNH0EAS2JK:user/release-keys OnePlus 2 (6.0.1)=OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447858500:user/release-keys OnePlus X (6.0.1)=OnePlus/OnePlus/OnePlus:6.0.1/MMB29M/10281213:user/release-keys OnePlus 3 (8.0.0 & 9)=OnePlus/OnePlus3/OnePlus3:8.0.0/OPR1.170623.032/1809142047:user/release-keys__2018-09-01;OnePlus/OnePlus3/OnePlus3:9/PKQ1.181203.001/1907311932:user/release-keys__2019-08-01 OnePlus 3T (8.0.0 & 9)=OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR1.170623.032/1812060016:user/release-keys__2018-11-01;OnePlus/OnePlus3/OnePlus3T:9/PKQ1.181203.001/1907311932:user/release-keys__2019-08-01 -OnePlus 5 (8.1.0 & 9)=OnePlus/OnePlus5/OnePlus5:8.1.0/OPM1.171019.011/1809241512:user/release-keys__2018-09-01;OnePlus/OnePlus5/OnePlus5:9/PKQ1.180716.001/1907311824:user/release-keys__2019-08-01 -OnePlus 5T (8.1.0 & 9)=OnePlus/OnePlus5T/OnePlus5T:8.1.0/OPM1.171019.011/1809241512:user/release-keys__2018-09-01;OnePlus/OnePlus5T/OnePlus5T:9/PKQ1.180716.001/1907311828:user/release-keys__2019-08-01 +OnePlus 5 (8.1.0 & 9)=OnePlus/OnePlus5/OnePlus5:8.1.0/OPM1.171019.011/1809241512:user/release-keys__2018-09-01;OnePlus/OnePlus5/OnePlus5:9/PKQ1.180716.001/1910081949:user/release-keys__2019-10-01 +OnePlus 5T (8.1.0 & 9)=OnePlus/OnePlus5T/OnePlus5T:8.1.0/OPM1.171019.011/1809241512:user/release-keys__2018-09-01;OnePlus/OnePlus5T/OnePlus5T:9/PKQ1.180716.001/1910081948:user/release-keys__2019-10-01 OnePlus 6 (8.1.0 & 9)=OnePlus/OnePlus6/OnePlus6:8.1.0/OPM1.171019.011/06140300:user/release-keys;OnePlus/OnePlus6/OnePlus6:9/PKQ1.180716.001/1908012000:user/release-keys__2019-08-01 -OnePlus 6T (9)=OnePlus/OnePlus6T/OnePlus6T:9/PKQ1.180716.001/1908012000:user/release-keys__2019-08-01 +OnePlus 6T (9)=OnePlus/OnePlus6T/OnePlus6T:9/PKQ1.180716.001/1909112330:user/release-keys__2019-08-01 OnePlus 7 GM1901/GM1905 (9)=OnePlus/OnePlus7/OnePlus7:9/PKQ1.190110.001/1907280700:user/release-keys__2019-08-01 OnePlus 7 GM1903 (9)=OnePlus/OnePlus7_EEA/OnePlus7:9/PKQ1.190110.001/1907280700:user/release-keys__2019-08-01 -OnePlus 7 Pro GM1911/GM1917 (9)=OnePlus/OnePlus7Pro/OnePlus7Pro:9/PKQ1.190110.001/1907281556:user/release-keys__2019-08-01 +OnePlus 7 Pro GM1911/GM1917 (9 & 10)=OnePlus/OnePlus7Pro/OnePlus7Pro:9/PKQ1.190110.001/1907281556:user/release-keys__2019-08-01;OnePlus/OnePlus7Pro/OnePlus7Pro:10/QKQ1.190716.003/1909010630:user/release-keys__2019-09-05 OnePlus 7 Pro GM1913 (9)=OnePlus/OnePlus7Pro_EEA/OnePlus7Pro:9/PKQ1.190110.001/1907281556:user/release-keys__2019-08-01 OnePlus 7 Pro NR GM1920 (9)=OnePlus/OnePlus7ProNR_EEA/OnePlus7ProNR:9/PKQ1.190223.001/1907280803:user/release-keys__2019-06-01 OPPO Neo 7 A33w (5.1)=OPPO/A33w/A33w:5.1/LMY47I/1487829433:user/release-keys @@ -110,7 +112,7 @@ OPPO Neo 7 A1603 (5.1)=OPPO/A1603/A1603:5.1/LMY47I/1489407760:user/release-keys Razer Phone (8.1.0)=razer/cheryl/cheryl:8.1.0/OPM1.171019.011-RZR-180803/6033:user/release-keys__2018-07-05 Razer Phone 2 (8.1.0)=razer/cheryl2/aura:8.1.0/O-MR2-RC009-RZR-181124/2009:user/release-keys__2018-10-05 Samsung Galaxy A5 2015 (6.0.1)=samsung/a5ultexx/a5ulte:6.0.1/MMB29M/A500FUXXU1CPH3:user/release-keys -Samsung Galaxy A5 2017 (8.0.0)=samsung/a5y17ltexx/a5y17lte:8.0.0/R16NW/A520FXXU4CRE8:user/release-keys__2018-05-01 +Samsung Galaxy A5 2017 (8.0.0)=samsung/a5y17ltexx/a5y17lte:8.0.0/R16NW/A520FXXUBCSI1:user/release-keys__2019-09-01 Samsung Galaxy A6 Plus (9)=samsung/a6pltedx/a6plte:9/PPR1.180610.011/A605GDXU3BSC6:user/release-keys__2019-03-01 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 @@ -171,6 +173,7 @@ Sony Xperia Z5 Dual (7.1.1)=Sony/E6633/E6633:7.1.1/32.4.A.1.54/3761073091:user/r Sony Xperia Z5 Premium (7.1.1)=Sony/E6853/E6853:7.1.1/32.4.A.1.54/3761073091:user/release-keys Sony Xperia Z5 Premium Dual (7.1.1)=Sony/E6883/E6883: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 +Walmart Onn 8 (9)=onn/ONA19TB002/ONA19TB002:9/PPR1.180610.011/1551232410:user/release-keys__2019-01-05 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.6.2.0.NXKCNFD:user/release-keys Xiaomi Mi 5/5 Pro (7.0 & 8.0.0)=Xiaomi/gemini/gemini:7.0/NRD90M/V9.2.1.0.NAAMIEK:user/release-keys;Xiaomi/gemini/gemini:8.0.0/OPR1.170623.032/V9.6.1.0.OAAMIFD:user/release-keys @@ -179,9 +182,12 @@ Xiaomi Mi 5S Plus (6.0.1 & 7.0)=Xiaomi/natrium/natrium:6.0.1/MXB48T/V8.5.2.0.MBG Xiaomi Mi 6 (8.0.0)=Xiaomi/sagit/sagit:8.0.0/OPR1.170623.027/V9.2.3.0.OCAMIEK:user/release-keys Xiaomi Mi 8 (8.1.0 & 9)=Xiaomi/dipper/dipper:8.1.0/OPM1.171019.011/V9.5.5.0.OEAMIFA:user/release-keys;Xiaomi/dipper/dipper:9/PKQ1.180729.001/V10.2.3.0.PEAMIXM:user/release-keys__2019-02-01 Xiaomi Mi 9 (9)=Xiaomi/cepheus_eea/cepheus:9/PKQ1.181121.001/V10.2.27.0.PFAEUXM:user/release-keys__2019-06-01 +Xiaomi Mi 9 Lite (9)=Xiaomi/pyxis/pyxis:9/PKQ1.181121.001/V10.3.1.0.PFCMIXM:user/release-keys__2019-08-01 +Xiaomi Mi 9T (9)=Xiaomi/davinci_eea/davinci:9/PKQ1.190302.001/V10.3.12.0.PFJEUXM:user/release-keys__2019-07-01 Xiaomi Mi A1 (8.0.0 & 9)=xiaomi/tissot/tissot_sprout:8.0.0/OPR1.170623.026/V.9.5.10.0.ODHMIFA:user/release-keys;xiaomi/tissot/tissot_sprout:9/PKQ1.180917.001/V10.0.4.0.PDHMIXM:user/release-keys__2019-01-05 -Xiaomi Mi A2 (8.1.0 & 9)=xiaomi/jasmine/jasmine_sprout:8.1.0/OPM1.171019.011/V9.6.16.0.ODIMIFE:user/release-keys__2018-11-05;xiaomi/jasmine/jasmine_sprout:9/PKQ1.180904.001/V10.0.7.0.PDIMIXM:user/release-keys__2019-03-05 +Xiaomi Mi A2 (8.1.0 & 9)=xiaomi/jasmine/jasmine_sprout:8.1.0/OPM1.171019.011/V9.6.16.0.ODIMIFE:user/release-keys__2018-11-05;xiaomi/jasmine/jasmine_sprout:9/PKQ1.180904.001/V10.0.14.0.PDIMIXM:user/release-keys__2019-09-05 Xiaomi Mi A2 Lite (9)=xiaomi/daisy/daisy_sprout:9/PKQ1.180917.001/V10.0.1.0.PDLMIFJ:user/release-keys__2018-11-05 +Xiaomi Mi A3 (9)=Xiaomi/laurel_sprout/laurel_sprout:9/PKQ1.190416.001/V10.3.6.0.PFQMIXM:user/release-keys__2019-09-05 Xiaomi Mi Max (6.0.1)=Xiaomi/helium/helium:6.0.1/MMB29M/V8.2.3.0.MBDMIDL:user/release-keys Xiaomi Mi Max 2 (7.1.1)=Xiaomi/oxygen/oxygen:7.1.1/NMF26F/V9.5.4.0.NDDMIFA:user/release-keys Xiaomi Mi Max 3 (9)=Xiaomi/nitrogen/nitrogen:9/PKQ1.181007.001/V10.3.1.0.PEDMIXM:user/release-keys__2019-03-01 @@ -191,23 +197,25 @@ Xiaomi Mi Mix 3 (9)=Xiaomi/perseus/perseus:9/PKQ1.180729.001/V10.3.1.0.PEEMIXM:u Xiaomi Mi Note 2 (7.0 & 8.0.0)=Xiaomi/scorpio/scorpio:7.0/NRD90M/V9.2.1.0.NADMIEK:user/release-keys;Xiaomi/scorpio/scorpio:8.0.0/OPR1.170623.032/V9.6.1.0.OADCNFD:user/release-keys Xiaomi Mi Note 3 (8.1.0)=Xiaomi/jason/jason:8.1.0/OPM1.171019.019/V10.2.2.0.OCHMIXM:user/release-keys__2018-12-01 Xiaomi Mi Pad 4 (8.1.0)=Xiaomi/clover/clover:8.1.0/OPM1.171019.019/V10.1.1.0.ODJCNFI:user/release-keys__2018-10-01 -Xiaomi Pocophone F1 (9)=Xiaomi/beryllium/beryllium:9/PKQ1.180729.001/V10.3.6.0.PEJMIXM:user/release-keys__2019-06-01 +Xiaomi Pocophone F1 (9)=Xiaomi/beryllium/beryllium:9/PKQ1.180729.001/V11.0.5.0.PEJMIXM:user/release-keys__2019-10-01 Xiaomi Redmi 3/3 Pro (5.1.1)=Xiaomi/ido/ido:5.1.1/LMY47V/V9.6.2.0.LAIMIFD:user/release-keys Xiaomi Redmi 3S/X Prime (6.0.1)=Xiaomi/land/land:6.0.1/MMB29M/V9.5.1.0.MALMIFA:user/release-keys Xiaomi Redmi 4 Prime (6.0.1)=Xiaomi/markw/markw:6.0.1/MMB29M/V9.5.3.0.MBEMIFA:user/release-keys +Xiaomi Redmi 4A (7.1.2)=Xiaomi/rolex/rolex:7.1.2/N2G47H/V9.2.6.0.NCCMIEK: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 5A (7.1.2)=Xiaomi/riva/riva:7.1.2/N2G47H/V9.1.8.0.NCKMIEI:user/release-keys +Xiaomi Redmi 5A (7.1.2 & 8.1.0)=Xiaomi/riva/riva:7.1.2/N2G47H/V9.1.8.0.NCKMIEI:user/release-keys;Xiaomi/riva/riva:8.1.0/OPM1.171019.026/V10.3.2.0.OCKMIXM:user/release-keys__2019-06-01 Xiaomi Redmi Go (8.1.0)=Xiaomi/tiare/tiare:8.1.0/OPM1.171019.026/V10.2.6.0.OCLMIXM:user/release-keys__2019-01-01 -Xiaomi Redmi K20 Pro (9)=Xiaomi/raphael/raphael:9/PKQ1.181121.001/V10.3.14.0.PFKCNXM:user/release-keys__2019-06-01 +Xiaomi Redmi K20 Pro (9 & 10)=Xiaomi/raphael/raphael:9/PKQ1.181121.001/V10.3.14.0.PFKCNXM:user/release-keys__2019-06-01;Xiaomi/raphael/raphael:10/QKQ1.190716.003/V10.4.6.0.QFKCNXM:user/release-keys__2019-09-05 Xiaomi Redmi Note 2 (5.0.2)=Xiaomi/hermes/hermes:5.0.2/LRX22G/V9.2.4.0.LHMMIEK: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 4 Mediatek (6.0)=Xiaomi/nikel/nikel:6.0/MRA58K/V9.2.2.0.MBFMIEK:user/release-keys Xiaomi Redmi Note 5/5 Plus (7.1.2 & 8.1.0)=xiaomi/vince/vince:7.1.2/N2G47H/V9.5.4.0.NEGMIFA:user/release-keys;xiaomi/vince/vince:8.1.0/OPM1.171019.019/V10.2.1.0.OEGMIXM:user/release-keys__2019-03-01 -Xiaomi Redmi Note 5 Pro (8.1.0 & 9)=xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V10.0.6.0.OEIMIFH:user/release-keys__2018-11-01;xiaomi/whyred/whyred:9/PKQ1.180904.001/V10.3.1.0.PEIMIXM:user/release-keys__2019-05-05 +Xiaomi Redmi Note 5 Pro (8.1.0 & 9)=xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V10.0.6.0.OEIMIFH:user/release-keys__2018-11-01;xiaomi/whyred/whyred:9/PKQ1.180904.001/V10.3.2.0.PEIMIXM:user/release-keys__2019-08-05 Xiaomi Redmi Note 5A Lite (7.1.2)=xiaomi/ugglite/ugglite:7.1.2/N2G47H/V9.1.2.0.NDFMIEI:user/release-keys Xiaomi Redmi Note 6 Pro (8.1.0)=xiaomi/tulip/tulip:8.1.0/OPM1.171019.011/V10.0.5.0.OEKMIFH:user/release-keys__2018-10-01 -Xiaomi Redmi Note 7 (9)=xiaomi/lavender/lavender:9/PKQ1.180904.001/V10.2.7.0.PFGINXM:user/release-keys__2019-02-05 +Xiaomi Redmi Note 7 (9)=xiaomi/lavender/lavender:9/PKQ1.180904.001/V10.3.12.0.PFGMIXM:user/release-keys__2019-08-05 Xiaomi Redmi Y1 (7.1.2)=xiaomi/ugg/ugg:7.1.2/N2G47H/V9.6.2.0.NDKMIFD:user/release-keys__2018-07-01 ZTE Axon 7 (7.1.1 & 8.0.0)=ZTE/P996A01_N/ailsa_ii:7.1.1/NMF26V/20171211.005949:user/release-keys;ZTE/P996A01_O/ailsa_ii:8.0.0/OPR1.170623.032/20180815.171922:user/release-keys__2018-07-01 ZTE Blade (6.0.1)=ZTE/P809A50_MY_MAX/P809A50:6.0.1/MMB29M/20161017.095504:user/release-keys diff --git a/common/propsconf_conf b/common/propsconf_conf index 6d15b07..6270fc7 100644 --- a/common/propsconf_conf +++ b/common/propsconf_conf @@ -9,7 +9,7 @@ # ================================================================= # Required module version (or newer). Do not edit this value! -CONFTRANSF=351 +CONFTRANSF=500 # Device fingerprint CONFFINGERPRINT="" @@ -19,19 +19,17 @@ CONFPATCHBOOT=late # Device simulation CONFDEVSIM=false -CONFBRAND=true -CONFNAME=true -CONFDEVICE=true -CONFRELEASE=true -CONFID=true -CONFINCREMENTAL=true +CONFBRAND=false +CONFNAME=false +CONFDEVICE=false +CONFRELEASE=false +CONFID=false +CONFINCREMENTAL=false CONFDESCRIPTION=true -CONFSDK=true +CONFDISPLAY=false +CONFSDK=false CONFSIMBOOT=default -# Edit prop files -CONFPROPFILES=false - # MagiskHide sensitive props CONFDEBUGGABLE="" CONFSECURE="" @@ -104,8 +102,8 @@ CONFUPDATE=true # Keymaster 4 (bootloops). If the prop doesn't seem to set properly, try changing the stage. # CONFDEVSIM and the following CONFBRAND, CONFNAME, CONFDEVICE, CONFRELEASE -# CONFID, CONFINCREMENTAL, CONFDESCRIPTION and CONFSDK are used to set a number -# of props to simulate a certain deviced based on the fingerprint used. +# CONFID, CONFINCREMENTAL, CONFDESCRIPTION, CONFDISPLAY and CONFSDK are used to +# set a number of props to simulate a certain deviced based on the fingerprint used. # CONFDESCRIPTION will automatically be applied if a fingerprint is set # by the module, but the other props will only be set if CONFDEVSIM is # set to true, and the default setting for all props are that they will be @@ -117,9 +115,6 @@ CONFUPDATE=true # post-fs-data or late_start service mode. This is useful if props don't seem to set # propely or the module's boot script seems to be causing issues during boot. -# 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") diff --git a/common/propsconf_late b/common/propsconf_late index 445161c..e7b30ab 100644 --- a/common/propsconf_late +++ b/common/propsconf_late @@ -8,9 +8,9 @@ # In that case, feel free to delete it. # Script version -SCRIPTV=27 -SETTRANSF=2 -NOTTRANSF="" +SCRIPTV=28 +SETTRANSF=3 +NOTTRANSF="BRANDSET;NAMESET;DEVICESET;RELEASESET;IDSET;INCREMENTALSET;SDKSET" # Fingerprint FINGERPRINTENB=1 @@ -22,12 +22,6 @@ PRINTCHK=0 # Simulation DEVSIM=0 -# Prop files -BUILDPROPENB=1 -FILESAFE=1 -BUILDEDIT=0 -DEFAULTEDIT=0 - # Custom props PROPCOUNT=0 PROPEDIT=0 @@ -46,14 +40,15 @@ OPTIONWEB=1 OPTIONUPDATE=1 # Device simulation -BRANDSET=1 -NAMESET=1 -DEVICESET=1 -RELEASESET=1 -IDSET=1 -INCREMENTALSET=1 +BRANDSET=0 +NAMESET=0 +DEVICESET=0 +RELEASESET=0 +IDSET=0 +INCREMENTALSET=0 +SDKSET=0 DESCRIPTIONSET=1 -SDKSET=1 +DISPLAYSET=0 # Misc REBOOTCHK=0 @@ -80,6 +75,7 @@ ORIGRELEASE="" ORIGID="" ORIGINCREMENTAL="" ORIGDESCRIPTION="" +ORIGDISPLAY="" ORIGSDK="" # ---Module values--- @@ -98,6 +94,7 @@ SIMRELEASE="" SIMID="" SIMINCREMENTAL="" SIMDESCRIPTION="" +SIMDISPLAY="" SIMSDK="" # ---Custom prop values--- @@ -116,13 +113,3 @@ RESECURE=false RETYPE=false RETAGS=false RESELINUX=false - -# ---Editing default.prop--- -SETDEBUGGABLE=false -SETSECURE=false - -# ---Editing build.prop--- -SETTYPE=false -SETTAGS=false -SETSELINUX=false -SETFINGERPRINT=false diff --git a/common/service.sh b/common/service.sh index c7b5b6c..dd41407 100644 --- a/common/service.sh +++ b/common/service.sh @@ -18,6 +18,11 @@ fi log_script_chk "Running service.sh module script." +# Retrieving default values from props file +log_handler "Saving device default values." +default_save +log_handler "Default values saved to $LATEFILE." + # Edits prop values if set for late_start service echo -e "\n----------------------------------------" >> $LOGFILE 2>&1 log_handler "Editing prop values in late_start service mode." @@ -66,16 +71,6 @@ if [ "$PROPEDIT" == 1 ]; then fi echo -e "\n----------------------------------------" >> $LOGFILE 2>&1 -# ---Edits default.prop--- -if [ "$DEFAULTEDIT" == 1 ] && [ "$FILESAFE" == 0 ]; then - log_handler "Editing default.prop." - mount -wo remount rootfs / - change_prop_file "default" - mount -ro remount rootfs / -else - log_handler "Default.prop editing disabled." -fi - # Get currently saved values log_handler "Checking current values." curr_values diff --git a/common/util_functions.sh b/common/util_functions.sh index efb34d3..49b34c5 100644 --- a/common/util_functions.sh +++ b/common/util_functions.sh @@ -12,25 +12,32 @@ get_file_value() { } # ======================== Variables ======================== +ADBPATH=/data/adb +MODULESPATH=$ADBPATH/modules +MHPCPATH=$ADBPATH/mhpc if [ "$INSTFN" ]; then # Installation (config.sh) - MODVERSION=$(echo $(get_file_value $TMPDIR/module.prop "version=") | sed 's|-.*||') - ADBPATH=/data/adb - MODULESPATH=$ADBPATH/modules + MODVERSION=$(echo $(get_file_value $TMPDIR/module.prop "version=") | sed 's|-.*||') POSTPATH=$ADBPATH/post-fs-data.d SERVICEPATH=$ADBPATH/service.d - LATEPATH=$ADBPATH/mhpc - LATEFILE=$LATEPATH/propsconf_late + LATEFILE=$MHPCPATH/propsconf_late POSTFILE=$POSTPATH/propsconf_post POSTLATEFILE=$POSTPATH/propsconf_late UPDATELATEFILE=$TMPDIR/propsconf_late MIRRORLOC=/sbin/.magisk/mirror/system + VENDLOC=/sbin/.magisk/mirror/vendor if [ -z $SLOT ]; then CACHELOC=/cache else CACHELOC=/data/cache fi - LOGFILE=$CACHELOC/propsconf_install.log + CACHERM=" + $CACHELOC/propsconf_postfile.log + $CACHELOC/propsconf.log + $CACHELOC/propsconf_install.log + $CACHELOC/propsconf_last.log + " + LOGFILE=$MHPCPATH/propsconf_install.log UPDATEV=$(get_file_value $UPDATELATEFILE "SCRIPTV=") UPDATETRANSF=$(get_file_value $UPDATELATEFILE "SETTRANSF=") NOTTRANSF=$(get_file_value $UPDATELATEFILE "NOTTRANSF=") @@ -41,10 +48,6 @@ if [ "$INSTFN" ]; then PRINTVEND PRINTCHK DEVSIM - BUILDPROPENB - FILESAFE - BUILDEDIT - DEFAULTEDIT PROPCOUNT PROPEDIT CUSTOMEDIT @@ -63,6 +66,7 @@ if [ "$INSTFN" ]; then IDSET INCREMENTALSET DESCRIPTIONSET + DISPLAYSET SDKSET REBOOTCHK " @@ -80,6 +84,7 @@ if [ "$INSTFN" ]; then SIMID SIMINCREMENTAL SIMDESCRIPTION + SIMDISPLAY SIMSDK CUSTOMPROPS CUSTOMPROPSPOST @@ -90,19 +95,22 @@ if [ "$INSTFN" ]; then else # Placeholder variables MODVERSIONPH=VER_PLACEHOLDER + MHPCPATHPH=MHPCPATH_PLACEHOLDER LATEFILEPH=LATE_PLACEHOLDER MIRRORLOCPH=MIRROR_PLACEHOLDER + VENDLOCPH=VEND_PLACEHOLDER CACHELOCPH=CACHE_PLACEHOLDER BINPH=BIN_PLACEHOLDER # Log variables - LOGFILE=$CACHELOC/propsconf.log - LASTLOGFILE=$CACHELOC/propsconf_last.log - TMPLOGLOC=$CACHELOC/propslogs + LOGFILE=$MHPCPATH/propsconf.log + LASTLOGFILE=$MHPCPATH/propsconf_last.log + TMPLOGLOC=$MHPCPATH/propslogs TMPLOGLIST=" - $CACHELOC/magisk.log - $CACHELOC/magisk.log.bak - $CACHELOC/propsconf* + $MHPCPATH/defaultprops + $MHPCPATH/magisk.log + $MHPCPATH/magisk.log.bak + $MHPCPATH/propsconf* $MIRRORPATH/system/build.prop $MIRRORPATH/vendor/build.prop $LATEFILE @@ -112,13 +120,13 @@ fi COREPATH=/sbin/.magisk MIRRORPATH=$COREPATH/mirror SYSTEMFILE=$MODPATH/system.prop -POSTCHKFILE=$CACHELOC/propsconf_postchk +POSTCHKFILE=$MHPCPATH/propsconf_postchk RUNFILE=$MODPATH/script_check -RESETFILE=$CACHELOC/reset_mhpc # Make sure that the terminal app used actually can see resetprop if [ "$BOOTSTAGE" == "props" ]; then alias resetprop="$ADBPATH/magisk/magisk resetprop" fi +alias reboot="/system/bin/reboot" # Finding installed Busybox if [ -d "$MODULESPATH/busybox-ndk" ]; then BBPATH=$(find $MODULESPATH/busybox-ndk -name 'busybox') @@ -127,12 +135,12 @@ else fi # Fingerprint variables PRINTSLOC=$MODPATH/prints.sh -PRINTSTMP=$CACHELOC/prints.sh +PRINTSTMP=$MHPCPATH/prints.sh PRINTSWWW="https://raw.githubusercontent.com/Magisk-Modules-Repo/MagiskHide-Props-Config/master/common/prints.sh" PRINTSDEV="https://raw.githubusercontent.com/Didgeridoohan/Playground/master/prints.sh" PRINTFILES=$MODPATH/printfiles CSTMPRINTS=/sdcard/printslist -CSTMFILE=$PRINTFILES/Custom.sh +CSTMFILE=$PRINTFILES/custom.sh # Known modules that edit device fingerprint USNFLIST=" @@ -149,11 +157,18 @@ VR_Patch # Configuration file locations CONFFILELST=" -/sdcard/propsconf_conf +/data/media/0/propsconf_conf /data/propsconf_conf $CACHELOC/propsconf_conf " +# Reset file locations +RESETFILELST=" +/data/media/0/reset_mhpc +/data/reset_mhpc +$CACHELOC/reset_mhpc +" + # MagiskHide props PROPSLIST=" ro.debuggable @@ -203,6 +218,7 @@ ro.build.description # Additional simulation props ADNSIMPROPS=" +ro.build.display.id ro.build.version.sdk " @@ -275,7 +291,7 @@ DIVIDER="${Y}=====================================${N}" # Header menu_header() { - if [ -z "$LOGNAME" ] && [ "$DEVTESTING" == "false" ]; then + if [ -z "$ANDROID_SOCKET_adbd" ] && [ "$DEVTESTING" == "false" ]; then clear fi if [ "$MODVERSION" == "VER_PLACEHOLDER" ]; then @@ -312,6 +328,8 @@ bb_check() { get_prop_type() { if [ "$1" == "ro.vendor.build.fingerprint" ]; then echo "vendprint" + elif [ "$1" == "ro.build.display.id" ]; then + echo "display" else echo $1 | sed 's|.*\.||' | sed 's|.*\_||' fi @@ -404,7 +422,7 @@ force_reboot() { echo "" echo "${C}Rebooting...${N}" log_handler "Rebooting." - setprop sys.powerctl reboot + /system/bin/svc power reboot "" >> $LOGFILE 2>&1 || /system/bin/reboot "" >> $LOGFILE 2>&1 || setprop sys.powerctl reboot >> $LOGFILE 2>&1 sleep 15 log_handler "Rebooting failed." echo "" @@ -441,6 +459,22 @@ script_ran_check() { fi } +#Save default file values in propsconf_late +default_save(){ + #Format the props file + log_handler "Formatting prop file." + sed -i -e "s|\]\:\ \[|=|g;s|^\[||g;s|\]$||g" $MHPCPATH/defaultprops + #Save the props values to $LATEFILE + for ITEM in $VALPROPSLIST; do + TMPPROP=$(get_prop_type $ITEM | tr '[:lower:]' '[:upper:]') + ORIGPROP="ORIG${TMPPROP}" + ORIGTMP="$(get_file_value $LATEFILE "${ORIGPROP}=")" + CURRPROP="CURR${TMPPROP}" + CURRTMP="$(get_file_value $MHPCPATH/defaultprops "${ITEM}=")" + replace_fn $ORIGPROP "\"$ORIGTMP\"" "\"$CURRTMP\"" $LATEFILE + done +} + # Check for original prop values orig_check() { PROPSTMPLIST=$VALPROPSLIST @@ -578,9 +612,6 @@ reboot_fn() { # Reset module reset_fn() { 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 @@ -646,7 +677,8 @@ config_file() { # Fingerprint parts if [ "$CONFDEVSIM" == "true" ]; then change_dev_sim "Device simulation" "file" - for ITEM in $PRINTPARTS; do + TMPPARTS=$PRINTPARTS$ADNSIMPROPS + for ITEM in $TMPPARTS; do TMPVAR="CONF$(get_prop_type $ITEM | tr '[:lower:]' '[:upper:]')" if [ $(eval "echo \$$TMPVAR") == "true" ]; then TMPVAL=1 @@ -706,15 +738,6 @@ config_file() { log_handler "Device simulation boot stage is ${TMPTXT}." fi - # Updates prop file editing - if [ "$FILESAFE" == 0 ]; then - if [ "$CONFPROPFILES" == "true" ]; then - edit_prop_files "file" "" " (configuration file)" - elif [ "$CONFPROPFILES" == "false" ]; then - reset_prop_files "file" "" " (configuration file)" - fi - fi - # Updates custom props if [ "$PROPOPTION" != "preserve" ]; then if [ "$CONFPROPS" ] || [ "$CONFPROPSPOST" ] || [ "$CONFPROPSLATE" ]; then @@ -806,7 +829,9 @@ config_file() { # Deletes the configuration file log_handler "Deleting configuration file." - rm -f $CONFFILE + for ITEM in $CONFFILELST; do + rm -f $ITEM + done log_handler "Configuration file import complete." else log_handler "No configuration file." @@ -857,7 +882,7 @@ system_prop_cont() { # ======================== Installation functions ======================== # Places various module scripts in their proper places script_placement() { - if [ -f "$LATEFILE" ]; then + if [ -f "$LATEFILE" ] && [ -d "$MODULESPATH/MagiskHidePropsConf" ]; then FILEV=$(get_file_value $LATEFILE "SCRIPTV=") FILETRANSF=$(get_file_value $LATEFILE "SETTRANSF=") LATEFILETMP="$LATEFILE" @@ -866,6 +891,7 @@ script_placement() { FILETRANSF=$(get_file_value $SERVICEPATH/propsconf_late "SETTRANSF=") LATEFILETMP="$SERVICEPATH/propsconf_late" else + rm -f $LATEFILE FILEV=0 FILETRANSF=$UPDATETRANSF LATEFILETMP="$LATEFILE" @@ -882,7 +908,10 @@ script_placement() { log_print "- Placing settings script" # Updated script with a required clearing of settings elif [ "$UPDATETRANSF" -gt "$FILETRANSF" ] && [ -z "$NOTTRANSF" ]; then - log_print "- Settings cleared (script updated)" + log_handler "Current transfer version - ${FILETRANSF}" + log_handler "Update transfer version - ${UPDATETRANSF}" + log_handler "No settings set to not transfer" + log_print "- Script updated and settings cleared" # Updated script else log_print "- Script updated" @@ -891,7 +920,7 @@ script_placement() { for ITEM in $SETTINGSLIST; do # Checking if a script update requires some options not to transfer case "$NOTTRANSF" in - *${ITEM}*) + *$ITEM*) if [ "$UPDATETRANSF" -gt "$FILETRANSF" ]; then TRANSFOPT=1 else @@ -939,15 +968,15 @@ script_placement() { done fi log_handler "Setting up late_start settings script." - if [ ! -d "$LATEPATH" ]; then - mkdir -pv $LATEPATH >> $LOGFILE 2>&1 + if [ ! -d "$MHPCPATH" ]; then + mkdir -pv $MHPCPATH >> $LOGFILE 2>&1 fi cp -af $UPDATELATEFILE $LATEFILE >> $LOGFILE 2>&1 # Downgraded script (flashed old module version) elif [ "$UPDATEV" -lt "$FILEV" ]; then log_print "- Settings cleared (script downgraded)" - if [ ! -d "$LATEPATH" ]; then - mkdir -pv $LATEPATH >> $LOGFILE 2>&1 + if [ ! -d "$MHPCPATH" ]; then + mkdir -pv $MHPCPATH >> $LOGFILE 2>&1 fi cp -af $UPDATELATEFILE $LATEFILE >> $LOGFILE 2>&1 # No update of script @@ -957,8 +986,8 @@ script_placement() { else log_print "- Placing settings script" log_handler "Setting up late_start settings script." - if [ ! -d "$LATEPATH" ]; then - mkdir -pv $LATEPATH >> $LOGFILE 2>&1 + if [ ! -d "$MHPCPATH" ]; then + mkdir -pv $MHPCPATH >> $LOGFILE 2>&1 fi cp -af $UPDATELATEFILE $LATEFILE >> $LOGFILE 2>&1 fi @@ -968,26 +997,6 @@ script_placement() { fi } -# Checks if any other module is using a local copy of build.prop -build_prop_check() { - log_print "- Checking for build.prop conflicts" - for D in $(ls $MODULESPATH); do - if [ "$D" != "$MODID" ]; then - if [ -f "$MODULESPATH/$D/system/build.prop" ] || [ "$D" == "safetypatcher" ]; then - if [ ! -f "$MODULESPATH/$D/disable" ]; then - NAME=$(get_file_value $MODULESPATH/$D/module.prop "name=") - ui_print "!" - log_print "! Another module editing build.prop detected!" - log_print "! Module - '$NAME'!" - log_print "! Modification of build.prop disabled!" - ui_print "!" - sed -i 's/BUILDPROPENB=1/BUILDPROPENB=0/' $UPDATELATEFILE - fi - fi - fi - done -} - # Checks for the Universal SafetyNet Fix module and similar modules editing device fingerprint usnf_check() { log_print "- Checking for fingerprint conflicts" @@ -1018,8 +1027,8 @@ bin_check() { mv -f $MODPATH/system/binpath $MODPATH/system/$BIN >> $LOGFILE 2>&1 } -# Check for late_start service boot script in post-fs-data.d, in case someone's moved it and also delete the old propsconf_post boot script if present -post_check() { +# Check for late_start service boot script in post-fs-data.d, in case someone's moved it, delete the old propsconf_post boot script if present and remove a few old log files from /cache +files_check() { if [ -f "$POSTLATEFILE" ]; then log_handler "Removing late_start service boot script from post-fs-data.d." rm -f $POSTLATEFILE @@ -1028,10 +1037,12 @@ post_check() { log_handler "Removing old post-fs-data boot script from post-fs-data.d" rm -f $POSTFILE fi - if [ -f "$CACHELOC/propsconf_postfile.log" ]; then - log_handler "Removing old post-fs-data log from /cache." - rm -f $CACHELOC/propsconf_postfile.log - fi + for ITEM in $CACHERM; do + if [ -f "$ITEM" ]; then + log_handler "Removing old log files ($ITEM)." + rm -f $ITEM + fi + done } # Update the device simulation variables if a fingerprint is set @@ -1065,15 +1076,15 @@ load_settings() { # Installs everything script_install() { load_settings - build_prop_check usnf_check bin_check - post_check + files_check script_placement log_print "- Updating placeholders" placeholder_update $MODPATH/util_functions.sh MODVERSION VER_PLACEHOLDER "$MODVERSION" placeholder_update $MODPATH/util_functions.sh LATEFILE LATE_PLACEHOLDER "$LATEFILE" placeholder_update $MODPATH/util_functions.sh MIRRORLOC MIRROR_PLACEHOLDER "$MIRRORLOC" + placeholder_update $MODPATH/util_functions.sh VENDLOC VEND_PLACEHOLDER "$VENDLOC" placeholder_update $MODPATH/util_functions.sh CACHELOC CACHE_PLACEHOLDER "$CACHELOC" placeholder_update $MODPATH/util_functions.sh BIN BIN_PLACEHOLDER "$BIN" placeholder_update $MODPATH/system/$BIN/props ADBPATH ADB_PLACEHOLDER "$ADBPATH" @@ -1121,11 +1132,15 @@ print_edit() { PRINTCHNG="$(echo $MODULEFINGERPRINT | sed 's|\_\_.*||')" fi for ITEM in $PRINTPROPS; do - log_handler "Changing/writing $ITEM." - if [ "$1" ]; then - echo "${ITEM}=${PRINTCHNG}" >> $1 + if [ "$(resetprop $ITEM)" ]; then + log_handler "Changing/writing $ITEM." + if [ "$1" ]; then + echo "${ITEM}=${PRINTCHNG}" >> $1 + else + resetprop -nv $ITEM $PRINTCHNG >> $LOGFILE 2>&1 + fi else - resetprop -nv $ITEM $PRINTCHNG >> $LOGFILE 2>&1 + log_handler "$ITEM not currently set on device. Skipping." fi done # Edit device description @@ -1252,7 +1267,7 @@ device_print_update() { # Checks and updates the prints list download_prints() { - if [ -z "$LOGNAME" ] && [ "$DEVTESTING" == "false" ]; then + if [ -z "$ANDROID_SOCKET_adbd" ] && [ "$DEVTESTING" == "false" ]; then clear fi if [ "$1" == "Dev" ]; then @@ -1318,8 +1333,6 @@ reset_print() { replace_fn PRINTVEND 1 0 $LATEFILE # Updates prop change variables in propsconf_late replace_fn PRINTEDIT 1 0 $LATEFILE - # Updates improved hiding setting - replace_fn SETFINGERPRINT "true" "false" $LATEFILE # Updates simulation setting replace_fn DEVSIM 1 0 $LATEFILE @@ -1338,8 +1351,6 @@ change_print() { # Updates prop change variables in propsconf_late replace_fn PRINTEDIT 0 1 $LATEFILE - # Updates improved hiding setting - replace_fn SETFINGERPRINT "false" "true" $LATEFILE # Set device simulation variables print_parts "$2" @@ -1371,8 +1382,6 @@ change_print_vendor() { replace_fn PRINTEDIT $TMPVAL $2 $LATEFILE # Clearing out module value replace_fn MODULEFINGERPRINT "\"$MODULEFINGERPRINT\"" "\"\"" $LATEFILE - # Updates improved hiding setting - replace_fn SETFINGERPRINT $BUILD1 $BUILD2 $LATEFILE # Updates simulation setting replace_fn DEVSIM $TMPVAL $2 $LATEFILE @@ -1419,6 +1428,7 @@ print_parts() { fi if [ "$2" != "var" ]; then replace_fn SIMDESCRIPTION "\"$SIMDESCRIPTION\"" "\"$VARDESCRIPTION\"" $LATEFILE + replace_fn SIMDISPLAY "\"$SIMDISPLAY\"" "\"$VARDESCRIPTION\"" $LATEFILE replace_fn SIMSDK "\"$SIMSDK\"" "\"$VARSDK\"" $LATEFILE fi # Load module values @@ -1502,127 +1512,6 @@ change_sim_descr() { after_change "$1" "$3" } -# ======================== Props files functions ======================== -# Reset prop files -reset_prop_files() { - log_handler "Resetting prop files$3." - - # Changes files - for PROPTYPE in $PROPSLIST; do - log_handler "Disabling prop file editing for '$PROPTYPE'." - PROP=$(get_prop_type $PROPTYPE) - SETPROP=$(echo "SET$PROP" | tr '[:lower:]' '[:upper:]') - replace_fn $SETPROP "true" "false" $LATEFILE - done - # Change fingerprint - replace_fn SETFINGERPRINT "true" "false" $LATEFILE - # Edit settings variables - replace_fn BUILDEDIT 1 0 $LATEFILE - replace_fn DEFAULTEDIT 1 0 $LATEFILE - - if [ "$1" != "file" ]; then - after_change_propfile "$1" "$2" "$4" - fi -} - -# Editing prop files settings -edit_prop_files() { - log_handler "Modifying prop files$3." - - # Checks if editing prop files is enabled - if [ "$BUILDPROPENB" == 0 ]; then - log_handler "Editing build.prop is disabled. Only editing default.prop." - PROPSLIST=" - ro.debuggable - ro.secure - " - else - # Checking if the device fingerprint is set by the module - if [ "$FINGERPRINTENB" == 1 ] && [ "$PRINTEDIT" == 1 ]; then - if [ "$(grep "$ORIGFINGERPRINT" $MIRRORLOC/build.prop)" ]; then - log_handler "Enabling prop file editing for device fingerprint." - replace_fn SETFINGERPRINT "false" "true" $LATEFILE - fi - fi - fi - - for PROPTYPE in $PROPSLIST; do - log_handler "Checking original file value for '$PROPTYPE'." - PROP=$(get_prop_type $PROPTYPE) - FILEPROP=$(echo "FILE$PROP" | tr '[:lower:]' '[:upper:]') - SETPROP=$(echo "SET$PROP" | tr '[:lower:]' '[:upper:]') - - # Check the original file value - PROPVALUE=$(get_file_value $LATEFILE "$FILEPROP=") - if [ -z "$PROPVALUE" ]; then - if [ "$PROPTYPE" == "ro.debuggable" ] || [ "$PROPTYPE" == "ro.secure" ]; then - PROPVALUE=$(get_file_value /default.prop "${PROPTYPE}=") - else - PROPVALUE=$(get_file_value $MIRRORLOC/build.prop "${PROPTYPE}=") - fi - fi - - # Checks for default/set values - safe_props $PROPTYPE $PROPVALUE - - # Changes file only if necessary - if [ "$SAFE" == 0 ]; then - log_handler "Enabling prop file editing for '$PROPTYPE'." - replace_fn $SETPROP "false" "true" $LATEFILE - elif [ "$SAFE" == 1 ]; then - log_handler "Prop file editing unnecessary for '$PROPTYPE'." - replace_fn $SETPROP "true" "false" $LATEFILE - else - log_handler "Couldn't check safe value for '$PROPTYPE'." - fi - done - replace_fn BUILDEDIT 0 1 $LATEFILE - replace_fn DEFAULTEDIT 0 1 $LATEFILE - - if [ "$1" != "file" ]; then - after_change_propfile "$1" "$2" "$4" - fi -} - -# Edit the prop files -change_prop_file() { - case $1 in - build) - FNLIST=" - ro.build.type - ro.build.tags - ro.build.selinux - " - PROPFILELOC=$MODPATH/system/build.prop - ;; - default) - FNLIST=" - ro.debuggable - ro.secure - " - PROPFILELOC=/default.prop - ;; - esac - for ITEM in $FNLIST; do - PROP=$(get_prop_type $ITEM) - MODULEPROP=$(echo "MODULE${PROP}" | tr '[:lower:]' '[:upper:]') - FILEPROP=$(echo "ORIG${PROP}" | tr '[:lower:]' '[:upper:]') - SETPROP=$(echo "SET${PROP}" | tr '[:lower:]' '[:upper:]') - if [ "$(eval "echo \$$MODULEPROP")" ]; then - SEDVAR="$(eval "echo \$$MODULEPROP")" - else - for P in $SAFELIST; do - if [ "$(get_eq_left "$P")" == "$ITEM" ]; then - SEDVAR=$(get_eq_right "$P") - fi - done - fi - if [ "$(get_file_value $LATEFILE "${SETPROP}=")" == "true" ]; then - replace_fn $ITEM $(eval "echo \$$FILEPROP") $SEDVAR $PROPFILELOC && log_handler "${ITEM}=${SEDVAR}" - fi - done -} - # ======================== MagiskHide Props functions ======================== # Check safe values safe_props() { @@ -1794,10 +1683,13 @@ set_custprop() { CURRCUSTPROPS=$(get_file_value $LATEFILE "${ITEM}=") case "$CURRCUSTPROPS" in *$1*) - TMPCUSTPROPS=$(echo "$CURRCUSTPROPS" | sed "s|${1}=${TMPORIG}|${1}=${TMPVALUE}|") + if [ "$(echo $CUSTOMPROPSLIST | grep -Eo "(^| )$1($| )")" ]; then + TMPCUSTPROPS=$(echo "$CURRCUSTPROPS" | sed "s|${1}=${TMPORIG}|${1}=${TMPVALUE}|") + else + TMPCUSTPROPS=$(echo "$CURRCUSTPROPS ${1}=${TMPVALUE}" | sed 's|^[ \t]*||') + fi ;; - *) - TMPCUSTPROPS=$(echo "$CURRCUSTPROPS ${1}=${TMPVALUE}" | sed 's|^[ \t]*||') + *) TMPCUSTPROPS=$(echo "$CURRCUSTPROPS ${1}=${TMPVALUE}" | sed 's|^[ \t]*||') ;; esac SORTCUSTPROPS=$(echo $(printf '%s\n' $TMPCUSTPROPS | sort -u)) @@ -1947,27 +1839,11 @@ collect_logs() { *) BPNAME="" ;; esac - if [ "$ITEM" != "$CACHELOC/propsconf.log" ]; then + if [ "$ITEM" != "$MHPCPATH/propsconf.log" ]; then cp -af $ITEM ${TMPLOGLOC}/${BPNAME} >> $LOGFILE 2>&1 fi else - case "$ITEM" in - *cache) - if [ "$CACHELOC" == "/cache" ]; then - CACHELOCTMP=/data/cache - else - CACHELOCTMP=/cache - fi - ITEMTPM=$(echo $ITEM | sed 's|$CACHELOC|$CACHELOCTMP|') - if [ -f "$ITEMTPM" ]; then - cp -af $ITEMTPM $TMPLOGLOC >> $LOGFILE 2>&1 - else - log_handler "$ITEM not available." - fi - ;; - *) log_handler "$ITEM not available." - ;; - esac + log_handler "$ITEM not available." fi done @@ -1975,14 +1851,14 @@ collect_logs() { resetprop > $TMPLOGLOC/props.txt # Saving the log file - cp -af $CACHELOC/propsconf.log $TMPLOGLOC >> $LOGFILE 2>&1 + cp -af $MHPCPATH/propsconf.log $TMPLOGLOC >> $LOGFILE 2>&1 # Package the files - cd $CACHELOC + cd $MHPCPATH tar -zcvf propslogs.tar.gz propslogs >> $LOGFILE 2>&1 # Copy package to internal storage - mv -f $CACHELOC/propslogs.tar.gz /storage/emulated/0 >> $LOGFILE 2>&1 + mv -f $MHPCPATH/propslogs.tar.gz /storage/emulated/0 >> $LOGFILE 2>&1 # Remove temporary directory rm -rf $TMPLOGLOC >> $LOGFILE 2>&1 diff --git a/module.prop b/module.prop index 44aa0db..cfd3ac6 100644 --- a/module.prop +++ b/module.prop @@ -1,6 +1,6 @@ id=MagiskHidePropsConf name=MagiskHide Props Config -version=v4.0.3-v63 -versionCode=47 +version=v5.0.0-v64 +versionCode=48 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, and set your own custom props. +description=Change your device's fingerprint, to pass SafetyNet's CTS Profile check. Set/reset prop values set by MagiskHide. Change any prop values easily, and set your own custom props. diff --git a/system/binpath/props b/system/binpath/props index 6825dbc..72a65eb 100644 Binary files a/system/binpath/props and b/system/binpath/props differ diff --git a/uninstall.sh b/uninstall.sh index 2075685..a00ae13 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -12,24 +12,8 @@ MODPATH=${0%/*} # Load functions . $MODPATH/util_functions.sh -# Variables -DIR=/data/adb/mhpc +rm -rf "$MHPCPATH" -# Start logging -log_start - -log_handler "Cleaning up module files during uninstall." - -if [ -d "$DIR" ]; then - log_handler "Removing settings file(s)." - echo "Deleting $DIR" >> $LOGFILE 2>&1 - rm -rf "$DIR" >> $LOGFILE 2>&1 -fi - -log_handler "Checking for files to remove in $CACHELOC." for ITEM in $CACHEFILES; do - if [ -f "$CACHELOC/$ITEM" ]; then - echo "Deleting ${ITEM}." >> $LOGFILE 2>&1 - rm -f $CACHELOC/$ITEM >> $LOGFILE 2>&1 - fi + rm -f $CACHELOC/$ITEM done