From 7945ed0e106d226776e8e9e9fc44b063daa4c2c7 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 11 Mar 2019 22:47:11 -0400 Subject: [PATCH] 16.0: -user on legacy devices --- Scripts/LineageOS-11.0/Functions.sh | 1 + Scripts/LineageOS-16.0/Functions.sh | 10 +++++----- Scripts/LineageOS-16.0/Patch.sh | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Scripts/LineageOS-11.0/Functions.sh b/Scripts/LineageOS-11.0/Functions.sh index 7f1c70ed..2ee8a13d 100644 --- a/Scripts/LineageOS-11.0/Functions.sh +++ b/Scripts/LineageOS-11.0/Functions.sh @@ -60,6 +60,7 @@ patchWorkspace() { repopick -it asb-2018.09-cm11-qcom; repopick -it cm.service.adb.root; #security fix for -userdebug repopick -it asb-2019.02-cm11; + repopick -it asb-2019.03-cm11; 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 627454aa..423269c0 100644 --- a/Scripts/LineageOS-16.0/Functions.sh +++ b/Scripts/LineageOS-16.0/Functions.sh @@ -48,11 +48,10 @@ export -f buildDeviceDebug; buildAll() { if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanWorkspaceForMalware; fi; - #devices using legacy qcom sepolicy must be userdebug due to neverallows - brunch lineage_mako-userdebug; - brunch lineage_bacon-userdebug; + brunch lineage_mako-user; + brunch lineage_bacon-user; brunch lineage_griffin-user; - brunch lineage_klte-userdebug; + brunch lineage_klte-user; brunch lineage_shamu-user; #broken - needs synced proprietary-files.txt } export -f buildAll; @@ -60,7 +59,8 @@ export -f buildAll; patchWorkspace() { if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi; - #source build/envsetup.sh; + source build/envsetup.sh; + repopick 244148; 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 5382d442..003ab720 100644 --- a/Scripts/LineageOS-16.0/Patch.sh +++ b/Scripts/LineageOS-16.0/Patch.sh @@ -69,6 +69,7 @@ sed -i '74i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aap enterAndClear "device/qcom/sepolicy-legacy"; patch -p1 < "$DOS_PATCHES/android_device_qcom_sepolicy-legacy/0001-Camera_Fix.patch"; #Fix camera on -user builds XXX: REMOVE THIS TRASH +echo "SELINUX_IGNORE_NEVERALLOWS := true" >> sepolicy.mk; #necessary for -user builds of legacy devices enterAndClear "frameworks/base"; hardenLocationFWB "$DOS_BUILD_BASE"; @@ -139,11 +140,12 @@ patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0002-More_Preferre enterAndClear "system/core"; if [ "$DOS_HOSTS_BLOCKING" = true ]; then cat "$DOS_HOSTS_FILE" >> rootdir/etc/hosts; fi; #Merge in our HOSTS file -git revert b3609d82999d23634c5e6db706a3ecbc5348309a; #Always update recovery +#git revert b3609d82999d23634c5e6db706a3ecbc5348309a; #Always update recovery XXX: Wait until recovery-p topic is merged patch -p1 < "$DOS_PATCHES/android_system_core/0001-Harden_Mounts.patch"; #Harden mounts with nodev/noexec/nosuid (CopperheadOS-13.0) enterAndClear "system/sepolicy"; patch -p1 < "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch"; #Fix -user builds for LGE devices +awk -i inplace '!/true cannot be used in user builds/' Android.mk; #Allow ignoring neverallows under -user enterAndClear "vendor/lineage"; rm -rf overlay/common/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml; #Remove analytics @@ -169,7 +171,6 @@ if [ "$DOS_HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += $DOS_HOSTS_ # enterAndClear "device/lge/mako"; echo "allow kickstart usbfs:dir search;" >> sepolicy/kickstart.te; #Fix forceencrypt on first boot -awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfig.mk; enterAndClear "device/oneplus/bacon"; sed -i 's/android.hardware.nfc@1.0-impl/android.hardware.nfc@1.0-impl.so/' device-proprietary-files.txt;