From fe80137df9a468204277075097258103229a1cf6 Mon Sep 17 00:00:00 2001 From: Tad Date: Sat, 25 Mar 2023 20:20:56 -0400 Subject: [PATCH] Don't remove CompanionDeviceManager Used by some wearables, not just Android Wear Closes https://github.com/Divested-Mobile/DivestOS-Build/issues/196 Signed-off-by: Tad --- Scripts/LineageOS-15.1/Patch.sh | 2 +- Scripts/LineageOS-16.0/Patch.sh | 2 +- Scripts/LineageOS-17.1/Patch.sh | 2 +- Scripts/LineageOS-18.1/Patch.sh | 2 +- Scripts/LineageOS-19.1/Patch.sh | 2 +- Scripts/LineageOS-20.0/Patch.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Scripts/LineageOS-15.1/Patch.sh b/Scripts/LineageOS-15.1/Patch.sh index 9ec44f6b..b9880a01 100644 --- a/Scripts/LineageOS-15.1/Patch.sh +++ b/Scripts/LineageOS-15.1/Patch.sh @@ -185,7 +185,7 @@ sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRON sed -i 's/entry == null/entry == null || true/' core/java/android/os/RecoverySystem.java; #Skip strict update compatibiltity checks XXX: TEMPORARY FIX sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/server/am/ActivityManagerService.java; #Disable partition fingerprint mismatch warnings XXX: TEMPORARY FIX hardenLocationFWB "$DOS_BUILD_BASE"; #Harden the default GPS config -rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) +#rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/Osu packages/Osu2; #Automatic Wi-Fi connection non-sense rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps fi; diff --git a/Scripts/LineageOS-16.0/Patch.sh b/Scripts/LineageOS-16.0/Patch.sh index 15c5176c..802176de 100644 --- a/Scripts/LineageOS-16.0/Patch.sh +++ b/Scripts/LineageOS-16.0/Patch.sh @@ -186,7 +186,7 @@ sed -i 's/return 16;/return 64;/' core/java/android/app/admin/DevicePolicyManage sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often hardenLocationFWB "$DOS_BUILD_BASE"; #Harden the default GPS config sed -i '301i\ if(packageList != null && packageList.length() > 0) { packageList += ","; } packageList += "net.sourceforge.opencamera";' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist -rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) +#rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps fi; diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index 3ec59699..880228b6 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -194,7 +194,7 @@ sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/serv sed -i 's/return 16;/return 64;/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS) sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often hardenLocationConf services/core/java/com/android/server/location/gps_debug.conf; #Harden the default GPS config -rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) +#rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) #sed -i '295i\ if(packageList != null && packageList.size() > 0) { packageList.add("net.sourceforge.opencamera"); }' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist XXX: needs testing, broke boot last time rm -rf packages/OsuLogin; #Automatic Wi-Fi connection non-sense rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index b17cfdb5..08e254c2 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -177,7 +177,7 @@ sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/serv sed -i 's/MAX_PASSWORD_LENGTH = 16/MAX_PASSWORD_LENGTH = 64/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS) sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often #sed -i '301i\ if(packageList != null && packageList.size() > 0) { packageList.add("net.sourceforge.opencamera"); }' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist XXX: needs testing, broke boot last time -rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) +#rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps fi; diff --git a/Scripts/LineageOS-19.1/Patch.sh b/Scripts/LineageOS-19.1/Patch.sh index cffd403e..9fe11b32 100644 --- a/Scripts/LineageOS-19.1/Patch.sh +++ b/Scripts/LineageOS-19.1/Patch.sh @@ -185,7 +185,7 @@ sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/serv sed -i 's/MAX_PASSWORD_LENGTH = 16/MAX_PASSWORD_LENGTH = 64/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS) sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often #sed -i '282i\ if(packageList != null && packageList.size() > 0) { packageList.add("net.sourceforge.opencamera"); }' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist XXX: needs testing, broke boot last time -rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) +#rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps fi; diff --git a/Scripts/LineageOS-20.0/Patch.sh b/Scripts/LineageOS-20.0/Patch.sh index a5a66a44..0f48f1e4 100644 --- a/Scripts/LineageOS-20.0/Patch.sh +++ b/Scripts/LineageOS-20.0/Patch.sh @@ -194,7 +194,7 @@ sed -i 's/entry == null/entry == null || true/' core/java/android/os/RecoverySys sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/server/wm/ActivityTaskManagerService.java; #Disable partition fingerprint mismatch warnings XXX: TEMPORARY FIX sed -i 's/MAX_PASSWORD_LENGTH = 16/MAX_PASSWORD_LENGTH = 64/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS) sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often -rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) +#rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps fi;