Deblobber: Remove sepolicy files too

This commit is contained in:
Tad 2018-06-16 18:41:22 -04:00
parent 79aa32c5e2
commit 60e5d491e9
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,8 @@
Little Kernel
Source: https://source.codeaurora.org/quic/la/kernel/lk/
Documentation
- https://developer.qualcomm.com/download/db410c/little-kernel-boot-loader-overview.pdf
Results: Was able to successfully compile for msm8974, did not test on real device
Tianocore EDK2
Source: https://source.codeaurora.org/quic/la/abl/tianocore/edk2/

View File

@ -34,12 +34,14 @@ echo "Deblobbing..."
makes=""; makes="";
overlay=""; overlay="";
kernels=""; #Delimited using " " kernels=""; #Delimited using " "
sepolicy="";
#ACDB (Audio Configurations) [Qualcomm] XXX: Breaks audio output #ACDB (Audio Configurations) [Qualcomm] XXX: Breaks audio output
#blobs=$blobs"acdb"; #blobs=$blobs"acdb";
#ADSP/Hexagon (Hardware Audio Decoding) [Qualcomm] #ADSP/Hexagon (Hardware Audio Decoding) [Qualcomm]
#blobs=$blobs".*adsprpc.*|libfastcvadsp_stub.so|libfastcvopt.so|libadsp_fd_skel.so"; #blobs=$blobs".*adsprpc.*|libfastcvadsp_stub.so|libfastcvopt.so|libadsp_fd_skel.so";
#sepolicy=$sepolicy" adspd.te adsprpcd.te";
#Alipay (Payment Platform) [Alibaba] #Alipay (Payment Platform) [Alibaba]
blobs=$blobs"alipay.*"; blobs=$blobs"alipay.*";
@ -49,6 +51,7 @@ echo "Deblobbing..."
#ATFWD [Qualcomm] #ATFWD [Qualcomm]
blobs=$blobs"|ATFWD-daemon|atfwd.apk"; blobs=$blobs"|ATFWD-daemon|atfwd.apk";
sepolicy=$sepolicy" atfwd.te";
#AudioFX (Audio Effects) [Qualcomm] XXX: Breaks audio on some devices #AudioFX (Audio Effects) [Qualcomm] XXX: Breaks audio on some devices
#blobs=$blobs"|libqcbassboost.so|libqcreverb.so|libqcvirt.so"; #blobs=$blobs"|libqcbassboost.so|libqcreverb.so|libqcvirt.so";
@ -68,6 +71,7 @@ echo "Deblobbing..."
#blobs=$blobs"|libcneapiclient.so|libNimsWrap.so"; #XXX: Breaks radio #blobs=$blobs"|libcneapiclient.so|libNimsWrap.so"; #XXX: Breaks radio
blobs=$blobs"|andsfCne.xml|ATT_profile.*.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|libvendorconn.so|libwqe.so|profile1.xml|profile2.xml|profile3.xml|profile4.xml|profile5.xml|ROW_profile.*.xml|SwimConfig.xml|VZW_profile.*.xml"; blobs=$blobs"|andsfCne.xml|ATT_profile.*.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|libvendorconn.so|libwqe.so|profile1.xml|profile2.xml|profile3.xml|profile4.xml|profile5.xml|ROW_profile.*.xml|SwimConfig.xml|VZW_profile.*.xml";
makes=$makes"libcnefeatureconfig"; makes=$makes"libcnefeatureconfig";
sepolicy=$sepolicy" cnd.te qcneservice.te";
#Diagnostics [Qualcomm] #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"; 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";
@ -88,12 +92,14 @@ echo "Deblobbing..."
#DPM (Data Power Management) [Qualcomm] #DPM (Data Power Management) [Qualcomm]
blobs=$blobs"|com.qti.dpmframework.jar|com.qti.dpmframework.xml|dpmapi.jar|dpmapi.xml|dpm.conf|dpmd|dpmserviceapp.apk|libdpmctmgr.so|libdpmfdmgr.so|libdpmframework.so|libdpmnsrm.so|libdpmtcm.so|NsrmConfiguration.xml|tcmclient.jar"; blobs=$blobs"|com.qti.dpmframework.jar|com.qti.dpmframework.xml|dpmapi.jar|dpmapi.xml|dpm.conf|dpmd|dpmserviceapp.apk|libdpmctmgr.so|libdpmfdmgr.so|libdpmframework.so|libdpmnsrm.so|libdpmtcm.so|NsrmConfiguration.xml|tcmclient.jar";
sepolicy=$sepolicy" dpmd.te";
#DRM #DRM
blobs=$blobs"|lib-sec-disp.so|libSecureUILib.so|libsecureui.so|libsecureuisvc_jni.so|libsecureui_svcsock.so"; blobs=$blobs"|lib-sec-disp.so|libSecureUILib.so|libsecureui.so|libsecureuisvc_jni.so|libsecureui_svcsock.so";
blobs=$blobs"|liboemcrypto.so|libtzdrmgenprov.so"; blobs=$blobs"|liboemcrypto.so|libtzdrmgenprov.so";
blobs=$blobs"|libpvr.so|librmp.so|libsi.so|libSSEPKCS11.so"; blobs=$blobs"|libpvr.so|librmp.so|libsi.so|libSSEPKCS11.so";
makes=$makes"android.hardware.drm.*"; makes=$makes"android.hardware.drm.*";
sepolicy=$sepolicy" drmserver.te hal_drm_default.te hal_drm.te hal_drm_widevine.te mediadrmserver.te";
#Face Unlock [Google] #Face Unlock [Google]
blobs=$blobs"|libfacenet.so|libfilterpack_facedetect.so|libfrsdk.so"; blobs=$blobs"|libfacenet.so|libfilterpack_facedetect.so|libfrsdk.so";
@ -119,6 +125,7 @@ echo "Deblobbing..."
blobs=$blobs"|ims_rtp_daemon|lib-rtpcommon.so|lib-rtpcore.so|lib-rtpdaemoninterface.so|lib-rtpsl.so"; #RTP blobs=$blobs"|ims_rtp_daemon|lib-rtpcommon.so|lib-rtpcore.so|lib-rtpdaemoninterface.so|lib-rtpsl.so"; #RTP
blobs=$blobs"|lib-dplmedia.so|librcc.so|libvcel.so|libvoice-svc.so|qti_permissions.xml"; #Misc. blobs=$blobs"|lib-dplmedia.so|librcc.so|libvcel.so|libvoice-svc.so|qti_permissions.xml"; #Misc.
if [ "$DEBLOBBER_REMOVE_IMS" = true ]; then blobs=$blobs"|volte_modem[/]"; fi; if [ "$DEBLOBBER_REMOVE_IMS" = true ]; then blobs=$blobs"|volte_modem[/]"; fi;
if [ "$DEBLOBBER_REMOVE_IMS" = true ]; then sepolicy=$sepolicy" ims.te imscm.te imswmsproxy.te"; fi;
#IPA (Internet Packet Accelerator) [Qualcomm] #IPA (Internet Packet Accelerator) [Qualcomm]
#This is actually open source (excluding -diag) #This is actually open source (excluding -diag)
@ -188,6 +195,7 @@ echo "Deblobbing..."
if [ "$DEBLOBBER_REPLACE_TIME" = true ]; then if [ "$DEBLOBBER_REPLACE_TIME" = true ]; then
#blobs=$blobs"|libtime_genoff.so"; #XXX: Breaks radio #blobs=$blobs"|libtime_genoff.so"; #XXX: Breaks radio
blobs=$blobs"|libTimeService.so|time_daemon|TimeService.apk"; blobs=$blobs"|libTimeService.so|time_daemon|TimeService.apk";
sepolicy=$sepolicy" qtimeservice.te";
fi; fi;
#Venus (Hardware Video Decoding) [Qualcomm] #Venus (Hardware Video Decoding) [Qualcomm]
@ -218,6 +226,7 @@ echo "Deblobbing..."
export makes; export makes;
export overlay; export overlay;
export kernels; export kernels;
export sepolicy;
# #
#END OF BLOBS ARRAY #END OF BLOBS ARRAY
# #
@ -352,6 +361,17 @@ deblobKernel() {
} }
export -f deblobKernel; export -f deblobKernel;
deblobSepolicy() {
sepolicyPath=$1;
cd $base$sepolicyPath;
if [ -d sepolicy ]; then
cd sepolicy;
rm -f $sepolicy;
fi;
cd $base;
}
export -f deblobSepolicy;
deblobVendors() { deblobVendors() {
cd $base; cd $base;
find vendor -regextype posix-extended -regex '.*('$blobs')' -type f -delete; #Delete all blobs find vendor -regextype posix-extended -regex '.*('$blobs')' -type f -delete; #Delete all blobs
@ -373,6 +393,7 @@ export -f deblobVendor;
#START OF DEBLOBBING #START OF DEBLOBBING
# #
find device -maxdepth 2 -mindepth 2 -type d -exec bash -c 'deblobDevice "$0"' {} \; #Deblob all device directories find device -maxdepth 2 -mindepth 2 -type d -exec bash -c 'deblobDevice "$0"' {} \; #Deblob all device directories
find device -maxdepth 3 -mindepth 2 -type d -exec bash -c 'deblobSepolicy "$0"' {} \; #Deblob all device sepolicy directories
#find kernel -maxdepth 2 -mindepth 2 -type d -exec bash -c 'deblobKernel "$0"' {} \; #Deblob all kernel directories #find kernel -maxdepth 2 -mindepth 2 -type d -exec bash -c 'deblobKernel "$0"' {} \; #Deblob all kernel directories
find vendor -name "*vendor*.mk" -type f -exec bash -c 'deblobVendor "$0"' {} \; #Deblob all makefiles find vendor -name "*vendor*.mk" -type f -exec bash -c 'deblobVendor "$0"' {} \; #Deblob all makefiles
deblobVendors; #Deblob entire vendor directory deblobVendors; #Deblob entire vendor directory