mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
Fixes + Churn
- Fix instances of awk failing on missing globs - Remove unwanted packages from work/user/managed profiles - Remove proprietary camera extensions Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
05bb9b039b
commit
e74f861c8e
12 changed files with 28 additions and 17 deletions
|
@ -294,9 +294,7 @@ echo "Deblobbing...";
|
|||
fi;
|
||||
|
||||
#Google Camera
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_CAMEXT" = true ]; then
|
||||
blobs=$blobs"|com.google.android.camera.*|PixelCameraServices.*.apk";
|
||||
fi;
|
||||
blobs=$blobs"|com.google.android.camera.*|PixelCameraServices.*.apk";
|
||||
|
||||
#Google NFC
|
||||
blobs=$blobs"|PixelNfc.apk";
|
||||
|
@ -716,7 +714,7 @@ deblobDevice() {
|
|||
fi;
|
||||
fi;
|
||||
|
||||
awk -i inplace '!/loc.nlp_name/' *.prop *.mk &>/dev/null || true; #Disable QC Location Provider
|
||||
sed -i '/loc.nlp_name/d' *.prop *.mk &>/dev/null || true; #Disable QC Location Provider
|
||||
sed -i 's/drm.service.enabled=true/drm.service.enabled=false/' *.prop *.mk &>/dev/null || true;
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_APTX" = true ]; then sed -i 's/bt.enableAptXHD=true/bt.enableAptXHD=false/' *.prop *.mk &>/dev/null || true; fi; #Disable aptX
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_CNE" = true ]; then sed -i 's/cne.feature=./cne.feature=0/' *.prop *.mk &>/dev/null || true; fi; #Disable CNE
|
||||
|
@ -729,7 +727,7 @@ deblobDevice() {
|
|||
sed -i 's/bluetooth.emb_wp_mode=true/bluetooth.emb_wp_mode=false/' *.prop *.mk &>/dev/null || true; #Disable WiPower
|
||||
sed -i 's/bluetooth.wipower=true/bluetooth.wipower=false/' *.prop *.mk &>/dev/null || true; #Disable WiPower
|
||||
sed -i 's/wfd.enable=1/wfd.enable=0/' *.prop *.mk &>/dev/null || true; #Disable Wi-Fi display
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_CAMEXT" = true ]; then awk -i inplace '!/vendor.camera.extensions/' *.prop *.mk &>/dev/null || true; fi; #Disable camera extensions
|
||||
sed -i '/vendor.camera.extensions/d' *.prop *.mk &>/dev/null || true; fi; #Disable camera extensions
|
||||
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
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_GRAPHICS" = true ]; then
|
||||
|
|
|
@ -43,7 +43,7 @@ fi;
|
|||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
#14.1
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' src/com/android/dialer//LookupSettings*.java &>/dev/null || true; #Disable FLP
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java &>/dev/null || true; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java &>/dev/null || true; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java &>/dev/null || true; #Disable RLP
|
||||
#15.1+16.0+17.1
|
||||
|
|
|
@ -347,7 +347,6 @@ processRelease() {
|
|||
"$RELEASETOOLS_PREFIX"ota_from_target_files $BLOCK_SWITCHES -k "$KEY_DIR/releasekey" \
|
||||
"$OUT_DIR/$PREFIX-target_files.zip" \
|
||||
"$OUT_DIR/$PREFIX-ota.zip";
|
||||
md5sum "$OUT_DIR/$PREFIX-ota.zip" > "$OUT_DIR/$PREFIX-ota.zip.md5sum";
|
||||
sha512sum "$OUT_DIR/$PREFIX-ota.zip" > "$OUT_DIR/$PREFIX-ota.zip.sha512sum";
|
||||
|
||||
#Deltas
|
||||
|
@ -380,9 +379,9 @@ processRelease() {
|
|||
fi;
|
||||
|
||||
#File name fixes
|
||||
sed -i "s|$OUT_DIR/||" $OUT_DIR/*.md5sum $OUT_DIR/*.sha512sum;
|
||||
sed -i 's/-ota\././' $OUT_DIR/*.md5sum $OUT_DIR/*.sha512sum;
|
||||
sed -i 's/-incremental_/-/' $OUT_DIR/*.md5sum $OUT_DIR/*.sha512sum;
|
||||
sed -i "s|$OUT_DIR/||" $OUT_DIR/*.sha512sum;
|
||||
sed -i 's/-ota\././' $OUT_DIR/*.sha512sum;
|
||||
sed -i 's/-incremental_/-/' $OUT_DIR/*.sha512sum;
|
||||
|
||||
#GPG signing
|
||||
if [ "$DOS_GPG_SIGNING" = true ]; then
|
||||
|
@ -615,8 +614,6 @@ export -f hardenLocationFWB;
|
|||
hardenUserdata() {
|
||||
cd "$DOS_BUILD_BASE/$1";
|
||||
|
||||
#awk -i inplace '!/f2fs/' *fstab* */*fstab* */*/*fstab* &>/dev/null || true;
|
||||
|
||||
#Remove latemount to allow selinux contexts be restored upon /cache wipe
|
||||
#Fixes broken OTA updater and broken /recovery updater
|
||||
sed -i '/\/cache/s|latemount,||' *fstab* */*fstab* */*/*fstab* &>/dev/null || true;
|
||||
|
|
|
@ -37,8 +37,8 @@ if enter "kernel"; then
|
|||
sed -i "s/#define VM_MAX_READAHEAD\t128/#define VM_MAX_READAHEAD\t512/" ./*/*/include/linux/mm.h &>/dev/null || true; #Lee Susman <lsusman@codeaurora.org>: Change the VM_MAX_READAHEAD value from the default 128KB to 512KB. This will allow the readahead window to grow to a maximum size of 512KB, which greatly benefits to sequential read throughput.
|
||||
fi;
|
||||
|
||||
if enter "device"; then
|
||||
echo "Starting zram tweaks";
|
||||
cd "$DOS_BUILD_BASE/device";
|
||||
#Note: 14.1 uses zramstreams instead of max_comp_streams
|
||||
#1GB (768MB)
|
||||
sed -i 's/zramsize=.*/zramsize=75%,max_comp_streams=4/' asus/fugu/fstab.fugu &>/dev/null || true;
|
||||
|
@ -67,6 +67,7 @@ sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' sony/tama-common/rootdir
|
|||
#4GB+ (2GB+)
|
||||
sed -i 's/zramsize=.*/zramsize=50%,max_comp_streams=8/' google/redbull/fstab.hardware google/sunfish/fstab.hardware oneplus/msm8998-common/rootdir/etc/fstab.qcom oneplus/sdm845-common/rootdir/etc/fstab.qcom xiaomi/sm6150-common/rootdir/etc/fstab*.qcom &>/dev/null || true;
|
||||
echo "Finished zram tweaks";
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Optimizing complete\e[0m";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue