mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
Small fixes
This commit is contained in:
parent
98a45b1ee6
commit
84300d6611
12 changed files with 265 additions and 19 deletions
|
@ -414,6 +414,8 @@ export -f enableZram;
|
|||
hardenUserdata() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
|
||||
#awk -i inplace '!/f2fs/' fstab.* root/fstab.* rootdir/fstab.* rootdir/*/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.* root/fstab.* rootdir/fstab.* rootdir/*/fstab.* &>/dev/null || true;
|
||||
|
@ -597,7 +599,7 @@ hardenDefconfig() {
|
|||
#Disabled: CONFIG_MSM_SMP2P_TEST, CONFIG_MAGIC_SYSRQ (breaks compile on many kernels), CONFIG_KALLSYMS (breaks boot on select devices), CONFIG_IKCONFIG (breaks recovery)
|
||||
declare -a optionsNo=("CONFIG_ACPI_APEI_EINJ" "CONFIG_ACPI_CUSTOM_METHOD" "CONFIG_ACPI_TABLE_UPGRADE" "CONFIG_BINFMT_AOUT" "CONFIG_BINFMT_MISC" "CONFIG_CHECKPOINT_RESTORE" "CONFIG_COMPAT_BRK" "CONFIG_COMPAT_VDSO" "CONFIG_CP_ACCESS64" "CONFIG_DEVKMEM" "CONFIG_DEVMEM" "CONFIG_DEVPORT" "CONFIG_EARJACK_DEBUGGER" "CONFIG_GCC_PLUGIN_RANDSTRUCT_PERFORMANCE" "CONFIG_HARDENED_USERCOPY_FALLBACK" "CONFIG_HIBERNATION" "CONFIG_HWPOISON_INJECT" "CONFIG_IA32_EMULATION" "CONFIG_IOMMU_NON_SECURE" "CONFIG_IP_DCCP" "CONFIG_IP_SCTP" "CONFIG_KEXEC" "CONFIG_KEXEC_FILE" "CONFIG_KSM" "CONFIG_LDISC_AUTOLOAD" "CONFIG_LEGACY_PTYS" "CONFIG_LIVEPATCH" "CONFIG_MEM_SOFT_DIRTY" "CONFIG_MMIOTRACE" "CONFIG_MMIOTRACE_TEST" "CONFIG_MODIFY_LDT_SYSCALL" "CONFIG_MSM_BUSPM_DEV" "CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG" "CONFIG_NOTIFIER_ERROR_INJECTION" "CONFIG_OABI_COMPAT" "CONFIG_PAGE_OWNER" "CONFIG_PROC_KCORE" "CONFIG_PROC_PAGE_MONITOR" "CONFIG_PROC_VMCORE" "CONFIG_RDS" "CONFIG_RDS_TCP" "CONFIG_SECURITY_SELINUX_DISABLE" "CONFIG_SLAB_MERGE_DEFAULT" "CONFIG_TIMER_STATS" "CONFIG_TSC" "CONFIG_TSPP2" "CONFIG_UKSM" "CONFIG_UPROBES" "CONFIG_USELIB" "CONFIG_USERFAULTFD" "CONFIG_WLAN_FEATURE_MEMDUMP" "CONFIG_X86_PTDUMP" "CONFIG_X86_VSYSCALL_EMULATION" "CONFIG_ZSMALLOC_STAT");
|
||||
if [[ "$1" != *"kernel/htc/msm8994"* ]] && [[ "$1" != *"kernel/samsung/smdk4412"* ]] && [[ "$1" != *"kernel/htc/flounder"* ]] && [[ "$1" != *"kernel/amazon/hdx-common"* ]] && [[ "$1" != *"msm899"* ]] && [[ "$1" != *"sdm8"* ]] && [[ "$1" != *"sdm6"* ]]; then
|
||||
optionsNo+=("CONFIG_DIAG_CHAR" "CONFIG_DIAG_OVER_USB" "CONFIG_USB_QCOM_DIAG_BRIDGE" "CONFIG_DIAGFWD_BRIDGE_CODE" "CONFIG_DIAG_SDIO_PIPE" "CONFIG_DIAG_HSIC_PIPE" "CONFIG_INET_DIAG");
|
||||
optionsNo+=("CONFIG_DIAG_CHAR" "CONFIG_DIAG_OVER_USB" "CONFIG_USB_QCOM_DIAG_BRIDGE" "CONFIG_DIAGFWD_BRIDGE_CODE" "CONFIG_DIAG_SDIO_PIPE" "CONFIG_DIAG_HSIC_PIPE");
|
||||
fi;
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_IPA" = true ]; then optionsNo+=("CONFIG_IPA" "CONFIG_RMNET_IPA"); fi;
|
||||
for option in "${optionsNo[@]}"
|
||||
|
|
|
@ -247,6 +247,7 @@ sed -i '3itypeattribute hwaddrs misc_block_device_exception;' sepolicy/hwaddrs.t
|
|||
|
||||
enterAndClear "device/lge/mako";
|
||||
echo "allow kickstart usbfs:dir search;" >> sepolicy/kickstart.te; #Fix forceencrypt on first boot
|
||||
echo "pmf=0" >> wpa_supplicant_overlay.conf; #Wi-Fi chipset doesn't support PMF
|
||||
|
||||
enterAndClear "device/motorola/clark";
|
||||
sed -i 's/0xA04D/0xA04D|0xA052/' board-info.txt; #Allow installing on Nougat bootloader, assume the user is running the correct modem
|
||||
|
|
|
@ -223,6 +223,7 @@ sed -i '3itypeattribute hwaddrs misc_block_device_exception;' sepolicy/hwaddrs.t
|
|||
enterAndClear "device/lge/mako";
|
||||
git revert --no-edit e277722bb3f10dad7a6078aa0dba7b78738e6071; #restore releasetools
|
||||
echo "allow kickstart usbfs:dir search;" >> sepolicy/kickstart.te; #Fix forceencrypt on first boot
|
||||
echo "pmf=0" >> wifi/wpa_supplicant_overlay.conf; #Wi-Fi chipset doesn't support PMF
|
||||
|
||||
enterAndClear "device/moto/shamu";
|
||||
#git revert --no-edit 05fb49518049440f90423341ff25d4f75f10bc0c; #restore releasetools #TODO
|
||||
|
|
|
@ -57,7 +57,6 @@ buildAll() {
|
|||
if [ "$DOS_OPTIMIZE_IMAGES" = true ]; then optimizeImagesRecursive "$DOS_BUILD_BASE"; fi;
|
||||
#SDS4P
|
||||
#buildDevice flo; #broken encryption
|
||||
buildDevice mako;
|
||||
#SD410
|
||||
buildDevice crackling;
|
||||
#SD600
|
||||
|
@ -87,9 +86,6 @@ buildAll() {
|
|||
buildDevice oneplus3 verity;
|
||||
buildDevice griffin;
|
||||
buildDevice z2_plus verity; #broken
|
||||
#SD821
|
||||
buildDevice marlin verity;
|
||||
buildDevice sailfish verity;
|
||||
#SD625
|
||||
buildDevice zenfone3; #needs manual patching - fwb xml: fused: dangling tag
|
||||
#SD835
|
||||
|
@ -111,6 +107,14 @@ buildAll() {
|
|||
buildDeviceUserDebug i9100; #broken
|
||||
#Intel
|
||||
buildDevice fugu; #broken
|
||||
|
||||
if [ "$DOS_BUILDALL_SUPERSEDED" = true ]; then
|
||||
#SDS4P
|
||||
buildDevice mako;
|
||||
#SD821
|
||||
buildDevice marlin verity;
|
||||
buildDevice sailfish verity;
|
||||
fi;
|
||||
}
|
||||
export -f buildAll;
|
||||
|
||||
|
|
|
@ -223,6 +223,7 @@ enterAndClear "device/lge/mako";
|
|||
smallerSystem;
|
||||
sed -i 's/1333788672/880803840/' BoardConfig.mk; #don't touch partitions! DOS -user fits with 40M free
|
||||
awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfig.mk;
|
||||
echo "pmf=0" >> wifi/wpa_supplicant_overlay.conf; #Wi-Fi chipset doesn't support PMF
|
||||
|
||||
#enterAndClear "device/moto/shamu";
|
||||
#git revert --no-edit 05fb49518049440f90423341ff25d4f75f10bc0c; #restore releasetools #TODO
|
||||
|
|
|
@ -56,13 +56,13 @@ buildAll() {
|
|||
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanWorkspaceForMalware; fi;
|
||||
if [ "$DOS_OPTIMIZE_IMAGES" = true ]; then optimizeImagesRecursive "$DOS_BUILD_BASE"; fi;
|
||||
#SDS4P
|
||||
buildDevice mako; #xxx: wifi no connect
|
||||
buildDevice mako;
|
||||
#SD600
|
||||
buildDevice jfltexx;
|
||||
#SD800
|
||||
buildDevice d802;
|
||||
#SD801
|
||||
buildDevice d852; #XXX: no boot. partitions?
|
||||
buildDevice d852; #XXX: no boot
|
||||
buildDevice d855;
|
||||
buildDevice FP2;
|
||||
buildDevice m8;
|
||||
|
|
|
@ -61,11 +61,6 @@ enterAndClear "bionic";
|
|||
if [ "$DOS_GRAPHENE_MALLOC" = true ]; then patch -p1 < "$DOS_PATCHES/android_bionic/0001-HM-Use_HM.patch"; fi; #(GrapheneOS)
|
||||
if [ "$DOS_GRAPHENE_MALLOC" = true ]; then patch -p1 < "$DOS_PATCHES/android_bionic/0002-Symbol_Ordering.patch"; fi; #(GrapheneOS)
|
||||
|
||||
enterAndClear "bootable/recovery";
|
||||
#git revert --no-edit 4d361ff13b5bd61d5a6a5e95063b24b8a37a24ab; #Always enforcing #XXX 17REBASE
|
||||
#git revert --no-edit 37d729bf; #Fix USB on most devices #XXX 17REBASE
|
||||
#git revert --no-edit fe2901b144c515c5a90b547198aed37c209b5a82; #Resurrect dm-verity #XXX 17REBASE
|
||||
|
||||
enterAndClear "build/make";
|
||||
#git revert --no-edit 271f6ffa045064abcac066e97f2cb53ccb3e5126 61f7ee9386be426fd4eadc2c8759362edb5bef8; #Add back PicoTTS and language files
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_build/0001-OTA_Keys.patch"; #add correct keys to recovery for OTA verification
|
||||
|
@ -106,6 +101,9 @@ enterAndClear "frameworks/opt/net/ims";
|
|||
patch -p1 < "$DOS_PATCHES/android_frameworks_opt_net_ims/0001-Fix_Calling.patch"; #Fix calling when IMS is removed
|
||||
fi
|
||||
|
||||
enterAndClear "hardware/qcom-caf/msm8998/audio";
|
||||
patch -p1 < "$DOS_PATCHES/android_hardware_qcom_audio/0001-Unused-8998.patch"; #audio_extn: Fix unused parameter warning in utils.c
|
||||
|
||||
if enter "kernel/wireguard"; then
|
||||
if [ "$DOS_WIREGUARD_INCLUDED" = false ]; then rm Android.mk; fi;
|
||||
#Remove system information from HTTP requests
|
||||
|
@ -149,7 +147,7 @@ sed -i 's/PROP_BUILD_VERSION_INCREMENTAL);/PROP_BUILD_VERSION_INCREMENTAL).repla
|
|||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
|
||||
enterAndClear "packages/services/Telephony";
|
||||
#enterAndClear "packages/services/Telephony";
|
||||
#patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0001-PREREQ_Handle_All_Modes.patch"; #XXX 17REBASE
|
||||
#patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0002-More_Preferred_Network_Modes.patch"; #XXX 17REBASE
|
||||
|
||||
|
@ -213,10 +211,7 @@ enterAndClear "device/lge/d855";
|
|||
git revert --no-edit 9a5739e66d0a44347881807c0cc44d7c318c02b8; #fix nfc path
|
||||
|
||||
enterAndClear "device/lge/mako";
|
||||
#git revert ; #restore releasetools #TODO
|
||||
#smallerSystem;
|
||||
#sed -i 's/1333788672/880803840/' BoardConfig.mk; #don't touch partitions! DOS -user fits with 40M free
|
||||
awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfig.mk;
|
||||
echo "pmf=0" >> wifi/wpa_supplicant_overlay.conf; #Wi-Fi chipset doesn't support PMF
|
||||
|
||||
#enterAndClear "device/moto/shamu";
|
||||
#git revert --no-edit 05fb49518049440f90423341ff25d4f75f10bc0c; #restore releasetools #TODO
|
||||
|
|
|
@ -22,12 +22,12 @@ echo "Rebranding...";
|
|||
|
||||
enter "bootable/recovery";
|
||||
git revert --no-edit 7e46bc14b15fdeabfd16871137f403f89486b83c;
|
||||
#patch -p1 < "$DOS_PATCHES_COMMON/android_bootable_recovery/0001-Remove_Logo.patch"; #Remove logo rendering code #XXX 17REBASE
|
||||
#rm res*/images/logo_image.png; #Remove logo images
|
||||
sed -i 's/if (lineage_logo_/if (false/' recovery_ui/*ui.cpp;
|
||||
mogrify -format png -fill "#FF5722" -opaque "#167C80" -fuzz 10% res-*/images/*sel.png; #Recolor icons
|
||||
sed -i 's|0x16, 0x7c, 0x80|0x03, 0xa9, 0xf4|' recovery_ui/*ui.cpp; #Recolor text
|
||||
sed -i 's|Android Recovery|'"$DOS_BRANDING_NAME"' Recovery|' recovery_ui/*ui.cpp;
|
||||
sed -i 's|LineageOS|'"$DOS_BRANDING_NAME"'|' recovery_ui/*ui.cpp;
|
||||
sed -i 's|Lineage |'"$DOS_BRANDING_NAME"' |' recovery.cpp;
|
||||
|
||||
enter "build/make";
|
||||
sed -i 's|echo "ro.build.user=$BUILD_USERNAME"|echo "ro.build.user=emy"|' tools/buildinfo.sh; #Override build user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue