├── sepolicy
├── public
│ └── attributes
└── vendor
│ ├── init.te
│ ├── device.te
│ ├── system_server.te
│ ├── hwservice.te
│ ├── app.te
│ ├── hal_mlipay.te
│ ├── property.te
│ ├── hal_power_default.te
│ ├── genfs_contexts
│ ├── hwservice_contexts
│ ├── property_contexts
│ ├── hal_mlipay_default.te
│ ├── file_contexts
│ └── hal_fingerprint_default.te
├── configs
├── thermal
│ ├── thermal-engine.conf
│ ├── thermal-engine-map.conf
│ ├── thermal-engine-normal.conf
│ └── thermal-engine-camera.conf
├── keylayout
│ ├── uinput-fpc.kl
│ └── uinput-goodix.kl
├── idc
│ ├── uinput-fpc.idc
│ └── uinput-goodix.idc
├── hidl
│ ├── manifest_willow.xml
│ └── manifest.xml
└── audio
│ ├── listen_platform_info.xml
│ └── graphite_ipc_platform_info.xml
├── system.prop
├── XiaomiParts
├── res
│ ├── drawable
│ │ ├── preview.jpg
│ │ ├── ic_preset.xml
│ │ ├── action_reset.xml
│ │ ├── ic_dirac.xml
│ │ ├── ic_headphones.xml
│ │ ├── ic_doze.xml
│ │ ├── ic_flip.xml
│ │ ├── ic_mi.xml
│ │ ├── ic_usb_fastcharge.xml
│ │ ├── action_presets.xml
│ │ ├── ic_color.xml
│ │ └── ic_speaker_cleaner_icon.xml
│ ├── raw
│ │ └── clear_speaker_sound.mp3
│ ├── menu
│ │ └── menu_reset.xml
│ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ └── styles.xml
│ ├── layout
│ │ ├── activity_kcal.xml
│ │ └── custom_seekbar_preference_dialog.xml
│ └── xml
│ │ └── clear_speaker_settings.xml
├── src
│ └── org
│ │ └── lineageos
│ │ └── settings
│ │ └── device
│ │ ├── DiracService.java
│ │ ├── preferences
│ │ ├── SecureSettingCustomSeekBarPreference.java
│ │ ├── VibrationSeekBarPreference.java
│ │ ├── SecureSettingsStore.java
│ │ ├── SecureSettingListPreference.java
│ │ └── SecureSettingSwitchPreference.java
│ │ ├── DeviceSettingsActivity.java
│ │ ├── speaker
│ │ └── ClearSpeakerActivity.java
│ │ ├── DiracUtils.java
│ │ ├── kcal
│ │ ├── Utils.java
│ │ ├── PresetDialog.java
│ │ └── KCalSettingsActivity.java
│ │ ├── Fastcharge.java
│ │ ├── DiracSound.java
│ │ └── BootReceiver.java
└── Android.mk
├── overlay
├── packages
│ └── apps
│ │ └── overlays
│ │ ├── NotchBarKiller
│ │ ├── res
│ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── config.xml
│ │ ├── Android.mk
│ │ └── AndroidManifest.xml
│ │ └── NoCutoutOverlay
│ │ ├── Android.mk
│ │ ├── res
│ │ ├── values-am
│ │ │ └── strings.xml
│ │ ├── values-ar
│ │ │ └── strings.xml
│ │ ├── values-bn
│ │ │ └── strings.xml
│ │ ├── values-ca
│ │ │ └── strings.xml
│ │ ├── values-cs
│ │ │ └── strings.xml
│ │ ├── values-da
│ │ │ └── strings.xml
│ │ ├── values-et
│ │ │ └── strings.xml
│ │ ├── values-is
│ │ │ └── strings.xml
│ │ ├── values-iw
│ │ │ └── strings.xml
│ │ ├── values-ja
│ │ │ └── strings.xml
│ │ ├── values-km
│ │ │ └── strings.xml
│ │ ├── values-ko
│ │ │ └── strings.xml
│ │ ├── values-mn
│ │ │ └── strings.xml
│ │ ├── values-mr
│ │ │ └── strings.xml
│ │ ├── values-nb
│ │ │ └── strings.xml
│ │ ├── values-pa
│ │ │ └── strings.xml
│ │ ├── values-pl
│ │ │ └── strings.xml
│ │ ├── values-sk
│ │ │ └── strings.xml
│ │ ├── values-sq
│ │ │ └── strings.xml
│ │ ├── values-sv
│ │ │ └── strings.xml
│ │ ├── values-sw
│ │ │ └── strings.xml
│ │ ├── values-ta
│ │ │ └── strings.xml
│ │ ├── values-th
│ │ │ └── strings.xml
│ │ ├── values-tl
│ │ │ └── strings.xml
│ │ ├── values-tr
│ │ │ └── strings.xml
│ │ ├── values-vi
│ │ │ └── strings.xml
│ │ ├── values-zu
│ │ │ └── strings.xml
│ │ ├── values-af
│ │ │ └── strings.xml
│ │ ├── values-as
│ │ │ └── strings.xml
│ │ ├── values-az
│ │ │ └── strings.xml
│ │ ├── values-be
│ │ │ └── strings.xml
│ │ ├── values-bg
│ │ │ └── strings.xml
│ │ ├── values-bs
│ │ │ └── strings.xml
│ │ ├── values-de
│ │ │ └── strings.xml
│ │ ├── values-el
│ │ │ └── strings.xml
│ │ ├── values-en-rAU
│ │ │ └── strings.xml
│ │ ├── values-en-rCA
│ │ │ └── strings.xml
│ │ ├── values-en-rGB
│ │ │ └── strings.xml
│ │ ├── values-en-rIN
│ │ │ └── strings.xml
│ │ ├── values-es
│ │ │ └── strings.xml
│ │ ├── values-eu
│ │ │ └── strings.xml
│ │ ├── values-fa
│ │ │ └── strings.xml
│ │ ├── values-fi
│ │ │ └── strings.xml
│ │ ├── values-fr
│ │ │ └── strings.xml
│ │ ├── values-gl
│ │ │ └── strings.xml
│ │ ├── values-gu
│ │ │ └── strings.xml
│ │ ├── values-hi
│ │ │ └── strings.xml
│ │ ├── values-hr
│ │ │ └── strings.xml
│ │ ├── values-hu
│ │ │ └── strings.xml
│ │ ├── values-hy
│ │ │ └── strings.xml
│ │ ├── values-it
│ │ │ └── strings.xml
│ │ ├── values-ka
│ │ │ └── strings.xml
│ │ ├── values-kk
│ │ │ └── strings.xml
│ │ ├── values-kn
│ │ │ └── strings.xml
│ │ ├── values-ky
│ │ │ └── strings.xml
│ │ ├── values-lo
│ │ │ └── strings.xml
│ │ ├── values-lt
│ │ │ └── strings.xml
│ │ ├── values-lv
│ │ │ └── strings.xml
│ │ ├── values-mk
│ │ │ └── strings.xml
│ │ ├── values-ml
│ │ │ └── strings.xml
│ │ ├── values-my
│ │ │ └── strings.xml
│ │ ├── values-nl
│ │ │ └── strings.xml
│ │ ├── values-or
│ │ │ └── strings.xml
│ │ ├── values-pt
│ │ │ └── strings.xml
│ │ ├── values-ro
│ │ │ └── strings.xml
│ │ ├── values-ru
│ │ │ └── strings.xml
│ │ ├── values-si
│ │ │ └── strings.xml
│ │ ├── values-sl
│ │ │ └── strings.xml
│ │ ├── values-sr
│ │ │ └── strings.xml
│ │ ├── values-te
│ │ │ └── strings.xml
│ │ ├── values-uk
│ │ │ └── strings.xml
│ │ ├── values-ur
│ │ │ └── strings.xml
│ │ ├── values-uz
│ │ │ └── strings.xml
│ │ ├── values-zh-rCN
│ │ │ └── strings.xml
│ │ ├── values-zh-rHK
│ │ │ └── strings.xml
│ │ ├── values-zh-rTW
│ │ │ └── strings.xml
│ │ ├── values-b+sr+Latn
│ │ │ └── strings.xml
│ │ ├── values-es-rUS
│ │ │ └── strings.xml
│ │ ├── values-fr-rCA
│ │ │ └── strings.xml
│ │ ├── values-in
│ │ │ └── strings.xml
│ │ ├── values-ms
│ │ │ └── strings.xml
│ │ ├── values-ne
│ │ │ └── strings.xml
│ │ ├── values-pt-rBR
│ │ │ └── strings.xml
│ │ ├── values-pt-rPT
│ │ │ └── strings.xml
│ │ ├── values-land
│ │ │ └── config.xml
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ └── config.xml
│ │ └── values-en-rXC
│ │ │ └── strings.xml
│ │ └── AndroidManifest.xml
└── frameworks
│ └── base
│ ├── packages
│ └── SystemUI
│ │ └── res
│ │ ├── values
│ │ └── dimens.xml
│ │ └── drawable
│ │ └── rounded.xml
│ └── core
│ └── res
│ └── res
│ ├── values
│ ├── strings.xml
│ └── dimens.xml
│ └── xml
│ └── power_profile.xml
├── AndroidBoard.mk
├── AndroidProducts.mk
├── power
├── Android.mk
└── power-mode.cpp
├── extract-files.sh
├── setup-makefiles.sh
├── ifaa
├── src
│ └── org
│ │ └── ifaa
│ │ └── android
│ │ └── manager
│ │ ├── IFAAManagerV2.java
│ │ ├── IFAAManagerV4.java
│ │ ├── IFAAManagerFactory.java
│ │ ├── IIFAAService.aidl
│ │ ├── IFAAManagerV3.java
│ │ └── IFAAManager.java
└── Android.bp
├── Android.mk
├── fingerprint
├── android.hardware.biometrics.fingerprint@2.1-service.ginkgo.rc
├── Android.bp
└── service.cpp
├── superior.dependencies
├── rootdir
├── Android.mk
└── etc
│ └── init.xiaomi_parts.rc
├── init
└── Android.bp
├── releasetools.py
├── superior_ginkgo.mk
├── BoardConfig.mk
├── update-sha1sums.py
└── README.md
/sepolicy/public/attributes:
--------------------------------------------------------------------------------
1 | hal_attribute_lineage(mlipay)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/init.te:
--------------------------------------------------------------------------------
1 | set_prop(init, vendor_camera_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/device.te:
--------------------------------------------------------------------------------
1 | type fingerprint_device, dev_type;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/system_server.te:
--------------------------------------------------------------------------------
1 | get_prop(system_server, vendor_fp_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice.te:
--------------------------------------------------------------------------------
1 | type hal_mlipay_hwservice, hwservice_manager_type;
2 |
--------------------------------------------------------------------------------
/configs/thermal/thermal-engine.conf:
--------------------------------------------------------------------------------
1 | # File empty by default.
2 | # Replace contents of this file with custom configuration.
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/app.te:
--------------------------------------------------------------------------------
1 | get_prop({ appdomain -isolated_app }, ifaa_prop)
2 | get_prop({ appdomain -isolated_app }, vendor_fp_prop)
3 |
--------------------------------------------------------------------------------
/system.prop:
--------------------------------------------------------------------------------
1 | # Audio
2 | audio.sys.noisy.broadcast.delay=600
3 | audio.sys.offload.pstimeout.secs=3
4 |
5 | # NFC
6 | ro.se.type=HCE,UICC
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_mlipay.te:
--------------------------------------------------------------------------------
1 | binder_call(hal_mlipay_client, hal_mlipay_server)
2 |
3 | add_hwservice(hal_mlipay_server, hal_mlipay_hwservice)
4 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/preview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperiorOS-Devices/device_xiaomi_ginkgo/eleven/XiaomiParts/res/drawable/preview.jpg
--------------------------------------------------------------------------------
/XiaomiParts/res/raw/clear_speaker_sound.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperiorOS-Devices/device_xiaomi_ginkgo/eleven/XiaomiParts/res/raw/clear_speaker_sound.mp3
--------------------------------------------------------------------------------
/sepolicy/vendor/property.te:
--------------------------------------------------------------------------------
1 | # Mlipay
2 | type ifaa_prop, property_type;
3 |
4 | # Fingerprint
5 | type vendor_fp_prop, property_type;
6 |
7 | # Dirac
8 | type dirac_prop, property_type;
9 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NotchBarKiller/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Notch Bar Killer
3 |
4 |
--------------------------------------------------------------------------------
/AndroidBoard.mk:
--------------------------------------------------------------------------------
1 | DEVICE_PATH := device/xiaomi/ginkgo
2 |
3 | # copy kernel headers to the build tree
4 | $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr: $(wildcard $(DEVICE_PATH)/kernel-headers/*)
5 | rm -rf $@
6 | cp -a $(DEVICE_PATH)/kernel-headers/. $@
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_power_default.te:
--------------------------------------------------------------------------------
1 | allow hal_power_default sysfs_touchpanel:dir search;
2 | allow hal_power_default sysfs_touchpanel:file rw_file_perms;
3 | allow hal_power_default sysfs_battery_saver:dir r_dir_perms;
4 | allow hal_power_default sysfs_battery_saver:file rw_file_perms;
5 |
--------------------------------------------------------------------------------
/AndroidProducts.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2020 The Android Open Source Project
3 | #
4 | # SPDX-License-Identifier: Apache-2.0
5 | #
6 |
7 | PRODUCT_MAKEFILES := \
8 | $(LOCAL_DIR)/superior_ginkgo.mk
9 |
10 | COMMON_LUNCH_CHOICES := \
11 | superior_ginkgo-user \
12 | superior_ginkgo-userdebug \
13 | superior_ginkgo-eng
14 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE_TAGS := optional
6 | LOCAL_CERTIFICATE := platform
7 | LOCAL_PACKAGE_NAME := NoCutoutOverlay
8 | LOCAL_SDK_VERSION := current
9 | LOCAL_PRIVILEGED_MODULE := false
10 |
11 | include $(BUILD_PACKAGE)
12 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NotchBarKiller/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE_TAGS := optional
6 | LOCAL_CERTIFICATE := platform
7 | LOCAL_PACKAGE_NAME := NotchBarKiller
8 | LOCAL_SDK_VERSION := current
9 | LOCAL_PRIVILEGED_MODULE := false
10 |
11 | include $(BUILD_PACKAGE)
12 |
--------------------------------------------------------------------------------
/power/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_C_INCLUDES := vendor/qcom/opensource/power
5 | LOCAL_SHARED_LIBRARIES := liblog libutils
6 | LOCAL_HEADER_LIBRARIES += libhardware_headers
7 | LOCAL_SRC_FILES := power-ginkgo.c
8 | LOCAL_MODULE := libpower_ginkgo
9 | LOCAL_VENDOR_MODULE := true
10 | include $(BUILD_STATIC_LIBRARY)
11 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2018-2019 The LineageOS Project
4 | # Copyright (C) 2020 Paranoid Android
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | export DEVICE=ginkgo
12 | export DEVICE_COMMON=trinket-common
13 | export VENDOR=xiaomi
14 |
15 | "./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"
16 |
17 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2018-2019 The LineageOS Project
4 | # Copyright (C) 2020 Paranoid Android
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | export DEVICE=ginkgo
12 | export DEVICE_COMMON=trinket-common
13 | export VENDOR=xiaomi
14 |
15 | "./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"
16 |
--------------------------------------------------------------------------------
/ifaa/src/org/ifaa/android/manager/IFAAManagerV2.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.compat.annotation.UnsupportedAppUsage;
4 | import android.content.Context;
5 |
6 | public abstract class IFAAManagerV2 extends IFAAManager {
7 | @UnsupportedAppUsage
8 | public abstract byte[] processCmdV2(Context paramContext, byte[] paramArrayOfByte);
9 | }
10 |
--------------------------------------------------------------------------------
/ifaa/src/org/ifaa/android/manager/IFAAManagerV4.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.compat.annotation.UnsupportedAppUsage;
4 |
5 | public abstract class IFAAManagerV4 extends IFAAManagerV3 {
6 | @UnsupportedAppUsage
7 | public abstract int getEnabled(int i);
8 |
9 | @UnsupportedAppUsage
10 | public abstract int[] getIDList(int i);
11 | }
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/genfs_contexts:
--------------------------------------------------------------------------------
1 | genfscon sysfs /touchpanel u:object_r:sysfs_touchpanel:s0
2 | genfscon sysfs /kernel/fast_charge/force_fast_charge u:object_r:sysfs_fcharge:s0
3 | genfscon sysfs /module/battery_saver/parameters/enabled u:object_r:sysfs_battery_saver:s0
4 |
5 | # FPS info
6 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/measured_fps u:object_r:sysfs_graphics:s0
7 |
--------------------------------------------------------------------------------
/ifaa/src/org/ifaa/android/manager/IFAAManagerFactory.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.compat.annotation.UnsupportedAppUsage;
4 | import android.content.Context;
5 |
6 | public class IFAAManagerFactory {
7 | @UnsupportedAppUsage
8 | public static IFAAManager getIFAAManager(Context context, int authType) {
9 | return IFAAManagerImpl.getInstance(context);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018-2019 The LineageOS Project
3 | # Copyright (C) 2020 Paranoid Android
4 | #
5 | # SPDX-License-Identifier: Apache-2.0
6 | #
7 |
8 | LOCAL_PATH := $(call my-dir)
9 |
10 | ifeq ($(TARGET_DEVICE),ginkgo)
11 |
12 | subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
13 | $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
14 |
15 | endif
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice_contexts:
--------------------------------------------------------------------------------
1 | # Fingerprint
2 | vendor.goodix.hardware.interfaces.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0
3 | vendor.goodix.hardware.interfaces.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:object_r:hal_fingerprint_hwservice:s0
4 |
5 | # Mlipay
6 | vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0
7 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_preset.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/configs/keylayout/uinput-fpc.kl:
--------------------------------------------------------------------------------
1 | #
2 | # FPC1020 Touch sensor driver
3 | #
4 | # Copyright (c) 2013,2014 Fingerprint Cards AB
5 | #
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License Version 2
8 | # as published by the Free Software Foundation.
9 | #
10 |
11 | #key 96 DPAD_CENTER
12 | #key 102 HOME
13 | #key 105 DPAD_LEFT
14 | #key 106 DPAD_RIGHT
15 |
16 |
--------------------------------------------------------------------------------
/configs/idc/uinput-fpc.idc:
--------------------------------------------------------------------------------
1 | #
2 | # FPC1020 Touch sensor driver
3 | #
4 | # Copyright (c) 2013,2014 Fingerprint Cards AB
5 | #
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License Version 2
8 | # as published by the Free Software Foundation.
9 | #
10 |
11 | device.internal = 1
12 |
13 | keyboard.layout = uinput-fpc
14 | keyboard.builtIn = 1
15 | keyboard.orientationAware = 1
16 |
--------------------------------------------------------------------------------
/configs/thermal/thermal-engine-map.conf:
--------------------------------------------------------------------------------
1 | [0:thermal-engine-normal.conf]
2 | [1:thermal-engine-high.conf]
3 | [2:thermal-engine-extreme.conf]
4 | [8:thermal-engine-phone.conf]
5 | [9:thermal-engine-sgame.conf]
6 | [10:thermal-engine-nolimits.conf]
7 | [11:thermal-engine-class0.conf]
8 | [12:thermal-engine-camera.conf]
9 | [13:thermal-engine-pubgmhd.conf]
10 | [14:thermal-engine-youtobe.conf]
11 | [15:thermal-engine-arvr.conf]
12 | [16:thermal-engine-tgame.conf]
13 |
14 |
--------------------------------------------------------------------------------
/configs/idc/uinput-goodix.idc:
--------------------------------------------------------------------------------
1 | #
2 | # FPC1020 Touch sensor driver
3 | #
4 | # Copyright (c) 2013,2014 Fingerprint Cards AB
5 | #
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License Version 2
8 | # as published by the Free Software Foundation.
9 | #
10 |
11 | device.internal = 1
12 |
13 | keyboard.layout = uinput-gf
14 | keyboard.builtIn = 1
15 | keyboard.orientationAware = 1
16 |
--------------------------------------------------------------------------------
/configs/keylayout/uinput-goodix.kl:
--------------------------------------------------------------------------------
1 | #
2 | # Goodix fingerprint sensor driver
3 | #
4 | # Copyright (c) 2013,2014 Fingerprint Cards AB
5 | #
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License Version 2
8 | # as published by the Free Software Foundation.
9 | #
10 | #key 96 DPAD_CENTER
11 | #key 96 DPAD_CENTER
12 | #key 102 HOME
13 | #key 105 DPAD_LEFT
14 | #key 106 DPAD_RIGHT
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/action_reset.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property_contexts:
--------------------------------------------------------------------------------
1 | # Mlipay
2 | persist.sys.ifaa u:object_r:ifaa_prop:s0
3 | persist.vendor.sys.pay. u:object_r:ifaa_prop:s0
4 |
5 | # Fingerprint
6 | persist.vendor.sys.fp. u:object_r:vendor_fp_prop:s0
7 | persist.vendor.fpc. u:object_r:vendor_fp_prop:s0
8 | persist.sys.fp. u:object_r:vendor_fp_prop:s0
9 | sys.vendor.fp. u:object_r:vendor_fp_prop:s0
10 |
11 | # Dirac
12 | persist.audio.dirac. u:object_r:dirac_prop:s0
13 |
--------------------------------------------------------------------------------
/XiaomiParts/res/menu/menu_reset.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_dirac.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ifaa/src/org/ifaa/android/manager/IIFAAService.aidl:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | interface IIFAAService {
4 | byte[] processCmd_v2(in byte[] param);
5 | int[] getIDList(int bioType);
6 | int faceEnroll(String sessionId, int flags);
7 | int faceUpgrade(int action, String path, int offset, in byte[] data, int data_len);
8 | int faceAuthenticate_v2(String sessionId, int flags);
9 | int faceCancel_v2(String sessionId);
10 | byte[] faceInvokeCommand(in byte[] param);
11 | int faceGetCellinfo();
12 | }
13 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_headphones.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_doze.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.ginkgo.rc:
--------------------------------------------------------------------------------
1 | on init
2 | chown system system /dev/goodix_fp
3 |
4 | on post-fs-data
5 | mkdir /data/vendor/goodix 0770 system system
6 | mkdir /data/vendor/fpc 0770 system system
7 |
8 | service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.ginkgo
9 | # "class hal" causes a race condition on some devices due to files created
10 | # in /data. As a workaround, postpone startup until later in boot once
11 | # /data is mounted.
12 | class late_start
13 | user system
14 | group system input uhid
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_mlipay_default.te:
--------------------------------------------------------------------------------
1 | type hal_mlipay_default, domain;
2 | hal_server_domain(hal_mlipay_default, hal_mlipay)
3 |
4 | type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type;
5 |
6 | init_daemon_domain(hal_mlipay_default)
7 |
8 | allow hal_mlipay_default ion_device:chr_file rw_file_perms;
9 | allow hal_mlipay_default tee_device:chr_file rw_file_perms;
10 | r_dir_file(hal_mlipay_default, firmware_file)
11 |
12 | get_prop(hal_mlipay_default, vendor_fp_prop)
13 | set_prop(hal_mlipay_default, vendor_fp_prop)
14 | set_prop(hal_mlipay_default, vendor_tee_listener_prop)
15 | set_prop(hal_mlipay_default, ifaa_prop)
16 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_flip.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/superior.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "device_xiaomi_trinket-common",
4 | "target_path": "device/xiaomi/trinket-common"
5 | },
6 | {
7 | "repository": "vendor_xiaomi_ginkgo-1",
8 | "target_path": "vendor/xiaomi/ginkgo"
9 | },
10 | {
11 | "repository": "android_vendor_xiaomi_trinket-common",
12 | "target_path": "vendor/xiaomi/trinket-common"
13 | },
14 | {
15 | "remote": "github",
16 | "repository": "kubersharma001/android_packages_apps_GcamGOPrebuilt",
17 | "target_path": "packages/apps/GcamGOPrebuilt",
18 | "branch": "master"
19 | }
20 | ]
21 |
--------------------------------------------------------------------------------
/configs/hidl/manifest_willow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.nfc
4 | hwbinder
5 | 1.2
6 |
7 | INfc
8 | default
9 |
10 |
11 |
12 | vendor.nxp.hardware.nfc
13 | hwbinder
14 | 2.0
15 |
16 | INqNfc
17 | default
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sepolicy/vendor/file_contexts:
--------------------------------------------------------------------------------
1 | # Fingerprint
2 | /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.ginkgo u:object_r:hal_fingerprint_default_exec:s0
3 |
4 | # Fingerprint devices
5 | /dev/goodix_fp u:object_r:fingerprint_device:s0
6 |
7 | # Mlipay
8 | /(vendor|system/vendor)/bin/mlipayd@1\.1 u:object_r:hal_mlipay_default_exec:s0
9 |
10 | # Vibrator
11 | /sys/devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-03/1c40000.qcom,spmi:qcom,pmi632@3:qcom,vibrator@5700/leds/vibrator/vtg_level u:object_r:vibrator_dev:s0
12 |
13 |
--------------------------------------------------------------------------------
/XiaomiParts/res/layout/activity_kcal.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/XiaomiParts/res/xml/clear_speaker_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_usb_fastcharge.xml:
--------------------------------------------------------------------------------
1 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 | #FF6700
18 |
19 |
--------------------------------------------------------------------------------
/rootdir/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := init.target.rc
5 | LOCAL_MODULE_TAGS := optional
6 | LOCAL_MODULE_CLASS := ETC
7 | LOCAL_SRC_FILES := etc/init.target.rc
8 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
9 | include $(BUILD_PREBUILT)
10 |
11 | include $(CLEAR_VARS)
12 | LOCAL_MODULE := init.xiaomi_parts.rc
13 | LOCAL_MODULE_TAGS := optional
14 | LOCAL_MODULE_CLASS := ETC
15 | LOCAL_SRC_FILES := etc/init.xiaomi_parts.rc
16 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
17 | include $(BUILD_PREBUILT)
18 |
19 | include $(CLEAR_VARS)
20 | LOCAL_MODULE := fstab.qcom
21 | LOCAL_MODULE_TAGS := optional
22 | LOCAL_MODULE_CLASS := ETC
23 | LOCAL_SRC_FILES := etc/fstab.qcom
24 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
25 | include $(BUILD_PREBUILT)
26 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/action_presets.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_fingerprint_default.te:
--------------------------------------------------------------------------------
1 | allow hal_fingerprint_default fingerprint_device:chr_file rw_file_perms;
2 | allow hal_fingerprint_default fingerprint_data_file:dir create_dir_perms;
3 | allow hal_fingerprint_default fingerprint_data_file:file create_file_perms;
4 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl;
5 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms;
6 | allow hal_fingerprint_default uhid_device:chr_file rw_file_perms;
7 | allow hal_fingerprint_default rootfs:dir { read open };
8 | allow hal_fingerprint_default mnt_user_file:lnk_file read;
9 | allow hal_fingerprint_default sdcardfs:dir search;
10 |
11 | set_prop(hal_fingerprint_default, vendor_fp_prop)
12 | hal_client_domain(hal_fingerprint_default, vendor_hal_perf)
13 |
14 | # Ignore all logging requests
15 | dontaudit hal_fingerprint storage_file:dir search;
16 |
--------------------------------------------------------------------------------
/ifaa/src/org/ifaa/android/manager/IFAAManagerV3.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.compat.annotation.UnsupportedAppUsage;
4 |
5 | public abstract class IFAAManagerV3 extends IFAAManagerV2 {
6 | @UnsupportedAppUsage
7 | public static final String KEY_FINGERPRINT_FULLVIEW = "org.ifaa.ext.key.CUSTOM_VIEW";
8 | @UnsupportedAppUsage
9 | public static final String KEY_GET_SENSOR_LOCATION = "org.ifaa.ext.key.GET_SENSOR_LOCATION";
10 | @UnsupportedAppUsage
11 | public static final String VALUE_FINGERPRINT_DISABLE = "disable";
12 | @UnsupportedAppUsage
13 | public static final String VLAUE_FINGERPRINT_ENABLE = "enable";
14 |
15 | @UnsupportedAppUsage
16 | public abstract String getExtInfo(int authType, String keyExtInfo);
17 |
18 | @UnsupportedAppUsage
19 | public abstract void setExtInfo(int authType, String keyExtInfo, String valExtInfo);
20 | }
21 |
--------------------------------------------------------------------------------
/ifaa/Android.bp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017-2020 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | java_library {
18 | name: "org.ifaa.android.manager",
19 | installable: true,
20 | srcs: [
21 | "src/**/*.java",
22 | "src/**/I*.aidl",
23 | ],
24 | libs: [
25 | "unsupportedappusage",
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/DiracService.java:
--------------------------------------------------------------------------------
1 | package org.lineageos.settings.device;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.os.IBinder;
6 | import android.util.Log;
7 |
8 | public class DiracService extends Service {
9 |
10 | private final String TAG = this.getClass().getName();
11 |
12 | static DiracUtils sDiracUtils;
13 |
14 | @Override
15 | public IBinder onBind(Intent arg0) {
16 | return null;
17 | }
18 |
19 | @Override
20 | public int onStartCommand(Intent intent, int flags, int startId) {
21 | sDiracUtils = new DiracUtils();
22 | sDiracUtils.onBootCompleted();
23 | Log.d(TAG, "Service started");
24 | return START_STICKY;
25 | }
26 |
27 | @Override
28 | public void onDestroy() {
29 | super.onDestroy();
30 | Log.d(TAG, "Service destroyed");
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/init/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2019 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 |
17 | cc_library_static {
18 | name: "libinit_ginkgo",
19 | recovery_available: true,
20 | srcs: ["init_ginkgo.cpp"],
21 | include_dirs: [
22 | "system/core/base/include",
23 | "system/core/init"
24 | ],
25 | shared_libs: ["libbase"]
26 | }
27 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | 36px
21 |
22 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_speaker_cleaner_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 | Redmi Note 8
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-am/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ደብቅ"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ar/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "إخفاء"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "লুকান"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ca/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Amaga"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Skrýt"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-da/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Skjul"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-et/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Peida"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-is/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Fela"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-iw/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "הסתר"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "非表示"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-km/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "លាក់"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "숨기기"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Нуух"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "लपवा"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nb/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Skjul"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pa/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ਲੁਕਾਓ"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ukryj"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Skryť"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sq/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Fshih"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Dölj"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sw/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ficha"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ta/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "மறை"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-th/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ซ่อน"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Itago"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Gizle"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-vi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ẩn"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Fihla"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-af/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Versteek"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-as/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "লুকুৱাওক"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-az/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Gizlədin"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-be/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Схаваць"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bg/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Скриване"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Sakrij"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ausblenden"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Απόκρυψη"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rAU/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Hide"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rCA/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Hide"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rGB/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Hide"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rIN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Hide"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ocultar"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-eu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ezkutatu"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fa/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "پنهان کردن"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Piilota"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Masquer"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ocultar"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "છુપાવો"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "छिपाएं"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Sakrij"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Elrejtés"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hy/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Թաքցնել"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Nascondi"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ka/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "დამალვა"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Жасыру"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ಮರೆಮಾಡು"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ky/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Жашыруу"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lo/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ເຊື່ອງ"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Slėpti"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Paslēpt"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Сокриј"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ml/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "മറയ്ക്കുക"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-my/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ဝှက်ပါ"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Verbergen"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-or/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "ଲୁଚାନ୍ତୁ"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ocultar"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ro/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ascundeți"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Скрыть"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-si/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "සඟවන්න"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Skrivanje"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Сакриј"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-te/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "దాస్తుంది"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Сховати"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ur/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "چھپائیں"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uz/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Berkitish"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "隐藏"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rHK/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "隱藏"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "隱藏"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-b+sr+Latn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Sakrij"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es-rUS/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ocultar"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr-rCA/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Masquer"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-in/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Sembunyikan"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ms/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Sembunyikan"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ne/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "लुकाउनुहोस्"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rBR/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ocultar"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rPT/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Ocultar"
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-land/config.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 | 28dp
20 |
21 | 156dp
22 |
--------------------------------------------------------------------------------
/XiaomiParts/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | include $(CLEAR_VARS)
3 |
4 | LOCAL_MODULE_TAGS := optional
5 | LOCAL_STATIC_ANDROID_LIBRARIES := \
6 | androidx.preference_preference
7 |
8 | LOCAL_SRC_FILES := $(call all-java-files-under, src)
9 | LOCAL_PACKAGE_NAME := XiaomiParts
10 | LOCAL_CERTIFICATE := platform
11 | LOCAL_PRIVILEGED_MODULE := true
12 | LOCAL_PRIVATE_PLATFORM_APIS := true
13 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
14 | LOCAL_USE_AAPT2 := true
15 |
16 | package_resource_overlays := $(strip \
17 | $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
18 | $(addprefix $(dir)/, packages/apps/XiaomiParts/res))) \
19 | $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
20 | $(addprefix $(dir)/, packages/apps/XiaomiParts/res))))
21 |
22 | LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR)
23 |
24 | LOCAL_PROGUARD_ENABLED := disabled
25 | LOCAL_DEX_PREOPT := false
26 |
27 | include frameworks/base/packages/SettingsLib/common.mk
28 |
29 | include $(BUILD_PACKAGE)
30 |
31 | include $(call all-makefiles-under,$(LOCAL_PATH))
32 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 | Hide
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rXC/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 | "Hide"
21 |
22 |
--------------------------------------------------------------------------------
/rootdir/etc/init.xiaomi_parts.rc:
--------------------------------------------------------------------------------
1 | on boot
2 | # KCal
3 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal_cont
4 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal_enable
5 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal_hue
6 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal_sat
7 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal_val
8 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal_min
9 | chown system system /sys/devices/platform/kcal_ctrl.0/kcal
10 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_cont
11 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_enable
12 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_hue
13 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_sat
14 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_val
15 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_min
16 | chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal
17 |
18 | # USB Fastcharge
19 | chown system system /sys/kernel/fast_charge/force_fast_charge
20 | chmod 0660 /sys/kernel/fast_charge/force_fast_charge
21 |
22 | # Vibration
23 | chown system system /sys/class/leds/vibrator/vtg_level
24 | chmod 0660 /sys/class/leds/vibrator/vtg_level
25 |
--------------------------------------------------------------------------------
/fingerprint/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2017-2018 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_binary {
17 | name: "android.hardware.biometrics.fingerprint@2.1-service.ginkgo",
18 | relative_install_path: "hw",
19 | defaults: ["hidl_defaults"],
20 | init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.ginkgo.rc"],
21 | srcs: ["service.cpp", "BiometricsFingerprint.cpp"],
22 | shared_libs: [
23 | "libbase",
24 | "libhardware",
25 | "libhidlbase",
26 | "liblog",
27 | "libutils",
28 | "libcutils",
29 | "android.hardware.biometrics.fingerprint@2.1",
30 | ],
31 | proprietary: true,
32 | }
33 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
21 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NotchBarKiller/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
21 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml:
--------------------------------------------------------------------------------
1 |
14 |
19 |
20 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
21 | 106.0px
22 |
23 |
25 | 108.0px
26 |
27 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/preferences/SecureSettingCustomSeekBarPreference.java:
--------------------------------------------------------------------------------
1 | package org.lineageos.settings.device.preferences;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | public class SecureSettingCustomSeekBarPreference extends CustomSeekBarPreference {
7 |
8 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
9 | super(context, attrs, defStyleAttr, defStyleRes);
10 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
11 | }
12 |
13 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) {
14 | super(context, attrs, defStyleAttr);
15 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
16 | }
17 |
18 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs) {
19 | super(context, attrs);
20 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
21 | }
22 |
23 | public SecureSettingCustomSeekBarPreference(Context context) {
24 | super(context);
25 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/configs/hidl/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.sensors
4 | hwbinder
5 | 1.0
6 |
7 | ISensors
8 | default
9 |
10 |
11 |
12 | com.fingerprints.extension
13 | hwbinder
14 | 2.0
15 |
16 | IFingerprintEngineering
17 | default
18 |
19 |
20 | IFingerprintNavigation
21 | default
22 |
23 |
24 | IFingerprintSensorTest
25 | default
26 |
27 |
28 |
29 | vendor.goodix.hardware.interfaces.biometrics.fingerprint
30 | hwbinder
31 | 2.1
32 |
33 | IGoodixFingerprintDaemon
34 | default
35 |
36 |
37 | IGoodixFingerprintDaemonExt
38 | default
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/power/power-mode.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include "power-common.h"
19 |
20 | namespace aidl {
21 | namespace android {
22 | namespace hardware {
23 | namespace power {
24 | namespace impl {
25 |
26 | using ::aidl::android::hardware::power::Mode;
27 |
28 | bool isDeviceSpecificModeSupported(Mode type, bool* _aidl_return) {
29 | switch (type) {
30 | case Mode::LOW_POWER:
31 | *_aidl_return = true;
32 | return true;
33 | default:
34 | return false;
35 | }
36 | }
37 |
38 | bool setDeviceSpecificMode(Mode type, bool enabled) {
39 | switch (type) {
40 | case Mode::LOW_POWER:
41 | power_hint(POWER_HINT_LOW_POWER, reinterpret_cast(enabled));
42 | return true;
43 | default:
44 | return false;
45 | }
46 | }
47 |
48 | } // namespace impl
49 | } // namespace power
50 | } // namespace hardware
51 | } // namespace android
52 | } // namespace aidl
53 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/preferences/VibrationSeekBarPreference.java:
--------------------------------------------------------------------------------
1 | package org.lineageos.settings.device.preferences;
2 |
3 | import android.content.Context;
4 | import android.os.VibrationEffect;
5 | import android.os.Vibrator;
6 | import android.util.AttributeSet;
7 | import android.widget.SeekBar;
8 |
9 | public class VibrationSeekBarPreference extends SecureSettingCustomSeekBarPreference {
10 |
11 | private final Vibrator mVibrator;
12 |
13 | public VibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
14 | super(context, attrs, defStyleAttr, defStyleRes);
15 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
16 | }
17 |
18 | public VibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) {
19 | super(context, attrs, defStyleAttr);
20 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
21 | }
22 |
23 | public VibrationSeekBarPreference(Context context, AttributeSet attrs) {
24 | super(context, attrs);
25 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
26 | }
27 |
28 | public VibrationSeekBarPreference(Context context) {
29 | super(context);
30 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
31 | }
32 |
33 | @Override
34 | public void onStopTrackingTouch(SeekBar seekBar) {
35 | notifyChanged();
36 | if (mVibrator.hasVibrator()) {
37 | mVibrator.vibrate(VibrationEffect.createOneShot(15, VibrationEffect.DEFAULT_AMPLITUDE));
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
22 | false
23 |
24 |
26 | true
27 |
28 |
29 | 28dp
30 | 28dp
31 |
32 |
33 | 6
34 | 7
35 |
36 |
37 |
--------------------------------------------------------------------------------
/releasetools.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009 The Android Open Source Project
2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | import common
17 | import re
18 |
19 | def FullOTA_Assertions(info):
20 | input_zip = info.input_zip
21 | return
22 |
23 | def IncrementalOTA_Assertions(info):
24 | input_zip = info.target_zip
25 | return
26 |
27 | def FullOTA_InstallEnd(info):
28 | input_zip = info.input_zip
29 | OTA_InstallEnd(info, input_zip)
30 | return
31 |
32 | def IncrementalOTA_InstallEnd(info):
33 | input_zip = info.target_zip
34 | OTA_InstallEnd(info, input_zip)
35 | return
36 |
37 | def AddImage(info, input_zip, basename, dest):
38 | name = basename
39 | data = input_zip.read("IMAGES/" + basename)
40 | common.ZipWriteStr(info.output_zip, name, data)
41 | info.script.Print("Patching {} image unconditionally...".format(dest.split('/')[-1]))
42 | info.script.AppendExtra('package_extract_file("%s", "%s");' % (name, dest))
43 |
44 | def OTA_InstallEnd(info, input_zip):
45 | AddImage(info, input_zip, "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta")
46 | AddImage(info, input_zip, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo")
47 | return
48 |
--------------------------------------------------------------------------------
/superior_ginkgo.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2020 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # Inherit framework first
18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
19 | $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
20 | $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
21 |
22 | # Inherit from ginkgo device
23 | $(call inherit-product, device/xiaomi/ginkgo/device.mk)
24 |
25 | # Inherit some common SuperiorOS stuff.
26 | TARGET_BOOT_ANIMATION_RES := 1080
27 | TARGET_GAPPS_ARCH := arm64
28 | $(call inherit-product, vendor/superior/config/common.mk)
29 |
30 | # Device identifier
31 | PRODUCT_NAME := superior_ginkgo
32 | PRODUCT_DEVICE := ginkgo
33 | PRODUCT_BRAND := Xiaomi
34 | PRODUCT_MODEL := Redmi Note 8
35 | PRODUCT_MANUFACTURER := Xiaomi
36 |
37 | # Fingerprint
38 | BUILD_FINGERPRINT := google/redfin/redfin:11/RQ1A.201205.010/6953398:user/release-keys
39 | BUILD_DESCRIPTION := redfin-user 11 RQ1A.201205.010 6953398 release-keys
40 |
41 | PRODUCT_PROPERTY_OVERRIDES += \
42 | ro.build.fingerprint=$(BUILD_FINGERPRINT)
43 |
44 | PRODUCT_BUILD_PROP_OVERRIDES += \
45 | PRIVATE_BUILD_DESC="$(BUILD_DESCRIPTION)"
46 |
--------------------------------------------------------------------------------
/fingerprint/service.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.ginkgo"
18 |
19 | #include
20 | #include
21 |
22 | #include "BiometricsFingerprint.h"
23 |
24 | // libhwbinder:
25 | using android::hardware::configureRpcThreadpool;
26 | using android::hardware::joinRpcThreadpool;
27 |
28 | // Generated HIDL files
29 | using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
30 | using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint;
31 |
32 | int main() {
33 | android::sp service = BiometricsFingerprint::getInstance();
34 |
35 | if (service == nullptr) {
36 | ALOGE("Instance of BiometricsFingerprint is null");
37 | return 1;
38 | }
39 |
40 | configureRpcThreadpool(1, true /*callerWillJoin*/);
41 |
42 | android::status_t status = service->registerAsService();
43 | if (status != android::OK) {
44 | ALOGE("Cannot register BiometricsFingerprint service");
45 | return 1;
46 | }
47 |
48 | joinRpcThreadpool();
49 |
50 | return 0; // should never get here
51 | }
52 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/DeviceSettingsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Xiaomi-SDM660 Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License
15 | */
16 |
17 | package org.lineageos.settings.device;
18 |
19 | import android.app.Activity;
20 | import android.app.Fragment;
21 | import android.os.Bundle;
22 | import android.view.MenuItem;
23 |
24 | public class DeviceSettingsActivity extends Activity {
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 |
30 | getActionBar().setDisplayHomeAsUpEnabled(true);
31 |
32 | Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content);
33 | DeviceSettings deviceSettingsFragment;
34 | if (fragment == null) {
35 | deviceSettingsFragment = new DeviceSettings();
36 | getFragmentManager().beginTransaction()
37 | .add(android.R.id.content, deviceSettingsFragment)
38 | .commit();
39 | }
40 | }
41 |
42 | @Override
43 | public boolean onOptionsItemSelected(MenuItem item) {
44 | if (item.getItemId() == android.R.id.home) {
45 | finish();
46 | return true;
47 | }
48 | return super.onOptionsItemSelected(item);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/speaker/ClearSpeakerActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 Paranoid Android
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.lineageos.settings.device.speaker;
18 |
19 | import android.app.Activity;
20 | import android.app.Fragment;
21 | import android.os.Bundle;
22 | import android.view.MenuItem;
23 |
24 | public class ClearSpeakerActivity extends Activity {
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 |
30 | getActionBar().setDisplayHomeAsUpEnabled(true);
31 |
32 | Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content);
33 | ClearSpeakerFragment clearSpeakerFragment;
34 | if (fragment == null) {
35 | clearSpeakerFragment = new ClearSpeakerFragment();
36 | getFragmentManager().beginTransaction()
37 | .add(android.R.id.content, clearSpeakerFragment)
38 | .commit();
39 | }
40 | }
41 |
42 | @Override
43 | public boolean onOptionsItemSelected(MenuItem item) {
44 | if (item.getItemId() == android.R.id.home) {
45 | finish();
46 | return true;
47 | }
48 | return super.onOptionsItemSelected(item);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/XiaomiParts/res/layout/custom_seekbar_preference_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
24 |
25 |
31 |
32 |
38 |
39 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/overlay/packages/apps/overlays/NotchBarKiller/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
22 | true
23 |
24 | M 0,0 L 0, 0 C 0,0 0,0 0,0
25 | @*android:string/config_mainBuiltInDisplayCutout
26 |
27 |
28 | 80.0px
29 | 28.0dp
30 | 106px
31 |
32 |
33 | 4
34 | 5
35 |
36 |
37 | 48dp
38 |
39 | 210dp
40 |
41 |
42 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/DiracUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.lineageos.settings.device;
18 |
19 | final class DiracUtils {
20 |
21 | private final DiracSound mDiracSound;
22 |
23 | DiracUtils() {
24 | mDiracSound = new DiracSound(0, 0);
25 | }
26 |
27 | void onBootCompleted() {
28 | setEnabled(mDiracSound.getMusic() == 1);
29 | mDiracSound.setHeadsetType(mDiracSound.getHeadsetType());
30 | setLevel(getLevel());
31 | }
32 |
33 | void setEnabled(boolean enable) {
34 | mDiracSound.setEnabled(enable);
35 | mDiracSound.setMusic(enable ? 1 : 0);
36 | }
37 |
38 | boolean isDiracEnabled() {
39 | return mDiracSound.getMusic() == 1;
40 | }
41 |
42 | private String getLevel() {
43 | StringBuilder selected = new StringBuilder();
44 | for (int band = 0; band <= 6; band++) {
45 | int temp = (int) mDiracSound.getLevel(band);
46 | selected.append(temp);
47 | if (band != 6) selected.append(",");
48 | }
49 | return selected.toString();
50 | }
51 |
52 | void setLevel(String preset) {
53 | String[] level = preset.split("\\s*,\\s*");
54 | for (int band = 0; band <= level.length - 1; band++) {
55 | mDiracSound.setLevel(band, Float.valueOf(level[band]));
56 | }
57 | }
58 |
59 | void setHeadsetType(int paramInt) {
60 | mDiracSound.setHeadsetType(paramInt);
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/BoardConfig.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018-2019 The LineageOS Project
3 | # Copyright (C) 2020 Paranoid Android
4 | #
5 | # SPDX-License-Identifier: Apache-2.0
6 | #
7 |
8 | # Inherit from trinket-common
9 | -include device/xiaomi/trinket-common/BoardConfigCommon.mk
10 |
11 | DEVICE_PATH := device/xiaomi/ginkgo
12 |
13 | # Audio
14 | TARGET_PROVIDES_AUDIO_EXTNS := true
15 |
16 | # Assert
17 | TARGET_OTA_ASSERT_DEVICE := ginkgo,willow
18 |
19 | # Display
20 | TARGET_SCREEN_DENSITY := 440
21 |
22 | # DT2W
23 | TARGET_TAP_TO_WAKE_NODE := "/sys/touchpanel/double_tap"
24 |
25 | # HIDL
26 | DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/hidl/manifest.xml
27 | ODM_MANIFEST_WILLOW_FILES := $(DEVICE_PATH)/configs/hidl/manifest_willow.xml
28 | ODM_MANIFEST_SKUS += willow
29 |
30 | # Init
31 | TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_ginkgo
32 | TARGET_RECOVERY_DEVICE_MODULES := libinit_ginkgo
33 |
34 | # Kernel
35 | TARGET_KERNEL_SOURCE := kernel/xiaomi/ginkgo
36 | TARGET_KERNEL_CONFIG := vendor/ginkgo-perf_defconfig
37 |
38 | # NFC
39 | TARGET_USES_NQ_NFC := true
40 |
41 | # Partitions
42 | BOARD_CACHEIMAGE_PARTITION_SIZE := 402653184
43 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
44 | BOARD_DTBOIMG_PARTITION_SIZE := 25165824
45 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
46 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4831838208
47 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 52554612224
48 | BOARD_VENDORIMAGE_PARTITION_SIZE := 1610612736
49 |
50 | # Power
51 | BOARD_POWER_CUSTOM_BOARD_LIB := libpower_ginkgo
52 | TARGET_POWERHAL_MODE_EXT := $(DEVICE_PATH)/power/power-mode.cpp
53 |
54 | # Properties
55 | TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
56 | TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
57 |
58 | # Recovery
59 | TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.qcom
60 |
61 | # Releasetools
62 | TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)
63 |
64 | # Sepolicy
65 | BOARD_PLAT_PUBLIC_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/public
66 | BOARD_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
67 |
68 | # Inherit from the proprietary version
69 | -include vendor/xiaomi/ginkgo/BoardConfigVendor.mk
70 | #-include vendor/miuicamera/common/BoardConfigVendor.mk
71 |
--------------------------------------------------------------------------------
/ifaa/src/org/ifaa/android/manager/IFAAManager.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.compat.annotation.UnsupportedAppUsage;
4 | import android.content.Context;
5 | import android.os.Build.VERSION;
6 | import android.os.SystemProperties;
7 |
8 | public abstract class IFAAManager {
9 | private static final int IFAA_VERSION_V2 = 2;
10 | private static final int IFAA_VERSION_V3 = 3;
11 | private static final int IFAA_VERSION_V4 = 4;
12 |
13 | static int sIfaaVer;
14 | static boolean sIsFod = SystemProperties.getBoolean("ro.hardware.fp.fod", false);
15 |
16 | /**
17 | * 返回手机系统上支持的校验方式,目前IFAF协议1.0版本指纹为0x01、虹膜为0x02
18 | */
19 | @UnsupportedAppUsage
20 | public abstract int getSupportBIOTypes(Context context);
21 |
22 | /**
23 | * 启动系统的指纹/虹膜管理应用界面,让用户进行指纹录入。指纹录入是在系统的指纹管理应用中实现的,
24 | * 本函数的作用只是将指纹管理应用运行起来,直接进行页面跳转,方便用户录入。
25 | * @param context
26 | * @param authType 生物特征识别类型,指纹为1,虹膜为2
27 | * @return 0,成功启动指纹管理应用;-1,启动指纹管理应用失败。
28 | */
29 | @UnsupportedAppUsage
30 | public abstract int startBIOManager(Context context, int authType);
31 |
32 | /**
33 | * 通过ifaateeclient的so文件实现REE到TA的通道
34 | * @param context
35 | * @param param 用于传输到IFAA TA的数据buffer
36 | * @return IFAA TA返回给REE数据buffer
37 | */
38 | @UnsupportedAppUsage
39 | public native byte[] processCmd(Context context, byte[] param);
40 |
41 | /**
42 | * 获取设备型号,同一款机型型号需要保持一致
43 | */
44 | @UnsupportedAppUsage
45 | public abstract String getDeviceModel();
46 |
47 | /**
48 | * 获取IFAAManager接口定义版本,目前为1
49 | */
50 | @UnsupportedAppUsage
51 | public abstract int getVersion();
52 |
53 | /**
54 | * load so to communicate from REE to TEE
55 | */
56 | static {
57 | sIfaaVer = 1;
58 |
59 | if (VERSION.SDK_INT >= 28) {
60 | sIfaaVer = IFAA_VERSION_V4;
61 | } else if (sIsFod) {
62 | sIfaaVer = IFAA_VERSION_V3;
63 | } else if (VERSION.SDK_INT >= 24) {
64 | sIfaaVer = IFAA_VERSION_V2;
65 | } else {
66 | System.loadLibrary("teeclientjni"); //teeclientjni for TA test binary //ifaateeclient
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/kcal/Utils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Xiaomi-SDM660 Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License
15 | */
16 |
17 | package org.lineageos.settings.device.kcal;
18 |
19 | public interface Utils {
20 | String PREF_ENABLED = "kcal_enabled";
21 | String PREF_SETONBOOT = "set_on_boot";
22 | String PREF_MINIMUM = "color_minimum";
23 | String PREF_RED = "color_red";
24 | String PREF_GREEN = "color_green";
25 | String PREF_BLUE = "color_blue";
26 | String PREF_SATURATION = "saturation";
27 | String PREF_VALUE = "value";
28 | String PREF_CONTRAST = "contrast";
29 | String PREF_HUE = "hue";
30 | String PREF_GRAYSCALE = "grayscale";
31 |
32 | boolean SETONBOOT_DEFAULT = false;
33 | int MINIMUM_DEFAULT = 35;
34 | int RED_DEFAULT = 255;
35 | int GREEN_DEFAULT = 255;
36 | int BLUE_DEFAULT = 255;
37 | int SATURATION_DEFAULT = 35;
38 | int SATURATION_OFFSET = 225;
39 | int VALUE_DEFAULT = 127;
40 | int VALUE_OFFSET = 128;
41 | int CONTRAST_DEFAULT = 127;
42 | int CONTRAST_OFFSET = 128;
43 | int HUE_DEFAULT = 0;
44 | boolean GRAYSCALE_DEFAULT = false;
45 |
46 | String KCAL_ENABLE = "/sys/devices/platform/kcal_ctrl.0/kcal_enable";
47 | String KCAL_CONT = "/sys/devices/platform/kcal_ctrl.0/kcal_cont";
48 | String KCAL_HUE = "/sys/devices/platform/kcal_ctrl.0/kcal_hue";
49 | String KCAL_MIN = "/sys/devices/platform/kcal_ctrl.0/kcal_min";
50 | String KCAL_RGB = "/sys/devices/platform/kcal_ctrl.0/kcal";
51 | String KCAL_SAT = "/sys/devices/platform/kcal_ctrl.0/kcal_sat";
52 | String KCAL_VAL = "/sys/devices/platform/kcal_ctrl.0/kcal_val";
53 | }
54 |
--------------------------------------------------------------------------------
/configs/thermal/thermal-engine-normal.conf:
--------------------------------------------------------------------------------
1 | # SENSOR : ALIAS
2 |
3 | #debug
4 | #Conf file: /vendor/etc/thermal-engine-normal.conf (ginkgo)
5 |
6 | [MONITOR-CPU-HOTPLUG]
7 | disable
8 | algo_type monitor
9 | sampling 5000
10 | sensor quiet-therm-adc
11 | thresholds 47000 50000
12 | thresholds_clr 45000 48000
13 | actions hotplug_3+hotplug_4+hotplug_5+hotplug_6
14 | hotplug_3+hotplug_4+hotplug_5+hotplug_6
15 | action_info 0+0+1+1 1+1+1+1
16 |
17 | [SS-QUIET-THERMAL-S1]
18 | algo_type ss
19 | sampling 5000
20 | sensor emmc-ufs-therm-adc
21 | device cpu0
22 | set_point 51000
23 | set_point_clr 50900
24 | time_constant 0
25 | device_max_limit 1420800
26 |
27 | [SS-QUIET-THERMAL-S2]
28 | disable
29 | algo_type ss
30 | sampling 5000
31 | sensor quiet-therm-adc
32 | device cpu0
33 | set_point 47000
34 | set_point_clr 45000
35 | time_constant 0
36 | device_max_limit 1017600
37 |
38 | [SS-QUIET-THERMAL-G1]
39 | algo_type ss
40 | sampling 5000
41 | sensor emmc-ufs-therm-adc
42 | device cpu4
43 | set_point 49000
44 | set_point_clr 48000
45 | time_constant 0
46 | device_max_limit 1401600
47 |
48 | [LCD_MONITOR]
49 | algo_type monitor
50 | sampling 5000
51 | sensor backlight_therm
52 | thresholds 44000 45000 46000
53 | thresholds_clr 42000 43000 44000
54 | actions lcd lcd lcd
55 | action_info 300 500 700
56 |
57 | [BATTERY_CHARGING_STL]
58 | algo_type monitor
59 | sampling 1000
60 | sensor quiet-therm-adc
61 | thresholds 40000 41000 42000 43000 44000 45000 46000
62 | thresholds_clr 39000 40000 41000 42000 43000 44000 45000
63 | actions battery battery battery battery battery battery battery
64 | action_info 1 2 3 4 5 7 8
65 |
66 | [LCD_MONITOR_STATE]
67 | algo_type monitor
68 | sampling 5000
69 | sensor quiet-therm-adc
70 | thresholds 61000
71 | thresholds_clr 58000
72 | actions lcd
73 | action_info 1800
74 |
75 | [CPU_HOTPLUG_MONITOR]
76 | algo_type monitor
77 | sampling 5000
78 | sensor quiet-therm-adc
79 | thresholds 61000
80 | thresholds_clr 58000
81 | actions hotplug_1+hotplug_2+hotplug_3+hotplug_4+hotplug_5+hotplug_6
82 | action_info 1+1+1+1+1+1
83 |
84 | [HIGH_TEMP_STATE]
85 | algo_type monitor
86 | sampling 5000
87 | sensor quiet-therm-adc
88 | thresholds 61000
89 | thresholds_clr 58000
90 | actions temp_state
91 | action_info 4
92 |
93 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/Fastcharge.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 ronaxdevil
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | *
17 | */
18 | package org.lineageos.settings.device;
19 |
20 | import android.content.Context;
21 | import android.content.SharedPreferences;
22 | import android.provider.Settings;
23 | import androidx.preference.Preference;
24 | import androidx.preference.Preference.OnPreferenceChangeListener;
25 | import androidx.preference.PreferenceManager;
26 |
27 | import org.lineageos.settings.device.DeviceSettings;
28 |
29 | public class Fastcharge implements OnPreferenceChangeListener {
30 |
31 | private Context mContext;
32 |
33 | public Fastcharge(Context context) {
34 | mContext = context;
35 | }
36 |
37 | public static String getFile() {
38 | if (FileUtils.fileWritable(DeviceSettings.USB_FASTCHARGE_PATH)) {
39 | return DeviceSettings.USB_FASTCHARGE_PATH;
40 | }
41 | return null;
42 | }
43 |
44 | public static boolean isSupported() {
45 | return FileUtils.fileWritable(getFile());
46 | }
47 |
48 | public static boolean isCurrentlyEnabled(Context context) {
49 | return FileUtils.getFileValueAsBoolean(getFile(), false);
50 | }
51 |
52 | @Override
53 | public boolean onPreferenceChange(Preference preference, Object value) {
54 | final String key = preference.getKey();
55 | switch (key) {
56 | case DeviceSettings.PREF_USB_FASTCHARGE:
57 | FileUtils.setValue(DeviceSettings.USB_FASTCHARGE_PATH, (boolean) value);
58 | break;
59 |
60 | default:
61 | break;
62 | }
63 | return true;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/update-sha1sums.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017-2018 The LineageOS Project
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | from hashlib import sha1
20 | import sys
21 |
22 | device='ginkgo'
23 | vendor='xiaomi'
24 |
25 | lines = [ line for line in open('proprietary-files.txt', 'r') ]
26 | vendorPath = '../../../vendor/' + vendor + '/' + device + '/proprietary'
27 | needSHA1 = False
28 |
29 | def cleanup():
30 | for index, line in enumerate(lines):
31 | # Remove '\n' character
32 | line = line[:-1]
33 |
34 | # Skip empty or commented lines
35 | if len(line) == 0 or line[0] == '#':
36 | continue
37 |
38 | # Drop SHA1 hash, if existing
39 | if '|' in line:
40 | line = line.split('|')[0]
41 | lines[index] = '%s\n' % (line)
42 |
43 | def update():
44 | for index, line in enumerate(lines):
45 | # Remove '\n' character
46 | line = line[:-1]
47 |
48 | # Skip empty lines
49 | if len(line) == 0:
50 | continue
51 |
52 | # Check if we need to set SHA1 hash for the next files
53 | if line[0] == '#':
54 | needSHA1 = (' - from' in line)
55 | continue
56 |
57 | if needSHA1:
58 | # Remove existing SHA1 hash
59 | line = line.split('|')[0]
60 | filePath = line.split(':')[1] if len(line.split(':')) == 2 else line
61 |
62 | if filePath[0] == '-':
63 | file = open('%s/%s' % (vendorPath, filePath[1:]), 'rb').read()
64 | else:
65 | file = open('%s/%s' % (vendorPath, filePath), 'rb').read()
66 |
67 | hash = sha1(file).hexdigest()
68 | lines[index] = '%s|%s\n' % (line, hash)
69 |
70 | if len(sys.argv) == 2 and sys.argv[1] == '-c':
71 | cleanup()
72 | else:
73 | update()
74 |
75 | with open('proprietary-files.txt', 'w') as file:
76 | for line in lines:
77 | file.write(line)
78 |
79 | file.close()
80 |
--------------------------------------------------------------------------------
/configs/thermal/thermal-engine-camera.conf:
--------------------------------------------------------------------------------
1 | # SENSOR : ALIAS
2 |
3 | #debug
4 | #Conf file: /vendor/etc/thermal-engine-camera.conf
5 |
6 | [MONITOR-CPU-HOTPLUG]
7 | disable
8 | algo_type monitor
9 | sampling 5000
10 | sensor quiet-therm-adc
11 | thresholds 47000 50000
12 | thresholds_clr 45000 48000
13 | actions hotplug_3+hotplug_4+hotplug_5+hotplug_6
14 | hotplug_3+hotplug_4+hotplug_5+hotplug_6
15 | action_info 0+0+1+1 1+1+1+1
16 |
17 | [SS-QUIET-THERMAL-S1]
18 | algo_type ss
19 | sampling 5000
20 | sensor emmc-ufs-therm-adc
21 | device cpu0
22 | set_point 51000
23 | set_point_clr 50900
24 | time_constant 0
25 | device_max_limit 1420800
26 |
27 | [SS-QUIET-THERMAL-S2]
28 | disable
29 | algo_type ss
30 | sampling 5000
31 | sensor quiet-therm-adc
32 | device cpu0
33 | set_point 47000
34 | set_point_clr 45000
35 | time_constant 0
36 | device_max_limit 1017600
37 |
38 | [SS-QUIET-THERMAL-G1]
39 | algo_type ss
40 | sampling 5000
41 | sensor emmc-ufs-therm-adc
42 | device cpu4
43 | set_point 49000
44 | set_point_clr 48000
45 | time_constant 0
46 | device_max_limit 1401600
47 |
48 | [LCD_MONITOR]
49 | algo_type monitor
50 | sampling 5000
51 | sensor backlight_therm
52 | thresholds 44000 45000 46000
53 | thresholds_clr 42000 43000 44000
54 | actions lcd lcd lcd
55 | action_info 300 500 700
56 |
57 | [BATTERY_CHARGING_STL]
58 | algo_type monitor
59 | sampling 1000
60 | sensor quiet-therm-adc
61 | thresholds 35000
62 | thresholds_clr 33000
63 | actions battery
64 | action_info 8
65 |
66 | [LCD_MONITOR_STATE]
67 | algo_type monitor
68 | sampling 5000
69 | sensor quiet-therm-adc
70 | thresholds 61000
71 | thresholds_clr 58000
72 | actions lcd
73 | action_info 1800
74 |
75 | [CPU_HOTPLUG_MONITOR]
76 | algo_type monitor
77 | sampling 5000
78 | sensor quiet-therm-adc
79 | thresholds 61000
80 | thresholds_clr 58000
81 | actions hotplug_1+hotplug_2+hotplug_3+hotplug_4+hotplug_5+hotplug_6
82 | action_info 1+1+1+1+1+1
83 |
84 | [HIGH_TEMP_STATE]
85 | algo_type monitor
86 | sampling 5000
87 | sensor quiet-therm-adc
88 | thresholds 61000
89 | thresholds_clr 58000
90 | actions temp_state
91 | action_info 4
92 |
93 | [HIGH_TEMP_STATE_flash]
94 | algo_type monitor
95 | sampling 5000
96 | sensor quiet-therm-adc
97 | thresholds 42000
98 | thresholds_clr 40000
99 | actions temp_state
100 | action_info 3
101 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unified Device Tree for Redmi Note 8/8T (ginkgo/willow)
2 |
3 | The Redmi Note 8 (codenamed "ginkgo") is a mid-range smartphone from Xiaomi. It was announced in August 2019 and released in October 2019.
4 |
5 | The Redmi Note 8T (codenamed "willow") is a mid-range smartphone from Xiaomi. Unlike Redmi Note 8, it does not have a notification LED but instead has a NFC communication module by NXP. It was announced and released in November 2019.
6 |
7 | ## Device specifications
8 |
9 | | Feature | Specification |
10 | | :---------------------- | :---------------------------------------------------------------|
11 | | Chipset | Qualcomm SM6125 Snapdragon 665 (11 nm) |
12 | | CPU | Octa-core (4x2.0 GHz Kryo 260 Gold & 4x1.8 GHz Kryo 260 Silver) |
13 | | GPU | Adreno 610 |
14 | | Memory | 3/4/6 GB |
15 | | Shipped Android Version | 9.0 (MIUI 11) |
16 | | Storage | 32/64/128 GB eMMC |
17 | | SIM | Dual SIM (Nano-SIM, dual stand-by) |
18 | | MicroSD | Up to 256 GB |
19 | | Battery | 4000 mAh Li-Po (non-removable) |
20 | | Dimensions | 158.3 x 75.3 x 8.4 mm |
21 | | Display | 6.3 inch, 1080 x 2340 (19.5:9 ratio) |
22 | | Rear Camera 1 | 48 MP, f/1.8, 26mm (wide), 1/2.0", 0.8µm, PDAF |
23 | | Rear Camera 2 | 8 MP, f/2.2, 13mm (ultrawide), 1/4.0", 1.12µm |
24 | | Rear Camera 3 | 2 MP, f/2.4, (macro), 1/5.0", 1.75µm |
25 | | Rear Camera 4 | 2 MP, f/2.4, (depth) |
26 | | Front Camera | 13 MP, f/2.0, (wide), 1/3.1", 1.12µm |
27 | | Fingerprint | Rear-mounted |
28 | | Sensors | Accelerometer, Gyro, Proximity, Compass |
29 |
30 | ## Device picture
31 |
32 | 
33 |
34 | Copyright (C) 2020 Paranoid Android.
35 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/kcal/PresetDialog.java:
--------------------------------------------------------------------------------
1 | package org.lineageos.settings.device.kcal;
2 |
3 | import android.app.AlertDialog;
4 | import android.app.Dialog;
5 | import android.app.DialogFragment;
6 | import android.app.FragmentManager;
7 | import android.content.DialogInterface;
8 | import android.os.Bundle;
9 |
10 | import org.lineageos.settings.device.R;
11 |
12 | public class PresetDialog extends DialogFragment {
13 | private CharSequence[] mEntries;
14 | private CharSequence[] mEntryValues;
15 | private String mValue;
16 | private KCalSettings mKCalSettingsFragment;
17 | private int mClickedDialogEntryIndex;
18 | private final DialogInterface.OnClickListener selectItemListener =
19 | new DialogInterface.OnClickListener() {
20 |
21 | @Override
22 | public void onClick(DialogInterface dialog, int which) {
23 | if (mClickedDialogEntryIndex != which) {
24 | mValue = mEntryValues[which].toString();
25 | mKCalSettingsFragment.applyValues(mValue);
26 | mClickedDialogEntryIndex = which;
27 | }
28 | dialog.dismiss();
29 | }
30 | };
31 |
32 | @Override
33 | public void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | mEntries = getResources().getStringArray(R.array.preset_enteries);
36 | mEntryValues = getResources().getStringArray(R.array.preset_values);
37 | }
38 |
39 | @Override
40 | public Dialog onCreateDialog(Bundle savedInstanceState) {
41 | AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());
42 | dialog.setTitle(getString(R.string.presets_dialog_title));
43 | mClickedDialogEntryIndex = getValueIndex();
44 | dialog.setItems(mEntries, selectItemListener);
45 | return dialog.create();
46 | }
47 |
48 | private int getValueIndex() {
49 | return findIndexOfValue(mValue);
50 | }
51 |
52 | private int findIndexOfValue(String value) {
53 | if (value != null && mEntryValues != null) {
54 | for (int i = mEntryValues.length - 1; i >= 0; i--) {
55 | if (mEntryValues[i].equals(value)) {
56 | return i;
57 | }
58 | }
59 | }
60 | return -1;
61 | }
62 |
63 | public void show(FragmentManager manager, String tag, KCalSettings mKCalSettingsFragment) {
64 | super.show(manager, tag);
65 | this.mKCalSettingsFragment = mKCalSettingsFragment;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/preferences/SecureSettingsStore.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 AICP
3 | * Copyright (C) 2018 CarbonROM
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.lineageos.settings.device.preferences;
19 |
20 | import android.content.ContentResolver;
21 | import android.preference.PreferenceDataStore;
22 | import android.provider.Settings;
23 |
24 | public class SecureSettingsStore extends androidx.preference.PreferenceDataStore
25 | implements PreferenceDataStore {
26 |
27 | private final ContentResolver mContentResolver;
28 |
29 | public SecureSettingsStore(ContentResolver contentResolver) {
30 | mContentResolver = contentResolver;
31 | }
32 |
33 | public boolean getBoolean(String key, boolean defValue) {
34 | return getInt(key, defValue ? 1 : 0) != 0;
35 | }
36 |
37 | public float getFloat(String key, float defValue) {
38 | return Settings.Secure.getFloat(mContentResolver, key, defValue);
39 | }
40 |
41 | public int getInt(String key, int defValue) {
42 | return Settings.Secure.getInt(mContentResolver, key, defValue);
43 | }
44 |
45 | public long getLong(String key, long defValue) {
46 | return Settings.Secure.getLong(mContentResolver, key, defValue);
47 | }
48 |
49 | public String getString(String key, String defValue) {
50 | String result = Settings.Secure.getString(mContentResolver, key);
51 | return result == null ? defValue : result;
52 | }
53 |
54 | public void putBoolean(String key, boolean value) {
55 | putInt(key, value ? 1 : 0);
56 | }
57 |
58 | public void putFloat(String key, float value) {
59 | Settings.Secure.putFloat(mContentResolver, key, value);
60 | }
61 |
62 | public void putInt(String key, int value) {
63 | Settings.Secure.putInt(mContentResolver, key, value);
64 | }
65 |
66 | public void putLong(String key, long value) {
67 | Settings.Secure.putLong(mContentResolver, key, value);
68 | }
69 |
70 | public void putString(String key, String value) {
71 | Settings.Secure.putString(mContentResolver, key, value);
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/preferences/SecureSettingListPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 AICP
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.lineageos.settings.device.preferences;
18 |
19 | import android.content.Context;
20 | import androidx.preference.ListPreference;
21 | import android.text.TextUtils;
22 | import android.util.AttributeSet;
23 |
24 | public class SecureSettingListPreference extends ListPreference {
25 | private boolean mAutoSummary = false;
26 |
27 | public SecureSettingListPreference(Context context, AttributeSet attrs, int defStyle) {
28 | super(context, attrs, defStyle);
29 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
30 | }
31 |
32 | public SecureSettingListPreference(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
35 | }
36 |
37 | public SecureSettingListPreference(Context context) {
38 | super(context);
39 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
40 | }
41 |
42 | @Override
43 | public void setValue(String value) {
44 | super.setValue(value);
45 | if (mAutoSummary || TextUtils.isEmpty(getSummary())) {
46 | setSummary(getEntry(), true);
47 | }
48 | }
49 |
50 | @Override
51 | public void setSummary(CharSequence summary) {
52 | setSummary(summary, false);
53 | }
54 |
55 | private void setSummary(CharSequence summary, boolean autoSummary) {
56 | mAutoSummary = autoSummary;
57 | super.setSummary(summary);
58 | }
59 |
60 | @Override
61 | protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
62 | // This is what default ListPreference implementation is doing without respecting
63 | // real default value:
64 | //setValue(restoreValue ? getPersistedString(mValue) : (String) defaultValue);
65 | // Instead, we better do
66 | setValue(restoreValue ? getPersistedString((String) defaultValue) : (String) defaultValue);
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/preferences/SecureSettingSwitchPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The CyanogenMod project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.lineageos.settings.device.preferences;
18 |
19 | import android.content.Context;
20 | import android.provider.Settings;
21 | import androidx.preference.SwitchPreference;
22 | import android.util.AttributeSet;
23 |
24 | public class SecureSettingSwitchPreference extends SwitchPreference {
25 | public SecureSettingSwitchPreference(Context context, AttributeSet attrs, int defStyle) {
26 | super(context, attrs, defStyle);
27 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
28 | }
29 |
30 | public SecureSettingSwitchPreference(Context context, AttributeSet attrs) {
31 | super(context, attrs);
32 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
33 | }
34 |
35 | public SecureSettingSwitchPreference(Context context) {
36 | super(context);
37 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
38 | }
39 |
40 | @Override
41 | protected boolean persistBoolean(boolean value) {
42 | if (shouldPersist()) {
43 | if (value == getPersistedBoolean(!value)) {
44 | // It's already there, so the same as persisting
45 | return true;
46 | }
47 | Settings.Secure.putInt(getContext().getContentResolver(), getKey(), value ? 1 : 0);
48 | return true;
49 | }
50 | return false;
51 | }
52 |
53 | @Override
54 | protected boolean getPersistedBoolean(boolean defaultReturnValue) {
55 | if (!shouldPersist()) {
56 | return defaultReturnValue;
57 | }
58 | return Settings.Secure.getInt(getContext().getContentResolver(),
59 | getKey(), defaultReturnValue ? 1 : 0) != 0;
60 | }
61 |
62 | @Override
63 | protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
64 | setChecked(Settings.Secure.getString(getContext().getContentResolver(), getKey()) != null ? getPersistedBoolean(isChecked())
65 | : (Boolean) defaultValue);
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/DiracSound.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.lineageos.settings.device;
18 |
19 | import android.media.audiofx.AudioEffect;
20 |
21 | import java.util.UUID;
22 |
23 | class DiracSound extends AudioEffect {
24 |
25 | private static final int DIRACSOUND_PARAM_HEADSET_TYPE = 1;
26 | private static final int DIRACSOUND_PARAM_EQ_LEVEL = 2;
27 | private static final int DIRACSOUND_PARAM_MUSIC = 4;
28 |
29 | private static final UUID EFFECT_TYPE_DIRACSOUND =
30 | UUID.fromString("e069d9e0-8329-11df-9168-0002a5d5c51b");
31 |
32 | DiracSound(int priority, int audioSession) {
33 | super(EFFECT_TYPE_NULL, EFFECT_TYPE_DIRACSOUND, priority, audioSession);
34 | }
35 |
36 | int getMusic() throws IllegalStateException,
37 | IllegalArgumentException, UnsupportedOperationException {
38 | int[] value = new int[1];
39 | checkStatus(getParameter(DIRACSOUND_PARAM_MUSIC, value));
40 | return value[0];
41 | }
42 |
43 | void setMusic(int enable) throws IllegalStateException,
44 | IllegalArgumentException, UnsupportedOperationException {
45 | checkStatus(setParameter(DIRACSOUND_PARAM_MUSIC, enable));
46 | }
47 |
48 | int getHeadsetType() throws IllegalStateException,
49 | IllegalArgumentException, UnsupportedOperationException {
50 | int[] value = new int[1];
51 | checkStatus(getParameter(DIRACSOUND_PARAM_HEADSET_TYPE, value));
52 | return value[0];
53 | }
54 |
55 | void setHeadsetType(int type) throws IllegalStateException,
56 | IllegalArgumentException, UnsupportedOperationException {
57 | checkStatus(setParameter(DIRACSOUND_PARAM_HEADSET_TYPE, type));
58 | }
59 |
60 | void setLevel(int band, float level) throws IllegalStateException,
61 | IllegalArgumentException, UnsupportedOperationException {
62 | checkStatus(setParameter(new int[]{DIRACSOUND_PARAM_EQ_LEVEL, band},
63 | String.valueOf(level).getBytes()));
64 | }
65 |
66 | float getLevel(int band) throws IllegalStateException,
67 | IllegalArgumentException, UnsupportedOperationException {
68 | int[] param = new int[2];
69 | byte[] value = new byte[10];
70 | param[0] = DIRACSOUND_PARAM_EQ_LEVEL;
71 | param[1] = band;
72 | checkStatus(getParameter(param, value));
73 | return Float.valueOf(new String(value));
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/configs/audio/listen_platform_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/configs/audio/graphite_ipc_platform_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
38 |
39 |
40 |
42 |
43 |
44 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/kcal/KCalSettingsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Xiaomi-SDM660 Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License
15 | */
16 |
17 | package org.lineageos.settings.device.kcal;
18 |
19 | import android.app.Activity;
20 | import android.app.Fragment;
21 | import android.os.Bundle;
22 | import android.view.Menu;
23 | import android.view.MenuInflater;
24 | import android.view.MenuItem;
25 |
26 | import org.lineageos.settings.device.R;
27 |
28 | public class KCalSettingsActivity extends Activity implements Utils {
29 |
30 | private KCalSettings mKCalSettingsFragment;
31 |
32 | @Override
33 | protected void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | setContentView(R.layout.activity_kcal);
36 |
37 | Fragment fragment = getFragmentManager().findFragmentById(R.id.fragment_kcal);
38 | if (fragment == null) {
39 | mKCalSettingsFragment = new KCalSettings();
40 | getFragmentManager().beginTransaction()
41 | .add(R.id.fragment_kcal, mKCalSettingsFragment)
42 | .commit();
43 | } else {
44 | mKCalSettingsFragment = (KCalSettings) fragment;
45 | }
46 | }
47 |
48 | @Override
49 | public boolean onOptionsItemSelected(MenuItem item) {
50 | switch (item.getItemId()) {
51 | case android.R.id.home:
52 | finish();
53 | return true;
54 |
55 | case R.id.action_reset:
56 | mKCalSettingsFragment.applyValues(RED_DEFAULT + " " +
57 | GREEN_DEFAULT + " " +
58 | BLUE_DEFAULT + " " +
59 | MINIMUM_DEFAULT + " " +
60 | SATURATION_DEFAULT + " " +
61 | VALUE_DEFAULT + " " +
62 | CONTRAST_DEFAULT + " " +
63 | HUE_DEFAULT);
64 | mKCalSettingsFragment.setmGrayscale(GRAYSCALE_DEFAULT);
65 | mKCalSettingsFragment.setmSetOnBoot(SETONBOOT_DEFAULT);
66 | return true;
67 |
68 | case R.id.action_preset:
69 | new PresetDialog().show(getFragmentManager(),
70 | KCalSettingsActivity.class.getName(), mKCalSettingsFragment);
71 | return true;
72 |
73 | default:
74 | break;
75 | }
76 | return super.onOptionsItemSelected(item);
77 | }
78 |
79 | @Override
80 | public boolean onCreateOptionsMenu(Menu menu) {
81 | MenuInflater menuInflater = getMenuInflater();
82 | menuInflater.inflate(R.menu.menu_reset, menu);
83 | return true;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/xml/power_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - 4000
4 |
5 | 4
6 | 4
7 |
8 | - 4.65
9 | - 0.52
10 | - 1
11 | - 12.10
12 | - 16.43
13 |
14 | 300000
15 | 614400
16 | 864000
17 | 1017600
18 | 1305600
19 | 1420800
20 | 1612800
21 | 1804800
22 |
23 |
24 | 300000
25 | 652800
26 | 902400
27 | 1056000
28 | 1401600
29 | 1536000
30 | 1804800
31 | 2016000
32 |
33 |
34 | 4.2
35 | 8.28
36 | 11.99
37 | 15.06
38 | 23.81
39 | 27.99
40 | 38.22
41 | 51.99
42 |
43 |
44 | 11.06
45 | 23.81
46 | 35.09
47 | 44.08
48 | 73.08
49 | 87.18
50 | 134.31
51 | 192.47
52 |
53 | - 82.45
54 | - 242.93
55 | - 245.859
56 | - 500
57 | - 83.29
58 | - 37.41
59 | - 2
60 | - 220
61 | - 150
62 | - 3700
63 | - 1
64 | - 1
65 | - 100
66 |
67 | 90
68 | 100
69 | 110
70 | 120
71 | 130
72 |
73 | - 3700
74 |
75 | 100
76 | 110
77 |
78 | - 3700
79 | - 1
80 | - 50
81 | - 50
82 | - 3300
83 | - 100
84 | - 95
85 |
86 | 7
87 | 5
88 |
89 |
90 |
--------------------------------------------------------------------------------
/XiaomiParts/src/org/lineageos/settings/device/BootReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018-2019 The Xiaomi-SDM660 Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License
15 | */
16 |
17 | package org.lineageos.settings.device;
18 |
19 | import android.content.BroadcastReceiver;
20 | import android.content.Context;
21 | import android.content.Intent;
22 | import android.provider.Settings;
23 |
24 | import org.lineageos.settings.device.kcal.Utils;
25 |
26 | import java.lang.Math.*;
27 |
28 | public class BootReceiver extends BroadcastReceiver implements Utils {
29 |
30 | public void onReceive(Context context, Intent intent) {
31 |
32 | if (Settings.Secure.getInt(context.getContentResolver(), PREF_ENABLED, 0) == 1) {
33 | FileUtils.setValue(KCAL_ENABLE, Settings.Secure.getInt(context.getContentResolver(),
34 | PREF_ENABLED, 0));
35 |
36 | String rgbValue = Settings.Secure.getInt(context.getContentResolver(),
37 | PREF_RED, RED_DEFAULT) + " " +
38 | Settings.Secure.getInt(context.getContentResolver(), PREF_GREEN,
39 | GREEN_DEFAULT) + " " +
40 | Settings.Secure.getInt(context.getContentResolver(), PREF_BLUE,
41 | BLUE_DEFAULT);
42 |
43 | FileUtils.setValue(KCAL_RGB, rgbValue);
44 | FileUtils.setValue(KCAL_MIN, Settings.Secure.getInt(context.getContentResolver(),
45 | PREF_MINIMUM, MINIMUM_DEFAULT));
46 | FileUtils.setValue(KCAL_SAT, Settings.Secure.getInt(context.getContentResolver(),
47 | PREF_GRAYSCALE, 0) == 1 ? 128 :
48 | Settings.Secure.getInt(context.getContentResolver(),
49 | PREF_SATURATION, SATURATION_DEFAULT) + SATURATION_OFFSET);
50 | FileUtils.setValue(KCAL_VAL, Settings.Secure.getInt(context.getContentResolver(),
51 | PREF_VALUE, VALUE_DEFAULT) + VALUE_OFFSET);
52 | FileUtils.setValue(KCAL_CONT, Settings.Secure.getInt(context.getContentResolver(),
53 | PREF_CONTRAST, CONTRAST_DEFAULT) + CONTRAST_OFFSET);
54 | FileUtils.setValue(KCAL_HUE, Settings.Secure.getInt(context.getContentResolver(),
55 | PREF_HUE, HUE_DEFAULT));
56 | }
57 |
58 | FileUtils.setValue(DeviceSettings.VIBRATION_STRENGTH_PATH, Settings.Secure.getInt(
59 | context.getContentResolver(), DeviceSettings.PREF_VIBRATION_STRENGTH, 80) / 100.0 * (DeviceSettings.MAX_VIBRATION - DeviceSettings.MIN_VIBRATION) + DeviceSettings.MIN_VIBRATION);
60 | FileUtils.setValue(DeviceSettings.USB_FASTCHARGE_PATH, Settings.Secure.getInt(context.getContentResolver(),
61 | DeviceSettings.PREF_USB_FASTCHARGE, 0));
62 | context.startService(new Intent(context, DiracService.class));
63 | }
64 | }
65 |
--------------------------------------------------------------------------------