From 83478880ef4b8a80ab763384cf2cc3679cee9528 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 4 Mar 2019 00:05:12 -0500 Subject: [PATCH] WireGuard kernel module inclusion support --- Manifests/Manifest_LAOS-14.1.xml | 4 ++++ Manifests/Manifest_LAOS-15.1.xml | 4 ++++ Patches/Common/android_vendor_divested/packages.mk | 2 +- PrebuiltApps | 2 +- Scripts/LineageOS-14.1/Patch.sh | 7 +++++++ Scripts/LineageOS-15.1/Patch.sh | 7 +++++++ Scripts/init.sh | 3 ++- 7 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Manifests/Manifest_LAOS-14.1.xml b/Manifests/Manifest_LAOS-14.1.xml index 276cb3c3..3c3cee90 100644 --- a/Manifests/Manifest_LAOS-14.1.xml +++ b/Manifests/Manifest_LAOS-14.1.xml @@ -64,6 +64,10 @@ + + + + diff --git a/Manifests/Manifest_LAOS-15.1.xml b/Manifests/Manifest_LAOS-15.1.xml index e0c49984..988acad0 100644 --- a/Manifests/Manifest_LAOS-15.1.xml +++ b/Manifests/Manifest_LAOS-15.1.xml @@ -65,6 +65,10 @@ + + + + diff --git a/Patches/Common/android_vendor_divested/packages.mk b/Patches/Common/android_vendor_divested/packages.mk index 89b3a7a5..efa28a71 100644 --- a/Patches/Common/android_vendor_divested/packages.mk +++ b/Patches/Common/android_vendor_divested/packages.mk @@ -22,7 +22,7 @@ PRODUCT_PACKAGES += \ LocalCalendar # Notes -# - Available (via PrebuiltApps submodule): K9Mail, NetMonitor, OpenKeychain, Orbot, Shelter, TalkBack, TorBrowser +# - Available (via PrebuiltApps submodule): K9Mail, NetMonitor, OpenKeychain, Orbot, Shelter, TalkBack, TorBrowser, WireGuard # - Camera Choices: None (Camera2/Snap), OpenCamera # - Gallery Choices: None (AOSP/Lineage), CameraRoll, SimpleGallery # - K-9 Mail Will be included after 5.5xx release diff --git a/PrebuiltApps b/PrebuiltApps index c70bb07a..44dd71b2 160000 --- a/PrebuiltApps +++ b/PrebuiltApps @@ -1 +1 @@ -Subproject commit c70bb07acfbefa48c8b03219abb9ea456e1694a1 +Subproject commit 44dd71b2597a6521ed4b1e79e439d23565a805ce diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index 99fe6e4c..3cebd4a0 100644 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -105,6 +105,13 @@ awk -i inplace '!/com.android.internal.R.bool.config_permissionReviewRequired/' enterAndClear "hardware/ti/omap4"; patch -p1 < "$DOS_PATCHES/android_hardware_ti_omap4/0001-tuna-camera.patch"; #fix camera on tuna +if enter "kernel/wireguard"; then +if [ "$DOS_WIREGUARD_INCLUDED" = false ]; then rm Android.mk; fi; +#Remove system information from HTTP requests +awk -i inplace '!/USER_AGENT=/' fetch.sh; +sed -i '3iUSER_AGENT="WireGuard-AndroidROMBuild/0.2"' fetch.sh; +fi; + enterAndClear "packages/apps/CMParts"; rm -rf src/org/cyanogenmod/cmparts/cmstats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml; #Nuke part of CMStats patch -p1 < "$DOS_PATCHES/android_packages_apps_CMParts/0001-Remove_Analytics.patch"; #Remove the rest of CMStats diff --git a/Scripts/LineageOS-15.1/Patch.sh b/Scripts/LineageOS-15.1/Patch.sh index d4ac0a6b..8c2ef252 100644 --- a/Scripts/LineageOS-15.1/Patch.sh +++ b/Scripts/LineageOS-15.1/Patch.sh @@ -103,6 +103,13 @@ awk -i inplace '!/mPermissionReviewRequired = Build.PERMISSIONS_REVIEW_REQUIRED/ awk -i inplace '!/\|\| context.getResources\(\).getBoolean\(/' service/java/com/android/server/wifi/WifiServiceImpl.java; awk -i inplace '!/com.android.internal.R.bool.config_permissionReviewRequired/' service/java/com/android/server/wifi/WifiServiceImpl.java; +if enter "kernel/wireguard"; then +if [ "$DOS_WIREGUARD_INCLUDED" = false ]; then rm Android.mk; fi; +#Remove system information from HTTP requests +awk -i inplace '!/USER_AGENT=/' fetch.sh; +sed -i '3iUSER_AGENT="WireGuard-AndroidROMBuild/0.2"' fetch.sh; +fi; + enterAndClear "lineage-sdk"; awk -i inplace '!/WeatherManagerServiceBroker/' lineage/res/res/values/config.xml; #Disable Weather if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAudioService/' lineage/res/res/values/config.xml; fi; diff --git a/Scripts/init.sh b/Scripts/init.sh index 066d67cb..63aa5cb4 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -38,6 +38,7 @@ export DOS_GPS_GLONASS_FORCED=true; #Enables GLONASS on all devices export DOS_MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll() export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full export DOS_MICROG_INCLUDED="NLP"; #Determines inclusion of microG. Options: NLP, FULL +export DOS_WIREGUARD_INCLUDED=false; #Switch to true to enable WireGuard kernel module inclusion export DOS_HOSTS_BLOCKING=true; #Switch to false to prevent inclusion of our HOSTS file export DOS_HOSTS_BLOCKING_APP="DNS66"; #App installed when built-in blocking is disabled. Options: Blokada, DNS66 export DOS_HOSTS_BLOCKING_LIST="https://divestos.xyz/hosts"; #Must be in the format "127.0.0.1 bad.domain.tld" @@ -55,7 +56,7 @@ export DOS_BRANDING_BOOTANIMATION_COLOR="#FF5722-#03A9F4"; #plasma export DOS_BRANDING_LINK_ABOUT="https://divestos.xyz/index.php?page=about"; export DOS_BRANDING_LINK_PRIVACY="https://divestos.xyz/index.php?page=privacy_policy"; export DOS_BRANDING_SERVER_OTA="https://divestos.xyz/updater.php"; -export DOS_BRANDING_SERVER_OTA_ONION=$DOS_BRANDING_SERVER_OTA; #TODO: Setup Onion +export DOS_BRANDING_SERVER_OTA_ONION=$DOS_BRANDING_SERVER_OTA; export DOS_THEME_50="FFCA28"; #Amber 400 export DOS_THEME_100="FFC107"; #Amber 500