renoir: Initial TWRP device tree

This commit is contained in:
TheMalachite 2021-06-30 12:05:05 +02:00
commit 935d94693e
No known key found for this signature in database
GPG key ID: 1ECE4100426089A5
71 changed files with 5138 additions and 0 deletions

3
Android.bp Normal file
View file

@ -0,0 +1,3 @@
soong_namespace {
imports: ["hardware/qcom-caf/bootctrl"],
}

23
Android.mk Normal file
View file

@ -0,0 +1,23 @@
#
# Copyright (C) 2021 The TWRP Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE), renoir)
subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
$(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
endif

18
AndroidProducts.mk Normal file
View file

@ -0,0 +1,18 @@
#
# Copyright (C) 2021 The TWRP Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/twrp_renoir.mk

131
BoardConfig.mk Normal file
View file

@ -0,0 +1,131 @@
#
# Copyright (C) 2021 The TWRP Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
DEVICE_PATH := device/xiaomi/renoir
# For building with minimal manifest
ALLOW_MISSING_DEPENDENCIES := true
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_VARIANT_RUNTIME := cortex-a55
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-2a
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic
TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a55
# APEX image
DEXPREOPT_GENERATE_APEX_IMAGE := true
# Assert
TARGET_OTA_ASSERT_DEVICE := renoir
# A/B
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS := \
boot \
dtbo \
odm \
product \
system \
system_ext \
vbmeta \
vbmeta_system \
vendor \
vendor_boot
# Kernel
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_IMAGE_NAME := Image
BOARD_KERNEL_PAGESIZE := 4096
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
BOARD_KERNEL_SEPARATED_DTBO := true
BOARD_BOOT_HEADER_VERSION := 3
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0
BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom
BOARD_KERNEL_CMDLINE += androidboot.memcg=1
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3
BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem,nosocket
BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8
BOARD_KERNEL_CMDLINE += earlycon=msm_geni_serial,0x880000
BOARD_KERNEL_CMDLINE += ip6table_raw.raw_before_defrag=1
BOARD_KERNEL_CMDLINE += iptable_raw.raw_before_defrag=1
BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1
BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
BOARD_KERNEL_CMDLINE += pcie_ports=compat
BOARD_KERNEL_CMDLINE += service_locator.enable=1
BOARD_KERNEL_CMDLINE += swiotlb=0
BOARD_KERNEL_CMDLINE += video=vfb:640x400,bpp=32,memsize=3072000
KERNEL_LD := LD=ld.lld
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc
TARGET_KERNEL_CLANG_COMPILE := true
TARGET_KERNEL_CONFIG := vendor/renoir-qgki_defconfig
TARGET_KERNEL_SOURCE := kernel/xiaomi/renoir
# Metadata
BOARD_USES_METADATA_PARTITION := true
BOARD_USES_QCOM_FBE_DECRYPTION := true
# Partitions
BOARD_FLASH_BLOCK_SIZE := 131072
BOARD_BOOTIMAGE_PARTITION_SIZE := 201326592
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
BOARD_SUPER_PARTITION_SIZE := 9126805504
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 9122611200 # (BOARD_SUPER_PARTITION_SIZE - 4MB)
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor
# Platform
BOARD_USES_QCOM_HARDWARE := true
TARGET_BOARD_PLATFORM := lahaina
# Properties
TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
# Recovery
BOARD_USES_RECOVERY_AS_BOOT := true
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/recovery.fstab
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
# Verified Boot
BOARD_AVB_ENABLE := true
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
BOARD_AVB_VBMETA_SYSTEM := system system_ext product
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1

28
bootctrl/Android.bp Normal file
View file

@ -0,0 +1,28 @@
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
cc_library {
name: "bootctrl.lahaina",
defaults: ["bootctrl_hal_defaults"],
static_libs: ["libgptutils.renoir"],
}
cc_library_shared {
name: "android.hardware.boot@1.1-impl-qti",
stem: "android.hardware.boot@1.0-impl-1.1-qti",
defaults: ["android.hardware.boot@1.1-impl-qti_defaults"],
static_libs: ["libgptutils.renoir"],
}

123
device.mk Normal file
View file

@ -0,0 +1,123 @@
#
# Copyright (C) 2021 The TWRP Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Enable project quotas and casefolding for emulated storage without sdcardfs
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Enable updating of APEXes
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Enable virtual A/B OTA
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
# Installs gsi keys into ramdisk, to boot a developer GSI with verified boot.
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
LOCAL_PATH := device/xiaomi/renoir
# API
PRODUCT_SHIPPING_API_LEVEL := 30
# A/B
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true
PRODUCT_PACKAGES += \
otapreopt_script
# Boot control HAL
PRODUCT_PACKAGES += \
android.hardware.boot@1.1-impl-qti.recovery \
bootctrl.lahaina.recovery
PRODUCT_PACKAGES_DEBUG += \
bootctl
# Dynamic partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Fastbootd
PRODUCT_PACKAGES += \
android.hardware.fastboot@1.0-impl-mock \
fastbootd
# Screen
TARGET_SCREEN_HEIGHT := 2400
TARGET_SCREEN_WIDTH := 1080
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/qcom-caf/bootctrl
# Update engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
PRODUCT_PACKAGES_DEBUG += \
update_engine_client
# TWRP Configuration
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INCLUDE_NTFS_3G := true
TW_USE_TOOLBOX := true
TW_INCLUDE_RESETPROP := true
TW_INCLUDE_REPACKTOOLS := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness"
TW_Y_OFFSET := 80
TW_H_OFFSET := -80
TWRP_INCLUDE_LOGCAT := true
TARGET_USES_LOGD := true
TARGET_USES_MKE2FS := true
TW_NO_SCREEN_BLANK := true
TW_EXCLUDE_APEX := true
PLATFORM_SECURITY_PATCH := 2099-12-31
VENDOR_SECURITY_PATCH := 2099-12-31
PLATFORM_VERSION := 20.1.0
TW_INCLUDE_CRYPTO := true
TW_INCLUDE_CRYPTO_FBE := true
TW_INCLUDE_FBE_METADATA_DECRYPT := true
TARGET_RECOVERY_DEVICE_MODULES += \
libandroidicu \
libdisplayconfig.qti \
libion \
vendor.display.config@1.0 \
vendor.display.config@2.0
RECOVERY_LIBRARY_SOURCE_FILES += \
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \
$(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/libdisplayconfig.qti.so \
$(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/vendor.display.config@1.0.so \
$(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/vendor.display.config@2.0.so
PRODUCT_COPY_FILES += \
$(OUT_DIR)/target/product/renoir/obj/SHARED_LIBRARIES/libandroidicu_intermediates/libandroidicu.so:$(TARGET_COPY_OUT_RECOVERY)/root/system/lib64/libandroidicu.so
PRODUCT_PACKAGES += \
qcom_decrypt \
qcom_decrypt_fbe

42
gpt-utils/Android.bp Normal file
View file

@ -0,0 +1,42 @@
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
cc_library {
name: "libgptutils.renoir",
vendor: true,
recovery_available: true,
shared_libs: [
"libcutils",
"liblog",
"libz",
],
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
"-D_GENERIC_KERNEL_HEADERS",
],
srcs: [
"gpt-utils.cpp",
"recovery-ufs-bsg.cpp",
],
owner: "qti",
header_libs: [
"generated_kernel_headers",
],
export_include_dirs: ["."],
}

1520
gpt-utils/gpt-utils.cpp Normal file

File diff suppressed because it is too large Load diff

193
gpt-utils/gpt-utils.h Normal file
View file

@ -0,0 +1,193 @@
/*
* Copyright (c) 2013,2016,2020 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __GPT_UTILS_H__
#define __GPT_UTILS_H__
#include <vector>
#include <string>
#include <map>
#ifdef __cplusplus
extern "C" {
#endif
#include <unistd.h>
#include <stdlib.h>
/******************************************************************************
* GPT HEADER DEFINES
******************************************************************************/
#define GPT_SIGNATURE "EFI PART"
#define HEADER_SIZE_OFFSET 12
#define HEADER_CRC_OFFSET 16
#define PRIMARY_HEADER_OFFSET 24
#define BACKUP_HEADER_OFFSET 32
#define FIRST_USABLE_LBA_OFFSET 40
#define LAST_USABLE_LBA_OFFSET 48
#define PENTRIES_OFFSET 72
#define PARTITION_COUNT_OFFSET 80
#define PENTRY_SIZE_OFFSET 84
#define PARTITION_CRC_OFFSET 88
#define TYPE_GUID_OFFSET 0
#define TYPE_GUID_SIZE 16
#define PTN_ENTRY_SIZE 128
#define UNIQUE_GUID_OFFSET 16
#define FIRST_LBA_OFFSET 32
#define LAST_LBA_OFFSET 40
#define ATTRIBUTE_FLAG_OFFSET 48
#define PARTITION_NAME_OFFSET 56
#define MAX_GPT_NAME_SIZE 72
/******************************************************************************
* AB RELATED DEFINES
******************************************************************************/
//Bit 48 onwords in the attribute field are the ones where we are allowed to
//store our AB attributes.
#define AB_FLAG_OFFSET (ATTRIBUTE_FLAG_OFFSET + 6)
#define GPT_DISK_INIT_MAGIC 0xABCD
#define AB_PARTITION_ATTR_SLOT_ACTIVE (0x1<<2)
#define AB_PARTITION_ATTR_BOOT_SUCCESSFUL (0x1<<6)
#define AB_PARTITION_ATTR_UNBOOTABLE (0x1<<7)
#define AB_SLOT_ACTIVE_VAL 0x3F
#define AB_SLOT_INACTIVE_VAL 0x0
#define AB_SLOT_ACTIVE 1
#define AB_SLOT_INACTIVE 0
#define AB_SLOT_A_SUFFIX "_a"
#define AB_SLOT_B_SUFFIX "_b"
#define PTN_XBL "xbl"
#define PTN_XBL_CFG "xbl_config"
#define PTN_SWAP_LIST PTN_XBL, PTN_XBL_CFG, "abl", "aop", "cpucp", "devcfg", "dsp", "dtbo", "featenabler", "hyp", "imagefv", "keymaster", "qupfw", "shrm", "tz", "uefisecapp", "vbmeta", "vbmeta_system"
#define AB_PTN_LIST PTN_SWAP_LIST, "bluetooth", "boot", "modem", "odm", "product", "system", "system_ext", "vendor", "vendor_boot"
#define BOOT_DEV_DIR "/dev/block/bootdevice/by-name"
/******************************************************************************
* HELPER MACROS
******************************************************************************/
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
/******************************************************************************
* TYPES
******************************************************************************/
enum boot_update_stage {
UPDATE_MAIN = 1,
UPDATE_BACKUP,
UPDATE_FINALIZE
};
enum gpt_instance {
PRIMARY_GPT = 0,
SECONDARY_GPT
};
enum boot_chain {
NORMAL_BOOT = 0,
BACKUP_BOOT
};
struct gpt_disk {
//GPT primary header
uint8_t *hdr;
//primary header crc
uint32_t hdr_crc;
//GPT backup header
uint8_t *hdr_bak;
//backup header crc
uint32_t hdr_bak_crc;
//Partition entries array
uint8_t *pentry_arr;
//Partition entries array for backup table
uint8_t *pentry_arr_bak;
//Size of the pentry array
uint32_t pentry_arr_size;
//Size of each element in the pentry array
uint32_t pentry_size;
//CRC of the partition entry array
uint32_t pentry_arr_crc;
//CRC of the backup partition entry array
uint32_t pentry_arr_bak_crc;
//Path to block dev representing the disk
char devpath[PATH_MAX];
//Block size of disk
uint32_t block_size;
uint32_t is_initialized;
};
/******************************************************************************
* FUNCTION PROTOTYPES
******************************************************************************/
int prepare_boot_update(enum boot_update_stage stage);
//GPT disk methods
struct gpt_disk* gpt_disk_alloc();
//Free previously allocated gpt_disk struct
void gpt_disk_free(struct gpt_disk *disk);
//Get the details of the disk holding the partition whose name
//is passed in via dev
int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *disk);
//Get pointer to partition entry from a allocated gpt_disk structure
uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk,
const char *partname,
enum gpt_instance instance);
//Update the crc fields of the modified disk structure
int gpt_disk_update_crc(struct gpt_disk *disk);
//Write the contents of struct gpt_disk back to the actual disk
int gpt_disk_commit(struct gpt_disk *disk);
//Return if the current device is UFS based or not
int gpt_utils_is_ufs_device();
//Swtich betwieen using either the primary or the backup
//boot LUN for boot. This is required since UFS boot partitions
//cannot have a backup GPT which is what we use for failsafe
//updates of the other 'critical' partitions. This function will
//not be invoked for emmc targets and on UFS targets is only required
//to be invoked for XBL.
//
//The algorithm to do this is as follows:
//- Find the real block device(eg: /dev/block/sdb) that corresponds
// to the /dev/block/bootdevice/by-name/xbl(bak) symlink
//
//- Once we have the block device 'node' name(sdb in the above example)
// use this node to to locate the scsi generic device that represents
// it by checking the file /sys/block/sdb/device/scsi_generic/sgY
//
//- Once we locate sgY we call the query ioctl on /dev/sgy to switch
//the boot lun to either LUNA or LUNB
int gpt_utils_set_xbl_boot_partition(enum boot_chain chain);
//Given a vector of partition names as a input and a reference to a map,
//populate the map to indicate which physical disk each of the partitions
//sits on. The key in the map is the path to the block device where the
//partiton lies and the value is a vector of strings indicating which of
//the passed in partiton names sits on that device.
int gpt_utils_get_partition_map(std::vector<std::string>& partition_list,
std::map<std::string,std::vector<std::string>>& partition_map);
#ifdef __cplusplus
}
#endif
#endif /* __GPT_UTILS_H__ */

View file

@ -0,0 +1,255 @@
/*
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define LOG_TAG "recovery_ufs"
#include "recovery-ufs-bsg.h"
#ifndef _BSG_FRAMEWORK_KERNEL_HEADERS
#ifndef _GENERIC_KERNEL_HEADERS
#include <scsi/ufs/ioctl.h>
#include <scsi/ufs/ufs.h>
#endif
#endif
//Size of the buffer that needs to be passed to the UFS ioctl
#define UFS_ATTR_DATA_SIZE 32
#ifdef _BSG_FRAMEWORK_KERNEL_HEADERS
static int get_ufs_bsg_dev(void)
{
DIR *dir;
struct dirent *ent;
int ret = -ENODEV;
if ((dir = opendir ("/dev")) != NULL) {
/* read all the files and directories within directory */
while ((ent = readdir(dir)) != NULL) {
if (!strcmp(ent->d_name, "ufs-bsg") ||
!strcmp(ent->d_name, "ufs-bsg0")) {
snprintf(ufs_bsg_dev, FNAME_SZ, "/dev/%s", ent->d_name);
ret = 0;
break;
}
}
if (ret)
ALOGE("could not find the ufs-bsg dev\n");
closedir (dir);
} else {
/* could not open directory */
ALOGE("could not open /dev (error no: %d)\n", errno);
ret = -EINVAL;
}
return ret;
}
int ufs_bsg_dev_open(void)
{
int ret;
if (!fd_ufs_bsg) {
fd_ufs_bsg = open(ufs_bsg_dev, O_RDWR);
ret = errno;
if (fd_ufs_bsg < 0) {
ALOGE("Unable to open %s (error no: %d)",
ufs_bsg_dev, errno);
fd_ufs_bsg = 0;
return ret;
}
}
return 0;
}
void ufs_bsg_dev_close(void)
{
if (fd_ufs_bsg) {
close(fd_ufs_bsg);
fd_ufs_bsg = 0;
}
}
static int ufs_bsg_ioctl(int fd, struct ufs_bsg_request *req,
struct ufs_bsg_reply *rsp, __u8 *buf, __u32 buf_len,
enum bsg_ioctl_dir dir)
{
int ret;
struct sg_io_v4 sg_io = {0};
sg_io.guard = 'Q';
sg_io.protocol = BSG_PROTOCOL_SCSI;
sg_io.subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT;
sg_io.request_len = sizeof(*req);
sg_io.request = (__u64)req;
sg_io.response = (__u64)rsp;
sg_io.max_response_len = sizeof(*rsp);
if (dir == BSG_IOCTL_DIR_FROM_DEV) {
sg_io.din_xfer_len = buf_len;
sg_io.din_xferp = (__u64)(buf);
} else {
sg_io.dout_xfer_len = buf_len;
sg_io.dout_xferp = (__u64)(buf);
}
ret = ioctl(fd, SG_IO, &sg_io);
if (ret)
ALOGE("%s: Error from sg_io ioctl (return value: %d, error no: %d, reply result from LLD: %d\n)",
__func__, ret, errno, rsp->result);
if (sg_io.info || rsp->result) {
ALOGE("%s: Error from sg_io info (check sg info: device_status: 0x%x, transport_status: 0x%x, driver_status: 0x%x, reply result from LLD: %d\n)",
__func__, sg_io.device_status, sg_io.transport_status,
sg_io.driver_status, rsp->result);
ret = -EAGAIN;
}
return ret;
}
static void compose_ufs_bsg_query_req(struct ufs_bsg_request *req, __u8 func,
__u8 opcode, __u8 idn, __u8 index, __u8 sel,
__u16 length)
{
struct utp_upiu_header *hdr = &req->upiu_req.header;
struct utp_upiu_query *qr = &req->upiu_req.qr;
req->msgcode = UTP_UPIU_QUERY_REQ;
hdr->dword_0 = DWORD(UTP_UPIU_QUERY_REQ, 0, 0, 0);
hdr->dword_1 = DWORD(0, func, 0, 0);
hdr->dword_2 = DWORD(0, 0, length >> 8, (__u8)length);
qr->opcode = opcode;
qr->idn = idn;
qr->index = index;
qr->selector = sel;
qr->length = htobe16(length);
}
static int ufs_query_attr(int fd, __u32 value,
__u8 func, __u8 opcode, __u8 idn,
__u8 index, __u8 sel)
{
struct ufs_bsg_request req = {0};
struct ufs_bsg_reply rsp = {0};
enum bsg_ioctl_dir dir = BSG_IOCTL_DIR_FROM_DEV;
int ret = 0;
if (opcode == QUERY_REQ_OP_WRITE_DESC || opcode == QUERY_REQ_OP_WRITE_ATTR)
dir = BSG_IOCTL_DIR_TO_DEV;
req.upiu_req.qr.value = htobe32(value);
compose_ufs_bsg_query_req(&req, func, opcode, idn, index, sel, 0);
ret = ufs_bsg_ioctl(fd, &req, &rsp, 0, 0, dir);
if (ret)
ALOGE("%s: Error from ufs_bsg_ioctl (return value: %d, error no: %d\n)",
__func__, ret, errno);
return ret;
}
int32_t set_boot_lun(char *sg_dev,uint8_t lun_id)
{
int32_t ret;
__u32 boot_lun_id = lun_id;
ret = get_ufs_bsg_dev();
if (ret)
return ret;
ALOGV("Found the ufs bsg dev: %s\n", ufs_bsg_dev);
ret = ufs_bsg_dev_open();
if (ret)
return ret;
ALOGV("Opened ufs bsg dev: %s\n", ufs_bsg_dev);
ret = ufs_query_attr(fd_ufs_bsg, boot_lun_id, QUERY_REQ_FUNC_STD_WRITE,
QUERY_REQ_OP_WRITE_ATTR, QUERY_ATTR_IDN_BOOT_LU_EN, 0, 0);
if (ret) {
ALOGE("Error requesting ufs attr idn %d via query ioctl (return value: %d, error no: %d)",
QUERY_ATTR_IDN_BOOT_LU_EN, ret, errno);
goto out;
}
out:
ufs_bsg_dev_close();
return ret;
}
#endif
#ifndef _BSG_FRAMEWORK_KERNEL_HEADERS
int32_t set_boot_lun(char *sg_dev, uint8_t boot_lun_id)
{
#ifndef _GENERIC_KERNEL_HEADERS
int fd = -1;
int rc;
struct ufs_ioctl_query_data *data = NULL;
size_t ioctl_data_size = sizeof(struct ufs_ioctl_query_data) + UFS_ATTR_DATA_SIZE;
data = (struct ufs_ioctl_query_data*)malloc(ioctl_data_size);
if (!data) {
fprintf(stderr, "%s: Failed to alloc query data struct\n",
__func__);
goto error;
}
memset(data, 0, ioctl_data_size);
data->opcode = UPIU_QUERY_OPCODE_WRITE_ATTR;
data->idn = QUERY_ATTR_IDN_BOOT_LU_EN;
data->buf_size = UFS_ATTR_DATA_SIZE;
data->buffer[0] = boot_lun_id;
fd = open(sg_dev, O_RDWR);
if (fd < 0) {
fprintf(stderr, "%s: Failed to open %s(%s)\n",
__func__,
sg_dev,
strerror(errno));
goto error;
}
rc = ioctl(fd, UFS_IOCTL_QUERY, data);
if (rc) {
fprintf(stderr, "%s: UFS query ioctl failed(%s)\n",
__func__,
strerror(errno));
goto error;
}
close(fd);
free(data);
return 0;
error:
if (fd >= 0)
close(fd);
if (data)
free(data);
return -1;
#else
return 0;
#endif
}
#endif

View file

@ -0,0 +1,131 @@
#ifndef __RECOVERY_UFS_BSG_H__
#define __RECOVERY_UFS_BSG_H__
/*
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <linux/bsg.h>
#include <scsi/scsi_bsg_ufs.h>
#include <endian.h>
#include <dirent.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#ifdef ANDROID
#include "cutils/log.h"
#endif
#ifdef OE
#include <syslog.h>
#define LOGI(...) syslog(LOG_NOTICE, "INFO:" __VA_ARGS__)
#define LOGV(...) syslog(LOG_NOTICE,"VERB:" __VA_ARGS__)
#define LOGD(...) syslog(LOG_DEBUG,"DBG:" __VA_ARGS__)
#define LOGE(...) syslog(LOG_ERR,"ERR:" __VA_ARGS__)
#define LOGW(...) syslog(LOG_WARNING,"WRN:" __VA_ARGS__)
#define strlcat(d,s,l) snprintf(d+strlen(d),l,"%s",s)
#endif
#define FNAME_SZ 64
#define SG_IO 0x2285
#define DWORD(b3, b2, b1, b0) htobe32((b3 << 24) | (b2 << 16) |\
(b1 << 8) | b0)
/* UFS BSG device nodes */
char ufs_bsg_dev[FNAME_SZ] = "/dev/ufs-bsg";
int fd_ufs_bsg;
int32_t set_ufs_lun(uint8_t lun_id);
#ifdef _BSG_FRAMEWORK_KERNEL_HEADERS
/* UPIU Transaction Codes */
enum {
UTP_UPIU_NOP_OUT = 0x00,
UTP_UPIU_COMMAND = 0x01,
UTP_UPIU_DATA_OUT = 0x02,
UTP_UPIU_TASK_REQ = 0x04,
UTP_UPIU_QUERY_REQ = 0x16,
};
/* UPIU Query Function field */
enum {
QUERY_REQ_FUNC_STD_READ = 0x01,
QUERY_REQ_FUNC_STD_WRITE = 0x81,
};
enum query_req_opcode {
QUERY_REQ_OP_READ_DESC = 0x1,
QUERY_REQ_OP_WRITE_DESC = 0x2,
QUERY_REQ_OP_READ_ATTR = 0x3,
QUERY_REQ_OP_WRITE_ATTR = 0x4,
QUERY_REQ_OP_READ_FLAG = 0x5,
QUERY_REQ_OP_SET_FLAG = 0x6,
QUERY_REQ_OP_CLEAR_FLAG = 0x7,
QUERY_REQ_OP_TOGGLE_FLAG = 0x8,
};
enum query_desc_idn {
QUERY_DESC_IDN_DEVICE = 0x0,
QUERY_DESC_IDN_UNIT = 0x2,
QUERY_DESC_IDN_GEOMETRY = 0x7,
};
enum query_desc_size {
QUERY_DESC_SIZE_DEVICE = 0x40,
QUERY_DESC_SIZE_GEOMETRY = 0x48,
QUERY_DESC_SIZE_UNIT = 0x23,
};
enum bsg_ioctl_dir {
BSG_IOCTL_DIR_TO_DEV,
BSG_IOCTL_DIR_FROM_DEV,
};
enum query_attr_idn {
QUERY_ATTR_IDN_BOOT_LU_EN = 0x00,
QUERY_ATTR_IDN_RESERVED = 0x01,
QUERY_ATTR_IDN_POWER_MODE = 0x02,
QUERY_ATTR_IDN_ACTIVE_ICC_LVL = 0x03,
};
#endif /* _BSG_FRAMEWORK_KERNEL_HEADERS */
#endif /* __RECOVERY_UFS_BSG_H__ */

2
odm.prop Normal file
View file

@ -0,0 +1,2 @@
# Audio
ro.vendor.qti.va_odm.support=1

45
recovery.fstab Normal file
View file

@ -0,0 +1,45 @@
# Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
system /system ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
system_ext /system_ext ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
product /product ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
vendor /vendor ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount
odm /odm ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount
/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,check,formattable,first_stage_mount
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0,quota,reservedsize=512M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults

View file

@ -0,0 +1,33 @@
import /init.recovery.qcom_decrypt.rc
service touchfeature /system/bin/vendor.xiaomi.hw.touchfeature@1.0-service
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
oneshot
seclabel u:r:recovery:s0
on init
write /sys/class/backlight/panel0-backlight/brightness 200
# Create location for fs_mgr to store abbreviated output from filesystem
# checker programs.
mkdir /dev/fscklogs 0770 root system
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
# Set fscklog permission
chown root system /dev/fscklogs/log
chmod 0770 /dev/fscklogs/log
start boot-hal-1-1
on boot
start health-hal-2-1
setprop sys.usb.config adb
# Xiaomi touch
mknod /dev/xiaomi_touch c 10 120
chown system system /dev/xiaomi-touch
chmod 0664 /dev/xiaomi-touch
start touchfeature

View file

@ -0,0 +1,166 @@
# Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
on boot
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
mount configfs none /config
mkdir /config/usb_gadget/g1 0770
mkdir /config/usb_gadget/g2 0770
mkdir /config/usb_gadget/g1/strings/0x409 0770
mkdir /config/usb_gadget/g2/strings/0x409 0770
write /config/usb_gadget/g1/bcdUSB 0x0200
write /config/usb_gadget/g2/bcdUSB 0x0200
write /config/usb_gadget/g1/os_desc/use 1
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g2/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
write /config/usb_gadget/g2/strings/0x409/manufacturer ${ro.product.manufacturer}
write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
write /config/usb_gadget/g2/strings/0x409/product ${ro.product.model}
mkdir /config/usb_gadget/g1/functions/mass_storage.0
mkdir /config/usb_gadget/g1/functions/mtp.gs0
mkdir /config/usb_gadget/g1/functions/ptp.gs1
mkdir /config/usb_gadget/g1/functions/accessory.gs2
mkdir /config/usb_gadget/g1/functions/audio_source.gs3
mkdir /config/usb_gadget/g1/functions/midi.gs5
mkdir /config/usb_gadget/g1/functions/ffs.adb
mkdir /config/usb_gadget/g1/functions/ffs.diag
mkdir /config/usb_gadget/g1/functions/ffs.diag_mdm
mkdir /config/usb_gadget/g1/functions/ffs.diag_mdm2
mkdir /config/usb_gadget/g1/functions/diag.diag
mkdir /config/usb_gadget/g1/functions/diag.diag_mdm
mkdir /config/usb_gadget/g1/functions/diag.diag_mdm2
mkdir /config/usb_gadget/g1/functions/cser.dun.0
mkdir /config/usb_gadget/g1/functions/cser.nmea.1
mkdir /config/usb_gadget/g1/functions/cser.dun.2
mkdir /config/usb_gadget/g1/functions/gsi.rmnet
mkdir /config/usb_gadget/g1/functions/gsi.rndis
mkdir /config/usb_gadget/g1/functions/gsi.dpl
mkdir /config/usb_gadget/g1/functions/qdss.qdss
mkdir /config/usb_gadget/g1/functions/qdss.qdss_mdm
mkdir /config/usb_gadget/g1/functions/rndis_bam.rndis
mkdir /config/usb_gadget/g1/functions/rndis.rndis
mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet
mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl
mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet_bam_dmux
mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl_bam_dmux
mkdir /config/usb_gadget/g1/functions/ncm.0
mkdir /config/usb_gadget/g1/functions/ccid.ccid
mkdir /config/usb_gadget/g1/functions/uac2.0
mkdir /config/usb_gadget/g1/functions/uvc.0
mkdir /config/usb_gadget/g1/configs/b.1 0770
mkdir /config/usb_gadget/g2/configs/b.1 0770
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770
mkdir /config/usb_gadget/g2/configs/b.1/strings/0x409 0770
write /config/usb_gadget/g1/configs/b.1/MaxPower 900
write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
write /config/usb_gadget/g1/functions/diag.diag/serial ${ro.serialno}
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
mkdir /dev/usb-ffs 0775 shell system
mkdir /dev/usb-ffs/adb 0770 shell system
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=1000,rmode=0770,fmode=0660
write /sys/class/android_usb/android0/f_ffs/aliases adb
setprop vendor.usb.controller ${sys.usb.controller}
enable vendor.qcom-usb-sh
mkdir /config/usb_gadget/g1/functions/ffs.mtp
mkdir /config/usb_gadget/g1/functions/ffs.ptp
mkdir /dev/usb-ffs/mtp 0770 mtp mtp
mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
mkdir /dev/usb-ffs/ptp 0770 mtp mtp
mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
on property:sys.usb.config=none
write /config/usb_gadget/g1/UDC "none"
stop adbd
setprop sys.usb.ffs.ready 0
setprop sys.usb.ffs.mtp.ready 0
write /config/usb_gadget/g1/bDeviceClass 0
write /config/usb_gadget/g1/bDeviceSubClass 0
write /config/usb_gadget/g1/bDeviceProtocol 0
rm /config/usb_gadget/g1/configs/b.1/f1
rm /config/usb_gadget/g1/configs/b.1/f2
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
rmdir /config/usb_gadget/g1/functions/rndis.gs4
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=adb
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
rm /config/usb_gadget/g1/configs/b.1/f1
rm /config/usb_gadget/g1/configs/b.1/f2
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
write /config/usb_gadget/g1/idVendor 0x18d1
write /config/usb_gadget/g1/idProduct 0x4ee7
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp"
rm /config/usb_gadget/g1/configs/b.1/f1
rm /config/usb_gadget/g1/configs/b.1/f2
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
write /config/usb_gadget/g1/idVendor 0x2A70
write /config/usb_gadget/g1/idProduct 0XF003
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,adb
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb"
rm /config/usb_gadget/g1/configs/b.1/f1
rm /config/usb_gadget/g1/configs/b.1/f2
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
write /config/usb_gadget/g1/idVendor 0x2A70
write /config/usb_gadget/g1/idProduct 0x9011
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
on property:ro.boot.usbcontroller=*
setprop sys.usb.controller ${ro.boot.usbcontroller}
write /sys/class/udc/${ro.boot.usbcontroller}/device/../mode peripheral

Binary file not shown.

View file

@ -0,0 +1,44 @@
# Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted (subject to the limitations in the
# disclaimer below) provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
system /system ext4 ro,barrier=1,discard wait,slotselect
system_ext /system_ext ext4 ro,barrier=1,discard wait,slotselect
product /product ext4 ro,barrier=1,discard wait,slotselect
vendor /vendor ext4 ro,barrier=1,discard wait,slotselect
odm /odm ext4 ro,barrier=1,discard wait,slotselect
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults

View file

@ -0,0 +1,614 @@
{
"Attributes": [
{
"Name": "LowCapacityCPUs",
"Controller": "cpuset",
"File": "background/cpus"
},
{
"Name": "HighCapacityCPUs",
"Controller": "cpuset",
"File": "foreground/cpus"
},
{
"Name": "MaxCapacityCPUs",
"Controller": "cpuset",
"File": "top-app/cpus"
},
{
"Name": "MemLimit",
"Controller": "memory",
"File": "memory.limit_in_bytes"
},
{
"Name": "MemSoftLimit",
"Controller": "memory",
"File": "memory.soft_limit_in_bytes"
},
{
"Name": "MemSwappiness",
"Controller": "memory",
"File": "memory.swappiness"
},
{
"Name": "STuneBoost",
"Controller": "schedtune",
"File": "schedtune.boost"
},
{
"Name": "STunePreferIdle",
"Controller": "schedtune",
"File": "schedtune.prefer_idle"
},
{
"Name": "UClampMin",
"Controller": "cpu",
"File": "cpu.uclamp.min"
},
{
"Name": "UClampMax",
"Controller": "cpu",
"File": "cpu.uclamp.max"
},
{
"Name": "FreezerState",
"Controller": "freezer",
"File": "cgroup.freeze"
}
],
"Profiles": [
{
"Name": "HighEnergySaving",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "schedtune",
"Path": "background"
}
}
]
},
{
"Name": "Frozen",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "freezer",
"Path": ""
}
}
]
},
{
"Name": "Unfrozen",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "freezer",
"Path": "../"
}
}
]
},
{
"Name": "NormalPerformance",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "schedtune",
"Path": ""
}
}
]
},
{
"Name": "HighPerformance",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "schedtune",
"Path": "foreground"
}
}
]
},
{
"Name": "MaxPerformance",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "schedtune",
"Path": "top-app"
}
}
]
},
{
"Name": "RealtimePerformance",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "schedtune",
"Path": "rt"
}
}
]
},
{
"Name": "CameraServicePerformance",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "schedtune",
"Path": "camera-daemon"
}
}
]
},
{
"Name": "CpuPolicySpread",
"Actions": [
{
"Name": "SetAttribute",
"Params":
{
"Name": "STunePreferIdle",
"Value": "1"
}
}
]
},
{
"Name": "CpuPolicyPack",
"Actions": [
{
"Name": "SetAttribute",
"Params":
{
"Name": "STunePreferIdle",
"Value": "0"
}
}
]
},
{
"Name": "VrKernelCapacity",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": ""
}
}
]
},
{
"Name": "VrServiceCapacityLow",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "system/background"
}
}
]
},
{
"Name": "VrServiceCapacityNormal",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "system"
}
}
]
},
{
"Name": "VrServiceCapacityHigh",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "system/performance"
}
}
]
},
{
"Name": "VrProcessCapacityLow",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "application/background"
}
}
]
},
{
"Name": "VrProcessCapacityNormal",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "application"
}
}
]
},
{
"Name": "VrProcessCapacityHigh",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "application/performance"
}
}
]
},
{
"Name": "ProcessCapacityLow",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "background"
}
}
]
},
{
"Name": "ProcessCapacityNormal",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": ""
}
}
]
},
{
"Name": "ProcessCapacityHigh",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "foreground"
}
}
]
},
{
"Name": "ProcessCapacityMax",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "top-app"
}
}
]
},
{
"Name": "ServiceCapacityLow",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "system-background"
}
}
]
},
{
"Name": "ServiceCapacityRestricted",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "restricted"
}
}
]
},
{
"Name": "CameraServiceCapacity",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "camera-daemon"
}
}
]
},
{
"Name": "LowIoPriority",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "blkio",
"Path": "background"
}
}
]
},
{
"Name": "NormalIoPriority",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "blkio",
"Path": ""
}
}
]
},
{
"Name": "HighIoPriority",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "blkio",
"Path": ""
}
}
]
},
{
"Name": "MaxIoPriority",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "blkio",
"Path": ""
}
}
]
},
{
"Name": "TimerSlackHigh",
"Actions": [
{
"Name": "SetTimerSlack",
"Params":
{
"Slack": "40000000"
}
}
]
},
{
"Name": "TimerSlackNormal",
"Actions": [
{
"Name": "SetTimerSlack",
"Params":
{
"Slack": "50000"
}
}
]
},
{
"Name": "PerfBoost",
"Actions": [
{
"Name": "SetClamps",
"Params":
{
"Boost": "50%",
"Clamp": "0"
}
}
]
},
{
"Name": "PerfClamp",
"Actions": [
{
"Name": "SetClamps",
"Params":
{
"Boost": "0",
"Clamp": "30%"
}
}
]
},
{
"Name": "LowMemoryUsage",
"Actions": [
{
"Name": "SetAttribute",
"Params":
{
"Name": "MemSoftLimit",
"Value": "16MB"
}
},
{
"Name": "SetAttribute",
"Params":
{
"Name": "MemSwappiness",
"Value": "150"
}
}
]
},
{
"Name": "HighMemoryUsage",
"Actions": [
{
"Name": "SetAttribute",
"Params":
{
"Name": "MemSoftLimit",
"Value": "512MB"
}
},
{
"Name": "SetAttribute",
"Params":
{
"Name": "MemSwappiness",
"Value": "100"
}
}
]
},
{
"Name": "SystemMemoryProcess",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "memory",
"Path": "system"
}
}
]
},
{
"Name": "FreezerDisabled",
"Actions": [
{
"Name": "SetAttribute",
"Params":
{
"Name": "FreezerState",
"Value": "0"
}
}
]
},
{
"Name": "FreezerEnabled",
"Actions": [
{
"Name": "SetAttribute",
"Params":
{
"Name": "FreezerState",
"Value": "1"
}
}
]
}
],
"AggregateProfiles": [
{
"Name": "SCHED_SP_DEFAULT",
"Profiles": [ "TimerSlackNormal" ]
},
{
"Name": "SCHED_SP_BACKGROUND",
"Profiles": [ "HighEnergySaving", "LowIoPriority", "TimerSlackHigh" ]
},
{
"Name": "SCHED_SP_FOREGROUND",
"Profiles": [ "HighPerformance", "HighIoPriority", "TimerSlackNormal" ]
},
{
"Name": "SCHED_SP_TOP_APP",
"Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
},
{
"Name": "SCHED_SP_RT_APP",
"Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
},
{
"Name": "CPUSET_SP_DEFAULT",
"Profiles": [ "TimerSlackNormal" ]
},
{
"Name": "CPUSET_SP_BACKGROUND",
"Profiles": [ "HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
},
{
"Name": "CPUSET_SP_FOREGROUND",
"Profiles": [ "HighPerformance", "ProcessCapacityHigh", "HighIoPriority", "TimerSlackNormal" ]
},
{
"Name": "CPUSET_SP_TOP_APP",
"Profiles": [ "MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", "TimerSlackNormal" ]
},
{
"Name": "CPUSET_SP_SYSTEM",
"Profiles": [ "ServiceCapacityLow", "TimerSlackNormal" ]
},
{
"Name": "CPUSET_SP_RESTRICTED",
"Profiles": [ "ServiceCapacityRestricted", "TimerSlackNormal" ]
}
]
}

View file

@ -0,0 +1,26 @@
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# mount point fstype device device2 flags
/metadata ext4 /dev/block/bootdevice/by-name/metadata flags=display="Metadata"
/data ext4 /dev/block/bootdevice/by-name/userdata fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption
/boot emmc /dev/block/bootdevice/by-name/boot flags=backup=1;flashimg=1;slotselect
/dtbo emmc /dev/block/bootdevice/by-name/dtbo flags=backup=1;display="Dtbo";flashimg=1;slotselect
/firmware vfat /dev/block/bootdevice/by-name/modem flags=display="Firmware";slotselect;mounttodecrypt;fsflags=ro
/cust ext4 /dev/block/bootdevice/by-name/cust flags=display="Cust"
/misc emmc /dev/block/bootdevice/by-name/misc flags=display="Misc"
/modem emmc /dev/block/bootdevice/by-name/modem flags=backup=1;display="Modem";slotselect
/bluetooth emmc /dev/block/bootdevice/by-name/bluetooth flags=backup=1;subpartitionof=/modem;slotselect
/dsp emmc /dev/block/bootdevice/by-name/dsp flags=backup=1;subpartitionof=/modem;slotselect
/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=EFS
/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1
/efsc emmc /dev/block/bootdevice/by-name/fsc flags=backup=1;subpartitionof=/efs1
/efsg emmc /dev/block/bootdevice/by-name/fsg flags=backup=1;subpartitionof=/efs1
/persist ext4 /dev/block/bootdevice/by-name/persist flags=display="Persist"
/persist_image emmc /dev/block/bootdevice/by-name/persist flags=display="Persist";flashimg=1
# Removable storage
/usbstorage vfat /dev/block/sdg1 /dev/block/sdg flags=fsflags=utf8;display="USB Storage";storage;wipeingui;removable
/external_sd vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0 flags=display="MicroSD";storage;wipeingui;removable

View file

@ -0,0 +1,151 @@
<!--
Input:
manifest.xml
framework_manifest.xml
-->
<manifest version="2.0" type="framework">
<hal format="hidl">
<name>android.frameworks.displayservice</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IDisplayService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IDisplayService/default</fqname>
</hal>
<hal format="hidl">
<name>android.frameworks.schedulerservice</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISchedulingPolicyService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISchedulingPolicyService/default</fqname>
</hal>
<hal format="hidl">
<name>android.frameworks.sensorservice</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISensorManager</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISensorManager/default</fqname>
</hal>
<hal format="hidl">
<name>android.hidl.manager</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>IServiceManager</name>
<instance>default</instance>
</interface>
<fqname>@1.2::IServiceManager/default</fqname>
</hal>
<hal format="hidl">
<name>android.hidl.memory</name>
<transport arch="32+64">passthrough</transport>
<version>1.0</version>
<interface>
<name>IMapper</name>
<instance>ashmem</instance>
</interface>
<fqname>@1.0::IMapper/ashmem</fqname>
</hal>
<hal format="hidl">
<name>android.hidl.token</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ITokenManager</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ITokenManager/default</fqname>
</hal>
<hal format="hidl">
<name>android.system.net.netd</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>INetd</name>
<instance>default</instance>
</interface>
<fqname>@1.1::INetd/default</fqname>
</hal>
<hal format="hidl">
<name>android.system.wifi.keystore</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IKeystore</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IKeystore/default</fqname>
</hal>
<hal format="native">
<name>netutils-wrapper</name>
<version>1.0</version>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qccsyshal</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQccsyshal</name>
<instance>qccsyshal</instance>
</interface>
<fqname>@1.0::IQccsyshal/qccsyshal</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.atcmdfwd</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAtCmdFwd</name>
<instance>AtCmdFwdService</instance>
</interface>
<fqname>@1.0::IAtCmdFwd/AtCmdFwdService</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.sigma_miracast</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>Isigma_miracast</name>
<instance>sigmahal</instance>
</interface>
<fqname>@1.0::Isigma_miracast/sigmahal</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.systemhelper</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISystemEvent</name>
<instance>default</instance>
</interface>
<interface>
<name>ISystemResource</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISystemEvent/default</fqname>
<fqname>@1.0::ISystemResource/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.wifi.keystore</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IKeystoreExt</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IKeystoreExt/default</fqname>
</hal>
<system-sdk>
<version>28</version>
<version>29</version>
<version>30</version>
</system-sdk>
</manifest>

View file

@ -0,0 +1,11 @@
<manifest version="1.0" type="framework">
<hal>
<name>android.hidl.allocator</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAllocator</name>
<instance>ashmem</instance>
</interface>
</hal>
</manifest>

View file

@ -0,0 +1,11 @@
<manifest version="1.0" type="framework">
<hal>
<name>android.system.suspend</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISystemSuspend</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

475
recovery/root/ueventd.rc Normal file
View file

@ -0,0 +1,475 @@
# Copyright (c) 2012-2015, 2017-2020, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Firmware directory Path
# Below macro will be read by uevent and path will
# be added to search path for firmware loading
firmware_directories /vendor/firmware_mnt/image/
# the DIAG device node is not world writable/readable.
/dev/diag 0660 system oem_2901
/dev/mhi_*_pipe_4 0660 system system
/dev/genlock 0666 system system
/dev/wlan 0660 wifi wifi
/dev/kgsl 0666 system system
/dev/kgsl-3d0 0666 system system
/dev/kgsl-2d0 0666 root root
/dev/kgsl-2d1 0666 root root
/dev/ion 0664 system system
/dev/membuf 0664 system system
/dev/rtc0 0660 system system
/dev/smd0 0660 system system
/dev/smd4 0660 system system
/dev/smd_cxm_qmi 0640 radio radio
/dev/smd5 0660 system system
/dev/smd6 0660 system system
/dev/smd7 0660 bluetooth bluetooth
/dev/ccid_bridge 0660 system system
/dev/ipa 0660 radio radio
/dev/wwan_ioctl 0660 radio radio
/dev/ipaNatTable 0660 radio radio
/dev/rmnet_ctrl 0660 usb usb
/dev/dpl_ctrl 0660 usb usb
/dev/ipa_odl_ctl 0660 radio radio
/dev/ipa_adpl 0660 system oem_2905
/dev/synx_device 0660 root camera
/dev/hab 0666 system system
/dev/iio:device* 0664 system system
#permissions for UFS RPMB BSG device node
/dev/0:0:0:49476 0600 system system
#permissions for CSVT
/dev/smd11 0660 radio radio
#permsissions for BT/FM
/dev/smd2 0660 bluetooth bluetooth
/dev/smd3 0660 bluetooth bluetooth
/dev/btpower 0660 bluetooth system
#permissions for pta
/dev/pta 0660 system system
/dev/radio0 0640 system system
/dev/rfcomm0 0660 bluetooth bluetooth
/dev/ttyUSB0 0660 bluetooth bluetooth
/dev/smdcntl0 0640 radio radio
/dev/smdcntl1 0640 radio radio
/dev/smdcntl2 0640 radio radio
/dev/smdcntl3 0640 radio radio
/dev/smdcntl4 0640 radio radio
/dev/smdcntl5 0640 radio radio
/dev/smdcntl6 0640 radio radio
/dev/smdcntl7 0640 radio radio
/dev/smdcntl8 0640 radio radio
/dev/smdcnt_rev0 0640 radio radio
/dev/smdcnt_rev1 0640 radio radio
/dev/smdcnt_rev2 0640 radio radio
/dev/smdcnt_rev3 0640 radio radio
/dev/smdcnt_rev4 0640 radio radio
/dev/smdcnt_rev5 0640 radio radio
/dev/smdcnt_rev6 0640 radio radio
/dev/smdcnt_rev7 0640 radio radio
/dev/smdcnt_rev8 0640 radio radio
/dev/smuxctl32 0640 radio radio
/dev/sdioctl0 0640 radio radio
/dev/sdioctl1 0640 radio radio
/dev/sdioctl2 0640 radio radio
/dev/sdioctl3 0640 radio radio
/dev/sdioctl4 0640 radio radio
/dev/sdioctl5 0640 radio radio
/dev/sdioctl6 0640 radio radio
/dev/sdioctl7 0640 radio radio
/dev/sdioctl8 0640 radio radio
/dev/rmnet_mux_ctrl 0640 radio radio
/dev/hsicctl0 0640 radio radio
/dev/hsicctl1 0640 radio radio
/dev/hsicctl2 0640 radio radio
/dev/hsicctl3 0640 radio radio
/dev/hsicctl4 0640 radio radio
/dev/hsicctl5 0640 radio radio
/dev/hsicctl6 0640 radio radio
/dev/hsicctl7 0640 radio radio
/dev/hsicctl8 0640 radio radio
/dev/hsicctl9 0640 radio radio
/dev/hsicctl10 0640 radio radio
/dev/hsicctl11 0640 radio radio
/dev/hsicctl12 0640 radio radio
/dev/hsicctl13 0640 radio radio
/dev/hsicctl14 0640 radio radio
/dev/hsicctl15 0640 radio radio
/dev/hsicctl16 0640 radio radio
/dev/mhi_*_pipe_14 0640 radio radio
/dev/mhi_*_pipe_16 0640 radio radio
/dev/mhi_*_pipe_32 0640 radio radio
/dev/at_usb0 0640 radio radio
/dev/at_mdm0 0640 radio radio
/dev/video* 0660 system camera
/dev/cvp* 0660 system camera
/dev/media* 0660 system camera
/dev/v4l-subdev* 0660 system camera
/dev/qseecom 0660 system drmrpc
/dev/qce 0660 system drmrpc
/dev/smcinvoke 0660 system drmrpc
/dev/qsee_ipc_irq_spss 0660 system drmrpc
/dev/seemplog 0660 system system
/dev/pft 0660 system drmrpc
/dev/spcom 0660 system system
/dev/spss_utils 0660 system system
/dev/sp_kernel 0660 system system
/dev/sp_nvm 0660 system system
/dev/sp_ssr 0660 system system
/dev/sp_keymaster 0660 system system
/dev/sp_keymaster_ssr 0660 system system
/dev/sec_nvm_* 0660 system system
/dev/cryptoapp 0660 system system
/dev/spdaemon_ssr 0660 system system
/dev/spu_hal_ssr 0660 system system
/dev/iuicc* 0660 system system
/dev/gemini0 0660 system camera
/dev/jpeg0 0660 system camera
/dev/jpeg1 0660 system camera
/dev/jpeg2 0660 system camera
/dev/jpeg3 0660 system camera
/dev/adsprpc-smd 0664 system system
/dev/adsprpc-smd-secure 0644 system system
/dev/system_health_monitor 0644 radio system
/dev/mdss_rotator 0664 system system
#QDSS
/dev/byte-cntr 0660 system oem_2902
/dev/mhi_qdss 0660 system oem_2902
/sys/class/qdss_bridge/mhi_qdss mode 0660 system oem_2902
#qg
/dev/qg 0660 system system
/dev/qg_battery 0660 system system
#qvr
/dev/qvr_external_sensor_ioctl 0660 system system
/sys/kernel/qvr_external_sensor/fd 0660 system system
# wlan
/dev/wcnss_wlan 0660 system system
/dev/wcnss_ctrl 0660 system system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
/sys/devices/platform/soc/18800000.qcom,icnss/net/wlan*/queues/rx-* rps_cpus 0660 system system
/sys/devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan*/queues/rx-* rps_cpus 0660 system system
/dev/spidev0.0 0660 system audio
/dev/i2c-7 0660 system audio
/dev/msm_camera/* 0660 system camera
/dev/gemini/ 0660 system camera
/dev/mercury0 0660 system camera
/dev/msm_vidc_reg 0660 system audio
/dev/msm_vidc_dec 0660 system audio
/dev/msm_vidc_dec_sec 0660 system audio
/dev/msm_vidc_enc 0660 system audio
/dev/msm_rotator 0660 system system
/dev/hw_random 0600 root root
/dev/sdsprpc-smd 0660 system system
#permissions for audio
/dev/wcd_dsp0_control 0660 system audio
/dev/wcd-dsp-glink 0660 system audio
/dev/audio_slimslave 0660 system audio
/dev/msm_qcelp 0660 system audio
/dev/msm_evrc 0660 system audio
/dev/msm_wma 0660 system audio
/dev/msm_wmapro 0660 system audio
/dev/msm_alac 0660 system audio
/dev/msm_ape 0660 system audio
/dev/msm_amrnb 0660 system audio
/dev/msm_amrwb 0660 system audio
/dev/msm_amrwbplus 0660 system audio
/dev/msm_aac 0660 system audio
/dev/msm_multi_aac 0660 system audio
/dev/msm_aac_in 0660 system audio
/dev/msm_qcelp_in 0660 system audio
/dev/msm_evrc_in 0660 system audio
/dev/msm_amrnb_in 0660 system audio
/dev/msm_amrwb_in 0660 system audio
/dev/msm_a2dp_in 0660 system audio
/dev/msm_ac3 0660 system audio
/dev/msm_audio_cal 0660 system audio
/dev/msm_hweffects 0660 system audio
/dev/msm_cad 0660 system audio
/dev/msm_fm 0660 system audio
/dev/msm_mvs 0660 system audio
/dev/msm_pcm_lp_dec 0660 system audio
/dev/msm_preproc_ctl 0660 system audio
/dev/msm_rtac 0660 system audio
/dev/msm_voicememo 0660 system audio
/dev/ttyHSL1 0660 system system
/dev/ttyHS1 0660 system system
/dev/mdm 0660 system radio
/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
/dev/sdio_tty_ciq_00 0660 system system
/dev/tty_sdio_00 0660 system system
/dev/ttyGS0 0660 system system
/dev/i2c-5 0660 media media
/dev/avtimer 0660 system audio
/dev/spidev2.0 0660 system audio
/dev/spidev22.0 0660 system audio
# DVB devices
/dev/dvb/adapter0/demux* 0440 media media
/dev/dvb/adapter0/dvr* 0660 media media
/dev/dvb/adapter0/video* 0660 media media
# Broadcast devices
/dev/tsc_mux0 0660 media media
/dev/tsc_ci0 0660 media media
# sensors
/dev/sensors 0660 system system
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable 0660 input system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* max_latency 0660 input system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* flush 0660 input system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibrate 0660 input system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system
/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
/sys/devices/virtual/input/input* poll 0660 input system
/sys/devices/virtual/input/input* pollrate_ms 0660 input system
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch 0440 system drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch 0440 system drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
# GNSS Device premissions
/dev/gnss_sirf 0660 gps gps
# laser sensor access
/sys/devices/virtual/input/input* enable_ps_sensor 0660 system input
/sys/devices/virtual/input/input* set_delay_ms 0660 system input
/sys/devices/virtual/input/input* do_flush 0660 system input
# vm_bms
/dev/vm_bms 0660 system system
/dev/battery_data 0660 system system
# wlan
/dev/wcnss_wlan 0660 system system
/dev/wcnss_ctrl 0660 system system
/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0/queues/rx-* rps_cpus 0660 system system
/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/p2p0/queues/rx-* rps_cpus 0660 system system
# wigig
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/snr_thresh 0660 wifi wifi
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system
#nfc permissions
/dev/nfc-nci 0660 nfc nfc
/dev/nq-nci 0660 nfc nfc
/dev/assd 0660 nfc nfc
# UIO devices
/dev/uio0 0660 system system
/dev/uio1 0660 system system
/dev/uio2 0660 system system
# SSR devices
/dev/subsys_* 0640 system system
# Ultrasound device
/dev/usf1 0660 system system
# Ramdump devices
/dev/ramdump* 0640 system system
# Fingerprint device
/dev/qbt* 0660 system system
/sys/class/fts/touch_aoi aoi_set 0660 root system
/sys/class/fts/touch_aoi power_set 0660 root system
#ImproveTouch device
/dev/hbtp_input 0660 system system
/dev/hbtp_vm 0660 system system
# Add device block for FRP
/dev/block/platform/soc/7824900.sdhci/by-name/config 0600 system system
/dev/block/platform/soc/7464900.sdhci/by-name/frp 0600 system system
/dev/block/platform/soc/624000.ufshc/by-name/frp 0600 system system
/dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system
/dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system
/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system
/dev/block/platform/soc/7c4000.sdhci/by-name/frp 0600 system system
/dev/block/platform/soc/4744000.sdhci/by-name/frp 0600 system system
/dev/block/platform/soc/4804000.ufshc/by-name/frp 0600 system system
# This is temporary while using SD card for initial bring-up
/dev/block/platform/soc/8804000.sdhci/by-name/frp 0600 system system
# Kmsg device
/dev/kmsg 0620 root system
# LED class devices
/sys/class/leds/red delay_on 0640 system system
/sys/class/leds/red delay_off 0640 system system
/sys/class/leds/red breath 0640 system system
/sys/class/leds/red trigger 0640 system system
/sys/class/leds/green delay_on 0640 system system
/sys/class/leds/green delay_off 0640 system system
/sys/class/leds/green breath 0640 system system
/sys/class/leds/green trigger 0640 system system
/sys/class/leds/blue delay_on 0640 system system
/sys/class/leds/blue delay_off 0640 system system
/sys/class/leds/blue breath 0640 system system
/sys/class/leds/blue trigger 0640 system system
# NPU device
/dev/msm_npu 0644 system system
# USB role switch
/sys/class/dual_role_usb/* data_role 0660 system system
/sys/class/dual_role_usb/* power_role 0660 system system
/sys/class/dual_role_usb/* mode 0660 system system
#Memory Offline
/sys/devices/system/memory/memory* state 0660 system system
/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
# sys-fs display
/sys/class/graphics/fb* hpd 0664 system graphics
/sys/class/graphics/fb* res_info 0664 system graphics
/sys/class/graphics/fb* vendor_name 0664 system graphics
/sys/class/graphics/fb* product_description 0664 system graphics
/sys/class/graphics/fb* video_mode 0664 system graphics
/sys/class/graphics/fb* format_3d 0664 system graphics
/sys/class/graphics/fb* s3d_mode 0664 system graphics
/sys/class/graphics/fb* dynamic_fps 0664 system graphics
/sys/class/graphics/fb* msm_fb_dfps_mode 0664 system graphics
/sys/class/graphics/fb* hdr_stream 0664 system graphics
/sys/class/graphics/fb* cec/enable 0664 system graphics
/sys/class/graphics/fb* cec/logical_addr 0664 system graphics
/sys/class/graphics/fb* cec/rd_msg 0664 system graphics
/sys/class/graphics/fb* pa 0664 system graphics
/sys/class/graphics/fb* cec/wr_msg 0600 system graphics
/sys/class/graphics/fb* hdcp/tp 0664 system graphics
/sys/class/graphics/fb* hdcp2p2/min_level_change 0660 system graphics
/sys/class/graphics/fb* hdmi_audio_cb 0600 audioserver audio
/sys/class/graphics/fb* lineptr_value 0664 system graphics
/sys/class/graphics/fb* msm_fb_persist_mode 0664 system graphics
/sys/class/graphics/fb0 idle_time 0664 system graphics
/sys/class/graphics/fb0 dynamic_fps 0664 system graphics
/sys/class/graphics/fb0 dyn_pu 0664 system graphics
/sys/class/graphics/fb0 modes 0664 system graphics
/sys/class/graphics/fb0 mode 0664 system graphics
/sys/class/graphics/fb0 msm_cmd_autorefresh_en 0664 system graphics
*/
/sys/devices/platform/soc/ae00000.qcom,mdss_mdp power/control 0664 system graphics
#asm330 sensor
#common sensors files
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* buffer/enable 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* buffer/length 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* buffer/watermark 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* discharded_samples 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* current_timestamp_clock 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* hwfifo_flush 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* hwfifo_watermark 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* hwfifo_watermark_max 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* mount_matrix 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* name 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* sampling_frequency 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* sampling_frequency_available 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_timestamp_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_timestamp_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_timestamp_type 0664 system system
# standard iio accel attributes
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_scale_available 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_x_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_x_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_y_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_y_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_z_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_accel_z_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_x_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_x_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_x_type 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_y_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_y_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_y_type 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_z_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_z_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_accel_z_type 0664 system system
# standard iio gyro attributes
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_scale_available 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_x_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_x_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_y_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_y_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_z_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_anglvel_z_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_x_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_x_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_x_type 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_y_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_y_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_y_type 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_z_en 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_z_index 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* scan_elements/in_anglvel_z_type 0664 system system
# standard iio temp attributes
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_offset 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_scale_available 0664 system system

View file

@ -0,0 +1,564 @@
<!--
Input:
manifest_lahaina.xml
-->
<manifest version="2.0" type="device" target-level="5">
<hal format="hidl">
<name>android.hardware.audio</name>
<transport>hwbinder</transport>
<version>6.0</version>
<interface>
<name>IDevicesFactory</name>
<instance>default</instance>
</interface>
<fqname>@6.0::IDevicesFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.audio.effect</name>
<transport>hwbinder</transport>
<version>6.0</version>
<interface>
<name>IEffectsFactory</name>
<instance>default</instance>
</interface>
<fqname>@6.0::IEffectsFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IBluetoothHci</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IBluetoothHci/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.bluetooth.audio</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IBluetoothAudioProvidersFactory</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IBluetoothAudioProvidersFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.camera.provider</name>
<transport>hwbinder</transport>
<version>2.4</version>
<interface>
<name>ICameraProvider</name>
<instance>legacy/0</instance>
</interface>
<fqname>@2.4::ICameraProvider/legacy/0</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.drm</name>
<transport>hwbinder</transport>
<fqname>@1.3::ICryptoFactory/wfdhdcp</fqname>
<fqname>@1.3::IDrmFactory/wfdhdcp</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.gatekeeper</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGatekeeper</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IGatekeeper/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.keymaster</name>
<transport>hwbinder</transport>
<fqname>@4.1::IKeymasterDevice/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.media.omx</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOmx</name>
<instance>default</instance>
</interface>
<interface>
<name>IOmxStore</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IOmx/default</fqname>
<fqname>@1.0::IOmxStore/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.memtrack</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IMemtrack</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IMemtrack/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.radio.config</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IRadioConfig</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IRadioConfig/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.soundtrigger</name>
<transport>hwbinder</transport>
<version>2.3</version>
<interface>
<name>ISoundTriggerHw</name>
<instance>default</instance>
</interface>
<fqname>@2.3::ISoundTriggerHw/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.tetheroffload.config</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOffloadConfig</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IOffloadConfig/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.tetheroffload.control</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOffloadControl</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IOffloadControl/default</fqname>
</hal>
<hal format="hidl">
<name>com.qualcomm.qti.dpm.api</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IdpmQmi</name>
<instance>dpmQmiService</instance>
</interface>
<fqname>@1.0::IdpmQmi/dpmQmiService</fqname>
</hal>
<hal format="hidl">
<name>com.qualcomm.qti.imscmservice</name>
<transport>hwbinder</transport>
<version>2.2</version>
<interface>
<name>IImsCmService</name>
<instance>qti.ims.connectionmanagerservice</instance>
</interface>
<fqname>@2.2::IImsCmService/qti.ims.connectionmanagerservice</fqname>
</hal>
<hal format="hidl">
<name>com.qualcomm.qti.uceservice</name>
<transport>hwbinder</transport>
<version>2.2</version>
<interface>
<name>IUceService</name>
<instance>com.qualcomm.qti.uceservice</instance>
</interface>
<fqname>@2.2::IUceService/com.qualcomm.qti.uceservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.data.factory</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IFactory</name>
<instance>default</instance>
</interface>
<fqname>@2.1::IFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.esepowermanager</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEsePowerManager</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IEsePowerManager/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.alarm</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAlarm</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IAlarm/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.bluetooth_audio</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IBluetoothAudioProvidersFactory</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IBluetoothAudioProvidersFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.bluetooth_sar</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IBluetoothSar</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IBluetoothSar/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.btconfigstore</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IBTConfigStore</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IBTConfigStore/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.cacert</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IService/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.camera.postproc</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IPostProcService</name>
<instance>camerapostprocservice</instance>
</interface>
<fqname>@1.0::IPostProcService/camerapostprocservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.capabilityconfigstore</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ICapabilityConfigStore</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ICapabilityConfigStore/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.data.latency</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ILinkLatency</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ILinkLatency/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.dsp</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IDspService</name>
<instance>dspservice</instance>
</interface>
<fqname>@1.0::IDspService/dspservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.eid</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IEid</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IEid/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.embmssl</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEmbms</name>
<instance>embmsslServer0</instance>
</interface>
<fqname>@1.1::IEmbms/embmsslServer0</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.factory</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IFactory</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.fstman</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IFstManager</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IFstManager/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.iop</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IIop</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IIop/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.perf</name>
<transport>hwbinder</transport>
<version>2.2</version>
<interface>
<name>IPerf</name>
<instance>default</instance>
</interface>
<fqname>@2.2::IPerf/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qccvndhal</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQccvndhal</name>
<instance>qccvndhal</instance>
</interface>
<fqname>@1.0::IQccvndhal/qccvndhal</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qconfig</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQConfig</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IQConfig/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qseecom</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQSEECom</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IQSEECom/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qteeconnector</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAppConnector</name>
<instance>default</instance>
</interface>
<interface>
<name>IGPAppConnector</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IAppConnector/default</fqname>
<fqname>@1.0::IGPAppConnector/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.internal.deviceinfo</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IDeviceInfo</name>
<instance>deviceinfo</instance>
</interface>
<fqname>@1.0::IDeviceInfo/deviceinfo</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.secureprocessor.device</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISecureProcessor</name>
<instance>qti-tee</instance>
</interface>
<fqname>@1.0::ISecureProcessor/qti-tee</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.sensorscalibrate</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISensorsCalibrate</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISensorsCalibrate/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.soter</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISoter</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISoter/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.trustedui</name>
<transport>hwbinder</transport>
<fqname>@1.0::ITrustedInput/default</fqname>
<fqname>@1.0::ITrustedInput/qtee-vm</fqname>
<fqname>@1.1::ITrustedUI/default</fqname>
<fqname>@1.1::ITrustedUI/qtee-vm</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.tui_comm</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ITuiComm</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ITuiComm/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.vpp</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IHidlVppService</name>
<instance>vppService</instance>
</interface>
<fqname>@2.0::IHidlVppService/vppService</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.wifi.wifilearner</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IWifiStats</name>
<instance>wifiStats</instance>
</interface>
<fqname>@1.0::IWifiStats/wifiStats</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.wifidisplaysession</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IWifiDisplaySession</name>
<instance>wifidisplaysession</instance>
</interface>
<interface>
<name>IWifiDisplaySessionAudioTrack</name>
<instance>wifidisplaysessionaudiotrack</instance>
</interface>
<interface>
<name>IWifiDisplaySessionImageTrack</name>
<instance>wifidisplaysessionimagetrack</instance>
</interface>
<interface>
<name>IWifiDisplaySessionVideoTrack</name>
<instance>wifidisplaysessionvideotrack</instance>
</interface>
<fqname>@1.0::IWifiDisplaySession/wifidisplaysession</fqname>
<fqname>@1.0::IWifiDisplaySessionAudioTrack/wifidisplaysessionaudiotrack</fqname>
<fqname>@1.0::IWifiDisplaySessionImageTrack/wifidisplaysessionimagetrack</fqname>
<fqname>@1.0::IWifiDisplaySessionVideoTrack/wifidisplaysessionvideotrack</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.ims.callinfo</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IService/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.ims.factory</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IImsFactory</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IImsFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.imsrtpservice</name>
<transport>hwbinder</transport>
<version>3.0</version>
<interface>
<name>IRTPService</name>
<instance>imsrtpservice</instance>
</interface>
<fqname>@3.0::IRTPService/imsrtpservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.qspmhal</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQspmhal</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IQspmhal/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.sla.service</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISlaService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISlaService/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.xiaomi.hardware.campostproc</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IMiPostProcService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IMiPostProcService/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.xiaomi.hardware.displayfeature</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IDisplayFeature</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IDisplayFeature/default</fqname>
</hal>
<sepolicy>
<version>30.0</version>
</sepolicy>
<kernel target-level="5"/>
</manifest>

View file

@ -0,0 +1,7 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.boot</name>
<transport>hwbinder</transport>
<fqname>@1.1::IBootControl/default</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,7 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.health</name>
<transport>hwbinder</transport>
<fqname>@2.1::IHealth/default</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,39 @@
<!-- Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.usb</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>IUsb</name>
<instance>default</instance>
</interface>
<fqname>@1.2::IUsb/default</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.drm</name>
<transport>hwbinder</transport>
<fqname>@1.3::ICryptoFactory/clearkey</fqname>
<fqname>@1.3::IDrmFactory/clearkey</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.drm</name>
<transport>hwbinder</transport>
<fqname>@1.3::ICryptoFactory/widevine</fqname>
<fqname>@1.3::IDrmFactory/widevine</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,33 @@
<!-- Copyright (c) 2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.power</name>
<fqname>IPower/default</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,33 @@
<!-- Copyright (c) 2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.vibrator</name>
<fqname>IVibrator/default</fqname>
</hal>
</manifest>

View file

@ -0,0 +1,11 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>vendor.xiaomi.hw.touchfeature</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ITouchFeature</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
recovery/root/vendor/lib64/libdiag.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libdrm.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libdrmfs.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libdrmtime.so vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
recovery/root/vendor/lib64/libops.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libqcbor.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libqdutils.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libqisl.so vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
recovery/root/vendor/lib64/librpmb.so vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
recovery/root/vendor/lib64/libspcom.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libspl.so vendored Normal file

Binary file not shown.

BIN
recovery/root/vendor/lib64/libssd.so vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

61
system.prop Normal file
View file

@ -0,0 +1,61 @@
# Audio
audio.offload.min.duration.secs=30
persist.vendor.audio.hac.enable=false
persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24
# Bluetooth
ro.bluetooth.library_name=libbluetooth_qti.so
# Camera
camera.disable_zsl_mode=true
# Charger
ro.charger.disable_init_blank=true
# Display
debug.gralloc.gfx_ubwc_disable=0
debug.sf.enable_hwc_vds=1
debug.sf.latch_unsignaled=1
persist.vendor.color.matrix=2
# CNE
persist.vendor.cne.feature=1
# DPM
persist.vendor.dpm.feature=11
# IMS
persist.dbg.volte_avail_ovr=1
persist.dbg.vt_avail_ovr=1
persist.dbg.wfc_avail_ovr=1
# IOP
vendor.iop.enable_prefetch_ofr=1
vendor.iop.enable_uxe=0
# Media
media.settings.xml=/vendor/etc/media_profiles_vendor.xml
# Perf
ro.vendor.qti.core_ctl_max_cpu=4
ro.vendor.qti.core_ctl_min_cpu=2
# Radio
ro.telephony.default_network=33,33
# Touchscreen
persist.vendor.qti.inputopts.enable=true
persist.vendor.qti.inputopts.movetouchslop=0.6
# Netmgr
persist.vendor.data.iwlan.enable=true
persist.vendor.data.mode=concurrent
# SSR
persist.vendor.ssr.restart_level=ALL_ENABLE
# Vendor
ro.vendor.qti.va_aosp.support=1
# Zygote
persist.device_config.runtime_native.usap_pool_enabled=true

14
twrp.dependencies Normal file
View file

@ -0,0 +1,14 @@
[
{
"repository" : "android_device_qcom_twrp-common",
"target_path" : "device/qcom/twrp-common",
"remote" : "TeamWin",
"revision" : "android-11"
},
{
"repository" : "android_hardware_qcom_bootctrl",
"target_path" : "hardware/qcom-caf/bootctrl",
"remote" : "LineageOS",
"revision" : "lineage-18.1-caf"
}
]

32
twrp_renoir.mk Normal file
View file

@ -0,0 +1,32 @@
#
# Copyright (C) 2021 The TWRP Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
# Inherit from renoir device
$(call inherit-product, device/xiaomi/renoir/device.mk)
# Inherit some common TWRP stuff.
$(call inherit-product, vendor/twrp/config/common.mk)
# Device identifier. This must come after all inclusions
PRODUCT_DEVICE := renoir
PRODUCT_NAME := twrp_renoir
PRODUCT_BRAND := Xiaomi
PRODUCT_MODEL := Mi 11 Lite 5G
PRODUCT_MANUFACTURER := Xiaomi

246
vendor.prop Normal file
View file

@ -0,0 +1,246 @@
# Audio
aaudio.hw_burst_min_usec=2000
aaudio.mmap_exclusive_policy=2
aaudio.mmap_policy=2
audio.deep_buffer.media=true
audio.offload.video=false
persist.audio.fluence.voicecomm=true
persist.vendor.audio.ambisonic.auto.profile=false
persist.vendor.audio.ambisonic.capture=false
persist.vendor.audio.apptype.multirec.enabled=false
persist.vendor.audio.avs.afe_api_version=9
persist.vendor.audio.bcl.enabled=false
persist.vendor.audio.fluence.speaker=true
persist.vendor.audio.fluence.tmic.enabled=false
persist.vendor.audio.fluence.voicecall=true
persist.vendor.audio.fluence.voicerec=true
persist.vendor.audio.ha_proxy.enabled=true
persist.vendor.audio.ras.enabled=false
persist.vendor.audio.speaker.prot.enable=false
persist.vendor.audio.spv4.enable=false
persist.vendor.audio.vbat.enabled=false
persist.vendor.audio.voicecall.speaker.stereo=true
persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24
ro.audio.monitorRotation=true
ro.config.media_vol_steps=30
ro.vendor.audio.sdk.fluencetype=fluence
ro.vendor.audio.sdk.ssr=false
ro.vendor.dolby.dax.version=DAX3_3.5.6.11_r1
vendor.audio.adm.buffering.ms=2
vendor.audio.dolby.ds2.enabled=false
vendor.audio.dolby.ds2.hardbypass=false
vendor.audio.dtmf.volume=35
vendor.audio.enable.mirrorlink=false
vendor.audio.feature.a2dp_offload.enable=true
vendor.audio.feature.afe_proxy.enable=true
vendor.audio.feature.anc_headset.enable=false
vendor.audio.feature.audiozoom.enable=false
vendor.audio.feature.battery_listener.enable=true
vendor.audio.feature.compr_cap.enable=false
vendor.audio.feature.compr_voip.enable=false
vendor.audio.feature.compress_in.enable=true
vendor.audio.feature.compress_meta_data.enable=true
vendor.audio.feature.concurrent_capture.enable=true
vendor.audio.feature.custom_stereo.enable=true
vendor.audio.feature.deepbuffer_as_primary.enable=false
vendor.audio.feature.display_port.enable=true
vendor.audio.feature.dsm_feedback.enable=false
vendor.audio.feature.dynamic_ecns.enable=true
vendor.audio.feature.ext_hw_plugin.enable=false
vendor.audio.feature.external_dsp.enable=false
vendor.audio.feature.external_speaker.enable=false
vendor.audio.feature.external_speaker_tfa.enable=false
vendor.audio.feature.fluence.enable=true
vendor.audio.feature.fm.enable=true
vendor.audio.feature.hdmi_edid.enable=true
vendor.audio.feature.hdmi_passthrough.enable=true
vendor.audio.feature.hfp.enable=true
vendor.audio.feature.hifi_audio.enable=false
vendor.audio.feature.hwdep_cal.enable=false
vendor.audio.feature.incall_music.enable=true
vendor.audio.feature.keep_alive.enable=true
vendor.audio.feature.kpi_optimize.enable=true
vendor.audio.feature.maxx_audio.enable=false
vendor.audio.feature.multi_voice_session.enable=true
vendor.audio.feature.power_mode.enable=true
vendor.audio.feature.ras.enable=true
vendor.audio.feature.record_play_concurency.enable=false
vendor.audio.feature.snd_mon.enable=true
vendor.audio.feature.spkr_prot.enable=false
vendor.audio.feature.src_trkn.enable=true
vendor.audio.feature.ssrec.enable=true
vendor.audio.feature.usb_offload.enable=true
vendor.audio.feature.usb_offload_burst_mode.enable=true
vendor.audio.feature.usb_offload_sidetone_volume.enable=false
vendor.audio.feature.vbat.enable=true
vendor.audio.feature.wsa.enable=false
vendor.audio.flac.sw.decoder.24bit=true
vendor.audio.hal.boot.timeout.ms=20000
vendor.audio.hal.output.suspend.supported=false
vendor.audio.hw.aac.encoder=true
vendor.audio.offload.buffer.size.kb=32
vendor.audio.offload.gapless.enabled=true
vendor.audio.offload.multiaac.enable=true
vendor.audio.offload.multiple.enabled=false
vendor.audio.offload.passthrough=false
vendor.audio.offload.track.enable=true
vendor.audio.parser.ip.buffer.size=262144
vendor.audio.safx.pbe.enabled=false
vendor.audio.tunnel.encode=false
vendor.audio.use.sw.alac.decoder=true
vendor.audio.use.sw.ape.decoder=true
vendor.audio.use.sw.mpegh.decoder=true
vendor.audio.volume.headset.gain.depcal=true
vendor.audio_hal.in_period_size=144
vendor.audio_hal.period_multiplier=3
vendor.audio_hal.period_size=192
vendor.voice.path.for.pcm.voip=true
# Bluetooth
persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-lc3
persist.bluetooth.a2dp_offload.disabled=false
persist.sys.fflag.override.settings_bluetooth_hearing_aid=true
persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac
persist.vendor.bt.aac_frm_ctl.enabled=true
persist.vendor.bt.aac_vbr_frm_ctl.enabled=true
persist.vendor.oneplus.bt.asd.chain=0
persist.vendor.oneplus.bt.asd.firmware=false
persist.vendor.qcom.bluetooth.a2dp_mcast_test.enabled=false
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptiver2
persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true
persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=true
persist.vendor.qcom.bluetooth.enable.splita2dp=true
persist.vendor.qcom.bluetooth.scram.enabled=false
persist.vendor.qcom.bluetooth.soc=hastings
persist.vendor.qcom.bluetooth.twsp_state.enabled=false
ro.bluetooth.a2dp_offload.supported=true
ro.vendor.bluetooth.wipower=false
vendor.qcom.bluetooth.soc=hastings
# Camera
persist.vendor.camera.privapp.list=com.oneplus.camera,com.oem.autotest,com.oneplus.factorymode
vendor.arcsoft.sn_isHardCopy=0
vendor.camera.algo.jpeghwencode=1
vendor.camera.aux.packagelist=com.oem.autotest,com.oneplus.factorymode,com.oneplus.camera,com.oneplus.healthcheck
# Crypto
ro.crypto.allow_encrypt_override=true
ro.crypto.dm_default_key.options_format.version=2
ro.crypto.volume.filenames_mode=aes-256-cts
ro.crypto.volume.metadata.method=dm-default-key
# Display
ro.vendor.display.sensortype=2
vendor.display.comp_mask=0
vendor.display.disable_excl_rect=0
vendor.display.disable_excl_rect_partial_fb=1
vendor.display.disable_hw_recovery_dump=1
vendor.display.disable_offline_rotator=1
vendor.display.disable_scaler=0
vendor.display.enable_async_powermode=0
vendor.display.enable_early_wakeup=1
vendor.display.enable_optimize_refresh=1
vendor.display.enable_posted_start_dyn=1
vendor.display.use_layer_ext=1
vendor.display.use_smooth_motion=1
# DRM
drm.service.enabled=true
# Fingerprint
persist.vendor.qfp=true
# FRP
ro.frp.pst=/dev/block/bootdevice/by-name/frp
# Gatekeeper
vendor.gatekeeper.disable_spu=true
# GPS
persist.backup.ntpServer=0.pool.ntp.org
# Graphics
debug.egl.hw=0
debug.mdpcomp.logs=0
debug.sf.enable_advanced_sf_phase_offset=1
debug.sf.enable_gl_backpressure=1
debug.sf.high_fps_early_gl_phase_offset_ns=-4000000
debug.sf.high_fps_early_phase_offset_ns=-4000000
debug.sf.high_fps_late_app_phase_offset_ns=1000000
debug.sf.high_fps_late_sf_phase_offset_ns=-4000000
debug.sf.hw=0
debug.sf.latch_unsignaled=1
persist.demo.hdmirotationlock=false
persist.sys.sf.color_mode=0
persist.sys.sf.color_saturation=1.0
persist.sys.sf.native_mode=0
ro.gfx.driver.0=com.oneplus.gpudrivers.lahaina.api30
ro.gfx.driver.1=com.qualcomm.qti.gpudrivers.lahaina.api30
ro.hardware.egl=adreno
ro.hardware.vulkan=adreno
ro.opengles.version=196610
vendor.gralloc.disable_ubwc=0
# Incremental FS
ro.incremental.enable=true
# Keystore
ro.hardware.keystore_desede=true
# Media
debug.stagefright.ccodec=4
debug.stagefright.omx_default_rank=0
# NFC
ro.camera.notify_nfc=1
# OTG
persist.sys.oem.otg_support=true
# PASR
vendor.power.pasr.enabled=false
# Perf
ro.vendor.extension_library=libqti-perfd-client.so
# Qualcomm System Daemon
persist.vendor.qcomsysd.enabled=1
# Radio
persist.radio.snapshot_enabled=0
persist.radio.snapshot_timer=0
persist.rcs.otp_sms_port=0
persist.rcs.supported=1
persist.vendor.data.iwlan.enable=true
persist.vendor.radio.5g_mode_pref=1
persist.vendor.radio.apm_sim_not_pwdn=1
persist.vendor.radio.arfcn_test_mode=3
persist.vendor.radio.bar_fake_gcell=1
persist.vendor.radio.custom_ecc=1
persist.vendor.radio.data_con_rprt=1
persist.vendor.radio.data_ltd_sys_ind=1
persist.vendor.radio.efssync=true
persist.vendor.radio.enableadvancedscan=true
persist.vendor.radio.force_on_dc=true
persist.vendor.radio.ignore_dom_time=10
persist.vendor.radio.procedure_bytes=SKIP
persist.vendor.radio.process_sups_ind=1
persist.vendor.radio.rat_on=combine
persist.vendor.radio.sib16_support=1
persist.vendor.radio.uicc_se_enabled=true
ro.com.android.dataroaming=false
# Sensors
persist.vendor.sensors.allow_non_default_discovery=true
persist.vendor.sensors.on_change_sample_period=true
persist.vendor.sensors.sync_request=true
# Shutdown
sys.vendor.shutdown.waittime=500
# USB
vendor.usb.diag.func.name=ffs
vendor.usb.use_ffs_mtp=1
# WiFi
wifi.aware.interface=wifi-aware0