From 89de66bdbad2c3542f8d49e969e5ae0fef58ec44 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 5 Aug 2019 23:56:52 -0400 Subject: [PATCH] Many small changes - Cherrypicks for ASB patches - Apps: Switch gallery to Simple Gallery - Apps: Switch camera to OpenCamera - PKGBUILD: update with image optimization dependencies - Deblobber: fix bug introducted in 6d33e4ecbfc3065e13adc42d658817bbc2c076fb --- Misc/android-devel/PKGBUILD | 2 +- Patches/Common/android_vendor_divested/packages.mk | 7 ++++--- Scripts/Common/Deblob.sh | 2 +- Scripts/Common/Functions.sh | 7 +++++++ Scripts/LineageOS-14.1/Functions.sh | 2 ++ Scripts/LineageOS-15.1/Functions.sh | 2 ++ Scripts/LineageOS-16.0/Functions.sh | 2 ++ Scripts/LineageOS-16.0/Patch.sh | 1 - Scripts/init.sh | 2 +- 9 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Misc/android-devel/PKGBUILD b/Misc/android-devel/PKGBUILD index 18722546..2960c489 100644 --- a/Misc/android-devel/PKGBUILD +++ b/Misc/android-devel/PKGBUILD @@ -6,4 +6,4 @@ pkgdesc='Metapackage to pull all dependencies required to build Android' arch=('x86_64') url='https://wiki.archlinux.org/index.php/Android#Building_Android' license=('None') -depends=('gcc' 'git' 'gnupg' 'flex' 'bison' 'gperf' 'sdl' 'wxgtk' 'squashfs-tools' 'curl' 'ncurses' 'zlib' 'schedtool' 'perl-switch' 'zip' 'unzip' 'libxslt' 'python2-virtualenv' 'bc' 'rsync' 'lib32-zlib' 'lib32-ncurses' 'lib32-readline' 'xml2' 'lzop' 'pngcrush' 'imagemagick' 'repo' 'ccache' 'maven' 'gradle' 'ninja' 'lib32-ncurses5-compat-libs' 'ncurses5-compat-libs' 'firejail') +depends=('gcc' 'git' 'gnupg' 'flex' 'bison' 'gperf' 'sdl' 'wxgtk' 'squashfs-tools' 'curl' 'ncurses' 'zlib' 'schedtool' 'perl-switch' 'zip' 'unzip' 'libxslt' 'python2-virtualenv' 'bc' 'rsync' 'lib32-zlib' 'lib32-ncurses' 'lib32-readline' 'xml2' 'lzop' 'pngcrush' 'imagemagick' 'repo' 'ccache' 'maven' 'gradle' 'ninja' 'lib32-ncurses5-compat-libs' 'ncurses5-compat-libs' 'firejail' 'optipng' 'jpegoptim') diff --git a/Patches/Common/android_vendor_divested/packages.mk b/Patches/Common/android_vendor_divested/packages.mk index efa28a71..25b2e84c 100644 --- a/Patches/Common/android_vendor_divested/packages.mk +++ b/Patches/Common/android_vendor_divested/packages.mk @@ -13,8 +13,9 @@ PRODUCT_PACKAGES += \ # Replacements PRODUCT_PACKAGES += \ FennecDOS \ + OpenCamera \ Silence \ - CameraRoll \ + SimpleGallery \ VanillaMusic # Others @@ -22,10 +23,10 @@ PRODUCT_PACKAGES += \ LocalCalendar # Notes -# - Available (via PrebuiltApps submodule): K9Mail, NetMonitor, OpenKeychain, Orbot, Shelter, TalkBack, TorBrowser, WireGuard +# - Available (via PrebuiltApps submodule): K9Mail, NetMonitor, OpenKeychain, Orbot, Shelter, TalkBack, TorBrowser # - Camera Choices: None (Camera2/Snap), OpenCamera # - Gallery Choices: None (AOSP/Lineage), CameraRoll, SimpleGallery -# - K-9 Mail Will be included after 5.5xx release +# - K-9 Mail Will be included after 5.8xx release # - Net Monitor will be included after #58 is merged # - OpenKeychain inclusion is undecided yet # - Orbot/TorBrowser will most likely never be included due to various reasons diff --git a/Scripts/Common/Deblob.sh b/Scripts/Common/Deblob.sh index b4e2ac0c..c1604b2d 100644 --- a/Scripts/Common/Deblob.sh +++ b/Scripts/Common/Deblob.sh @@ -637,7 +637,7 @@ export -f deblobVendor; #START OF DEBLOBBING # find build -name "*.mk" -type f -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'awk -i inplace "!/$makes/" "{}"'; #Deblob all makefiles -find device -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 4 -I {} bash -c 'deblobDevice "{}"'; #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 -print0 | xargs -0 -n 1 -P 4 -I {} bash -c 'deblobSepolicy "{}"'; #Deblob all device sepolicy directories XXX: Breaks builds when other sepolicy files reference deleted ones #find kernel -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 4 -I {} bash -c 'deblobKernel "{}"'; #Deblob all kernel directories find vendor -name "*vendor*.mk" -type f -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'deblobVendor "{}"'; #Deblob all makefiles diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index 554e3399..6c53ed3f 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -181,6 +181,13 @@ optimizeImagesRecursive() { } export -f optimizeImagesRecursive; +smallerSystem() { + echo "SMALLER_FONT_FOOTPRINT := true" >> BoardConfig.mk; + echo "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0" >> BoardConfig.mk; + sed -i 's/common_full_phone.mk/common_mini_phone.mk/' *.mk &>/dev/null || true; +} +export -f smallerSystem; + hardenLocationConf() { gpsConfig=$1; #Attempt to get the real device directory diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index 678d6fdd..c928c484 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -115,6 +115,8 @@ patchWorkspace() { repopick 248599; #restrict SET_TIME_ZONE permission repopick 248600 248649; #/proc hardening repopick -it n-tzdata-2019b; + repopick -it n-asb-2019-08; + repopick -it nougat-mr2-security-release-residue; export DOS_GRAPHENE_MALLOC=false; #patches apply, compile fails diff --git a/Scripts/LineageOS-15.1/Functions.sh b/Scripts/LineageOS-15.1/Functions.sh index 90d1be62..7de52d8b 100644 --- a/Scripts/LineageOS-15.1/Functions.sh +++ b/Scripts/LineageOS-15.1/Functions.sh @@ -87,6 +87,8 @@ patchWorkspace() { source build/envsetup.sh; repopick -it o-tz-data-2019b; + repopick -it O_asb_2019-08; + repopick -it oreo-mr1-security-release-residue; source "$DOS_SCRIPTS/Patch.sh"; source "$DOS_SCRIPTS/Defaults.sh"; diff --git a/Scripts/LineageOS-16.0/Functions.sh b/Scripts/LineageOS-16.0/Functions.sh index 6c5f9c0e..9dab5279 100644 --- a/Scripts/LineageOS-16.0/Functions.sh +++ b/Scripts/LineageOS-16.0/Functions.sh @@ -66,6 +66,8 @@ patchWorkspace() { source build/envsetup.sh; repopick -it p-tzdata-2019b; + repopick 252855; #missed patch from 2018/11 ASB + #repopick -it P_asb_2019-08; source "$DOS_SCRIPTS/Patch.sh"; source "$DOS_SCRIPTS/Defaults.sh"; diff --git a/Scripts/LineageOS-16.0/Patch.sh b/Scripts/LineageOS-16.0/Patch.sh index 1ccd6dc6..67d76fba 100644 --- a/Scripts/LineageOS-16.0/Patch.sh +++ b/Scripts/LineageOS-16.0/Patch.sh @@ -67,7 +67,6 @@ if [ "$DOS_GRAPHENE_MALLOC" = true ]; then patch -p1 < "$DOS_PATCHES/android_bio enterAndClear "bootable/recovery"; git revert fe2901b144c515c5a90b547198aed37c209b5a82; #Resurrect dm-verity -sed -i 's|install(Device|install(__attribute__ ((unused)) Device|' recovery.cpp; #Fix: error: unused parameter 'device' enterAndClear "build/make"; git revert 271f6ffa045064abcac066e97f2cb53ccb3e5126 61f7ee9386be426fd4eadc2c8759362edb5bef8; #Add back PicoTTS and language files diff --git a/Scripts/init.sh b/Scripts/init.sh index 9c029929..9c42c000 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -44,7 +44,7 @@ export DOS_MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchW export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full export DOS_MICROG_INCLUDED="NLP"; #Determines inclusion of microG. Options: NLP, FULL export DOS_NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion of non-commercial use patches XXX: Unused, see 1dc9247 -export DOS_OPTIMIZE_IMAGES=true; #Set true to apply lossless optimizations to image resources. Reduces image size and increases performance. +export DOS_OPTIMIZE_IMAGES=false; #Set true to apply lossless optimizations to image resources export DOS_OVERCLOCKS_ENABLED=false; #Switch to false to disable overclocks #XXX: Most devices have their processors directly under their RAM, heatsinking is mostly into the ground plane, potentially inflicting damage to RAM and the processor itself export DOS_STRONG_ENCRYPTION_ENABLED=false; #Switch to true to enable AES-256bit encryption on 14.1+15.1 XXX: THIS WILL **DESTROY** EXISTING INSTALLS! export DOS_WIREGUARD_INCLUDED=false; #Switch to true to enable WireGuard kernel module inclusion