Initial commit for Android 11

This commit is contained in:
Andy CrossGate Yan 2020-12-20 10:08:50 +00:00
commit 758cd0d33b
16 changed files with 2272 additions and 0 deletions

31
README.md Normal file
View File

@ -0,0 +1,31 @@
## Building PHH-based LineageOS GSIs ##
To get started with building LineageOS GSI, you'll need to get familiar with [Git and Repo](https://source.android.com/source/using-repo.html) as well as [How to build a GSI](https://github.com/phhusson/treble_experimentations/wiki/How-to-build-a-GSI%3F).
First, open a new Terminal window, which defaults to your home directory. Clone the modified treble_experimentations repo there:
git clone https://github.com/AndyCGYan/treble_experimentations
Create a new working directory for your LineageOS build and navigate to it:
mkdir lineage-18.x-build-gsi; cd lineage-18.x-build-gsi
Initialize your LineageOS workspace:
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
Clone the modified treble patches and this repo:
git clone https://github.com/AndyCGYan/treble_patches -b lineage-18.1
git clone https://github.com/AndyCGYan/treble_build_los -b lineage-18.1
Finally, start the build script:
bash treble_build_los/buildbot_treble.sh
Be sure to update the cloned repos from time to time!
---
Note: A-only and VNDKLite targets are now generated from AB images - refer to [sas-creator](https://github.com/phhusson/sas-creator).

122
buildbot_treble.sh Executable file
View File

@ -0,0 +1,122 @@
#!/bin/bash
echo ""
echo "LineageOS 18.x Treble Buildbot"
echo "ATTENTION: this script syncs repo on each run"
echo "Executing in 5 seconds - CTRL-C to exit"
echo ""
sleep 5
START=`date +%s`
BUILD_DATE="$(date +%Y%m%d)"
BL=$PWD/treble_build_los
echo "Preparing local manifest"
mkdir -p .repo/local_manifests
cp $BL/manifest.xml .repo/local_manifests/manifest.xml
echo ""
echo "Syncing repos"
repo sync -c --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
echo ""
echo "Setting up build environment"
source build/envsetup.sh &> /dev/null
echo ""
repopick -t eleven-dialer-master
repopick -t eleven-telephony-master
repopick 289372 # Messaging: Add "Mark as read" quick action for message notifications
echo "Reverting LOS FOD implementation"
cd frameworks/base
git am $BL/patches/0001-Squashed-revert-of-LOS-FOD-implementation.patch
cd ../..
cd frameworks/native
git revert 381416d540ea92dca5f64cd48fd8c9dc887cac7b --no-edit # surfaceflinger: Add support for extension lib
cd ../..
echo ""
echo "Applying PHH patches"
rm -f device/*/sepolicy/common/private/genfs_contexts
cd device/phh/treble
git clean -fdx
bash generate.sh lineage
cd ../../..
bash ~/treble_experimentations/apply-patches.sh treble_patches
echo ""
echo "Applying universal patches"
cd frameworks/base
git am $BL/patches/0001-UI-Revive-navbar-layout-tuning-via-sysui_nav_bar-tun.patch
git am $BL/patches/0001-Disable-vendor-mismatch-warning.patch
cd ../..
cd lineage-sdk
git am $BL/patches/0001-sdk-Invert-per-app-stretch-to-fullscreen.patch
cd ..
cd packages/apps/LineageParts
git am $BL/patches/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch
cd ../../..
cd vendor/lineage
git am $BL/patches/0001-vendor_lineage-Log-privapp-permissions-whitelist-vio.patch
cd ../..
echo ""
echo "Applying GSI-specific patches"
cd bootable/recovery
git revert 0e369f42b82c4d12edba9a46dd20bee0d4b783ec --no-edit # recovery: Allow custom bootloader msg offset in block misc
cd ../..
cd build/make
git am $BL/patches/0001-build-Don-t-handle-apns-conf.patch
cd ../..
cd device/phh/treble
git revert 82b15278bad816632dcaeaed623b569978e9840d --no-edit # Update lineage.mk for LineageOS 16.0
git am $BL/patches/0001-Remove-fsck-SELinux-labels.patch
git am $BL/patches/0001-treble-Add-overlay-lineage.patch
git am $BL/patches/0001-treble-Don-t-specify-config_wallpaperCropperPackage.patch
cd ../../..
cd frameworks/av
git revert 5a5606dbd92f01de322c797a7128fce69902d067 --no-edit # camera: Allow devices to load custom CameraParameter code
cd ../..
cd frameworks/native
git revert 581c22f979af05e48ad4843cdfa9605186d286da --no-edit # Add suspend_resume trace events to the atrace 'freq' category.
cd ../..
cd system/core
git am $BL/patches/0001-Revert-init-Add-vendor-specific-initialization-hooks.patch
cd ../..
cd system/hardware/interfaces
git revert cb732f9b635b5f6f79e447ddaf743ebb800b8535 --no-edit # system_suspend: start early
cd ../../..
cd system/sepolicy
git am $BL/patches/0001-Revert-sepolicy-Relabel-wifi.-properties-as-wifi_pro.patch
cd ../..
cd vendor/lineage
git am $BL/patches/0001-build_soong-Disable-generated_kernel_headers.patch
cd ../..
echo ""
echo "CHECK PATCH STATUS NOW!"
sleep 5
echo ""
export WITHOUT_CHECK_API=true
export WITH_SU=true
mkdir -p ~/build-output/
buildVariant() {
lunch ${1}-userdebug
make installclean
make -j$(nproc --all) systemimage
make vndk-test-sepolicy
mv $OUT/system.img ~/build-output/lineage-18.1-$BUILD_DATE-UNOFFICIAL-${1}.img
}
buildVariant treble_arm_bvS
buildVariant treble_a64_bvS
buildVariant treble_arm64_bvS
ls ~/build-output | grep 'lineage'
END=`date +%s`
ELAPSEDM=$(($(($END-$START))/60))
ELAPSEDS=$(($(($END-$START))-$ELAPSEDM*60))
echo "Buildbot completed in $ELAPSEDM minutes and $ELAPSEDS seconds"
echo ""

8
manifest.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="phhusson/vendor_hardware_overlay" path="vendor/hardware_overlay" remote="github" revision="pie" />
<project name="phhusson/device_phh_treble" path="device/phh/treble" remote="github" revision="android-11.0" />
<project name="phhusson/vendor_vndk-tests" path="vendor/vndk-tests" remote="github" revision="master" />
<project name="phhusson/vendor_interfaces" path="vendor/interfaces" remote="github" revision="pie" />
<project name="phhusson/vendor_magisk" path="vendor/magisk" remote="github" revision="android-10.0" />
</manifest>

View File

@ -0,0 +1,40 @@
From 9b907d3b202fd3f7a892b50eacd92e4d51877606 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Apr 2018 10:01:19 +0800
Subject: [PATCH] Disable vendor mismatch warning
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
---
.../server/wm/ActivityTaskManagerService.java | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index ef02fd52999..b6bccb1c21c 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -6486,20 +6486,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
}
if (!Build.isBuildConsistent()) {
- Slog.e(TAG, "Build fingerprint is not consistent, warning user");
- mUiHandler.post(() -> {
- if (mShowDialogs) {
- AlertDialog d = new BaseErrorDialog(mUiContext);
- d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
- d.setCancelable(false);
- d.setTitle(mUiContext.getText(R.string.android_system_label));
- d.setMessage(mUiContext.getText(R.string.system_error_manufacturer));
- d.setButton(DialogInterface.BUTTON_POSITIVE,
- mUiContext.getText(R.string.ok),
- mUiHandler.obtainMessage(DISMISS_DIALOG_UI_MSG, d));
- d.show();
- }
- });
+ Slog.e(TAG, "Build fingerprint is not consistent");
+ // Do not emit warning about vendor mismatch
}
}
}
--
2.17.1

View File

@ -0,0 +1,105 @@
From 47bf5612cec98931ee3076c307247ac58d07ccff Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Jan 2019 21:44:48 +0800
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
---
res/layout/long_screen_layout.xml | 2 +-
res/values-zh-rCN/strings.xml | 6 +++---
res/values/strings.xml | 6 +++---
res/xml/long_screen_prefs.xml | 2 +-
res/xml/parts_catalog.xml | 4 ++--
.../lineageparts/applications/LongScreenSettings.java | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
index 40d0938..1119cef 100644
--- a/res/layout/long_screen_layout.xml
+++ b/res/layout/long_screen_layout.xml
@@ -36,7 +36,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
- android:text="@string/long_screen_settings_no_apps"
+ android:text="@string/inverse_long_screen_settings_no_apps"
android:textSize="18dp"
android:visibility="gone" />
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index ee5f7f9..eeed571 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -448,9 +448,9 @@
<string name="auto_power_save_summary_on">电量 %s 时自动启用省电</string>
<string name="auto_power_save_summary_off">不要自动启用省电</string>
<string name="auto_power_save_never">永不</string>
- <string name="long_screen_settings_title">全屏应用</string>
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
- <string name="long_screen_settings_no_apps">无应用</string>
+ <string name="inverse_long_screen_settings_title">禁用拉伸全屏</string>
+ <string name="inverse_long_screen_settings_summary">对选定的应用禁用拉伸全屏</string>
+ <string name="inverse_long_screen_settings_no_apps">无应用</string>
<string name="charging_sounds_settings_title">充电提示音</string>
<string name="charging_sounds_enabled_title">启用</string>
<string name="charging_sounds_enabled_summary">连接或断开电源时发出声音</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 65d799a..ff23ae9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -579,9 +579,9 @@
<string name="auto_power_save_never">Never</string>
<!-- Applications: Long screen -->
- <string name="long_screen_settings_title">Full screen apps</string>
- <string name="long_screen_settings_summary">Force legacy apps to use full screen aspect ratio</string>
- <string name="long_screen_settings_no_apps">No apps</string>
+ <string name="inverse_long_screen_settings_title">Disable stretch-to-fullscreen</string>
+ <string name="inverse_long_screen_settings_summary">Prevent selected apps from utilizing stretch-to-fullscreen</string>
+ <string name="inverse_long_screen_settings_no_apps">No apps</string>
<!-- Sounds: Charging sounds -->
<string name="charging_sounds_settings_title">Charging sounds</string>
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
index ec947fa..20da90a 100644
--- a/res/xml/long_screen_prefs.xml
+++ b/res/xml/long_screen_prefs.xml
@@ -18,6 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:lineage="http://schemas.android.com/apk/res/org.lineageos.lineageparts"
android:key="long_screen_settings"
- android:title="@string/long_screen_settings_title">
+ android:title="@string/inverse_long_screen_settings_title">
</PreferenceScreen>
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
index a4346c7..e21d7d5 100644
--- a/res/xml/parts_catalog.xml
+++ b/res/xml/parts_catalog.xml
@@ -92,8 +92,8 @@
lineage:xmlRes="@xml/perf_profile_settings" />
<part android:key="long_screen_settings"
- android:title="@string/long_screen_settings_title"
- android:summary="@string/long_screen_settings_summary"
+ android:title="@string/inverse_long_screen_settings_title"
+ android:summary="@string/inverse_long_screen_settings_summary"
android:fragment="org.lineageos.lineageparts.applications.LongScreenSettings"
lineage:xmlRes="@xml/long_screen_prefs" />
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
index ac04058..50ff8f6 100644
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
@@ -246,7 +246,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
mApplicationsState.ensureIcon(entry);
holder.icon.setImageDrawable(entry.icon);
holder.state.setTag(entry);
- holder.state.setChecked(mLongScreen.shouldForceLongScreen(entry.info.packageName));
+ holder.state.setChecked(!(mLongScreen.shouldForceLongScreen(entry.info.packageName)));
return holder.rootView;
}
--
2.17.1

View File

@ -0,0 +1,29 @@
From 3fb27b3b3ab30a86432d2ca1f8fe5c3802793866 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 23 Oct 2019 09:38:16 +0000
Subject: [PATCH] Remove fsck SELinux labels
These are covered by LOS sepolicy
Change-Id: I7c63c9aed39afc07b8c80918053154113f848cd9
---
sepolicy/file_contexts | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 6da14ac..dfea075 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -6,9 +6,6 @@
/system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0
/system/bin/asus-motor u:object_r:phhsu_exec:s0
-#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
-/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
-
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
--
2.17.1

View File

@ -0,0 +1,186 @@
From 22d48d3925e8741ab115e7f20c2faf20c2fe21b5 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 19 Dec 2020 15:57:27 +0000
Subject: [PATCH] Revert "init: Add vendor-specific initialization hooks."
This reverts commit 7bc78d1354cd2e8df1ba693c627d5be39206e375.
Change-Id: I0c3241ef3626bc989b34723e30b2339e4a62399d
---
init/Android.bp | 9 ---------
init/NOTICE | 26 --------------------------
init/property_service.cpp | 4 ----
init/vendor_init.cpp | 37 -------------------------------------
init/vendor_init.h | 33 ---------------------------------
5 files changed, 109 deletions(-)
delete mode 100644 init/vendor_init.cpp
delete mode 100644 init/vendor_init.h
diff --git a/init/Android.bp b/init/Android.bp
index e28d9f026..827a8293f 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -71,14 +71,6 @@ init_host_sources = [
"host_init_verifier.cpp",
]
-cc_library_static {
- name: "vendor_init",
- recovery_available: true,
- srcs: [
- "vendor_init.cpp",
- ],
-}
-
cc_defaults {
name: "init_defaults",
cpp_std: "experimental",
@@ -169,7 +161,6 @@ cc_library_static {
defaults: [
"init_defaults",
"selinux_policy_version",
- "vendor_init_defaults",
],
srcs: init_common_sources + init_device_sources,
whole_static_libs: [
diff --git a/init/NOTICE b/init/NOTICE
index 383d0f541..c5b1efa7a 100644
--- a/init/NOTICE
+++ b/init/NOTICE
@@ -188,29 +188,3 @@
END OF TERMS AND CONDITIONS
-Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 2852f4fb4..a89504e59 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -70,7 +70,6 @@
#include "subcontext.h"
#include "system/core/init/property_service.pb.h"
#include "util.h"
-#include "vendor_init.h"
using namespace std::literals;
@@ -913,9 +912,6 @@ void PropertyLoadBootDefaults() {
}
}
- // Update with vendor-specific property runtime overrides
- vendor_load_properties();
-
property_initialize_ro_product_props();
property_derive_build_fingerprint();
diff --git a/init/vendor_init.cpp b/init/vendor_init.cpp
deleted file mode 100644
index d3fd5ffe2..000000000
--- a/init/vendor_init.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "vendor_init.h"
-
-/* init vendor override stubs */
-
-__attribute__ ((weak))
-void vendor_load_properties()
-{
-}
diff --git a/init/vendor_init.h b/init/vendor_init.h
deleted file mode 100644
index 9afb449be..000000000
--- a/init/vendor_init.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __INIT_VENDOR__H__
-#define __INIT_VENDOR__H__
-extern void vendor_load_properties(void);
-#endif /* __INIT_VENDOR__H__ */
--
2.25.1

View File

@ -0,0 +1,42 @@
From 7f50c607a9e3bae747ff33566da624abc50024d3 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 5 Oct 2020 01:29:18 +0000
Subject: [PATCH] Revert "sepolicy: Relabel wifi. properties as wifi_prop"
This reverts commit bf52f194873840546c996c232eb44c8427ddcd5c.
Change-Id: I0446540331684eb57f7e17bcc3273d6247915854
---
private/property_contexts | 1 -
private/system_server.te | 3 ---
2 files changed, 4 deletions(-)
diff --git a/private/property_contexts b/private/property_contexts
index 7908bb107..49cc8a2cd 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -169,7 +169,6 @@ dalvik. u:object_r:dalvik_prop:s0
ro.dalvik. u:object_r:dalvik_prop:s0
# Shared between system server and wificond
-wifi. u:object_r:wifi_prop:s0
wlan. u:object_r:wifi_prop:s0
# Lowpan properties
diff --git a/private/system_server.te b/private/system_server.te
index 66c46ed97..2373e9617 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -676,9 +676,6 @@ get_prop(system_server, mock_ota_prop)
# Read the property as feature flag for protecting apks with fs-verity.
get_prop(system_server, apk_verity_prop)
-# Read wifi.interface
-get_prop(system_server, wifi_prop)
-
# Read the vendor property that indicates if Incremental features is enabled
get_prop(system_server, incremental_prop)
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
From dc5694dd4956db2dbfbbea6bb2d34acb6f2a7851 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 6 Oct 2020 01:41:16 +0000
Subject: [PATCH] UI: Revive navbar layout tuning via sysui_nav_bar tunable
Google keeps fixing what ain't broken.
This partially undoes https://github.com/LineageOS/android_frameworks_base/commit/e0d5ccd331e694afdc3c8462a1b845df329de2b8 and https://github.com/LineageOS/android_frameworks_base/commit/d34b4e8d278386b85a00018c502bd21d00f8813b
Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
---
.../statusbar/phone/NavigationBarInflaterView.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index 726a70582537..536263c83ddd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -108,6 +108,7 @@ public class NavigationBarInflaterView extends FrameLayout
private boolean mIsVertical;
private boolean mAlternativeOrder;
+ private boolean mUsingCustomLayout;
private OverviewProxyService mOverviewProxyService;
private int mNavBarMode = NAV_BAR_MODE_3BUTTON;
@@ -173,6 +174,7 @@ public class NavigationBarInflaterView extends FrameLayout
super.onAttachedToWindow();
Dependency.get(TunerService.class).addTunable(this, NAV_BAR_INVERSE);
Dependency.get(TunerService.class).addTunable(this, KEY_NAVIGATION_HINT);
+ Dependency.get(TunerService.class).addTunable(this, NAV_BAR_VIEWS);
}
@Override
@@ -191,6 +193,8 @@ public class NavigationBarInflaterView extends FrameLayout
mIsHintEnabled = TunerService.parseIntegerSwitch(newValue, true);
updateHint();
onLikelyDefaultLayoutChange();
+ } else if (NAV_BAR_VIEWS.equals(key)) {
+ setNavigationBarLayout(newValue);
}
}
@@ -200,7 +204,17 @@ public class NavigationBarInflaterView extends FrameLayout
updateLayoutInversion();
}
+ public void setNavigationBarLayout(String layoutValue) {
+ if (!Objects.equals(mCurrentLayout, layoutValue)) {
+ mUsingCustomLayout = layoutValue != null;
+ clearViews();
+ inflateLayout(layoutValue);
+ }
+ }
+
public void onLikelyDefaultLayoutChange() {
+ // Don't override custom layouts
+ if (mUsingCustomLayout) return;
// Reevaluate new layout
final String newValue = getDefaultLayout();
--
2.25.1

View File

@ -0,0 +1,62 @@
From 861c67194b96a8eac90f5d871f6d1b350791f05a Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Mon, 5 Oct 2020 01:51:46 +0000
Subject: [PATCH] build: Don't handle apns-conf
Leave it to vendor/lineage instead
Change-Id: I51fb1436ee0ee2e33b20ca0810b69e827f3f34dc
---
target/product/aosp_product.mk | 7 -------
target/product/full_base_telephony.mk | 5 -----
target/product/mainline.mk | 4 ----
3 files changed, 16 deletions(-)
diff --git a/target/product/aosp_product.mk b/target/product/aosp_product.mk
index 4cdb28b30..dd38847f1 100644
--- a/target/product/aosp_product.mk
+++ b/target/product/aosp_product.mk
@@ -39,13 +39,6 @@ PRODUCT_PACKAGES += \
preinstalled-packages-platform-aosp-product.xml \
WallpaperPicker \
-# Telephony:
-# Provide a APN configuration to GSI product
-ifeq ($(LINEAGE_BUILD),)
-PRODUCT_COPY_FILES += \
- device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
-endif
-
# NFC:
# Provide a libnfc-nci.conf to GSI product
PRODUCT_COPY_FILES += \
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
index e3442147a..0aa9e7700 100644
--- a/target/product/full_base_telephony.mk
+++ b/target/product/full_base_telephony.mk
@@ -30,10 +30,5 @@ endif
PRODUCT_COPY_FILES := \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
-ifeq ($(LINEAGE_BUILD),)
-PRODUCT_COPY_FILES += \
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
-endif
-
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
diff --git a/target/product/mainline.mk b/target/product/mainline.mk
index 418b1eedd..9754cc8e2 100644
--- a/target/product/mainline.mk
+++ b/target/product/mainline.mk
@@ -40,7 +40,3 @@ endif
PRODUCT_PACKAGES += \
PhotoTable \
WallpaperPicker \
-
-ifeq ($(LINEAGE_BUILD),)
-PRODUCT_COPY_FILES += device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
-endif
--
2.25.1

View File

@ -0,0 +1,45 @@
From f0b8b09faba7f40bfe376a7c6d3a0f81e7d587c4 Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Sun, 3 Mar 2019 14:07:33 +0800
Subject: [PATCH] build_soong: Disable generated_kernel_headers
...but done in a way so that there's no need to remove generated_kernel_headers from individual projects - thanks @ExpressLuke
Change-Id: I630857cec208f1830e776bf5031d7bb9bc4435d0
---
build/soong/Android.bp | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/build/soong/Android.bp b/build/soong/Android.bp
index 5076e684..2279bf44 100644
--- a/build/soong/Android.bp
+++ b/build/soong/Android.bp
@@ -20,9 +20,6 @@ bootstrap_go_package {
lineage_generator {
name: "generated_kernel_includes",
- // The headers make command
- cmd: "$(PATH_OVERRIDE_SOONG) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(KERNEL_BUILD_OUT_PREFIX)$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",
-
// Directories that can be imported by a cc_* module generated_headers property
export_include_dirs: [
"usr/audio/include/uapi",
@@ -30,15 +27,6 @@ lineage_generator {
"usr/include/audio/include/uapi",
"usr/techpack/audio/include",
],
-
- // Sources for dependency tracking
- dep_root: "$(TARGET_KERNEL_SOURCE)",
- dep_files: [
- "Makefile",
- "include/**/*",
- "arch/$(KERNEL_ARCH)/include/**/*",
- "techpack/audio/include/**/*",
- ],
}
cc_library_headers {
--
2.25.1

View File

@ -0,0 +1,26 @@
From 95ef97f5aa82c15e47f9313eca4899d89dba5dd0 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 4 Jul 2018 17:59:14 +0800
Subject: [PATCH] sdk: Invert per-app stretch-to-fullscreen implementation
Change-Id: Idf7dab4e1e0c79953fa672f33ec65fecffb37c83
---
sdk/src/java/org/lineageos/internal/applications/LongScreen.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/src/java/org/lineageos/internal/applications/LongScreen.java b/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
index 7fe0d68..26ea349 100644
--- a/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
+++ b/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
@@ -57,7 +57,7 @@ public class LongScreen {
}
public boolean shouldForceLongScreen(String packageName) {
- return isSupported() && mApps.contains(packageName);
+ return isSupported() && !(mApps.contains(packageName));
}
public Set<String> getApps() {
--
2.7.4

View File

@ -0,0 +1,135 @@
From e562ff56e4b4196d223b006a7d96b72ebc75dece Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Mon, 15 Jul 2019 10:43:52 +0000
Subject: [PATCH] treble: Add overlay-lineage
Change-Id: I9d313b1488d98acc7cf37d23820946ee99745426
---
base.mk | 12 ++-
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
2 files changed, 90 insertions(+), 3 deletions(-)
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
diff --git a/base.mk b/base.mk
index 3623d42..17944f7 100644
--- a/base.mk
+++ b/base.mk
@@ -12,7 +12,13 @@ PRODUCT_COPY_FILES += \
device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
-PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay
+
+PRODUCT_PACKAGE_OVERLAYS += \
+ device/phh/treble/overlay \
+ device/phh/treble/overlay-lineage
+
+PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \
+ device/phh/treble/overlay-lineage/lineage-sdk
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
@@ -29,11 +35,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.build.version.security_patch=$(PLATFORM_SECURITY_PATCH) \
ro.adb.secure=0 \
ro.logd.auditd=true
-
+
#Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
persist.sys.usb.config=adb \
- ro.cust.cdrom=/dev/null
+ ro.cust.cdrom=/dev/null
#VNDK config files
PRODUCT_COPY_FILES += \
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
new file mode 100644
index 0000000..8df673a
--- /dev/null
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015-2016 The CyanogenMod Project
+ 2017-2018 The LineageOS Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- Whether device has screen with higher aspect ratio -->
+ <bool name="config_haveHigherAspectRatioScreen">true</bool>
+
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following capabilities present:
+ // Device has a color adjustable battery light.
+ LIGHTS_RGB_NOTIFICATION_LED = 1
+ // Device has a color adjustable notification light.
+ LIGHTS_RGB_BATTERY_LED = 2
+ LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
+ // The notification light has adjustable pulsing capability.
+ LIGHTS_PULSATING_LED = 8
+ // Device has a multi-segment battery light that is able to
+ // use the light brightness value to determine how many
+ // segments to show (in order to represent battery level).
+ LIGHTS_SEGMENTED_BATTERY_LED = 16
+ // The notification light supports HAL adjustable brightness
+ // via the alpha channel.
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
+ // then HAL support is not necessary for brightness control. In this case,
+ // brightness support will be provided by lineage-sdk through the scaling of
+ // RGB color values.
+ LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
+ // Device has a battery light.
+ LIGHTS_BATTERY_LED = 64
+ // The battery light supports HAL adjustable brightness via
+ // the alpha channel.
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
+ // support is not necessary for brightness control. In this case,
+ // brightness support will be provided by lineage-sdk through the scaling of
+ // RGB color values.
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
+ For example, a device with notification and battery lights that supports
+ pulsating and RGB control would set this config to 75. -->
+ <integer name="config_deviceLightCapabilities">255</integer>
+
+ <!-- Hardware keys present on the device, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following keys present:
+ 1 - Home
+ 2 - Back
+ 4 - Menu
+ 8 - Assistant (search)
+ 16 - App switch
+ 32 - Camera
+ 64 - Volume rocker
+ For example, a device with Home, Back and Menu keys would set this
+ config to 7. -->
+ <integer name="config_deviceHardwareKeys">127</integer>
+
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following keys present:
+ 1 - Home
+ 2 - Back
+ 4 - Menu
+ 8 - Assistant (search)
+ 16 - App switch
+ 32 - Camera
+ 64 - Volume rocker
+ For example, a device with Home, Back and Menu keys would set this
+ config to 7. -->
+ <integer name="config_deviceHardwareWakeKeys">127</integer>
+</resources>
--
2.25.1

View File

@ -0,0 +1,25 @@
From 4d6f28cb695c5edf253f03c373485a21cd43d19c Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Tue, 10 Sep 2019 02:42:36 +0000
Subject: [PATCH] treble: Don't specify config_wallpaperCropperPackage
Change-Id: I72b59def304779e4bd9a399c01cf1180d15bf444
---
overlay/frameworks/base/core/res/res/values/config.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 28c7a28..48ca260 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -22,7 +22,6 @@
<string name="config_icon_mask" translatable="false">"M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"</string>
<bool name="config_useRoundIcon">true</bool>
- <string name="config_wallpaperCropperPackage">com.android.wallpaperpicker</string>
<bool name="config_unplugTurnsOnScreen">true</bool>
<integer name="config_multiuserMaximumUsers">5</integer>
<bool name="config_enableMultiUserUI">true</bool>
--
2.17.1

View File

@ -0,0 +1,30 @@
From 7a633a53d8e20e2d976597a332bf5ba855ec1f75 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Thu, 5 Sep 2019 02:08:22 +0000
Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
instead
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
---
config/common.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/common.mk b/config/common.mk
index 2fe9cb01..7d971bba 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -70,9 +70,9 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml
-# Enforce privapp-permissions whitelist
+# Log privapp-permissions whitelist violations
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- ro.control_privapp_permissions=enforce
+ ro.control_privapp_permissions=log
# Include AOSP audio files
include vendor/lineage/config/aosp_audio.mk
--
2.17.1