From 2529515b330c6d407bf12fbbbb2f1e75583d1079 Mon Sep 17 00:00:00 2001 From: Tad Date: Sun, 22 Jan 2023 15:05:03 -0500 Subject: [PATCH] 19.1+: Fixup DHCP hostname handling Signed-off-by: Tad --- .../0001-Captive_Portal_Toggle-gos.patch | 4 ++-- .../0005-Automatic_Reboot.patch | 2 +- .../0006-Bluetooth_Timeout.patch | 2 +- .../0007-WiFi_Timeout.patch | 2 +- .../0011-Random_MAC-1.patch | 2 +- .../0013-LTE_Only_Mode-1.patch | 2 +- .../0013-Captive_Portal_Toggle.patch | 4 ++-- .../0014-LTE_Only_Mode.patch | 12 ++++++------ .../0002-hosts_toggle.patch | 2 +- Scripts/LineageOS-19.1/Patch.sh | 4 ++-- Scripts/LineageOS-20.0/Patch.sh | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle-gos.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle-gos.patch index f0e6ba8d..dc33cbc2 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle-gos.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle-gos.patch @@ -27,7 +27,7 @@ Change-Id: I8a762d0f29ac42fce3dcfc7189e8ff216a8f8d1a create mode 100644 src/com/android/settings/network/ConnectivityCheckPreferenceController.java diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index 617548cadc..87fd6e5df6 100644 +index 617548cadc..c2a7e7dacd 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -110,6 +110,30 @@ @@ -92,7 +92,7 @@ index 6bf6dbaccf..8ee092aa04 100644 diff --git a/src/com/android/settings/network/ConnectivityCheckPreferenceController.java b/src/com/android/settings/network/ConnectivityCheckPreferenceController.java new file mode 100644 -index 0000000000..942ae750bc +index 0000000000..b08f661476 --- /dev/null +++ b/src/com/android/settings/network/ConnectivityCheckPreferenceController.java @@ -0,0 +1,328 @@ diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0005-Automatic_Reboot.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0005-Automatic_Reboot.patch index 28421564..47428138 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0005-Automatic_Reboot.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0005-Automatic_Reboot.patch @@ -13,7 +13,7 @@ Subject: [PATCH] add auto-reboot setting create mode 100644 src/com/android/settings/security/AutoRebootPreferenceController.java diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index 87fd6e5df6..b2ea885d46 100644 +index c2a7e7dacd..275d2a2fc0 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -170,6 +170,37 @@ diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0006-Bluetooth_Timeout.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0006-Bluetooth_Timeout.patch index 9b8bf81b..b21e0196 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0006-Bluetooth_Timeout.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0006-Bluetooth_Timeout.patch @@ -12,7 +12,7 @@ Subject: [PATCH] add bluetooth auto-turn-off setting create mode 100644 src/com/android/settings/bluetooth/BluetoothTimeoutPreferenceController.java diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index b2ea885d46..5317326366 100644 +index 275d2a2fc0..3b0d93ad6f 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -39,6 +39,50 @@ diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0007-WiFi_Timeout.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0007-WiFi_Timeout.patch index 1fed1deb..b0948d68 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0007-WiFi_Timeout.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0007-WiFi_Timeout.patch @@ -12,7 +12,7 @@ Subject: [PATCH] add Wi-Fi timeout feature create mode 100644 src/com/android/settings/wifi/WifiTimeoutPreferenceController.java diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index 5317326366..2013c789cd 100644 +index 3b0d93ad6f..32acf323d3 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -83,6 +83,50 @@ diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0011-Random_MAC-1.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0011-Random_MAC-1.patch index 726b7823..810d25c5 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0011-Random_MAC-1.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0011-Random_MAC-1.patch @@ -13,7 +13,7 @@ RANDOMIZATION_ALWAYS is set as the default option 5 files changed, 56 insertions(+), 17 deletions(-) diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index 2013c789cd..309cbc9e77 100644 +index 32acf323d3..710459c40e 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -1356,7 +1356,8 @@ diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0013-LTE_Only_Mode-1.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0013-LTE_Only_Mode-1.patch index 8711b193..5219744f 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0013-LTE_Only_Mode-1.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0013-LTE_Only_Mode-1.patch @@ -11,7 +11,7 @@ Subject: [PATCH] add LTE only setting 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index 309cbc9e77..7d6ca66e85 100644 +index 710459c40e..3611b883c3 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -1417,6 +1417,9 @@ diff --git a/Patches/LineageOS-19.1/android_packages_apps_Settings/0013-Captive_Portal_Toggle.patch b/Patches/LineageOS-19.1/android_packages_apps_Settings/0013-Captive_Portal_Toggle.patch index 7b391d72..81482851 100644 --- a/Patches/LineageOS-19.1/android_packages_apps_Settings/0013-Captive_Portal_Toggle.patch +++ b/Patches/LineageOS-19.1/android_packages_apps_Settings/0013-Captive_Portal_Toggle.patch @@ -25,7 +25,7 @@ Change-Id: I8a762d0f29ac42fce3dcfc7189e8ff216a8f8d1a create mode 100644 src/com/android/settings/network/ConnectivityCheckPreferenceController.java diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index f50d130936..584550265c 100644 +index f50d130936..a08ac6d939 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -229,6 +229,30 @@ @@ -73,7 +73,7 @@ index 67c47bc7b3..62f06201f1 100644 diff --git a/src/com/android/settings/network/ConnectivityCheckPreferenceController.java b/src/com/android/settings/network/ConnectivityCheckPreferenceController.java new file mode 100644 -index 0000000000..5328c3ee6a +index 0000000000..6723f27cbe --- /dev/null +++ b/src/com/android/settings/network/ConnectivityCheckPreferenceController.java @@ -0,0 +1,339 @@ diff --git a/Patches/LineageOS-19.1/android_packages_apps_Settings/0014-LTE_Only_Mode.patch b/Patches/LineageOS-19.1/android_packages_apps_Settings/0014-LTE_Only_Mode.patch index a8b2da80..67cdb612 100644 --- a/Patches/LineageOS-19.1/android_packages_apps_Settings/0014-LTE_Only_Mode.patch +++ b/Patches/LineageOS-19.1/android_packages_apps_Settings/0014-LTE_Only_Mode.patch @@ -12,10 +12,10 @@ Unlike 11, enable LTE only when World mode is enabled also and ignore CarrierCon 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/res/values/arrays.xml b/res/values/arrays.xml -index bb95662047..7610a6d4cc 100644 +index a08ac6d939..8077b9e8c8 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml -@@ -1474,6 +1474,9 @@ +@@ -1488,6 +1488,9 @@ 4 @@ -25,7 +25,7 @@ index bb95662047..7610a6d4cc 100644 @string/network_lte @string/network_3G -@@ -1563,7 +1566,7 @@ +@@ -1577,7 +1580,7 @@ CDMA + LTE/EvDo GSM/WCDMA/LTE LTE/CDMA/EvDo/GSM/WCDMA @@ -35,10 +35,10 @@ index bb95662047..7610a6d4cc 100644 TDSCDMA only TDSCDMA/WCDMA diff --git a/res/values/strings.xml b/res/values/strings.xml -index 58b17eeccf..98f4d1f6f4 100644 +index 62f06201f1..3d44ae6ca6 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml -@@ -12631,6 +12631,8 @@ +@@ -12628,6 +12628,8 @@ Preferred network mode: CDMA/EvDo/GSM/WCDMA Preferred network mode: LTE @@ -47,7 +47,7 @@ index 58b17eeccf..98f4d1f6f4 100644 Preferred network mode: GSM/WCDMA/LTE -@@ -12696,8 +12698,12 @@ +@@ -12693,8 +12695,12 @@ 4G LTE (recommended) diff --git a/Patches/LineageOS-19.1/android_packages_modules_DnsResolver/0002-hosts_toggle.patch b/Patches/LineageOS-19.1/android_packages_modules_DnsResolver/0002-hosts_toggle.patch index 6529c95f..8490333f 100644 --- a/Patches/LineageOS-19.1/android_packages_modules_DnsResolver/0002-hosts_toggle.patch +++ b/Patches/LineageOS-19.1/android_packages_modules_DnsResolver/0002-hosts_toggle.patch @@ -10,7 +10,7 @@ Change-Id: Iea165003474e1107dc77980985bf9928c369dbb5 1 file changed, 4 insertions(+) diff --git a/getaddrinfo.cpp b/getaddrinfo.cpp -index f0c0ba8..8548b1a 100644 +index f0c0ba8..59e1b67 100644 --- a/getaddrinfo.cpp +++ b/getaddrinfo.cpp @@ -57,6 +57,7 @@ diff --git a/Scripts/LineageOS-19.1/Patch.sh b/Scripts/LineageOS-19.1/Patch.sh index 63939355..9ecbcd6c 100644 --- a/Scripts/LineageOS-19.1/Patch.sh +++ b/Scripts/LineageOS-19.1/Patch.sh @@ -398,12 +398,12 @@ if enterAndClear "vendor/lineage"; then rm build/target/product/security/lineage.x509.pem; #Remove Lineage keys rm -rf overlay/common/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml; #Remove analytics rm -rf overlay/common/frameworks/base/core/res/res/drawable-*/default_wallpaper.png; #Remove Lineage wallpaper -rm -rf overlay/common/packages/modules/NetworkStack/res/values/config.xml; #Do not set device model as DHCP hostname +rm -rf overlay/rro_packages/NetworkStackOverlay; #Do not set device model as DHCP hostname if [ "$DOS_HOSTS_BLOCKING" = true ]; then awk -i inplace '!/50-lineage.sh/' config/*.mk; fi; #Make sure our hosts is always used awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/*.mk; #Remove Lineage extra keys awk -i inplace '!/security\/lineage/' config/*.mk; #Remove Lineage extra keys awk -i inplace '!/def_backup_transport/' overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml; #Unset default backup provider -if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then sed -i '20d' config/common_mobile.mk && awk -i inplace '!/AudioFX/' config/*.mk; fi; #Remove AudioFX +if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then sed -i '/TARGET_EXCLUDES_AUDIOFX/,+3d' config/common_mobile.mk; fi; #Remove AudioFX sed -i 's/LINEAGE_BUILDTYPE := UNOFFICIAL/LINEAGE_BUILDTYPE := dos/' config/*.mk; #Change buildtype echo 'include vendor/divested/divestos.mk' >> config/common.mk; #Include our customizations cp -f "$DOS_PATCHES_COMMON/apns-conf.xml" prebuilt/common/etc/apns-conf.xml; #Update APN list diff --git a/Scripts/LineageOS-20.0/Patch.sh b/Scripts/LineageOS-20.0/Patch.sh index 91b76a19..9f45458e 100644 --- a/Scripts/LineageOS-20.0/Patch.sh +++ b/Scripts/LineageOS-20.0/Patch.sh @@ -391,7 +391,7 @@ if enterAndClear "vendor/lineage"; then rm build/target/product/security/lineage.x509.pem; #Remove Lineage keys rm -rf overlay/common/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml; #Remove analytics rm -rf overlay/common/frameworks/base/core/res/res/drawable-*/default_wallpaper.png; #Remove Lineage wallpaper -rm -rf overlay/common/packages/modules/NetworkStack/res/values/config.xml; #Do not set device model as DHCP hostname +rm -rf overlay/rro_packages/NetworkStackOverlay; #Do not set device model as DHCP hostname if [ "$DOS_HOSTS_BLOCKING" = true ]; then awk -i inplace '!/50-lineage.sh/' config/*.mk; fi; #Make sure our hosts is always used awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/*.mk; #Remove Lineage extra keys awk -i inplace '!/security\/lineage/' config/*.mk; #Remove Lineage extra keys