mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-27 00:19:26 -05:00
Remove User-Agent (and serial) from source built libloc
Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
14c191ffb5
commit
6d2a255eef
@ -492,13 +492,24 @@ volteOverride() {
|
|||||||
}
|
}
|
||||||
export -f volteOverride;
|
export -f volteOverride;
|
||||||
|
|
||||||
hardenLocationSepolicy() {
|
hardenLocationSerials() {
|
||||||
#Prevent Qualcomm location stack from reading chipset serial number
|
#Prevent Qualcomm location stack from sending chipset serial number
|
||||||
|
|
||||||
|
#Devices using blob xtra-daemon (which Deblob.sh removes)
|
||||||
find device -name "hal_gnss*.te" -type f -exec sh -c "awk -i inplace '!/sysfs_soc/' {}" \;
|
find device -name "hal_gnss*.te" -type f -exec sh -c "awk -i inplace '!/sysfs_soc/' {}" \;
|
||||||
find device -name "location.te" -type f -exec sh -c "awk -i inplace '!/sysfs_soc/' {}" \;
|
find device -name "location.te" -type f -exec sh -c "awk -i inplace '!/sysfs_soc/' {}" \;
|
||||||
|
|
||||||
|
#Devices using source built libloc, these ones typically have broad /sys access
|
||||||
|
## Null out the User-Agent header
|
||||||
|
find device -name "LocEngAdapter.cpp" -type f -exec sh -c "sed -i 's/userAgent, strlen(userAgent)/\"-\", 1/' {}" \;
|
||||||
|
find hardware -name "LocEngAdapter.cpp" -type f -exec sh -c "sed -i 's/userAgent, strlen(userAgent)/\"-\", 1/' {}" \;
|
||||||
|
## Prevent reading the serial number
|
||||||
|
find device -name "LocEngAdapter.cpp" -type f -exec sh -c "sed -i 's|soc0/serial_number|soc0/invalid|' {}" \;
|
||||||
|
find hardware -name "LocEngAdapter.cpp" -type f -exec sh -c "sed -i 's|soc0/serial_number|soc0/invalid|' {}" \;
|
||||||
|
|
||||||
echo "Removed serial number access to Qualcomm location stacks";
|
echo "Removed serial number access to Qualcomm location stacks";
|
||||||
}
|
}
|
||||||
export -f hardenLocationSepolicy;
|
export -f hardenLocationSerials;
|
||||||
|
|
||||||
hardenLocationConf() {
|
hardenLocationConf() {
|
||||||
local gpsConfig=$1;
|
local gpsConfig=$1;
|
||||||
|
@ -591,7 +591,7 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
|
|
||||||
#Tweaks for <2GB RAM devices
|
#Tweaks for <2GB RAM devices
|
||||||
|
@ -502,7 +502,7 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
|
|
||||||
#Tweaks for <2GB RAM devices
|
#Tweaks for <2GB RAM devices
|
||||||
|
@ -412,7 +412,7 @@ if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
|
@ -555,7 +555,7 @@ if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
enableAutoVarInit || true;
|
enableAutoVarInit || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||||
|
@ -561,7 +561,7 @@ if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
enableAutoVarInit || true;
|
enableAutoVarInit || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||||
|
@ -450,7 +450,7 @@ if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
enableAutoVarInit || true;
|
enableAutoVarInit || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||||
|
@ -504,7 +504,7 @@ if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -
|
|||||||
cd "$DOS_BUILD_BASE";
|
cd "$DOS_BUILD_BASE";
|
||||||
deblobAudio;
|
deblobAudio;
|
||||||
removeBuildFingerprints;
|
removeBuildFingerprints;
|
||||||
hardenLocationSepolicy || true;
|
hardenLocationSerials || true;
|
||||||
enableAutoVarInit || true;
|
enableAutoVarInit || true;
|
||||||
changeDefaultDNS; #Change the default DNS servers
|
changeDefaultDNS; #Change the default DNS servers
|
||||||
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
fixupCarrierConfigs || true; #Remove silly carrier restrictions
|
||||||
|
Loading…
Reference in New Issue
Block a user