mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-01-24 06:11:13 -05:00
Remove more blobs
This commit is contained in:
parent
4358c37749
commit
faa11e313e
@ -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 init*.rc files, Create TWRP version, Remove fingerprint blobs?, Remove more variants, Remove WiPower from device.mk
|
||||
#TODO: Automate TimeKeep replacing, Clean init*.rc files, Create TWRP version, Remove more variants
|
||||
|
||||
#
|
||||
#Device Status (Tested under LineageOS 14.1)
|
||||
@ -17,6 +17,7 @@ export base;
|
||||
#START OF BLOBS ARRAY
|
||||
#
|
||||
blobs="";
|
||||
makes="";
|
||||
|
||||
#ACDB (Audio Configurations) [Qualcomm] XXX: Breaks audio output
|
||||
#blobs=$blobs"acdb";
|
||||
@ -49,6 +50,7 @@ export base;
|
||||
#CNE (Automatic Cell/Wi-Fi Switching) [Qualcomm]
|
||||
#blobs=$blobs"|libcneapiclient.so"; #XXX: Breaks radio
|
||||
blobs=$blobs"|andsfCne.xml|ATT_profile1.xml|ATT_profile2.xml|ATT_profile3.xml|ATT_profile4.xml|ATT_profiles.xml|cnd|cneapiclient.jar|cneapiclient.xml|CNEService.apk|com.quicinc.cne.jar|com.quicinc.cne.xml|ConnectivityExt.jar|ConnectivityExt.xml|libcneconn.so|libcneqmiutils.so|libcne.so|libNimsWrap.so|libvendorconn.so|libwqe.so|profile1.xml|profile2.xml|profile3.xml|profile4.xml|profile5.xml|ROW_profile1.xml|ROW_profile2.xml|ROW_profile3.xml|ROW_profile4.xml|ROW_profile5.xml|ROW_profiles.xml|SwimConfig.xml|VZW_profile1.xml|VZW_profile2.xml|VZW_profile3.xml|VZW_profile4.xml|VZW_profile5.xml|VZW_profile6.xml|VZW_profiles.xml";
|
||||
makes=$makes"|libcnefeatureconfig";
|
||||
|
||||
#Diagnostics [Qualcomm]
|
||||
blobs=$blobs"|[/]diag[/]|diag_callback_client|diag_dci_sample|diag_klog|diag_mdlog|diag_mdlog-getlogs|diag_mdlog-wrap|diag[/]mdm|diag_qshrink4_daemon|diag_socket_log|diag_uart_log|drmdiagapp|ibdrmdiag.so|ssr_diag|test_diag";
|
||||
@ -91,6 +93,7 @@ export base;
|
||||
|
||||
#IPACM (Loadbalances traffic between Cell/Wi-Fi) [Qualcomm]
|
||||
blobs=$blobs"|ipacm|ipacm-diag";
|
||||
makes=$makes"|ipacm|IPACM_cfg.xml";
|
||||
|
||||
#Location (gpsOne/gpsOneXTRA/IZat/Lumicast/QUIP) [Qualcomm]
|
||||
blobs=$blobs"|com.qti.location.sdk.jar|com.qti.location.sdk.xml|com.qualcomm.location.apk|com.qualcomm.location.vzw_library.jar|com.qualcomm.location.vzw_library.xml|com.qualcomm.location.xml|gpsone_daemon|izat.conf|izat.xt.srv.jar|izat.xt.srv.xml|libalarmservice_jni.so|libasn1cper.so|libasn1crt.so|libasn1crtx.so|libdataitems.so|libdrplugin_client.so|libDRPlugin.so|libevent_observer.so|libgdtap.so|libgeofence.so|libizat_core.so|liblbs_core.so|liblocationservice_glue.so|liblocationservice.so|libloc_ext.so|libloc_xtra.so|liblowi_client.so|liblowi_wifihal_nl.so|liblowi_wifihal.so|libquipc_os_api.so|libquipc_ulp_adapter.so|libulp2.so|libxtadapter.so|libxt_native.so|libxtwifi_ulp_adaptor.so|libxtwifi_zpp_adaptor.so|location-mq|loc_launcher|lowi.conf|lowi-server|slim_ap_daemon|slim_daemon|xtra_t_app.apk|xtwifi-client|xtwifi-inet-agent";
|
||||
@ -100,6 +103,7 @@ export base;
|
||||
|
||||
#[Motorola]
|
||||
blobs=$blobs"|AppDirectedSMSProxy.apk|BuaContactAdapter.apk|batt_health|com.motorola.DirectedSMSProxy.xml|com.motorola.motosignature.jar|com.motorola.motosignature.xml|com.motorola.camera.xml|com.motorola.gallery.xml|com.motorola.triggerenroll.xml|MotoDisplayFWProxy.apk|MotoSignatureApp.apk|TriggerEnroll.apk|TriggerTrainingService.apk";
|
||||
makes=$makes"|com.motorola.cameraone.xml";
|
||||
|
||||
#Performance Profiles [Qualcomm]
|
||||
#blobs=$blobs"|libqti-perfd-client.so|mpdecision|msm_irqbalance|perfd|perf-profile0.conf|perf-profile1.conf|perf-profile2.conf|perf-profile3.conf|perf-profile4.conf|perf-profile5.conf";
|
||||
@ -142,9 +146,11 @@ export base;
|
||||
|
||||
#Widevine (DRM) [Google]
|
||||
blobs=$blobs"|com.google.widevine.software.drm.jar|com.google.widevine.software.drm.xml|libdrmwvmplugin.so|libwvdrmengine.so|libwvdrm_L1.so|libwvdrm_L3.so|libwvm.so|libWVphoneAPI.so|libWVStreamControlAPI_L1.so|libWVStreamControlAPI_L3.so|tzwidevine.b00|tzwidevine.b01|tzwidevine.b02|tzwidevine.b03|tzwidevine.mdt|widevine.b00|widevine.b01|widevine.b02|widevine.b03|widevine.b04|widevine.b05|widevine.b06|widevine.mbn|widevine.mdt";
|
||||
makes=$makes"|libshim_wvm";
|
||||
|
||||
#WiPower (Wireless Charging) [Qualcomm]
|
||||
blobs=$blobs"|a4wpservice.apk|com.quicinc.wbc.jar|com.quicinc.wbcserviceapp.apk|com.quicinc.wbcservice.jar|com.quicinc.wbcservice.xml|com.quicinc.wbc.xml|libwbc_jni.so|wbc_hal.default.so";
|
||||
makes=$makes"|android.wipower|android.wipower.xml|com.quicinc.wbcserviceapps|libwipower_jni|wipowerservice"
|
||||
|
||||
export blobs;
|
||||
#
|
||||
@ -169,6 +175,10 @@ deblobDevice() {
|
||||
sed -i 's/BOARD_USES_QCNE := true/BOARD_USES_QCNE := false/' BoardConfig.mk; #Disable CNE
|
||||
sed -i 's/BOARD_USES_WIPOWER := true/BOARD_USES_WIPOWER := false/' BoardConfig.mk; #Disable WiPower
|
||||
fi;
|
||||
if [ -f device.mk || -f "${PWD##*/}".mk ]; then
|
||||
awk -i inplace '!/'$makes'/' device.mk; #Remove all shim references from device makefile
|
||||
awk -i inplace '!/'$makes'/' "${PWD##*/}".mk; #Remove all shim references from device makefile
|
||||
fi;
|
||||
if [ -f system.prop ]; then
|
||||
if ! grep -q "drm.service.enabled=false" system.prop; then echo "drm.service.enabled=false" >> system.prop; fi; #Disable DRM server
|
||||
sed -i 's/persist.bt.enableAptXHD=true/persist.bt.enableAptXHD=false/' system.prop; #Disable aptX
|
||||
@ -191,15 +201,6 @@ deblobDevice() {
|
||||
sed -i 's/persist.rcs.supported=./persist.rcs.supported=0/' system.prop;
|
||||
sed -i 's/persist.volte_enabled_by_hw=./persist.volte_enabled_by_hw=0/' system.prop;
|
||||
fi;
|
||||
if [ -f overlay/frameworks/base/core/res/res/values/config.xml ]; then
|
||||
sed -i 's|<bool name="config_uiBlurEnabled">true</bool>|<bool name="config_uiBlurEnabled">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml; #Disable UIBlur
|
||||
#Disable IMS
|
||||
sed -i 's|<bool name="config_carrier_volte_available">true</bool>|<bool name="config_carrier_volte_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_carrier_vt_available">true</bool>|<bool name="config_carrier_vt_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_device_volte_available">true</bool>|<bool name="config_device_volte_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_device_vt_available">true</bool>|<bool name="config_device_vt_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_device_wfc_ims_available">true</bool>|<bool name="config_device_wfc_ims_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
fi;
|
||||
if [ -f init/init_*.cpp ]; then
|
||||
#Disable IMS
|
||||
sed -i 's/property_set("persist.ims.volte", "true");/property_set("persist.ims.volte", "false");/' init/init_*.cpp;
|
||||
@ -210,6 +211,15 @@ deblobDevice() {
|
||||
sed -i 's/property_set("persist.radio.VT_HYBRID_ENABLE", ".");/property_set("persist.radio.VT_HYBRID_ENABLE", "0");/' init/init_*.cpp;
|
||||
sed -i 's/property_set("persist.rcs.supported", ".");/property_set("persist.rcs.supported", "1");/' init/init_*.cpp;
|
||||
fi;
|
||||
if [ -f overlay/frameworks/base/core/res/res/values/config.xml ]; then
|
||||
sed -i 's|<bool name="config_uiBlurEnabled">true</bool>|<bool name="config_uiBlurEnabled">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml; #Disable UIBlur
|
||||
#Disable IMS
|
||||
sed -i 's|<bool name="config_carrier_volte_available">true</bool>|<bool name="config_carrier_volte_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_carrier_vt_available">true</bool>|<bool name="config_carrier_vt_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_device_volte_available">true</bool>|<bool name="config_device_volte_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_device_vt_available">true</bool>|<bool name="config_device_vt_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
sed -i 's|<bool name="config_device_wfc_ims_available">true</bool>|<bool name="config_device_wfc_ims_available">false</bool>|' overlay/frameworks/base/core/res/res/values/config.xml;
|
||||
fi;
|
||||
rm -f rootdir/etc/init.qti.ims.sh #Remove IMS startup script
|
||||
#rm -rf telephony/ims; #Remove ims-common
|
||||
rm -rf IMSEnabler; #Remove IMS compatibility module
|
||||
|
@ -22,7 +22,7 @@ ANDROID_HOME="/mnt/adw/Android/SDK"
|
||||
#Download some out-of-tree files for use later on
|
||||
mkdir -p /tmp/ar
|
||||
cd /tmp/ar
|
||||
wget https://spotco.us/hosts -N #XXX: Hosts is built from non-commercial use files, switch to /hsc for release
|
||||
wget https://spotco.us/hosts -N #XXX: /hosts is built from non-commercial use files, switch to /hsc for release
|
||||
wget https://github.com/Ranks/emojione/raw/master/extras/fonts/emojione-android.ttf -N #XXX: Requires attribuition
|
||||
|
||||
#Accept all SDK licences, not normally needed but Gradle managed apps fail without it
|
||||
|
Loading…
Reference in New Issue
Block a user