Remove more blobs

This commit is contained in:
Tad 2017-01-25 12:10:20 -05:00
parent 74e46b44da
commit 360adbdb66
2 changed files with 47 additions and 37 deletions

View File

@ -1,4 +1,4 @@
Last Updated: 01/21/2017
Last Updated: 01/24/2017
Credits: LineageOS, CyanogenMod, CopperheadOS, OmniROM, TeamWin, F-Droid, MicroG, EmojiOne, anarkia1976, bhb27, Daniel Micay, dirtyhank, Evisceration, Felipe de Leon, flar2, franciscofranco, hellsgod, mar-v-in, nikhil18, Paul Reioux, savoca, stefano.villa1976, WedyDQ10, XileForce
Warnings
@ -21,6 +21,7 @@ General Changes
- Hardened IPv4 and IPv6 stacks
- Hardened special file systems
- Hardened SQLite
- Nuked a bunch of proprietary blobs
- Nuked CMAnalytics from orbit
- Removed unnecessary/outdated/insecure packages.
- Replaced stock emoji font with EmojiOne (Standardized and Legible)

View File

@ -1,48 +1,57 @@
#!/bin/bash
base="/home/tad/Android/Build/LineageOS-14.1/"
deblob() {
deblob() { #TODO: GPS, IZat, Location Provider, Tether Extensions
dir=$1
blobList=$2;
cd $base$dir; #Enter the target directory
cp $blobList $blobList".bak"; #Make a backup
#
#START OF REMOVAL
#
#TODO: GPS, IZat, Location Provider, Tether Extensions, Wireless Display
#
#grep -vE "()" $blobList > $blobList".new";
blobs="";
#ATFWD
blobs+="ATFWD-daemon|atfwd.apk";
#Nuke CNE/DPM XXX: Requires unsetting 'BOARD_USES_QCNE' in BoardConfig.mk and 'persist.cne.feature'/'persist.dpm.feature' in system.prop. XXX: Breaks radio, requires hexediting
#grep -vE "(andsfCne.xml|ATT_profiles.xml|cnd|cneapiclient.jar|cneapiclient.xml|CNEService.apk|com.motorola.motosignature.jar|com.motorola.motosignature.xml|com.qti.dpmframework.jar|com.qti.dpmframework.xml|com.quicinc.cne.jar|com.quicinc.cne.xml|ConnectivityExt.jar|ConnectivityExt.xml|dpmapi.jar|dpmapi.xml|dpm.conf|dpmd|dpmserviceapp.apk|libcneapiclient.so|libcneconn.so|libcneqmiutils.so|libcne.so|libdpmframework.so|libdpmnsrm.so|libNimsWrap.so|libvendorconn.so|libwqe.so|NsrmConfiguration.xml|ROW_profiles.xml|SwimConfig.xml|VZW_profiles.xml)" $blobList > $blobList".new";
#mv $blobList".new" $blobList; #Move the new list into place
#CNE/DPM XXX: Requires unsetting 'BOARD_USES_QCNE' in BoardConfig.mk and 'persist.cne.feature'/'persist.dpm.feature' in system.prop. XXX: Breaks radio, requires hexediting
#blobs+="|andsfCne.xml|ATT_profiles.xml|cnd|cneapiclient.jar|cneapiclient.xml|CNEService.apk|com.qti.dpmframework.jar|com.qti.dpmframework.xml|com.quicinc.cne.jar|com.quicinc.cne.xml|ConnectivityExt.jar|ConnectivityExt.xml|dpmapi.jar|dpmapi.xml|dpm.conf|dpmd|dpmserviceapp.apk|libcneapiclient.so|libcneconn.so|libcneqmiutils.so|libcne.so|libdpmframework.so|libdpmnsrm.so|libNimsWrap.so|libvendorconn.so|libwqe.so|NsrmConfiguration.xml|ROW_profiles.xml|SwimConfig.xml|VZW_profiles.xml";
#Nuke DivX files
grep -vE "(dxhdcp2.b00|dxhdcp2.b01|dxhdcp2.b02|dxhdcp2.b03|dxhdcp2.mdt|libDxHdcp.so|libSHIMDivxDrm.so)" $blobList > $blobList".new";
#DivX
blobs+="|dxhdcp2.b00|dxhdcp2.b01|dxhdcp2.b02|dxhdcp2.b03|dxhdcp2.mdt|libDxHdcp.so|libSHIMDivxDrm.so";
#DRM XXX: Breaks FDE
#blobs+="|libdrmdecrypt.so|libdrmfs.so|libdrmtime.so|libtzdrmgenprov.so";
#Google Widevine
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|widevine.b00|widevine.b01|widevine.b02|widevine.b03|widevine.mdt";
#HDCP
blobs+="|libmm-hdcpmgr.so";
#IPACM
blobs+="|ipacm|ipacm-diag";
rm -rf data-ipa-cfg-mgr;
#Microsoft Playready
blobs+="|playread.b00|playread.b01|playread.b02|playread.b03|playread.mdt";
#Misc
blobs+="|libuiblur.so";
#Motorola
blobs+="|com.motorola.motosignature.jar|com.motorola.motosignature.xml|MotoSignatureApp.apk";
#Sprint
blobs+="|com.android.omadm.service.xml|ConnMO.apk|CQATest.apk|DCMO.apk|DiagMon.apk|DMConfigUpdate.apk|DMService.apk|GCS.apk|HiddenMenu.apk|libdmengine.so|libdmjavaplugin.so|LifetimeData.apk|SprintDM.apk|SprintHM.apk|whitelist_com.android.omadm.service.xml";
#Venus
#blobs+="|venus.b00|venus.b01|venus.b02|venus.b03|venus.b04|venus.mbn|venus.mdt";
#Verizon
blobs+="|com.verizon.apn.xml|com.verizon.embms.xml|com.verizon.provider.xml|VerizonUnifiedSettings.jar|VZWAPNLib.apk|VZWAPNService.apk|VZWAVS.apk|VzwLcSilent.apk|vzw_msdc_api.apk|VzwOmaTrigger.apk|vzw_sso_permissions.xml";
#Voice recognition
blobs+="|aonvr1.bin|aonvr2.bin|com.motorola.triggerenroll.xml|HotwordEnrollment.apk|librecoglib.so|libsupermodel.so|libtrainingcheck.so|TriggerEnroll.apk|TriggerTrainingService.apk";
grep -vE "($blobs)" $blobList > $blobList".new"; #Remove the bad blobs from the manifest
mv $blobList".new" $blobList; #Move the new list into place
#Nuke DRM files XXX: Breaks FDE
#grep -vE "(libmm-hdcpmgr.so|libdrmdecrypt.so|libdrmfs.so|libdrmtime.so|libtzdrmgenprov.so)" $blobList > $blobList".new";
#mv $blobList".new" $blobList; #Move the new list into place
#Nuke Microsoft Playready files
grep -vE "(playread.b00|playread.b01|playread.b02|playread.b03|playread.mdt)" $blobList > $blobList".new";
mv $blobList".new" $blobList; #Move the new list into place
#Nuke Sprint files
grep -vE "(com.android.omadm.service.xml|ConnMO.apk|CQATest.apk|DCMO.apk|DiagMon.apk|DMConfigUpdate.apk|DMService.apk|GCS.apk|HiddenMenu.apk|libdmengine.so|libdmjavaplugin.so|LifetimeData.apk|SprintDM.apk|SprintHM.apk|whitelist_com.android.omadm.service.xml)" $blobList > $blobList".new";
mv $blobList".new" $blobList; #Move the new list into place
#Nuke Verizon files
grep -vE "(com.verizon.apn.xml|com.verizon.embms.xml|com.verizon.provider.xml|VerizonUnifiedSettings.jar|VZWAPNLib.apk|VZWAPNService.apk|VZWAVS.apk|VzwLcSilent.apk|vzw_msdc_api.apk|VzwOmaTrigger.apk|vzw_sso_permissions.xml)" $blobList > $blobList".new";
mv $blobList".new" $blobList; #Move the new list into place
#Nuke Google Widevine files
grep -vE "(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|widevine.b00|widevine.b01|widevine.b02|widevine.b03|widevine.mdt)" $blobList > $blobList".new";
mv $blobList".new" $blobList; #Move the new list into place
#
#END OF REMOVAL
#
delta=$(($(wc -l < $blobList".bak") - $(wc -l < $blobList))); #Calculate the difference in size
echo "Removed "$delta" blobs from "$dir$blobList; #Inform the user
sh -c "cd $base$dir && ./setup-makefiles.sh"; #Update the makefiles