From 0b3069e7d0c53a3cf10506c2a7e442e56815660f Mon Sep 17 00:00:00 2001 From: JoshuaDoes Date: Mon, 17 Aug 2020 05:32:34 -0700 Subject: [PATCH] Initialize 10 roomservices --- apply_patches.sh | 19 +++++++ noblelte.xml | 17 +++++++ nobleltetmo.xml | 17 +++++++ nobleltezt.xml | 17 +++++++ ...keyguard_fix_wattage_calc_for_ampere.patch | 33 +++++++++++++ patches/list.txt | 2 + ...soong_make_development_phases_easier.patch | 49 +++++++++++++++++++ zenlte.xml | 17 +++++++ zenltetmo.xml | 17 +++++++ zerofltecan.xml | 17 +++++++ zerofltexx.xml | 17 +++++++ zeroltecan.xml | 17 +++++++ zeroltexx.xml | 17 +++++++ 13 files changed, 256 insertions(+) create mode 100755 apply_patches.sh create mode 100644 noblelte.xml create mode 100644 nobleltetmo.xml create mode 100644 nobleltezt.xml create mode 100644 patches/keyguard_fix_wattage_calc_for_ampere.patch create mode 100644 patches/list.txt create mode 100644 patches/soong_make_development_phases_easier.patch create mode 100644 zenlte.xml create mode 100644 zenltetmo.xml create mode 100644 zerofltecan.xml create mode 100644 zerofltexx.xml create mode 100644 zeroltecan.xml create mode 100644 zeroltexx.xml diff --git a/apply_patches.sh b/apply_patches.sh new file mode 100755 index 0000000..8f52e31 --- /dev/null +++ b/apply_patches.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Original script credit to ChronoMonochrome +# Adapted by JoshuaDoes to be simpler + +apply() { + [ ! -n "$ANDROID_BUILD_TOP" ] && echo "Please specify ANDROID_BUILD_TOP before running this script!" && return + + while read line; do + proj=$(echo $line | cut -d " " -f1) + patch=$(echo $line | cut -f 2- -d " ") + echo -e "Applying patches to $proj" + echo + git -C "$ANDROID_BUILD_TOP/$proj" apply "$ANDROID_BUILD_TOP/.repo/local_manifests/patches/$patch" + echo ""; echo ""; + done < $ANDROID_BUILD_TOP/.repo/local_manifests/patches/list.txt +} + +apply diff --git a/noblelte.xml b/noblelte.xml new file mode 100644 index 0000000..150c36f --- /dev/null +++ b/noblelte.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/nobleltetmo.xml b/nobleltetmo.xml new file mode 100644 index 0000000..18eb684 --- /dev/null +++ b/nobleltetmo.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/nobleltezt.xml b/nobleltezt.xml new file mode 100644 index 0000000..2b7e0c2 --- /dev/null +++ b/nobleltezt.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/patches/keyguard_fix_wattage_calc_for_ampere.patch b/patches/keyguard_fix_wattage_calc_for_ampere.patch new file mode 100644 index 0000000..3b5d6f8 --- /dev/null +++ b/patches/keyguard_fix_wattage_calc_for_ampere.patch @@ -0,0 +1,33 @@ +From 31dedaf8a568d63db3abd79b2f94b5fb145661a1 Mon Sep 17 00:00:00 2001 +From: Exhigh +Date: Sun, 16 Aug 2020 16:41:13 +0400 +Subject: [PATCH] Keyguard: Fix wattage calculation on devices that report directly in Ampere + +Idea for the solution taken from commit: + +base: Lockscreen Charging info (3/3) by: xyyx + +Signed-off-by: Exhigh +--- + .../src/com/android/keyguard/KeyguardUpdateMonitor.java | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +index e6204461f11..d21f8cbc254 100644 +--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java ++++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +@@ -1095,7 +1095,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { + if (maxChargingMicroAmp > 0) { + // Calculating muW = muA * muV / (10^6 mu^2 / mu); splitting up the divisor + // to maintain precision equally on both factors. +- maxChargingMicroWatt = (maxChargingMicroAmp / 1000) ++ maxChargingMicroWatt = (maxChargingMicroAmp < 5 ? ++ (maxChargingMicroAmp * 1000) : (maxChargingMicroAmp < 4000 ? ++ maxChargingMicroAmp : (maxChargingMicroAmp / 1000))) + * (maxChargingMicroVolt / 1000); + } else { + maxChargingMicroWatt = -1; +-- +2.17.1 + + diff --git a/patches/list.txt b/patches/list.txt new file mode 100644 index 0000000..ac3015b --- /dev/null +++ b/patches/list.txt @@ -0,0 +1,2 @@ +build/soong soong_make_development_phases_easier.patch +frameworks/base keyguard_fix_wattage_calc_for_ampere.patch diff --git a/patches/soong_make_development_phases_easier.patch b/patches/soong_make_development_phases_easier.patch new file mode 100644 index 0000000..f1c1483 --- /dev/null +++ b/patches/soong_make_development_phases_easier.patch @@ -0,0 +1,49 @@ +From 14a3cc51193e4b02616d25c92aeaa9359814e26d Mon Sep 17 00:00:00 2001 +From: JoshuaDoes +Date: Mon, 17 Aug 2020 06:03:30 -0700 +Subject: [PATCH] soong: Make development phases easier + +cc: Allow warnings for hardware and kernel paths +ui: Enable usage of some tools needed for custom build tasks +Change-Id: Ia81c03361efdfc9bf8eedd5c409074e81d18a8b4 +--- + cc/config/global.go | 2 ++ + ui/build/paths/config.go | 9 +++++++++ + 2 files changed, 11 insertions(+) + +diff --git a/cc/config/global.go b/cc/config/global.go +index 7c7b47a..e3f3739 100644 +--- a/cc/config/global.go ++++ b/cc/config/global.go +@@ -128,6 +128,8 @@ var ( + // Directories with warnings from Android.bp files. + WarningAllowedProjects = []string{ + "device/", ++ "hardware/", ++ "kernel/", + "vendor/", + } + +diff --git a/ui/build/paths/config.go b/ui/build/paths/config.go +index d17b9f7..7e95698 100644 +--- a/ui/build/paths/config.go ++++ b/ui/build/paths/config.go +@@ -176,6 +176,15 @@ var Configuration = map[string]PathConfig{ + "which": LinuxOnlyPrebuilt, + "xargs": LinuxOnlyPrebuilt, + "xxd": LinuxOnlyPrebuilt, ++ ++ // Extra stuff needed for now ++ "aarch64-linux-android-ar": Allowed, ++ "aarch64-linux-android-gcc": Allowed, ++ "aarch64-linux-android-ld": Allowed, ++ "aarch64-linux-android-nm": Allowed, ++ "aarch64-linux-android-objcopy": Allowed, ++ "aarch64-linux-android-objdump": Allowed, ++ "aarch64-linux-android-readelf": Allowed, + } + + func init() { +-- +2.25.4 + diff --git a/zenlte.xml b/zenlte.xml new file mode 100644 index 0000000..f7eb145 --- /dev/null +++ b/zenlte.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/zenltetmo.xml b/zenltetmo.xml new file mode 100644 index 0000000..4f147ba --- /dev/null +++ b/zenltetmo.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/zerofltecan.xml b/zerofltecan.xml new file mode 100644 index 0000000..2b34baa --- /dev/null +++ b/zerofltecan.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/zerofltexx.xml b/zerofltexx.xml new file mode 100644 index 0000000..0dda225 --- /dev/null +++ b/zerofltexx.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/zeroltecan.xml b/zeroltecan.xml new file mode 100644 index 0000000..406eecc --- /dev/null +++ b/zeroltecan.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/zeroltexx.xml b/zeroltexx.xml new file mode 100644 index 0000000..cac4caf --- /dev/null +++ b/zeroltexx.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + +