Many changes

- Remove proprietary audio enhancement blobs
- Remove AudioFX to prevent crashes after blobs are removed
- Deduplicate patches a bit with the new Patches/Common directory
- Switch boot animation shine generation from gradient to plasma
- Update submodules
This commit is contained in:
Tad 2018-06-25 07:59:24 -04:00
parent 0eeea28907
commit f6cdc9426c
20 changed files with 20 additions and 901 deletions

View file

@ -246,7 +246,7 @@ deblobDevice() {
if [ "$DEBLOBBER_REPLACE_TIME" = false ]; then replaceTime="false"; fi; #Disable replacement
if [ -f Android.mk ]; then
#Some devices store these in a dedicated firmware partition, others in /system/vendor/firmware, either way the following are just symlinks
sed -i '/ALL_DEFAULT_INSTALLED_MODULES/s/$(CMN_SYMLINKS)//' Android.mk; #Remove CMN firmware
#sed -i '/ALL_DEFAULT_INSTALLED_MODULES/s/$(CMN_SYMLINKS)//' Android.mk; #Remove CMN firmware
sed -i '/ALL_DEFAULT_INSTALLED_MODULES/s/$(DXHDCP2_SYMLINKS)//' Android.mk; #Remove Discretix firmware
if [ "$DEBLOBBER_REMOVE_IMS" = true ]; then sed -i '/ALL_DEFAULT_INSTALLED_MODULES/s/$(IMS_SYMLINKS)//' Android.mk; fi; #Remove IMS firmware
sed -i '/ALL_DEFAULT_INSTALLED_MODULES/s/$(PLAYREADY_SYMLINKS)//' Android.mk; #Remove Microsoft Playready firmware

View file

@ -98,7 +98,8 @@ export -f generateBootAnimationMask;
generateBootAnimationShine() {
color=$1;
output=$2;
convert -size 1024x128 -define gradient:angle=90 gradient:"$color" \( +clone -flop \) +append "$output";
#convert -size 1024x128 -define gradient:angle=90 plasma:"$color" \( +clone -flop \) +append "$output";
convert -size 2048x128 plasma:"$color" "$output";
}
export -f generateBootAnimationShine;

View file

@ -117,7 +117,7 @@ sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools =
fi;
enterAndClear "packages/apps/FDroid";
cp "$patches/android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
cp "$patchesCommon/android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
sed -i 's|outputs/apk/|outputs/apk/release/|' Android.mk;
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
sed -i 's|/$(fdroid_dir) \&\&| \&\&|' Android.mk; #One line wouldn't work... no matter what I tried.
@ -194,23 +194,23 @@ if [ "$DEBLOBBER_REMOVE_AUDIOFX" = true ]; then
awk -i inplace '!/AudioFX/' config/common.mk;
awk -i inplace '!/AudioService/' config/common.mk;
fi;
cp "$patches/android_vendor_cm/sce.mk" config/sce.mk;
if [ "$MICROG_INCLUDED" = true ]; then cp "$patches/android_vendor_cm/sce-microG.mk" config/sce-microG.mk; fi;
cp "$patchesCommon/android_vendor_divested/sce.mk" config/sce.mk;
if [ "$MICROG_INCLUDED" = true ]; then cp "$patchesCommon/android_vendor_divested/sce-microG.mk" config/sce-microG.mk; fi;
if [ "$MICROG_INCLUDED" = true ]; then echo "include vendor/cm/config/sce-microG.mk" >> config/sce.mk; fi;
cp "$patches/android_vendor_cm/config.xml" overlay/common/vendor/cmsdk/cm/res/res/values/config.xml; #Per app performance profiles
cp -r "$patches/android_vendor_cm/firmware_deblobber" .;
cp -r "$patchesCommon/android_vendor_divested/firmware_deblobber" .;
cp "$patches/android_vendor_cm/firmware_deblobber.mk" build/tasks/firmware_deblobber.mk;
sed -i 's/CM_BUILDTYPE := UNOFFICIAL/CM_BUILDTYPE := dos/' config/common.mk; #Change buildtype
if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then sed -i 's/CM_BUILDTYPE := dos/CM_BUILDTYPE := dosNC/' config/common.mk; fi;
sed -i 's/messaging/Silence/' config/telephony.mk; #Replace AOSP Messaging app with Silence
#if [ "$HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += DNS66" >> config/sce.mk; fi; #Include DNS66 as an alternative
if [ "$HOSTS_BLOCKING" = false ]; then cp "$patches/android_vendor_cm/dns66.json" prebuilt/common/etc/dns66.json; fi;
if [ "$HOSTS_BLOCKING" = false ]; then cp "$patchesCommon/android_vendor_divested/dns66.json" prebuilt/common/etc/dns66.json; fi;
if [ "$HOSTS_BLOCKING" = false ]; then sed -i '4iPRODUCT_COPY_FILES += vendor/cm/prebuilt/common/etc/dns66.json:system/etc/dns66/settings.json' config/common.mk; fi; #Include DNS66 default config
enterAndClear "vendor/cmsdk";
awk -i inplace '!/WeatherManagerServiceBroker/' cm/res/res/values/config.xml; #Disable Weather
if [ "$DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/CMAudioService/' cm/res/res/values/config.xml; fi;
cp "$patches/cm_platform_sdk/profile_default.xml" cm/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
cp "$patchesCommon/android_lineage-sdk/profile_default.xml" cm/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
sed -i 's/shouldUseOptimizations(weight)/true/' cm/lib/main/java/org/cyanogenmod/platform/internal/PerformanceManagerService.java; #Per app performance profiles fix
#
#END OF ROM CHANGES

View file

@ -107,7 +107,7 @@ awk -i inplace '!/com.android.internal.R.bool.config_permissionReviewRequired/'
enterAndClear "lineage-sdk";
awk -i inplace '!/WeatherManagerServiceBroker/' lineage/res/res/values/config.xml; #Disable Weather
if [ "$DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAudioService/' lineage/res/res/values/config.xml; fi;
cp "$patches/android_lineage-sdk/profile_default.xml" lineage/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
cp "$patchesCommon/android_lineage-sdk/profile_default.xml" lineage/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
if [ "$MICROG_INCLUDED" = true ]; then
enterAndClear "packages/apps/FakeStore";
@ -117,7 +117,7 @@ sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools =
fi;
enterAndClear "packages/apps/FDroid";
cp "$patches/android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
cp "$patchesCommon/android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
sed -i 's|outputs/apk/|outputs/apk/release/|' Android.mk;
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
sed -i 's|/$(fdroid_dir) \&\&| \&\&|' Android.mk; #One line wouldn't work... no matter what I tried.
@ -196,16 +196,16 @@ awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/common.mk; #Remove extra
awk -i inplace '!/security\/lineage/' config/common.mk; #Remove extra keys
sed -i '3iinclude vendor/lineage/config/sce.mk' config/common.mk; #Include extra apps
if [ "$DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/AudioFX/' config/common.mk; fi;
cp "$patches/android_vendor_lineage/sce.mk" config/sce.mk;
if [ "$MICROG_INCLUDED" = true ]; then cp "$patches/android_vendor_lineage/sce-microG.mk" config/sce-microG.mk; fi;
cp "$patchesCommon/android_vendor_divested/sce.mk" config/sce.mk;
if [ "$MICROG_INCLUDED" = true ]; then cp "$patchesCommon/android_vendor_divested/sce-microG.mk" config/sce-microG.mk; fi;
if [ "$MICROG_INCLUDED" = true ]; then echo "include vendor/lineage/config/sce-microG.mk" >> config/sce.mk; fi;
cp -r "$patches/android_vendor_lineage/firmware_deblobber" .;
cp -r "$patchesCommon/android_vendor_divested/firmware_deblobber" .;
cp "$patches/android_vendor_lineage/firmware_deblobber.mk" build/tasks/firmware_deblobber.mk;
sed -i 's/LINEAGE_BUILDTYPE := UNOFFICIAL/LINEAGE_BUILDTYPE := dos/' config/common.mk; #Change buildtype
if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then sed -i 's/LINEAGE_BUILDTYPE := dos/LINEAGE_BUILDTYPE := dosNC/' config/common.mk; fi;
sed -i 's/messaging/Silence/' config/telephony.mk; #Replace AOSP Messaging app with Silence
#if [ "$HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += DNS66" >> config/sce.mk; fi; #Include DNS66 as an alternative
if [ "$HOSTS_BLOCKING" = false ]; then cp "$patches/android_vendor_lineage/dns66.json" prebuilt/common/etc/dns66.json; fi;
if [ "$HOSTS_BLOCKING" = false ]; then cp "$patchesCommon/android_vendor_divested/dns66.json" prebuilt/common/etc/dns66.json; fi;
if [ "$HOSTS_BLOCKING" = false ]; then sed -i '4iPRODUCT_COPY_FILES += vendor/lineage/prebuilt/common/etc/dns66.json:system/etc/dns66/settings.json' config/common.mk; fi; #Include DNS66 default config
#
#END OF ROM CHANGES

View file

@ -20,7 +20,7 @@
#START OF USER CONFIGURABLE OPTIONS
export androidWorkspace="/mnt/Drive-3/"; #XXX: THIS MUST BE CORRECT TO BUILD!
export DEBLOBBER_REMOVE_AUDIOFX=false; #Set true to remove AudioFX
export DEBLOBBER_REMOVE_AUDIOFX=true; #Set true to remove AudioFX
export DEBLOBBER_REMOVE_IMS=false; #Set true to remove all IMS blobs
export DEBLOBBER_REPLACE_TIME=false; #Set true to replace Qualcomm Time Services with the open source Sony TimeKeep reimplementation
export DEFAULT_DNS_PRESET="OpenNIC"; #Sets default DNS. Options: Cloudflare, OpenNIC, DNSWATCH, Google, OpenDNS, Quad9, Verisign
@ -36,7 +36,8 @@ export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion o
export REBRAND_NAME="DivestOS";
export REBRAND_ZIP_PREFIX="divested";
export REBRAND_BOOTANIMATION_FONT="Fira-Sans-Bold"; #Options: $ convert -list font
export REBRAND_BOOTANIMATION_COLOR="#FF5722-#FFAB91";
#export REBRAND_BOOTANIMATION_COLOR="#FF5722-#FF8A65"; #gradient
export REBRAND_BOOTANIMATION_COLOR="#FF5722-#03A9F4"; #plasma
export REBRAND_LEGAL="https://divestos.xyz/index.php?page=privacy_policy";
#END OF USER CONFIGURABLE OPTIONS
@ -55,6 +56,7 @@ if [ ! -d "$base" ]; then
fi;
export prebuiltApps=$androidWorkspace"PrebuiltApps/";
export patchesCommon=$androidWorkspace"Patches/Common/";
export patches=$androidWorkspace"Patches/$BUILD_WORKING_DIR/";
export cvePatchesLinux=$androidWorkspace"Patches/Linux/";
export cvePatchesAndroid=$androidWorkspace"Patches/Android/";