mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-27 00:19:26 -05:00
Remove more blobs, delete old patches
This commit is contained in:
parent
a5d3a9a8b4
commit
d39c8339b9
@ -1,68 +0,0 @@
|
||||
From 755b36c6f5e6feaac20112e0819299f63be3553d Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 18:22:00 -0500
|
||||
Subject: [PATCH] Remove Widevine and disable DRM server
|
||||
|
||||
Change-Id: I24d3ba704d00d85747d851a9a497dd577ad03b5f
|
||||
---
|
||||
Android.mk | 10 +---------
|
||||
proprietary-files.txt | 2 --
|
||||
system.prop | 2 +-
|
||||
3 files changed, 2 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index a69917c..693cba1 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -52,14 +52,6 @@ $(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /system/vendor/lib64/$(notdir $@) $@
|
||||
|
||||
-WV_IMAGES := widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt
|
||||
-WV_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WV_IMAGES)))
|
||||
-$(WV_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
- @echo "Widevine firmware link: $@"
|
||||
- @mkdir -p $(dir $@)
|
||||
- @rm -rf $@
|
||||
- $(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
-
|
||||
FIRMWARE_FILES := firmware fsg
|
||||
FIRMWARE_SYMLINKS := $(addprefix $(TARGET_OUT)/rfs/msm/mpss/readonly/,$(notdir $(FIRMWARE_FILES)))
|
||||
$(FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@@ -68,6 +60,6 @@ $(FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /$(notdir $@) $@
|
||||
|
||||
-ALL_DEFAULT_INSTALLED_MODULES += $(PERSIST_WCNSS) $(WCNSS_CFG_INI) $(IMS_SYMLINKS) $(WV_SYMLINKS) $(FIRMWARE_SYMLINKS)
|
||||
+ALL_DEFAULT_INSTALLED_MODULES += $(PERSIST_WCNSS) $(WCNSS_CFG_INI) $(IMS_SYMLINKS) $(FIRMWARE_SYMLINKS)
|
||||
|
||||
endif
|
||||
diff --git a/proprietary-files.txt b/proprietary-files.txt
|
||||
index 3675ce9..45dd63b 100644
|
||||
--- a/proprietary-files.txt
|
||||
+++ b/proprietary-files.txt
|
||||
@@ -293,8 +293,6 @@ vendor/lib64/libqti-iop-client.so
|
||||
# DRM
|
||||
# TZBSP
|
||||
bin/qseecomd
|
||||
-etc/permissions/com.google.widevine.software.drm.xml
|
||||
-framework/com.google.widevine.software.drm.jar
|
||||
lib/hw/keystore.qcom.so
|
||||
lib64/hw/keystore.qcom.so
|
||||
vendor/lib/libdrmfs.so
|
||||
diff --git a/system.prop b/system.prop
|
||||
index 6b1967c..4124bd4 100644
|
||||
--- a/system.prop
|
||||
+++ b/system.prop
|
||||
@@ -56,7 +56,7 @@ dalvik.vm.dex2oat-threads=2
|
||||
dalvik.vm.image-dex2oat-threads=4
|
||||
|
||||
# DRM
|
||||
-drm.service.enabled=true
|
||||
+drm.service.enabled=false
|
||||
|
||||
# FM
|
||||
ro.fm.transmitter=false
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 5debdc1dd573384f7a1556a6db2d6960bd7259c5 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 17 Nov 2016 16:35:14 -0500
|
||||
Subject: [PATCH] Remove Widevine
|
||||
|
||||
Change-Id: I531feb804092b596af47e75530fa88b5c85f628a
|
||||
---
|
||||
Android.mk | 24 ------------------------
|
||||
1 file changed, 24 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index dde02c7..08fc62e 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -124,30 +124,6 @@ $(MC_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(MC_SYMLINKS)
|
||||
|
||||
-PLAYREADY_IMAGES := \
|
||||
- playread.b00 playread.b01 playread.b02 playread.b03 playread.mdt
|
||||
-
|
||||
-PLAYREADY_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(PLAYREADY_IMAGES)))
|
||||
-$(PLAYREADY_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
- @echo "Playready firmware link: $@"
|
||||
- @mkdir -p $(dir $@)
|
||||
- @rm -rf $@
|
||||
- $(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
-
|
||||
-ALL_DEFAULT_INSTALLED_MODULES += $(PLAYREADY_SYMLINKS)
|
||||
-
|
||||
-WV_IMAGES := \
|
||||
- widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt
|
||||
-
|
||||
-WV_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WV_IMAGES)))
|
||||
-$(WV_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
- @echo "Widevine firmware link: $@"
|
||||
- @mkdir -p $(dir $@)
|
||||
- @rm -rf $@
|
||||
- $(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
-
|
||||
-ALL_DEFAULT_INSTALLED_MODULES += $(WV_SYMLINKS)
|
||||
-
|
||||
# Create links for audcal data files
|
||||
$(shell mkdir -p $(TARGET_OUT)/etc/firmware/wcd9320; \
|
||||
ln -sf /data/misc/audio/wcd9320_anc.bin \
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,53 +0,0 @@
|
||||
From af0eabf8ee0d6e3a677f0f4e2e7339a44f635586 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Wed, 26 Oct 2016 21:26:42 -0400
|
||||
Subject: [PATCH] Enable LTE
|
||||
|
||||
Change-Id: Ia918caa4bdde40807a24b157f8a825bfb501d351
|
||||
---
|
||||
overlay/frameworks/base/core/res/res/values/config.xml | 2 +-
|
||||
overlay/frameworks/base/packages/SystemUI/res/values/config.xml | 3 +++
|
||||
overlay/packages/services/Telephony/res/values/config.xml | 3 +++
|
||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
index 7029fe9..807ad28 100644
|
||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
@@ -224,7 +224,7 @@
|
||||
Empty is viewed as "all". Only used on devices which
|
||||
don't support RIL_REQUEST_GET_RADIO_CAPABILITY
|
||||
format is UMTS|LTE|... -->
|
||||
- <string translatable="false" name="config_radio_access_family">GSM | WCDMA | LTE</string>
|
||||
+ <string translatable="false" name="config_radio_access_family">GPRS|EDGE|UMTS|HSDPA|HSUPA|HSPA|LTE|HSPAP|GSM|WCDMA</string>
|
||||
|
||||
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
|
||||
<bool name="config_cellBroadcastAppLinks">true</bool>
|
||||
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
|
||||
index f9febfe..e41fbaf 100644
|
||||
--- a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
|
||||
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
|
||||
@@ -40,5 +40,8 @@
|
||||
|
||||
<!-- Doze: shake accelerometer threshold -->
|
||||
<integer name="doze_shake_accelerometer_threshold">10</integer>
|
||||
+
|
||||
+ <!-- Show enabled lte option for lte device -->
|
||||
+ <bool name="config_enabled_lte" translatable="false">true</bool>
|
||||
</resources>
|
||||
|
||||
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
|
||||
index af352a4..22c65ea 100644
|
||||
--- a/overlay/packages/services/Telephony/res/values/config.xml
|
||||
+++ b/overlay/packages/services/Telephony/res/values/config.xml
|
||||
@@ -21,4 +21,7 @@
|
||||
are routed through the android.media.AudioManager class (true) or through
|
||||
the com.android.internal.telephony.Phone interface (false). -->
|
||||
<bool name="send_mic_mute_to_AudioManager">true</bool>
|
||||
+
|
||||
+ <!-- Show enabled lte option for lte device -->
|
||||
+ <bool name="config_enabled_lte" translatable="false">true</bool>
|
||||
</resources>
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 0452d58f2085dfb1414e768d30ee622da23df4a5 Mon Sep 17 00:00:00 2001
|
||||
From: kldoc <fred.berbigier@gmail.com>
|
||||
Date: Sat, 22 Oct 2016 11:58:35 +0800
|
||||
Subject: [PATCH] Camera HAL V1
|
||||
|
||||
Create a flag to revert commit https://github.com/omnirom/android_frameworks_av/commit/9501a1e1ff0a173cd85c59723ba458d07e1fca96
|
||||
This is needed to fix video recording on devices using Camera HAL V1
|
||||
|
||||
Change-Id: Icaae2772592eb3d1e74071f91fd6259b1662a9de
|
||||
---
|
||||
media/libstagefright/Android.mk | 5 +++++
|
||||
media/libstagefright/CameraSource.cpp | 5 ++++-
|
||||
services/camera/libcameraservice/Android.mk | 4 ++++
|
||||
services/camera/libcameraservice/api1/CameraClient.cpp | 2 ++
|
||||
4 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
|
||||
index 50f6962..0d9a5b7 100644
|
||||
--- a/media/libstagefright/Android.mk
|
||||
+++ b/media/libstagefright/Android.mk
|
||||
@@ -147,6 +147,11 @@ endif
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow
|
||||
|
||||
+ifeq ($(TARGET_HAS_CAMERA_HAL_V1),true)
|
||||
+ LOCAL_CFLAGS += -DTARGET_HAS_CAMERA_HAL_V1
|
||||
+endif
|
||||
+
|
||||
+
|
||||
LOCAL_MODULE:= libstagefright
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
|
||||
index 0e2fb41..bd71e5f 100644
|
||||
--- a/media/libstagefright/CameraSource.cpp
|
||||
+++ b/media/libstagefright/CameraSource.cpp
|
||||
@@ -1138,10 +1138,13 @@ void CameraSource::releaseRecordingFrameHandle(native_handle_t* handle) {
|
||||
int64_t token = IPCThreadState::self()->clearCallingIdentity();
|
||||
mCamera->releaseRecordingFrameHandle(handle);
|
||||
IPCThreadState::self()->restoreCallingIdentity(token);
|
||||
- } else {
|
||||
+ }
|
||||
+ #ifndef TARGET_HAS_CAMERA_HAL_V1
|
||||
+ else {
|
||||
native_handle_close(handle);
|
||||
native_handle_delete(handle);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
|
||||
void CameraSource::recordingFrameHandleCallbackTimestamp(int64_t timestampUs,
|
||||
diff --git a/services/camera/libcameraservice/Android.mk b/services/camera/libcameraservice/Android.mk
|
||||
index ebe65e4..f00459a 100644
|
||||
--- a/services/camera/libcameraservice/Android.mk
|
||||
+++ b/services/camera/libcameraservice/Android.mk
|
||||
@@ -81,4 +81,8 @@ LOCAL_CFLAGS += -Wall -Wextra -Werror
|
||||
|
||||
LOCAL_MODULE:= libcameraservice
|
||||
|
||||
+ifeq ($(TARGET_HAS_CAMERA_HAL_V1),true)
|
||||
+ LOCAL_CFLAGS += -DTARGET_HAS_CAMERA_HAL_V1
|
||||
+endif
|
||||
+
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp
|
||||
index 0d87fdd..f8a6e38 100644
|
||||
--- a/services/camera/libcameraservice/api1/CameraClient.cpp
|
||||
+++ b/services/camera/libcameraservice/api1/CameraClient.cpp
|
||||
@@ -524,8 +524,10 @@ void CameraClient::releaseRecordingFrameHandle(native_handle_t *handle) {
|
||||
|
||||
mHardware->releaseRecordingFrame(dataPtr);
|
||||
|
||||
+ #ifndef TARGET_HAS_CAMERA_HAL_V1
|
||||
native_handle_close(handle);
|
||||
native_handle_delete(handle);
|
||||
+ #endif
|
||||
}
|
||||
|
||||
status_t CameraClient::setVideoBufferMode(int32_t videoBufferMode) {
|
||||
--
|
||||
2.9.3
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#Goal: Remove as many proprietary blobs without breaking core functionality
|
||||
#Outcome: Increased battery/performance/privacy/security, Decreased ROM size
|
||||
#TODO: Automate TimeKeep replacing, Clean Android.mk, Clean init*.rc files, Create TWRP version, Remove more variants
|
||||
#TODO: Automate TimeKeep replacing, Clean init*.rc files, Create TWRP version, Remove more variants
|
||||
|
||||
#
|
||||
#Device Status (Tested under LineageOS 14.1)
|
||||
@ -137,6 +137,10 @@ export base;
|
||||
deblobDevice() {
|
||||
devicePath=$1;
|
||||
cd $base$devicePath;
|
||||
if [ -f Android.mk ]; then
|
||||
sed -i 's/$(PLAYREADY_SYMLINKS)//' Android.mk; #Don't ship Microsoft Playready (DRM) firmware
|
||||
sed -i 's/$(WV_SYMLINKS)//' Android.mk; #Don't ship Google Widevine (DRM) firmware
|
||||
fi;
|
||||
if [ -f BoardConfig.mk ]; then
|
||||
sed -i 's/BOARD_USES_QCNE := true/BOARD_USES_QCNE := false/' BoardConfig.mk; #Disable CNE
|
||||
fi;
|
||||
@ -148,7 +152,7 @@ deblobDevice() {
|
||||
if ! grep -q "drm.service.enabled=false" system.prop; then echo "drm.service.enabled=false" >> system.prop; fi; #Disable DRM server
|
||||
fi;
|
||||
rm -rf data-ipa-cfg-mgr; #Remove the second half of IPACM
|
||||
rm -rf libshimwvm; #Remove the Widevine compatibility module
|
||||
rm -rf libshimwvm; #Remove the Google Widevine (DRM) compatibility module
|
||||
if [ -f setup-makefiles.sh ]; then
|
||||
awk -i inplace '!/'$blobs'/' *proprietary*.txt; #Remove all blob references from blob manifest
|
||||
sh -c "cd $base$devicePath && ./setup-makefiles.sh"; #Update the makefiles
|
||||
|
@ -106,7 +106,6 @@ rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig core
|
||||
#
|
||||
enter "device/motorola/clark"
|
||||
enableDexPreOpt
|
||||
patch -p1 < $patches"android_device_motorola_clark/0004-Remove_Widevine.patch" #Removes Google Widevine and disables the DRM server
|
||||
|
||||
enter "kernel/motorola/msm8992"
|
||||
patch -p1 < $patches"android_kernel_motorola_msm8992/0001-OverUnderClock.patch" #a57: 1.82Ghz -> 2.01Ghz, a53 1.44Ghz -> 1.63Ghz, 384Mhz -> 300Mhz =+1.14Ghz TODO: Enable by default
|
||||
@ -114,7 +113,6 @@ patch -p1 < $patches"android_kernel_motorola_msm8992/0002-MMC_Tweak.patch" #Impr
|
||||
|
||||
enter "device/oneplus/bacon"
|
||||
enableDexPreOpt
|
||||
patch -p1 < $patches"android_device_oneplus_bacon/0001-Remove_DRM.patch" #Removes Microsoft PlayReady and Google Widevine
|
||||
|
||||
enter "kernel/oneplus/msm8974"
|
||||
#patch -p1 < $patches"android_kernel_oneplus_msm8974/0001-OverUnderClock.patch" #300Mhz -> 268Mhz, 2.45Ghz -> 2.88Ghz =+1.72Ghz
|
||||
|
Loading…
Reference in New Issue
Block a user