mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-04 15:35:04 -04:00
Various patches from GrapheneOS
This commit is contained in:
parent
d6dca6e66d
commit
881c24d8b2
17 changed files with 429 additions and 13 deletions
|
@ -183,6 +183,7 @@ sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPA
|
|||
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
|
||||
enterAndClear "packages/services/Telephony";
|
||||
patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0001-PREREQ_Handle_All_Modes.patch";
|
||||
|
|
|
@ -59,9 +59,13 @@ sed -i 's/(!has_serial_number || serial_number_matched)/!has_serial_number/' rec
|
|||
|
||||
enterAndClear "build/make";
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0001-OTA_Keys.patch"; #add correct keys to recovery for OTA verification
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0002-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
sed -i '57i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk;
|
||||
sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/treble_common.mk; #Switch to Silence
|
||||
|
||||
enterAndClear "build/soong";
|
||||
patch -p1 < "$DOS_PATCHES/android_build_soong/0001-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
|
||||
enterAndClear "device/lineage/sepolicy";
|
||||
git revert --no-edit 9c28a0dfb91bb468515e123b1aaf3fcfc007b82f; #neverallow violation - breaks backuptool
|
||||
git revert --no-edit f1ad32105599a0b71702f840b2deeb6849f1ae80; #neverallow violation - breaks addons
|
||||
|
@ -175,6 +179,7 @@ sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPA
|
|||
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
|
||||
enterAndClear "packages/providers/MediaProvider";
|
||||
patch -p1 < "$DOS_PATCHES/android_packages_providers_MediaProvider/0001-External_Permission.patch"; #Fix permission denial
|
||||
|
|
|
@ -65,8 +65,13 @@ patch -p1 < "$DOS_PATCHES/android_bootable_recovery/0001-No_SerialNum_Restrictio
|
|||
enterAndClear "build/make";
|
||||
git revert --no-edit 271f6ffa045064abcac066e97f2cb53ccb3e5126 61f7ee9386be426fd4eadc2c8759362edb5bef8; #Add back PicoTTS and language files
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0001-OTA_Keys.patch"; #add correct keys to recovery for OTA verification
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0002-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
sed -i '74i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk;
|
||||
sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/treble_common.mk; #Switch to Silence
|
||||
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 17/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Bump minimum SDK version (GrapheneOS)
|
||||
|
||||
enterAndClear "build/soong";
|
||||
patch -p1 < "$DOS_PATCHES/android_build_soong/0001-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
|
||||
enterAndClear "device/qcom/sepolicy-legacy";
|
||||
patch -p1 < "$DOS_PATCHES/android_device_qcom_sepolicy-legacy/0001-Camera_Fix.patch"; #Fix camera on -user builds XXX: REMOVE THIS TRASH
|
||||
|
@ -183,6 +188,7 @@ sed -i 's/PROP_BUILD_VERSION_INCREMENTAL);/PROP_BUILD_VERSION_INCREMENTAL).repla
|
|||
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
|
||||
enterAndClear "packages/services/Telephony";
|
||||
git revert --no-edit 99564aaf0417c9ddf7d6aeb10d326e5b24fa8f55;
|
||||
|
|
|
@ -61,9 +61,14 @@ if [ "$DOS_GRAPHENE_MALLOC" = true ]; then patch -p1 < "$DOS_PATCHES/android_bio
|
|||
enterAndClear "build/make";
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0001-Restore_TTS.patch"; #Add back PicoTTS and language files
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0002-OTA_Keys.patch"; #add correct keys to recovery for OTA verification
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0003-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
sed -i '75i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk;
|
||||
sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/gsi_common.mk; #Switch to Silence
|
||||
awk -i inplace '!/updatable_apex.mk/' target/product/mainline_system.mk; #Disable APEX
|
||||
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 23/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Bump minimum SDK version (GrapheneOS)
|
||||
|
||||
enterAndClear "build/soong";
|
||||
patch -p1 < "$DOS_PATCHES/android_build_soong/0001-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
|
||||
enterAndClear "device/qcom/sepolicy-legacy";
|
||||
patch -p1 < "$DOS_PATCHES/android_device_qcom_sepolicy-legacy/0001-Camera_Fix.patch"; #Fix camera on -user builds XXX: REMOVE THIS TRASH
|
||||
|
@ -149,6 +154,7 @@ if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAud
|
|||
|
||||
enterAndClear "packages/apps/Contacts";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Links.patch"; #Remove Privacy Policy and Terms of Service links (GrapheneOS)
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Backup.patch"; #Backups are not sent to Google (GrapheneOS)
|
||||
|
||||
#enterAndClear "packages/apps/Dialer";
|
||||
#patch -p1 < "$DOS_PATCHES/android_packages_apps_Dialer/0001-Not_Private_Banner.patch"; #Add a privacy warning banner to calls (CalyxOS)
|
||||
|
@ -177,6 +183,7 @@ sed -i 's/PROP_BUILD_VERSION_INCREMENTAL);/PROP_BUILD_VERSION_INCREMENTAL).repla
|
|||
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
|
||||
#enterAndClear "packages/services/Telephony";
|
||||
#patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0001-PREREQ_Handle_All_Modes.patch"; #XXX 17REBASE
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
cd "$DOS_BUILD_BASE""kernel/fxtec/msm8998"
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0272-0273.patch --exclude=Makefile
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0007-Accelerated_AES/3.10+/0016.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0007-Accelerated_AES/3.10+/0020.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening/4.4/0002.patch
|
||||
|
@ -50,5 +49,5 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11608/4.4/0006.patch
|
|||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11608/^5.6.1/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-14386/3.10-^4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-16119/^5.10/0002.patch
|
||||
editKernelLocalversion "-dos.p50"
|
||||
editKernelLocalversion "-dos.p49"
|
||||
cd "$DOS_BUILD_BASE"
|
||||
|
|
|
@ -154,16 +154,6 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-35519/4.4/0005.patch
|
|||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-36158/4.4/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-36312/4.4/0005.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3178/4.4/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0046.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0047.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0048.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0049.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0050.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0051.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0052.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0053.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0054.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3347/4.4/0055.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3428/4.4/0013.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3428/4.4/0014.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3483/4.4/0004.patch
|
||||
|
@ -197,5 +187,5 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-31916/4.4/0006.patch
|
|||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-32399/4.4/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-24586/4.4/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3587/4.4/0004.patch
|
||||
editKernelLocalversion "-dos.p197"
|
||||
editKernelLocalversion "-dos.p187"
|
||||
cd "$DOS_BUILD_BASE"
|
||||
|
|
|
@ -55,10 +55,15 @@ enterAndClear "bootable/recovery";
|
|||
patch -p1 < "$DOS_PATCHES/android_bootable_recovery/0001-No_SerialNum_Restrictions.patch"; #Abort on serial number specific packages (GrapheneOS)
|
||||
|
||||
enterAndClear "build/make";
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0001-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
patch -p1 < "$DOS_PATCHES/android_build/0002-OTA_Keys.patch"; #add correct keys to recovery for OTA verification
|
||||
sed -i '75i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk;
|
||||
sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/aosp_product.mk; #Switch to Silence
|
||||
awk -i inplace '!/updatable_apex.mk/' target/product/mainline_system.mk; #Disable APEX
|
||||
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 23/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Bump minimum SDK version (GrapheneOS)
|
||||
|
||||
enterAndClear "build/soong";
|
||||
patch -p1 < "$DOS_PATCHES/android_build_soong/0001-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS)
|
||||
|
||||
enterAndClear "device/qcom/sepolicy-legacy";
|
||||
patch -p1 < "$DOS_PATCHES/android_device_qcom_sepolicy-legacy/0001-Camera_Fix.patch"; #Fix camera on -user builds XXX: REMOVE THIS TRASH
|
||||
|
@ -129,6 +134,7 @@ if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAud
|
|||
|
||||
enterAndClear "packages/apps/Contacts";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Links.patch"; #Remove Privacy Policy and Terms of Service links (GrapheneOS)
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Backup.patch"; #Backups are not sent to Google (GrapheneOS)
|
||||
|
||||
#enterAndClear "packages/apps/Dialer";
|
||||
#patch -p1 < "$DOS_PATCHES/android_packages_apps_Dialer/0001-Not_Private_Banner.patch"; #Add a privacy warning banner to calls (CalyxOS)
|
||||
|
@ -158,6 +164,7 @@ sed -i 's/PROP_BUILD_VERSION_INCREMENTAL);/PROP_BUILD_VERSION_INCREMENTAL).repla
|
|||
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
|
||||
enterAndClear "packages/providers/TelephonyProvider";
|
||||
patch -p1 < "$DOS_PATCHES/android_packages_providers_TelephonyProvider/304614.patch"; #mcc/mnc fix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue