LeOS-V
harvey186 2024-11-10 09:17:44 +01:00
parent 7d5100764a
commit 6438709f40
10 changed files with 781 additions and 96 deletions

View File

@ -0,0 +1,32 @@
From c87860bc80843e38d816e11d311120faa7c2fe7d Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Sat, 9 Nov 2024 13:28:59 +0100
Subject: [PATCH] 1003-A15-r5-rw-system
---
rw-system.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rw-system.sh b/rw-system.sh
index 7ea44f6..a7874d8 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -843,12 +843,12 @@ copyprop() {
resetprop_phh ro.boot.veritymode enforcing
resetprop_phh ro.boot.warranty_bit 0
resetprop_phh ro.warranty_bit 0
- resetprop_phh ro.debuggable 0
- resetprop_phh ro.secure 1
+ resetprop_phh ro.debuggable 1
+ resetprop_phh ro.secure 0
resetprop_phh ro.build.type user
resetprop_phh --delete ro.build.selinux
- resetprop_phh ro.adb.secure 1
+
for abi in "" 64;do
f=/vendor/lib$abi/libstagefright_foundation.so
--
2.34.1

View File

@ -0,0 +1,132 @@
From df2b3de08afa114ffd666fa51bbb2d2dcc5c80c3 Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Sat, 9 Nov 2024 13:25:47 +0100
Subject: [PATCH] generate.sh
---
generate.sh | 11 ++++++-----
{tdgsi_a64_ab => leos_a64_ab}/BoardConfig.mk | 0
{tdgsi_arm64_ab => leos_arm64_ab}/BoardConfig.mk | 0
tdgsi_a64_a/BoardConfig.mk | 8 --------
tdgsi_arm64_a/BoardConfig.mk | 7 -------
tdgsi_arm_a/BoardConfig.mk | 11 -----------
tdgsi_arm_ab/BoardConfig.mk | 7 -------
7 files changed, 6 insertions(+), 38 deletions(-)
rename {tdgsi_a64_ab => leos_a64_ab}/BoardConfig.mk (100%)
rename {tdgsi_arm64_ab => leos_arm64_ab}/BoardConfig.mk (100%)
delete mode 100644 tdgsi_a64_a/BoardConfig.mk
delete mode 100644 tdgsi_arm64_a/BoardConfig.mk
delete mode 100644 tdgsi_arm_a/BoardConfig.mk
delete mode 100644 tdgsi_arm_ab/BoardConfig.mk
diff --git a/generate.sh b/generate.sh
index 1e63d8c..606bdfe 100644
--- a/generate.sh
+++ b/generate.sh
@@ -15,8 +15,8 @@ fi
echo 'PRODUCT_MAKEFILES := \' > AndroidProducts.mk
for part in a ab;do
- for apps in vanilla gapps foss gapps-go;do
- for arch in arm64 arm a64;do
+ for apps in vanilla;do
+ for arch in arm64 a64;do
for su in yes no;do
apps_suffix=""
apps_script=""
@@ -64,7 +64,7 @@ for part in a ab;do
optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)'
fi
- target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
+ target="leos_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
baseArch="$arch"
if [ "$arch" = "a64" ];then
@@ -80,15 +80,16 @@ for part in a ab;do
TARGET_GAPPS_ARCH := ${baseArch}
include build/make/target/product/aosp_${baseArch}.mk
\$(call inherit-product, device/phh/treble/base.mk)
+\$(call inherit-product, vendor/LeOS/leos.mk)
$optional_base
$apps_script
$rom_script
PRODUCT_NAME := $target
-PRODUCT_DEVICE := tdgsi_${arch}_$part
+PRODUCT_DEVICE := leos_${arch}_$part
PRODUCT_BRAND := google
PRODUCT_SYSTEM_BRAND := google
-PRODUCT_MODEL := TrebleDroid $apps_name
+PRODUCT_MODEL := LeOS-V
# Overwrite the inherited "emulator" characteristics
PRODUCT_CHARACTERISTICS := device
diff --git a/tdgsi_a64_ab/BoardConfig.mk b/leos_a64_ab/BoardConfig.mk
similarity index 100%
rename from tdgsi_a64_ab/BoardConfig.mk
rename to leos_a64_ab/BoardConfig.mk
diff --git a/tdgsi_arm64_ab/BoardConfig.mk b/leos_arm64_ab/BoardConfig.mk
similarity index 100%
rename from tdgsi_arm64_ab/BoardConfig.mk
rename to leos_arm64_ab/BoardConfig.mk
diff --git a/tdgsi_a64_a/BoardConfig.mk b/tdgsi_a64_a/BoardConfig.mk
deleted file mode 100644
index d430bf8..0000000
--- a/tdgsi_a64_a/BoardConfig.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-include build/make/target/board/generic_arm_ab/BoardConfig.mk
-include device/phh/treble/board-base.mk
-
-ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1572864000
-endif
-TARGET_USES_64_BIT_BINDER := true
-BOARD_SYSTEMIMAGE_AS_SYSTEM := true
diff --git a/tdgsi_arm64_a/BoardConfig.mk b/tdgsi_arm64_a/BoardConfig.mk
deleted file mode 100644
index c9bc831..0000000
--- a/tdgsi_arm64_a/BoardConfig.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-include build/make/target/board/generic_arm64_ab/BoardConfig.mk
-include device/phh/treble/board-base.mk
-
-ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2080374784
-endif
-BOARD_SYSTEMIMAGE_AS_SYSTEM := true
diff --git a/tdgsi_arm_a/BoardConfig.mk b/tdgsi_arm_a/BoardConfig.mk
deleted file mode 100644
index 7340fc4..0000000
--- a/tdgsi_arm_a/BoardConfig.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-include build/make/target/board/generic_arm_ab/BoardConfig.mk
-include device/phh/treble/board-base.mk
-
-ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1313583104
-else
-BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 25165824
-endif
-
-TARGET_USES_64_BIT_BINDER := false
-BOARD_SYSTEMIMAGE_AS_SYSTEM := true
diff --git a/tdgsi_arm_ab/BoardConfig.mk b/tdgsi_arm_ab/BoardConfig.mk
deleted file mode 100644
index a9a4fe3..0000000
--- a/tdgsi_arm_ab/BoardConfig.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-include build/make/target/board/generic_arm_ab/BoardConfig.mk
-include device/phh/treble/board-base.mk
-
-ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824
-endif
-TARGET_USES_64_BIT_BINDER := false
--
2.34.1

View File

@ -131,23 +131,9 @@ index 97791acfb..bc04477fb 100644
pw.println(" canBypass: ${canBypass()}")
pw.println(" bouncerShowing: $bouncerShowing")
pw.println(" altBouncerShowing:" +
diff --git a/services/core/Android.bp b/services/core/Android.bp
index 0ee9e0d8b..4f8fd8829 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -231,6 +231,10 @@ java_library_static {
"dreams_flags_lib",
"aconfig_new_storage_flags_lib",
"powerstats_flags_lib",
+ "vendor.oplus.hardware.biometrics.fingerprint-V2.1-java",
+ "vendor.oppo.hardware.biometrics.fingerprint-V2.1-java",
+ "vendor.xiaomi.hardware.fingerprintextension-V1.0-java",
+ "vendor.aospa.biometrics.face",
//AIDL
"vendor.samsung.hardware.sysinput-V1-java",
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
index bd6d59391..8253ac61f 100644
index bd6d59391e4a..700dd26f49ca 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
@@ -26,6 +26,7 @@ import android.app.ActivityManager;
@ -158,14 +144,14 @@ index bd6d59391..8253ac61f 100644
import android.hardware.biometrics.IBiometricSensorReceiver;
import android.hardware.biometrics.IBiometricService;
import android.hardware.biometrics.IBiometricServiceLockoutResetCallback;
@@ -40,6 +41,7 @@ import android.hardware.face.FaceAuthenticateOptions;
@@ -39,6 +40,7 @@ import android.hardware.face.Face;
import android.hardware.face.FaceAuthenticateOptions;
import android.hardware.face.FaceEnrollOptions;
import android.hardware.face.FaceSensorConfigurations;
import android.hardware.face.FaceSensorPropertiesInternal;
+import android.hardware.face.FaceSensorProperties;
import android.hardware.face.FaceSensorPropertiesInternal;
import android.hardware.face.FaceServiceReceiver;
import android.hardware.face.IFaceAuthenticatorsRegisteredCallback;
import android.hardware.face.IFaceService;
@@ -72,6 +74,8 @@ import com.android.server.biometrics.sensors.ClientMonitorCallbackConverter;
import com.android.server.biometrics.sensors.LockoutResetDispatcher;
import com.android.server.biometrics.sensors.LockoutTracker;
@ -175,39 +161,47 @@ index bd6d59391..8253ac61f 100644
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -661,7 +665,23 @@ public class FaceService extends SystemService {
provider.second.scheduleGetFeature(provider.first, token, userId, feature,
@@ -662,12 +666,28 @@ public class FaceService extends SystemService {
new ClientMonitorCallbackConverter(receiver), opPackageName);
}
-
+ private List<ServiceProvider> getSenseProviders() {
+ final List<ServiceProvider> providers = new ArrayList<>();
+ if (SenseUtils.canUseProvider()) {
+ FaceSensorPropertiesInternal props = new FaceSensorPropertiesInternal(
+ SenseProvider.DEVICE_ID,
+ SensorProperties.STRENGTH_WEAK,
+ 1, /** maxEnrollmentsPerUser **/
+ new ArrayList(),
+ FaceSensorProperties.TYPE_RGB,
+ false, /** supportsFaceDetection **/
+ false, /** supportsSelfIllumination **/
+ false); /** resetLockoutRequiresChallenge **/
+ SenseProvider provider = new SenseProvider(getContext(), mBiometricStateCallback, props, mLockoutResetDispatcher);
+ providers.add(provider);
+ }
+ FaceSensorPropertiesInternal props = new FaceSensorPropertiesInternal(
+ SenseProvider.DEVICE_ID,
+ SensorProperties.STRENGTH_WEAK,
+ 1, /** maxEnrollmentsPerUser **/
+ new ArrayList(),
+ FaceSensorProperties.TYPE_RGB,
+ false, /** supportsFaceDetection **/
+ false, /** supportsSelfIllumination **/
+ false); /** resetLockoutRequiresChallenge **/
+ SenseProvider provider = new SenseProvider(getContext(), mBiometricStateCallback, props, mLockoutResetDispatcher);
+ providers.add(provider);
+ return providers;
+ }
+
@android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
public void registerAuthenticators(
FaceSensorConfigurations faceSensorConfigurations) {
@@ -681,6 +701,7 @@ public class FaceService extends SystemService {
super.registerAuthenticators_enforcePermission();
- if (!faceSensorConfigurations.hasSensorConfigurations()) {
+ if (!faceSensorConfigurations.hasSensorConfigurations() && !SenseUtils.canUseProvider()) {
Slog.d(TAG, "No face sensors to register.");
return;
}
@@ -677,6 +697,10 @@ public class FaceService extends SystemService {
private List<ServiceProvider> getProviders(
FaceSensorConfigurations faceSensorConfigurations) {
final List<ServiceProvider> providers = new ArrayList<>();
+ if (SenseUtils.canUseProvider()) {
+ providers.addAll(getSenseProviders());
+ return providers;
+ }
final Pair<String, SensorProps[]> filteredSensorProps = filterAvailableHalInstances(
faceSensorConfigurations);
providers.add(mFaceProviderFunction.getFaceProvider(filteredSensorProps,
faceSensorConfigurations.getResetLockoutRequiresChallenge()));
+ providers.addAll(getSenseProviders());
return providers;
}
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/sense/BiometricTestSessionImpl.java b/services/core/java/com/android/server/biometrics/sensors/face/sense/BiometricTestSessionImpl.java
new file mode 100644
index 000000000..c1122a202

View File

@ -1,18 +1,18 @@
From 4f7591caab051ae0664d9802da14cd071591ec91 Mon Sep 17 00:00:00 2001
From d12c9b401eb1e2956df7845a0792105c410a8835 Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Mon, 9 Sep 2024 16:14:56 +0200
Subject: [PATCH] FCM_removal
Date: Sun, 10 Nov 2024 08:59:12 +0100
Subject: [PATCH] 1002-A15-FCM_removal
Change-Id: Id723dba9a296fc356a2b86ba7081b6a070012f4c
Change-Id: I8dfe24756797bc8f8d350d210c270e14dccc5c03
---
Android.bp | 2 -
.../ImsEntitlementApi.java | 1 -
.../ImsEntitlementApi.java | 6 -
.../fcm/FcmRegistrationReceiver.java | 32 ----
.../fcm/FcmRegistrationService.java | 153 ------------------
.../imsserviceentitlement/fcm/FcmService.java | 135 ----------------
.../fcm/FcmTokenStore.java | 83 ----------
.../imsserviceentitlement/fcm/FcmUtils.java | 73 ---------
7 files changed, 479 deletions(-)
7 files changed, 484 deletions(-)
delete mode 100644 src/com/android/imsserviceentitlement/fcm/FcmRegistrationReceiver.java
delete mode 100644 src/com/android/imsserviceentitlement/fcm/FcmRegistrationService.java
delete mode 100644 src/com/android/imsserviceentitlement/fcm/FcmService.java
@ -34,13 +34,25 @@ index 55dcf84..74c730d 100644
"transport-api-aar",
"firebase-measurement-connector-aar",
diff --git a/src/com/android/imsserviceentitlement/ImsEntitlementApi.java b/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
index af9ba27..7db4365 100644
index cc5e5f0..7db4365 100644
--- a/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
+++ b/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
@@ -107,7 +107,6 @@ public class ImsEntitlementApi {
@@ -30,8 +30,6 @@ import com.android.imsserviceentitlement.debug.DebugUtils;
import com.android.imsserviceentitlement.entitlement.EntitlementConfiguration;
import com.android.imsserviceentitlement.entitlement.EntitlementConfiguration.ClientBehavior;
import com.android.imsserviceentitlement.entitlement.EntitlementResult;
-import com.android.imsserviceentitlement.fcm.FcmTokenStore;
-import com.android.imsserviceentitlement.fcm.FcmUtils;
import com.android.imsserviceentitlement.ts43.Ts43Constants.ResponseXmlAttributes;
import com.android.imsserviceentitlement.ts43.Ts43SmsOverIpStatus;
import com.android.imsserviceentitlement.ts43.Ts43VolteStatus;
@@ -109,10 +107,6 @@ public class ImsEntitlementApi {
public EntitlementResult checkEntitlementStatus() {
Log.d(TAG, "checkEntitlementStatus subId=" + mSubId);
ServiceEntitlementRequest.Builder requestBuilder = ServiceEntitlementRequest.builder();
- mLastEntitlementConfiguration.getToken().ifPresent(
- token -> requestBuilder.setAuthenticationToken(token));
- FcmUtils.fetchFcmToken(mContext, mSubId);
- requestBuilder.setNotificationToken(FcmTokenStore.getToken(mContext, mSubId));
int entitlementVersion = TelephonyUtils.getEntitlementVersion(mContext, mSubId);
requestBuilder.setEntitlementVersion(entitlementVersion + ".0");

View File

@ -1,36 +0,0 @@
From 172feede02ca905e5552cd24327ecd7804d2d78d Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Mon, 9 Sep 2024 12:47:34 +0200
Subject: [PATCH] 1001-A15_remove_token
Change-Id: Ib797f46ccaf2e4531907a91b484cd26689cb80da
---
src/com/android/imsserviceentitlement/ImsEntitlementApi.java | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/com/android/imsserviceentitlement/ImsEntitlementApi.java b/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
index cc5e5f0..af9ba27 100644
--- a/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
+++ b/src/com/android/imsserviceentitlement/ImsEntitlementApi.java
@@ -30,8 +30,6 @@ import com.android.imsserviceentitlement.debug.DebugUtils;
import com.android.imsserviceentitlement.entitlement.EntitlementConfiguration;
import com.android.imsserviceentitlement.entitlement.EntitlementConfiguration.ClientBehavior;
import com.android.imsserviceentitlement.entitlement.EntitlementResult;
-import com.android.imsserviceentitlement.fcm.FcmTokenStore;
-import com.android.imsserviceentitlement.fcm.FcmUtils;
import com.android.imsserviceentitlement.ts43.Ts43Constants.ResponseXmlAttributes;
import com.android.imsserviceentitlement.ts43.Ts43SmsOverIpStatus;
import com.android.imsserviceentitlement.ts43.Ts43VolteStatus;
@@ -109,9 +107,6 @@ public class ImsEntitlementApi {
public EntitlementResult checkEntitlementStatus() {
Log.d(TAG, "checkEntitlementStatus subId=" + mSubId);
ServiceEntitlementRequest.Builder requestBuilder = ServiceEntitlementRequest.builder();
- mLastEntitlementConfiguration.getToken().ifPresent(
- token -> requestBuilder.setAuthenticationToken(token));
- FcmUtils.fetchFcmToken(mContext, mSubId);
requestBuilder.setNotificationToken(FcmTokenStore.getToken(mContext, mSubId));
int entitlementVersion = TelephonyUtils.getEntitlementVersion(mContext, mSubId);
requestBuilder.setEntitlementVersion(entitlementVersion + ".0");
--
2.34.1

View File

@ -0,0 +1,27 @@
From a54c5682c337ffe9b1307475e2b1b2405fc83505 Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Thu, 17 Oct 2024 11:19:02 +0200
Subject: [PATCH] security_dashboard_e
Change-Id: I359b3c1ac4ac56adea32d86edad57c7c4b1f9f3e
---
res/values/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a7f7e33..3956aeb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -696,6 +696,9 @@
<!-- TODO(b/208624929): Update to an UX approved summary and char limit. -->
<!-- Main Settings screen setting summary for the item that takes you to the privacy and security settings. [CHAR LIMIT=60] -->
<string name="safety_center_summary">App security, device lock, permissions</string>
+
+ <!-- Summary for e Security settings, explaining a few important settings under it [CHAR LIMIT=NONE] -->
+ <string name="security_dashboard_summary_e">Screen lock, app security</string>
<!-- Face enrollment and settings --><skip />
<!-- Note: Update FaceEnrollParentalConsent.CONSENT_STRING_RESOURCES when any _consent_ strings are added or removed. -->
--
2.34.1

View File

@ -1,25 +1,26 @@
From b89b40764264478e67486ba22052e24ca54c4b25 Mon Sep 17 00:00:00 2001
From d7973c5d6cfdef5c8a5b9a8294d09e521d6a2750 Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Sat, 14 Sep 2024 13:12:03 +0200
Subject: [PATCH] dnscheck.grapheneos
Date: Sun, 10 Nov 2024 09:06:56 +0100
Subject: [PATCH] 1003-dnscheck.grapheneos
Change-Id: I4e949e53c4f862032f215e027cdab7dcf8ce5b11
Change-Id: Id9ac8263d9665faa32e77949e8e031d8efc4f58d
---
src/com/android/networkstack/util/DnsUtils.java | 1 -
1 file changed, 1 deletion(-)
src/com/android/networkstack/util/DnsUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/com/android/networkstack/util/DnsUtils.java b/src/com/android/networkstack/util/DnsUtils.java
index ce56d11..95c44ba 100644
index 622f56a5..95c44bab 100644
--- a/src/com/android/networkstack/util/DnsUtils.java
+++ b/src/com/android/networkstack/util/DnsUtils.java
@@ -50,7 +50,6 @@ public class DnsUtils {
@@ -50,7 +50,7 @@ public class DnsUtils {
public static final int TYPE_ADDRCONFIG = -1;
// A one time host name suffix of private dns probe.
// q.v. system/netd/server/dns/DnsTlsTransport.cpp
-// public static final String PRIVATE_DNS_PROBE_HOST_SUFFIX = "-dnsotls-ds.metric.gstatic.com";
public static final String PRIVATE_DNS_PROBE_HOST_SUFFIX = "-dnsotls-ds.dnscheck.grapheneos.org";
- public static final String PRIVATE_DNS_PROBE_HOST_SUFFIX = "-dnsotls-ds.metric.gstatic.com";
+ public static final String PRIVATE_DNS_PROBE_HOST_SUFFIX = "-dnsotls-ds.dnscheck.grapheneos.org";
private static final String TAG = DnsUtils.class.getSimpleName();
private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
--
2.34.1

View File

@ -0,0 +1,523 @@
From 3bd9a788b7b2fe0071c60835aebef1a77f370cd2 Mon Sep 17 00:00:00 2001
From: harvey186 <harvey186@hotmail.com>
Date: Sun, 10 Nov 2024 09:15:17 +0100
Subject: [PATCH] MI11tOverlay
---
Xiaomi/Mi11T/Android.mk | 8 +
Xiaomi/Mi11T/AndroidManifest.xml | 10 +
Xiaomi/Mi11T/res/values/config.xml | 294 +++++++++++++++++++++++++
Xiaomi/Mi11T/res/xml/power_profile.xml | 155 +++++++++++++
overlay.mk | 1 +
5 files changed, 468 insertions(+)
create mode 100644 Xiaomi/Mi11T/Android.mk
create mode 100644 Xiaomi/Mi11T/AndroidManifest.xml
create mode 100644 Xiaomi/Mi11T/res/values/config.xml
create mode 100644 Xiaomi/Mi11T/res/xml/power_profile.xml
diff --git a/Xiaomi/Mi11T/Android.mk b/Xiaomi/Mi11T/Android.mk
new file mode 100644
index 0000000..2b091fb
--- /dev/null
+++ b/Xiaomi/Mi11T/Android.mk
@@ -0,0 +1,8 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+LOCAL_PACKAGE_NAME := treble-overlay-xiaomi-mi11t
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay
+LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
+LOCAL_PRIVATE_PLATFORM_APIS := true
+include $(BUILD_PACKAGE)
diff --git a/Xiaomi/Mi11T/AndroidManifest.xml b/Xiaomi/Mi11T/AndroidManifest.xml
new file mode 100644
index 0000000..349e59c
--- /dev/null
+++ b/Xiaomi/Mi11T/AndroidManifest.xml
@@ -0,0 +1,10 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="me.phh.treble.overlay.xiaomi.mi11t"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:requiredSystemPropertyName="ro.vendor.build.fingerprint"
+ android:requiredSystemPropertyValue="+*iaomi/amber*"
+ android:priority="829"
+ android:isStatic="true" />
+</manifest>
diff --git a/Xiaomi/Mi11T/res/values/config.xml b/Xiaomi/Mi11T/res/values/config.xml
new file mode 100644
index 0000000..b5a8010
--- /dev/null
+++ b/Xiaomi/Mi11T/res/values/config.xml
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <!-- bools.xml files -->
+ <bool name="config_automatic_brightness_available">true</bool>
+ <bool name="config_showNavigationBar">true</bool>
+ <bool name="config_useDevInputEventForAudioJack">true</bool>
+
+
+ <!-- dimens.xml files -->
+ <dimen name="rounded_corner_radius">20.0dip</dimen>
+ <item type="dimen" name="status_bar_height">30.0dip</item>
+ <item type="dimen" name="status_bar_height_landscape">30.0dip</item>
+ <dimen name="status_bar_height_portrait">48.0dip</dimen>
+
+
+ <!-- arrays.xml files -->
+ <integer-array name="config_ambientBrighteningThresholds">
+ <item>2</item>
+ <item>6</item>
+ <item>10</item>
+ <item>30</item>
+ <item>100</item>
+ <item>400</item>
+ <item>600</item>
+ <item>1000</item>
+ </integer-array>
+ <integer-array name="config_ambientDarkeningThresholds">
+ <item>800</item>
+ <item>800</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ </integer-array>
+ <integer-array name="config_ambientThresholdLevels">
+ <item>2</item>
+ <item>10</item>
+ <item>30</item>
+ <item>100</item>
+ <item>800</item>
+ <item>2000</item>
+ <item>4000</item>
+ </integer-array>
+ <array name="config_autoBrightnessDisplayValuesNits">
+ <item>3.5</item>
+ <item>4.3</item>
+ <item>5.0</item>
+ <item>17.0</item>
+ <item>24.3</item>
+ <item>29.7</item>
+ <item>34.0</item>
+ <item>46.0</item>
+ <item>59.0</item>
+ <item>76.0</item>
+ <item>81.0</item>
+ <item>82.0</item>
+ <item>82.0</item>
+ <item>82.0</item>
+ <item>83.0</item>
+ <item>83.0</item>
+ <item>83.0</item>
+ <item>84.0</item>
+ <item>84.0</item>
+ <item>85.0</item>
+ <item>85.0</item>
+ <item>85.0</item>
+ <item>85.0</item>
+ <item>86.0</item>
+ <item>86.0</item>
+ <item>87.0</item>
+ <item>89.0</item>
+ <item>90.0</item>
+ <item>91.0</item>
+ <item>93.0</item>
+ <item>94.0</item>
+ <item>96.0</item>
+ <item>97.0</item>
+ <item>99.0</item>
+ <item>100.0</item>
+ <item>101.0</item>
+ <item>104.0</item>
+ <item>105.0</item>
+ <item>106.0</item>
+ <item>108.0</item>
+ <item>109.0</item>
+ <item>111.0</item>
+ <item>112.0</item>
+ <item>114.0</item>
+ <item>116.0</item>
+ <item>137.0</item>
+ <item>157.0</item>
+ <item>180.0</item>
+ <item>205.0</item>
+ <item>226.0</item>
+ <item>257.0</item>
+ <item>280.0</item>
+ <item>295.0</item>
+ <item>369.0</item>
+ <item>400.0</item>
+ <item>416.7</item>
+ <item>433.3</item>
+ <item>450.0</item>
+ <item>466.7</item>
+ <item>483.3</item>
+ <item>500.0</item>
+ <item>512.5</item>
+ <item>525.0</item>
+ <item>537.5</item>
+ <item>550.0</item>
+ <item>562.5</item>
+ <item>575.0</item>
+ <item>587.5</item>
+ <item>600.0</item>
+ <item>610.0</item>
+ <item>620.0</item>
+ <item>630.0</item>
+ <item>640.0</item>
+ <item>650.0</item>
+ <item>660.0</item>
+ <item>670.0</item>
+ <item>680.0</item>
+ <item>690.0</item>
+ <item>700.0</item>
+ <item>705.0</item>
+ <item>710.0</item>
+ <item>715.0</item>
+ <item>720.0</item>
+ <item>725.0</item>
+ <item>730.0</item>
+ <item>735.0</item>
+ <item>740.0</item>
+ <item>745.0</item>
+ <item>750.0</item>
+ <item>755.0</item>
+ <item>760.0</item>
+ <item>765.0</item>
+ <item>770.0</item>
+ <item>775.0</item>
+ <item>800.0</item>
+ <item>816.7</item>
+ <item>833.3</item>
+ <item>850.0</item>
+ <item>866.7</item>
+ <item>883.3</item>
+ <item>900.0</item>
+ <item>914.3</item>
+ <item>928.6</item>
+ <item>942.9</item>
+ <item>957.1</item>
+ <item>971.4</item>
+ <item>985.7</item>
+ <item>1000.0</item>
+ </array>
+ <integer-array name="config_autoBrightnessLcdBacklightValues">
+ <item>4</item>
+ <item>4</item>
+ <item>4</item>
+ <item>8</item>
+ <item>15</item>
+ <item>20</item>
+ <item>26</item>
+ <item>35</item>
+ <item>45</item>
+ <item>46</item>
+ <item>46</item>
+ <item>46</item>
+ <item>60</item>
+ <item>60</item>
+ <item>60</item>
+ <item>64</item>
+ <item>66</item>
+ <item>70</item>
+ <item>73</item>
+ <item>80</item>
+ <item>88</item>
+ <item>110</item>
+ <item>130</item>
+ <item>135</item>
+ <item>145</item>
+ <item>180</item>
+ <item>200</item>
+ <item>240</item>
+ <item>255</item>
+ </integer-array>
+ <integer-array name="config_autoBrightnessLevels">
+ <item>1</item>
+ <item>2</item>
+ <item>5</item>
+ <item>9</item>
+ <item>13</item>
+ <item>17</item>
+ <item>21</item>
+ <item>26</item>
+ <item>30</item>
+ <item>40</item>
+ <item>83</item>
+ <item>104</item>
+ <item>200</item>
+ <item>400</item>
+ <item>500</item>
+ <item>600</item>
+ <item>700</item>
+ <item>800</item>
+ <item>1000</item>
+ <item>1200</item>
+ <item>1500</item>
+ <item>1800</item>
+ <item>2000</item>
+ <item>2165</item>
+ <item>2680</item>
+ <item>3000</item>
+ <item>3540</item>
+ <item>4000</item>
+ </integer-array>
+ <string-array name="config_biometric_sensors">
+ <item>0:2:15</item>
+ </string-array>
+ <integer-array name="config_dynamicHysteresisBrightLevels">
+ <item>2000</item>
+ <item>2000</item>
+ <item>1000</item>
+ <item>1000</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ </integer-array>
+ <integer-array name="config_dynamicHysteresisDarkLevels">
+ <item>800</item>
+ <item>800</item>
+ <item>800</item>
+ <item>800</item>
+ <item>800</item>
+ <item>500</item>
+ <item>500</item>
+ <item>500</item>
+ </integer-array>
+ <integer-array name="config_dynamicHysteresisLuxLevels">
+ <item>2</item>
+ <item>10</item>
+ <item>30</item>
+ <item>100</item>
+ <item>800</item>
+ <item>2000</item>
+ <item>4000</item>
+ </integer-array>
+ <integer-array name="config_screenBrighteningThresholds">
+ <item>0</item>
+ </integer-array>
+ <integer-array name="config_screenDarkeningThresholds">
+ <item>0</item>
+ </integer-array>
+
+
+ <!-- fractions.xml files -->
+ <fraction name="config_autoBrightnessAdjustmentMaxGamma">300.0%</fraction>
+
+
+ <!-- integers.xml files -->
+ <integer name="config_autoBrightnessBrighteningLightDebounce">1000</integer>
+ <integer name="config_autoBrightnessDarkeningLightDebounce">1000</integer>
+ <integer name="config_bluetooth_idle_cur_ma">6</integer>
+ <integer name="config_bluetooth_operating_voltage_mv">3700</integer>
+ <integer name="config_bluetooth_rx_cur_ma">28</integer>
+ <integer name="config_bluetooth_tx_cur_ma">36</integer>
+ <integer name="config_brightness_ramp_rate_fast">180</integer>
+ <integer name="config_brightness_ramp_rate_slow">60</integer>
+ <integer name="config_defaultPeakRefreshRate">60</integer>
+ <integer name="config_screenBrightnessDim">1</integer>
+ <integer name="config_screenBrightnessDoze">17</integer>
+ <integer name="config_screenBrightnessForVrSettingDefault">86</integer>
+ <integer name="config_screenBrightnessForVrSettingMaximum">255</integer>
+ <integer name="config_screenBrightnessForVrSettingMinimum">79</integer>
+ <integer name="config_screenBrightnessSettingDefault">67</integer>
+ <integer name="config_screenBrightnessSettingMaximum">255</integer>
+ <integer name="config_screenBrightnessSettingMinimum">1</integer>
+ <integer name="config_shutdownBatteryTemperature">600</integer>
+
+
+ <!-- displayCutout -->
+ <string name="config_mainBuiltInDisplayCutout">M 0,0 H -27 V 84 H 27 V 0 H 0 Z</string>
+
+ <!-- alwaysOnDisplay -->
+ <bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>
+ <bool name="config_dozeSupportsAodWallpaper">false</bool>
+ <bool name="config_displayBlanksAfterDoze">false</bool>
+ <bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool>
+ <bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool>
+ <bool name="config_displayBrightnessBucketsInDoze">false</bool>
+
+</resources>
diff --git a/Xiaomi/Mi11T/res/xml/power_profile.xml b/Xiaomi/Mi11T/res/xml/power_profile.xml
new file mode 100644
index 0000000..73d3baf
--- /dev/null
+++ b/Xiaomi/Mi11T/res/xml/power_profile.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Open VIP can improve the speed of decompilation, resource code translate to name automatically and activate the smart editing and automatic completion function-->
+<device name="Android">
+ <item name="none">0</item>
+ <item name="screen.on">87.19</item>
+ <item name="screen.full">403.79</item>
+ <item name="bluetooth.active">21.21</item>
+ <item name="bluetooth.on">0.29</item>
+ <item name="wifi.on">1.12</item>
+ <item name="wifi.active">112.32</item>
+ <item name="wifi.scan">36.56</item>
+ <item name="dsp.audio">24.58</item>
+ <item name="dsp.video">89.93</item>
+ <item name="camera.flashlight">119.91</item>
+ <item name="camera.avg">690.25</item>
+ <item name="gps.on">30.61</item>
+ <item name="radio.active">205.01</item>
+ <item name="radio.scanning">94.5</item>
+ <array name="radio.on">
+ <value>1.85</value>
+ <value>1.85</value>
+ </array>
+ <item name="modem.controller.idle">0</item>
+ <item name="modem.controller.rx">0</item>
+ <item name="modem.controller.tx">0</item>
+ <item name="modem.controller.voltage">0</item>
+ <array name="cpu.clusters.cores">
+ <value>4</value>
+ <value>3</value>
+ <value>1</value>
+ </array>
+ <array name="cpu.core_speeds.cluster0">
+ <value>500000</value>
+ <value>600000</value>
+ <value>675000</value>
+ <value>750000</value>
+ <value>850000</value>
+ <value>925000</value>
+ <value>1000000</value>
+ <value>1075000</value>
+ <value>1250000</value>
+ <value>1350000</value>
+ <value>1450000</value>
+ <value>1525000</value>
+ <value>1625000</value>
+ <value>1725000</value>
+ <value>1800000</value>
+ <value>2000000</value>
+ </array>
+ <array name="cpu.core_power.cluster0">
+ <value>38.28</value>
+ <value>38.58</value>
+ <value>40.07</value>
+ <value>40.79</value>
+ <value>42.2</value>
+ <value>43.19</value>
+ <value>45.18</value>
+ <value>45.31</value>
+ <value>51.62</value>
+ <value>52.1</value>
+ <value>53.31</value>
+ <value>57.71</value>
+ <value>59.72</value>
+ <value>62.02</value>
+ <value>66.2</value>
+ <value>76.08</value>
+ </array>
+ <array name="cpu.core_speeds.cluster1">
+ <value>437000</value>
+ <value>700000</value>
+ <value>902000</value>
+ <value>1046000</value>
+ <value>1162000</value>
+ <value>1335000</value>
+ <value>1451000</value>
+ <value>1537000</value>
+ <value>1624000</value>
+ <value>1740000</value>
+ <value>1855000</value>
+ <value>1985000</value>
+ <value>2200000</value>
+ <value>2354000</value>
+ <value>2507000</value>
+ <value>2600000</value>
+ </array>
+ <array name="cpu.core_power.cluster1">
+ <value>54.78</value>
+ <value>72.2</value>
+ <value>81.18</value>
+ <value>95.58</value>
+ <value>111.47</value>
+ <value>117.26</value>
+ <value>129.38</value>
+ <value>141.26</value>
+ <value>147.71</value>
+ <value>161.09</value>
+ <value>185.82</value>
+ <value>209.2</value>
+ <value>247.72</value>
+ <value>293.28</value>
+ <value>346.95</value>
+ <value>358.09</value>
+ </array>
+ <array name="cpu.core_speeds.cluster2">
+ <value>659000</value>
+ <value>921000</value>
+ <value>1108000</value>
+ <value>1258000</value>
+ <value>1370000</value>
+ <value>1482000</value>
+ <value>1632000</value>
+ <value>1820000</value>
+ <value>1998000</value>
+ <value>2141000</value>
+ <value>2284000</value>
+ <value>2463000</value>
+ <value>2600000</value>
+ <value>2713000</value>
+ <value>2892000</value>
+ <value>3000000</value>
+ </array>
+ <array name="cpu.core_power.cluster2">
+ <value>79.61</value>
+ <value>96.4</value>
+ <value>116.92</value>
+ <value>134.02</value>
+ <value>143.51</value>
+ <value>160.75</value>
+ <value>182.09</value>
+ <value>204.07</value>
+ <value>248.71</value>
+ <value>291.45</value>
+ <value>336.45</value>
+ <value>398.92</value>
+ <value>444.4</value>
+ <value>505.96</value>
+ <value>641.21</value>
+ <value>722.08</value>
+ </array>
+ <item name="cpu.awake">17.43</item>
+ <item name="cpu.idle">8.1</item>
+ <item name="battery.capacity">5000</item>
+ <item name="wifi.controller.idle">0</item>
+ <item name="wifi.controller.rx">0</item>
+ <item name="wifi.controller.tx">0</item>
+ <array name="wifi.controller.tx_levels" />
+ <item name="wifi.controller.voltage">0</item>
+ <array name="wifi.batchedscan">
+ <value>.0002</value>
+ <value>.002</value>
+ <value>.02</value>
+ <value>.2</value>
+ <value>2</value>
+ </array>
+</device>
diff --git a/overlay.mk b/overlay.mk
index e025bb2..42e1b68 100644
--- a/overlay.mk
+++ b/overlay.mk
@@ -360,6 +360,7 @@ PRODUCT_PACKAGES += \
treble-overlay-xiaomi-civi4pro-systemui \
treble-overlay-xiaomi-mi11lite5g \
treble-overlay-xiaomi-mi11lite5g-systemui \
+ treble-overlay-xiaomi-mi11t \
treble-overlay-xiaomi-mi11tpro \
treble-overlay-xiaomi-mi12lite \
treble-overlay-xiaomi-mi12lite-systemui \
--
2.34.1