zenfone7: Import sm8250-common repo stuff

Several things about that:
 *Rog3 no longer supported because i don't have this device anymore.
 *I don't think someone will support it.
 *Asus Have droppped the unlocked bootloader support so ....

Enjoy of device's stuff ^_^

Change-Id: I91df9c78557fb4bd229d60ec4b693161614a23c5
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/Android.bp b/Android.bp
index 9515b25..4443de2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,2 +1,45 @@
 soong_namespace {
+    imports: ["hardware/qcom/bootctrl"],
+}
+
+prebuilt_hidl_interfaces {
+    name: "hidl_netperftuner_interface",
+    interfaces: [
+        "vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner",
+    ],
+}
+
+prebuilt_hidl_interfaces {
+    name: "hidl_asus_bspcam_interface",
+    interfaces: [
+        "vendor.asus.bspcam@1.0::IAsusBspCameraInterface",
+    ],
+}
+
+install_symlink {
+    name: "firmware_wlan_mac.bin_symlink",
+    vendor: true,
+    installed_location: "firmware/wlan/qca_cld/wlan_mac.bin",
+    symlink_target: "/mnt/vendor/persist/wlan_mac.bin",
+}
+
+install_symlink {
+    name: "firmware_WCNSS_qcom_cfg.ini_symlink",
+    vendor: true,
+    installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini",
+    symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini",
+}
+
+install_symlink {
+    name: "mnt_point_asusfw_symlink",
+    vendor: true,
+    installed_location: "asusfw",
+    symlink_target: "/mnt/vendor/asusfw",
+}
+
+install_symlink {
+    name: "mnt_point_factory_symlink",
+    vendor: true,
+    installed_location: "factory",
+    symlink_target: "/mnt/vendor/persist",
 }
diff --git a/BoardConfig.mk b/BoardConfig.mk
index a856dc9..8cf9062 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -18,29 +18,105 @@
 # device-specific aspects (drivers) with a device-agnostic
 # product configuration (apps).
 #
-
-# Inherit from asus sm8250-common
--include device/asus/sm8250-common/BoardConfigCommon.mk
-
 DEVICE_PATH := device/asus/zenfone7
 
+BOARD_VENDOR := asus
+
+# Architecture
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-2a-dotprod
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := cortex-a76
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-a
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := cortex-a76
+
+ENABLE_CPUSETS := true
+ENABLE_SCHEDBOOST := true
+
+# ANT+
+BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
+
+# Audio
+USE_XML_AUDIO_POLICY_CONF := 1
+
+# AVB
+BOARD_AVB_ENABLE := true
+BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
+BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2
+BOARD_AVB_VBMETA_SYSTEM := system
+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
+
 # Bluetooth
 BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth
 
+# Bootloader
+TARGET_NO_BOOTLOADER := true
+
+# Broken flags
+BUILD_BROKEN_ENFORCE_SYSPROP_OWNER := true
+
+# Camera
+TARGET_CAMERA_NEEDS_CLIENT_INFO := true
+
+# Charger
+BOARD_CHARGER_DISABLE_INIT_BLANK := true
+
+# Display
+TARGET_SCREEN_DENSITY := 420
+
+# DRM
+TARGET_ENABLE_MEDIADRM_64 := true
+
 # Extra Folders
 BOARD_ROOT_EXTRA_FOLDERS += motor_fw1 motor_fw2
 
-# Lineage Health
-TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/battery/device/smartchg_stop_charging
-TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
-TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
+# Filesystem
+TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
+
+# Global
+BOARD_USES_QCOM_HARDWARE := true
+TARGET_SPECIFIC_HEADER_PATH := $(DEVICE_PATH)/include
+TARGET_SUPPORTS_32_BIT_APPS := true
+TARGET_SUPPORTS_64_BIT_APPS := true
+TARGET_USES_QCOM_BSP := false
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
 
 #HIDL
 DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += $(DEVICE_PATH)/manifest/vendor_framework_compatibility_matrix.xml
+DEVICE_FRAMEWORK_MANIFEST_FILE += $(DEVICE_PATH)/manifest/framework_manifest.xml
 DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest/manifest.xml
 DEVICE_MATRIX_FILE += $(DEVICE_PATH)/manifest/compatibility_matrix.xml
 
+# Init
+TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_sm8250
+
 # Kernel
+BOARD_BOOT_HEADER_VERSION := 2
+BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
+BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 loop.max_part=7 cgroup.memory=nokmem,nosocket reboot=panic_warm
+#BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
+BOARD_KERNEL_PAGESIZE := 4096
+BOARD_KERNEL_BASE := 0x00000000
+BOARD_KERNEL_TAGS_OFFSET := 0x00008000
+BOARD_RAMDISK_OFFSET     := 0x01000000
+BOARD_TAGS_OFFSET := 0x00000100
+TARGET_KERNEL_ARCH := arm64
+TARGET_KERNEL_HEADER_ARCH := arm64
+BOARD_KERNEL_IMAGE_NAME := Image
+TARGET_COMPILE_WITH_MSM_KERNEL := true
+BOARD_KERNEL_SEPARATED_DTBO := true
+TARGET_KERNEL_CLANG_COMPILE := true
+TARGET_KERNEL_CLANG_VERSION := r416183b
+TARGET_KERNEL_CLANG_PATH := $(abspath .)/prebuilts/clang/kernel/$(HOST_PREBUILT_TAG)/clang-$(TARGET_KERNEL_CLANG_VERSION)
+TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc
 TARGET_KERNEL_SOURCE := kernel/asus/sm8250
 TARGET_KERNEL_CONFIG := vendor/zf7_defconfig
 
@@ -78,16 +154,99 @@
 TARGET_MODULE_ALIASES += \
     wlan.ko:qca_cld3_qca6390.ko
 
+# Lineage Health
+TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/battery/device/smartchg_stop_charging
+TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
+TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
+
+# Partitions
+ifneq ($(ROM_BUILDTYPE),$(filter $(ROM_BUILDTYPE),GAPPS MICROG))
+BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 1629145600
+BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 429145600
+BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 429145600
+endif
+
+BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 104857600
+BOARD_DTBOIMG_PARTITION_SIZE := 25165824
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 495457218560
+BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
+BOARD_USES_METADATA_PARTITION := true
+TARGET_COPY_OUT_ODM := odm
+TARGET_COPY_OUT_PRODUCT := product
+TARGET_COPY_OUT_SYSTEM_EXT := system_ext
+TARGET_COPY_OUT_VENDOR := vendor
+
+BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := \
+    system \
+    system_ext \
+    odm \
+    product \
+    vendor
+
+BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6441926656
+BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
+BOARD_SUPER_PARTITION_SIZE := 12884901888
+
+BOARD_ROOT_EXTRA_FOLDERS += ADF APD asdf batinfo xrom
+
+# Platform
+TARGET_BOARD_PLATFORM_GPU := qcom-adreno650
+
 # Properties
 TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
 TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
+TARGET_SYSTEM_EXT_PROP += $(DEVICE_PATH)/system_ext.prop
 TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
 
+# Recovery
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_INCLUDE_RECOVERY_DTBO := true
+TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/recovery.fstab
+TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888
+TARGET_USERIMAGES_USE_EXT4 := true
+TARGET_USERIMAGES_USE_F2FS := true
+TARGET_USES_MKE2FS := true
+
 # Security patch level
 VENDOR_SECURITY_PATCH := 2023-05-01
 
 # Sepolicy
+include vendor/omni/sepolicy/sepolicy.mk
+include device/qcom/sepolicy_vndr/SEPolicy.mk
+
 BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
+PRODUCT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/product/private
+SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private
+
+# Treble
+BOARD_VNDK_VERSION := current
+
+# WiFi
+BOARD_HAS_QCOM_WLAN := true
+BOARD_WLAN_DEVICE := qcwcn
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
+BOARD_WPA_SUPPLICANT_DRIVER := $(BOARD_HOSTAPD_DRIVER)
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := $(BOARD_HOSTAPD_PRIVATE_LIB)
+HOSTAPD_VERSION := VER_0_8_X
+WIFI_HIDL_FEATURE_AWARE := true
+WPA_SUPPLICANT_VERSION := $(HOSTAPD_VERSION)
+WIFI_DRIVER_DEFAULT := qca_cld3
+WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
+WIFI_DRIVER_STATE_OFF := "OFF"
+WIFI_DRIVER_STATE_ON := "ON"
+WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
+WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
+
+CONFIG_ACS := true
+CONFIG_IEEE80211AC := true
+CONFIG_IEEE80211AX := true
 
 # inherit from the proprietary version
 -include vendor/asus/zenfone7/BoardConfigVendor.mk
diff --git a/DeviceParts/Android.bp b/DeviceParts/Android.bp
new file mode 100644
index 0000000..df21227
--- /dev/null
+++ b/DeviceParts/Android.bp
@@ -0,0 +1,33 @@
+android_app {
+    name: "DeviceParts",
+
+    defaults: [
+        "SettingsLibDefaults",
+    ],
+
+    static_libs: [
+        "androidx.core_core",
+        "androidx.preference_preference",
+        "com.google.android.material_material",
+        "OmniLib",
+        "OmniPreferenceTheme",
+        "vendor.goodix.hardware.biometrics.fingerprint-V2.1-java",
+    ],
+
+    srcs: [
+        "src/**/*.java",
+    ],
+    certificate: "platform",
+    privileged: true,
+    platform_apis: true,
+    resource_dirs: ["res"],
+
+    libs: ["telephony-common"],
+
+    optimize: {
+        enabled: false,
+    },
+    dex_preopt: {
+        enabled: false,
+    },
+}
diff --git a/DeviceParts/AndroidManifest.xml b/DeviceParts/AndroidManifest.xml
new file mode 100644
index 0000000..04ab422
--- /dev/null
+++ b/DeviceParts/AndroidManifest.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          xmlns:tools="http://schemas.android.com/tools"
+    package="org.omnirom.device"
+    android:sharedUserId="android.uid.system" >
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+    <uses-permission android:name="android.permission.INJECT_EVENTS" />
+    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="com.asus.focusapplistener.permission.GAME_GENIE_PROVIDER"/>
+    <uses-permission android:name="com.asus.hardwarestub.permission.FPS_CENTRAL_CONTROL_SERVICE"/>
+
+    <protected-broadcast android:name="com.android.systemui.doze.pulse" />
+    <protected-broadcast android:name="com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_ON" />
+    <protected-broadcast android:name="com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_OFF" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/advanced_settings"
+        android:theme="@style/AppTheme"
+        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
+        tools:replace="android:appComponentFactory"
+        android:supportsRtl="true" >
+        <activity
+             android:name="org.omnirom.device.TileActivity"
+             android:taskAffinity=""
+             android:excludeFromRecents="true"
+             android:exported="true" >
+            <intent-filter>
+                <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="org.omnirom.device.DeviceSettingsActivity"
+            android:exported="false"
+            android:launchMode="singleTask" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <activity-alias
+            android:name="org.omnirom.device.DeviceSettings"
+            android:exported="true"
+            android:targetActivity="DeviceSettingsActivity" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="org.omnirom.device.DEVICE_SETTING_PAGE"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+            </intent-filter>
+        </activity-alias>
+        <activity
+            android:name="org.omnirom.device.GestureSettingsActivity"
+            android:exported="false"
+            android:label="@string/category_gestures_title"
+            android:launchMode="singleTask" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="org.omnirom.device.DozeSettingsActivity"
+            android:exported="false"
+            android:label="@string/doze_category_title"
+            android:launchMode="singleTask" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="org.omnirom.device.AudioSettingsActivity"
+            android:exported="false"
+            android:label="@string/audiowizard_entry_title"
+            android:launchMode="singleTask" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+        <receiver android:name="org.omnirom.device.Startup"
+            android:exported="false" >
+            <intent-filter android:priority="100" >
+                <action android:name="android.intent.action.BOOT_COMPLETED" />
+            </intent-filter>
+        </receiver>
+        <service
+            android:name="org.omnirom.device.GloveModeTileService"
+            android:icon="@drawable/ic_glove_tile"
+            android:label="@string/glove_mode_title"
+            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+            android:exported="true" >
+            <intent-filter>
+                <action
+                    android:name="android.service.quicksettings.action.QS_TILE"/>
+            </intent-filter>
+        </service>
+        <service
+            android:name="org.omnirom.device.VolumeTile"
+            android:icon="@drawable/ic_volume_ringer"
+            android:label="@string/volume_mode"
+            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+            android:exported="true" >
+            <intent-filter>
+                <action android:name="android.service.quicksettings.action.QS_TILE" />
+            </intent-filter>
+        </service>
+        <service
+            android:name="org.omnirom.device.FrameRateTileService"
+            android:icon="@drawable/ic_refresh_rate"
+            android:label="@string/refresh_rate_title"
+            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+            android:exported="true" >
+            <intent-filter>
+                <action
+                    android:name="android.service.quicksettings.action.QS_TILE"/>
+            </intent-filter>
+        </service>
+        <service android:name="org.omnirom.device.GripSensorServiceMain"
+                 android:permission="AsusGripSensorHelperService">
+        </service>
+    </application>
+</manifest>
diff --git a/DeviceParts/res/drawable-v26/ic_launcher.xml b/DeviceParts/res/drawable-v26/ic_launcher.xml
new file mode 100644
index 0000000..44a0834
--- /dev/null
+++ b/DeviceParts/res/drawable-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt">
+    <background android:drawable="@drawable/asus_app_ic_background_launcher"/>
+    <foreground android:drawable="@drawable/ic_asus_app_ic_foreground_launcher"/>
+</adaptive-icon>
diff --git a/DeviceParts/res/drawable/arrow_collapse_down.xml b/DeviceParts/res/drawable/arrow_collapse_down.xml
new file mode 100644
index 0000000..8f793f3
--- /dev/null
+++ b/DeviceParts/res/drawable/arrow_collapse_down.xml
@@ -0,0 +1,9 @@
+<!-- drawable/arrow_collapse_down.xml -->

+<vector xmlns:android="http://schemas.android.com/apk/res/android"

+    android:height="24dp"

+    android:width="24dp"

+    android:viewportWidth="24"

+    android:viewportHeight="24"

+    android:tint="?android:attr/colorAccent">

+    <path android:fillColor="#000" android:pathData="M19.92,12.08L12,20L4.08,12.08L5.5,10.67L11,16.17V2H13V16.17L18.5,10.66L19.92,12.08M12,20H2V22H22V20H12Z" />

+</vector>

diff --git a/DeviceParts/res/drawable/arrow_collapse_up.xml b/DeviceParts/res/drawable/arrow_collapse_up.xml
new file mode 100644
index 0000000..e859eb6
--- /dev/null
+++ b/DeviceParts/res/drawable/arrow_collapse_up.xml
@@ -0,0 +1,9 @@
+<!-- drawable/arrow_collapse_up.xml -->

+<vector xmlns:android="http://schemas.android.com/apk/res/android"

+    android:height="24dp"

+    android:width="24dp"

+    android:viewportWidth="24"

+    android:viewportHeight="24"

+    android:tint="?android:attr/colorAccent">

+    <path android:fillColor="#000" android:pathData="M4.08,11.92L12,4L19.92,11.92L18.5,13.33L13,7.83V22H11V7.83L5.5,13.33L4.08,11.92M12,4H22V2H2V4H12Z" />

+</vector>

diff --git a/DeviceParts/res/drawable/asus_app_ic_background_launcher.png b/DeviceParts/res/drawable/asus_app_ic_background_launcher.png
new file mode 100644
index 0000000..0f54091
--- /dev/null
+++ b/DeviceParts/res/drawable/asus_app_ic_background_launcher.png
Binary files differ
diff --git a/DeviceParts/res/drawable/back.xml b/DeviceParts/res/drawable/back.xml
new file mode 100644
index 0000000..3345310
--- /dev/null
+++ b/DeviceParts/res/drawable/back.xml
@@ -0,0 +1,9 @@
+<!-- drawable/arrow_left.xml -->

+<vector xmlns:android="http://schemas.android.com/apk/res/android"

+    android:height="24dp"

+    android:width="24dp"

+    android:viewportWidth="24"

+    android:viewportHeight="24"

+    android:tint="?android:attr/colorAccent">

+    <path android:fillColor="#000" android:pathData="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />

+</vector>

diff --git a/DeviceParts/res/drawable/home.xml b/DeviceParts/res/drawable/home.xml
new file mode 100644
index 0000000..77475c4
--- /dev/null
+++ b/DeviceParts/res/drawable/home.xml
@@ -0,0 +1,9 @@
+<!-- drawable/checkbox_blank_circle_outline.xml -->

+<vector xmlns:android="http://schemas.android.com/apk/res/android"

+    android:height="24dp"

+    android:width="24dp"

+    android:viewportWidth="24"

+    android:viewportHeight="24"

+    android:tint="?android:attr/colorAccent">

+    <path android:fillColor="#000" android:pathData="M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />

+</vector>

diff --git a/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml b/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml
new file mode 100644
index 0000000..de4b929
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:height="108dp" android:width="108dp" android:viewportWidth="108" android:viewportHeight="108">
+    <path android:fillColor="#ebebeb" android:pathData="M54,40.6L38.6,52.8v17.7c0,1.2 0.9,2 2,2h8.2V60.1H59v12.4h8.2c1.2,0 2,-0.9 2,-2V52.8L54,40.6z"/>
+    <path android:fillColor="#7fb2e8" android:pathData="M71.5,54.5l-17.5,-13.9l-17.5,13.9l-3.8,-4.1l21.3,-17l21.3,17z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_camera.xml b/DeviceParts/res/drawable/ic_camera.xml
new file mode 100644
index 0000000..8294f4b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_camera.xml
@@ -0,0 +1,9 @@
+<!-- drawable/camera.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24"
+    android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_camera_tile.xml b/DeviceParts/res/drawable/ic_camera_tile.xml
new file mode 100644
index 0000000..488f41b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_camera_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#000" android:pathData="M9,12C9,11.19 9.3,10.5 9.89,9.89C10.5,9.3 11.19,9 12,9C12.81,9 13.5,9.3 14.11,9.89C14.7,10.5 15,11.19 15,12C15,12.81 14.7,13.5 14.11,14.11C13.5,14.7 12.81,15 12,15C11.19,15 10.5,14.7 9.89,14.11C9.3,13.5 9,12.81 9,12M5.53,8.44L7.31,10.22L5.53,12L7.31,13.78L5.53,15.56L2,12L5.53,8.44M8.44,18.47L10.22,16.69L12,18.47L13.78,16.69L15.56,18.47L12,22L8.44,18.47M18.47,15.56L16.69,13.78L18.47,12L16.69,10.22L18.47,8.44L22,12L18.47,15.56M15.56,5.53L13.78,7.31L12,5.53L10.22,7.31L8.44,5.53L12,2L15.56,5.53Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_disabled.xml b/DeviceParts/res/drawable/ic_disabled.xml
new file mode 100644
index 0000000..1c5152b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_disabled.xml
@@ -0,0 +1,8 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="32dp"
+        android:width="32dp"
+        android:viewportWidth="24"
+        android:viewportHeight="24"
+        android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_flashlight.xml b/DeviceParts/res/drawable/ic_flashlight.xml
new file mode 100644
index 0000000..213a7f6
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_flashlight.xml
@@ -0,0 +1,9 @@
+<!-- drawable/flashlight.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24"
+    android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M9,10L6,5H18L15,10H9M18,4H6V2H18V4M9,22V11H15V22H9M12,13A1,1 0 0,0 11,14A1,1 0 0,0 12,15A1,1 0 0,0 13,14A1,1 0 0,0 12,13Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_glove_tile.xml b/DeviceParts/res/drawable/ic_glove_tile.xml
new file mode 100644
index 0000000..b69529e
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_glove_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="24.0dip"
+        android:width="24.0dip"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path android:fillColor="#ff000000" android:pathData="M18.2638,12.94 L15.0238,11.32 A5.44892,5.44892,0,0,0,17.1438,7 A5.5,5.5,0,1,0,9.1438,11.89 L9.1438,15.15 L7.3038,14.76 L7.2038,14.74 A1.58226,1.58226,0,0,0,6.8838,14.71 A1.98311,1.98311,0,0,0,5.4738,15.3 L4.0738,16.72 L9.1638,21.81 A2.31462,2.31462,0,0,0,10.8138,22.5 L17.1138,22.5 A1.98854,1.98854,0,0,0,19.0838,20.83 L19.8838,16.12 A2.99226,2.99226,0,0,0,18.2638,12.94 Z M17.9138,15.79 L17.1138,20.5 L10.8138,20.5 A0.369,0.369,0,0,1,10.5738,20.4 L6.8938,16.72 L11.1438,17.61 L11.1438,7 A0.5,0.5,0,0,1,12.1438,7 L12.1438,13 L13.9038,13 L17.3638,14.73 A1.00676,1.00676,0,0,1,17.9138,15.79 Z M8.14379,7 A3.5,3.5,0,0,1,15.1438,7 A3.46426,3.46426,0,0,1,14.1438,9.44 L14.1438,7 A2.5,2.5,0,0,0,9.1438,7 L9.1438,9.44 A3.46426,3.46426,0,0,1,8.14379,7 Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_music_next.xml b/DeviceParts/res/drawable/ic_music_next.xml
new file mode 100644
index 0000000..baad21d
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_music_next.xml
@@ -0,0 +1,9 @@
+<!-- drawable/skip_next.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24"
+    android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M16,18H18V6H16M6,18L14.5,12L6,6V18Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_music_play.xml b/DeviceParts/res/drawable/ic_music_play.xml
new file mode 100644
index 0000000..d8c3ba8
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_music_play.xml
@@ -0,0 +1,9 @@
+<!-- drawable/play.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24"
+    android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M8,5.14V19.14L19,12.14L8,5.14Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_music_prev.xml b/DeviceParts/res/drawable/ic_music_prev.xml
new file mode 100644
index 0000000..199fcd1
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_music_prev.xml
@@ -0,0 +1,9 @@
+<!-- drawable/skip_previous.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24"
+    android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_panel_tile.xml b/DeviceParts/res/drawable/ic_panel_tile.xml
new file mode 100644
index 0000000..ee0137f
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_panel_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="24dp"
+        android:width="24dp"
+        android:viewportWidth="24"
+        android:viewportHeight="24">
+    <path android:fillColor="#fff" android:pathData="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate.xml b/DeviceParts/res/drawable/ic_refresh_rate.xml
new file mode 100644
index 0000000..e6fc714
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#ff000000" android:pathData="M16.9846,18.2382 L18.2258,18.2382 C18.2131,18.2499,18.2014,18.2606,18.1897,18.2724 L16.3938,20.0038 L16.218,20.661 L19.0364,20.661 L19.2815,19.746 L17.9094,19.746 C17.923,19.7323,17.9367,19.7196,17.9494,19.706 L19.6974,18.0185 L19.7179,17.999 L19.9142,17.3174 L17.2316,17.3174 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M16.824,16.202 L15.796,16.202 L15.353,17.856 L13.951,17.856 L14.395,16.202 L13.372,16.202 L12.212,20.528 L12.177,20.661 L13.199,20.661 L13.696,18.808 L15.098,18.808 L14.601,20.661 L15.629,20.661 L16.789,16.335 L16.824,16.202 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M20.5676,5.55489 L3.43243,5.55489 A1.99674,1.99674,0,0,0,1.43732,7.549 L1.43732,16.3264 A1.99763,1.99763,0,0,0,3.43244,18.3215 L12.1487,18.3215 L12.5239,16.9229 L3.43243,16.9229 A0.5974,0.5974,0,0,1,2.83593,16.3264 L2.83593,15.5738 L4.38348,14.813 L4.38348,9.052 L2.83594,8.29946 L2.83594,7.549 A0.59756,0.59756,0,0,1,3.43244,6.95153 L20.5676,6.95153 A0.59778,0.59778,0,0,1,21.1651,7.549 L21.1651,8.29845 L19.6165,9.05205 L19.6165,14.812 L21.1651,15.5738 L21.1651,16.3264 A0.59982,0.59982,0,0,1,20.6978,16.9074 L20.5759,16.9353 L20.1779,18.3215 L20.5676,18.3215 A1.99763,1.99763,0,0,0,22.5627,16.3264 L22.5627,7.549 A1.99674,1.99674,0,0,0,20.5676,5.55489 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M9.44588,10.2675 A2.81936,2.81936,0,0,1,10.7652,9.72158 A3.20479,3.20479,0,0,1,11.3922,9.69326 L11.5924,9.71474 L11.902,8.56044 L11.61,8.54482 C11.5641,8.54282,11.5133,8.54189,11.4537,8.54189 A4.48486,4.48486,0,0,0,10.7984,8.59267 A4.271,4.271,0,0,0,8.68317,9.45888 A5.452,5.452,0,0,0,6.77792,12.453 A2.59467,2.59467,0,0,0,6.98492,14.7323 A1.62291,1.62291,0,0,0,8.33746,15.327 A3.14951,3.14951,0,0,0,11.2349,12.9793 A1.80218,1.80218,0,0,0,11.0142,11.3836 A1.5749,1.5749,0,0,0,9.70268,10.8113 A2.47,2.47,0,0,0,8.71049,11.0164 A3.28815,3.28815,0,0,1,9.44588,10.2675 Z M9.94488,12.914 A1.61176,1.61176,0,0,1,8.57188,14.2246 A0.5861,0.5861,0,0,1,8.07774,14.0244 A1.68719,1.68719,0,0,1,8.04356,12.6787 A0.49369,0.49369,0,0,1,8.15001,12.4707 A1.60065,1.60065,0,0,1,9.3453,11.913 A0.63655,0.63655,0,0,1,9.87655,12.1269 A0.90955,0.90955,0,0,1,9.94491,12.914 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M16.7756,11.9335 A3.33176,3.33176,0,0,0,16.6262,9.10536 A1.511,1.511,0,0,0,15.3537,8.54188 C13.9318,8.54188,12.7033,9.82704,12.1477,11.8974 A3.39927,3.39927,0,0,0,12.3303,14.7773 A1.4874,1.4874,0,0,0,13.5569,15.3339 C15.0441,15.3339,16.1877,14.1269,16.7756,11.9335 Z M13.4299,12.0272 C13.8098,10.6082,14.4953,9.6542,15.135,9.6542 A0.4566,0.4566,0,0,1,15.5305,9.82315 A2.76878,2.76878,0,0,1,15.4807,11.8485 C15.0705,13.3788,14.4651,14.2215,13.7756,14.2215 A0.425,0.425,0,0,1,13.4094,14.0535 A2.6914,2.6914,0,0,1,13.4299,12.0272 Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_120.xml b/DeviceParts/res/drawable/ic_refresh_rate_120.xml
new file mode 100644
index 0000000..eba0d6b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_120.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#ff000000" android:pathData="M17,18.24 L18.25,18.24 L18.25,18.24 L16.39,20 L16.22,20.66 L19,20.66 L19.24,19.75 L17.91,19.75 L17.91,19.75 L19.7,18 L19.7,18 L19.89,17.32 L17.23,17.32 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M16.82,16.2 L15.8,16.2 L15.35,17.86 L13.95,17.86 L14.39,16.2 L13.37,16.2 L12.21,20.53 L12.18,20.66 L13.2,20.66 L13.7,18.81 L15.1,18.81 L14.6,20.66 L15.63,20.66 L16.79,16.34 L16.82,16.2 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M20.57,5.55 L3.43,5.55 A2,2,0,0,0,1.43,7.55 L1.43,16.33 A2,2,0,0,0,3.43,18.33 L12.15,18.33 L12.52,16.93 L3.43,16.93 A0.58,0.58,0,0,1,2.84,16.34 L2.84,15.58 L4.38,14.82 L4.38,9.05 L2.84,8.3 L2.84,7.55 A0.59,0.59,0,0,1,3.43,7 L20.57,7 A0.6,0.6,0,0,1,21.17,7.6 L21.17,8.3 L19.62,9.05 L19.62,14.81 L21.17,15.57 L21.17,16.33 A0.61,0.61,0,0,1,20.7,16.91 L20.58,16.91 L20.18,18.29 L20.57,18.29 A2,2,0,0,0,22.57,16.29 L22.57,7.55 A2,2,0,0,0,20.57,5.55 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M18.11,11.93 A3.32,3.32,0,0,0,18,9.11 A1.51,1.51,0,0,0,16.73,8.54 C15.31,8.54,14.08,9.83,13.52,11.9 A3.44,3.44,0,0,0,13.7,14.78 A1.51,1.51,0,0,0,14.93,15.33 C16.38,15.33,17.52,14.13,18.11,11.93 Z M14.76,12.03 C15.14,10.61,15.83,9.65,16.47,9.65 A0.45,0.45,0,0,1,16.86,9.82 C17.1,10.13,17.08,10.82,16.81,11.82 C16.4,13.35,15.81,14.19,15.11,14.19 A0.43,0.43,0,0,1,14.74,14.02 A2.7,2.7,0,0,1,14.76,12 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M6.53,8.64 L5.87,9.82 L7.01,9.82 L5.2,15.19 L6.46,15.19 L8.66,8.64 L6.53,8.64 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M12.94,9.1 A1.67,1.67,0,0,0,11.56,8.54 A2.52,2.52,0,0,0,9.64,9.35 A3.73,3.73,0,0,0,8.93,10.78 L8.93,10.99 L10.13,10.99 L10.13,10.87 A2.62,2.62,0,0,1,10.35,10.32 A1.69,1.69,0,0,1,10.62,9.96 A1,1,0,0,1,10.94,9.76 A1.26,1.26,0,0,1,11.71,9.76 A0.49,0.49,0,0,1,11.93,9.9 A0.64,0.64,0,0,1,12.03,10.14 A0.91,0.91,0,0,1,12.03,10.5 A1.31,1.31,0,0,1,11.76,11.07 C11.68,11.16,11.55,11.3,11.37,11.47 S10.92,11.89,10.6,12.17 L7.41,15.17 L11.79,15.17 L12.19,13.98 L10.19,13.98 L11.64,12.71 C11.94,12.44,12.18,12.22,12.38,12.02 A4.35,4.35,0,0,0,12.83,11.52 A2.23,2.23,0,0,0,13.27,10.52 A1.62,1.62,0,0,0,12.94,9.1 Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_144.xml b/DeviceParts/res/drawable/ic_refresh_rate_144.xml
new file mode 100644
index 0000000..0e21f01
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_144.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#ffffff" android:pathData="M 6.08 8.16 L 5.71 9.46 L 6.71 9.46 L 5.01 15.4 L 6.5 15.4 L 8.57 8.16 L 6.08 8.16 Z"/>
+    <path android:fillColor="#ffffff" android:pathData="M13.77,8H12.35L7.72,13.32l-0.24 0.77 h3.16l-0.38,1.31h1.4L12,14.09h0.82l0.35-1.21h-0.83ZM9.63,12.88l2-2.42L11,12.88Z"/>
+    <path android:fillColor="#ffffff" android:pathData="M19.77,8H18.36l-4.64,5.29-0.23 0.77 h3.16l-0.38,1.31h1.4l0.38-1.31h0.82l0.34-1.21h-0.82Zm-4.13,4.85,2-2.42L17,12.88Z"/>
+    <path android:fillColor="#ffffff" android:pathData="M17.19,19h1.38s0,0,0,0l-2,1.93-0.2 0.73 h3.15l0.27-1H18.22s0,0,0,0l1.95-1.89,0,0,0.21-0.76h-3Z"/>
+    <path android:fillColor="#ffffff" android:pathData="M 17.01 16.72 L 15.86 16.72 L 15.37 18.56 L 13.8 18.56 L 14.3 16.72 L 13.16 16.72 L 11.86 21.54 L 11.82 21.69 L 12.96 21.69 L 13.52 19.62 L 15.08 19.62 L 14.53 21.69 L 15.67 21.69 L 16.97 16.86 L 17.01 16.72 Z"/>
+    <path android:fillColor="#ffffff" android:pathData="M21.73,4.38H2.27A2.27,2.27,0,0,0,0,6.65v10a2.27,2.27,0,0,0,2.27,2.27h8.9l0.43-1.59H2.27a0.68 0.68 ,0,0,1-0.68-0.68v-10A0.67 0.67 ,0,0,1,2.27,6H21.73a0.67 0.67 ,0,0,1,0.68 0.68 v10a0.68 0.68 ,0,0,1-0.53 0.66 l-0.14,0-0.45,1.58h0.44A2.27,2.27,0,0,0,24,16.62v-10A2.27,2.27,0,0,0,21.73,4.38Z"/>
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_160.xml b/DeviceParts/res/drawable/ic_refresh_rate_160.xml
new file mode 100644
index 0000000..44501fa
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_160.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>

+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="17dp" android:width="18dp" android:viewportWidth="19" android:viewportHeight="18">

+    <path android:fillColor="#ffffff" android:pathData="M9,7.31a2.47,2.47,0,0,1,1.12-0.47,2.65,2.65,0,0,1,0.54,0l0.17,0,0.26-1h-0.38a3.78,3.78,0,0,0-0.56,0,3.66,3.66,0,0,0-1.8 0.74 A4.59,4.59,0,0,0,6.74,9.17a2.18,2.18,0,0,0,0.17,1.94,1.39,1.39,0,0,0,1.15 0.51 ,2.67,2.67,0,0,0,2.47-2,1.53,1.53,0,0,0-0.18-1.36,1.36,1.36,0,0,0-1.12-0.49A2.06,2.06,0,0,0,8.38,8,2.74,2.74,0,0,1,9,7.31Zm0.42,2.25a1.36,1.36,0,0,1-1.17,1.12 0.51 0.51,0,0,1-0.42-0.17,1.43,1.43,0,0,1,0-1.15 0.39 0.39,0,0,1,0.09-0.17,1.37,1.37,0,0,1,1-0.48 0.55 0.55,0,0,1,0.46 0.18 A0.78 0.78 ,0,0,1,9.43,9.56Z"/>

+    <path android:fillColor="#ffffff" android:pathData="M 4.83 5.92 L 4.27 6.92 L 5.25 6.92 L 3.71 11.5 L 4.78 11.5 L 6.66 5.92 L 4.83 5.92 Z"/>

+    <path android:fillColor="#ffffff" android:pathData="M15.46,8.73a2.85,2.85,0,0,0-0.13-2.41,1.3,1.3,0,0,0-1.09-0.48C13,5.84,12,6.93,11.51,8.69a2.92,2.92,0,0,0,0.16,2.46,1.26,1.26,0,0,0,1,0.47C14,11.62,15,10.59,15.46,8.73ZM12.6,8.8c0.33-1.2 0.91 -2,1.46-2a0.37 0.37 ,0,0,1,0.33 0.15 ,2.3,2.3,0,0,1,0,1.72c-0.35,1.31-0.86,2-1.45,2a0.34 0.34 ,0,0,1-0.31-0.14A2.29,2.29,0,0,1,12.6,8.8Z"/>

+    <path android:pathData="M 0.5 0 H 18.5 V 18 H 0.5 V 0 Z"/>

+    <path android:fillColor="#ffffff" android:pathData="M14.78,14.24h1l0,0-1.5,1.45-0.15 0.55 h2.36l0.21-0.77H15.55l0,0,1.47-1.41v0l0.17-0.57H15Z"/>

+    <path android:fillColor="#ffffff" android:pathData="M 14.64 12.54 L 13.78 12.54 L 13.41 13.92 L 12.24 13.92 L 12.61 12.54 L 11.75 12.54 L 10.78 16.16 L 10.75 16.27 L 11.61 16.27 L 12.02 14.72 L 13.2 14.72 L 12.78 16.27 L 13.64 16.27 L 14.61 12.65 L 14.64 12.54 Z"/>

+    <path android:fillColor="#ffffff" android:pathData="M15.53,3.29H3.43A1.7,1.7,0,0,0,1.73,5v7.47a1.7,1.7,0,0,0,1.7,1.7H9.92L10.24,13H3.43a0.51 0.51 ,0,0,1-0.51-0.51V5a0.51 0.51 ,0,0,1,0.51-0.51h12.1A0.51 0.51 ,0,0,1,16,5v7.55h1.19V5A1.7,1.7,0,0,0,15.53,3.29Z"/>

+    <path android:pathData="M 3 2.5 H 16 V 15.5 H 3 V 2.5 Z"/>

+</vector>

diff --git a/DeviceParts/res/drawable/ic_refresh_rate_90.xml b/DeviceParts/res/drawable/ic_refresh_rate_90.xml
new file mode 100644
index 0000000..9d2ef09
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_90.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#ff000000" android:pathData="M16.9846,18.2382 L18.2258,18.2382 C18.2131,18.2499,18.2014,18.2606,18.1897,18.2724 L16.3938,20.0038 L16.218,20.661 L19.0364,20.661 L19.2815,19.746 L17.9094,19.746 C17.923,19.7323,17.9367,19.7196,17.9494,19.706 L19.6974,18.0185 L19.7179,17.999 L19.9142,17.3174 L17.2316,17.3174 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M16.824,16.202 L15.796,16.202 L15.353,17.856 L13.951,17.856 L14.395,16.202 L13.372,16.202 L12.212,20.528 L12.177,20.661 L13.199,20.661 L13.696,18.808 L15.098,18.808 L14.601,20.661 L15.629,20.661 L16.789,16.335 L16.824,16.202 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M20.5676,5.55489 L3.43243,5.55489 A1.99674,1.99674,0,0,0,1.43732,7.549 L1.43732,16.3264 A1.99763,1.99763,0,0,0,3.43244,18.3215 L12.1487,18.3215 L12.5239,16.9229 L3.43243,16.9229 A0.5974,0.5974,0,0,1,2.83593,16.3264 L2.83593,15.5738 L4.38348,14.813 L4.38348,9.052 L2.83594,8.29946 L2.83594,7.549 A0.59756,0.59756,0,0,1,3.43244,6.95153 L20.5676,6.95153 A0.59778,0.59778,0,0,1,21.1651,7.549 L21.1651,8.29845 L19.6165,9.05205 L19.6165,14.812 L21.1651,15.5738 L21.1651,16.3264 A0.59982,0.59982,0,0,1,20.6978,16.9074 L20.5759,16.9353 L20.1779,18.3215 L20.5676,18.3215 A1.99763,1.99763,0,0,0,22.5627,16.3264 L22.5627,7.549 A1.99674,1.99674,0,0,0,20.5676,5.55489 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M9.07928,13.6015 A2.81936,2.81936,0,0,1,7.75994,14.1474 A3.20479,3.20479,0,0,1,7.13294,14.1757 L6.93274,14.1542 L6.62317,15.3085 L6.91517,15.3241 C6.96107,15.3261,7.01185,15.327,7.07142,15.327 A4.48486,4.48486,0,0,0,7.72669,15.2762 A4.271,4.271,0,0,0,9.842,14.4101 A5.452,5.452,0,0,0,11.7473,11.4159 A2.59467,2.59467,0,0,0,11.5403,9.1366 A1.62291,1.62291,0,0,0,10.1878,8.54187 A3.14951,3.14951,0,0,0,7.29034,10.8895 A1.80218,1.80218,0,0,0,7.51104,12.4852 A1.5749,1.5749,0,0,0,8.82256,13.0575 A2.47,2.47,0,0,0,9.81475,12.8524 A3.28815,3.28815,0,0,1,9.07928,13.6015 Z M8.58028,10.955 A1.61176,1.61176,0,0,1,9.95328,9.64445 A0.5861,0.5861,0,0,1,10.4474,9.84465 A1.68719,1.68719,0,0,1,10.4816,11.1903 A0.49369,0.49369,0,0,1,10.3751,11.3983 A1.60065,1.60065,0,0,1,9.17979,11.9559 A0.63655,0.63655,0,0,1,8.64854,11.742 A0.90955,0.90955,0,0,1,8.58026,10.955 Z" />
+    <path android:fillColor="#ff000000" android:pathData="M16.7756,11.9335 A3.33176,3.33176,0,0,0,16.6262,9.10536 A1.511,1.511,0,0,0,15.3537,8.54188 C13.9318,8.54188,12.7033,9.82704,12.1477,11.8974 A3.39927,3.39927,0,0,0,12.3303,14.7773 A1.4874,1.4874,0,0,0,13.5569,15.3339 C15.0441,15.3339,16.1877,14.1269,16.7756,11.9335 Z M13.4299,12.0272 C13.8098,10.6082,14.4953,9.6542,15.135,9.6542 A0.4566,0.4566,0,0,1,15.5305,9.82315 A2.76878,2.76878,0,0,1,15.4807,11.8485 C15.0705,13.3788,14.4651,14.2215,13.7756,14.2215 A0.425,0.425,0,0,1,13.4094,14.0535 A2.6914,2.6914,0,0,1,13.4299,12.0272 Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_settings_sound.xml b/DeviceParts/res/drawable/ic_settings_sound.xml
new file mode 100644
index 0000000..7054d78
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_settings_sound.xml
@@ -0,0 +1,30 @@
+<!--
+    Copyright (C) 2016 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24.0dp"
+        android:height="24.0dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0"
+        android:tint="?android:attr/colorControlNormal">
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M3 10v4c0 .55 .45 1 1 1h3l3.29 3.29c.63 .63 1.71 .18
+1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0
+0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.46v.19c0 .38 .25 .71 .61
+.85C17.18 6.54 19 9.06 19 12s-1.82 5.46-4.39 6.5c-.36 .14 -.61 .47 -.61 .85
+v.19c0 .63 .63 1.08 1.22 .86 a8.995 8.995 0 0 0 0-16.8c-.59-.23-1.22 .23 -1.22
+.86 z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer.xml b/DeviceParts/res/drawable/ic_volume_ringer.xml
new file mode 100644
index 0000000..11d8428
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_volume_ringer.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
+    <path android:fillColor="#ffffffff" android:pathData="M18,17v-6c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C7.64,5.36 6,7.92 6,11v6H4v2h10h0.38H20v-2H18zM16,17H8v-6c0,-2.48 1.51,-4.5 4,-4.5s4,2.02 4,4.5V17z"/>
+    <path android:fillColor="#ffffffff" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer_mute.xml b/DeviceParts/res/drawable/ic_volume_ringer_mute.xml
new file mode 100644
index 0000000..f6f486f
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_volume_ringer_mute.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
+    <path android:fillColor="#ffffffff" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
+    <path android:fillColor="#ffffffff" android:pathData="M16,16L2.81,2.81L1.39,4.22l4.85,4.85C6.09,9.68 6,10.33 6,11v6H4v2h12.17l3.61,3.61l1.41,-1.41L16,16zM8,17c0,0 0.01,-6.11 0.01,-6.16L14.17,17H8z"/>
+    <path android:fillColor="#ffffffff" android:pathData="M12,6.5c2.49,0 4,2.02 4,4.5v2.17l2,2V11c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C9.72,4.86 9.05,5.2 8.46,5.63L9.93,7.1C10.51,6.73 11.2,6.5 12,6.5z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml b/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..9010c53
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:height="19dp" android:width="19dp" android:viewportWidth="24" android:viewportHeight="24">
+    <path android:fillColor="#ffffffff" android:pathData="M1,9h2v6H1V9zM4,17h2V7H4V17zM21,9v6h2V9H21zM18,17h2V7h-2V17zM17,5.5v13c0,0.83 -0.67,1.5 -1.5,1.5h-7C7.67,20 7,19.33 7,18.5v-13C7,4.67 7.67,4 8.5,4h7C16.33,4 17,4.67 17,5.5zM15,6H9v12h6V6z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_wakeup.xml b/DeviceParts/res/drawable/ic_wakeup.xml
new file mode 100644
index 0000000..34209eb
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_wakeup.xml
@@ -0,0 +1,8 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:height="32dp"
+        android:width="32dp"
+        android:viewportWidth="24"
+        android:viewportHeight="24"
+        android:tint="?android:attr/colorAccent" >
+    <path android:fillColor="#fff" android:pathData="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" />
+</vector>
diff --git a/DeviceParts/res/drawable/recent.xml b/DeviceParts/res/drawable/recent.xml
new file mode 100644
index 0000000..e3935a3
--- /dev/null
+++ b/DeviceParts/res/drawable/recent.xml
@@ -0,0 +1,9 @@
+<!-- drawable/crop_square.xml -->

+<vector xmlns:android="http://schemas.android.com/apk/res/android"

+    android:height="24dp"

+    android:width="24dp"

+    android:viewportWidth="24"

+    android:viewportHeight="24"

+    android:tint="?android:attr/colorAccent">

+    <path android:fillColor="#000" android:pathData="M18,18H6V6H18M18,4H6A2,2 0 0,0 4,6V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18V6C20,4.89 19.1,4 18,4Z" />

+</vector>

diff --git a/DeviceParts/res/layout/applist_preference_icon.xml b/DeviceParts/res/layout/applist_preference_icon.xml
new file mode 100644
index 0000000..1d6425d
--- /dev/null
+++ b/DeviceParts/res/layout/applist_preference_icon.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<!-- Layout for a Preference in a PreferenceActivity. The
+     Preference is able to place a specific widget for its particular
+     type in the "widget_frame" layout. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/widget_frame"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeightSmall"
+    android:gravity="center_vertical"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:background="?android:attr/selectableItemBackground">
+
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_marginEnd="12dip"
+        android:padding="2dp"
+        android:scaleType="centerInside"
+        android:layout_gravity="center" />
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="2dip"
+        android:layout_marginEnd="6dip"
+        android:layout_marginTop="6dip"
+        android:layout_marginBottom="6dip"
+        android:layout_weight="1">
+
+        <TextView android:id="@+id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:textAppearance="?android:attr/textAppearanceListItem"
+            android:textColor="?android:attr/textColorPrimary"
+            android:ellipsize="marquee"
+            android:fadingEdge="horizontal" />
+
+    </RelativeLayout>
+
+</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_app_select.xml b/DeviceParts/res/layout/preference_app_select.xml
new file mode 100644
index 0000000..e1a92f9
--- /dev/null
+++ b/DeviceParts/res/layout/preference_app_select.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The OmniROM Project
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:background="?android:attr/selectableItemBackground"
+    android:clipToPadding="false"
+    android:orientation="horizontal" >
+
+    <LinearLayout
+        android:id="@+id/icon_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="start|center_vertical"
+        android:orientation="horizontal"
+        android:clipToPadding="false"
+        android:paddingEnd="12dp"
+        android:paddingTop="4dp"
+        android:paddingBottom="4dp">
+        <com.android.internal.widget.PreferenceImageView
+            android:id="@android:id/icon"
+            android:layout_width="48dp"
+            android:layout_height="48dp"
+            android:gravity="center"
+            android:scaleType="centerInside" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:gravity="center_vertical"
+        android:layout_weight="1" >
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="6dip"
+            android:layout_marginTop="10dip"
+            android:layout_marginBottom="6dip" >
+
+            <TextView android:id="@android:id/title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:textAppearance="?android:attr/textAppearanceListItem"
+                android:ellipsize="marquee" />
+
+            <TextView android:id="@android:id/summary"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@android:id/title"
+                android:layout_alignStart="@android:id/title"
+                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+                android:textColor="?android:attr/textColorSecondary"
+                android:maxLines="10"
+                android:ellipsize="end" />
+
+        </RelativeLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_dialog_applist.xml b/DeviceParts/res/layout/preference_dialog_applist.xml
new file mode 100644
index 0000000..38b4fd4
--- /dev/null
+++ b/DeviceParts/res/layout/preference_dialog_applist.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The OmniROM 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.
+-->
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:gravity="center_horizontal"
+        android:padding="24dip">
+
+     <ListView android:id="@+id/applist"
+               android:layout_width="match_parent"
+               android:layout_height="match_parent"/>
+
+</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_seek_bar.xml b/DeviceParts/res/layout/preference_seek_bar.xml
new file mode 100644
index 0000000..2afc97c
--- /dev/null
+++ b/DeviceParts/res/layout/preference_seek_bar.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2016 The OmniROM Project
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:background="?android:attr/selectableItemBackground"
+    android:clipToPadding="false"
+    android:orientation="horizontal" >
+
+    <LinearLayout
+        android:id="@android:id/icon_frame"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="-4dp"
+        android:minWidth="60dp"
+        android:gravity="start|center_vertical"
+        android:orientation="horizontal"
+        android:paddingEnd="12dp"
+        android:paddingTop="4dp"
+        android:paddingBottom="4dp">
+        <com.android.internal.widget.PreferenceImageView
+            android:id="@android:id/icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:maxWidth="48dp"
+            android:maxHeight="48dp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:gravity="center_vertical"
+        android:layout_weight="1" >
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dip"
+            android:layout_marginBottom="6dip" >
+
+            <TextView android:id="@android:id/title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:textAppearance="?android:attr/textAppearanceListItem"
+                android:ellipsize="marquee" />
+
+            <TextView android:id="@android:id/summary"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@android:id/title"
+                android:layout_alignStart="@android:id/title"
+                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+                android:textColor="?android:attr/textColorSecondary"
+                android:maxLines="10"
+                android:ellipsize="end" />
+
+        </RelativeLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:layout_marginTop="5dip"
+            android:layout_marginBottom="10dip">
+
+            <SeekBar android:id="@+id/seekbar"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:paddingLeft="5dp"
+                android:paddingRight="5dp" />
+
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/DeviceParts/res/layout/settings_activity.xml b/DeviceParts/res/layout/settings_activity.xml
new file mode 100644
index 0000000..c0139ac
--- /dev/null
+++ b/DeviceParts/res/layout/settings_activity.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fitsSystemWindows="true" >
+
+    <com.google.android.material.appbar.AppBarLayout
+        android:id="@+id/app_bar_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:fitsSystemWindows="true">
+
+        <com.google.android.material.appbar.MaterialToolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"/>
+
+    </com.google.android.material.appbar.AppBarLayout>
+
+    <FrameLayout
+        android:id="@+id/fragment_container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginStart="@dimen/fragment_side_margin"
+        android:layout_marginEnd="@dimen/fragment_side_margin"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/DeviceParts/res/values-af/strings.xml b/DeviceParts/res/values-af/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-af/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-am/strings.xml b/DeviceParts/res/values-am/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-am/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ar/strings.xml b/DeviceParts/res/values-ar/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ar/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-az-rAZ/strings.xml b/DeviceParts/res/values-az-rAZ/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-az-rAZ/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-bg/strings.xml b/DeviceParts/res/values-bg/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-bg/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ca/strings.xml b/DeviceParts/res/values-ca/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ca/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-cs/strings.xml b/DeviceParts/res/values-cs/strings.xml
new file mode 100644
index 0000000..d841367
--- /dev/null
+++ b/DeviceParts/res/values-cs/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="app_name">Zenfone 6</string>
+    <string name="category_gestures_title">Gesta zařízení</string>
+    <string name="category_vibrator">Vibrace</string>
+    <string name="vib_strength_title_head">Intenzita</string>
+    <string name="vib_strength_summary_head">Definujte intenzitu vibrací</string>
+    <string name="vib_test">Test</string>
+    <string name="advanced_settings">Rozšířené</string>
+    <string name="graphics_title">Grafika</string>
+    <string name="screen_title">Citlivost obrazovky</string>
+    <string name="glove_mode_summary">Zvyšuje citlivost při použití rukavic</string>
+    <string name="glove_mode_title">Režim s rukavicemi</string>
+    <string name="proxi_summary_head">Zkontrolujte senzor přiblížení pro zachycení senzoru otisků prstů</string>
+    <string name="proxi_title_head">Kontrola senzoru přiblížení</string>
+    <string name="choose_app">Vybrat aplikaci</string>
+    <string name="offscreen_gesture_title">Gesta při vypnuté obrazovce</string>
+    <string name="music_control_title">Ovládání hudby</string>
+    <string name="music_control_summary">"Nakreslete | | dvěma prsty pro pozastavení/obnovení hudby a &lt; nebo &gt; pro změnu skladby"</string>
+    <string name="category_m_gesture">Písmeno m</string>
+    <string name="category_e_gesture">Písmeno e</string>
+    <string name="category_s_gesture">Písmeno s</string>
+    <string name="category_v_gesture">Písmeno v</string>
+    <string name="category_w_gesture">Písmeno w</string>
+    <string name="category_z_gesture">Písmeno z</string>
+    <string name="category_left_arrow_gesture">Gesto &lt;</string>
+    <string name="category_right_arrow_gesture">Gesto &gt;</string>
+    <string name="category_gestures_summary">Konfigurace akcí gest</string>
+    <string name="torch_entry">Svítilna</string>
+    <string name="disabled_entry">Vypnuto</string>
+    <string name="camera_entry">Fotoaparát</string>
+    <string name="camera_label">Otočení kamery</string>
+    <string name="music_play_entry">Přehrát / pozastavit hudbu</string>
+    <string name="music_prev_entry">Předchozí skladba</string>
+    <string name="music_next_entry">Další skladba</string>
+    <string name="volume_up">Zvýšit hlasitost</string>
+    <string name="volume_down">Snížit hlasitost</string>
+    <string name="browse_scroll_up">Posunutí nahoru</string>
+    <string name="browse_scroll_down">Posunutí dolů</string>
+    <string name="navigate_back">Zpět</string>
+    <string name="navigate_home">Domů</string>
+    <string name="navigate_recent">Nedávné</string>
+    <string name="not_ready_summary">Řešení...</string>
+    <string name="resolve_failed_summary">Řešení aplikace selhalo</string>
+    <string name="category_down_swipe_gesture">Tah dolů</string>
+    <string name="category_up_swipe_gesture">Tah nahoru</string>
+    <string name="category_left_swipe_gesture">Tah doleva</string>
+    <string name="category_right_swipe_gesture">Tah doprava</string>
+    <string name="doze_category_title">Ambientní displej</string>
+    <string name="doze_category_summary">Probudí obrazovku při příjmu oznámení</string>
+    <string name="wave_check_summary">Pulzní oznámení při mávnutí rukou</string>
+    <string name="wave_check_title">Mávnutí rukou</string>
+    <string name="tilt_check_summary">Pulzní oznámení při zvednutí zařízení</string>
+    <string name="tilt_check_title">Zvednutí</string>
+    <string name="pocket_check_summary">Pulzní oznámení při vyjmutí z kapsy</string>
+    <string name="pocket_check_title">Kapsa</string>
+    <string name="ambient_display_enable">Ambientní display musí být povolen v nastavení obrazovky</string>
+    <string name="wake_entry">Probuzení</string>
+    <string name="swipe_up_to_wake_up_title">Potáhnutím nahoru probudit</string>
+    <string name="swipe_up_to_wake_up_summary">Potáhněte prstem nahoru po obrazovce pro probuzení zařízení z režimu nečinnosti</string>
+    <string name="category_frame_rate">FPS obrazovky</string>
+    <string name="refresh_rate_title">Obnovovací frekvence</string>
+    <string name="summary_placeholder"></string>
+    <string name="gaming_title">Herní režim</string>
+    <string name="gaming_browse_summary">Nastavení hry v Herním režimu</string>
+    <!-- Volume panel QS tile -->
+    <string name="volume_mode">Zvuk</string>
+    <string name="vibrate_mode">Vibrace</string>
+    <string name="mute_mode">Ticho</string>
+</resources>
diff --git a/DeviceParts/res/values-da/strings.xml b/DeviceParts/res/values-da/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-da/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-de/strings.xml b/DeviceParts/res/values-de/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-de/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-el/strings.xml b/DeviceParts/res/values-el/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-el/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-es/strings.xml b/DeviceParts/res/values-es/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-es/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-et/strings.xml b/DeviceParts/res/values-et/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-et/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-fa/strings.xml b/DeviceParts/res/values-fa/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-fa/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-fi/strings.xml b/DeviceParts/res/values-fi/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-fi/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-fr/strings.xml b/DeviceParts/res/values-fr/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-fr/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hi/strings.xml b/DeviceParts/res/values-hi/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hi/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hr/strings.xml b/DeviceParts/res/values-hr/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hr/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hu/strings.xml b/DeviceParts/res/values-hu/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hu/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hy/strings.xml b/DeviceParts/res/values-hy/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hy/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-in/strings.xml b/DeviceParts/res/values-in/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-in/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-it/strings.xml b/DeviceParts/res/values-it/strings.xml
new file mode 100644
index 0000000..05da780
--- /dev/null
+++ b/DeviceParts/res/values-it/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="app_name">Zenfone 6</string>
+    <string name="category_gestures_title">Gesti del dispositivo</string>
+    <string name="category_vibrator">Vibrazione</string>
+    <string name="vib_strength_title_head">Intensità</string>
+    <string name="vib_strength_summary_head">Definisci l\'intensità della vibrazione</string>
+    <string name="vib_test">Prova</string>
+    <string name="advanced_settings">Avanzate</string>
+    <string name="graphics_title">Grafica</string>
+    <string name="screen_title">Sensibilità dello Schermo</string>
+    <string name="glove_mode_summary">Aumenta la sensibilità al tocco indossando i guanti</string>
+    <string name="glove_mode_title">Modalità guanto</string>
+    <string name="proxi_summary_head">Controlla il sensore di prossimità per gestire il sensore di impronte digitali</string>
+    <string name="proxi_title_head">Controllo di prossimità</string>
+    <string name="choose_app">Scegli app</string>
+    <string name="offscreen_gesture_title">Gesti a schermo spento</string>
+    <string name="music_control_title">Controllo Musicale</string>
+    <string name="music_control_summary">"Disegna | | con due dita per interrompere/riprendere la musica e &lt; o &gt; per cambiare brano"</string>
+    <string name="category_m_gesture">Lettera M</string>
+    <string name="category_e_gesture">Lettera E</string>
+    <string name="category_s_gesture">Lettera S</string>
+    <string name="category_v_gesture">Lettera V</string>
+    <string name="category_w_gesture">Lettera W</string>
+    <string name="category_z_gesture">Lettera Z</string>
+    <string name="category_left_arrow_gesture">gesto &lt;</string>
+    <string name="category_right_arrow_gesture">gesto &gt;</string>
+    <string name="category_gestures_summary">Configura le azioni dei gesti</string>
+    <string name="torch_entry">Torcia</string>
+    <string name="disabled_entry">Disabilitato</string>
+    <string name="camera_entry">Fotocamera</string>
+    <string name="camera_label">Ruota fotocamera</string>
+    <string name="music_play_entry">Riproduci / interrompi la musica</string>
+    <string name="music_prev_entry">Traccia precedente</string>
+    <string name="music_next_entry">Traccia successiva</string>
+    <string name="volume_up">Alza il volume</string>
+    <string name="volume_down">Abbassa il volume</string>
+    <string name="browse_scroll_up">Scorri in su</string>
+    <string name="browse_scroll_down">Scorri in giù</string>
+    <string name="navigate_back">Indietro</string>
+    <string name="navigate_home">Home</string>
+    <string name="navigate_recent">Recenti</string>
+    <string name="not_ready_summary">Risolvendo...</string>
+    <string name="resolve_failed_summary">Risoluzione dell\'app fallita</string>
+    <string name="category_down_swipe_gesture">Scorri in giù</string>
+    <string name="category_up_swipe_gesture">Scorri in su</string>
+    <string name="category_left_swipe_gesture">Scorri a sinistra</string>
+    <string name="category_right_swipe_gesture">Scorri a destra</string>
+    <string name="doze_category_title">Ambient display</string>
+    <string name="doze_category_summary">Riattiva lo schermo alla ricezione di notifiche</string>
+    <string name="wave_check_summary">Lampeggia le notifiche agitando la mano</string>
+    <string name="wave_check_title">Agita la mano</string>
+    <string name="tilt_check_summary">Lampeggia le notifiche raccogliendo il dispositivo</string>
+    <string name="tilt_check_title">Raccogli</string>
+    <string name="pocket_check_summary">Lampeggia le notifiche estraendo dalla tasca</string>
+    <string name="pocket_check_title">Tasca</string>
+    <string name="ambient_display_enable">Ambient display dev\'esser abilitato nelle impostazioni dello schermo</string>
+    <string name="wake_entry">Riattiva</string>
+    <string name="swipe_up_to_wake_up_title">Scorri in su per riattivare</string>
+    <string name="swipe_up_to_wake_up_summary">Scorri in su sullo schermo per riattivare il tuo dispositivo dalla modalità inattiva</string>
+    <string name="category_frame_rate">FPS dello schermo</string>
+    <string name="refresh_rate_title">Frequenza di aggiornamento</string>
+    <string name="summary_placeholder"></string>
+    <string name="gaming_title">Game Genie</string>
+    <string name="gaming_browse_summary">Avvia le impostazioni del game genie</string>
+    <!-- Volume panel QS tile -->
+    <string name="volume_mode">Suono</string>
+    <string name="vibrate_mode">Vibrazione</string>
+    <string name="mute_mode">Silenzia</string>
+</resources>
diff --git a/DeviceParts/res/values-iw/strings.xml b/DeviceParts/res/values-iw/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-iw/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ja/strings.xml b/DeviceParts/res/values-ja/strings.xml
new file mode 100644
index 0000000..2378c81
--- /dev/null
+++ b/DeviceParts/res/values-ja/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="app_name">Zenfone 6</string>
+    <string name="category_gestures_title">端末ジェスチャー</string>
+    <string name="category_vibrator">振動</string>
+    <string name="vib_strength_title_head">強さ</string>
+    <string name="vib_strength_summary_head">振動の強さを決定する</string>
+    <string name="vib_test">テスト</string>
+    <string name="advanced_settings">高度な設定</string>
+    <string name="graphics_title">グラフィックス</string>
+    <string name="screen_title">画面の感度</string>
+    <string name="glove_mode_summary">手袋を着用した時のタッチ感度を上げる</string>
+    <string name="glove_mode_title">グローブモード</string>
+    <string name="proxi_summary_head">指紋センサーを処理するための近接センサーをチェックする</string>
+    <string name="proxi_title_head">近接センサーの確認</string>
+    <string name="choose_app">アプリの選択</string>
+    <string name="offscreen_gesture_title">画面消灯時のジェスチャー</string>
+    <string name="music_control_title">音楽コントロール</string>
+    <string name="music_control_summary">"2本の指で「 | | 」を描いで音楽を再生/停止し、&lt; や &gt; でトラックを変更します。"</string>
+    <string name="category_m_gesture">文字「m」</string>
+    <string name="category_e_gesture">文字「e」</string>
+    <string name="category_s_gesture">文字「s」</string>
+    <string name="category_v_gesture">文字「v」</string>
+    <string name="category_w_gesture">文字「w」</string>
+    <string name="category_z_gesture">文字「z」</string>
+    <string name="category_left_arrow_gesture">&lt; ジェスチャー</string>
+    <string name="category_right_arrow_gesture">&gt; ジェスチャー</string>
+    <string name="category_gestures_summary">ジェスチャー動作を設定する</string>
+    <string name="torch_entry">フラッシュライト</string>
+    <string name="disabled_entry">無効</string>
+    <string name="camera_entry">カメラ</string>
+    <string name="camera_label">カメラを回転</string>
+    <string name="music_play_entry">音楽の再生/停止</string>
+    <string name="music_prev_entry">前のトラック</string>
+    <string name="music_next_entry">次のトラック</string>
+    <string name="volume_up">音量を上げる</string>
+    <string name="volume_down">音量を下げる</string>
+    <string name="browse_scroll_up">上にスクロール</string>
+    <string name="browse_scroll_down">下にスクロール</string>
+    <string name="navigate_back">戻る</string>
+    <string name="navigate_home">ホーム</string>
+    <string name="navigate_recent">アプリ履歴</string>
+    <string name="not_ready_summary">処理しています...</string>
+    <string name="resolve_failed_summary">アプリの処理に失敗しました</string>
+    <string name="category_down_swipe_gesture">下にスワイプ</string>
+    <string name="category_up_swipe_gesture">上にスワイプ</string>
+    <string name="category_left_swipe_gesture">左にスワイプ</string>
+    <string name="category_right_swipe_gesture">右にスワイプ</string>
+    <string name="doze_category_title">アンビエント表示</string>
+    <string name="doze_category_summary">通知を受け取った時画面をスリープ解除する</string>
+    <string name="wave_check_summary">手を振った時に通知を点滅させる</string>
+    <string name="wave_check_title">手を振る</string>
+    <string name="tilt_check_summary">端末が傾いている時に通知を点滅させる</string>
+    <string name="tilt_check_title">持ち上げ</string>
+    <string name="pocket_check_summary">ポケットから外した時に通知を点滅させる</string>
+    <string name="pocket_check_title">ポケット</string>
+    <string name="ambient_display_enable">ディスプレイ設定でアンビエント表示を有効にしなければなりません</string>
+    <string name="wake_entry">スリープ解除</string>
+    <string name="swipe_up_to_wake_up_title">上にスワイプしてスリープ解除</string>
+    <string name="swipe_up_to_wake_up_summary">画面を上にスワイプして端末をアイドルモードからスリープ解除する</string>
+    <string name="category_frame_rate">画面の FPS</string>
+    <string name="refresh_rate_title">リフレッシュレート</string>
+    <string name="summary_placeholder"></string>
+    <string name="gaming_title">Game Genie</string>
+    <string name="gaming_browse_summary">Game Genie アプリを起動</string>
+    <!-- Volume panel QS tile -->
+    <string name="volume_mode">音声</string>
+    <string name="vibrate_mode">振動</string>
+    <string name="mute_mode">消音</string>
+</resources>
diff --git a/DeviceParts/res/values-ka/strings.xml b/DeviceParts/res/values-ka/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ka/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-km/strings.xml b/DeviceParts/res/values-km/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-km/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ko/strings.xml b/DeviceParts/res/values-ko/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ko/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-lo-rLA/strings.xml b/DeviceParts/res/values-lo-rLA/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-lo-rLA/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-lt/strings.xml b/DeviceParts/res/values-lt/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-lt/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-lv/strings.xml b/DeviceParts/res/values-lv/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-lv/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-mn/strings.xml b/DeviceParts/res/values-mn/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-mn/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ms/strings.xml b/DeviceParts/res/values-ms/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ms/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-nb/strings.xml b/DeviceParts/res/values-nb/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-nb/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ne/strings.xml b/DeviceParts/res/values-ne/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ne/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-night/colors.xml b/DeviceParts/res/values-night/colors.xml
new file mode 100644
index 0000000..2d656f0
--- /dev/null
+++ b/DeviceParts/res/values-night/colors.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2020 The OmniROM Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <color name="colorPrimary">@android:color/system_accent1_100</color>
+</resources>
diff --git a/DeviceParts/res/values-nl/strings.xml b/DeviceParts/res/values-nl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-nl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-pl/strings.xml b/DeviceParts/res/values-pl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-pl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-pt-rBR/strings.xml b/DeviceParts/res/values-pt-rBR/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-pt-rBR/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-pt-rPT/strings.xml b/DeviceParts/res/values-pt-rPT/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-pt-rPT/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-rm/strings.xml b/DeviceParts/res/values-rm/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-rm/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ro/strings.xml b/DeviceParts/res/values-ro/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ro/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ru/strings.xml b/DeviceParts/res/values-ru/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ru/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-si/strings.xml b/DeviceParts/res/values-si/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-si/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sk/strings.xml b/DeviceParts/res/values-sk/strings.xml
new file mode 100644
index 0000000..f407cdd
--- /dev/null
+++ b/DeviceParts/res/values-sk/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="app_name">Zenfone 6</string>
+    <string name="category_gestures_title">Gestá zariadenia</string>
+    <string name="category_vibrator">Vibrovanie</string>
+    <string name="vib_strength_title_head">Intenzita</string>
+    <string name="vib_strength_summary_head">Definujte intenzitu vibrácií</string>
+    <string name="vib_test">Test</string>
+    <string name="advanced_settings">Rozšírené</string>
+    <string name="graphics_title">Grafika</string>
+    <string name="screen_title">citlivosť obrazovky</string>
+    <string name="glove_mode_summary">Zvyšuje citlivosť pri použití rukavíc</string>
+    <string name="glove_mode_title">Režim s rukavicami</string>
+    <string name="proxi_summary_head">Kontrola senzoru priblíženia na ovládanie gest a snímača odtlačkov prstov</string>
+    <string name="proxi_title_head">Kontrola senzoru priblíženia</string>
+    <string name="choose_app">Vybrať aplikáciu</string>
+    <string name="offscreen_gesture_title">Gestá pri vypnutej obrazovke</string>
+    <string name="music_control_title">Ovládanie hudby</string>
+    <string name="music_control_summary">"Nakreslite | | dvoma prstami pre pozastavenie/obnovenie hudby a &lt; alebo &gt; pre zmenu skladby"</string>
+    <string name="category_m_gesture">Písmeno m</string>
+    <string name="category_e_gesture">Písmeno e</string>
+    <string name="category_s_gesture">Písmeno s</string>
+    <string name="category_v_gesture">Písmeno v</string>
+    <string name="category_w_gesture">Písmeno w</string>
+    <string name="category_z_gesture">Písmeno z</string>
+    <string name="category_left_arrow_gesture">Gesto &lt;</string>
+    <string name="category_right_arrow_gesture">Gesto &gt;</string>
+    <string name="category_gestures_summary">Konfigurácia akcií gest</string>
+    <string name="torch_entry">Svietidlo</string>
+    <string name="disabled_entry">Vypnuté</string>
+    <string name="camera_entry">Fotoaparát</string>
+    <string name="camera_label">Otočiť fotoaparát</string>
+    <string name="music_play_entry">Prehrávanie / pozastavenie hudby</string>
+    <string name="music_prev_entry">Predchádzajúca skladba</string>
+    <string name="music_next_entry">Ďalšia skladba</string>
+    <string name="volume_up">Zvýšenie hlasitosti</string>
+    <string name="volume_down">Sníženie hlasitosti</string>
+    <string name="browse_scroll_up">Posunutie nahor</string>
+    <string name="browse_scroll_down">Posunutie nadol</string>
+    <string name="navigate_back">Späť</string>
+    <string name="navigate_home">Domov</string>
+    <string name="navigate_recent">Nedávne</string>
+    <string name="not_ready_summary">Riešenie...</string>
+    <string name="resolve_failed_summary">Riešenie aplikácie zlyhalo</string>
+    <string name="category_down_swipe_gesture">Potiahnutie nadol</string>
+    <string name="category_up_swipe_gesture">Potiahnutie nahor</string>
+    <string name="category_left_swipe_gesture">Potiahnutie vľavo</string>
+    <string name="category_right_swipe_gesture">Potiahnutie vpravo</string>
+    <string name="doze_category_title">Ambientne zobrazenie</string>
+    <string name="doze_category_summary">Prebudiť obrazovku po prijatí upozornenia</string>
+    <string name="wave_check_summary">Zobraziť upozornenia pri mávnutí rukou</string>
+    <string name="wave_check_title">Mávnutie rukou</string>
+    <string name="tilt_check_summary">Zobraziť upozornenia pri zdvihnutí zariadenia</string>
+    <string name="tilt_check_title">Zdvihnutie zariadenia</string>
+    <string name="pocket_check_summary">Zobraziť upozornenia pri vybratí zariadenia z vrecka</string>
+    <string name="pocket_check_title">Vrecko</string>
+    <string name="ambient_display_enable">V nastaveniach obrazovky musí byť zapnuté Ambientne zobrazenie</string>
+    <string name="wake_entry">Prebudenie</string>
+    <string name="swipe_up_to_wake_up_title">Potiahnutím nahor prebudiť</string>
+    <string name="swipe_up_to_wake_up_summary">Potiahnite prstom po obrazovke nahor pre prebudenie zariadenia z režimu nečinnosti</string>
+    <string name="category_frame_rate">FPS obrazovky</string>
+    <string name="refresh_rate_title">Obnovovacia frekvencia</string>
+    <string name="summary_placeholder"></string>
+    <string name="gaming_title">Herný režim</string>
+    <string name="gaming_browse_summary">Nastavenie hry v Hernom režime</string>
+    <!-- Volume panel QS tile -->
+    <string name="volume_mode">Zvuk</string>
+    <string name="vibrate_mode">Vibrovanie</string>
+    <string name="mute_mode">Stlmiť</string>
+</resources>
diff --git a/DeviceParts/res/values-sl/strings.xml b/DeviceParts/res/values-sl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sr/strings.xml b/DeviceParts/res/values-sr/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sr/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sv/strings.xml b/DeviceParts/res/values-sv/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sv/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sw/strings.xml b/DeviceParts/res/values-sw/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sw/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-th/strings.xml b/DeviceParts/res/values-th/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-th/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-tl/strings.xml b/DeviceParts/res/values-tl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-tl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-tr/strings.xml b/DeviceParts/res/values-tr/strings.xml
new file mode 100644
index 0000000..38a789e
--- /dev/null
+++ b/DeviceParts/res/values-tr/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="app_name">Zenfone 6</string>
+    <string name="category_gestures_title">Cihaz hareketleri</string>
+    <string name="category_vibrator">Titreşim motoru</string>
+    <string name="vib_strength_title_head">Şiddet</string>
+    <string name="vib_strength_summary_head">Titreşim motorunun şiddetini belirler</string>
+    <string name="vib_test">Tecrübe edin</string>
+    <string name="advanced_settings">İleri seviye</string>
+    <string name="graphics_title">Grafik</string>
+    <string name="screen_title">Ekran Hassasiyeti</string>
+    <string name="glove_mode_summary">Eldivenle kullanırken dokunma hassasiyetini artırır</string>
+    <string name="glove_mode_title">Eldiven modu</string>
+    <string name="proxi_summary_head">Hareket ve parmak izi sensörünü yönetmek için yakınlık sensörünü yoklar</string>
+    <string name="proxi_title_head">Yakınlık yoklaması</string>
+    <string name="choose_app">Uygulama seçin</string>
+    <string name="offscreen_gesture_title">Kapalı ekran hareketleri</string>
+    <string name="music_control_title">Müzik Kontrolü</string>
+    <string name="music_control_summary">"Müziği duraklatmak ve devam ettirmek için iki parmağınızla | | işaretini, parçayı değiştirmek için &lt; veya &gt; işaretini çizin"</string>
+    <string name="category_m_gesture">M harfi</string>
+    <string name="category_e_gesture">E harfi</string>
+    <string name="category_s_gesture">S harfi</string>
+    <string name="category_v_gesture">V harfi</string>
+    <string name="category_w_gesture">W harfi</string>
+    <string name="category_z_gesture">Z harfi</string>
+    <string name="category_left_arrow_gesture">&lt; hareketi</string>
+    <string name="category_right_arrow_gesture">&gt; hareketi</string>
+    <string name="category_gestures_summary">Hareket eylemlerini ayarlayın</string>
+    <string name="torch_entry">El Feneri</string>
+    <string name="disabled_entry">Devre dışı</string>
+    <string name="camera_entry">Kamera</string>
+    <string name="camera_label">Kamerayı döndür</string>
+    <string name="music_play_entry">Müziği çal veyâ duraklat</string>
+    <string name="music_prev_entry">Evvelki şarkı</string>
+    <string name="music_next_entry">Sonraki şarkı</string>
+    <string name="volume_up">Sesi artır</string>
+    <string name="volume_down">Sesi kıs</string>
+    <string name="browse_scroll_up">Yukarıya kaydır</string>
+    <string name="browse_scroll_down">Aşağıya kaydır</string>
+    <string name="navigate_back">Geri</string>
+    <string name="navigate_home">Ana ekran</string>
+    <string name="navigate_recent">Son uygulamalar</string>
+    <string name="not_ready_summary">Tahlîl ediliyor...</string>
+    <string name="resolve_failed_summary">Uygulamalar tahlîl edilemedi</string>
+    <string name="category_down_swipe_gesture">Aşağıya kaydırma</string>
+    <string name="category_up_swipe_gesture">Yukarıya kaydırma</string>
+    <string name="category_left_swipe_gesture">Sola kaydırma</string>
+    <string name="category_right_swipe_gesture">Sağa kaydırma</string>
+    <string name="doze_category_title">Ortam ekranı</string>
+    <string name="doze_category_summary">Bildirim aldığınızda ekranı uyandırır</string>
+    <string name="wave_check_summary">Bildirimleri el sallandığı zaman gösterir</string>
+    <string name="wave_check_title">El sallama</string>
+    <string name="tilt_check_summary">Bildirimleri cihaz ele alındığı zaman gösterir</string>
+    <string name="tilt_check_title">Ele alma</string>
+    <string name="pocket_check_summary">Bildirimleri cihaz cepten çıkarıldığı zaman gösterir</string>
+    <string name="pocket_check_title">Cep</string>
+    <string name="ambient_display_enable">Ekran ayarlarındaki ortam ekranı devreye sokulmalıdır</string>
+    <string name="wake_entry">Uyanma</string>
+    <string name="swipe_up_to_wake_up_title">Uyandırmak için yukarıya kaydırın</string>
+    <string name="swipe_up_to_wake_up_summary">Cihazınızı bekleme modundan çıkarmak için ekran üzerinde yukarıya doğru kaydırın</string>
+    <string name="category_frame_rate">Ekran FPS\'si</string>
+    <string name="refresh_rate_title">Yenileme oranı</string>
+    <string name="summary_placeholder"></string>
+    <string name="gaming_title">Oyun Cini</string>
+    <string name="gaming_browse_summary">Oyun cini ayarlarını açar</string>
+    <!-- Volume panel QS tile -->
+    <string name="volume_mode">Ses</string>
+    <string name="vibrate_mode">Titreşim</string>
+    <string name="mute_mode">Sessiz</string>
+</resources>
diff --git a/DeviceParts/res/values-uk/strings.xml b/DeviceParts/res/values-uk/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-uk/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-vi/strings.xml b/DeviceParts/res/values-vi/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-vi/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zh-rCN/strings.xml b/DeviceParts/res/values-zh-rCN/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zh-rCN/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zh-rHK/strings.xml b/DeviceParts/res/values-zh-rHK/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zh-rHK/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zh-rTW/strings.xml b/DeviceParts/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zh-rTW/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zu/strings.xml b/DeviceParts/res/values-zu/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zu/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="summary_placeholder"></string>
+    <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values/arrays.xml b/DeviceParts/res/values/arrays.xml
new file mode 100644
index 0000000..e387a34
--- /dev/null
+++ b/DeviceParts/res/values/arrays.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 The OmniROM Project
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+          http://www.apache.org/licenses/LICENSE-2.0
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string-array name="frame_rate_entries" translatable="false">
+        <item>60 Hz</item>
+        <item>90 Hz</item>
+        <item>120 Hz</item>
+        <item>144 Hz</item>
+        <item>160 Hz</item>
+    </string-array>
+
+    <string-array name="frame_rate_values" translatable="false">
+        <item>60</item>
+        <item>90</item>
+        <item>120</item>
+        <item>144</item>
+        <item>160</item>
+    </string-array>
+
+    <string-array name="frame_rate_zf7_entries" translatable="false">
+        <item>60 Hz</item>
+        <item>90 Hz</item>
+    </string-array>
+
+    <string-array name="frame_rate_zf7_values" translatable="false">
+        <item>60</item>
+        <item>90</item>
+    </string-array>
+</resources>
\ No newline at end of file
diff --git a/DeviceParts/res/values/colors.xml b/DeviceParts/res/values/colors.xml
new file mode 100644
index 0000000..9736292
--- /dev/null
+++ b/DeviceParts/res/values/colors.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2022 The OmniROM Project
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <color name="colorPrimary">@android:color/system_accent1_600</color>
+</resources>
diff --git a/DeviceParts/res/values/config.xml b/DeviceParts/res/values/config.xml
new file mode 100644
index 0000000..d396095
--- /dev/null
+++ b/DeviceParts/res/values/config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--  Copyright (C) 2016 The OmniROM Project
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <bool name="config_device_has_hw_nav_buttons">false</bool>
+
+</resources>
diff --git a/DeviceParts/res/values/dimens.xml b/DeviceParts/res/values/dimens.xml
new file mode 100644
index 0000000..7ba469a
--- /dev/null
+++ b/DeviceParts/res/values/dimens.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <dimen name="fragment_side_margin">10dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/DeviceParts/res/values/strings.xml b/DeviceParts/res/values/strings.xml
new file mode 100644
index 0000000..711df79
--- /dev/null
+++ b/DeviceParts/res/values/strings.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <string name="app_name">Zenfone 6</string>
+    <string name="category_gestures_title">Device gestures</string>
+    <string name="category_vibrator">Vibrator</string>
+    <string name="vib_strength_title_head">Strength</string>
+    <string name="vib_strength_summary_head">Define the strength of the vibrator</string>
+    <string name="vib_test">Test</string>
+    <string name="advanced_settings">DeviceParts</string>
+    <string name="graphics_title">Graphics</string>
+    <string name="screen_title">Screen Sensitivity</string>
+    <string name="glove_mode_summary">Increase touch sensitivity when wearing gloves</string>
+    <string name="glove_mode_title">Glove mode</string>
+    <string name="proxi_summary_head">Check proximity sensor for handling fingerprint sensor</string>
+    <string name="proxi_title_head">Proximity check</string>
+
+    <string name="choose_app">Choose app</string>
+    <string name="offscreen_gesture_title">Offscreen gestures</string>
+    <string name="music_control_title">Music Control</string>
+    <string name="music_control_summary">"Draw | | with two fingers to pause/resume music, and &lt; or &gt; to change track"</string>
+    <string name="category_m_gesture">Letter m</string>
+    <string name="category_e_gesture">Letter e</string>
+    <string name="category_s_gesture">Letter s</string>
+    <string name="category_v_gesture">Letter v</string>
+    <string name="category_w_gesture">Letter w</string>
+    <string name="category_z_gesture">Letter z</string>
+    <string name="category_left_arrow_gesture">&lt; gesture</string>
+    <string name="category_right_arrow_gesture">&gt; gesture</string>
+    <string name="category_gestures_summary">Configure gesture actions</string>
+    <string name="torch_entry">Flashlight</string>
+    <string name="disabled_entry">Disabled</string>
+    <string name="camera_entry">Camera</string>
+    <string name="camera_label">Rotate camera</string>
+    <string name="music_play_entry">Play / pause music</string>
+    <string name="music_prev_entry">Prev track</string>
+    <string name="music_next_entry">Next track</string>
+    <string name="volume_up">Raise volume</string>
+    <string name="volume_down">Lower volume</string>
+    <string name="browse_scroll_up">Scroll up</string>
+    <string name="browse_scroll_down">Scroll down</string>
+    <string name="navigate_back">Back</string>
+    <string name="navigate_home">Home</string>
+    <string name="navigate_recent">Recent</string>
+    <string name="not_ready_summary">Resolving...</string>
+    <string name="resolve_failed_summary">Resolving app failed</string>
+    <string name="category_down_swipe_gesture">Down swipe</string>
+    <string name="category_up_swipe_gesture">Up swipe</string>
+    <string name="category_left_swipe_gesture">Left swipe</string>
+    <string name="category_right_swipe_gesture">Right swipe</string>
+
+    <string name="doze_category_title">Ambient display</string>
+    <string name="doze_category_summary">Wake screen when you receive notifications</string>
+    <string name="wave_check_summary">Pulse notifications on hand wave</string>
+    <string name="wave_check_title">Hand wave</string>
+    <string name="tilt_check_summary">Pulse notifications when device is picked up</string>
+    <string name="tilt_check_title">Pick up</string>
+    <string name="pocket_check_summary">Pulse notifications on removal from pocket</string>
+    <string name="pocket_check_title">Pocket</string>
+    <string name="wake_entry">Wakeup</string>
+    <string name="swipe_up_to_wake_up_title">Swipe up to wake up</string>
+    <string name="swipe_up_to_wake_up_summary">Swipe up on the screen to wake up your device from idle mode</string>
+    <string name="category_frame_rate">FPS of the screen</string>
+    <string name="refresh_rate_title">Refresh rate</string>
+    <string name="summary_placeholder"> </string>
+
+    <string name="gaming_title">Game Category</string>
+    <string name="gaming_browse_summary">Launch game genie settings</string>
+    <string name="asus_advanced_settings_gripsensor">AirTriggers</string>
+    <string name="grip_category_title">Launch AirTriggers</string>
+    <string name="grip_category_summary">Settings of your Grip Sensor</string>
+
+    <!-- AudioWizard -->
+    <string name="audio_title">Audio Settings</string>
+    <string name="audio_summary">Audio Settings of the device</string>
+    <string name="audiowizard_entry_title">AudioWizard</string>
+    <string name="outdoor_mode_title">Outdoor mode</string>
+
+    <!-- Volume panel QS tile -->
+    <string name="volume_mode">Sound</string>
+    <string name="vibrate_mode">Vibrate</string>
+    <string name="mute_mode">Mute</string>
+
+    <!-- Zenfone7 Motor settings -->
+    <string name="camera_retraction_category">Camera retraction</string>
+    <string name="calibrate_camera_angle_title">Calibrate camera angle</string>
+    <string name="calibrate_camera_angle_summary">When the flip angle of the camera is abnormal, calibrate the camera to restore to its original position</string>
+
+</resources>
diff --git a/DeviceParts/res/values/styles.xml b/DeviceParts/res/values/styles.xml
new file mode 100644
index 0000000..90fbdb1
--- /dev/null
+++ b/DeviceParts/res/values/styles.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2020 The OmniROM Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<resources>
+    <style name="AppTheme" parent="Theme.Material3.DayNight.NoActionBar">
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorAccent">?attr/colorPrimary</item>
+        <item name="android:navigationBarColor">@android:color/transparent</item>
+        <item name="android:statusBarColor">@android:color/transparent</item>
+        <item name="android:windowLightStatusBar">?attr/isLightTheme</item>
+        <item name="android:windowLightNavigationBar">?attr/isLightTheme</item>
+        <item name="preferenceTheme">@style/Omni.PreferenceTheme</item>
+        <item name="android:switchStyle">@style/Omni.SwitchStyle</item>
+        <item name="android:textAppearanceListItem">@style/Omni.PreferenceTitle</item>
+        <item name="alertDialogTheme">@style/AlertDialogTheme</item>
+    </style>
+
+    <style name="AlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert">
+        <item name="colorAccent">?attr/colorPrimary</item>
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="dialogCornerRadius">8dp</item>
+    </style>
+</resources>
diff --git a/DeviceParts/res/xml/audio_mode.xml b/DeviceParts/res/xml/audio_mode.xml
new file mode 100644
index 0000000..f511c73
--- /dev/null
+++ b/DeviceParts/res/xml/audio_mode.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2023 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <SwitchPreference
+            android:key="outdoor_mode"
+            android:title="@string/outdoor_mode_title"
+            android:persistent="false" />
+
+    <Preference
+        android:title="@string/audiowizard_entry_title"
+        android:key="audiowizard_entry">
+            <intent android:action="android.intent.action.MAIN"
+                    android:targetPackage="com.asus.audiowizard"
+                    android:targetClass="com.asus.audiowizard.MainActivity"/>
+    </Preference>
+
+</PreferenceScreen>
diff --git a/DeviceParts/res/xml/doze_settings.xml b/DeviceParts/res/xml/doze_settings.xml
new file mode 100644
index 0000000..1cb55c5
--- /dev/null
+++ b/DeviceParts/res/xml/doze_settings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014-2016 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+    <SwitchPreference
+        android:key="wave_check"
+        android:summary="@string/wave_check_summary"
+        android:title="@string/wave_check_title"
+        android:persistent="false" />
+    <SwitchPreference
+        android:key="pocket_check"
+        android:summary="@string/pocket_check_summary"
+        android:title="@string/pocket_check_title"
+        android:persistent="false" />
+    <SwitchPreference
+        android:key="tilt_check"
+        android:summary="@string/tilt_check_summary"
+        android:title="@string/tilt_check_title"
+        android:persistent="false" />
+</PreferenceScreen>
diff --git a/DeviceParts/res/xml/gesture_settings.xml b/DeviceParts/res/xml/gesture_settings.xml
new file mode 100644
index 0000000..48b7b87
--- /dev/null
+++ b/DeviceParts/res/xml/gesture_settings.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2017 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <SwitchPreference
+        android:key="proxi"
+        android:summary="@string/proxi_summary_head"
+        android:title="@string/proxi_title_head"
+        android:persistent="false"
+        android:defaultValue="true" />
+
+    <PreferenceCategory
+        android:title="@string/offscreen_gesture_title">
+
+        <SwitchPreference
+            android:key="swipeup"
+            android:title="@string/swipe_up_to_wake_up_title"
+            android:summary="@string/swipe_up_to_wake_up_summary"
+            android:persistent="false" />
+
+        <SwitchPreference
+            android:key="music_gesture_app"
+            android:title="@string/music_control_title"
+            android:summary="@string/music_control_summary"
+            android:persistent="false" />
+
+        <org.omnirom.device.AppSelectListPreference
+            android:key="e_gesture_app"
+            android:title="@string/category_e_gesture"
+            android:persistent="false" />
+
+        <org.omnirom.device.AppSelectListPreference
+            android:key="m_gesture_app"
+            android:title="@string/category_m_gesture"
+            android:persistent="false" />
+
+        <org.omnirom.device.AppSelectListPreference
+            android:key="s_gesture_app"
+            android:title="@string/category_s_gesture"
+            android:persistent="false" />
+
+        <org.omnirom.device.AppSelectListPreference
+            android:key="v_gesture_app"
+            android:title="@string/category_v_gesture"
+            android:persistent="false"/>
+
+        <org.omnirom.device.AppSelectListPreference
+            android:key="w_gesture_app"
+            android:title="@string/category_w_gesture"
+            android:persistent="false"/>
+
+        <org.omnirom.device.AppSelectListPreference
+            android:key="z_gesture_app"
+            android:title="@string/category_z_gesture"
+            android:persistent="false"/>
+
+     </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/DeviceParts/res/xml/main.xml b/DeviceParts/res/xml/main.xml
new file mode 100644
index 0000000..aad09f0
--- /dev/null
+++ b/DeviceParts/res/xml/main.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014-2016 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <PreferenceCategory
+        android:key="audio_category"
+        android:title="@string/audio_title">
+
+    <Preference
+        android:key="audio_pref"
+        android:title="@string/audio_title"
+        android:summary="@string/audio_summary"
+        android:persistent="false" >
+        <intent android:action="android.intent.action.MAIN"
+                android:targetPackage="org.omnirom.device"
+                android:targetClass="org.omnirom.device.AudioSettingsActivity" />
+    </Preference>
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="key_gesture_category"
+        android:title="@string/category_gestures_title">
+    <Preference
+        android:key="gesture_category"
+        android:title="@string/category_gestures_title"
+        android:summary="@string/category_gestures_summary"
+        android:persistent="false" >
+        <intent android:action="android.intent.action.MAIN"
+                android:targetPackage="org.omnirom.device"
+                android:targetClass="org.omnirom.device.GestureSettingsActivity" />
+    </Preference>
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="key_doze_category"
+        android:title="@string/doze_category_title">
+    <Preference
+        android:key="doze_category"
+        android:title="@string/doze_category_title"
+        android:summary="@string/doze_category_summary"
+        android:persistent="false" >
+        <intent android:action="android.intent.action.MAIN"
+                android:targetPackage="org.omnirom.device"
+                android:targetClass="org.omnirom.device.DozeSettingsActivity" />
+    </Preference>
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="category_motor"
+        android:title="@string/camera_retraction_category">
+        <Preference
+            android:key="camera_angle_manager"
+            android:title="@string/calibrate_camera_angle_title"
+            android:summary="@string/calibrate_camera_angle_summary"
+            android:persistent="false" >
+            <intent android:action="android.intent.action.MAIN"
+                android:targetPackage="com.asus.motork"
+                android:targetClass="com.asus.motork.MainActivity" />
+        </Preference>
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="frame_mode_main"
+        android:title="@string/category_frame_rate">
+        <ListPreference
+            android:key="frame_mode_key"
+            android:title="@string/refresh_rate_title"
+            android:entries="@array/frame_rate_entries"
+            android:entryValues="@array/frame_rate_values"
+            android:persistent="false" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="frame_mode_main_zf7"
+        android:title="@string/category_frame_rate">
+        <ListPreference
+            android:key="frame_mode_key_zf7"
+            android:title="@string/refresh_rate_title"
+            android:entries="@array/frame_rate_zf7_entries"
+            android:entryValues="@array/frame_rate_zf7_values"
+            android:persistent="false" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="screen"
+        android:title="@string/screen_title">
+        <SwitchPreference
+            android:key="glove"
+            android:summary="@string/glove_mode_summary"
+            android:title="@string/glove_mode_title"
+            android:persistent="false" />
+    </PreferenceCategory>
+
+    <PreferenceCategory
+        android:key="category_gaming"
+        android:title="@string/gaming_title">
+
+        <SwitchPreference
+            android:key="grip_sensor_apk"
+            android:title="@string/asus_advanced_settings_gripsensor"
+            android:persistent="false" />
+
+        <Preference
+            android:key="grip_sensor_pref"
+            android:title="@string/grip_category_title"
+            android:summary="@string/grip_category_summary"
+            android:persistent="false" >
+            <intent android:action="asus.intent.action.AIRTRIGGER"
+                    android:targetPackage="com.asus.airtriggers"/>
+        </Preference>
+
+        <Preference
+            android:key="game_toolbar_app"
+            android:title="@string/gaming_title"
+            android:summary="@string/gaming_browse_summary"
+            android:persistent="false" >
+            <intent android:action="com.asus.gamewidget.action.SETTINGS"
+                    android:targetPackage="com.asus.gamewidget"/>
+        </Preference>
+
+    </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/DeviceParts/src/org/omnirom/device/Airtrigger.java b/DeviceParts/src/org/omnirom/device/Airtrigger.java
new file mode 100644
index 0000000..6ada330
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/Airtrigger.java
@@ -0,0 +1,49 @@
+/*
+* Copyright (C) 2020 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.ActivityOptions;
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.provider.Settings;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceManager;
+import android.util.Log;
+
+public class Airtrigger {
+
+    private static final String AIRTRIGGER_PACKAGE_NAME = "com.asus.airtriggers";
+    private static final String ACTION_START_AIRTRIGGER_SETTINGS = "asus.intent.action.AIRTRIGGER";
+    private static final String TAG = "AirTriggerApkPreferenceController";
+
+    private Context mContext;
+
+    public Airtrigger(Context context) {
+        mContext = context;
+    }
+
+    protected static void startAirTriggerSettings(Context context) {
+        try {
+            context.startActivity(new Intent(ACTION_START_AIRTRIGGER_SETTINGS).setPackage(AIRTRIGGER_PACKAGE_NAME).addFlags(335544320), ActivityOptions.makeBasic().setLaunchDisplayId(0).toBundle());
+        } catch (ActivityNotFoundException e) {
+            Log.e(TAG, "AirTrigger apk activity not found exception : " + e.toString());
+        }
+    }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java b/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java
new file mode 100644
index 0000000..e8a7d18
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java
@@ -0,0 +1,422 @@
+/*
+* Copyright (C) 2017 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Message;
+import androidx.preference.PreferenceViewHolder;
+import androidx.preference.PreferenceDialogFragment;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import com.android.settingslib.CustomDialogPreferenceCompat;
+
+public class AppSelectListPreference extends CustomDialogPreferenceCompat {
+
+    private static String TAG = "AppSelectListPreference";
+
+    public static final String TORCH_ENTRY = "torch";
+    public static final String DISABLED_ENTRY = "disabled";
+    public static final String CAMERA_ENTRY = "camera";
+    public static final String MUSIC_PLAY_ENTRY = "music_play";
+    public static final String MUSIC_PREV_ENTRY = "music_prev";
+    public static final String MUSIC_NEXT_ENTRY = "music_next";
+    public static final String WAKE_ENTRY = "wake";
+    public static final String VOLUME_UP_ENTRY = "volume_up";
+    public static final String VOLUME_DOWN_ENTRY = "volume_down";
+    public static final String BROWSE_SCROLL_DOWN_ENTRY = "browse_scroll_down";
+    public static final String BROWSE_SCROLL_UP_ENTRY = "browse_scroll_up";
+    public static final String NAVIGATE_BACK_ENTRY = "navigate_back";
+    public static final String NAVIGATE_HOME_ENTRY = "navigate_home";
+    public static final String NAVIGATE_RECENT_ENTRY = "navigate_recent";
+
+    private AppSelectListAdapter mAdapter;
+    private Drawable mAppIconDrawable;
+    private int mAppIconResourceId;
+    private CharSequence mTitle;
+    private String mValue;
+    private PackageManager mPm;
+    private List<PackageItem> mInstalledPackages = new LinkedList<PackageItem>();
+
+    public static class PackageItem implements Comparable<PackageItem> {
+        public final CharSequence mTitle;
+        public final int mAppIconResourceId;
+        public final ComponentName mComponentName;
+        public final String mValue;
+
+        PackageItem(CharSequence title, int iconResourceId, ComponentName componentName) {
+            mTitle = title;
+            mAppIconResourceId = iconResourceId;
+            mComponentName = componentName;
+            mValue = componentName.flattenToString();
+        }
+
+        PackageItem(CharSequence title, int iconResourceId, String value) {
+            mTitle = title;
+            mAppIconResourceId = iconResourceId;
+            mComponentName = null;
+            mValue = value;
+        }
+
+        @Override
+        public int compareTo(PackageItem another) {
+            return mTitle.toString().toUpperCase().compareTo(another.mTitle.toString().toUpperCase());
+        }
+
+        @Override
+        public int hashCode() {
+            return mValue.hashCode();
+        }
+
+        @Override
+        public boolean equals(Object another) {
+            if (another == null || !(another instanceof PackageItem)) {
+                return false;
+            }
+            return mValue.equals(((PackageItem) another).mValue);
+        }
+    }
+
+    public class AppSelectListAdapter extends BaseAdapter {
+        private LayoutInflater mInflater;
+
+        public AppSelectListAdapter(Context context) {
+            mInflater = LayoutInflater.from(context);
+        }
+
+        @Override
+        public int getCount() {
+            return mInstalledPackages.size();
+        }
+
+        @Override
+        public PackageItem getItem(int position) {
+            return mInstalledPackages.get(position);
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return mInstalledPackages.get(position).hashCode();
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            ViewHolder holder;
+            if (convertView != null) {
+                holder = (ViewHolder) convertView.getTag();
+            } else {
+                convertView = mInflater.inflate(R.layout.applist_preference_icon, null, false);
+                holder = new ViewHolder();
+                convertView.setTag(holder);
+                holder.title = (TextView) convertView.findViewById(R.id.title);
+                holder.icon = (ImageView) convertView.findViewById(R.id.icon);
+            }
+
+            PackageItem applicationInfo = getItem(position);
+            holder.title.setText(applicationInfo.mTitle);
+            if (applicationInfo.mAppIconResourceId != 0) {
+                holder.icon.setImageResource(applicationInfo.mAppIconResourceId);
+            } else {
+                Drawable d = resolveAppIcon(applicationInfo);
+                holder.icon.setImageDrawable(d);
+            }
+            return convertView;
+        }
+
+        private PackageItem resolveApplication(ComponentName componentName) {
+            for (PackageItem item : mInstalledPackages) {
+                if (item.mComponentName != null && item.mComponentName.equals(componentName)) {
+                    return item;
+                }
+            }
+            return null;
+        }
+
+        private class ViewHolder {
+            TextView title;
+            TextView summary;
+            ImageView icon;
+        }
+    }
+
+    public AppSelectListPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public AppSelectListPreference(Context context, int color) {
+        super(context, null);
+        init();
+    }
+
+    public void setPackageList(List<PackageItem> installedPackages) {
+        mInstalledPackages.clear();
+        mInstalledPackages.addAll(installedPackages);
+        addSpecialApps();
+        mAdapter.notifyDataSetChanged();
+        updatePreferenceViews();
+    }
+
+    private void init() {
+        mPm = getContext().getPackageManager();
+        setDialogLayoutResource(R.layout.preference_dialog_applist);
+        setLayoutResource(R.layout.preference_app_select);
+        setNegativeButtonText(android.R.string.cancel);
+        setPositiveButtonText(null);
+        setDialogTitle(R.string.choose_app);
+        setDialogIcon(null);
+        mAdapter = new AppSelectListAdapter(getContext());
+    }
+
+    private void addSpecialApps() {
+        PackageItem cameraItem = new PackageItem(getContext().getResources().getString(R.string.camera_entry),
+                R.drawable.ic_camera, CAMERA_ENTRY);
+        mInstalledPackages.add(0, cameraItem);
+
+        PackageItem torchItem = new PackageItem(getContext().getResources().getString(R.string.torch_entry),
+                R.drawable.ic_flashlight, TORCH_ENTRY);
+        mInstalledPackages.add(0, torchItem);
+
+        PackageItem musicNextItem = new PackageItem(getContext().getResources().getString(R.string.music_next_entry),
+                R.drawable.ic_music_next, MUSIC_NEXT_ENTRY);
+        mInstalledPackages.add(0, musicNextItem);
+
+        PackageItem musicPrevItem = new PackageItem(getContext().getResources().getString(R.string.music_prev_entry),
+                R.drawable.ic_music_prev, MUSIC_PREV_ENTRY);
+        mInstalledPackages.add(0, musicPrevItem);
+
+        PackageItem musicPlayItem = new PackageItem(getContext().getResources().getString(R.string.music_play_entry),
+                R.drawable.ic_music_play, MUSIC_PLAY_ENTRY);
+        mInstalledPackages.add(0, musicPlayItem);
+
+        PackageItem wakeItem = new PackageItem(getContext().getResources().getString(R.string.wake_entry),
+                R.drawable.ic_wakeup, WAKE_ENTRY);
+        mInstalledPackages.add(0, wakeItem);
+
+        PackageItem volumeUpItem = new PackageItem(
+                getContext().getResources().getString(R.string.volume_up),
+                R.drawable.ic_settings_sound, VOLUME_UP_ENTRY);
+        mInstalledPackages.add(0, volumeUpItem);
+
+        PackageItem volumeDownItem = new PackageItem(
+                getContext().getResources().getString(R.string.volume_down),
+                R.drawable.ic_settings_sound, VOLUME_DOWN_ENTRY);
+        mInstalledPackages.add(0, volumeDownItem);
+
+        PackageItem browseScrollDownItem = new PackageItem(
+                getContext().getResources().getString(R.string.browse_scroll_down),
+                R.drawable.arrow_collapse_down, BROWSE_SCROLL_DOWN_ENTRY);
+        mInstalledPackages.add(0, browseScrollDownItem);
+
+        PackageItem browseScrollUpItem = new PackageItem(
+                getContext().getResources().getString(R.string.browse_scroll_up),
+                R.drawable.arrow_collapse_up, BROWSE_SCROLL_UP_ENTRY);
+        mInstalledPackages.add(0, browseScrollUpItem);
+
+        PackageItem navigateBackItem = new PackageItem(
+                getContext().getResources().getString(R.string.navigate_back),
+                R.drawable.back, NAVIGATE_BACK_ENTRY);
+        mInstalledPackages.add(0, navigateBackItem);
+
+        PackageItem navigateHomeItem = new PackageItem(
+                getContext().getResources().getString(R.string.navigate_home),
+                R.drawable.home, NAVIGATE_HOME_ENTRY);
+        mInstalledPackages.add(0, navigateHomeItem);
+
+        PackageItem navigateRecentItem = new PackageItem(
+                getContext().getResources().getString(R.string.navigate_recent),
+                R.drawable.recent, NAVIGATE_RECENT_ENTRY);
+        mInstalledPackages.add(0, navigateRecentItem);
+        
+        PackageItem disabledItem = new PackageItem(getContext().getResources().getString(R.string.disabled_entry),
+                R.drawable.ic_disabled, DISABLED_ENTRY);
+        mInstalledPackages.add(0, disabledItem);
+    }
+
+    @Override
+    protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) {
+        super.onSetInitialValue(restorePersistedValue, defaultValue);
+        if (mTitle != null) {
+            setSummary(mTitle);
+        } else {
+            setSummary(getContext().getResources().getString(R.string.not_ready_summary));
+        }
+        mAppIconResourceId = R.drawable.ic_disabled;
+        setIcon(mAppIconResourceId);
+    }
+
+    @Override
+    protected void onBindDialogView(View view) {
+        super.onBindDialogView(view);
+
+        final ListView list = (ListView) view.findViewById(R.id.applist);
+        list.setAdapter(mAdapter);
+        list.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                PackageItem info = (PackageItem) parent.getItemAtPosition(position);
+                mValue = info.mValue;
+                if (shouldPersist()) {
+                    persistString(mValue);
+                }
+                mTitle = info.mTitle;
+                mAppIconDrawable = null;
+                mAppIconResourceId = 0;
+                if (info.mComponentName != null) {
+                    mAppIconDrawable = resolveAppIcon(info);
+                } else {
+                    mAppIconResourceId = info.mAppIconResourceId;
+                }
+
+                updatePreferenceViews();
+                callChangeListener(mValue);
+                getDialog().dismiss();
+            }
+        });
+    }
+
+    private void updatePreferenceViews() {
+        String name = null;
+        if (shouldPersist()) {
+            name = getPersistedString(null);
+        } else {
+            name = mValue;
+        }
+        mAppIconResourceId = R.drawable.ic_disabled;
+
+        if (name != null) {
+            mAppIconDrawable = null;
+            if (name.equals(DISABLED_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.disabled_entry);
+                mAppIconResourceId = R.drawable.ic_disabled;
+            } else if (name.equals(TORCH_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.torch_entry);
+                mAppIconResourceId = R.drawable.ic_flashlight;
+            } else if (name.equals(CAMERA_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.camera_entry);
+                mAppIconResourceId = R.drawable.ic_camera;
+            } else if (name.equals(MUSIC_PLAY_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.music_play_entry);
+                mAppIconResourceId = R.drawable.ic_music_play;
+            } else if (name.equals(MUSIC_NEXT_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.music_next_entry);
+                mAppIconResourceId = R.drawable.ic_music_next;
+            } else if (name.equals(MUSIC_PREV_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.music_prev_entry);
+                mAppIconResourceId = R.drawable.ic_music_prev;
+            } else if (name.equals(WAKE_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.wake_entry);
+                mAppIconResourceId = R.drawable.ic_wakeup;
+            } else if (name.equals(VOLUME_UP_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.volume_up);
+                mAppIconResourceId = R.drawable.ic_settings_sound;
+            } else if (name.equals(VOLUME_DOWN_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.volume_down);
+                mAppIconResourceId = R.drawable.ic_settings_sound;
+            } else if (name.equals(BROWSE_SCROLL_DOWN_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.browse_scroll_down);
+                mAppIconResourceId = R.drawable.arrow_collapse_down;
+            } else if (name.equals(BROWSE_SCROLL_UP_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.browse_scroll_up);
+                mAppIconResourceId = R.drawable.arrow_collapse_up;
+            } else if (name.equals(NAVIGATE_BACK_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.navigate_back);
+                mAppIconResourceId = R.drawable.back;
+            } else if (name.equals(NAVIGATE_HOME_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.navigate_home);
+                mAppIconResourceId = R.drawable.home;
+            } else if (name.equals(NAVIGATE_RECENT_ENTRY)) {
+                mTitle = getContext().getResources().getString(R.string.navigate_recent);
+                mAppIconResourceId = R.drawable.recent;
+            } else {
+                ComponentName componentName = ComponentName.unflattenFromString(name);
+                PackageItem item = mAdapter.resolveApplication(componentName);
+                if (item != null) {
+                    mTitle = item.mTitle;
+                    mAppIconDrawable = resolveAppIcon(item);
+                } else {
+                    mTitle = getContext().getResources().getString(R.string.resolve_failed_summary);
+                }
+            }
+        } else {
+            mTitle = getContext().getResources().getString(R.string.disabled_entry);
+            mAppIconResourceId = R.drawable.ic_disabled;
+        }
+
+        setSummary(mTitle);
+        if (mAppIconDrawable != null) {
+            setIcon(mAppIconDrawable);
+        } else {
+            setIcon(mAppIconResourceId);
+        }
+    }
+
+    private Drawable getDefaultActivityIcon() {
+        return getContext().getResources().getDrawable(android.R.drawable.sym_def_app_icon);
+    }
+
+    public String getValue() {
+        return mValue;
+    }
+
+    public void setValue(String value) {
+        mValue = value;
+    }
+
+    private Drawable resolveAppIcon(PackageItem item) {
+        Drawable appIcon = null;
+        try {
+            appIcon = mPm.getActivityIcon(item.mComponentName);
+        } catch (PackageManager.NameNotFoundException e) {
+        }
+        if (appIcon == null) {
+            appIcon = getDefaultActivityIcon();
+        }
+        return appIcon;
+    }
+
+    public static class AppSelectListPreferenceDialogFragment
+            extends CustomDialogPreferenceCompat.CustomPreferenceDialogFragment {
+        public static CustomDialogPreferenceCompat.CustomPreferenceDialogFragment
+                newInstance(String key) {
+            return CustomDialogPreferenceCompat.CustomPreferenceDialogFragment.newInstance(key);
+        }
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/AudioSettings.java b/DeviceParts/src/org/omnirom/device/AudioSettings.java
new file mode 100644
index 0000000..0a91d7f
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/AudioSettings.java
@@ -0,0 +1,105 @@
+/*
+* Copyright (C) 2023 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.util.Log;
+
+public class AudioSettings extends PreferenceFragmentCompat implements
+        Preference.OnPreferenceChangeListener {
+
+    private static final String TAG = "AudioWizardControllerOmni";
+
+    private static final String KEY_AUDIOWIZARD = "audiowizard_entry";
+    private static final String KEY_OUTDOOR_MODE = "outdoor_mode";
+    private static final String PACKAGE_NAME = "com.asus.audiowizard";
+    private static final String SETTINGS_KEY_AUDIO_OUTDOOR_MODE = "audio_outdoor_mode";
+    private static final String SETTINGS_KEY_AUDIO_SUMMARY_KEY = "settings_key_audio_wizard_summary";
+    private static final int SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_OFF = 0;
+    private static final int SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_ON = 1;
+
+    private TwoStatePreference mOutdoorMode;
+    private Preference mWizard;
+
+    @Override
+    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+        setPreferencesFromResource(R.xml.audio_mode, rootKey);
+        final PreferenceScreen prefScreen = getPreferenceScreen();
+
+        mOutdoorMode = (TwoStatePreference) findPreference(KEY_OUTDOOR_MODE);
+        mOutdoorMode.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+            SETTINGS_KEY_AUDIO_OUTDOOR_MODE,
+            SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_OFF)==
+            SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_ON);
+
+        mWizard = prefScreen.findPreference(KEY_AUDIOWIZARD);
+        mWizard.setEnabled(isEnable());
+        updateState();
+
+    }
+
+    @Override
+    public boolean onPreferenceTreeClick(Preference preference) {
+        if (preference == mOutdoorMode) {
+            Settings.System.putInt(getContext().getContentResolver(),
+                SETTINGS_KEY_AUDIO_OUTDOOR_MODE, mOutdoorMode.isChecked() ?
+                SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_ON :
+                SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_OFF);
+            updateState();
+            return true;
+        }
+        return super.onPreferenceTreeClick(preference);
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        return true;
+    }
+
+    private void updateState() {
+        String summaryString = getSummaryString();
+        Log.i(TAG, "updateState summary = " + summaryString);
+        if (!TextUtils.isEmpty(summaryString)) {
+            mWizard.setSummary(summaryString);
+        } else {
+            mWizard.setSummary("");
+        }
+    }
+
+    private boolean isEnable() {
+        try {
+            boolean UIenable = getContext().getPackageManager().getApplicationInfo(PACKAGE_NAME, 0).enabled;
+            Log.d(TAG, " UIenable = " + UIenable);
+            return UIenable;
+        } catch (PackageManager.NameNotFoundException e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    private String getSummaryString() {
+        return Settings.System.getString(getContext().getContentResolver(), SETTINGS_KEY_AUDIO_SUMMARY_KEY);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/AudioSettingsActivity.java b/DeviceParts/src/org/omnirom/device/AudioSettingsActivity.java
new file mode 100644
index 0000000..91691fd
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/AudioSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2023 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class AudioSettingsActivity extends AppCompatActivity  {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.settings_activity);
+        setSupportActionBar(findViewById(R.id.toolbar));
+        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+    }
+
+    @Override
+    protected void onPostCreate(Bundle savedInstanceState) {
+        super.onPostCreate(savedInstanceState);
+        getSupportFragmentManager().beginTransaction()
+            .replace(R.id.fragment_container, new DeviceSettings())
+            .commit();
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+        case android.R.id.home:
+            finish();
+            return true;
+        default:
+            break;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DeviceSettings.java b/DeviceParts/src/org/omnirom/device/DeviceSettings.java
new file mode 100644
index 0000000..fdc3d54
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DeviceSettings.java
@@ -0,0 +1,217 @@
+/*
+* Copyright (C) 2016 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.Parcel;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.UserHandle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.SwitchPreference;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.util.Log;
+import java.util.Map;
+
+public class DeviceSettings extends PreferenceFragmentCompat implements
+        Preference.OnPreferenceChangeListener {
+
+    public static final String KEY_SETTINGS_PREFIX = "device_setting_";
+    public static final String KEY_GLOVE_SWITCH = "glove";
+
+    private static final String KEY_CATEGORY_AUDIO = "audio_category";
+    private static final String KEY_CATEGORY_MOTOR = "category_motor";
+    private static final String KEY_CATEGORY_GAMING = "category_gaming";
+    private static final String KEY_CATEGORY_SCREEN = "screen";
+    public static final String KEY_GAME_GENIE = "game_toolbar_app";
+    private static final String KEY_FRAME_MODE = "frame_mode_key";
+    private static final String KEY_FRAME_MODE_ZF7 = "frame_mode_key_zf7";
+    private static final String KEY_FRAME_CATEGORY = "frame_mode_main";
+    private static final String KEY_FRAME_CATEGORY_ZF7 = "frame_mode_main_zf7";
+    public static final String FPS = "fps";
+
+    protected static final String DEFAULT_FPS_VALUE = "60";
+    private static final String ACTION_AIR_TRIGGER_OFF = "com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_OFF";
+    private static final String ACTION_AIR_TRIGGER_ON = "com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_ON";
+    private static final String AIRTRIGGER_PACKAGE_NAME = "com.asus.airtriggers";
+    private static final String FIELD_AIR_TRIGGER_ENABLE = "air_trigger_enable";
+    public static final String KEY_AIRTRIGGER = "grip_sensor_apk";
+    public static final String KEY_AIRTRIGGER_PREF = "grip_sensor_pref";
+    private static final String TAG = "AirTriggerApkPreferenceController";
+
+    private Airtrigger mAirtrigger;
+    private static Preference mAirtriggerPref;
+    private static ListPreference mFrameModeRate;
+    private static ListPreference mFrameModeRateZF7;
+    private static SwitchPreference mGripSensorPreference;
+    private static TwoStatePreference mGloveModeSwitch;
+    private static Preference mGameGenie;
+
+    protected static final boolean isRog3 = android.os.Build.DEVICE.equals("ASUS_I003_1");
+    private static final String SURFACE_FLINGER_SERVICE_KEY = "SurfaceFlinger";
+    private static final String SURFACE_COMPOSER_INTERFACE_KEY = "android.ui.ISurfaceComposer";
+    private static final int SURFACE_FLINGER_CODE = 1035;
+    private static Map<Integer, Integer> fpsMap = Map.of(160, 0, 144, 1, 120, 2, 90, 3, 60, 4);
+    private static Map<Integer, Integer> fpsMapZF7 = Map.of(90, 0, 60, 1);
+    private static IBinder mSurfaceFlinger;
+
+    @Override
+    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+        setPreferencesFromResource(R.xml.main, rootKey);
+        final PreferenceScreen prefScreen = getPreferenceScreen();
+        final PreferenceCategory audioCategory =
+                (PreferenceCategory) prefScreen.findPreference(KEY_CATEGORY_AUDIO);
+        final PreferenceCategory fpsCategory =
+                (PreferenceCategory) prefScreen.findPreference(KEY_FRAME_CATEGORY);
+        final PreferenceCategory fpsCategoryzf7 =
+                (PreferenceCategory) prefScreen.findPreference(KEY_FRAME_CATEGORY_ZF7);
+        final PreferenceCategory GamingCategory =
+                (PreferenceCategory) prefScreen.findPreference(KEY_CATEGORY_GAMING);
+        final PreferenceCategory MotorCategory =
+                (PreferenceCategory) prefScreen.findPreference(KEY_CATEGORY_MOTOR);
+
+        mFrameModeRate = (ListPreference) findPreference(KEY_FRAME_MODE);
+        int framevalue = Settings.System.getInt(getContext().getContentResolver(),
+                            FPS, 60);
+        mFrameModeRate.setValue(Integer.toString(framevalue));
+        mFrameModeRate.setSummary(mFrameModeRate.getEntry());
+        mFrameModeRate.setOnPreferenceChangeListener(this);
+
+        mFrameModeRateZF7 = (ListPreference) findPreference(KEY_FRAME_MODE_ZF7);
+        int framevaluezf7 = Settings.System.getInt(getContext().getContentResolver(),
+                            FPS, 60);
+        mFrameModeRateZF7.setValue(Integer.toString(framevaluezf7));
+        mFrameModeRateZF7.setSummary(mFrameModeRateZF7.getEntry());
+        mFrameModeRateZF7.setOnPreferenceChangeListener(this);
+
+        if (isRog3) {
+            prefScreen.removePreference(fpsCategoryzf7);
+        } else {
+            prefScreen.removePreference(audioCategory);
+            prefScreen.removePreference(fpsCategory);
+        }
+
+        mGloveModeSwitch = (TwoStatePreference) findPreference(KEY_GLOVE_SWITCH);
+        mGloveModeSwitch.setEnabled(GloveModeSwitch.isSupported());
+        mGloveModeSwitch.setChecked(GloveModeSwitch.isCurrentlyEnabled(this.getContext()));
+        mGloveModeSwitch.setOnPreferenceChangeListener(new GloveModeSwitch(getContext()));
+
+        mGameGenie = findPreference(KEY_GAME_GENIE);
+        mGameGenie.setEnabled(GameGenie.isGameGenieExist(this.getContext()));
+
+        mAirtriggerPref = findPreference(KEY_AIRTRIGGER_PREF);
+        mAirtriggerPref.setOnPreferenceChangeListener(this);
+        if (!isRog3) {
+            prefScreen.removePreference(GamingCategory);
+        }
+
+        if (isRog3) {
+            mGripSensorPreference = (SwitchPreference) findPreference(KEY_AIRTRIGGER);
+            mGripSensorPreference.setChecked(Settings.Global.getInt(getContext().getContentResolver(),
+            FIELD_AIR_TRIGGER_ENABLE, 0) == 1);
+            mGripSensorPreference.setOnPreferenceChangeListener(this);
+
+            // Remove the camera motor category for the Rog3
+            prefScreen.removePreference(MotorCategory);
+        }
+
+    }
+
+    @Override
+    public boolean onPreferenceTreeClick(Preference preference) {
+        if (preference == mAirtriggerPref) {
+            mAirtrigger.startAirTriggerSettings(this.getContext());
+        }
+        return super.onPreferenceTreeClick(preference);
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        if (preference == mFrameModeRate) {
+            int value = Integer.valueOf((String) newValue);
+            int index = mFrameModeRate.findIndexOfValue((String) newValue);
+            mFrameModeRate.setSummary(mFrameModeRate.getEntries()[index]);
+            changeFps(getContext(), value);
+            Settings.System.putInt(getContext().getContentResolver(), FPS, value);
+        }
+        if (preference == mFrameModeRateZF7) {
+            int value = Integer.valueOf((String) newValue);
+            int index = mFrameModeRateZF7.findIndexOfValue((String) newValue);
+            mFrameModeRateZF7.setSummary(mFrameModeRateZF7.getEntries()[index]);
+            changeFps(getContext(), value);
+            Settings.System.putInt(getContext().getContentResolver(), FPS, value);
+        }
+        if (preference == mGripSensorPreference) {
+            notifySwitchState(((Boolean) newValue).booleanValue());
+        }
+        return true;
+    }
+
+    protected static void changeFps(Context context, int fps) {
+        mSurfaceFlinger = ServiceManager.getService(SURFACE_FLINGER_SERVICE_KEY);
+        try {
+            if (mSurfaceFlinger != null) {
+                mSurfaceFlinger = ServiceManager.getService(SURFACE_FLINGER_SERVICE_KEY);
+                Parcel data = Parcel.obtain();
+                data.writeInterfaceToken(SURFACE_COMPOSER_INTERFACE_KEY);
+                if (isRog3) {
+                    data.writeInt(fpsMap.getOrDefault(fps, -1));
+                } else {
+                    data.writeInt(fpsMapZF7.getOrDefault(fps, -1));
+                }
+                mSurfaceFlinger.transact(SURFACE_FLINGER_CODE, data, null, 0);
+                data.recycle();
+                if (isRog3) {
+                    System.out.println("OmnifpsMap: " + fpsMap +" Omnifps: "+ fps);
+                } else {
+                    System.out.println("OmnifpsMap: " + fpsMapZF7 +" Omnifps: "+ fps);
+                }
+            }
+        } catch (RemoteException ex) {
+               // intentional no-op
+        }
+            Settings.System.putInt(context.getContentResolver(), DeviceSettings.FPS, fps);
+    }
+
+    private void notifySwitchState(boolean z) {
+        Log.d(TAG, "notifySwitchState enabled=" + z);
+        Intent intent = new Intent();
+        intent.setAction(z ? ACTION_AIR_TRIGGER_ON : ACTION_AIR_TRIGGER_OFF);
+        intent.setPackage(AIRTRIGGER_PACKAGE_NAME);
+        getContext().sendBroadcastAsUser(intent, UserHandle.CURRENT);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java b/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java
new file mode 100644
index 0000000..1424f35
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2017 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class DeviceSettingsActivity extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.settings_activity);
+        setSupportActionBar(findViewById(R.id.toolbar));
+        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+    }
+
+    @Override
+    protected void onPostCreate(Bundle savedInstanceState) {
+        super.onPostCreate(savedInstanceState);
+        getSupportFragmentManager().beginTransaction()
+            .replace(R.id.fragment_container, new DeviceSettings())
+            .commit();
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+        case android.R.id.home:
+            finish();
+            return true;
+        default:
+            break;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettings.java b/DeviceParts/src/org/omnirom/device/DozeSettings.java
new file mode 100644
index 0000000..74d8715
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DozeSettings.java
@@ -0,0 +1,105 @@
+/*
+* Copyright (C) 2017 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.res.Resources;
+import android.content.Intent;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.util.Log;
+
+import org.omnirom.omnilib.utils.OmniSettings;
+
+public class DozeSettings extends PreferenceFragmentCompat {
+
+    private static final String KEY_WAVE_CHECK = "wave_check";
+    private static final String KEY_POCKET_CHECK = "pocket_check";
+    private static final String KEY_TILT_CHECK = "tilt_check";
+
+    private boolean mUseTiltCheck;
+    private boolean mUseWaveCheck;
+    private boolean mUsePocketCheck;
+
+    @Override
+    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+        setPreferencesFromResource(R.xml.doze_settings, rootKey);
+
+        getDozeSettings();
+
+        TwoStatePreference waveSwitch = (TwoStatePreference) findPreference(KEY_WAVE_CHECK);
+        waveSwitch.setChecked(mUseWaveCheck);
+        waveSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                mUseWaveCheck = (Boolean) newValue;
+                setDozeSettings();
+                return true;
+            }
+        });
+        TwoStatePreference pocketSwitch = (TwoStatePreference) findPreference(KEY_POCKET_CHECK);
+        pocketSwitch.setChecked(mUsePocketCheck);
+        pocketSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                mUsePocketCheck = (Boolean) newValue;
+                setDozeSettings();
+                return true;
+            }
+        });
+        TwoStatePreference tiltSwitch = (TwoStatePreference) findPreference(KEY_TILT_CHECK);
+        tiltSwitch.setChecked(mUseTiltCheck);
+        tiltSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+            @Override
+            public boolean onPreferenceChange(Preference preference, Object newValue) {
+                mUseTiltCheck = (Boolean) newValue;
+                setDozeSettings();
+                return true;
+            }
+        });
+    }
+
+    private void getDozeSettings() {
+        String value = Settings.System.getString(getContext().getContentResolver(),
+                    OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS);
+        if (!TextUtils.isEmpty(value)) {
+            String[] parts = value.split(":");
+            mUseWaveCheck = Boolean.valueOf(parts[0]);
+            mUsePocketCheck = Boolean.valueOf(parts[1]);
+            mUseTiltCheck = Boolean.valueOf(parts[2]);
+        }
+    }
+
+    private void setDozeSettings() {
+        String newValue = String.valueOf(mUseWaveCheck) + ":" + String.valueOf(mUsePocketCheck) + ":" + String.valueOf(mUseTiltCheck);
+        Settings.System.putString(getContext().getContentResolver(), OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS, newValue);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java b/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java
new file mode 100644
index 0000000..28a1263
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2017 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class DozeSettingsActivity extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.settings_activity);
+        setSupportActionBar(findViewById(R.id.toolbar));
+        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+    }
+
+    @Override
+    protected void onPostCreate(Bundle savedInstanceState) {
+        super.onPostCreate(savedInstanceState);
+        getSupportFragmentManager().beginTransaction()
+            .replace(R.id.fragment_container, new DozeSettings())
+            .commit();
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+        case android.R.id.home:
+            finish();
+            return true;
+        default:
+            break;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/FrameRateTileService.java b/DeviceParts/src/org/omnirom/device/FrameRateTileService.java
new file mode 100644
index 0000000..f11ff98
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/FrameRateTileService.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2020 The OmniROM 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.
+ */
+package org.omnirom.device;
+
+import android.graphics.drawable.Icon;
+import android.provider.Settings;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+
+public class FrameRateTileService extends TileService {
+
+    private static final boolean isRog3 = android.os.Build.DEVICE.equals("ASUS_I003_1");
+    private static final String DEFAULT_FPS_VALUE = "60";
+    private static final String FPS_VALUE_90 = "90";
+    private static final String FPS_VALUE_120 = "120";
+    private static final String FPS_VALUE_144 = "144";
+    private static final String FPS_VALUE_160 = "160";
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+    }
+
+    @Override
+    public void onTileAdded() {
+        super.onTileAdded();
+    }
+
+    @Override
+    public void onTileRemoved() {
+        super.onTileRemoved();
+    }
+
+    @Override
+    public void onStartListening() {
+        super.onStartListening();
+
+        String value = Settings.System.getString(this.getContentResolver(), DeviceSettings.FPS);
+        getQsTile().setState(Tile.STATE_ACTIVE);
+        switch (value) {
+            case DEFAULT_FPS_VALUE:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
+                break;
+            case FPS_VALUE_90:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_90));
+                break;
+            case FPS_VALUE_120:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_120));
+                break;
+            case FPS_VALUE_144:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_144));
+                break;
+            case FPS_VALUE_160:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_160));
+                break;
+        }
+        getQsTile().updateTile();
+    }
+
+    @Override
+    public void onStopListening() {
+        super.onStopListening();
+    }
+
+    @Override
+    public void onClick() {
+        super.onClick();
+
+        String value = Settings.System.getString(this.getContentResolver(), DeviceSettings.FPS);
+
+        switch (value) {
+            case DEFAULT_FPS_VALUE:
+                DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_90));
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_90));
+                break;
+            case FPS_VALUE_90:
+                if (isRog3) {
+                    DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_120));
+                    getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_120));
+                    break;
+                } else {
+                    DeviceSettings.changeFps(this, Integer.valueOf(DEFAULT_FPS_VALUE));
+                    getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
+                    break;
+                }
+            case FPS_VALUE_120:
+                DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_144));
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_144));
+                break;
+            case FPS_VALUE_144:
+                DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_160));
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_160));
+                break;
+            case FPS_VALUE_160:
+                DeviceSettings.changeFps(this, Integer.valueOf(DEFAULT_FPS_VALUE));
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
+                break;
+        }
+        getQsTile().updateTile();
+    }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GameGenie.java b/DeviceParts/src/org/omnirom/device/GameGenie.java
new file mode 100644
index 0000000..15b2e1e
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GameGenie.java
@@ -0,0 +1,51 @@
+/*
+* Copyright (C) 2020 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.util.Log;
+
+public class GameGenie {
+
+    private static final String TAG = "GameGenieController";
+    private static final String GAMEGENIE_PACKAGE_NAME = "com.asus.gamewidget";
+
+    private Context mContext;
+
+    public GameGenie(Context context) {
+        mContext = context;
+    }
+
+    public static boolean isGameGenieExist(Context context) {
+        try {
+            ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(GAMEGENIE_PACKAGE_NAME, 0);
+            if (!applicationInfo.enabled || (applicationInfo.flags & 1) == 0) {
+                return false;
+            }
+            return true;
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.e(TAG, "Game genie apk not found exception : " + e.toString());
+            return false;
+        }
+    }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GestureSettings.java b/DeviceParts/src/org/omnirom/device/GestureSettings.java
new file mode 100644
index 0000000..27920a4
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GestureSettings.java
@@ -0,0 +1,333 @@
+/*
+* Copyright (C) 2017 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import androidx.fragment.app.DialogFragment;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.util.Log;
+import static android.provider.Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED;
+import android.os.UserHandle;
+
+import org.omnirom.omnilib.utils.OmniSettings;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+public class GestureSettings extends PreferenceFragmentCompat implements
+        Preference.OnPreferenceChangeListener {
+
+    public static final String KEY_PROXI_SWITCH = "proxi";
+    public static final String KEY_OFF_SCREEN_GESTURE_FEEDBACK_SWITCH = "off_screen_gesture_feedback";
+    public static final String KEY_OFFSCREEN_GESTURE = "zenmotion";
+    public static final String KEY_SWIPEUP_SWITCH = "swipeup";
+    public static final String KEY_SETTINGS_SWIPEUP_PREFIX = "gesture_setting_";
+
+    public static final String SETTINGS_GESTURE_KEY = KEY_SETTINGS_SWIPEUP_PREFIX + KEY_SWIPEUP_SWITCH;
+    public static final String SETTINGS_ZENMOTION_KEY = KEY_SETTINGS_SWIPEUP_PREFIX + KEY_OFFSCREEN_GESTURE;
+
+    public static final int KEY_W_ID = 0;
+    public static final int KEY_S_ID = 1;
+    public static final int KEY_E_ID = 2;
+    public static final int KEY_M_ID = 3;
+    public static final int KEY_Z_ID = 4;
+    public static final int KEY_V_ID = 5;
+    public static final int KEY_MUSIC_ID = 6;
+
+    public static final String KEY_E_APP = "e_gesture_app";
+    public static final String KEY_M_APP = "m_gesture_app";
+    public static final String KEY_S_APP = "s_gesture_app";
+    public static final String KEY_V_APP = "v_gesture_app";
+    public static final String KEY_W_APP = "w_gesture_app";
+    public static final String KEY_Z_APP = "z_gesture_app";
+    public static final String KEY_MUSIC = "music_gesture_app";
+    public static final String KEY_OFFSCREEN = "offscreen_gestures";
+
+    public static final String DEVICE_GESTURE_MAPPING_0 = "device_gesture_mapping_0_0";
+    public static final String DEVICE_GESTURE_MAPPING_1 = "device_gesture_mapping_1_0";
+    public static final String DEVICE_GESTURE_MAPPING_2 = "device_gesture_mapping_2_0";
+    public static final String DEVICE_GESTURE_MAPPING_3 = "device_gesture_mapping_3_0";
+    public static final String DEVICE_GESTURE_MAPPING_4 = "device_gesture_mapping_4_0";
+    public static final String DEVICE_GESTURE_MAPPING_5 = "device_gesture_mapping_5_0";
+
+    private TwoStatePreference mMusicSwitch;
+    private TwoStatePreference mProxiSwitch;
+    private TwoStatePreference mSwipeUpSwitch;
+    private AppSelectListPreference mLetterEGesture;
+    private AppSelectListPreference mLetterMGesture;
+    private AppSelectListPreference mLetterSGesture;
+    private AppSelectListPreference mLetterVGesture;
+    private AppSelectListPreference mLetterWGesture;
+    private AppSelectListPreference mLetterZGesture;
+
+    public static final String OFFSCREEN_PATH = "/proc/driver/gesture_type";
+    private static final String SWIPEUP_PATH = "/proc/driver/swipeup";
+
+    private List<AppSelectListPreference.PackageItem> mInstalledPackages = new LinkedList<AppSelectListPreference.PackageItem>();
+    private PackageManager mPm;
+    private int gestureMode;
+
+    @Override
+    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+        setPreferencesFromResource(R.xml.gesture_settings, rootKey);
+        mPm = getContext().getPackageManager();
+
+        mMusicSwitch = (TwoStatePreference) findPreference(KEY_MUSIC);
+        mMusicSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+                KEY_MUSIC, 0) == 1);
+
+        mProxiSwitch = (TwoStatePreference) findPreference(KEY_PROXI_SWITCH);
+        mProxiSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+                OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED, 1) != 0);
+
+        mLetterEGesture = (AppSelectListPreference) findPreference(KEY_E_APP);
+        mLetterEGesture.setEnabled(true);
+        String value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_0);
+        mLetterEGesture.setValue(value);
+        mLetterEGesture.setOnPreferenceChangeListener(this);
+
+        mLetterMGesture = (AppSelectListPreference) findPreference(KEY_M_APP);
+        mLetterMGesture.setEnabled(true);
+        value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_1);
+        mLetterMGesture.setValue(value);
+        mLetterMGesture.setOnPreferenceChangeListener(this);
+
+        mLetterSGesture = (AppSelectListPreference) findPreference(KEY_S_APP);
+        mLetterSGesture.setEnabled(true);
+        value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_2);
+        mLetterSGesture.setValue(value);
+        mLetterSGesture.setOnPreferenceChangeListener(this);
+
+        mLetterVGesture = (AppSelectListPreference) findPreference(KEY_V_APP);
+        mLetterVGesture.setEnabled(true);
+        value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_3);
+        mLetterVGesture.setValue(value);
+        mLetterVGesture.setOnPreferenceChangeListener(this);
+
+        mLetterWGesture = (AppSelectListPreference) findPreference(KEY_W_APP);
+        mLetterWGesture.setEnabled(true);
+        value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_4);
+        mLetterWGesture.setValue(value);
+        mLetterWGesture.setOnPreferenceChangeListener(this);
+
+        mLetterZGesture = (AppSelectListPreference) findPreference(KEY_Z_APP);
+        mLetterZGesture.setEnabled(true);
+        value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_5);
+        mLetterZGesture.setValue(value);
+        mLetterZGesture.setOnPreferenceChangeListener(this);
+
+        mSwipeUpSwitch = (TwoStatePreference) findPreference(KEY_SWIPEUP_SWITCH);
+        mSwipeUpSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+        SETTINGS_GESTURE_KEY, 0) == 1);
+
+        new FetchPackageInformationTask().execute();
+    }
+
+    private boolean areSystemNavigationKeysEnabled() {
+        return Settings.Secure.getInt(getContext().getContentResolver(),
+               Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0) == 1;
+    }
+
+    @Override
+    public boolean onPreferenceTreeClick(Preference preference) {
+        if (preference == mProxiSwitch) {
+            Settings.System.putInt(getContext().getContentResolver(),
+                    OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED, mProxiSwitch.isChecked() ? 1 : 0);
+            return true;
+        }
+        if (preference == mMusicSwitch) {
+            Settings.System.putInt(getContext().getContentResolver(), KEY_MUSIC, mMusicSwitch.isChecked() ? 1 : 0);
+            boolean enabled = Settings.System.getInt(getContext().getContentResolver(), KEY_MUSIC, 0) != 0;
+            setGestureEnabled(KEY_MUSIC_ID, enabled);
+            return true;
+        }
+        if (preference == mSwipeUpSwitch) {
+            Settings.System.putInt(getContext().getContentResolver(), SETTINGS_GESTURE_KEY, mSwipeUpSwitch.isChecked() ? 1 : 0);
+            Utils.writeValue(getFile(), mSwipeUpSwitch.isChecked() ? "1" : "0");
+            return true;
+        }
+        return super.onPreferenceTreeClick(preference);
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        if (preference == mLetterEGesture) {
+            String value = (String) newValue;
+            boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+            setGestureEnabled(KEY_E_ID, !gestureDisabled);
+            Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_0, value);
+        } else if (preference == mLetterMGesture) {
+            String value = (String) newValue;
+            boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+            setGestureEnabled(KEY_M_ID, !gestureDisabled);
+            Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_1, value);
+        } else if (preference == mLetterSGesture) {
+            String value = (String) newValue;
+            boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+            setGestureEnabled(KEY_S_ID, !gestureDisabled);
+            Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_2, value);
+        } else if (preference == mLetterVGesture) {
+            String value = (String) newValue;
+            boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+            setGestureEnabled(KEY_V_ID, !gestureDisabled);
+            Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_3, value);
+        } else if (preference == mLetterWGesture) {
+            String value = (String) newValue;
+            boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+            setGestureEnabled(KEY_W_ID, !gestureDisabled);
+            Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_4, value);
+        } else if (preference == mLetterZGesture) {
+            String value = (String) newValue;
+            boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+            setGestureEnabled(KEY_Z_ID, !gestureDisabled);
+            Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_5, value);
+        }
+        return true;
+    }
+
+    public static String getFile() {
+        if (Utils.fileWritable(SWIPEUP_PATH)) {
+            return SWIPEUP_PATH;
+        }
+        return null;
+    }
+
+    public static String getGestureFile(String key) {
+        switch(key) {
+            case OFFSCREEN_PATH:
+                return "/proc/driver/gesture_type";
+            case SWIPEUP_PATH:
+                return "/proc/driver/swipeup";
+        }
+        return null;
+    }
+
+    private static final int KEY_MASK_GESTURE_CONTROL = 1 << 0;
+    private static final int[] ALL_GESTURE_MASKS = {
+        1 << 1,  // W gesture mask
+        1 << 2,  // S gesture mask
+        1 << 3,  // e gesture mask
+        1 << 4,  // M gesture mask
+        1 << 5,  // Z gesture mask
+        1 << 6,  // V gesture mask
+        1 << 7,  // Music control mask
+    };
+
+    private void setGestureEnabled(int id, boolean enabled) {
+        Log.i("GestureSettings", "setGestureEnabled called with key=" +id+ ",enabled=" +enabled);
+
+        if (!DeviceSettings.isRog3) {
+            gestureMode = Integer.decode(Utils.readLine(OFFSCREEN_PATH).trim());
+        }
+        int mask = ALL_GESTURE_MASKS[id];
+
+        if (enabled)
+            gestureMode |= mask;
+        else
+            gestureMode &= ~mask;
+
+        if (gestureMode != 0)
+            gestureMode |= KEY_MASK_GESTURE_CONTROL;
+
+        String gestureType = String.format("%7s", Integer.toBinaryString(gestureMode)).replace(' ', '0');
+        Log.i("GestureSettings", "gestureType=" +gestureType);
+
+        Settings.System.putString(getContext().getContentResolver(), SETTINGS_ZENMOTION_KEY, gestureType);
+
+        Utils.writeLine(OFFSCREEN_PATH, gestureType);
+    }
+
+    @Override
+    public void onDisplayPreferenceDialog(Preference preference) {
+        if (!(preference instanceof AppSelectListPreference)) {
+            super.onDisplayPreferenceDialog(preference);
+            return;
+        }
+        DialogFragment fragment =
+                AppSelectListPreference.AppSelectListPreferenceDialogFragment
+                        .newInstance(preference.getKey());
+        fragment.setTargetFragment(this, 0);
+        fragment.show(getFragmentManager(), "dialog_preference");
+    }
+
+    private void loadInstalledPackages() {
+        final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
+        mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
+        List<ResolveInfo> installedAppsInfo = mPm.queryIntentActivities(mainIntent, 0);
+
+        for (ResolveInfo info : installedAppsInfo) {
+            ActivityInfo activity = info.activityInfo;
+            ApplicationInfo appInfo = activity.applicationInfo;
+            ComponentName componentName = new ComponentName(appInfo.packageName, activity.name);
+            CharSequence label = null;
+            try {
+                label = activity.loadLabel(mPm);
+            } catch (Exception e) {
+            }
+            if (label != null) {
+                final AppSelectListPreference.PackageItem item = new AppSelectListPreference.PackageItem(activity.loadLabel(mPm), 0, componentName);
+                mInstalledPackages.add(item);
+            }
+        }
+        Collections.sort(mInstalledPackages);
+    }
+
+    private class FetchPackageInformationTask extends AsyncTask<Void, Void, Void> {
+        public FetchPackageInformationTask() {
+        }
+
+        @Override
+        protected Void doInBackground(Void... params) {
+            loadInstalledPackages();
+            return null;
+        }
+
+        @Override
+        protected void onPostExecute(Void feed) {
+            mLetterEGesture.setPackageList(mInstalledPackages);
+            mLetterMGesture.setPackageList(mInstalledPackages);
+            mLetterSGesture.setPackageList(mInstalledPackages);
+            mLetterVGesture.setPackageList(mInstalledPackages);
+            mLetterWGesture.setPackageList(mInstalledPackages);
+            mLetterZGesture.setPackageList(mInstalledPackages);
+        }
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java b/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java
new file mode 100644
index 0000000..c641ce8
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2017 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class GestureSettingsActivity extends AppCompatActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.settings_activity);
+        setSupportActionBar(findViewById(R.id.toolbar));
+        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+    }
+
+    @Override
+    protected void onPostCreate(Bundle savedInstanceState) {
+        super.onPostCreate(savedInstanceState);
+        getSupportFragmentManager().beginTransaction()
+            .replace(R.id.fragment_container, new GestureSettings())
+            .commit();
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+        case android.R.id.home:
+            finish();
+            return true;
+        default:
+            break;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java b/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java
new file mode 100644
index 0000000..5fee680
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java
@@ -0,0 +1,61 @@
+/*
+* Copyright (C) 2020 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.provider.Settings;
+import androidx.preference.Preference;
+import androidx.preference.Preference.OnPreferenceChangeListener;
+import androidx.preference.PreferenceManager;
+
+public class GloveModeSwitch implements OnPreferenceChangeListener {
+
+    private static final String FILE = "/proc/driver/glove";
+
+    public static final String SETTINGS_KEY = DeviceSettings.KEY_SETTINGS_PREFIX + DeviceSettings.KEY_GLOVE_SWITCH;
+
+    private Context mContext;
+
+    public GloveModeSwitch(Context context) {
+        mContext = context;
+    }
+
+    public static String getFile() {
+        if (Utils.fileWritable(FILE)) {
+            return FILE;
+        }
+        return null;
+    }
+
+    public static boolean isSupported() {
+        return Utils.fileWritable(getFile());
+    }
+
+    public static boolean isCurrentlyEnabled(Context context) {
+        return Utils.getFileValueAsBoolean(getFile(), false);
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        Boolean enabled = (Boolean) newValue;
+        Settings.System.putInt(mContext.getContentResolver(), SETTINGS_KEY, enabled ? 1 : 0);
+        Utils.writeValue(getFile(), enabled ? "1" : "0");
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GloveModeTileService.java b/DeviceParts/src/org/omnirom/device/GloveModeTileService.java
new file mode 100644
index 0000000..10bad91
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GloveModeTileService.java
@@ -0,0 +1,71 @@
+/*
+* Copyright (C) 2018 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.annotation.TargetApi;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+import androidx.preference.PreferenceManager;
+
+
+@TargetApi(24)
+public class GloveModeTileService extends TileService {
+    private boolean enabled = false;
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+    }
+
+    @Override
+    public void onTileAdded() {
+        super.onTileAdded();
+    }
+
+    @Override
+    public void onTileRemoved() {
+        super.onTileRemoved();
+    }
+
+    @Override
+    public void onStartListening() {
+        super.onStartListening();
+        SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+        enabled = GloveModeSwitch.isCurrentlyEnabled(this);
+        getQsTile().setState(enabled ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
+        getQsTile().updateTile();
+    }
+
+    @Override
+    public void onStopListening() {
+        super.onStopListening();
+    }
+
+    @Override
+    public void onClick() {
+        super.onClick();
+        SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+        enabled = GloveModeSwitch.isCurrentlyEnabled(this);
+        Utils.writeValue(GloveModeSwitch.getFile(), enabled ? "0" : "1");
+        sharedPrefs.edit().putBoolean(DeviceSettings.KEY_GLOVE_SWITCH, enabled ? false : true).commit();
+        getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE);
+        getQsTile().updateTile();
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GripSensor.java b/DeviceParts/src/org/omnirom/device/GripSensor.java
new file mode 100644
index 0000000..88390c4
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GripSensor.java
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2021 The OmniRom 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.
+ */
+
+package org.omnirom.device;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorManager;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.RemoteException;
+import android.os.SystemProperties;
+import android.os.UserHandle;
+import android.util.Log;
+import android.util.Slog;
+
+public class GripSensor {
+    private static final boolean DEBUG = SystemProperties.getInt("persist.vendor.asus.grip.debug", 0) == 1;
+    private static final int GRIP_SENSOR = 65537;
+    private static final int MSG_BIND_SERVICE = 1001;
+    private static final int MSG_REGISTER_GRIPSENSOR = 1000;
+    private static final int MSG_RESET_BINDINGSTATE = 1002;
+    private static final int MSG_UPDATE_REMOTE_SENSOR_EVENT = 3000;
+    public static final int MSG_UPDATE_SENSOR_ON_CHANGED = 2000;
+    private static final String REMTOE_SERVICE_PACKAGENAME = "com.asus.focusapplistener";
+    private static final String REMOTE_SERVICE_BIND_ACTION = "com.asus.focusapplistener.grip.messengerservice";
+    private static final int REMOTE_SERVICE_STATE_BINDING = 1;
+    private static final int REMOTE_SERVICE_STATE_BOUND = 2;
+    private static final int REMOTE_SERVICE_STATE_UNBOUND = 0;
+    private static final String TAG = "GripSensorOmni";
+    private Context mContext;
+    private MyGripsensorListener mGripSensorListener;
+    private HandlerThread mHandlerThread;
+    private Object mLock = new Object();
+    private Handler mMainHandler = null;
+    private Messenger mRemoteMsgService = null;
+    private int mServiceState = 0;
+    private WorkerHandler mWorkerHandler = null;
+    private ServiceConnection mConnection = new ServiceConnection() {
+        public void onServiceConnected(ComponentName className, IBinder service) {
+            synchronized (mLock) {
+                Slog.d(TAG, "grip sensor service is connected");
+                Messenger unused = mRemoteMsgService = new Messenger(service);
+                int unused2 = mServiceState = 2;
+                Slog.d(TAG, "service state: " + mServiceState);
+            }
+        }
+
+        public void onServiceDisconnected(ComponentName className) {
+            synchronized (mLock) {
+                Slog.d(TAG, "grip sensor service is disconnected");
+                Messenger unused = mRemoteMsgService = null;
+                int unused2 = mServiceState = 0;
+            }
+        }
+    };
+
+    public GripSensor(Context context) {
+        mContext = context;
+    }
+
+    public void onStart() {
+    if (DEBUG) Log.d(TAG, "Enabling");
+    mHandlerThread = new HandlerThread("GripSensorServiceHandler", -8);
+    mHandlerThread.start();
+    mWorkerHandler = new WorkerHandler(mHandlerThread.getLooper(), mContext);
+    mMainHandler = new SensorServiceHandler(mContext.getMainLooper());
+    mMainHandler.sendEmptyMessage(MSG_REGISTER_GRIPSENSOR);
+    Slog.d(TAG, "GripSensor onStart()");
+    }
+
+    void disable() {
+    }
+
+    private class SensorServiceHandler extends Handler {
+        public SensorServiceHandler(Looper l) {
+            super(l);
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            int gripMessengerServiceState;
+            switch (msg.what) {
+                case MSG_REGISTER_GRIPSENSOR:
+                    GripSensor gripSensorService = GripSensor.this;
+                    gripSensorService.mGripSensorListener = new MyGripsensorListener((SensorManager) gripSensorService.mContext.getSystemService("sensor"),
+                                                                GRIP_SENSOR, true, mWorkerHandler, mContext);
+                    if (mGripSensorListener != null) {
+                        mGripSensorListener.register();
+                    }
+                    sendEmptyMessage(MSG_BIND_SERVICE);
+                    return;
+                case MSG_BIND_SERVICE:
+                    synchronized (mLock) {
+                        gripMessengerServiceState = mServiceState;
+                        Slog.d(GripSensor.TAG, "Bind service, current state -> " + mServiceState);
+                    }
+                    if (gripMessengerServiceState == 0) {
+                        Slog.d(GripSensor.TAG, "Remote service is unbound. Bind it and send message later");
+                        synchronized (mLock) {
+                            doBindServiceLocked();
+                        }
+                        sendMessageDelayed(Message.obtain(msg), 1000L);
+                        return;
+                    } else if (gripMessengerServiceState == 1) {
+                        if (retryLimitReached(msg.arg1)) {
+                            Slog.w(GripSensor.TAG, "Reach max retry times, reset binding state after 30 seconds.");
+                            sendEmptyMessageDelayed(MSG_RESET_BINDINGSTATE, 30000L);
+                            return;
+                        }
+                        Slog.d(GripSensor.TAG, "Remote service is binding. Send message later.");
+                        Message newMessage = Message.obtain(msg);
+                        newMessage.arg1++;
+                        sendMessageDelayed(newMessage, 1000L);
+                        return;
+                    } else {
+                        return;
+                    }
+                case MSG_RESET_BINDINGSTATE:
+                    synchronized (mLock) {
+                        mServiceState = 0;
+                        mRemoteMsgService = null;
+                        Slog.d(GripSensor.TAG, "Reset state: " + mServiceState);
+                    }
+                    return;
+                default:
+                    return;
+            }
+        }
+
+        private boolean retryLimitReached(int count) {
+            return count > 9;
+        }
+    }
+
+    private class WorkerHandler extends Handler {
+        public WorkerHandler(Looper l, Context context) {
+            super(l);
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_UPDATE_SENSOR_ON_CHANGED:
+                    synchronized (mLock) {
+                        updateSensorEventToRemoteLocked(msg.getData());
+                    }
+                    return;
+                default:
+                    return;
+            }
+        }
+    }
+
+    class MyGripsensorListener extends GripsensorListener {
+        MyGripsensorListener(SensorManager sensorManager, int type, boolean wakeUp, Handler handler, Context context) {
+            super(sensorManager, type, wakeUp, handler, context);
+        }
+
+        @Override
+        public void onSensorChanged(SensorEvent event) {
+            int length = event.values.length;
+            Sensor sensor = event.sensor;
+            if (length == 0) {
+                Log.w(GripSensor.TAG, "Cannot obtain value from sensor " + sensor);
+            } else if (event.sensor.getType() == GRIP_SENSOR) {
+                if (GripSensor.DEBUG) {
+                    Slog.d(GripSensor.TAG, "GRIP array:  \nGesture_TYPE[0]: " + event.values[0] + " \nTRK_ID[1]: " + event.values[1] +
+                            " \nBAR_ID[2]: " + event.values[2] + " \nPRESSURE[3]: " + event.values[3] + " \nFRAME[4]: " + event.values[4] +
+                            " \nCenter[5]: " + event.values[5] + "\nLENGTH[6]: " + event.values[6]);
+                }
+                acquireWakelock((int) event.values[0]);
+                float[] rawData = (float[]) event.values.clone();
+                Message msg = mHandler.obtainMessage(MSG_UPDATE_SENSOR_ON_CHANGED);
+                Bundle data = new Bundle();
+                data.putFloatArray("data", rawData);
+                msg.setData(data);
+                mHandler.sendMessage(msg);
+            }
+        }
+    }
+
+    private void doBindServiceLocked() {
+        Intent intent = new Intent();
+        intent.setAction(REMOTE_SERVICE_BIND_ACTION);
+        intent.setPackage(REMTOE_SERVICE_PACKAGENAME);
+        try {
+            mContext.bindServiceAsUser(intent, mConnection, 1, UserHandle.CURRENT);
+            mServiceState = 1;
+            Slog.d(TAG, "Bind grip sensor service");
+        } catch (SecurityException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void updateSensorEventToRemoteLocked(Bundle in) {
+        if (mRemoteMsgService != null) {
+            Message msg = Message.obtain((Handler) null, (int) MSG_UPDATE_REMOTE_SENSOR_EVENT);
+            try {
+                Bundle out = new Bundle(in);
+                msg.setData(out);
+                mRemoteMsgService.send(msg);
+            } catch (RemoteException e) {
+                e.printStackTrace();
+            }
+        } else if (mServiceState == 0) {
+            Slog.e(TAG, "Client object is null. Rebind...");
+            mMainHandler.sendEmptyMessage(MSG_BIND_SERVICE);
+        }
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GripSensorServiceMain.java b/DeviceParts/src/org/omnirom/device/GripSensorServiceMain.java
new file mode 100644
index 0000000..0244c64
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GripSensorServiceMain.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2021 The OmniRom 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.
+ */
+
+package org.omnirom.device;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.os.Messenger;
+import android.util.Log;
+
+public class GripSensorServiceMain extends Service {
+    private static final String TAG = "GripSensorOmni";
+    private static final boolean DEBUG = true;
+
+    private GripSensor mGripSensor;
+    private Messenger mMessenger;
+
+    @Override
+    public void onCreate() {
+        if (DEBUG) Log.d(TAG, "Creating service");
+        mGripSensor = new GripSensor(this);
+    }
+
+    @Override
+    public int onStartCommand(Intent intent, int flags, int startId) {
+        if (DEBUG) Log.d(TAG, "Starting service");
+        mGripSensor.onStart();
+        return START_STICKY;
+    }
+
+    @Override
+    public void onDestroy() {
+        if (DEBUG) Log.d(TAG, "Destroying service");
+        mGripSensor.disable();
+        super.onDestroy();
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return mMessenger.getBinder();
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GripsensorListener.java b/DeviceParts/src/org/omnirom/device/GripsensorListener.java
new file mode 100644
index 0000000..d16eb05
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GripsensorListener.java
@@ -0,0 +1,77 @@
+package org.omnirom.device;
+
+import android.content.Context;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.os.SystemProperties;
+import android.util.Log;
+
+public abstract class GripsensorListener implements SensorEventListener {
+    private static final int GRIP_GESTURE_LONG_SQUEEZE = 8;
+    private static final int GRIP_GESTURE_SHORT_SQUEEZE = 7;
+    private static final String TAG = "GripSensorListenerOmni";
+    protected Handler mHandler;
+    private boolean mIsRegistered = false;
+    private Sensor mSensor;
+    private SensorManager mSensorManager;
+    private PowerManager.WakeLock mWakeLock;
+
+    protected GripsensorListener(SensorManager sensorManager, int type, boolean wakeUp, Handler handler, Context context) {
+        mSensor = null;
+        mSensorManager = null;
+        mHandler = null;
+        mHandler = handler;
+        mSensorManager = sensorManager;
+        Sensor defaultSensor = sensorManager.getDefaultSensor(type);
+        mSensor = defaultSensor;
+        if (defaultSensor == null) {
+            Log.w(TAG, "Can not get sensor: " + type + ". wakeUp: " + wakeUp);
+        }
+        PowerManager powerManager = null;
+        powerManager = context != null ? (PowerManager) context.getSystemService("power") : powerManager;
+        if (powerManager != null) {
+            mWakeLock = powerManager.newWakeLock(1, "GripSensor.WakeLock");
+        }
+    }
+
+    public boolean register() {
+        Sensor sensor;
+        if (!mIsRegistered && (sensor = mSensor) != null) {
+            boolean registerListener = mSensorManager.registerListener(this, sensor, 3, mHandler);
+            mIsRegistered = registerListener;
+            return registerListener;
+        }
+        return false;
+    }
+
+    public void unregister() {
+        Sensor sensor;
+        if (mIsRegistered && (sensor = mSensor) != null) {
+            mSensorManager.unregisterListener(this, sensor);
+            mIsRegistered = false;
+        }
+    }
+
+    public Sensor getSensor() {
+        return mSensor;
+    }
+
+    @Override
+    public void onSensorChanged(SensorEvent event) {
+    }
+
+    @Override
+    public void onAccuracyChanged(Sensor sensor, int accuracy) {
+    }
+
+    protected void acquireWakelock(int gestureType) {
+        PowerManager.WakeLock wakeLock;
+        if ((gestureType == GRIP_GESTURE_SHORT_SQUEEZE || gestureType == GRIP_GESTURE_LONG_SQUEEZE) && (wakeLock = mWakeLock) != null && !wakeLock.isHeld()) {
+            mWakeLock.acquire(1000L);
+        }
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/KeyHandler.java b/DeviceParts/src/org/omnirom/device/KeyHandler.java
new file mode 100644
index 0000000..9ebf7fe
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/KeyHandler.java
@@ -0,0 +1,675 @@
+/*
+* Copyright (C) 2016 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.ActivityManagerNative;
+import android.app.NotificationManager;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.database.ContentObserver;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.media.IAudioService;
+import android.media.AudioManager;
+import android.media.session.MediaSessionLegacyHelper;
+import android.net.Uri;
+import android.text.TextUtils;
+import android.os.FileObserver;
+import android.os.Handler;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.PowerManager.WakeLock;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.os.UEventObserver;
+import android.os.UserHandle;
+import android.os.VibrationEffect;
+import android.os.Vibrator;
+import android.provider.Settings;
+import android.provider.Settings.Global;
+import android.provider.Settings.Secure;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.HapticFeedbackConstants;
+import android.view.WindowManagerGlobal;
+
+import com.android.internal.util.ArrayUtils;
+import com.android.internal.statusbar.IStatusBarService;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.omnirom.omnilib.utils.DeviceKeyHandler;
+import org.omnirom.omnilib.utils.OmniSettings;
+import org.omnirom.omnilib.utils.OmniUtils;
+import org.omnirom.omnilib.utils.OmniVibe;
+import org.omnirom.omnilib.utils.PackageUtils;
+
+import vendor.goodix.hardware.biometrics.fingerprint.V2_1.IGoodixFingerprintDaemon;
+
+public class KeyHandler implements DeviceKeyHandler {
+
+    private static final String TAG = "KeyHandler";
+    private static final boolean DEBUG = true;
+    private static final boolean DEBUG_SENSOR = true;
+
+    protected static final int GESTURE_REQUEST = 1;
+    private static final int GESTURE_WAKELOCK_DURATION = 2000;
+
+    private static final int KEY_DOUBLE_TAP = 143;
+    private static final int KEY_HOME = 102;
+    private static final int KEY_BACK = 158;
+    private static final int KEY_RECENTS = 580;
+
+    private static final int KEY_GESTURE_PAUSE = 119;
+    private static final int KEY_GESTURE_FORWARD = 159;
+    private static final int KEY_GESTURE_REWIND  =168;
+
+    private static final int KEY_GESTURE_E = 18;
+    private static final int KEY_GESTURE_M = 50;
+    private static final int KEY_GESTURE_S = 31;
+    private static final int KEY_GESTURE_V = 47;
+    private static final int KEY_GESTURE_W = 17;
+    private static final int KEY_GESTURE_Z = 44;
+    private static final int KEY_SWIPEUP_GESTURE = 103;
+
+    private static final int KEY_FOD_PRESSED = 33;
+    private static final int KEY_FOD_UP = 22;
+    private static final String LOCAL_HBM_ON = "1";
+    private static final String LOCAL_HBM_OFF = "0";
+    private static final String LOCAL_HBM_PATH = "/proc/localHbm";
+
+    private static final int MIN_PULSE_INTERVAL_MS = 2500;
+    private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
+    private static final int HANDWAVE_MAX_DELTA_MS = 1000;
+    private static final int POCKET_MIN_DELTA_MS = 5000;
+
+    private static final String DT2W_CONTROL_PATH = "/proc/driver/dclick";
+    private static final String GOODIX_CONTROL_PATH = "/sys/devices/platform/soc/0.goodix_gf3626/goodix_fp/goodix_fp/proximity_state";
+
+    private static final String CLIENT_PACKAGE_NAME = "com.asus.camera";
+    private static final String CLIENT_PACKAGE_PATH = "/data/misc/omni/client_package_name";
+    private static final String VENDOR_PROPERTY = "vendor.camera.apk.usingname";
+
+    private static final int[] sSupportedGestures = new int[]{
+    };
+
+    private static final int[] sProxiCheckedGestures = new int[]{
+        KEY_DOUBLE_TAP,
+        KEY_GESTURE_E,
+        KEY_GESTURE_M,
+        KEY_GESTURE_S,
+        KEY_GESTURE_V,
+        KEY_GESTURE_W,
+        KEY_GESTURE_Z,
+        KEY_GESTURE_PAUSE,
+        KEY_GESTURE_FORWARD,
+        KEY_GESTURE_REWIND
+    };
+
+    protected final Context mContext;
+    private final PowerManager mPowerManager;
+    private EventHandler mEventHandler;
+    private WakeLock mGestureWakeLock;
+    private Handler mHandler = new Handler();
+    private SettingsObserver mSettingsObserver;
+    private static boolean mButtonDisabled;
+    private final NotificationManager mNoMan;
+    private final AudioManager mAudioManager;
+    private SensorManager mSensorManager;
+    private boolean mProxyIsNear;
+    private boolean mUseProxiCheck;
+    private Sensor mTiltSensor;
+    private boolean mUseTiltCheck;
+    private boolean mProxyWasNear;
+    private long mProxySensorTimestamp;
+    private boolean mUseWaveCheck;
+    private Sensor mPocketSensor;
+    private boolean mUsePocketCheck;
+    private boolean mDispOn;
+    private boolean IsOffscreenGesture;
+    private boolean isASUSCameraAvail;
+    private boolean mRestoreUser;
+    private boolean mDoubleTapToWake;
+    private ClientPackageNameObserver mClientObserver;
+    private ExecutorService mExecutorService;
+
+    private SensorEventListener mProximitySensor = new SensorEventListener() {
+        @Override
+        public void onSensorChanged(SensorEvent event) {
+            mProxyIsNear = event.values[0] < mPocketSensor.getMaximumRange();
+
+            if (DEBUG_SENSOR) Log.i(TAG, "mProxyIsNear = " + mProxyIsNear + " mProxyWasNear = " + mProxyWasNear);
+            if (mUseWaveCheck || mUsePocketCheck) {
+                if (mProxyWasNear && !mProxyIsNear) {
+                    long delta = SystemClock.elapsedRealtime() - mProxySensorTimestamp;
+                    if (DEBUG_SENSOR) Log.i(TAG, "delta = " + delta);
+                    if (mUseWaveCheck && delta < HANDWAVE_MAX_DELTA_MS) {
+                        launchDozePulse();
+                    }
+                    if (mUsePocketCheck && delta > POCKET_MIN_DELTA_MS) {
+                        launchDozePulse();
+                    }
+                }
+                mProxySensorTimestamp = SystemClock.elapsedRealtime();
+                mProxyWasNear = mProxyIsNear;
+            }
+            if (mUseProxiCheck) {
+                if (Utils.fileWritable(GOODIX_CONTROL_PATH)) {
+                    Utils.writeValue(GOODIX_CONTROL_PATH, mProxyIsNear ? "1" : "0");
+                    if (DEBUG_SENSOR) Log.i(TAG, "Goodix Fingerprint blocked with the proximity sensor ? = " + mProxyIsNear);
+                }
+            }
+        }
+
+        @Override
+        public void onAccuracyChanged(Sensor sensor, int accuracy) {
+        }
+    };
+
+    private SensorEventListener mTiltSensorListener = new SensorEventListener() {
+        @Override
+        public void onSensorChanged(SensorEvent event) {
+            if (event.values[0] == 1) {
+                launchDozePulse();
+            }
+        }
+
+        @Override
+        public void onAccuracyChanged(Sensor sensor, int accuracy) {
+        }
+    };
+
+    private class SettingsObserver extends ContentObserver {
+        SettingsObserver(Handler handler) {
+            super(handler);
+        }
+
+        void observe() {
+            mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(
+                    OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED),
+                    false, this);
+            mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(
+                    OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS),
+                    false, this);
+            mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(
+                    Settings.Secure.DOUBLE_TAP_TO_WAKE),
+                    false, this);
+            update();
+            updateDozeSettings();
+        }
+
+        @Override
+        public void onChange(boolean selfChange) {
+            update();
+        }
+
+        @Override
+        public void onChange(boolean selfChange, Uri uri) {
+            if (uri.equals(Settings.System.getUriFor(
+                    OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS))){
+                updateDozeSettings();
+                return;
+            }
+            update();
+        }
+
+        public void update() {
+            mUseProxiCheck = Settings.System.getIntForUser(
+                    mContext.getContentResolver(), OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED, 1,
+                    UserHandle.USER_CURRENT) == 1;
+            mDoubleTapToWake = Settings.Secure.getInt(
+                    mContext.getContentResolver(), Settings.Secure.DOUBLE_TAP_TO_WAKE, 0) != 0;
+                    updateDoubleTapToWake();
+        }
+    }
+
+    private BroadcastReceiver mSystemStateReceiver = new BroadcastReceiver() {
+         @Override
+         public void onReceive(Context context, Intent intent) {
+             if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
+                 mDispOn = true;
+                 onDisplayOn();
+             } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
+                 mDispOn = false;
+                 onDisplayOff();
+             } else if (intent.getAction().equals(Intent.ACTION_USER_SWITCHED)) {
+                int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
+                if (userId == UserHandle.USER_SYSTEM && mRestoreUser) {
+                    if (DEBUG) Log.i(TAG, "ACTION_USER_SWITCHED to system");
+                    Startup.restoreAfterUserSwitch(context);
+                } else {
+                    mRestoreUser = true;
+                }
+             }
+         }
+    };
+
+    public KeyHandler(Context context) {
+        mContext = context;
+        mDispOn = true;
+        mEventHandler = new EventHandler();
+        mPowerManager = mContext.getSystemService(PowerManager.class);
+        mGestureWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+                "GestureWakeLock");
+        mSettingsObserver = new SettingsObserver(mHandler);
+        mSettingsObserver.observe();
+        mNoMan = mContext.getSystemService(NotificationManager.class);
+        mAudioManager = mContext.getSystemService(AudioManager.class);
+        mSensorManager = mContext.getSystemService(SensorManager.class);
+        mTiltSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_TILT_DETECTOR);
+        mPocketSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
+        IntentFilter systemStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);
+        systemStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
+        systemStateFilter.addAction(Intent.ACTION_USER_SWITCHED);
+        mContext.registerReceiver(mSystemStateReceiver, systemStateFilter);
+
+        isASUSCameraAvail = PackageUtils.isAvailableApp(CLIENT_PACKAGE_NAME , context);
+        if (isASUSCameraAvail) {
+            mClientObserver = new ClientPackageNameObserver(CLIENT_PACKAGE_PATH);
+            mClientObserver.startWatching();
+        }
+        mExecutorService = Executors.newSingleThreadExecutor();
+    }
+
+    private Future<?> submit(Runnable runnable) {
+        return mExecutorService.submit(runnable);
+    }
+
+    private class EventHandler extends Handler {
+        @Override
+        public void handleMessage(Message msg) {
+        }
+    }
+
+    @Override
+    public boolean handleKeyEvent(KeyEvent event) {
+        if (event.getAction() != KeyEvent.ACTION_UP) {
+            return false;
+        }
+        IsOffscreenGesture = false;
+
+        int gesturecode = event.getScanCode();
+        if (DEBUG) Log.i(TAG, "nav_code= " + gesturecode);
+        boolean value = getGestureValueForMusicCode(gesturecode);
+        if (value && !mDispOn){
+            IsOffscreenGesture = true;
+        }
+        return IsOffscreenGesture;
+    }
+
+    @Override
+    public boolean canHandleKeyEvent(KeyEvent event) {
+        if ((event.getScanCode() == KEY_FOD_PRESSED) && (DeviceSettings.isRog3) && (!mDispOn)) {
+            mHandler.post(() -> {
+                try {
+                    IGoodixFingerprintDaemon goodixDaemon = IGoodixFingerprintDaemon.getService();
+                    goodixDaemon.sendCommand(200001, new java.util.ArrayList<Byte>(), (returnCode, resultData) -> {
+                        Log.e(TAG, "Goodix send pressed wakeup 200001 command returned code "+ returnCode);
+                    });
+                    Utils.writeLine(LOCAL_HBM_PATH, LOCAL_HBM_ON);
+                    goodixDaemon.sendCommand(200002, new java.util.ArrayList<Byte>(), (returnCode, resultData) -> {
+                        Log.e(TAG, "Goodix send pressed wakeup 200002 command returned code "+ returnCode);
+                    });
+                } catch (Throwable t) {
+                    Log.e(TAG, "Tried sending pressed wakeup goodix daemon cmd failed", t);
+                }
+            });
+            return true;
+        } else if ((event.getScanCode() == KEY_FOD_UP) && (DeviceSettings.isRog3) && (!mDispOn)) {
+            mHandler.post(() -> {
+                try {
+                    IGoodixFingerprintDaemon goodixDaemon = IGoodixFingerprintDaemon.getService();
+                    Utils.writeLine(LOCAL_HBM_PATH, LOCAL_HBM_OFF);
+                    goodixDaemon.sendCommand(200003, new java.util.ArrayList<Byte>(), (returnCode, resultData) -> {
+                        Log.e(TAG, "Goodix send 200003 FOD UP command returned code "+ returnCode);
+                    });
+                } catch (Throwable t) {
+                    Utils.writeLine(LOCAL_HBM_PATH, LOCAL_HBM_OFF);
+                    Log.e(TAG, "Tried sending 200003 FOD UP goodix daemon cmd failed", t);
+                }
+            });
+            return true;
+        } else {
+            return ArrayUtils.contains(sSupportedGestures, event.getScanCode());
+        }
+    }
+
+    @Override
+    public boolean isDisabledKeyEvent(KeyEvent event) {
+        boolean isProxyCheckRequired = mUseProxiCheck &&
+                ArrayUtils.contains(sProxiCheckedGestures, event.getScanCode());
+        if (mProxyIsNear && isProxyCheckRequired) {
+            if (DEBUG) Log.i(TAG, "isDisabledKeyEvent: blocked by proxi sensor - scanCode=" + event.getScanCode());
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public boolean isCameraLaunchEvent(KeyEvent event) {
+        if (event.getAction() != KeyEvent.ACTION_UP) {
+            return false;
+        }
+        String value = getGestureValueForScanCode(event.getScanCode());
+        return !TextUtils.isEmpty(value) && value.equals(AppSelectListPreference.CAMERA_ENTRY);
+    }
+
+    @Override
+    public boolean isWakeEvent(KeyEvent event){
+        if (event.getAction() != KeyEvent.ACTION_UP) {
+            return false;
+        }
+        if (event.getScanCode() == KEY_SWIPEUP_GESTURE) {
+            return true;
+        }
+         String value = getGestureValueForScanCode(event.getScanCode());
+        if (!TextUtils.isEmpty(value) && value.equals(AppSelectListPreference.WAKE_ENTRY)) {
+            if (DEBUG) Log.i(TAG, "isWakeEvent " + event.getScanCode() + value);
+            return true;
+        }
+        return event.getScanCode() == KEY_DOUBLE_TAP;
+    }
+
+    @Override
+    public Intent isActivityLaunchEvent(KeyEvent event) {
+        if (event.getAction() != KeyEvent.ACTION_UP) {
+            return null;
+        }
+        String value = getGestureValueForScanCode(event.getScanCode());
+        if (!TextUtils.isEmpty(value) && !value.equals(AppSelectListPreference.DISABLED_ENTRY)) {
+            if (DEBUG) Log.i(TAG, "isActivityLaunchEvent " + event.getScanCode() + value);
+            if (!launchSpecialActions(value)) {
+                OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                Intent intent = createIntent(value);
+                return intent;
+            }
+        }
+        return null;
+    }
+
+    private IAudioService getAudioService() {
+        IAudioService audioService = IAudioService.Stub
+                .asInterface(ServiceManager.checkService(Context.AUDIO_SERVICE));
+        if (audioService == null) {
+            Log.w(TAG, "Unable to find IAudioService interface.");
+        }
+        return audioService;
+    }
+
+    boolean isMusicActive() {
+        return mAudioManager.isMusicActive();
+    }
+
+    private void dispatchMediaKeyWithWakeLockToAudioService(int keycode) {
+        if (ActivityManagerNative.isSystemReady()) {
+            IAudioService audioService = getAudioService();
+            if (audioService != null) {
+                KeyEvent event = new KeyEvent(SystemClock.uptimeMillis(),
+                        SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN,
+                        keycode, 0);
+                dispatchMediaKeyEventUnderWakelock(event);
+                event = KeyEvent.changeAction(event, KeyEvent.ACTION_UP);
+                dispatchMediaKeyEventUnderWakelock(event);
+            }
+        }
+    }
+
+    private void dispatchMediaKeyEventUnderWakelock(KeyEvent event) {
+        if (ActivityManagerNative.isSystemReady()) {
+            MediaSessionLegacyHelper.getHelper(mContext).sendMediaButtonEvent(event, true);
+        }
+    }
+
+    private void onDisplayOn() {
+        if (DEBUG) Log.i(TAG, "Display on");
+        if (enableProxiSensor()) {
+            submit(() -> {
+                mSensorManager.unregisterListener(mProximitySensor, mPocketSensor);
+            });
+        }
+        if (mUseTiltCheck) {
+            submit(() -> {
+                mSensorManager.unregisterListener(mTiltSensorListener, mTiltSensor);
+            });
+        }
+        if ((mClientObserver == null) && (isASUSCameraAvail)) {
+            mClientObserver = new ClientPackageNameObserver(CLIENT_PACKAGE_PATH);
+            mClientObserver.startWatching();
+        }
+    }
+
+    private void updateDoubleTapToWake() {
+        Log.i(TAG, "udateDoubleTapToWake " + mDoubleTapToWake);
+        if (Utils.fileWritable(DT2W_CONTROL_PATH)) {
+            Utils.writeValue(DT2W_CONTROL_PATH, mDoubleTapToWake ? "1" : "0");
+        }
+    }
+
+    private void onDisplayOff() {
+        if (DEBUG) Log.i(TAG, "Display off");
+        if (enableProxiSensor()) {
+            mProxyWasNear = false;
+            mProxySensorTimestamp = SystemClock.elapsedRealtime();
+            submit(() -> {
+                mSensorManager.registerListener(mProximitySensor, mPocketSensor,
+                        SensorManager.SENSOR_DELAY_NORMAL);
+            });
+        }
+        if (mUseTiltCheck) {
+            submit(() -> {
+                mSensorManager.registerListener(mTiltSensorListener, mTiltSensor,
+                        SensorManager.SENSOR_DELAY_NORMAL);
+            });
+        }
+        if (mClientObserver != null) {
+            mClientObserver.stopWatching();
+            mClientObserver = null;
+        }
+    }
+
+    private Intent createIntent(String value) {
+        ComponentName componentName = ComponentName.unflattenFromString(value);
+        Intent intent = new Intent(Intent.ACTION_MAIN);
+        intent.addCategory(Intent.CATEGORY_LAUNCHER);
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+        intent.setComponent(componentName);
+        return intent;
+    }
+
+    private boolean launchSpecialActions(String value) {
+        if (value.equals(AppSelectListPreference.TORCH_ENTRY)) {
+            mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+            IStatusBarService service = getStatusBarService();
+            if (service != null) {
+                try {
+                    service.toggleCameraFlash();
+                    OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                } catch (RemoteException e) {
+                    // do nothing.
+                }
+            }
+            return true;
+        } else if (value.equals(AppSelectListPreference.MUSIC_PLAY_ENTRY)) {
+            mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);
+            return true;
+        } else if (value.equals(AppSelectListPreference.MUSIC_NEXT_ENTRY)) {
+            if (isMusicActive()) {
+                mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+                OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_NEXT);
+            }
+            return true;
+        } else if (value.equals(AppSelectListPreference.MUSIC_PREV_ENTRY)) {
+            if (isMusicActive()) {
+                mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+                OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PREVIOUS);
+            }
+            return true;
+        } else if (value.equals(AppSelectListPreference.VOLUME_UP_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            mAudioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_RAISE,AudioManager.USE_DEFAULT_STREAM_TYPE,AudioManager.FLAG_SHOW_UI);
+            return true;
+        } else if (value.equals(AppSelectListPreference.VOLUME_DOWN_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            mAudioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_LOWER,AudioManager.USE_DEFAULT_STREAM_TYPE,AudioManager.FLAG_SHOW_UI);
+            return true;
+        } else if (value.equals(AppSelectListPreference.BROWSE_SCROLL_DOWN_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            OmniUtils.sendKeycode(KeyEvent.KEYCODE_PAGE_DOWN);
+            return true;
+        } else if (value.equals(AppSelectListPreference.BROWSE_SCROLL_UP_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            OmniUtils.sendKeycode(KeyEvent.KEYCODE_PAGE_UP);
+            return true;
+        } else if (value.equals(AppSelectListPreference.NAVIGATE_BACK_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            OmniUtils.sendKeycode(KeyEvent.KEYCODE_BACK);
+            return true;
+        } else if (value.equals(AppSelectListPreference.NAVIGATE_HOME_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            OmniUtils.sendKeycode(KeyEvent.KEYCODE_HOME);
+            return true;
+        } else if (value.equals(AppSelectListPreference.NAVIGATE_RECENT_ENTRY)) {
+            OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+            OmniUtils.sendKeycode(KeyEvent.KEYCODE_APP_SWITCH);
+            return true;
+        }
+        return false;
+    }
+
+    private String getGestureValueForScanCode(int scanCode) {
+        switch(scanCode) {
+            case KEY_GESTURE_E:
+                return Settings.System.getStringForUser(mContext.getContentResolver(),
+                    GestureSettings.DEVICE_GESTURE_MAPPING_0, UserHandle.USER_CURRENT);
+            case KEY_GESTURE_M:
+                return Settings.System.getStringForUser(mContext.getContentResolver(),
+                    GestureSettings.DEVICE_GESTURE_MAPPING_1, UserHandle.USER_CURRENT);
+            case KEY_GESTURE_S:
+                return Settings.System.getStringForUser(mContext.getContentResolver(),
+                    GestureSettings.DEVICE_GESTURE_MAPPING_2, UserHandle.USER_CURRENT);
+            case KEY_GESTURE_V:
+                return Settings.System.getStringForUser(mContext.getContentResolver(),
+                    GestureSettings.DEVICE_GESTURE_MAPPING_3, UserHandle.USER_CURRENT);
+            case KEY_GESTURE_W:
+                return Settings.System.getStringForUser(mContext.getContentResolver(),
+                    GestureSettings.DEVICE_GESTURE_MAPPING_4, UserHandle.USER_CURRENT);
+            case KEY_GESTURE_Z:
+                return Settings.System.getStringForUser(mContext.getContentResolver(),
+                    GestureSettings.DEVICE_GESTURE_MAPPING_5, UserHandle.USER_CURRENT);
+        }
+        return null;
+    }
+
+    private boolean getGestureValueForMusicCode(int scanCode) {
+        switch(scanCode) {
+            case KEY_GESTURE_PAUSE:
+                if (DEBUG) Log.i(TAG, "Music Play/Pause");
+                    mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+                    OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                    dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);
+                return true;
+            case KEY_GESTURE_FORWARD:
+                if (DEBUG) Log.i(TAG, "Music Next");
+                if (isMusicActive()) {
+                    mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+                    OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                    dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_NEXT);
+                }
+                return true;
+            case KEY_GESTURE_REWIND:
+                if (DEBUG) Log.i(TAG, "Music Previous");
+                if (isMusicActive()) {
+                    mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+                    OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+                    dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PREVIOUS);
+                }
+                return true;
+        }
+        return false;
+    }
+
+    private void launchDozePulse() {
+        if (DEBUG) Log.i(TAG, "Doze pulse");
+        mContext.sendBroadcastAsUser(new Intent(DOZE_INTENT),
+                new UserHandle(UserHandle.USER_CURRENT));
+    }
+
+    private boolean enableProxiSensor() {
+        return mUsePocketCheck || mUseWaveCheck || mUseProxiCheck;
+    }
+
+    private void updateDozeSettings() {
+        String value = Settings.System.getStringForUser(mContext.getContentResolver(),
+                    OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS,
+                    UserHandle.USER_CURRENT);
+        if (DEBUG) Log.i(TAG, "Doze settings = " + value);
+        if (!TextUtils.isEmpty(value)) {
+            String[] parts = value.split(":");
+            mUseWaveCheck = Boolean.valueOf(parts[0]);
+            mUsePocketCheck = Boolean.valueOf(parts[1]);
+            mUseTiltCheck = Boolean.valueOf(parts[2]);
+        }
+    }
+
+    protected static Sensor getSensor(SensorManager sm, String type) {
+        for (Sensor sensor : sm.getSensorList(Sensor.TYPE_ALL)) {
+            if (type.equals(sensor.getStringType())) {
+                return sensor;
+            }
+        }
+        return null;
+    }
+
+    IStatusBarService getStatusBarService() {
+        return IStatusBarService.Stub.asInterface(ServiceManager.getService("statusbar"));
+    }
+
+    private class ClientPackageNameObserver extends FileObserver {
+
+        public ClientPackageNameObserver(String file) {
+            super(CLIENT_PACKAGE_PATH, MODIFY);
+        }
+
+        @Override
+        public void onEvent(int event, String file) {
+            String pkgName = Utils.getFileValue(CLIENT_PACKAGE_PATH, "0");
+            if (event == FileObserver.MODIFY) {
+                Log.d(TAG, "Camera name in use = " + pkgName);
+                SystemProperties.set(VENDOR_PROPERTY, pkgName);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/Startup.java b/DeviceParts/src/org/omnirom/device/Startup.java
new file mode 100644
index 0000000..df8dedb
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/Startup.java
@@ -0,0 +1,165 @@
+/*
+* Copyright (C) 2013 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import androidx.preference.PreferenceManager;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.text.TextUtils;
+
+public class Startup extends BroadcastReceiver {
+    private static final String ASUS_GAMEMODE = "asus_gamemode";
+
+    private static void restore(String file, boolean enabled) {
+        if (file == null) {
+            return;
+        }
+        Utils.writeValue(file, enabled ? "1" : "0");
+    }
+
+    private static void restore(String file, String value) {
+        if (file == null) {
+            return;
+        }
+        Utils.writeValue(file, value);
+    }
+
+    private static String getGestureFile(String key) {
+        return GestureSettings.getGestureFile(key);
+    }
+
+    private void maybeImportOldSettings(Context context) {
+        boolean imported = Settings.System.getInt(context.getContentResolver(), "omni_device_setting_imported", 0) != 0;
+        if (!imported) {
+            SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+            boolean enabled = sharedPrefs.getBoolean(DeviceSettings.KEY_GLOVE_SWITCH, false);
+            Settings.System.putInt(context.getContentResolver(), GloveModeSwitch.SETTINGS_KEY, enabled ? 1 : 0);
+
+            Settings.System.putInt(context.getContentResolver(), "omni_device_setting_imported", 1);
+        }
+    }
+
+    @Override
+    public void onReceive(final Context context, final Intent bootintent) {
+        maybeImportOldSettings(context);
+        restoreAfterUserSwitch(context);
+        if (DeviceSettings.isRog3) {
+            context.startServiceAsUser(new Intent(context, GripSensorServiceMain.class),
+                UserHandle.CURRENT);
+        }
+    }
+
+    public static void restoreAfterUserSwitch(Context context) {
+
+        // E Gesture
+        String mapping = GestureSettings.DEVICE_GESTURE_MAPPING_0;
+        String value = Settings.System.getString(context.getContentResolver(), mapping);
+        if (TextUtils.isEmpty(value)) {
+            value = AppSelectListPreference.DISABLED_ENTRY;
+            Settings.System.putString(context.getContentResolver(), mapping, value);
+        }
+        boolean enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+        restore(GestureSettings.getGestureFile(GestureSettings.KEY_E_APP), enabled);
+
+        // M Gesture
+        mapping = GestureSettings.DEVICE_GESTURE_MAPPING_1;
+        value = Settings.System.getString(context.getContentResolver(), mapping);
+        if (TextUtils.isEmpty(value)) {
+            value = AppSelectListPreference.DISABLED_ENTRY;
+            Settings.System.putString(context.getContentResolver(), mapping, value);
+        }
+        enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+        restore(GestureSettings.getGestureFile(GestureSettings.KEY_M_APP), enabled);
+
+        // S Gesture
+        mapping = GestureSettings.DEVICE_GESTURE_MAPPING_2;
+        value = Settings.System.getString(context.getContentResolver(), mapping);
+        if (TextUtils.isEmpty(value)) {
+            value = AppSelectListPreference.DISABLED_ENTRY;
+            Settings.System.putString(context.getContentResolver(), mapping, value);
+        }
+        enabled = !TextUtils.isEmpty(value) && !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+        restore(GestureSettings.getGestureFile(GestureSettings.KEY_S_APP), enabled);
+
+        // V Gesture
+        mapping = GestureSettings.DEVICE_GESTURE_MAPPING_3;
+        value = Settings.System.getString(context.getContentResolver(), mapping);
+        if (TextUtils.isEmpty(value)) {
+            value = AppSelectListPreference.DISABLED_ENTRY;
+            Settings.System.putString(context.getContentResolver(), mapping, value);
+        }
+        enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+        restore(GestureSettings.getGestureFile(GestureSettings.KEY_V_APP), enabled);
+
+        // W Gesture
+        mapping = GestureSettings.DEVICE_GESTURE_MAPPING_4;
+        value = Settings.System.getString(context.getContentResolver(), mapping);
+        if (TextUtils.isEmpty(value)) {
+            value = AppSelectListPreference.DISABLED_ENTRY;
+            Settings.System.putString(context.getContentResolver(), mapping, value);
+        }
+        enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+        restore(GestureSettings.getGestureFile(GestureSettings.KEY_W_APP), enabled);
+
+        // Z Gesture
+        mapping = GestureSettings.DEVICE_GESTURE_MAPPING_5;
+        value = Settings.System.getString(context.getContentResolver(), mapping);
+        if (TextUtils.isEmpty(value)) {
+            value = AppSelectListPreference.DISABLED_ENTRY;
+            Settings.System.putString(context.getContentResolver(), mapping, value);
+        }
+        enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+        restore(GestureSettings.getGestureFile(GestureSettings.KEY_Z_APP), enabled);
+
+        enabled = Settings.System.getInt(context.getContentResolver(), GloveModeSwitch.SETTINGS_KEY, 0) != 0;
+        if (enabled) {
+            restore(GloveModeSwitch.getFile(), enabled);
+        }
+
+        boolean enabledGesture = Settings.System.getInt(context.getContentResolver(), GestureSettings.SETTINGS_GESTURE_KEY, 0) != 0;
+        if (enabledGesture) {
+            restore(GestureSettings.getFile(), enabledGesture);
+        }
+
+        String valueExtra = Settings.System.getString(context.getContentResolver(), GestureSettings.SETTINGS_ZENMOTION_KEY);
+        if (!TextUtils.isEmpty(valueExtra)) {
+             Utils.writeLine(GestureSettings.OFFSCREEN_PATH, valueExtra);
+        }
+
+        value = Settings.System.getString(context.getContentResolver(), DeviceSettings.FPS);
+        if (TextUtils.isEmpty(value)) {
+            value = DeviceSettings.DEFAULT_FPS_VALUE;
+            Settings.System.putString(context.getContentResolver(), DeviceSettings.FPS, value);
+            DeviceSettings.changeFps(context, Integer.valueOf(value));
+        } else {
+        DeviceSettings.changeFps(context, Integer.valueOf(value));
+        }
+
+        if (DeviceSettings.isRog3) {
+            value = Settings.Global.getString(context.getContentResolver(), ASUS_GAMEMODE);
+            if (TextUtils.isEmpty(value)) {
+                value = "0";
+                Settings.Global.putString(context.getContentResolver(), ASUS_GAMEMODE, value);
+            }
+        }
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/TileActivity.java b/DeviceParts/src/org/omnirom/device/TileActivity.java
new file mode 100644
index 0000000..3de9bdd
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/TileActivity.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The OmniROM 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.
+ */
+
+package org.omnirom.device;
+
+import android.content.ComponentName;
+import android.content.Intent;
+import android.os.Bundle;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+public class TileActivity extends AppCompatActivity {
+    protected void onCreate(Bundle bundle) {
+        super.onCreate(bundle);
+        Intent intent = new Intent();
+        String className = ((ComponentName) getIntent().getParcelableExtra("android.intent.extra.COMPONENT_NAME")).getClassName();
+        if (className.equals("org.omnirom.device.FrameRateTileService") ||
+                className.equals("org.omnirom.device.GloveModeTileService")) {
+            intent.setPackage("org.omnirom.device");
+            intent.setAction("org.omnirom.device.DEVICE_SETTING_PAGE");
+            startActivity(intent);
+        }
+        finish();
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/Utils.java b/DeviceParts/src/org/omnirom/device/Utils.java
new file mode 100644
index 0000000..3e33754
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/Utils.java
@@ -0,0 +1,152 @@
+/*
+* Copyright (C) 2013 The OmniROM Project
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+package org.omnirom.device;
+
+import android.util.Log;
+
+import android.os.SystemProperties;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileReader;
+import java.io.FileWriter;
+
+public class Utils {
+
+    /**
+     * Write a string value to the specified file.
+     * @param filename      The filename
+     * @param value         The value
+     */
+    public static void writeValue(String filename, String value) {
+        if (filename == null) {
+            return;
+        }
+        try {
+            FileOutputStream fos = new FileOutputStream(new File(filename));
+            fos.write(value.getBytes());
+            fos.flush();
+            fos.close();
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Check if the specified file exists.
+     * @param filename      The filename
+     * @return              Whether the file exists or not
+     */
+    public static boolean fileExists(String filename) {
+        if (filename == null) {
+            return false;
+        }
+        return new File(filename).exists();
+    }
+
+    public static boolean fileWritable(String filename) {
+        return fileExists(filename) && new File(filename).canWrite();
+    }
+
+    public static String readLine(String filename) {
+        if (filename == null) {
+            return null;
+        }
+        BufferedReader br = null;
+        String line = null;
+        try {
+            br = new BufferedReader(new FileReader(filename), 1024);
+            line = br.readLine();
+        } catch (IOException e) {
+            return null;
+        } finally {
+            if (br != null) {
+                try {
+                    br.close();
+                } catch (IOException e) {
+                    // ignore
+                }
+            }
+        }
+        return line;
+    }
+
+    public static boolean getFileValueAsBoolean(String filename, boolean defValue) {
+        String fileValue = readLine(filename);
+        if(fileValue!=null){
+            return (fileValue.equals("0")?false:true);
+        }
+        return defValue;
+    }
+
+    public static boolean getLineValueAsBoolean(String filename, boolean defValue) {
+        String fileValue = readLine(filename);
+        if(fileValue!=null){
+            return (fileValue.equals("Glove Mode: Off")?false:true);
+        }
+        return defValue;
+    }
+
+    public static String getFileValue(String filename, String defValue) {
+        String fileValue = readLine(filename);
+        if(fileValue!=null){
+            return fileValue;
+        }
+        return defValue;
+    }
+
+    /**
+     * Writes the given value into the given file
+     *
+     * @return true on success, false on failure
+     */
+    public static boolean writeLine(String fileName, String value) {
+        BufferedWriter writer = null;
+
+        try {
+            writer = new BufferedWriter(new FileWriter(fileName));
+            writer.write(value);
+        } catch (FileNotFoundException e) {
+            Log.w("Utils", "No such file " + fileName + " for writing", e);
+            return false;
+        } catch (IOException e) {
+            Log.e("Utils", "Could not write to file " + fileName, e);
+            return false;
+        } finally {
+            try {
+                if (writer != null) {
+                    writer.close();
+                }
+            } catch (IOException e) {
+                // Ignored, not much we can do anyway
+            }
+        }
+
+        return true;
+    }
+
+    public static boolean isCNSKU() {
+        String str = SystemProperties.get("ro.vendor.build.asus.sku", "");
+        return str.toLowerCase().startsWith("bby") || str.toLowerCase().startsWith("cn");
+    }
+}
diff --git a/DeviceParts/src/org/omnirom/device/VolumeTile.java b/DeviceParts/src/org/omnirom/device/VolumeTile.java
new file mode 100644
index 0000000..c2126eb
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/VolumeTile.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2020 The OmniROM 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.
+ */
+package org.omnirom.device;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Icon;
+import android.media.AudioManager;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+
+public class VolumeTile extends TileService {
+	private AudioManager mAudioManager;
+    
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+    }
+
+    @Override
+    public void onTileAdded() {
+        super.onTileAdded();
+    }
+
+    @Override
+    public void onTileRemoved() {
+        super.onTileRemoved();
+    }
+
+    @Override
+    public void onStartListening() {
+        super.onStartListening();
+        mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
+
+        switch (mAudioManager.getRingerModeInternal()) {
+			case AudioManager.RINGER_MODE_SILENT:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_mute));
+                getQsTile().setLabel(getString(R.string.mute_mode));
+                break;
+            case AudioManager.RINGER_MODE_VIBRATE:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_vibrate));
+                getQsTile().setLabel(getString(R.string.vibrate_mode));
+                break;
+            case AudioManager.RINGER_MODE_NORMAL:
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer));
+                getQsTile().setLabel(getString(R.string.volume_mode));
+                break;
+        }
+        getQsTile().setState(Tile.STATE_ACTIVE);
+        getQsTile().updateTile();
+    }
+
+    @Override
+    public void onStopListening() {
+        super.onStopListening();
+    }
+    
+    @Override
+    public void onClick() {
+        super.onClick();
+        mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
+
+        switch (mAudioManager.getRingerModeInternal()) {
+            case AudioManager.RINGER_MODE_SILENT:
+                mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer));
+                getQsTile().setLabel(getString(R.string.volume_mode));
+                break;
+            case AudioManager.RINGER_MODE_VIBRATE:
+                mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_mute));
+                getQsTile().setLabel(getString(R.string.mute_mode));
+                break;
+            case AudioManager.RINGER_MODE_NORMAL:
+                mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);
+                getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_vibrate));
+                getQsTile().setLabel(getString(R.string.vibrate_mode));                
+                break;
+        }
+        getQsTile().updateTile();
+    }
+
+}
\ No newline at end of file
diff --git a/bootctrl/Android.bp b/bootctrl/Android.bp
new file mode 100644
index 0000000..24d2c12
--- /dev/null
+++ b/bootctrl/Android.bp
@@ -0,0 +1,21 @@
+//
+// 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.kona",
+    defaults: ["bootctrl_hal_defaults"],
+    static_libs: ["libgptutils.asus_kona"],
+}
diff --git a/config.fs b/config.fs
new file mode 100644
index 0000000..a83159d
--- /dev/null
+++ b/config.fs
@@ -0,0 +1,236 @@
+[AID_VENDOR_QTI_DIAG]
+value:2901
+
+[AID_VENDOR_QDSS]
+value:2902
+
+[AID_VENDOR_RFS]
+value:2903
+
+[AID_VENDOR_RFS_SHARED]
+value:2904
+
+[AID_VENDOR_ADPL_ODL]
+value:2905
+
+[AID_VENDOR_QRTR]
+value:2906
+
+[AID_VENDOR_THERMAL]
+value:2907
+
+[AID_VENDOR_FASTRPC]
+value:2908
+
+[AID_VENDOR_QTR]
+value:2909
+
+[vendor/bin/wcnss_filter]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: BLOCK_SUSPEND
+
+[system/vendor/bin/wcnss_filter]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: BLOCK_SUSPEND
+
+[vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: BLOCK_SUSPEND NET_ADMIN
+
+[system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: BLOCK_SUSPEND NET_ADMIN
+
+[vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: BLOCK_SUSPEND NET_ADMIN
+
+[system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: BLOCK_SUSPEND NET_ADMIN
+
+[system/bin/cnss-daemon]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: NET_BIND_SERVICE
+
+[vendor/bin/pm-service]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/pm-service]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/bin/pm-service]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/pd-mapper]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/pd-mapper]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/bin/pd-mapper]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/imsdatadaemon]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/imsdatadaemon]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE
+
+[vendor/bin/ims_rtp_daemon]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/ims_rtp_daemon]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE
+
+[vendor/bin/imsrcsd]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[system/vendor/bin/imsrcsd]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[vendor/bin/imsdaemon]
+mode: 0755
+user: AID_RADIO
+group: AID_RADIO
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[vendor/bin/cnd]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN
+
+[system/vendor/bin/cnd]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN
+
+[vendor/bin/slim_daemon]
+mode: 0755
+user:  AID_GPS
+group: AID_GPS
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/slim_daemon]
+mode: 0755
+user:  AID_GPS
+group: AID_GPS
+caps: NET_BIND_SERVICE
+
+[vendor/bin/loc_launcher]
+mode: 0755
+user:  AID_GPS
+group: AID_GPS
+caps: SETUID SETGID
+
+[system/vendor/bin/loc_launcher]
+mode: 0755
+user:  AID_GPS
+group: AID_GPS
+caps: SETUID SETGID
+
+[vendor/bin/xtwifi-client]
+mode: 0755
+user:  AID_GPS
+group: AID_GPS
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[vendor/bin/sensors.qti]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/qrtr-ns]
+mode: 0755
+user: AID_VENDOR_QRTR
+group: AID_VENDOR_QRTR
+caps: NET_BIND_SERVICE
+
+[firmware/]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[firmware/image/*]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[vendor/firmware_mnt/image/*]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[bt_firmware/]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[persist/]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[dsp/]
+mode: 0771
+user: AID_MEDIA
+group: AID_MEDIA
+caps: 0
diff --git a/configs/excluded-input-devices.xml b/configs/excluded-input-devices.xml
new file mode 100644
index 0000000..32aac2c
--- /dev/null
+++ b/configs/excluded-input-devices.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2018 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.                          -->
+<devices>
+    <device name="qti-haptics"/>
+</devices>
diff --git a/device.mk b/device.mk
index e71d1cb..1f16852 100755
--- a/device.mk
+++ b/device.mk
@@ -1,5 +1,5 @@
 # Copyright (C) 2016 The CyanogenMod Project
-# Copyright (C) 2019 The OmniRom Project
+# Copyright (C) 2019-2025 The OmniRom Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -20,52 +20,192 @@
 # product configuration (apps).
 #
 
+# Enable updating of APEXes
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+# Setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
+
+PRODUCT_BUILD_SUPER_PARTITION := false
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+
 # Overlays
 DEVICE_PACKAGE_OVERLAYS += \
-    $(LOCAL_PATH)/overlay
+    $(LOCAL_PATH)/overlay \
+    vendor/omni/overlay/CarrierConfig
 
 PRODUCT_PACKAGES += \
+    FrameworksResOverlay \
     FrameworksResDeviceOverlay \
     FrameworksResVendorOverlay \
-    SystemUIDeviceOverlay
+    OmniRomResInternalOverlay \
+    SettingsOverlay \
+    SettingsProviderOverlay \
+    SystemUIOverlay \
+    SystemUIDeviceOverlay \
+    TetheringConfigOverlay \
+    WifiOverlay
 
-ifeq ($(ROM_BUILDTYPE),$(filter $(ROM_BUILDTYPE),GAPPS))
+# A/B
+AB_OTA_UPDATER := true
+
+AB_OTA_PARTITIONS += \
+    boot \
+    dtbo \
+    odm \
+    product \
+    system \
+    system_ext \
+    vbmeta \
+    vbmeta_system \
+    vendor
+
+AB_OTA_POSTINSTALL_CONFIG += \
+    RUN_POSTINSTALL_system=true \
+    POSTINSTALL_PATH_system=system/bin/omnipreopt_script \
+    FILESYSTEM_TYPE_system=ext4 \
+    POSTINSTALL_OPTIONAL_system=true
+
+AB_OTA_POSTINSTALL_CONFIG += \
+    RUN_POSTINSTALL_vendor=true \
+    POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
+    FILESYSTEM_TYPE_vendor=ext4 \
+    POSTINSTALL_OPTIONAL_vendor=true
+
+PRODUCT_PACKAGES += \
+    checkpoint_gc \
+    omnipreopt_script
+
 # Android Auto
+ifeq ($(ROM_BUILDTYPE),$(filter $(ROM_BUILDTYPE),GAPPS))
 PRODUCT_PACKAGES += \
     AndroidAutoStub
 endif
 
+# ANT+
+PRODUCT_PACKAGES += \
+    AntHalService
+
 # Api
 BOARD_SHIPPING_API_LEVEL := 29
 PRODUCT_SHIPPING_API_LEVEL := $(BOARD_SHIPPING_API_LEVEL)
 
-# audio
+# Audio
+PRODUCT_PACKAGES += \
+    android.hardware.audio@6.0-impl \
+    android.hardware.audio.effect@6.0-impl \
+    android.hardware.audio.service
+
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/audio/audio_effects_ZS670KS.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
     $(LOCAL_PATH)/audio/audio_policy_configuration_ZS670KS.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml \
     $(LOCAL_PATH)/audio/audio_policy_configuration_ZS670KS.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
     $(LOCAL_PATH)/audio/audio_policy_volumes_ZS670KS.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes_ZS670KS.xml
 
+# Bluetooth
+PRODUCT_PACKAGES += \
+    android.hardware.bluetooth.audio@2.1-impl \
+    audio.bluetooth.default
+
+PRODUCT_COPY_FILES +=\
+    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
+
 # Boot control
 PRODUCT_PACKAGES += \
-    android.hardware.boot@1.1-service
+    android.hardware.boot@1.1-impl.recovery \
+    android.hardware.boot@1.1-service \
+    bootctrl.kona.recovery
+
+PRODUCT_PACKAGES_DEBUG += \
+    bootctl
 
 # Camera
 PRODUCT_PACKAGES += \
+    android.hardware.camera.provider@2.4-impl \
     CameraTile
 
+# Cas
+PRODUCT_PACKAGES += \
+    android.hardware.cas@1.2
+
+# Charger images
+PRODUCT_PACKAGES += \
+    omni_charger_res_images \
+    animation.txt \
+    font_charger.png
+
 # Configstore
 PRODUCT_PACKAGES += \
     disable_configstore
 
+# DeviceParts
+PRODUCT_PACKAGES += \
+    DeviceParts
+
+# Display
+PRODUCT_PACKAGES += \
+    android.hardware.graphics.mapper@3.0-impl-qti-display \
+    android.hardware.graphics.mapper@4.0-impl-qti-display \
+    android.hardware.renderscript@1.0-impl \
+    gralloc.qcom \
+    libion \
+    libtinyalsa \
+    libtinyxml2 \
+    libqdutils \
+    libqservice \
+    libsdmcore \
+    libsdmutils \
+    libvulkan \
+    vendor.qti.hardware.display.allocator-service \
+    vendor.qti.hardware.display.composer-service \
+    vendor.qti.hardware.memtrack-service
+
+-include hardware/qcom-caf/sm8250/display/config/display-board.mk
+
+# DRM
+PRODUCT_PACKAGES += \
+    android.hardware.drm-service.clearkey
+
+# Exclude vibrator from InputManager
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/configs/excluded-input-devices.xml:system/etc/excluded-input-devices.xml
+
+# fastbootd
+PRODUCT_PACKAGES += \
+    android.hardware.fastboot@1.0-impl-mock \
+    fastbootd
+
 # Fingerprint
 PRODUCT_PACKAGES += \
     android.hardware.biometrics.fingerprint@2.1-service
 
+# FM
+PRODUCT_PACKAGES += \
+    FM2 \
+    libqcomfm_jni \
+    qcom.fmradio
+
+# Health
+PRODUCT_PACKAGES += \
+    android.hardware.health@2.1-impl \
+    android.hardware.health@2.1-service
+
 # Health for charing control
 PRODUCT_PACKAGES += \
     vendor.lineage.health-service.default
 
+# HIDL
+PRODUCT_PACKAGES += \
+    android.hidl.base@1.0 \
+    android.hidl.manager@1.0 \
+    libhidltransport \
+    libhwbinder
+
+# Init
+PRODUCT_PACKAGES += \
+    libinit_sm8250
+
 # Input
 PRODUCT_PACKAGES += \
     fts_ts.idc
@@ -77,6 +217,13 @@
 PRODUCT_PACKAGES += \
     android.hardware.light-service.lineage
 
+# Live Wallpapers
+PRODUCT_PACKAGES += \
+    LiveWallpapers \
+    LiveWallpapersPicker \
+    VisualizationWallpapers \
+    librs_jni
+
 # Media
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/media/media_codecs_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2.xml \
@@ -84,10 +231,27 @@
     $(LOCAL_PATH)/media/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \
     $(LOCAL_PATH)/media/media_codecs_performance_kona.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_kona.xml
 
+# Mount Point symlinks
+PRODUCT_PACKAGES += \
+    mnt_point_asusfw_symlink \
+    mnt_point_factory_symlink \
+    vendor_bt_firmware_mountpoint \
+    vendor_dsp_mountpoint \
+    vendor_firmware_mnt_mountpoint
+
+# Netutils
+PRODUCT_PACKAGES += \
+    netutils-wrapper-1.0 \
+    libandroid_net
+
 # NFC
 PRODUCT_PACKAGES += \
     android.hardware.nfc@1.2-service \
-    android.hardware.secure_element@1.2
+    android.hardware.secure_element@1.2 \
+    NfcNci \
+    Tag \
+    SecureElement \
+    com.android.nfc_extras
 
 # Perf
 PRODUCT_PACKAGES += \
@@ -99,10 +263,15 @@
 
 # Prebuilt
 PRODUCT_COPY_FILES += \
+    $(call find-copy-subdir-files,*,device/asus/zenfone7/prebuilt/product,product) \
     $(call find-copy-subdir-files,*,device/asus/zenfone7/prebuilt/system,system) \
+    $(call find-copy-subdir-files,*,device/asus/zenfone7/prebuilt/system_ext,system_ext) \
     $(call find-copy-subdir-files,*,device/asus/zenfone7/prebuilt/root,recovery/root) \
     $(call find-copy-subdir-files,*,device/asus/zenfone7/prebuilt/vendor,vendor)
 
+# Properties
+BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
+
 PRODUCT_AAPT_CONFIG := normal
 PRODUCT_AAPT_PREF_CONFIG := xxhdpi
 
@@ -110,6 +279,10 @@
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/fstab.qcom:$(TARGET_COPY_OUT_RAMDISK)/fstab.qcom
 
+# Sensors
+PRODUCT_PACKAGES += \
+    android.hardware.sensors-service.multihal
+
 # Shims
 PRODUCT_PACKAGES += \
     libgui_shim
@@ -118,14 +291,36 @@
 PRODUCT_PACKAGES += \
     android.hardware.soundtrigger@2.2-impl
 
-# Sensors
-PRODUCT_PACKAGES += \
-    android.hardware.sensors-service.multihal
-
 # Soong namespaces
 PRODUCT_SOONG_NAMESPACES += \
     $(LOCAL_PATH)
 
+# Systemhelper
+PRODUCT_PACKAGES += \
+    vendor.qti.hardware.systemhelper@1.0
+
+# Telephony
+PRODUCT_PACKAGES += \
+    extphonelib \
+    extphonelib-product \
+    extphonelib.xml \
+    extphonelib_product.xml \
+    ims-ext-common \
+    ims_ext_common.xml \
+    qti-telephony-hidl-wrapper \
+    qti_telephony_hidl_wrapper.xml \
+    qti-telephony-hidl-wrapper-prd \
+    qti_telephony_hidl_wrapper_prd.xml \
+    qti-telephony-utils \
+    qti_telephony_utils.xml \
+    qti-telephony-utils-prd \
+    qti_telephony_utils_prd.xml \
+    tcmiface
+
+# Telephony extension
+PRODUCT_PACKAGES += telephony-ext
+PRODUCT_BOOT_JARS += telephony-ext
+
 # Thermal
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/configs/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf
@@ -133,12 +328,36 @@
 PRODUCT_PACKAGES += \
     android.hardware.thermal-service.qti
 
+# Update engine
+PRODUCT_PACKAGES += \
+    otapreopt_script \
+    update_engine \
+    update_engine_sideload \
+    update_verifier
+
+PRODUCT_HOST_PACKAGES += \
+    brillo_update_payload
+
+PRODUCT_PACKAGES_DEBUG += \
+    update_engine_client
+
 # Vibrator
 PRODUCT_PACKAGES += \
     vendor.qti.hardware.vibrator.service
 
-# Inherit from asus sm8250-common
-$(call inherit-product, device/asus/sm8250-common/common.mk)
+# Wifi
+PRODUCT_PACKAGES += \
+    android.hardware.wifi-service \
+    hostapd \
+    libwifi-hal-qcom \
+    libwpa_client \
+    wpa_supplicant \
+    wpa_supplicant.conf
+
+# WiFi firmware symlinks
+PRODUCT_PACKAGES += \
+    firmware_wlan_mac.bin_symlink \
+    firmware_WCNSS_qcom_cfg.ini_symlink
 
 # Inherit from vendor blobs
 $(call inherit-product, vendor/asus/zenfone7/zenfone7-vendor.mk)
diff --git a/gpt-utils/Android.bp b/gpt-utils/Android.bp
new file mode 100644
index 0000000..bf57b63
--- /dev/null
+++ b/gpt-utils/Android.bp
@@ -0,0 +1,39 @@
+//
+// 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.asus_kona",
+    vendor: true,
+    recovery_available: true,
+    shared_libs: [
+        "libcutils",
+        "liblog",
+        "libz",
+    ],
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    srcs: [
+        "gpt-utils.cpp",
+    ],
+    owner: "qti",
+    header_libs: [
+        "generated_kernel_headers",
+    ],
+    export_include_dirs: ["."],
+}
diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp
new file mode 100644
index 0000000..1e8c9a2
--- /dev/null
+++ b/gpt-utils/gpt-utils.cpp
@@ -0,0 +1,1569 @@
+/*
+ * Copyright (c) 2013,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 "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 _LARGEFILE64_SOURCE /* enable lseek64() */
+
+/******************************************************************************
+ * INCLUDE SECTION
+ ******************************************************************************/
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#ifndef _GENERIC_KERNEL_HEADERS
+#include <scsi/ufs/ioctl.h>
+#include <scsi/ufs/ufs.h>
+#endif
+#include <unistd.h>
+#include <linux/fs.h>
+#include <limits.h>
+#include <dirent.h>
+#include <linux/kernel.h>
+#include <map>
+#include <vector>
+#include <string>
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+#include <inttypes.h>
+
+
+#define LOG_TAG "gpt-utils"
+#include <log/log.h>
+#include <cutils/properties.h>
+#include "gpt-utils.h"
+#include <zlib.h>
+#include <endian.h>
+
+
+/******************************************************************************
+ * DEFINE SECTION
+ ******************************************************************************/
+#define BLK_DEV_FILE    "/dev/block/mmcblk0"
+/* list the names of the backed-up partitions to be swapped */
+/* extension used for the backup partitions - tzbak, abootbak, etc. */
+#define BAK_PTN_NAME_EXT    "bak"
+#define XBL_PRIMARY         "/dev/block/bootdevice/by-name/xbl"
+#define XBL_BACKUP          "/dev/block/bootdevice/by-name/xblbak"
+#define XBL_AB_PRIMARY      "/dev/block/bootdevice/by-name/xbl_a"
+#define XBL_AB_SECONDARY    "/dev/block/bootdevice/by-name/xbl_b"
+/* GPT defines */
+#define MAX_LUNS                    26
+//Size of the buffer that needs to be passed to the UFS ioctl
+#define UFS_ATTR_DATA_SIZE          32
+//This will allow us to get the root lun path from the path to the partition.
+//i.e: from /dev/block/sdaXXX get /dev/block/sda. The assumption here is that
+//the boot critical luns lie between sda to sdz which is acceptable because
+//only user added external disks,etc would lie beyond that limit which do not
+//contain partitions that interest us here.
+#define PATH_TRUNCATE_LOC (sizeof("/dev/block/sda") - 1)
+
+//From /dev/block/sda get just sda
+#define LUN_NAME_START_LOC (sizeof("/dev/block/") - 1)
+#define BOOT_LUN_A_ID 1
+#define BOOT_LUN_B_ID 2
+/******************************************************************************
+ * MACROS
+ ******************************************************************************/
+
+
+#define GET_4_BYTES(ptr)    ((uint32_t) *((uint8_t *)(ptr)) | \
+        ((uint32_t) *((uint8_t *)(ptr) + 1) << 8) | \
+        ((uint32_t) *((uint8_t *)(ptr) + 2) << 16) | \
+        ((uint32_t) *((uint8_t *)(ptr) + 3) << 24))
+
+#define GET_8_BYTES(ptr)    ((uint64_t) *((uint8_t *)(ptr)) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 1) << 8) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 2) << 16) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 3) << 24) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 4) << 32) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 5) << 40) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 6) << 48) | \
+        ((uint64_t) *((uint8_t *)(ptr) + 7) << 56))
+
+#define PUT_4_BYTES(ptr, y)   *((uint8_t *)(ptr)) = (y) & 0xff; \
+        *((uint8_t *)(ptr) + 1) = ((y) >> 8) & 0xff; \
+        *((uint8_t *)(ptr) + 2) = ((y) >> 16) & 0xff; \
+        *((uint8_t *)(ptr) + 3) = ((y) >> 24) & 0xff;
+
+/******************************************************************************
+ * TYPES
+ ******************************************************************************/
+using namespace std;
+enum gpt_state {
+    GPT_OK = 0,
+    GPT_BAD_SIGNATURE,
+    GPT_BAD_CRC
+};
+//List of LUN's containing boot critical images.
+//Required in the case of UFS devices
+struct update_data {
+     char lun_list[MAX_LUNS][PATH_MAX];
+     uint32_t num_valid_entries;
+};
+
+/******************************************************************************
+ * FUNCTIONS
+ ******************************************************************************/
+/**
+ *  ==========================================================================
+ *
+ *  \brief  Read/Write len bytes from/to block dev
+ *
+ *  \param [in] fd      block dev file descriptor (returned from open)
+ *  \param [in] rw      RW flag: 0 - read, != 0 - write
+ *  \param [in] offset  block dev offset [bytes] - RW start position
+ *  \param [in] buf     Pointer to the buffer containing the data
+ *  \param [in] len     RW size in bytes. Buf must be at least that big
+ *
+ *  \return  0 on success
+ *
+ *  ==========================================================================
+ */
+static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len)
+{
+    int r;
+
+    if (lseek64(fd, offset, SEEK_SET) < 0) {
+        fprintf(stderr, "block dev lseek64 %" PRIi64 " failed: %s\n", offset,
+                strerror(errno));
+        return -1;
+    }
+
+    if (rw)
+        r = write(fd, buf, len);
+    else
+        r = read(fd, buf, len);
+
+    if (r < 0)
+        fprintf(stderr, "block dev %s failed: %s\n", rw ? "write" : "read",
+                strerror(errno));
+    else
+        r = 0;
+
+    return r;
+}
+
+
+
+/**
+ *  ==========================================================================
+ *
+ *  \brief  Search within GPT for partition entry with the given name
+ *  or it's backup twin (name-bak).
+ *
+ *  \param [in] ptn_name        Partition name to seek
+ *  \param [in] pentries_start  Partition entries array start pointer
+ *  \param [in] pentries_end    Partition entries array end pointer
+ *  \param [in] pentry_size     Single partition entry size [bytes]
+ *
+ *  \return  First partition entry pointer that matches the name or NULL
+ *
+ *  ==========================================================================
+ */
+static uint8_t *gpt_pentry_seek(const char *ptn_name,
+                                const uint8_t *pentries_start,
+                                const uint8_t *pentries_end,
+                                uint32_t pentry_size)
+{
+    char     *pentry_name;
+    unsigned  len = strlen(ptn_name);
+    unsigned  i;
+    char      name8[MAX_GPT_NAME_SIZE] = {0}; // initialize with null
+
+    for (pentry_name = (char *) (pentries_start + PARTITION_NAME_OFFSET);
+         pentry_name < (char *) pentries_end;
+         pentry_name += pentry_size) {
+
+        /* Partition names in GPT are UTF-16 - ignoring UTF-16 2nd byte */
+        for (i = 0; i < sizeof(name8) / 2; i++)
+            name8[i] = pentry_name[i * 2];
+        name8[i] = '\0';
+
+        if (!strncmp(ptn_name, name8, len)) {
+            if (name8[len] == 0 || !strcmp(&name8[len], BAK_PTN_NAME_EXT))
+                return (uint8_t *) (pentry_name - PARTITION_NAME_OFFSET);
+        }
+    }
+
+    return NULL;
+}
+
+
+
+/**
+ *  ==========================================================================
+ *
+ *  \brief  Swaps boot chain in GPT partition entries array
+ *
+ *  \param [in] pentries_start  Partition entries array start
+ *  \param [in] pentries_end    Partition entries array end
+ *  \param [in] pentry_size     Single partition entry size
+ *
+ *  \return  0 on success, 1 if no backup partitions found
+ *
+ *  ==========================================================================
+ */
+static int gpt_boot_chain_swap(const uint8_t *pentries_start,
+                                const uint8_t *pentries_end,
+                                uint32_t pentry_size)
+{
+    const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST };
+
+    int backup_not_found = 1;
+    unsigned i;
+
+    for (i = 0; i < ARRAY_SIZE(ptn_swap_list); i++) {
+        uint8_t *ptn_entry;
+        uint8_t *ptn_bak_entry;
+        uint8_t ptn_swap[PTN_ENTRY_SIZE];
+        //Skip the xbl partition on UFS devices. That is handled
+        //seperately.
+        if (gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i],
+                                PTN_XBL,
+                                strlen(PTN_XBL)))
+            continue;
+
+        ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start,
+                        pentries_end, pentry_size);
+        if (ptn_entry == NULL)
+            continue;
+
+        ptn_bak_entry = gpt_pentry_seek(ptn_swap_list[i],
+                        ptn_entry + pentry_size, pentries_end, pentry_size);
+        if (ptn_bak_entry == NULL) {
+            fprintf(stderr, "'%s' partition not backup - skip safe update\n",
+                    ptn_swap_list[i]);
+            continue;
+        }
+
+        /* swap primary <-> backup partition entries */
+        memcpy(ptn_swap, ptn_entry, PTN_ENTRY_SIZE);
+        memcpy(ptn_entry, ptn_bak_entry, PTN_ENTRY_SIZE);
+        memcpy(ptn_bak_entry, ptn_swap, PTN_ENTRY_SIZE);
+        backup_not_found = 0;
+    }
+
+    return backup_not_found;
+}
+
+
+
+/**
+ *  ==========================================================================
+ *
+ *  \brief  Sets secondary GPT boot chain
+ *
+ *  \param [in] fd    block dev file descriptor
+ *  \param [in] boot  Boot chain to switch to
+ *
+ *  \return  0 on success
+ *
+ *  ==========================================================================
+ */
+static int gpt2_set_boot_chain(int fd, enum boot_chain boot)
+{
+    int64_t  gpt2_header_offset;
+    uint64_t pentries_start_offset;
+    uint32_t gpt_header_size;
+    uint32_t pentry_size;
+    uint32_t pentries_array_size;
+
+    uint8_t *gpt_header = NULL;
+    uint8_t  *pentries = NULL;
+    uint32_t crc;
+    uint32_t crc_zero;
+    uint32_t blk_size = 0;
+    int r;
+
+
+    crc_zero = crc32(0L, Z_NULL, 0);
+    if (ioctl(fd, BLKSSZGET, &blk_size) != 0) {
+            fprintf(stderr, "Failed to get GPT device block size: %s\n",
+                            strerror(errno));
+            r = -1;
+            goto EXIT;
+    }
+    gpt_header = (uint8_t*)malloc(blk_size);
+    if (!gpt_header) {
+            fprintf(stderr, "Failed to allocate memory to hold GPT block\n");
+            r = -1;
+            goto EXIT;
+    }
+    gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size;
+    if (gpt2_header_offset < 0) {
+        fprintf(stderr, "Getting secondary GPT header offset failed: %s\n",
+                strerror(errno));
+        r = -1;
+        goto EXIT;
+    }
+
+    /* Read primary GPT header from block dev */
+    r = blk_rw(fd, 0, blk_size, gpt_header, blk_size);
+
+    if (r) {
+            fprintf(stderr, "Failed to read primary GPT header from blk dev\n");
+            goto EXIT;
+    }
+    pentries_start_offset =
+        GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size;
+    pentry_size = GET_4_BYTES(gpt_header + PENTRY_SIZE_OFFSET);
+    pentries_array_size =
+        GET_4_BYTES(gpt_header + PARTITION_COUNT_OFFSET) * pentry_size;
+
+    pentries = (uint8_t *) calloc(1, pentries_array_size);
+    if (pentries == NULL) {
+        fprintf(stderr,
+                    "Failed to alloc memory for GPT partition entries array\n");
+        r = -1;
+        goto EXIT;
+    }
+    /* Read primary GPT partititon entries array from block dev */
+    r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size);
+    if (r)
+        goto EXIT;
+
+    crc = crc32(crc_zero, pentries, pentries_array_size);
+    if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) {
+        fprintf(stderr, "Primary GPT partition entries array CRC invalid\n");
+        r = -1;
+        goto EXIT;
+    }
+
+    /* Read secondary GPT header from block dev */
+    r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size);
+    if (r)
+        goto EXIT;
+
+    gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET);
+    pentries_start_offset =
+        GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size;
+
+    if (boot == BACKUP_BOOT) {
+        r = gpt_boot_chain_swap(pentries, pentries + pentries_array_size,
+                                pentry_size);
+        if (r)
+            goto EXIT;
+    }
+
+    crc = crc32(crc_zero, pentries, pentries_array_size);
+    PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc);
+
+    /* header CRC is calculated with this field cleared */
+    PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0);
+    crc = crc32(crc_zero, gpt_header, gpt_header_size);
+    PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc);
+
+    /* Write the modified GPT header back to block dev */
+    r = blk_rw(fd, 1, gpt2_header_offset, gpt_header, blk_size);
+    if (!r)
+        /* Write the modified GPT partititon entries array back to block dev */
+        r = blk_rw(fd, 1, pentries_start_offset, pentries,
+                    pentries_array_size);
+
+EXIT:
+    if(gpt_header)
+            free(gpt_header);
+    if (pentries)
+            free(pentries);
+    return r;
+}
+
+/**
+ *  ==========================================================================
+ *
+ *  \brief  Checks GPT state (header signature and CRC)
+ *
+ *  \param [in] fd      block dev file descriptor
+ *  \param [in] gpt     GPT header to be checked
+ *  \param [out] state  GPT header state
+ *
+ *  \return  0 on success
+ *
+ *  ==========================================================================
+ */
+static int gpt_get_state(int fd, enum gpt_instance gpt, enum gpt_state *state)
+{
+    int64_t gpt_header_offset;
+    uint32_t gpt_header_size;
+    uint8_t  *gpt_header = NULL;
+    uint32_t crc;
+    uint32_t crc_zero;
+    uint32_t blk_size = 0;
+
+    *state = GPT_OK;
+
+    crc_zero = crc32(0L, Z_NULL, 0);
+    if (ioctl(fd, BLKSSZGET, &blk_size) != 0) {
+            fprintf(stderr, "Failed to get GPT device block size: %s\n",
+                            strerror(errno));
+            goto error;
+    }
+    gpt_header = (uint8_t*)malloc(blk_size);
+    if (!gpt_header) {
+            fprintf(stderr, "gpt_get_state:Failed to alloc memory for header\n");
+            goto error;
+    }
+    if (gpt == PRIMARY_GPT)
+        gpt_header_offset = blk_size;
+    else {
+        gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size;
+        if (gpt_header_offset < 0) {
+            fprintf(stderr, "gpt_get_state:Seek to end of GPT part fail\n");
+            goto error;
+        }
+    }
+
+    if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) {
+        fprintf(stderr, "gpt_get_state: blk_rw failed\n");
+        goto error;
+    }
+    if (memcmp(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE)))
+        *state = GPT_BAD_SIGNATURE;
+    gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET);
+
+    crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET);
+    /* header CRC is calculated with this field cleared */
+    PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0);
+    if (crc32(crc_zero, gpt_header, gpt_header_size) != crc)
+        *state = GPT_BAD_CRC;
+    free(gpt_header);
+    return 0;
+error:
+    if (gpt_header)
+            free(gpt_header);
+    return -1;
+}
+
+
+
+/**
+ *  ==========================================================================
+ *
+ *  \brief  Sets GPT header state (used to corrupt and fix GPT signature)
+ *
+ *  \param [in] fd     block dev file descriptor
+ *  \param [in] gpt    GPT header to be checked
+ *  \param [in] state  GPT header state to set (GPT_OK or GPT_BAD_SIGNATURE)
+ *
+ *  \return  0 on success
+ *
+ *  ==========================================================================
+ */
+static int gpt_set_state(int fd, enum gpt_instance gpt, enum gpt_state state)
+{
+    int64_t gpt_header_offset;
+    uint32_t gpt_header_size;
+    uint8_t  *gpt_header = NULL;
+    uint32_t crc;
+    uint32_t crc_zero;
+    uint32_t blk_size = 0;
+
+    crc_zero = crc32(0L, Z_NULL, 0);
+    if (ioctl(fd, BLKSSZGET, &blk_size) != 0) {
+            fprintf(stderr, "Failed to get GPT device block size: %s\n",
+                            strerror(errno));
+            goto error;
+    }
+    gpt_header = (uint8_t*)malloc(blk_size);
+    if (!gpt_header) {
+            fprintf(stderr, "Failed to alloc memory for gpt header\n");
+            goto error;
+    }
+    if (gpt == PRIMARY_GPT)
+        gpt_header_offset = blk_size;
+    else {
+        gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size;
+        if (gpt_header_offset < 0) {
+            fprintf(stderr, "Failed to seek to end of GPT device\n");
+            goto error;
+        }
+    }
+    if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) {
+        fprintf(stderr, "Failed to r/w gpt header\n");
+        goto error;
+    }
+    if (state == GPT_OK)
+        memcpy(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE));
+    else if (state == GPT_BAD_SIGNATURE)
+        *gpt_header = 0;
+    else {
+        fprintf(stderr, "gpt_set_state: Invalid state\n");
+        goto error;
+    }
+
+    gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET);
+
+    /* header CRC is calculated with this field cleared */
+    PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0);
+    crc = crc32(crc_zero, gpt_header, gpt_header_size);
+    PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc);
+
+    if (blk_rw(fd, 1, gpt_header_offset, gpt_header, blk_size)) {
+        fprintf(stderr, "gpt_set_state: blk write failed\n");
+        goto error;
+    }
+    return 0;
+error:
+    if(gpt_header)
+           free(gpt_header);
+    return -1;
+}
+
+int get_scsi_node_from_bootdevice(const char *bootdev_path,
+                char *sg_node_path,
+                size_t buf_size)
+{
+        char sg_dir_path[PATH_MAX] = {0};
+        char real_path[PATH_MAX] = {0};
+        DIR *scsi_dir = NULL;
+        struct dirent *de;
+        int node_found = 0;
+        if (!bootdev_path || !sg_node_path) {
+                fprintf(stderr, "%s : invalid argument\n",
+                                 __func__);
+                goto error;
+        }
+        if (readlink(bootdev_path, real_path, sizeof(real_path) - 1) < 0) {
+                        fprintf(stderr, "failed to resolve link for %s(%s)\n",
+                                        bootdev_path,
+                                        strerror(errno));
+                        goto error;
+        }
+        if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){
+            fprintf(stderr, "Unrecognized path :%s:\n",
+                           real_path);
+            goto error;
+        }
+        //For the safe side in case there are additional partitions on
+        //the XBL lun we truncate the name.
+        real_path[PATH_TRUNCATE_LOC] = '\0';
+        if(strlen(real_path) < LUN_NAME_START_LOC + 1){
+            fprintf(stderr, "Unrecognized truncated path :%s:\n",
+                           real_path);
+            goto error;
+        }
+        //This will give us /dev/block/sdb/device/scsi_generic
+        //which contains a file sgY whose name gives us the path
+        //to /dev/sgY which we return
+        snprintf(sg_dir_path, sizeof(sg_dir_path) - 1,
+                        "/sys/block/%s/device/scsi_generic",
+                        &real_path[LUN_NAME_START_LOC]);
+        scsi_dir = opendir(sg_dir_path);
+        if (!scsi_dir) {
+                fprintf(stderr, "%s : Failed to open %s(%s)\n",
+                                __func__,
+                                sg_dir_path,
+                                strerror(errno));
+                goto error;
+        }
+        while((de = readdir(scsi_dir))) {
+                if (de->d_name[0] == '.')
+                        continue;
+                else if (!strncmp(de->d_name, "sg", 2)) {
+                          snprintf(sg_node_path,
+                                        buf_size -1,
+                                        "/dev/%s",
+                                        de->d_name);
+                          fprintf(stderr, "%s:scsi generic node is :%s:\n",
+                                          __func__,
+                                          sg_node_path);
+                          node_found = 1;
+                          break;
+                }
+        }
+        if(!node_found) {
+                fprintf(stderr,"%s: Unable to locate scsi generic node\n",
+                               __func__);
+                goto error;
+        }
+        closedir(scsi_dir);
+        return 0;
+error:
+        if (scsi_dir)
+                closedir(scsi_dir);
+        return -1;
+}
+
+int 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
+}
+
+//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)
+{
+        struct stat st;
+        ///sys/block/sdX/device/scsi_generic/
+        char sg_dev_node[PATH_MAX] = {0};
+        uint8_t boot_lun_id = 0;
+        const char *boot_dev = NULL;
+
+        if (chain == BACKUP_BOOT) {
+                boot_lun_id = BOOT_LUN_B_ID;
+                if (!stat(XBL_BACKUP, &st))
+                        boot_dev = XBL_BACKUP;
+                else if (!stat(XBL_AB_SECONDARY, &st))
+                        boot_dev = XBL_AB_SECONDARY;
+                else {
+                        fprintf(stderr, "%s: Failed to locate secondary xbl\n",
+                                        __func__);
+                        goto error;
+                }
+        } else if (chain == NORMAL_BOOT) {
+                boot_lun_id = BOOT_LUN_A_ID;
+                if (!stat(XBL_PRIMARY, &st))
+                        boot_dev = XBL_PRIMARY;
+                else if (!stat(XBL_AB_PRIMARY, &st))
+                        boot_dev = XBL_AB_PRIMARY;
+                else {
+                        fprintf(stderr, "%s: Failed to locate primary xbl\n",
+                                        __func__);
+                        goto error;
+                }
+        } else {
+                fprintf(stderr, "%s: Invalid boot chain id\n", __func__);
+                goto error;
+        }
+        //We need either both xbl and xblbak or both xbl_a and xbl_b to exist at
+        //the same time. If not the current configuration is invalid.
+        if((stat(XBL_PRIMARY, &st) ||
+                                stat(XBL_BACKUP, &st)) &&
+                        (stat(XBL_AB_PRIMARY, &st) ||
+                         stat(XBL_AB_SECONDARY, &st))) {
+                fprintf(stderr, "%s:primary/secondary XBL prt not found(%s)\n",
+                                __func__,
+                                strerror(errno));
+                goto error;
+        }
+        fprintf(stderr, "%s: setting %s lun as boot lun\n",
+                        __func__,
+                        boot_dev);
+        if (get_scsi_node_from_bootdevice(boot_dev,
+                                sg_dev_node,
+                                sizeof(sg_dev_node))) {
+                fprintf(stderr, "%s: Failed to get scsi node path for xblbak\n",
+                                __func__);
+                goto error;
+        }
+        if (set_boot_lun(sg_dev_node, boot_lun_id)) {
+                fprintf(stderr, "%s: Failed to set xblbak as boot partition\n",
+                                __func__);
+                goto error;
+        }
+        return 0;
+error:
+        return -1;
+}
+
+int gpt_utils_is_ufs_device()
+{
+    char bootdevice[PROPERTY_VALUE_MAX] = {0};
+    property_get("ro.boot.bootdevice", bootdevice, "N/A");
+    if (strlen(bootdevice) < strlen(".ufshc") + 1)
+        return 0;
+    return (!strncmp(&bootdevice[strlen(bootdevice) - strlen(".ufshc")],
+                            ".ufshc",
+                            sizeof(".ufshc")));
+}
+//dev_path is the path to the block device that contains the GPT image that
+//needs to be updated. This would be the device which holds one or more critical
+//boot partitions and their backups. In the case of EMMC this function would
+//be invoked only once on /dev/block/mmcblk1 since it holds the GPT image
+//containing all the partitions For UFS devices it could potentially be
+//invoked multiple times, once for each LUN containing critical image(s) and
+//their backups
+int prepare_partitions(enum boot_update_stage stage, const char *dev_path)
+{
+    int r = 0;
+    int fd = -1;
+    int is_ufs = gpt_utils_is_ufs_device();
+    enum gpt_state gpt_prim, gpt_second;
+    enum boot_update_stage internal_stage;
+    struct stat xbl_partition_stat;
+
+    if (!dev_path) {
+        fprintf(stderr, "%s: Invalid dev_path\n",
+                        __func__);
+        r = -1;
+        goto EXIT;
+    }
+    fd = open(dev_path, O_RDWR);
+    if (fd < 0) {
+        fprintf(stderr, "%s: Opening '%s' failed: %s\n",
+                        __func__,
+                       BLK_DEV_FILE,
+                       strerror(errno));
+        r = -1;
+        goto EXIT;
+    }
+    r = gpt_get_state(fd, PRIMARY_GPT, &gpt_prim) ||
+        gpt_get_state(fd, SECONDARY_GPT, &gpt_second);
+    if (r) {
+        fprintf(stderr, "%s: Getting GPT headers state failed\n",
+                        __func__);
+        goto EXIT;
+    }
+
+    /* These 2 combinations are unexpected and unacceptable */
+    if (gpt_prim == GPT_BAD_CRC || gpt_second == GPT_BAD_CRC) {
+        fprintf(stderr, "%s: GPT headers CRC corruption detected, aborting\n",
+                        __func__);
+        r = -1;
+        goto EXIT;
+    }
+    if (gpt_prim == GPT_BAD_SIGNATURE && gpt_second == GPT_BAD_SIGNATURE) {
+        fprintf(stderr, "%s: Both GPT headers corrupted, aborting\n",
+                        __func__);
+        r = -1;
+        goto EXIT;
+    }
+
+    /* Check internal update stage according GPT headers' state */
+    if (gpt_prim == GPT_OK && gpt_second == GPT_OK)
+        internal_stage = UPDATE_MAIN;
+    else if (gpt_prim == GPT_BAD_SIGNATURE)
+        internal_stage = UPDATE_BACKUP;
+    else if (gpt_second == GPT_BAD_SIGNATURE)
+        internal_stage = UPDATE_FINALIZE;
+    else {
+        fprintf(stderr, "%s: Abnormal GPTs state: primary (%d), secondary (%d), "
+                "aborting\n", __func__, gpt_prim, gpt_second);
+        r = -1;
+        goto EXIT;
+    }
+
+    /* Stage already set - ready for update, exitting */
+    if ((int) stage == (int) internal_stage - 1)
+        goto EXIT;
+    /* Unexpected stage given */
+    if (stage != internal_stage) {
+        r = -1;
+        goto EXIT;
+    }
+
+    switch (stage) {
+    case UPDATE_MAIN:
+            if (is_ufs) {
+                if(stat(XBL_PRIMARY, &xbl_partition_stat)||
+                                stat(XBL_BACKUP, &xbl_partition_stat)){
+                        //Non fatal error. Just means this target does not
+                        //use XBL but relies on sbl whose update is handled
+                        //by the normal methods.
+                        fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n",
+                                        __func__,
+                                        strerror(errno));
+                } else {
+                        //Switch the boot lun so that backup boot LUN is used
+                        r = gpt_utils_set_xbl_boot_partition(BACKUP_BOOT);
+                        if(r){
+                                fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n",
+                                                __func__);
+                                goto EXIT;
+                        }
+                }
+        }
+        //Fix up the backup GPT table so that it actually points to
+        //the backup copy of the boot critical images
+        fprintf(stderr, "%s: Preparing for primary partition update\n",
+                        __func__);
+        r = gpt2_set_boot_chain(fd, BACKUP_BOOT);
+        if (r) {
+            if (r < 0)
+                fprintf(stderr,
+                                "%s: Setting secondary GPT to backup boot failed\n",
+                                __func__);
+            /* No backup partitions - do not corrupt GPT, do not flag error */
+            else
+                r = 0;
+            goto EXIT;
+        }
+        //corrupt the primary GPT so that the backup(which now points to
+        //the backup boot partitions is used)
+        r = gpt_set_state(fd, PRIMARY_GPT, GPT_BAD_SIGNATURE);
+        if (r) {
+            fprintf(stderr, "%s: Corrupting primary GPT header failed\n",
+                            __func__);
+            goto EXIT;
+        }
+        break;
+    case UPDATE_BACKUP:
+        if (is_ufs) {
+                if(stat(XBL_PRIMARY, &xbl_partition_stat)||
+                                stat(XBL_BACKUP, &xbl_partition_stat)){
+                        //Non fatal error. Just means this target does not
+                        //use XBL but relies on sbl whose update is handled
+                        //by the normal methods.
+                        fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n",
+                                        __func__,
+                                        strerror(errno));
+                } else {
+                        //Switch the boot lun so that backup boot LUN is used
+                        r = gpt_utils_set_xbl_boot_partition(NORMAL_BOOT);
+                        if(r) {
+                                fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n",
+                                                __func__);
+                                goto EXIT;
+                        }
+                }
+        }
+        //Fix the primary GPT header so that is used
+        fprintf(stderr, "%s: Preparing for backup partition update\n",
+                        __func__);
+        r = gpt_set_state(fd, PRIMARY_GPT, GPT_OK);
+        if (r) {
+            fprintf(stderr, "%s: Fixing primary GPT header failed\n",
+                             __func__);
+            goto EXIT;
+        }
+        //Corrupt the scondary GPT header
+        r = gpt_set_state(fd, SECONDARY_GPT, GPT_BAD_SIGNATURE);
+        if (r) {
+            fprintf(stderr, "%s: Corrupting secondary GPT header failed\n",
+                            __func__);
+            goto EXIT;
+        }
+        break;
+    case UPDATE_FINALIZE:
+        //Undo the changes we had made in the UPDATE_MAIN stage so that the
+        //primary/backup GPT headers once again point to the same set of
+        //partitions
+        fprintf(stderr, "%s: Finalizing partitions\n",
+                        __func__);
+        r = gpt2_set_boot_chain(fd, NORMAL_BOOT);
+        if (r < 0) {
+            fprintf(stderr, "%s: Setting secondary GPT to normal boot failed\n",
+                            __func__);
+            goto EXIT;
+        }
+
+        r = gpt_set_state(fd, SECONDARY_GPT, GPT_OK);
+        if (r) {
+            fprintf(stderr, "%s: Fixing secondary GPT header failed\n",
+                            __func__);
+            goto EXIT;
+        }
+        break;
+    default:;
+    }
+
+EXIT:
+    if (fd >= 0) {
+       fsync(fd);
+       close(fd);
+    }
+    return r;
+}
+
+int add_lun_to_update_list(char *lun_path, struct update_data *dat)
+{
+        uint32_t i = 0;
+        struct stat st;
+        if (!lun_path || !dat){
+                fprintf(stderr, "%s: Invalid data",
+                                __func__);
+                return -1;
+        }
+        if (stat(lun_path, &st)) {
+                fprintf(stderr, "%s: Unable to access %s. Skipping adding to list",
+                                __func__,
+                                lun_path);
+                return -1;
+        }
+        if (dat->num_valid_entries == 0) {
+                fprintf(stderr, "%s: Copying %s into lun_list[%d]\n",
+                                __func__,
+                                lun_path,
+                                i);
+                strlcpy(dat->lun_list[0], lun_path,
+                                PATH_MAX * sizeof(char));
+                dat->num_valid_entries = 1;
+        } else {
+                for (i = 0; (i < dat->num_valid_entries) &&
+                                (dat->num_valid_entries < MAX_LUNS - 1); i++) {
+                        //Check if the current LUN is not already part
+                        //of the lun list
+                        if (!strncmp(lun_path,dat->lun_list[i],
+                                                strlen(dat->lun_list[i]))) {
+                                //LUN already in list..Return
+                                return 0;
+                        }
+                }
+                fprintf(stderr, "%s: Copying %s into lun_list[%d]\n",
+                                __func__,
+                                lun_path,
+                                dat->num_valid_entries);
+                //Add LUN path lun list
+                strlcpy(dat->lun_list[dat->num_valid_entries], lun_path,
+                                PATH_MAX * sizeof(char));
+                dat->num_valid_entries++;
+        }
+        return 0;
+}
+
+int prepare_boot_update(enum boot_update_stage stage)
+{
+        int is_ufs = gpt_utils_is_ufs_device();
+        struct stat ufs_dir_stat;
+        struct update_data data;
+        int rcode = 0;
+        uint32_t i = 0;
+        int is_error = 0;
+        const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST };
+        //Holds /dev/block/bootdevice/by-name/*bak entry
+        char buf[PATH_MAX] = {0};
+        //Holds the resolved path of the symlink stored in buf
+        char real_path[PATH_MAX] = {0};
+
+        if (!is_ufs) {
+                //emmc device. Just pass in path to mmcblk0
+                return prepare_partitions(stage, BLK_DEV_FILE);
+        } else {
+                //Now we need to find the list of LUNs over
+                //which the boot critical images are spread
+                //and set them up for failsafe updates.To do
+                //this we find out where the symlinks for the
+                //each of the paths under
+                ///dev/block/bootdevice/by-name/PTN_SWAP_LIST
+                //actually point to.
+                fprintf(stderr, "%s: Running on a UFS device\n",
+                                __func__);
+                memset(&data, '\0', sizeof(struct update_data));
+                for (i=0; i < ARRAY_SIZE(ptn_swap_list); i++) {
+                        //XBL on UFS does not follow the convention
+                        //of being loaded based on well known GUID'S.
+                        //We take care of switching the UFS boot LUN
+                        //explicitly later on.
+                        if (!strncmp(ptn_swap_list[i],
+                                                PTN_XBL,
+                                                strlen(PTN_XBL)))
+                                continue;
+                        snprintf(buf, sizeof(buf),
+                                        "%s/%sbak",
+                                        BOOT_DEV_DIR,
+                                        ptn_swap_list[i]);
+                        if (stat(buf, &ufs_dir_stat)) {
+                                continue;
+                        }
+                        if (readlink(buf, real_path, sizeof(real_path) - 1) < 0)
+                        {
+                                fprintf(stderr, "%s: readlink error. Skipping %s",
+                                                __func__,
+                                                strerror(errno));
+                        } else {
+                              if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){
+                                    fprintf(stderr, "Unknown path.Skipping :%s:\n",
+                                                real_path);
+                                } else {
+                                    real_path[PATH_TRUNCATE_LOC] = '\0';
+                                    add_lun_to_update_list(real_path, &data);
+                                }
+                        }
+                        memset(buf, '\0', sizeof(buf));
+                        memset(real_path, '\0', sizeof(real_path));
+                }
+                for (i=0; i < data.num_valid_entries; i++) {
+                        fprintf(stderr, "%s: Preparing %s for update stage %d\n",
+                                        __func__,
+                                        data.lun_list[i],
+                                        stage);
+                        rcode = prepare_partitions(stage, data.lun_list[i]);
+                        if (rcode != 0)
+                        {
+                                fprintf(stderr, "%s: Failed to prepare %s.Continuing..\n",
+                                                __func__,
+                                                data.lun_list[i]);
+                                is_error = 1;
+                        }
+                }
+        }
+        if (is_error)
+                return -1;
+        return 0;
+}
+
+//Given a parttion name(eg: rpm) get the path to the block device that
+//represents the GPT disk the partition resides on. In the case of emmc it
+//would be the default emmc dev(/dev/block/mmcblk0). In the case of UFS we look
+//through the /dev/block/bootdevice/by-name/ tree for partname, and resolve
+//the path to the LUN from there.
+static int get_dev_path_from_partition_name(const char *partname,
+                char *buf,
+                size_t buflen)
+{
+        struct stat st;
+        char path[PATH_MAX] = {0};
+        if (!partname || !buf || buflen < ((PATH_TRUNCATE_LOC) + 1)) {
+                ALOGE("%s: Invalid argument", __func__);
+                goto error;
+        }
+        if (gpt_utils_is_ufs_device()) {
+                //Need to find the lun that holds partition partname
+                snprintf(path, sizeof(path),
+                                "%s/%s",
+                                BOOT_DEV_DIR,
+                                partname);
+                if (stat(path, &st)) {
+                        goto error;
+                }
+                if (readlink(path, buf, buflen) < 0)
+                {
+                        goto error;
+                } else {
+                        buf[PATH_TRUNCATE_LOC] = '\0';
+                }
+        } else {
+                snprintf(buf, buflen, BLK_DEV_FILE);
+        }
+        return 0;
+
+error:
+        return -1;
+}
+
+int gpt_utils_get_partition_map(vector<string>& ptn_list,
+                map<string, vector<string>>& partition_map) {
+        char devpath[PATH_MAX] = {'\0'};
+        map<string, vector<string>>::iterator it;
+        if (ptn_list.size() < 1) {
+                fprintf(stderr, "%s: Invalid ptn list\n", __func__);
+                goto error;
+        }
+        //Go through the passed in list
+        for (uint32_t i = 0; i < ptn_list.size(); i++)
+        {
+                //Key in the map is the path to the device that holds the
+                //partition
+                if (get_dev_path_from_partition_name(ptn_list[i].c_str(),
+                                devpath,
+                                sizeof(devpath))) {
+                        //Not necessarily an error. The partition may just
+                        //not be present.
+                        continue;
+                }
+                string path = devpath;
+                it = partition_map.find(path);
+                if (it != partition_map.end()) {
+                        it->second.push_back(ptn_list[i]);
+                } else {
+                        vector<string> str_vec;
+                        str_vec.push_back( ptn_list[i]);
+                        partition_map.insert(pair<string, vector<string>>
+                                        (path, str_vec));
+                }
+                memset(devpath, '\0', sizeof(devpath));
+        }
+        return 0;
+error:
+        return -1;
+}
+
+//Get the block size of the disk represented by decsriptor fd
+static uint32_t gpt_get_block_size(int fd)
+{
+        uint32_t block_size = 0;
+        if (fd < 0) {
+                ALOGE("%s: invalid descriptor",
+                                __func__);
+                goto error;
+        }
+        if (ioctl(fd, BLKSSZGET, &block_size) != 0) {
+                ALOGE("%s: Failed to get GPT dev block size : %s",
+                                __func__,
+                                strerror(errno));
+                goto error;
+        }
+        return block_size;
+error:
+        return 0;
+}
+
+//Write the GPT header present in the passed in buffer back to the
+//disk represented by fd
+static int gpt_set_header(uint8_t *gpt_header, int fd,
+                enum gpt_instance instance)
+{
+        uint32_t block_size = 0;
+        off64_t gpt_header_offset = 0;
+        if (!gpt_header || fd < 0) {
+                ALOGE("%s: Invalid arguments",
+                                __func__);
+                goto error;
+        }
+        block_size = gpt_get_block_size(fd);
+        if (block_size == 0) {
+                ALOGE("%s: Failed to get block size", __func__);
+                goto error;
+        }
+        if (instance == PRIMARY_GPT)
+                gpt_header_offset = block_size;
+        else
+                gpt_header_offset = lseek64(fd, 0, SEEK_END) - block_size;
+        if (gpt_header_offset <= 0) {
+                ALOGE("%s: Failed to get gpt header offset",__func__);
+                goto error;
+        }
+        if (blk_rw(fd, 1, gpt_header_offset, gpt_header, block_size)) {
+                ALOGE("%s: Failed to write back GPT header", __func__);
+                goto error;
+        }
+        return 0;
+error:
+        return -1;
+}
+
+//Read out the GPT header for the disk that contains the partition partname
+static uint8_t* gpt_get_header(const char *partname, enum gpt_instance instance)
+{
+        uint8_t* hdr = NULL;
+        char devpath[PATH_MAX] = {0};
+        int64_t hdr_offset = 0;
+        uint32_t block_size = 0;
+        int fd = -1;
+        if (!partname) {
+                ALOGE("%s: Invalid partition name", __func__);
+                goto error;
+        }
+        if (get_dev_path_from_partition_name(partname, devpath, sizeof(devpath))
+                        != 0) {
+                ALOGE("%s: Failed to resolve path for %s",
+                                __func__,
+                                partname);
+                goto error;
+        }
+        fd = open(devpath, O_RDWR);
+        if (fd < 0) {
+                ALOGE("%s: Failed to open %s : %s",
+                                __func__,
+                                devpath,
+                                strerror(errno));
+                goto error;
+        }
+        block_size = gpt_get_block_size(fd);
+        if (block_size == 0)
+        {
+                ALOGE("%s: Failed to get gpt block size for %s",
+                                __func__,
+                                partname);
+                goto error;
+        }
+
+        hdr = (uint8_t*)malloc(block_size);
+        if (!hdr) {
+                ALOGE("%s: Failed to allocate memory for gpt header",
+                                __func__);
+        }
+        if (instance == PRIMARY_GPT)
+                hdr_offset = block_size;
+        else {
+                hdr_offset = lseek64(fd, 0, SEEK_END) - block_size;
+        }
+        if (hdr_offset < 0) {
+                ALOGE("%s: Failed to get gpt header offset",
+                                __func__);
+                goto error;
+        }
+        if (blk_rw(fd, 0, hdr_offset, hdr, block_size)) {
+                ALOGE("%s: Failed to read GPT header from device",
+                                __func__);
+                goto error;
+        }
+        close(fd);
+        return hdr;
+error:
+        if (fd >= 0)
+                close(fd);
+        if (hdr)
+                free(hdr);
+        return NULL;
+}
+
+//Returns the partition entry array based on the
+//passed in buffer which contains the gpt header.
+//The fd here is the descriptor for the 'disk' which
+//holds the partition
+static uint8_t* gpt_get_pentry_arr(uint8_t *hdr, int fd)
+{
+        uint64_t pentries_start = 0;
+        uint32_t pentry_size = 0;
+        uint32_t block_size = 0;
+        uint32_t pentries_arr_size = 0;
+        uint8_t *pentry_arr = NULL;
+        int rc = 0;
+        if (!hdr) {
+                ALOGE("%s: Invalid header", __func__);
+                goto error;
+        }
+        if (fd < 0) {
+                ALOGE("%s: Invalid fd", __func__);
+                goto error;
+        }
+        block_size = gpt_get_block_size(fd);
+        if (!block_size) {
+                ALOGE("%s: Failed to get gpt block size for",
+                                __func__);
+                goto error;
+        }
+        pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size;
+        pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET);
+        pentries_arr_size =
+                GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size;
+        pentry_arr = (uint8_t*)calloc(1, pentries_arr_size);
+        if (!pentry_arr) {
+                ALOGE("%s: Failed to allocate memory for partition array",
+                                __func__);
+                goto error;
+        }
+        rc = blk_rw(fd, 0,
+                        pentries_start,
+                        pentry_arr,
+                        pentries_arr_size);
+        if (rc) {
+                ALOGE("%s: Failed to read partition entry array",
+                                __func__);
+                goto error;
+        }
+        return pentry_arr;
+error:
+        if (pentry_arr)
+                free(pentry_arr);
+        return NULL;
+}
+
+static int gpt_set_pentry_arr(uint8_t *hdr, int fd, uint8_t* arr)
+{
+        uint32_t block_size = 0;
+        uint64_t pentries_start = 0;
+        uint32_t pentry_size = 0;
+        uint32_t pentries_arr_size = 0;
+        int rc = 0;
+        if (!hdr || fd < 0 || !arr) {
+                ALOGE("%s: Invalid argument", __func__);
+                goto error;
+        }
+        block_size = gpt_get_block_size(fd);
+        if (!block_size) {
+                ALOGE("%s: Failed to get gpt block size for",
+                                __func__);
+                goto error;
+        }
+        pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size;
+        pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET);
+        pentries_arr_size =
+                GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size;
+        rc = blk_rw(fd, 1,
+                        pentries_start,
+                        arr,
+                        pentries_arr_size);
+        if (rc) {
+                ALOGE("%s: Failed to read partition entry array",
+                                __func__);
+                goto error;
+        }
+        return 0;
+error:
+        return -1;
+}
+
+
+
+//Allocate a handle used by calls to the "gpt_disk" api's
+struct gpt_disk * gpt_disk_alloc()
+{
+        struct gpt_disk *disk;
+        disk = (struct gpt_disk *)malloc(sizeof(struct gpt_disk));
+        if (!disk) {
+                ALOGE("%s: Failed to allocate memory", __func__);
+                goto end;
+        }
+        memset(disk, 0, sizeof(struct gpt_disk));
+end:
+        return disk;
+}
+
+//Free previously allocated/initialized handle
+void gpt_disk_free(struct gpt_disk *disk)
+{
+        if (!disk)
+                return;
+        if (disk->hdr)
+                free(disk->hdr);
+        if (disk->hdr_bak)
+                free(disk->hdr_bak);
+        if (disk->pentry_arr)
+                free(disk->pentry_arr);
+        if (disk->pentry_arr_bak)
+                free(disk->pentry_arr_bak);
+        free(disk);
+        return;
+}
+
+//fills up the passed in gpt_disk struct with information about the
+//disk represented by path dev. Returns 0 on success and -1 on error.
+int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *dsk)
+{
+
+	struct gpt_disk *disk = NULL;
+	int fd = -1;
+	uint32_t gpt_header_size = 0;
+	uint32_t crc_zero;
+
+	crc_zero = crc32(0L, Z_NULL, 0);
+        if (!dsk || !dev) {
+                ALOGE("%s: Invalid arguments", __func__);
+                goto error;
+        }
+        disk = dsk;
+        disk->hdr = gpt_get_header(dev, PRIMARY_GPT);
+        if (!disk->hdr) {
+                ALOGE("%s: Failed to get primary header", __func__);
+                goto error;
+        }
+        gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET);
+        disk->hdr_crc = crc32(crc_zero, disk->hdr, gpt_header_size);
+        disk->hdr_bak = gpt_get_header(dev, SECONDARY_GPT);
+        if (!disk->hdr_bak) {
+                ALOGE("%s: Failed to get backup header", __func__);
+                goto error;
+        }
+        disk->hdr_bak_crc = crc32(crc_zero, disk->hdr_bak, gpt_header_size);
+
+        //Descriptor for the block device. We will use this for further
+        //modifications to the partition table
+        if (get_dev_path_from_partition_name(dev,
+                                disk->devpath,
+                                sizeof(disk->devpath)) != 0) {
+                ALOGE("%s: Failed to resolve path for %s",
+                                __func__,
+                                dev);
+                goto error;
+        }
+        fd = open(disk->devpath, O_RDWR);
+        if (fd < 0) {
+                ALOGE("%s: Failed to open %s: %s",
+                                __func__,
+                                disk->devpath,
+                                strerror(errno));
+                goto error;
+        }
+        disk->pentry_arr = gpt_get_pentry_arr(disk->hdr, fd);
+        if (!disk->pentry_arr) {
+                ALOGE("%s: Failed to obtain partition entry array",
+                                __func__);
+                goto error;
+        }
+        disk->pentry_arr_bak = gpt_get_pentry_arr(disk->hdr_bak, fd);
+        if (!disk->pentry_arr_bak) {
+                ALOGE("%s: Failed to obtain backup partition entry array",
+                                __func__);
+                goto error;
+        }
+        disk->pentry_size = GET_4_BYTES(disk->hdr + PENTRY_SIZE_OFFSET);
+        disk->pentry_arr_size =
+                GET_4_BYTES(disk->hdr + PARTITION_COUNT_OFFSET) *
+                disk->pentry_size;
+        disk->pentry_arr_crc = GET_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET);
+        disk->pentry_arr_bak_crc = GET_4_BYTES(disk->hdr_bak +
+                        PARTITION_CRC_OFFSET);
+        disk->block_size = gpt_get_block_size(fd);
+        close(fd);
+        disk->is_initialized = GPT_DISK_INIT_MAGIC;
+        return 0;
+error:
+        if (fd >= 0)
+                close(fd);
+        return -1;
+}
+
+//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)
+{
+        uint8_t *ptn_arr = NULL;
+        if (!disk || !partname || disk->is_initialized != GPT_DISK_INIT_MAGIC) {
+                ALOGE("%s: Invalid argument",__func__);
+                goto error;
+        }
+        ptn_arr = (instance == PRIMARY_GPT) ?
+                disk->pentry_arr : disk->pentry_arr_bak;
+        return (gpt_pentry_seek(partname, ptn_arr,
+                        ptn_arr + disk->pentry_arr_size ,
+                        disk->pentry_size));
+error:
+        return NULL;
+}
+
+//Update CRC values for the various components of the gpt_disk
+//structure. This function should be called after any of the fields
+//have been updated before the structure contents are written back to
+//disk.
+int gpt_disk_update_crc(struct gpt_disk *disk)
+{
+        uint32_t gpt_header_size = 0;
+        uint32_t crc_zero;
+        crc_zero = crc32(0L, Z_NULL, 0);
+        if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)) {
+                ALOGE("%s: invalid argument", __func__);
+                goto error;
+        }
+        //Recalculate the CRC of the primary partiton array
+        disk->pentry_arr_crc = crc32(crc_zero,
+                        disk->pentry_arr,
+                        disk->pentry_arr_size);
+        //Recalculate the CRC of the backup partition array
+        disk->pentry_arr_bak_crc = crc32(crc_zero,
+                        disk->pentry_arr_bak,
+                        disk->pentry_arr_size);
+        //Update the partition CRC value in the primary GPT header
+        PUT_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET, disk->pentry_arr_crc);
+        //Update the partition CRC value in the backup GPT header
+        PUT_4_BYTES(disk->hdr_bak + PARTITION_CRC_OFFSET,
+                        disk->pentry_arr_bak_crc);
+        //Update the CRC value of the primary header
+        gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET);
+        //Header CRC is calculated with its own CRC field set to 0
+        PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, 0);
+        PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, 0);
+        disk->hdr_crc = crc32(crc_zero, disk->hdr, gpt_header_size);
+        disk->hdr_bak_crc = crc32(crc_zero, disk->hdr_bak, gpt_header_size);
+        PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, disk->hdr_crc);
+        PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, disk->hdr_bak_crc);
+        return 0;
+error:
+        return -1;
+}
+
+//Write the contents of struct gpt_disk back to the actual disk
+int gpt_disk_commit(struct gpt_disk *disk)
+{
+        int fd = -1;
+        if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)){
+                ALOGE("%s: Invalid args", __func__);
+                goto error;
+        }
+        fd = open(disk->devpath, O_RDWR);
+        if (fd < 0) {
+                ALOGE("%s: Failed to open %s: %s",
+                                __func__,
+                                disk->devpath,
+                                strerror(errno));
+                goto error;
+        }
+        //Write the primary header
+        if(gpt_set_header(disk->hdr, fd, PRIMARY_GPT) != 0) {
+                ALOGE("%s: Failed to update primary GPT header",
+                                __func__);
+                goto error;
+        }
+        //Write back the primary partition array
+        if (gpt_set_pentry_arr(disk->hdr, fd, disk->pentry_arr)) {
+                ALOGE("%s: Failed to write primary GPT partition arr",
+                                __func__);
+                goto error;
+        }
+        //Write back the secondary header
+        if(gpt_set_header(disk->hdr_bak, fd, SECONDARY_GPT) != 0) {
+                ALOGE("%s: Failed to update secondary GPT header",
+                                __func__);
+                goto error;
+        }
+        //Write back the secondary partition array
+        if (gpt_set_pentry_arr(disk->hdr_bak, fd, disk->pentry_arr_bak)) {
+                ALOGE("%s: Failed to write secondary GPT partition arr",
+                                __func__);
+                goto error;
+        }
+        close(fd);
+        return 0;
+error:
+        if (fd >= 0)
+                close(fd);
+        return -1;
+}
diff --git a/gpt-utils/gpt-utils.h b/gpt-utils/gpt-utils.h
new file mode 100644
index 0000000..58b40be
--- /dev/null
+++ b/gpt-utils/gpt-utils.h
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2013,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 "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, "sbl1", "rpm", "tz", "aboot", "abl", "hyp", "lksecapp", "keymaster", "cmnlib", "cmnlib32", "cmnlib64", "pmic", "apdp", "devcfg", "hosd", "keystore", "msadp", "mdtp", "mdtpsecapp", "dsp", "aop", "qupfw", "vbmeta", "dtbo", "imagefv", "ImageFv", "multiimgoem", "multiimgqti", "uefisecapp"
+#define AB_PTN_LIST PTN_SWAP_LIST, "boot", "system", "vendor", "odm", "modem", "bluetooth"
+#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__ */
diff --git a/gpt-utils/sparse_crc32.cpp b/gpt-utils/sparse_crc32.cpp
new file mode 100644
index 0000000..267322c
--- /dev/null
+++ b/gpt-utils/sparse_crc32.cpp
@@ -0,0 +1,97 @@
+/*-
+ *  COPYRIGHT (C) 1986 Gary S. Brown.  You may use this program, or
+ *  code or tables extracted from it, as desired without restriction.
+ */
+
+/*
+ *  First, the polynomial itself and its table of feedback terms.  The
+ *  polynomial is
+ *  X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
+ *
+ *  Note that we take it "backwards" and put the highest-order term in
+ *  the lowest-order bit.  The X^32 term is "implied"; the LSB is the
+ *  X^31 term, etc.  The X^0 term (usually shown as "+1") results in
+ *  the MSB being 1
+ *
+ *  Note that the usual hardware shift register implementation, which
+ *  is what we're using (we're merely optimizing it by doing eight-bit
+ *  chunks at a time) shifts bits into the lowest-order term.  In our
+ *  implementation, that means shifting towards the right.  Why do we
+ *  do it this way?  Because the calculated CRC must be transmitted in
+ *  order from highest-order term to lowest-order term.  UARTs transmit
+ *  characters in order from LSB to MSB.  By storing the CRC this way
+ *  we hand it to the UART in the order low-byte to high-byte; the UART
+ *  sends each low-bit to hight-bit; and the result is transmission bit
+ *  by bit from highest- to lowest-order term without requiring any bit
+ *  shuffling on our part.  Reception works similarly
+ *
+ *  The feedback terms table consists of 256, 32-bit entries.  Notes
+ *
+ *      The table can be generated at runtime if desired; code to do so
+ *      is shown later.  It might not be obvious, but the feedback
+ *      terms simply represent the results of eight shift/xor opera
+ *      tions for all combinations of data and CRC register values
+ *
+ *      The values must be right-shifted by eight bits by the "updcrc
+ *      logic; the shift must be unsigned (bring in zeroes).  On some
+ *      hardware you could probably optimize the shift in assembler by
+ *      using byte-swap instructions
+ *      polynomial $edb88320
+ *
+ *
+ * CRC32 code derived from work by Gary S. Brown.
+ */
+
+/* Code taken from FreeBSD 8 */
+#include <stdint.h>
+#include <stdio.h>
+
+static uint32_t crc32_tab[] = {
+    0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+    0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+    0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+    0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+    0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+    0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+    0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+    0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+    0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+    0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+    0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+    0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+    0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+    0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+    0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+    0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+    0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+    0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+    0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+    0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+    0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+    0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+    0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+    0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+    0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+    0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+    0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+    0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+    0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+    0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+    0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+    0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d};
+
+/*
+ * A function that calculates the CRC-32 based on the table above is
+ * given below for documentation purposes. An equivalent implementation
+ * of this function that's actually used in the kernel can be found
+ * in sys/libkern.h, where it can be inlined.
+ */
+
+uint32_t sparse_crc32(uint32_t crc_in, const void* buf, size_t size) {
+  const uint8_t* p = reinterpret_cast<const uint8_t*>(buf);
+  uint32_t crc;
+
+  crc = crc_in ^ ~0U;
+  while (size--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
+  return crc ^ ~0U;
+}
diff --git a/gpt-utils/sparse_crc32.h b/gpt-utils/sparse_crc32.h
new file mode 100644
index 0000000..2702c4f
--- /dev/null
+++ b/gpt-utils/sparse_crc32.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#ifndef _LIBSPARSE_SPARSE_CRC32_H_
+#define _LIBSPARSE_SPARSE_CRC32_H_
+
+#include <stdint.h>
+
+uint32_t sparse_crc32(uint32_t crc, const void* buf, size_t size);
+
+#endif
diff --git a/init/Android.bp b/init/Android.bp
new file mode 100644
index 0000000..b04b29c
--- /dev/null
+++ b/init/Android.bp
@@ -0,0 +1,14 @@
+cc_library_static {
+    name: "libinit_sm8250",
+
+    include_dirs: [
+        "system/core/init",
+    ],
+    static_libs: ["libbase"],
+    cflags: [
+        "-Wall",
+    ],
+    srcs: ["init_sm8250.cpp"],
+    recovery_available: true,
+    ramdisk_available: true,
+}
\ No newline at end of file
diff --git a/init/init_sm8250.cpp b/init/init_sm8250.cpp
new file mode 100644
index 0000000..2958163
--- /dev/null
+++ b/init/init_sm8250.cpp
@@ -0,0 +1,220 @@
+/*
+   Copyright (c) 2015, The Linux Foundation. All rights reserved.
+   Copyright (C) 2020 The OmniRom Project.
+   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 <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <android-base/file.h>
+#include <android-base/properties.h>
+#include <android-base/logging.h>
+#include "property_service.h"
+#include <sys/resource.h>
+#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#include <sys/_system_properties.h>
+
+#define CUSTOMER_FILE "/mnt/vendor/persist/CUSTOMER"
+#define IDCODE_FILE "/mnt/vendor/persist/COLOR"
+#define VARIANT_FILE "/mnt/vendor/persist/COUNTRY"
+
+namespace android {
+namespace init {
+
+using android::base::GetProperty;
+using android::base::ReadFileToString;
+
+void property_override(const std::string& name, const std::string& value)
+{
+    size_t valuelen = value.size();
+
+    prop_info* pi = (prop_info*) __system_property_find(name.c_str());
+    if (pi != nullptr) {
+        __system_property_update(pi, value.c_str(), valuelen);
+    }
+    else {
+        int rc = __system_property_add(name.c_str(), name.size(), value.c_str(), valuelen);
+        if (rc < 0) {
+            LOG(ERROR) << "property_set(\"" << name << "\", \"" << value << "\") failed: "
+                       << "__system_property_add failed";
+        }
+    }
+}
+
+void property_override_dual(char const prop[], char const system_prop[],
+    const std::string& value)
+{
+    property_override(prop, value);
+    property_override(system_prop, value);
+}
+
+void ro_prop_override(char const source[], char const prop[],
+    const std::string& value, bool product)
+{
+    std::string prop_name = "ro.";
+
+    if (product) prop_name += "product.";
+    if (source != nullptr) prop_name += source;
+    if (!product) prop_name += "build.";
+    prop_name += prop;
+
+    property_override(prop_name.c_str(), value);
+};
+
+static const char* RO_PROP_SOURCES[] = {
+    nullptr,
+    "bootimage.",
+    "odm.",
+    "odm_dlkm.",
+    "product.",
+    "system.",
+    "system_dlkm.",
+    "system_ext.",
+    "vendor.",
+    "vendor_dlkm.",
+};
+
+/* From Magisk@jni/magiskhide/hide_utils.c */
+static const char *snet_prop_key[] = {
+    "ro.boot.vbmeta.device_state",
+    "ro.boot.verifiedbootstate",
+    "ro.boot.flash.locked",
+    "ro.boot.veritymode",
+    "ro.boot.warranty_bit",
+    "ro.warranty_bit",
+    NULL
+};
+
+ static const char *snet_prop_value[] = {
+    "locked",
+    "green",
+    "1",
+    "enforcing",
+    "0",
+    "0",
+    NULL
+};
+
+ static void workaround_snet_properties() {
+
+     // Hide all sensitive props
+    for (int i = 0; snet_prop_key[i]; ++i) {
+        property_override(snet_prop_key[i], snet_prop_value[i]);
+    }
+}
+
+static void set_configs()
+{
+    std::string variantValue;
+
+    if (ReadFileToString(CUSTOMER_FILE, &variantValue)) {
+        property_override("ro.vendor.config.CID", variantValue.c_str());
+    }
+    if (ReadFileToString(IDCODE_FILE, &variantValue)) {
+        property_override("ro.vendor.config.idcode", variantValue.c_str());
+    }
+    if (ReadFileToString(VARIANT_FILE, &variantValue)) {
+        property_override("ro.vendor.config.versatility", variantValue.c_str());
+    }
+}
+
+static void set_fingerprint()
+{
+    std::string build_asus;
+    std::string build_id;
+    std::string build_number;
+    std::ostringstream fp;
+    std::string fingerprint;
+    std::string name;
+    std::string variant;
+    std::ostringstream desc;
+    std::string description;
+    std::ostringstream disp;
+    std::string display_id;
+
+    LOG(INFO) << "Starting custom init";
+
+    variant = GetProperty("ro.vendor.config.versatility", "");
+
+    // Set the default "name" string and below properties based on variant name
+    if (variant == "EU") {
+        property_override("ro.product.vendor.name", "EU_I002D");
+        property_override("ro.vendor.product.carrier", "EU-ASUS_I002D-WW");
+    } else if (variant == "RU") {
+        property_override("ro.product.vendor.model", "ZS670KS");
+        property_override("ro.product.vendor.name", "RU_I002D");
+        property_override("ro.vendor.product.carrier", "RU-ASUS_I002D-WW");
+    } else {
+        property_override("ro.product.vendor.name", "WW_I002D");
+        property_override("ro.vendor.product.carrier", "WW-ASUS_I002D-WW");
+    }
+
+    name = GetProperty("ro.product.vendor.name", "");
+
+    LOG(INFO) << name;
+
+    // These should be the only things to change for OTA updates
+    build_asus = "31.0210.0210.324";
+    build_id = "SKQ1.210821.001";
+    build_number = "31.0210.0210.324";
+
+    // Create the correct stock props based on the above values
+    desc << name << "-user 12 " << build_id << " " << build_number << " release-keys";
+    description = desc.str();
+
+    fp << "asus/" << name << "/ASUS_I002D:12/" << build_id << "/" << build_number << ":user/release-keys";
+    fingerprint = fp.str();
+
+    // These properties are the same for all variants
+    property_override("ro.vendor.build.asus.number", build_number);
+    property_override("ro.vendor.build.asus.sku", "WW");
+    property_override("ro.vendor.build.asus.version", build_asus);
+    property_override("ro.vendor.build.software.version", build_asus);
+    property_override("ro.build.description", description);
+
+    for (const auto& source : RO_PROP_SOURCES) {
+        ro_prop_override(source, "brand", "asus", true);
+        ro_prop_override(source, "device", "ASUS_I002D", true);
+        ro_prop_override(source, "manufacturer", "asus", true);
+        ro_prop_override(source, "model", "ASUS_I002D", true);
+        ro_prop_override(source, "name", name, true);
+
+        ro_prop_override(source, "fingerprint", fingerprint, false);
+    }
+}
+
+void vendor_load_properties()
+{
+    // SafetyNet workaround
+    property_override("ro.boot.verifiedbootstate", "green");
+    workaround_snet_properties();
+    set_configs();
+    set_fingerprint();
+}
+
+} //init
+} //android
diff --git a/interfaces/Android.bp b/interfaces/Android.bp
new file mode 100644
index 0000000..d68879b
--- /dev/null
+++ b/interfaces/Android.bp
@@ -0,0 +1,4 @@
+hidl_package_root {
+    name: "vendor.goodix",
+    path: "device/asus/zenfone7/interfaces",
+}
diff --git a/interfaces/hardware/biometrics/fingerprint/2.1/Android.bp b/interfaces/hardware/biometrics/fingerprint/2.1/Android.bp
new file mode 100644
index 0000000..0108d7b
--- /dev/null
+++ b/interfaces/hardware/biometrics/fingerprint/2.1/Android.bp
@@ -0,0 +1,13 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+    name: "vendor.goodix.hardware.biometrics.fingerprint@2.1",
+    root: "vendor.goodix",
+    srcs: [
+        "IGoodixFingerprintDaemon.hal",
+        "IGoodixFingerprintDaemonCallback.hal",
+    ],
+    interfaces: [
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/interfaces/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemon.hal b/interfaces/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemon.hal
new file mode 100644
index 0000000..e2ae437
--- /dev/null
+++ b/interfaces/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemon.hal
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2020 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.goodix.hardware.biometrics.fingerprint@2.1;
+
+import vendor.goodix.hardware.biometrics.fingerprint@2.1::IGoodixFingerprintDaemonCallback;
+
+interface IGoodixFingerprintDaemon {
+    setNotify(IGoodixFingerprintDaemonCallback Callback);
+    sendCommand(int32_t cmd, vec<int8_t> data) generates (int32_t resultCode, vec<int8_t> data);
+};
diff --git a/interfaces/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemonCallback.hal b/interfaces/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemonCallback.hal
new file mode 100644
index 0000000..cc11f44
--- /dev/null
+++ b/interfaces/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemonCallback.hal
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2020 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.goodix.hardware.biometrics.fingerprint@2.1;
+
+interface IGoodixFingerprintDaemonCallback {
+    oneway onDaemonMessage(int64_t devId, int32_t msgId, int32_t cmdId, vec<int8_t> msgData);
+};
diff --git a/manifest/framework_manifest.xml b/manifest/framework_manifest.xml
new file mode 100644
index 0000000..e468e10
--- /dev/null
+++ b/manifest/framework_manifest.xml
@@ -0,0 +1,27 @@
+<manifest version="1.0" type="framework">
+    <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>
+</manifest>
\ No newline at end of file
diff --git a/omni.dependencies b/omni.dependencies
index 05cb35b..6acc674 100644
--- a/omni.dependencies
+++ b/omni.dependencies
@@ -1,28 +1,113 @@
 [
-  {
+   {
     "remote": "omnirom",
-    "repository": "android_device_asus_sm8250-common",
-    "target_path": "device/asus/sm8250-common",
+    "repository": "android_device_qcom_caf-sepolicy",
+    "target_path": "device/qcom/sepolicy",
     "revision": "android-15"
-  },
-  {
+   },
+   {
+    "remote": "omnirom",
+    "repository": "android_device_qcom_sepolicy_vndr",
+    "target_path": "device/qcom/sepolicy_vndr",
+    "revision": "android-15"
+   },
+   {
+    "remote": "omnirom",
+    "repository": "android_external_tinycompress",
+    "target_path": "external/tinycompress",
+    "override": "platform/external/tinycompress",
+    "revision": "android-15"
+   },
+   {
+    "remote": "omnirom",
+    "repository": "android_hardware_qcom_bootctrl",
+    "target_path": "hardware/qcom/bootctrl",
+    "revision": "android-15"
+    },
+   {
     "remote": "omnirom",
     "repository": "android_hardware_qcom_thermal",
     "target_path": "hardware/qcom-caf/thermal",
     "revision": "android-15"
    },
-  {
+   {
+    "remote": "omnirom",
+    "repository": "android_hardware_qcom_wlan",
+    "target_path": "hardware/qcom-caf/wlan",
+    "revision": "android-15-caf"
+   },
+   {
     "remote": "omnirom",
     "repository": "android_kernel_asus_sm8250",
     "target_path": "kernel/asus/sm8250",
     "revision": "android-15"
-  },
+   },
+   {
+    "remote": "omnirom",
+    "repository": "android_vendor_codeaurora_telephony",
+    "target_path": "vendor/codeaurora/telephony",
+    "revision": "android-15"
+   },
+   {
+     "remote": "gitlab",
+     "repository": "android_hardware_omni_compat",
+     "target_path": "hardware/omni/compat",
+     "revision": "android-15"
+   },
+   {
+    "remote": "omnirom",
+    "repository": "android_hardware_qcom_display",
+    "target_path": "hardware/qcom-caf/sm8250/display",
+    "revision": "android-15-sm8250"
+   },
+   {
+    "remote": "github",
+    "repository": "LineageOS/android_vendor_qcom_opensource_core-utils-vendor",
+    "target_path": "vendor/qcom/opensource/core-utils-vendor",
+    "revision": "lineage-22.1"
+   },
+   {
+     "remote": "gitlab",
+     "repository": "android_vendor_qcom_opensource_display",
+     "target_path": "vendor/qcom/opensource/display",
+     "revision": "android-15"
+   },
+   {
+     "remote": "gitlab",
+     "repository": "android_vendor_qcom_opensource_display-commonsys",
+     "target_path": "vendor/qcom/opensource/commonsys/display",
+     "revision": "android-15"
+   },
+   {
+     "remote": "gitlab",
+     "repository": "android_vendor_qcom_opensource_display-commonsys-intf",
+     "target_path": "vendor/qcom/opensource/commonsys-intf/display",
+     "revision": "android-15"
+   },
+   {
+     "remote": "omnirom",
+     "repository": "android_vendor_qcom_opensource_fm-commonsys",
+     "target_path": "vendor/qcom/opensource/commonsys/fm",
+     "revision": "android-14.0"
+   },
+   {
+     "remote": "omnirom",
+     "repository": "android_vendor_qcom_opensource_interfaces",
+     "target_path": "vendor/qcom/opensource/interfaces",
+     "revision": "android-15"
+   },
    {
     "remote": "gitlab",
     "repository": "android_vendor_qcom_opensource_power",
     "target_path": "vendor/qcom/opensource/power",
     "revision": "android-15"
    },
+   {
+    "remote": "github",
+    "repository": "LineageOS/android_vendor_qcom_opensource_thermal-engine",
+    "target_path": "vendor/qcom/opensource/thermal-engine",
+    "revision": "lineage-20.0"
+   },
   {
     "remote": "gitlab",
     "repository": "android_vendor_qcom_opensource_vibrator",
diff --git a/omni_common.mk b/omni_common.mk
new file mode 100644
index 0000000..7f46f73
--- /dev/null
+++ b/omni_common.mk
@@ -0,0 +1,6 @@
+# Add common definitions for Qualcomm
+$(call inherit-product, hardware/qcom-caf/common/common.mk)
+
+# Platform
+TARGET_BOARD_PLATFORM := kona
+TARGET_BOOTLOADER_BOARD_NAME := kona
diff --git a/omni_zenfone7.mk b/omni_zenfone7.mk
index 7154132..4299b6e 100644
--- a/omni_zenfone7.mk
+++ b/omni_zenfone7.mk
@@ -37,7 +37,7 @@
 
 # Inherit from hardware-specific part of the product configuration
 $(call inherit-product, device/asus/zenfone7/device.mk)
-$(call inherit-product, device/asus/sm8250-common/omni_common.mk)
+$(call inherit-product, device/asus/zenfone7/omni_common.mk)
 
 # Discard inherited values and use our own instead.
 PRODUCT_DEVICE := zenfone7
diff --git a/overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml b/overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml
new file mode 100755
index 0000000..74a7c9d
--- /dev/null
+++ b/overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Copyright (c) 2012, The Linux Foundation. All rights reserved.
+
+    Not a Contribution, Apache license notifications and license are retained
+    for attribution purposes only.
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <!-- Whether to enable ETWS settings (Japan) -->
+    <bool name="show_etws_settings">true</bool>
+    <!-- Whether to enable CMAS settings (United States) -->
+    <bool name="show_cmas_settings">true</bool>
+    <!-- Whether to enable channel 50 settings (Brazil) -->
+    <bool name="show_brazil_settings">true</bool>
+</resources>
diff --git a/overlay/packages/apps/OmniControl/app/src/main/res/values/config.xml b/overlay/packages/apps/OmniControl/app/src/main/res/values/config.xml
new file mode 100644
index 0000000..88b7227
--- /dev/null
+++ b/overlay/packages/apps/OmniControl/app/src/main/res/values/config.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+
+    <!-- Does devices support battery led -->
+    <bool name="config_multiColorBatteryLed">true</bool>
+
+    <!-- Does devices support fast charging battery led -->
+    <bool name="config_FastChargingLedSupported">true</bool>
+
+</resources>
\ No newline at end of file
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
new file mode 100644
index 0000000..174cca7
--- /dev/null
+++ b/overlay/packages/services/Telephony/res/values/config.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Copyright (c) 2013, The Linux Foundation. All rights reserved.
+
+    Not a Contribution, Apache license notifications and license are retained
+    for attribution purposes only.
+
+    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. -->
+
+<!-- Phone app resources that may need to be customized
+     for different hardware or product builds. -->
+<resources>
+
+    <!-- Determine whether calls to mute the microphone in PhoneUtils
+         are routed through the android.media.AudioManager class (true) or through
+         the com.android.internal.telephony.Phone interface (false). -->
+    <bool name="send_mic_mute_to_AudioManager">true</bool>
+
+    <!-- Flag indicating if hac is enabled -->
+    <bool name="hac_enabled">true</bool>
+
+    <!-- Show enabled lte option for lte device -->
+    <bool name="config_enabled_lte" translatable="false">true</bool>
+
+    <!-- String indicating the package name of the device ImsService implementation for MMTEL. -->
+    <string name="config_ims_mmtel_package" translatable="false">org.codeaurora.ims</string>
+
+    <!-- String indicating the package name of the device ImsService implementation for RCS. -->
+    <string name="config_ims_rcs_package" translatable="false">org.codeaurora.ims</string>
+
+</resources>
diff --git a/prebuilt/product/etc/permissions/privapp-permissions-google_edited.xml b/prebuilt/product/etc/permissions/privapp-permissions-google_edited.xml
new file mode 100644
index 0000000..ad9bc68
--- /dev/null
+++ b/prebuilt/product/etc/permissions/privapp-permissions-google_edited.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
+    <privapp-permissions package="com.android.hotwordenrollment.okgoogle">
+        <permission name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"/>
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.android.hotwordenrollment.xgoogle">
+        <permission name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"/>
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.android.hotwordenrollment.tgoogle">
+        <permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.google.android.projection.gearhead">
+        <permission name="android.permission.ACCESS_NETWORK_CONDITIONS"/>
+        <permission name="android.permission.ACTIVITY_EMBEDDING"/>
+        <permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
+        <permission name="android.permission.CALL_PRIVILEGED"/>
+        <permission name="android.permission.CAPTURE_AUDIO_HOTWORD"/>
+        <permission name="android.permission.CAPTURE_AUDIO_OUTPUT"/>
+        <permission name="android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST"/>
+        <permission name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/>
+        <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
+        <permission name="android.permission.DUMP"/>
+        <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
+        <permission name="android.permission.LOCATION_HARDWARE"/>
+        <permission name="android.permission.MANAGE_USB"/>
+        <permission name="android.permission.MODIFY_AUDIO_ROUTING"/>
+        <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
+        <permission name="android.permission.MODIFY_PHONE_STATE"/>
+        <permission name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"/>
+        <permission name="android.permission.OVERRIDE_WIFI_CONFIG"/>
+        <permission name="android.permission.READ_LOGS"/>
+        <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
+        <permission name="android.permission.READ_WIFI_CREDENTIAL"/>
+        <permission name="android.permission.REAL_GET_TASKS"/>
+        <permission name="android.permission.REGISTER_CALL_PROVIDER"/>
+        <permission name="android.permission.REMOTE_DISPLAY_PROVIDER"/>
+        <permission name="android.permission.START_ACTIVITIES_FROM_BACKGROUND"/>
+        <permission name="android.permission.START_TASKS_FROM_RECENTS"/>
+        <permission name="android.permission.UPDATE_DEVICE_STATS"/>
+        <permission name="android.permission.USER_ACTIVITY"/>
+        <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
+    </privapp-permissions>
+
+</permissions>
diff --git a/prebuilt/product/etc/sysconfig/qti-hotword-whitelist.xml b/prebuilt/product/etc/sysconfig/qti-hotword-whitelist.xml
new file mode 100644
index 0000000..c470f2c
--- /dev/null
+++ b/prebuilt/product/etc/sysconfig/qti-hotword-whitelist.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This XML file declares which platform apps that need to access internal APIs.
+-->
+<config>
+  <hidden-api-whitelisted-app package="com.android.hotwordenrollment.okgoogle" />
+  <hidden-api-whitelisted-app package="com.android.hotwordenrollment.tgoogle" />
+  <hidden-api-whitelisted-app package="com.android.hotwordenrollment.xgoogle" />
+</config>
diff --git a/prebuilt/system/etc/init/init.qcom.rc b/prebuilt/system/etc/init/init.qcom.rc
new file mode 100644
index 0000000..30e3482
--- /dev/null
+++ b/prebuilt/system/etc/init/init.qcom.rc
@@ -0,0 +1,5 @@
+on boot
+    mkdir /data/misc/omni 0770 cameraserver audio
+    write /data/misc/omni/client_package_name 0
+    chown cameraserver audio /data/misc/omni/client_package_name
+    chmod 0644 /data/misc/omni/client_package_name
diff --git a/prebuilt/system/etc/permissions/privapp-permissions-SM8250.xml b/prebuilt/system/etc/permissions/privapp-permissions-SM8250.xml
new file mode 100644
index 0000000..3ca8b4e
--- /dev/null
+++ b/prebuilt/system/etc/permissions/privapp-permissions-SM8250.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
+    <privapp-permissions package="com.asus.camera">
+        <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+        <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
+        <permission name="com.asus.permission.HARDWARE_PROPERTIES"/>
+    </privapp-permissions>
+    <privapp-permissions package="com.asus.ephotoburst">
+        <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
+        <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+    </privapp-permissions>
+    <privapp-permissions package="com.asus.gallery">
+        <permission name="android.permission.DELETE_PACKAGES"/>
+        <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
+        <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
+        <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+    </privapp-permissions>
+</permissions>
diff --git a/prebuilt/system/etc/permissions/privapp-permissions-qti.xml b/prebuilt/system/etc/permissions/privapp-permissions-qti.xml
new file mode 100644
index 0000000..75f7f1b
--- /dev/null
+++ b/prebuilt/system/etc/permissions/privapp-permissions-qti.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (c) 2017, The Linux Foundation. All rights reserved.
+
+  ~ Not a Contribution.
+-->
+
+<!--
+  ~ Copyright (C) 2016 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
+  -->
+
+<!--
+This XML file declares which signature|privileged permissions should be
+granted to privileged applications on QTI devices.
+It allows additional grants on top of privapp-permissions-platform.xml
+-->
+
+<permissions>
+    <privapp-permissions package="com.quicinc.cne.CNEService">
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+        <permission name="android.permission.PACKET_KEEPALIVE_OFFLOAD"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.qti.dpmserviceapp">
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.qualcomm.qcrilmsgtunnel">
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="org.codeaurora.dialer">
+        <permission name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"/>
+        <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
+        <permission name="android.permission.GET_ACCOUNTS_PRIVILEGED"/>
+        <permission name="android.permission.MODIFY_PHONE_STATE"/>
+        <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
+        <permission name="android.permission.STATUS_BAR"/>
+        <permission name="android.permission.STOP_APP_SWITCHES"/>
+        <permission name="com.android.voicemail.permission.READ_VOICEMAIL"/>
+        <permission name="com.android.voicemail.permission.WRITE_VOICEMAIL"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="org.codeaurora.qti.qtiNetworkApp">
+        <permission name="android.permission.MODIFY_PHONE_STATE"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="org.codeaurora.ims">
+        <permission name="android.permission.READ_PRECISE_PHONE_STATE"/>
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+        <permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.android.soundrecorder">
+        <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+        <permission name="android.permission.CAPTURE_AUDIO_OUTPUT"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.quicinc.voice.activation">
+        <permission name="android.permission.CAPTURE_AUDIO_HOTWORD"/>
+        <permission name="android.permission.MANAGE_SOUND_TRIGGER"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.qualcomm.qti.carrierswitch">
+        <permission name="android.permission.REBOOT"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.qualcomm.wfd.service">
+        <permission name="android.permission.READ_FRAME_BUFFER"/>
+        <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.android.mms">
+        <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
+        <permission name="android.permission.WRITE_APN_SETTINGS"/>
+        <permission name="android.permission.CALL_PRIVILEGED"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="org.codeaurora.bluetooth.batestapp">
+        <permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
+        <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="org.codeaurora.snapcam">
+        <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
+        <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="org.codeaurora.gallery">
+        <permission name="android.permission.MODIFY_AUDIO_ROUTING"/>
+    </privapp-permissions>
+
+    <privapp-permissions package="com.qualcomm.qti.callenhancement">
+        <permission name="android.permission.RECORD_AUDIO" />
+        <permission name="android.permission.CAPTURE_AUDIO_OUTPUT" />
+        <permission name="android.permission.READ_EXTERNAL_STORAGE" />
+        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
+        <permission name="android.permission.READ_BLOCKED_NUMBERS" />
+        <permission name="android.permission.VIBRATE" />
+    </privapp-permissions>
+</permissions>
diff --git a/prebuilt/system/etc/permissions/qti_libpermissions.xml b/prebuilt/system/etc/permissions/qti_libpermissions.xml
new file mode 100644
index 0000000..4756f67
--- /dev/null
+++ b/prebuilt/system/etc/permissions/qti_libpermissions.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!---
+    Copyright (c) 2017 Qualcomm Technologies, Inc.
+    All Rights Reserved.
+    Confidential and Proprietary - Qualcomm Technologies, Inc.
+ -->
+<permissions>
+    <library name="android.hidl.manager@1.0-java"
+          file="/system/framework/android.hidl.manager-V1.0-java.jar"/>
+</permissions>
diff --git a/prebuilt/system/etc/public.libraries-qti.txt b/prebuilt/system/etc/public.libraries-qti.txt
new file mode 100644
index 0000000..2bfed26
--- /dev/null
+++ b/prebuilt/system/etc/public.libraries-qti.txt
@@ -0,0 +1,4 @@
+libvraudio_client.qti.so
+libbinauralrenderer_wrapper.qti.so
+libhoaeffects.qti.so
+libQOC.qti.so
diff --git a/prebuilt/system/etc/sysconfig/com.asus.camera.xml b/prebuilt/system/etc/sysconfig/com.asus.camera.xml
new file mode 100644
index 0000000..c30aec0
--- /dev/null
+++ b/prebuilt/system/etc/sysconfig/com.asus.camera.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+
+<!--
+/* Copyright (c) 2017-2018, 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.
+ */
+-->
+
+<config>
+    <hidden-api-whitelisted-app package="com.asus.camera" />
+</config>
diff --git a/prebuilt/system/etc/sysconfig/qti_whitelist.xml b/prebuilt/system/etc/sysconfig/qti_whitelist.xml
new file mode 100644
index 0000000..0d0d83d
--- /dev/null
+++ b/prebuilt/system/etc/sysconfig/qti_whitelist.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+
+<!--
+/* Copyright (c) 2017-2018, 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.
+ */
+-->
+
+<config>
+    <!-- These are telephony components that need to freely run in the background -->
+    <allow-in-power-save package="com.qualcomm.atfwd" />
+    <allow-in-power-save package="com.qualcomm.qti.telephonyservice" />
+    <allow-in-power-save package="com.qualcomm.qcrilmsgtunnel" />
+    <allow-in-power-save package="com.qualcomm.qti.ims" />
+    <allow-in-power-save package="com.qualcomm.qti.radioconfiginterface" />
+    <allow-in-power-save package="com.qualcomm.simcontacts" />
+    <allow-in-power-save package="com.qualcomm.qti.autoregistration" />
+    <allow-in-power-save package="com.qualcomm.qti.server.wigigapp" />
+    <allow-in-power-save package="com.qualcomm.qti.gsma.services.nfc" />
+    <allow-in-power-save package="com.quicinc.voice.activation" />
+    <allow-in-power-save package="com.android.mms" />
+    <allow-in-power-save package="com.android.exchange" />
+    <allow-in-power-save package="com.android.email" />
+    <allow-in-power-save package="com.qualcomm.qti.callenhancement" />
+    <allow-in-power-save package="com.qualcomm.qti.smartassistant" />
+    <allow-in-power-save package="com.qti.xdivert" />
+    <!-- These telephony applications need access to non-[System]SDK APIs -->
+    <hidden-api-whitelisted-app package="com.qualcomm.uimremoteserver" />
+    <hidden-api-whitelisted-app package="com.qualcomm.uimremoteclient" />
+    <hidden-api-whitelisted-app package="com.qualcomm.atfwd" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.autoregistration" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.callenhancement" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.callfeaturessetting" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.confdialer" />
+    <hidden-api-whitelisted-app package="org.codeaurora.dialer" />
+    <hidden-api-whitelisted-app package="com.qti.qualcomm.datastatusnotification" />
+    <hidden-api-whitelisted-app package="com.qti.qualcomm.deviceinfo" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.modemtestmode" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.networksetting" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.qtisystemservice" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.telephonyservice" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.radioconfiginterface" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.radioconfigtest" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.roamingsettings" />
+    <hidden-api-whitelisted-app package="com.qualcomm.simcontacts" />
+    <hidden-api-whitelisted-app package="org.codeaurora.ims" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.ims" />
+    <hidden-api-whitelisted-app package="com.qti.xdivert" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qcrilmsgtunnel" />
+    <hidden-api-whitelisted-app package="com.qti.confuridialer" />
+    <hidden-api-whitelisted-app package="com.qti.editnumber" />
+    <hidden-api-whitelisted-app package="com.qualcomm.embmstest" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.ltedirect" />
+    <hidden-api-whitelisted-app package="com.android.MultiplePdpTest" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.app" />
+    <hidden-api-whitelisted-app package="com.qualcomm.embms" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.embmstuneaway" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.uimlpatest" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.lpa" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.uim" />
+
+    <hidden-api-whitelisted-app package="org.codeaurora.snapcam" />
+    <hidden-api-whitelisted-app package="com.android.mms" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.carrierswitch" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.carrierconfigure" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.sva" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.smartassistant" />
+    <hidden-api-whitelisted-app package="com.quicinc.voice.activation" />
+    <hidden-api-whitelisted-app package="com.android.backup" />
+    <hidden-api-whitelisted-app package="com.android.contacts" />
+    <hidden-api-whitelisted-app package="com.android.exchange" />
+    <hidden-api-whitelisted-app package="com.android.soundrecorder" />
+    <hidden-api-whitelisted-app package="com.android.camera2" />
+    <hidden-api-whitelisted-app package="org.codeaurora.gallery" />
+    <hidden-api-whitelisted-app package="com.example.connmgr" />
+    <hidden-api-whitelisted-app package="com.android.email" />
+    <hidden-api-whitelisted-app package="com.cyanogenmod.filemanager" />
+    <hidden-api-whitelisted-app package="com.qualcomm.secureindicator" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.sysmonappExternal" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.biometrics.voiceprint.voiceprintdemo" />
+    <hidden-api-whitelisted-app package="com.qti.vtloopback " />
+    <hidden-api-whitelisted-app package="com.android.bluetooth" />
+    <hidden-api-whitelisted-app package="org.codeaurora.bluetooth" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.qmmi" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.perfdump" />
+    <hidden-api-whitelisted-app package="com.qualcomm.wfd.client" />
+    <hidden-api-whitelisted-app package="com.qualcomm.wfd.service" />
+    <hidden-api-whitelisted-app package="com.qualcomm.qti.server.wigigapp" />
+    <!-- These are location components that need to freely run in the background -->
+    <allow-in-power-save package="com.qualcomm.location" />
+    <allow-in-power-save package="com.qualcomm.location.XT" />
+    <allow-in-power-save package="com.qualcomm.location.XT.setup" />
+    <hidden-api-whitelisted-app package="com.qti.service.colorservice" />
+</config>
diff --git a/prebuilt/system_ext/etc/public.libraries-qti.txt b/prebuilt/system_ext/etc/public.libraries-qti.txt
new file mode 100644
index 0000000..1a0b44d
--- /dev/null
+++ b/prebuilt/system_ext/etc/public.libraries-qti.txt
@@ -0,0 +1,7 @@
+libupdateprof.qti.so
+libthermalclient.qti.so
+libQOC.qti.so
+libdiag_system.qti.so
+libqape.qti.so
+libqesdk_ndk_platform.qti.so
+liblistenjni.qti.so
\ No newline at end of file
diff --git a/product.prop b/product.prop
index 8599610..faa04c7 100644
--- a/product.prop
+++ b/product.prop
@@ -1,3 +1,29 @@
-# Device props
+# Audio
+audio.sys.noisy.broadcast.delay=500
+audio.sys.mute.latency.factor=2
+audio.sys.routing.latency=0
+audio.offload.min.duration.secs=30
+audio.sys.offload.pstimeout.secs=3
+
 # Bluetooth
 bluetooth.device.default_name=Zenfone 7
+bluetooth.device.class_of_device=90,2,12
+bluetooth.hardware.power.operating_voltage_mv=3300
+bluetooth.profile.asha.central.enabled?=true
+bluetooth.profile.a2dp.source.enabled?=true
+bluetooth.profile.avrcp.target.enabled?=true
+bluetooth.profile.bas.client.enabled?=true
+bluetooth.profile.gatt.enabled?=true
+bluetooth.profile.hfp.ag.enabled?=true
+bluetooth.profile.hid.device.enabled?=true
+bluetooth.profile.hid.host.enabled?=true
+bluetooth.profile.map.server.enabled?=true
+bluetooth.profile.opp.enabled?=true
+bluetooth.profile.pan.nap.enabled?=true
+bluetooth.profile.pan.panu.enabled?=true
+bluetooth.profile.pbap.server.enabled?=true
+bluetooth.profile.sap.server.enabled?=true# Device props
+
+# Device props
+ro.com.google.clientidbase.ms=android-asus
+ro.com.google.lens.oem_camera_package=com.asus.camera
diff --git a/recovery.fstab b/recovery.fstab
new file mode 100755
index 0000000..8a79abc
--- /dev/null
+++ b/recovery.fstab
@@ -0,0 +1,38 @@
+# Copyright (c) 2017, 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.
+
+#device         mount point      fstype        [device2] [length=]
+system                                                  /system                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/bootdevice/by-name/metadata                  /metadata              ext4    noatime,nosuid,nodev,discard                         wait,formattable,wrappedkey,first_stage_mount
+/dev/block/bootdevice/by-name/userdata                  /data                  f2fs    noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier    latemount,wait,check,formattable,fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
+/dev/block/mmcblk0p1                       /sdcard         vfat    nosuid,nodev                                               wait
+/dev/block/bootdevice/by-name/boot         /boot           emmc    defaults                                                   defaults
+/dev/block/bootdevice/by-name/misc         /misc           emmc    defaults                                                   defaults
+/dev/block/bootdevice/by-name/logcat       /logcat           ext4    defaults                                                        wait,check
diff --git a/rro_overlays/FrameworksCommonResOverlay/Android.bp b/rro_overlays/FrameworksCommonResOverlay/Android.bp
new file mode 100644
index 0000000..de4706c
--- /dev/null
+++ b/rro_overlays/FrameworksCommonResOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "FrameworksResOverlay",
+    theme: "FrameworksResOverlay",
+    product_specific: true,
+}
diff --git a/rro_overlays/FrameworksCommonResOverlay/AndroidManifest.xml b/rro_overlays/FrameworksCommonResOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..fbdbd31
--- /dev/null
+++ b/rro_overlays/FrameworksCommonResOverlay/AndroidManifest.xml
@@ -0,0 +1,6 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="android.frameworks.overlay"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:isStatic="true" android:priority="140" android:targetPackage="android"/>
+</manifest>
\ No newline at end of file
diff --git a/rro_overlays/FrameworksCommonResOverlay/res/values-mcc310-mnc590/config.xml b/rro_overlays/FrameworksCommonResOverlay/res/values-mcc310-mnc590/config.xml
new file mode 100644
index 0000000..88ff4b8
--- /dev/null
+++ b/rro_overlays/FrameworksCommonResOverlay/res/values-mcc310-mnc590/config.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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.
+*/
+-->
+
+<resources>
+    <string-array translatable="false" name="config_gpsParameters">
+        <item>SUPL_HOST=supl.google.com</item>
+        <item>SUPL_PORT=7275</item>
+        <item>SUPL_VER=0x20000</item>
+        <item>SUPL_MODE=3</item>
+        <item>SUPL_ES=0</item>
+        <item>LPP_PROFILE=3</item>
+        <item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
+        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
+        <item>GPS_LOCK=0</item>
+    </string-array>
+</resources>
diff --git a/rro_overlays/FrameworksCommonResOverlay/res/values-mcc311-mnc480/config.xml b/rro_overlays/FrameworksCommonResOverlay/res/values-mcc311-mnc480/config.xml
new file mode 100644
index 0000000..88ff4b8
--- /dev/null
+++ b/rro_overlays/FrameworksCommonResOverlay/res/values-mcc311-mnc480/config.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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.
+*/
+-->
+
+<resources>
+    <string-array translatable="false" name="config_gpsParameters">
+        <item>SUPL_HOST=supl.google.com</item>
+        <item>SUPL_PORT=7275</item>
+        <item>SUPL_VER=0x20000</item>
+        <item>SUPL_MODE=3</item>
+        <item>SUPL_ES=0</item>
+        <item>LPP_PROFILE=3</item>
+        <item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
+        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
+        <item>GPS_LOCK=0</item>
+    </string-array>
+</resources>
diff --git a/rro_overlays/FrameworksCommonResOverlay/res/values/config.xml b/rro_overlays/FrameworksCommonResOverlay/res/values/config.xml
new file mode 100644
index 0000000..db29db9
--- /dev/null
+++ b/rro_overlays/FrameworksCommonResOverlay/res/values/config.xml
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
+         Software implementation will be used if config_hardware_auto_brightness_available is not set -->
+    <bool name="config_automatic_brightness_available">true</bool>
+
+    <!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
+    <bool name="config_unplugTurnsOnScreen">true</bool>
+
+    <!-- This string array should be overridden by the device to present a list of network
+         attributes.  This is used by the connectivity manager to decide which networks can coexist
+         based on the hardware -->
+    <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
+         [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet]  -->
+    <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+         before automatically restore the default connection.  Set -1 if the connection
+         does not require auto-restore. -->
+    <!-- the 6th element indicates boot-time dependency-met value. -->
+    <string-array translatable="false" name="networkAttributes">
+        <item>wifi,1,1,1,-1,true</item>
+        <item>mobile,0,0,0,-1,true</item>
+        <item>mobile_mms,2,0,4,60000,true</item>
+        <item>mobile_supl,3,0,2,60000,true</item>
+        <item>mobile_dun,4,0,2,60000,true</item>
+        <item>mobile_hipri,5,0,3,60000,true</item>
+        <item>mobile_fota,10,0,2,60000,true</item>
+        <item>mobile_ims,11,0,2,60000,true</item>
+        <item>mobile_cbs,12,0,2,60000,true</item>
+        <item>bluetooth,7,7,2,-1,true</item>
+        <item>mobile_emergency,15,0,5,-1,true</item>
+        <item>ethernet,9,9,9,-1,true</item>
+    </string-array>
+
+    <!-- Whether to enable network location overlay which allows network
+         location provider to be replaced by an app at run-time. When disabled,
+         only the config_networkLocationProviderPackageName package will be
+         searched for network location provider, otherwise packages whose
+         signature matches the signatures of config_locationProviderPackageNames
+         will be searched, and the service with the highest version number will
+         be picked. Anyone who wants to disable the overlay mechanism can set it
+         to false.
+         -->
+    <bool name="config_enableNetworkLocationOverlay" translatable="false">true</bool>
+
+    <!-- This string array should be overridden by the device to present a list of radio
+         attributes.  This is used by the connectivity manager to decide which networks can coexist
+         based on the hardware -->
+    <!-- An Array of "[ConnectivityManager connectionType],
+                      [# simultaneous connection types]"  -->
+    <string-array translatable="false" name="radioAttributes">
+        <item>1,1</item>
+        <item>0,1</item>
+        <item>7,1</item>
+    </string-array>
+
+    <!-- Enables or disables fading edges when marquee is enabled in TextView.
+         Off by default, since the framebuffer readback used to implement the
+         fading edges is prohibitively expensive on most GPUs. -->
+    <bool name="config_ui_enableFadingMarquee">false</bool>
+
+    <!-- Indicate whether to allow the device to suspend when the screen is off
+         due to the proximity sensor.  This resource should only be set to true
+         if the sensor HAL correctly handles the proximity sensor as a wake-up source.
+         Otherwise, the device may fail to wake out of suspend reliably.
+         The default is false. -->
+    <bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
+
+    <!-- Disable lockscreen translucent decor by default -->
+    <bool name="config_enableLockScreenTranslucentDecor">true</bool>
+
+    <!--  Maximum number of supported users -->
+    <integer name="config_multiuserMaximumUsers">4</integer>
+
+    <!--  Whether Multiuser UI should be shown -->
+    <bool name="config_enableMultiUserUI">true</bool>
+
+    <!-- Screen brightness when dozing -->
+    <integer name="config_screenBrightnessDoze">10</integer>
+
+    <!-- Dream of notifications -->
+    <string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
+
+     <!-- If true, the doze component is not started until after the screen has been
+         turned off and the screen off animation has been performed. -->
+    <bool name="config_dozeAfterScreenOffByDefault">true</bool>
+
+    <!-- Power Management: Specifies whether to decouple the auto-suspend state of the
+         device from the display on/off state.
+
+         When false, autosuspend_disable() will be called before the display is turned on
+         and autosuspend_enable() will be called after the display is turned off.
+         This mode provides best compatibility for devices using legacy power management
+         features such as early suspend / late resume.
+
+         When true, autosuspend_display() and autosuspend_enable() will be called
+         independently of whether the display is being turned on or off.  This mode
+         enables the power manager to suspend the application processor while the
+         display is on.
+
+         This resource should be set to "true" when a doze component has been specified
+         to maximize power savings but not all devices support it.
+
+         Refer to autosuspend.h for details.
+    -->
+    <bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool>
+
+    <!-- Power Management: Specifies whether to decouple the interactive state of the
+         device from the display on/off state.
+
+         When false, setInteractive(..., true) will be called before the display is turned on
+         and setInteractive(..., false) will be called after the display is turned off.
+         This mode provides best compatibility for devices that expect the interactive
+         state to be tied to the display state.
+
+         When true, setInteractive(...) will be called independently of whether the display
+         is being turned on or off.  This mode enables the power manager to reduce
+         clocks and disable the touch controller while the display is on.
+
+         This resource should be set to "true" when a doze component has been specified
+         to maximize power savings but not all devices support it.
+
+         Refer to power.h for details.
+    -->
+    <bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool>
+
+    <!-- Control the behavior when the user long presses the home button.
+        0 - Nothing
+        1 - Recent apps view in SystemUI
+        2 - Launch assist intent
+        This needs to match the constants in
+        policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+    -->
+    <integer name="config_longPressOnHomeBehavior">2</integer>
+
+    <!-- Flag indicating if device supports EAP SIM, AKA, AKA' -->
+    <bool name="config_eap_sim_based_auth_supported">true</bool>
+
+    <!-- Whether device supports double tap to wake -->
+    <bool name="config_supportDoubleTapWake">true</bool>
+
+    <!-- Values for GPS configuration -->
+    <string-array translatable="false" name="config_gpsParameters">
+        <item>SUPL_HOST=supl.google.com</item>
+        <item>SUPL_PORT=7275</item>
+        <item>SUPL_VER=0x20000</item>
+        <item>SUPL_MODE=1</item>
+        <item>SUPL_ES=1</item>
+        <item>LPP_PROFILE=0</item>
+        <item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
+        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
+        <item>GPS_LOCK=0</item>
+    </string-array>
+
+    <!-- Flag specifying whether VoLTE TTY is supported -->
+    <bool name="config_carrier_volte_tty_supported">true</bool>
+
+    <!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. -->
+    <integer name="config_shutdownBatteryTemperature">650</integer>
+
+    <!-- Screen brightness used to dim the screen when the user activity
+         timeout expires.  May be less than the minimum allowed brightness setting
+         that can be set by the user. -->
+    <integer name="config_screenBrightnessDim">10</integer>
+
+    <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
+         autodetected from the Configuration. -->
+    <bool name="config_showNavigationBar">true</bool>
+
+    <!-- Default color for notification LED is blue. -->
+    <color name="config_defaultNotificationColor">#ff00ff00</color>
+
+    <!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
+    <bool name="config_intrusiveNotificationLed">true</bool>
+
+    <bool name="config_multiColorNotificationLed">true</bool>
+
+    <!-- enable support for configure max aspect ratio per app -->
+    <bool name="config_haveHigherAspectRatioScreen">true</bool>
+
+    <!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
+         in hardware. -->
+    <bool name="config_setColorTransformAccelerated">true</bool>
+
+    <!-- Whether WiFi display is supported by this device.
+         There are many prerequisites for this feature to work correctly.
+         Here are a few of them:
+         * The WiFi radio must support WiFi P2P.
+         * The WiFi radio must support concurrent connections to the WiFi display and
+           to an access point.
+         * The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix"
+           remote submix module.  This module is used to record and stream system
+           audio output to the WiFi display encoder in the media server.
+         * The remote submix module "audio.r_submix.default" must be installed on the device.
+         * The device must be provisioned with HDCP keys (for protected content).
+    -->
+    <bool name="config_enableWifiDisplay">true</bool>
+
+    <!-- Indicate whether closing the lid causes the device to go to sleep and opening
+         it causes the device to wake up.
+         The default is false. -->
+    <bool name="config_lidControlsSleep">true</bool>
+
+    <!-- Boolean indicating if current platform supports BLE peripheral mode -->
+    <bool name="config_bluetooth_le_peripheral_mode_supported">true</bool>
+
+    <!-- Boolean indicating if current platform supports HFP inband ringing -->
+    <bool name="config_bluetooth_hfp_inband_ringing_support">true</bool>
+
+     <!-- Flag indicating if the speed up audio on mt call code should be executed -->
+    <bool name="config_speed_up_audio_on_mt_calls">true</bool>
+
+    <!-- True if Unprocessed audio source supports the required frequency range and level -->
+    <bool name="config_supportAudioSourceUnprocessed">true</bool>
+
+    <!-- Hardware 'face' keys present on the device, stored as a bit field.
+         This integer should equal the sum of the corresponding value for each
+         of the following keys present:
+             1 - Home
+             2 - Back
+             4 - Menu
+             8 - Assistant (search)
+            16 - App switch
+         For example, a device with Home, Back and Menu keys would set this
+         config to 7. -->
+    <integer name="config_deviceHardwareKeys">0</integer>
+
+    <!-- Array of hysteresis constraint values for brightening, represented as tenths of a
+         percent. The length of this array is assumed to be one greater than
+         config_ambientThresholdLevels. The brightening threshold is calculated as
+         lux * (1.0f + CONSTRAINT_VALUE). When the current lux is higher than this threshold,
+         the screen brightness is recalculated. See the config_ambientThresholdLevels
+         description for how the constraint value is chosen. -->
+    <integer-array name="config_ambientBrighteningThresholds">
+        <item>800</item>
+        <item>3000</item>
+        <item>2000</item>
+        <item>500</item>
+    </integer-array>
+
+    <!-- Array of hysteresis constraint values for darkening, represented as tenths of a
+         percent. The length of this array is assumed to be one greater than
+         config_ambientThresholdLevels. The darkening threshold is calculated as
+         lux * (1.0f - CONSTRAINT_VALUE). When the current lux is lower than this threshold,
+         the screen brightness is recalculated. See the config_ambientThresholdLevels
+         description for how the constraint value is chosen. -->
+    <integer-array name="config_ambientDarkeningThresholds">
+        <item>950</item>
+        <item>950</item>
+        <item>800</item>
+        <item>800</item>
+    </integer-array>
+
+    <!-- Array of ambient lux threshold values. This is used for determining hysteresis constraint
+         values by calculating the index to use for lookup and then setting the constraint value
+         to the corresponding value of the array. The new brightening hysteresis constraint value
+         is the n-th element of config_ambientBrighteningThresholds, and the new darkening
+         hysteresis constraint value is the n-th element of config_ambientDarkeningThresholds.
+
+         The (zero-based) index is calculated as follows: (MAX is the largest index of the array)
+         condition                       calculated index
+         value < level[0]                0
+         level[n] <= value < level[n+1]  n+1
+         level[MAX] <= value             MAX+1 -->
+    <integer-array name="config_ambientThresholdLevels">
+        <item>30</item>
+        <item>300</item>
+        <item>5000</item>
+    </integer-array>
+
+    <!-- The maximum range of gamma adjustment possible using the screen
+         auto-brightness adjustment setting. -->
+    <fraction name="config_autoBrightnessAdjustmentMaxGamma">300%</fraction>
+
+    <!-- Sets the minimum and maximum tilt tolerance for each possible rotation.
+         This array consists of 4 pairs of values which specify the minimum and maximum
+         tilt angle at which the device will transition into each rotation.
+
+         The tilt angle represents the direction in which the plane of the screen is facing;
+         it is also known as the angle of elevation.
+
+           -90 degree tilt means that the screen is facing straight down
+                           (the device is being held overhead upside-down)
+             0 degree tilt means that the screen is facing outwards
+                           (the device is being held vertically)
+            90 degree tilt means that the screen is facing straight up
+                           (the device is resting on a flat table)
+
+        The default tolerances are set conservatively such that the device is more
+        likely to remain in its natural orientation than rotate into a counterclockwise,
+        clockwise, or reversed posture (with an especially strong bias against the latter)
+        to prevent accidental rotation while carrying the device in hand.
+
+        These thresholds may need to be tuned when the device is intended to be
+        mounted into a dock with a particularly shallow profile wherein rotation
+        would ordinarily have been suppressed.
+
+        It is helpful to consider the desired behavior both when the device is being
+        held at a positive tilt (typical case) vs. a negative tilt (reading overhead in
+        bed) since they are quite different.  In the overhead case, we typically want
+        the device to more strongly prefer to retain its current configuration (in absence
+        of a clear indication that a rotation is desired) since the user's head and neck may
+        be held at an unusual angle.
+    -->
+    <integer-array name="config_autoRotationTiltTolerance">
+        <!-- rotation:   0 (natural)    --> <item>-45</item> <item>60</item>
+        <!-- rotation:  90 (rotate CCW) --> <item>-45</item> <item>66</item>
+        <!-- rotation: 180 (reverse)    --> <item>-45</item> <item>60</item>
+        <!-- rotation: 270 (rotate CW)  --> <item>-45</item> <item>66</item>
+    </integer-array>
+
+    <!-- Flag specifying whether VoLTE is available on device -->
+    <bool name="config_device_volte_available">true</bool>
+
+    <!-- Flag specifying whether VoLTE should be available for carrier: independent of
+         carrier provisioning. If false: hard disabled. If true: then depends on carrier
+         provisioning, availability etc -->
+    <bool name="config_carrier_volte_available">true</bool>
+
+    <!-- Flag specifying whether WFC over IMS is available on device -->
+    <bool name="config_device_wfc_ims_available">true</bool>
+
+    <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of
+         carrier provisioning. If false: hard disabled. If true: then depends on carrier
+         provisioning, availability etc -->
+    <bool name="config_carrier_wfc_ims_available">true</bool>
+
+    <!-- When true use the linux /dev/input/event subsystem to detect the switch changes
+         on the headphone/microphone jack. When false use the older uevent framework. -->
+    <bool name="config_useDevInputEventForAudioJack">true</bool>
+
+    <!-- Is the device capable of hot swapping an ICC Card -->
+    <bool name="config_hotswapCapable">true</bool>
+
+    <!-- The list of packages to automatically opt out of refresh rates higher than 60hz because
+         of known compatibility issues. -->
+    <string-array name="config_highRefreshRateBlacklist">
+        <item>com.asus.camera</item>
+    </string-array>
+
+    <!-- List of biometric sensors on the device, in decreasing strength. Consumed by AuthService
+         when registering authenticators with BiometricService. Format must be ID:Modality:Strength,
+         where: IDs are unique per device, Modality as defined in BiometricAuthenticator.java,
+         and Strength as defined in Authenticators.java -->
+    <string-array name="config_biometric_sensors" translatable="false" >
+        <item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
+    </string-array>
+
+    <!-- Configure mobile tcp buffer sizes in the form:
+         rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
+         If no value is found for the rat-name in use, the system default will be applied.
+    -->
+    <string-array translatable="false" name="config_mobile_tcp_buffers">
+        <item>5gnr:2097152,6291456,16777216,512000,2097152,8388608</item>
+        <item>lte:2097152,4194304,8388608,262144,524288,1048576</item>
+        <item>lte_ca:4096,6291456,12582912,4096,1048576,2097152</item>
+        <item>umts:4094,87380,1220608,4096,16384,1220608</item>
+        <item>hspa:4094,87380,1220608,4096,16384,1220608</item>
+        <item>hsupa:4094,87380,1220608,4096,16384,1220608</item>
+        <item>hsdpa:4094,87380,1220608,4096,16384,1220608</item>
+        <item>hspap:4094,87380,1220608,4096,16384,1220608</item>
+        <item>edge:4093,26280,35040,4096,16384,35040</item>
+        <item>gprs:4092,8760,11680,4096,8760,11680</item>
+        <item>evdo:4094,87380,524288,4096,16384,262144</item>
+    </string-array>
+
+    <!-- Telephony qualified networks service package name to bind to by default. -->
+    <string name="config_qualified_networks_service_package">vendor.qti.iwlan</string>
+
+    <!-- IWLAN data service package name to bind to by default. -->
+    <string name="config_wlan_data_service_package">vendor.qti.iwlan</string>
+
+    <!-- IWLAN network service package name to bind to by default. -->
+    <string name="config_wlan_network_service_package">vendor.qti.iwlan</string>
+
+    <!-- Enables or disables haptic effect when the text insertion/selection handle is moved
+         manually by the user. Off by default, since the expected haptic feedback may not be
+         available on some devices. -->
+    <bool name="config_enableHapticTextHandle">true</bool>
+
+    <!-- The default refresh rate for a given device. Change this value to set a higher default
+         refresh rate. If the hardware composer on the device supports display modes with a higher
+         refresh rate than the default value specified here, the framework may use those higher
+         refresh rate modes if an app chooses one by setting preferredDisplayModeId or calling
+         setFrameRate().
+         If a non-zero value is set for config_defaultPeakRefreshRate, then
+         config_defaultRefreshRate may be set to 0, in which case the value set for
+         config_defaultPeakRefreshRate will act as the default frame rate. -->
+    <integer name="config_defaultRefreshRate">0</integer>
+
+</resources>
diff --git a/rro_overlays/FrameworksCommonResOverlay/res/values/dimens.xml b/rro_overlays/FrameworksCommonResOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..66f8f09
--- /dev/null
+++ b/rro_overlays/FrameworksCommonResOverlay/res/values/dimens.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- Default radius of the software rounded corners. -->
+    <dimen name="rounded_corner_radius">1px</dimen>
+
+</resources>
diff --git a/rro_overlays/OmniRomResInternalOverlay/Android.bp b/rro_overlays/OmniRomResInternalOverlay/Android.bp
new file mode 100644
index 0000000..9161bf3
--- /dev/null
+++ b/rro_overlays/OmniRomResInternalOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "OmniRomResInternalOverlay",
+    theme: "OmniRomResInternalOverlay",
+    product_specific: true,
+}
diff --git a/rro_overlays/OmniRomResInternalOverlay/AndroidManifest.xml b/rro_overlays/OmniRomResInternalOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..c4174b9
--- /dev/null
+++ b/rro_overlays/OmniRomResInternalOverlay/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="omnirom.platform.overlay.device"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <application android:hasCode="false"/>
+
+    <overlay android:isStatic="true"
+             android:priority="140"
+             android:targetPackage="omnirom.platform"/>
+</manifest>
diff --git a/rro_overlays/OmniRomResInternalOverlay/res/values/arrays.xml b/rro_overlays/OmniRomResInternalOverlay/res/values/arrays.xml
new file mode 100644
index 0000000..aca8ef2
--- /dev/null
+++ b/rro_overlays/OmniRomResInternalOverlay/res/values/arrays.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+** Not a Contribution.
+**
+** Copyright 2012, 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.
+*/
+-->
+<resources>
+    <string-array translatable="false" name="config_rebootActionsList">
+        <item>restart</item>
+        <item>reboot_recovery</item>
+        <item>reboot_bootloader</item>
+        <item>reboot_fastboot</item>
+    </string-array>
+</resources>
\ No newline at end of file
diff --git a/rro_overlays/OmniRomResInternalOverlay/res/values/config.xml b/rro_overlays/OmniRomResInternalOverlay/res/values/config.xml
new file mode 100644
index 0000000..d5d9266
--- /dev/null
+++ b/rro_overlays/OmniRomResInternalOverlay/res/values/config.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+
+<resources>
+
+    <!-- Path to the library that contains a device specific key handler -->
+    <string name="config_deviceKeyHandlerLib" translatable="false">/system/priv-app/DeviceParts/DeviceParts.apk</string>
+
+    <!-- Name of that key handler class -->
+    <string name="config_deviceKeyHandlerClass" translatable="false">org.omnirom.device.KeyHandler</string>
+
+    <!-- make sure you enable this only if your device supports deep slepp
+        with active proximity sensor event listener -->
+    <bool name="config_proxiSensorWakupCheck">true</bool>
+
+    <!-- Is the battery LED intrusive? Used to decide if there should be a disable option  -->
+    <bool name="config_intrusiveBatteryLed">true</bool>
+
+    <!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors -->
+    <bool name="config_multiColorBatteryLed">true</bool>
+
+        <!-- Does device supports fast charging ?  -->
+    <bool name="config_FastChargingLedSupported">true</bool>
+</resources>
diff --git a/rro_overlays/SettingsOverlay/Android.bp b/rro_overlays/SettingsOverlay/Android.bp
new file mode 100644
index 0000000..6ef8549
--- /dev/null
+++ b/rro_overlays/SettingsOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "SettingsOverlay",
+    theme: "SettingsOverlay",
+    product_specific: true,
+}
diff --git a/rro_overlays/SettingsOverlay/AndroidManifest.xml b/rro_overlays/SettingsOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..70cc591
--- /dev/null
+++ b/rro_overlays/SettingsOverlay/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.settings.overlay">
+
+    <overlay
+        android:isStatic="true"
+        android:priority="800"
+        android:targetPackage="com.android.settings" />
+</manifest>
+
diff --git a/rro_overlays/SettingsOverlay/res/values/config.xml b/rro_overlays/SettingsOverlay/res/values/config.xml
new file mode 100644
index 0000000..d6776af
--- /dev/null
+++ b/rro_overlays/SettingsOverlay/res/values/config.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2023, The OmniRom 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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- The number of vibration intensity levels supported by the device.
+         Note that this should correspond to the ability to vary the vibration amplitude, with
+         enough dynamic range to have at least as many distinct intensity levels as defined here.
+         Supported values are 1, 2, 3. If '1', the settings app will use a toggle for the settings,
+         otherwise a slider. If '3', the settings app maps intensities directly to the levels
+         supported by the Vibrator HAL APIs. If '2', then the levels will be mapped to
+         VIBRATION_INTENSITY_LOW and VIBRATION_INTENSITY_HIGH, which gives the most range for
+         scaling vibrations. The medium intensity will be skipped.
+         The default intensity values are configured at
+         frameworks/base/core/res/res/values/config.xml's config_default[type]VibrationIntensity.
+         Make sure that each default intensity value is consistent with the supported levels set
+         here. If this settings supports only 2 levels, for example, then the default intensity
+         should be either LOW (1) or HIGH (3).
+    -->
+    <integer name="config_vibration_supported_intensity_levels">3</integer>
+
+</resources>
diff --git a/rro_overlays/SettingsProviderOverlay/Android.bp b/rro_overlays/SettingsProviderOverlay/Android.bp
new file mode 100644
index 0000000..fce8d99
--- /dev/null
+++ b/rro_overlays/SettingsProviderOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "SettingsProviderOverlay",
+    theme: "SettingsProviderOverlay",
+    product_specific: true,
+}
diff --git a/rro_overlays/SettingsProviderOverlay/AndroidManifest.xml b/rro_overlays/SettingsProviderOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..d3e92f0
--- /dev/null
+++ b/rro_overlays/SettingsProviderOverlay/AndroidManifest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.providers.settings.overlay">
+
+    <overlay
+        android:isStatic="true"
+        android:priority="800"
+        android:targetPackage="com.android.providers.settings" />
+</manifest>
diff --git a/rro_overlays/SettingsProviderOverlay/res/values/defaults.xml b/rro_overlays/SettingsProviderOverlay/res/values/defaults.xml
new file mode 100644
index 0000000..71560d5
--- /dev/null
+++ b/rro_overlays/SettingsProviderOverlay/res/values/defaults.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2012, 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.
+ */
+-->
+<resources>
+    <!-- Set the automatic brightness mode on by default -->
+    <bool name="def_screen_brightness_automatic_mode">true</bool>
+
+</resources>
diff --git a/rro_overlays/SystemUICommonOverlay/Android.bp b/rro_overlays/SystemUICommonOverlay/Android.bp
new file mode 100644
index 0000000..e85ec93
--- /dev/null
+++ b/rro_overlays/SystemUICommonOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "SystemUIOverlay",
+    theme: "SystemUIOverlay",
+    product_specific: true,
+}
diff --git a/rro_overlays/SystemUICommonOverlay/AndroidManifest.xml b/rro_overlays/SystemUICommonOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..4d40eb1
--- /dev/null
+++ b/rro_overlays/SystemUICommonOverlay/AndroidManifest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.systemui.overlay.common">
+
+    <overlay
+        android:isStatic="true"
+        android:priority="550"
+        android:targetPackage="com.android.systemui" />
+</manifest>
diff --git a/rro_overlays/SystemUICommonOverlay/res/values/config.xml b/rro_overlays/SystemUICommonOverlay/res/values/config.xml
new file mode 100644
index 0000000..cc89435
--- /dev/null
+++ b/rro_overlays/SystemUICommonOverlay/res/values/config.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+
+    <!-- Doze: does this device support STATE_DOZE?  -->
+    <bool name="doze_display_state_supported">true</bool>
+
+    <!-- Max visible notification icons -->
+    <integer name="config_maxVisibleNotificationIcons">8</integer>
+    <integer name="config_maxVisibleNotificationIconsWhenDark">9</integer>
+
+</resources>
\ No newline at end of file
diff --git a/rro_overlays/SystemUICommonOverlay/res/values/dimens.xml b/rro_overlays/SystemUICommonOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..bcc04dc
--- /dev/null
+++ b/rro_overlays/SystemUICommonOverlay/res/values/dimens.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- the padding on the start of the statusbar -->
+    <dimen name="status_bar_padding_start">52.5px</dimen>
+
+</resources>
diff --git a/rro_overlays/TetheringOverlay/Android.bp b/rro_overlays/TetheringOverlay/Android.bp
new file mode 100644
index 0000000..934a62a
--- /dev/null
+++ b/rro_overlays/TetheringOverlay/Android.bp
@@ -0,0 +1,21 @@
+//
+// Copyright (C) 2020 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.
+//
+
+runtime_resource_overlay {
+    name: "TetheringConfigOverlay",
+    theme: "TetheringConfigOverlay",
+    product_specific: true
+}
diff --git a/rro_overlays/TetheringOverlay/AndroidManifest.xml b/rro_overlays/TetheringOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..d45afad
--- /dev/null
+++ b/rro_overlays/TetheringOverlay/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.networkstack.tethering.asus_sm8250"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay
+      android:targetPackage="com.android.networkstack.tethering"
+      android:targetName="TetheringConfig"
+      android:isStatic="true"
+      android:priority="0"/>
+</manifest>
diff --git a/rro_overlays/TetheringOverlay/res/values/config.xml b/rro_overlays/TetheringOverlay/res/values/config.xml
new file mode 100644
index 0000000..f26f089
--- /dev/null
+++ b/rro_overlays/TetheringOverlay/res/values/config.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2020, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         USB interfaces.  If the device doesn't want to support tething over USB this should
+         be empty.  An example would be "usb.*" -->
+    <string-array translatable="false" name="config_tether_usb_regexs">
+        <item>"usb\\d"</item>
+        <item>"rndis\\d"</item>
+    </string-array>
+
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         Wifi interfaces.  If the device doesn't want to support tethering over Wifi this
+         should be empty.  An example would be "softap.*" -->
+    <string-array translatable="false" name="config_tether_wifi_regexs">
+        <item>wlan\\d</item>
+        <item>softap\\d</item>
+        <item>wifi_br\\d</item>
+    </string-array>
+
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         bluetooth interfaces.  If the device doesn't want to support tethering over bluetooth this
+         should be empty. -->
+    <string-array translatable="false" name="config_tether_bluetooth_regexs">
+        <item>"bnep\\d"</item>
+        <item>"bt-pan"</item>
+    </string-array>
+
+    <!-- When true, the tethering upstream network follows the current default
+         Internet network (except when the current default network is mobile,
+         in which case a DUN network will be used if required). -->
+    <bool translatable="false" name="config_tether_upstream_automatic">true</bool>
+
+    <!-- Dhcp range (min, max) to use for tethering purposes -->
+    <!-- USB is  192.168.42.1 and 255.255.255.0
+         Wifi is 192.168.43.1 and 255.255.255.0
+         BT is limited to max default of 5 connections. 192.168.44.1 to 192.168.48.1
+         with 255.255.255.0
+         P2P is 192.168.49.1 and 255.255.255.0
+         Wigig is 192.168.50.1 and 255.255.255.0
+         Wigig P2P is 192.168.51.1 and 255.255.255.0
+    -->
+    <string-array name="config_tether_dhcp_range">
+        <item>192.168.42.2</item>
+        <item>192.168.42.254</item>
+        <item>192.168.43.2</item>
+        <item>192.168.43.254</item>
+        <item>192.168.44.2</item>
+        <item>192.168.44.254</item>
+        <item>192.168.45.2</item>
+        <item>192.168.45.254</item>
+        <item>192.168.46.2</item>
+        <item>192.168.46.254</item>
+        <item>192.168.47.2</item>
+        <item>192.168.47.254</item>
+        <item>192.168.48.2</item>
+        <item>192.168.48.254</item>
+        <item>192.168.49.2</item>
+        <item>192.168.49.254</item>
+        <item>192.168.50.2</item>
+        <item>192.168.50.254</item>
+        <item>192.168.51.2</item>
+        <item>192.168.51.254</item>
+        <item>192.168.52.2</item>
+        <item>192.168.52.254</item>
+    </string-array>
+</resources>
diff --git a/rro_overlays/WifiOverlay/Android.bp b/rro_overlays/WifiOverlay/Android.bp
new file mode 100644
index 0000000..bddfdc3
--- /dev/null
+++ b/rro_overlays/WifiOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "WifiOverlay",
+    theme: "WifiOverlay",
+    product_specific: true
+}
diff --git a/rro_overlays/WifiOverlay/AndroidManifest.xml b/rro_overlays/WifiOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..b5b8ec8
--- /dev/null
+++ b/rro_overlays/WifiOverlay/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<!-- Pixel specific wifi overlays -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.wifi.resources.asus_sm8250"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay
+      android:targetPackage="com.android.wifi.resources"
+      android:targetName="WifiCustomization"
+      android:isStatic="true"
+      android:priority="0"/>
+</manifest>
diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml
new file mode 100644
index 0000000..17ea184
--- /dev/null
+++ b/rro_overlays/WifiOverlay/res/values/config.xml
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds.  Do not translate.
+
+     NOTE: The naming convention is "config_camelCaseValue". Some legacy
+     entries do not follow the convention, but all new entries should. -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- boolean indicating whether the WiFi chipset has 5GHz band support.
+         Note: This config is replacing the config_wifi_dual_band_support
+         since more bands may now be supported (such as 6GHz), the naming dual_band
+         is no longer indicative, and a separate config now exists for each band -->
+    <bool translatable="false" name="config_wifi5ghzSupport">true</bool>
+
+    <!-- Wifi driver Automatic channel selection (ACS) for softap to include DFS channels -->
+    <bool translatable="false" name="config_wifiSoftapAcsIncludeDfs">true</bool>
+
+    <!-- Boolean indicating whether the wifi chipset supports background scanning mechanism.
+         This mechanism allows the host to remain in suspend state and the dongle to actively
+         scan and wake the host when a configured SSID is detected by the dongle. This chipset
+         capability can provide power savings when wifi needs to be always kept on. -->
+    <bool translatable="false" name="config_wifi_background_scan_support">true</bool>
+
+    <!-- Wifi driver supports batched scan -->
+    <bool translatable="false" name="config_wifi_batched_scan_supported">true</bool>
+
+    <!-- Wifi driver supports Automatic channel selection (ACS) for softap -->
+    <bool translatable="false" name="config_wifi_softap_acs_supported">true</bool>
+
+    <!-- Wifi driver supports IEEE80211AC for softap -->
+    <bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool>
+
+    <!-- Indicates that connected MAC randomization is supported on this device -->
+    <bool translatable="false" name="config_wifi_connected_mac_randomization_supported">true</bool>
+
+    <!-- Indicates that p2p MAC randomization is supported on this device -->
+    <bool translatable="false" name="config_wifi_p2p_mac_randomization_supported">true</bool>
+
+    <!-- Wifi driver supports WPA3 Simultaneous Authentication of Equals (WPA3-SAE) for softap -->
+    <bool translatable="false" name="config_wifi_softap_sae_supported">true</bool>
+
+    <!-- Configure wifi tcp buffersizes in the form:
+         rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
+    <string translatable="false" name="config_wifi_tcp_buffers">524288,1048576,2097152,262144,524288,1048576</string>
+
+</resources>
diff --git a/sepolicy/private/property_contexts b/sepolicy/private/property_contexts
new file mode 100644
index 0000000..cf9479a
--- /dev/null
+++ b/sepolicy/private/property_contexts
@@ -0,0 +1,2 @@
+# Telephony
+vendor.tel.ims.reg    u:object_r:exported_system_prop:s0
diff --git a/sepolicy/private/service_contexts b/sepolicy/private/service_contexts
new file mode 100644
index 0000000..4a8d172
--- /dev/null
+++ b/sepolicy/private/service_contexts
@@ -0,0 +1,7 @@
+# IMS
+vendor.qti.hardware.radio.ims.IImsRadio/imsradio0           u:object_r:vendor_hal_telephony_service:s0
+vendor.qti.hardware.radio.ims.IImsRadio/imsradio1           u:object_r:vendor_hal_telephony_service:s0
+vendor.qti.hardware.radio.qtiradio.IQtiRadioStable/slot1    u:object_r:vendor_hal_telephony_service:s0
+vendor.qti.hardware.radio.qtiradio.IQtiRadioStable/slot2    u:object_r:vendor_hal_telephony_service:s0
+vendor.qti.hardware.radio.am.IQcRilAudio/slot1              u:object_r:vendor_hal_telephony_service:s0
+vendor.qti.hardware.radio.am.IQcRilAudio/slot2              u:object_r:vendor_hal_telephony_service:s0
diff --git a/sepolicy/private/vendor_qtelephony.te b/sepolicy/private/vendor_qtelephony.te
new file mode 100644
index 0000000..fcbc808
--- /dev/null
+++ b/sepolicy/private/vendor_qtelephony.te
@@ -0,0 +1,3 @@
+set_prop(vendor_qtelephony, exported_system_prop)
+
+allow vendor_qtelephony vendor_hal_telephony_service:service_manager find;
diff --git a/sepolicy/product/private/platform_app.te b/sepolicy/product/private/platform_app.te
new file mode 100644
index 0000000..51396cc
--- /dev/null
+++ b/sepolicy/product/private/platform_app.te
@@ -0,0 +1 @@
+allow platform_app vendor_display_notch_prop:file { read };
diff --git a/sepolicy/vendor/asus_osinfo.te b/sepolicy/vendor/asus_osinfo.te
new file mode 100644
index 0000000..e02393e
--- /dev/null
+++ b/sepolicy/vendor/asus_osinfo.te
@@ -0,0 +1,13 @@
+type asus_osinfo, domain;
+type asus_osinfo_exec, exec_type, vendor_file_type, file_type;
+
+# Started by init
+init_daemon_domain(asus_osinfo)
+
+allow asus_osinfo block_device:dir search;
+allow asus_osinfo sysinfo_block_device:blk_file rw_file_perms;
+
+get_prop(asus_osinfo, build_prop)
+get_prop(asus_osinfo, vendor_asus_prop)
+get_prop(asus_osinfo, vendor_asus_storage_prop)
+get_prop(asus_osinfo, vendor_radio_prop)
diff --git a/sepolicy/vendor/asus_sensors.te b/sepolicy/vendor/asus_sensors.te
index 5fea4b4..c1f769d 100644
--- a/sepolicy/vendor/asus_sensors.te
+++ b/sepolicy/vendor/asus_sensors.te
@@ -1,5 +1,23 @@
+# Policy for Asus SP HAL service
+type asus_sensors, domain;
+type asus_sensors_exec, exec_type, vendor_file_type, file_type;
+
+# Started by init
+init_daemon_domain(asus_sensors)
+
+allow asus_sensors init:unix_stream_socket { connectto };
+allow asus_sensors kmsg_device:chr_file { write getattr open };
+allow asus_sensors mnt_vendor_file:dir { ioctl read write getattr lock open watch watch_reads add_name search };
+allow asus_sensors vendor_toolbox_exec:file { getattr map execute execute_no_trans };
+allow asus_sensors vendor_file:file { getattr map execute execute_no_trans };
+allow asus_sensors mnt_vendor_file:file rw_file_perms;
+allow asus_sensors sensors_device:chr_file rw_file_perms;
+allow asus_sensors sysfs:file { ioctl read write getattr lock append map open watch watch_reads };
+allow asus_sensors asus_sensors_device:chr_file rw_file_perms;
 allow asus_sensors property_socket:sock_file write;
 allow asus_sensors vendor_shell_exec:file entrypoint;
 
 get_prop(asus_sensors, asus_sensors_prop)
 set_prop(asus_sensors, asus_sensors_prop)
+
+get_prop(asus_sensors, vendor_asus_prop)
diff --git a/sepolicy/vendor/asus_sp.te b/sepolicy/vendor/asus_sp.te
index 39a442c..02743be 100644
--- a/sepolicy/vendor/asus_sp.te
+++ b/sepolicy/vendor/asus_sp.te
@@ -1,6 +1,37 @@
+# Policy for Asus SP HAL service
+type asus_sp, domain;
+type asus_sp_exec, exec_type, vendor_file_type, file_type;
+
+# Started by init
+init_daemon_domain(asus_sp)
+
+allow asus_sp demoapp_file:dir rw_dir_perms;
+allow asus_sp mnt_vendor_file:dir rw_dir_perms;
+allow asus_sp mnt_vendor_file:file { r_file_perms unlink };
+
+allow asus_sp proc_cmdline:file { open read };
+allow asus_sp proc_meminfo:file { open read };
+
+allow asus_sp xrom_file:dir search;
+allow asus_sp xrom_file:file r_file_perms;
+
+allow asus_sp asusfw_file:dir search;
+allow asus_sp asusfw_file:file r_file_perms;
+
+allow asus_sp unlabeled:dir search;
+allow asus_sp unlabeled:file r_file_perms;
+
 allow asus_sp property_socket:sock_file write;
 allow asus_sp block_device:dir search;
 allow asus_sp proc:file r_file_perms;
 
 get_prop(asus_sp, asus_sp_system_prop)
 set_prop(asus_sp, asus_sp_system_prop)
+
+get_prop(asus_sp, build_prop)
+
+get_prop(asus_sp, vendor_asus_prop)
+set_prop(asus_sp, vendor_asus_prop)
+
+get_prop(asus_sp, vendor_asus_sp_prop)
+set_prop(asus_sp, vendor_asus_sp_prop)
diff --git a/sepolicy/vendor/asus_storage.te b/sepolicy/vendor/asus_storage.te
new file mode 100644
index 0000000..4effa86
--- /dev/null
+++ b/sepolicy/vendor/asus_storage.te
@@ -0,0 +1,13 @@
+type asus_storage, domain;
+type asus_storage_exec, exec_type, vendor_file_type, file_type;
+
+# Started by init
+init_daemon_domain(asus_storage)
+
+allow asus_storage property_socket:sock_file write;
+allow asus_storage asus_storage_exec:file r_file_perms;
+
+get_prop(asus_storage, vendor_asus_storage_prop)
+set_prop(asus_storage, vendor_asus_storage_prop)
+get_prop(asus_storage, vendor_asus_storage_prop_2)
+set_prop(asus_storage, vendor_asus_storage_prop_2)
diff --git a/sepolicy/vendor/cameraserver.te b/sepolicy/vendor/cameraserver.te
new file mode 100644
index 0000000..6c6b7ba
--- /dev/null
+++ b/sepolicy/vendor/cameraserver.te
@@ -0,0 +1,2 @@
+allow cameraserver omni_data_file:file rw_file_perms;
+allow cameraserver omni_data_file:dir write;
diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te
new file mode 100644
index 0000000..a16df04
--- /dev/null
+++ b/sepolicy/vendor/device.te
@@ -0,0 +1,14 @@
+# Block
+type asdf_block_device, dev_type;
+type asus_block_device, dev_type;
+
+# Goodix
+type fingerprintd_device, dev_type;
+
+# Motor camera
+type asus_laser_device, dev_type;
+type asus_motor_device, dev_type;
+type asus_sensors_device, dev_type;
+
+# Storage
+type sysinfo_block_device, dev_type;
diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te
index 5b21dde..c3b40f3 100644
--- a/sepolicy/vendor/file.te
+++ b/sepolicy/vendor/file.te
@@ -1,8 +1,35 @@
 # Asus Display
 type asus_display_proc_exec, fs_type, proc_type;
 
+# Camera & Motor
+type omni_data_file, file_type, data_file_type,  core_data_file_type;
+type vendor_proc_camera, fs_type, proc_type;
+type vendor_motor_camera, fs_type, proc_type;
+
+# Display
+type vendor_proc_graphics, fs_type, proc_type;
+
+# EVT
+type vendor_proc_evt, fs_type, proc_type;
+
+# Extcon
+type sysfs_hallsensor_file, sysfs_type, fs_type;
+type sysfs_mcu_version, sysfs_type, fs_type;
+
 # Fingerprint
+type vendor_goodix_data_file, file_type, data_file_type;
 type vendor_sysfs_proximity, fs_type, sysfs_type;
 
 # Hal Sensor
 type asus_halls_sysfs, fs_type, sysfs_type;
+
+# rootfs
+type asusfw_file, file_type;
+type log_file, file_type;
+type bat_file, file_type;
+type demoapp_file, file_type;
+type persist_file, file_type;
+type xrom_file, file_type;
+
+# Smart key
+type vendor_sysfs_gestures, sysfs_type, fs_type;
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
index 72c4be4..75c29b6 100644
--- a/sepolicy/vendor/file_contexts
+++ b/sepolicy/vendor/file_contexts
@@ -2,23 +2,84 @@
 /dev/block/platform/soc/1d84000\.ufshc/by-name/motor_fw1                            u:object_r:asdf_block_device:s0
 /dev/block/platform/soc/1d84000\.ufshc/by-name/motor_fw2                            u:object_r:asdf_block_device:s0
 
+# ASUS partitions.
+/dev/block/platform/soc/1d84000\.ufshc/by-name/ADF                                                 u:object_r:asus_block_device:s0
+/dev/block/platform/soc/1d84000\.ufshc/by-name/APD                                                 u:object_r:asus_block_device:s0
+/dev/block/platform/soc/1d84000\.ufshc/by-name/asdf                                                u:object_r:asdf_block_device:s0
+/dev/block/platform/soc/1d84000\.ufshc/by-name/batinfo                                             u:object_r:asus_block_device:s0
+/dev/block/platform/soc/1d84000\.ufshc/by-name/sysinfo                                             u:object_r:sysinfo_block_device:s0
+/dev/block/platform/soc/1d84000\.ufshc/by-name/asusfw_[ab]                                         u:object_r:vendor_custom_ab_block_device:s0
+/dev/block/platform/soc/1d84000\.ufshc/by-name/xrom_[ab]                                           u:object_r:vendor_custom_ab_block_device:s0
+
 # Asus Sp
 /(vendor|system/vendor)/bin/adrt_service                                            u:object_r:asus_sp_exec:s0
 /(vendor|system/vendor)/bin/change_aps                                              u:object_r:asus_sp_exec:s0
+/(vendor|system/vendor)/bin/mount_apd.sh                                                           u:object_r:vendor_shell_exec:s0
+/(vendor|system/vendor)/bin/sp                                                                     u:object_r:asus_sp_exec:s0
+
+# Asus sensor
+/(vendor|system/vendor)/bin/sensors_factory_init.sh                                                u:object_r:asus_sensors_exec:s0
+/(vendor|system/vendor)/bin/Asus2ndGyroSensor_calS                                                 u:object_r:asus_sensors_exec:s0
+/(vendor|system/vendor)/bin/Asus2ndAccelSensor_calS                                                u:object_r:asus_sensors_exec:s0
+
+# Awk
+/vendor/bin/awk                                                                                    u:object_r:vendor_toolbox_exec:s0
+
+# Camera
+/data/misc/omni/client_package_name                                                                u:object_r:omni_data_file:s0
+/dev/stmvl53l1_ranging                                                                             u:object_r:asus_laser_device:s0
+/(vendor|system/vendor)/bin/lasercsc                                                               u:object_r:lasercsc_exec:s0
+/(vendor|system/vendor)/lib(64)?/libipebpsstriping\.so                                             u:object_r:same_process_hal_file:s0
+/(vendor|system/vendor)/lib(64)?/DataSet/ispDB/ParameterDB\.db                                     u:object_r:vendor_public_lib_file:s0
 
 # Display
 /(vendor|system/vendor)/bin/irisConfig                                              u:object_r:iris_config_exec:s0
 
-# Files in rootfs
-/motor_fw1(/.*)?                                                                    u:object_r:log_file:s0
-/motor_fw2(/.*)?                                                                    u:object_r:log_file:s0
+# Extcon
+/sys/devices/virtual/extcon/mcu/name                                                               u:object_r:sysfs_mcu_version:s0
+/sys/devices/virtual/extcon/hallsensor/state                                                       u:object_r:sysfs_hallsensor_file:s0
+/sys/devices/virtual/extcon/battery/name                                                           u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/battery_id/state                                                       u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/quick_charging/state                                                   u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/usb_connector/state                                                    u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/vbus_liquid/stat                                                       u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/station_level/state                                                    u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/station_status/state                                                   u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/station_battery/name                                                   u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/station_present/state                                                  u:object_r:vendor_sysfs_battery_supply:s0
+/sys/devices/virtual/extcon/reverse_charging/state                                                 u:object_r:vendor_sysfs_battery_supply:s0
 
 # Fingerprint
 /sys/devices/platform/soc/0.goodix_gf3626/goodix_fp/goodix_fp/proximity_state         u:object_r:vendor_sysfs_proximity:s0
+/data/vendor/goodix/gf_data(/.*)?                                                                  u:object_r:vendor_goodix_data_file:s0
+/dev/goodix_fp                                                                                     u:object_r:fingerprintd_device:s0
+
+# Files in rootfs
+/ADF(/.*)?                                                                                         u:object_r:demoapp_file:s0
+/APD(/.*)?                                                                                         u:object_r:demoapp_file:s0
+/asdf(/.*)?                                                                                         u:object_r:log_file:s0
+/batinfo(/.*)?                                                                                   u:object_r:bat_file:s0
+/motor_fw1(/.*)?                                                                           u:object_r:log_file:s0
+/motor_fw2(/.*)?                                                                           u:object_r:log_file:s0
+/xrom(/.*)?                                                                                       u:object_r:xrom_file:s0
+
+# Motor Camera
+/dev/asusMotoDrv                                                                                   u:object_r:asus_motor_device:s0
 
 # Power
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power-service-qti               u:object_r:hal_power_default_exec:s0
 
+# Sensors
+/dev/asus2ndAccelSensor                                                                            u:object_r:asus_sensors_device:s0
+/dev/asus2ndGyroSensor                                                                             u:object_r:asus_sensors_device:s0
+/dev/lsensor                                                                                       u:object_r:sensors_device:s0
+/dev/psensor                                                                                       u:object_r:sensors_device:s0
+
+# Storage
+/(vendor|system/vendor)/bin/asus_osinfo                                                            u:object_r:asus_osinfo_exec:s0
+/(vendor|system/vendor)/bin/ufs_info.sh                                                            u:object_r:asus_storage_exec:s0
+/(vendor|system/vendor)/bin/ddr_info.sh                                                            u:object_r:asus_storage_exec:s0
+
 # Touch
 /(vendor|system/vendor)/bin/init.asus.gamemode.sh                                   u:object_r:asus_touch_exec:s0
 /(vendor|system/vendor)/bin/touch_ver.sh                                            u:object_r:asus_touch_exec:s0
diff --git a/sepolicy/vendor/fsck.te b/sepolicy/vendor/fsck.te
new file mode 100644
index 0000000..36bc7a8
--- /dev/null
+++ b/sepolicy/vendor/fsck.te
@@ -0,0 +1,7 @@
+allow fsck {
+    vendor_custom_ab_block_device
+    asus_block_device
+    asdf_block_device
+}:blk_file rw_file_perms;
+
+allow fsck fsck:capability { kill };
diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts
index 5a7b79c..9e03f71 100644
--- a/sepolicy/vendor/genfs_contexts
+++ b/sepolicy/vendor/genfs_contexts
@@ -1,5 +1,15 @@
 # Battery
+genfscon sysfs /devices/platform/soc/884000.i2c/i2c-5/5-0010/884000.i2c:qcom,smb1390@10:qcom,charge_pump/power_supply/charge_pump_master               u:object_r:vendor_sysfs_battery_supply:s0
 genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/smartchg_stop_charging    u:object_r:vendor_sysfs_battery_supply:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/ultra_bat_life                  u:object_r:vendor_sysfs_battery_supply:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/TypeC_Side_Detect2              u:object_r:vendor_sysfs_battery_supply:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:vadc@3100/iio:device1/in_temp_wp_therm_input   u:object_r:vendor_sysfs_battery_supply:s0
+
+# Camera
+genfscon proc /driver/dualcam_cali                                                              u:object_r:vendor_proc_camera:s0
+
+# Camera Motor
+genfscon proc /driver/motor_auto                                                                u:object_r:vendor_motor_camera:s0
 
 # Display
 genfscon proc /hbm_mode                                                 u:object_r:asus_display_proc_exec:s0
@@ -8,6 +18,15 @@
 genfscon proc /lcd_stage                                                u:object_r:asus_display_proc_exec:s0
 genfscon proc /lcd_unique_id                                            u:object_r:asus_display_proc_exec:s0
 
+# EVT
+genfscon proc /asusevtlog                                                                       u:object_r:vendor_proc_evt:s0
+
+# Gestures
+genfscon proc /driver/dclick                                                                    u:object_r:vendor_proc_graphics:s0
+genfscon proc /driver/gesture_type                                                              u:object_r:vendor_proc_graphics:s0
+genfscon proc /driver/glove                                                                     u:object_r:vendor_proc_graphics:s0
+genfscon proc /driver/swipeup                                                                   u:object_r:vendor_proc_graphics:s0
+
 # Hall Sensor
 genfscon sysfs /devices/platform/soc/984000.i2c/i2c-0/0-000d/hall_sensor2/trigger_update                 u:object_r:asus_halls_sysfs:s0
 genfscon sysfs /devices/platform/soc/984000.i2c/i2c-0/0-000d/hall_sensor2/X1_threshold                   u:object_r:asus_halls_sysfs:s0
@@ -33,10 +52,81 @@
 genfscon proc /driver/motor_drv                                         u:object_r:vendor_motor_camera:s0
 genfscon proc /driver/motor_k                                           u:object_r:vendor_motor_camera:s0
 
+# Performance
+genfscon sysfs /devices/platform/soc/1d84000.ufshc/clkgate_enable                               u:object_r:vendor_sysfs_msm_perf:s0
+genfscon sysfs /devices/platform/soc/1d84000.ufshc/hibern8_on_idle_enable                       u:object_r:vendor_sysfs_msm_perf:s0
+
+# Sensors
+genfscon sysfs /class/icm206xx                                                                  u:object_r:vendor_sysfs_sensors:s0
+genfscon sysfs /devices/virtual/sensors                                                         u:object_r:vendor_sysfs_sensors:s0
+genfscon sysfs /devices/virtual/sensors/lsensor/switch                                          u:object_r:vendor_sysfs_sensors:s0
+genfscon sysfs /devices/virtual/sensors/psensor/switch                                          u:object_r:vendor_sysfs_sensors:s0
+
+# Smart key
+genfscon sysfs /devices/platform/soc/soc:asustek_googlekey/googlekey_enable                     u:object_r:vendor_sysfs_gestures:s0
+
+# Textura
+genfscon texfat /                                                                               u:object_r:exfat:s0
+genfscon tntfs /                                                                                u:object_r:vfat:s0
+
 # Wakeup
-genfscon sysfs /devices/platform/soc/884000.i2c/i2c-5/5-0010/884000.i2c:qcom,smb1390@10:qcom,charge_pump/power_supply/charge_pump_master/wakeup   u:object_r:sysfs_wakeup:s0
-genfscon sysfs /devices/platform/soc/994000.spi/spi_master/spi0/spi0.0/wakeup                                                              u:object_r:sysfs_wakeup:s0
-genfscon sysfs /devices/platform/soc/0.goodix_gf3626/goodix_fp/goodix_fp/wakeup                                                                   u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/0306_02.01.00/wakeup                                                                                        u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys6/wakeup                                                             u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/wakeup                                                                     u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/188101c.qcom,spss/subsys5/wakeup                                                               u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/188101c.qcom,spss/wakeup                                                                       u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/1101_00.01.00/wakeup                    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/1103_00.01.00/wakeup                    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/wakeup                                                                       u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/1c10000.qcom,pcie/pci0002:00/0002:00:00.0/0002:01:00.0/0306_02.01.00_EFS/wakeup                u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/1c10000.qcom,pcie/wakeup                                                                       u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/4080000.qcom,mss/wakeup                                                                        u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/subsys7/wakeup                                                                u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/wakeup                                                                            u:object_r:sysfs_wakeup:s0
 genfscon sysfs /devices/platform/soc/88c000.qcom,qup_uart/wakeup                                                                           u:object_r:sysfs_wakeup:s0
-genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/wakeup                                                                              u:object_r:sysfs_wakeup:s0
-genfscon sysfs /devices/platform/soc/soc:qcom,ipa_uc/wakeup                                                                                u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/884000.i2c/i2c-4/4-0028/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/884000.i2c/i2c-5/5-0010/884000.i2c:qcom,smb1390@10:qcom,charge_pump/power_supply/charge_pump_master/wakeup   u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/884000.i2c/i2c-6/6-0025/power_supply/wireless/wakeup                                           u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/884000.i2c/i2c-6/6-004e/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/884000.i2c/i2c-6/6-005e/power_supply/pca9468-mains/wakeup                                      u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/890000.qcom,qup_uart/wakeup                                                                    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/894000.i2c/i2c-6/6-0068/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/98c000.i2c/i2c-2/2-001a/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/984000.i2c/i2c-0/0-0028/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/988000.i2c/i2c-1/1-002c/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/994000.spi/spi_master/spi0/spi0.0/wakeup                                                              u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/998000.qcom,qup_uart/wakeup                                                                    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/8300000.qcom,turing/wakeup                                                                     u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/9800000.qcom,npu/wakeup                                                                        u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/98900000.qcom,turing/subsys4/wakeup                                                            u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/98900000.qcom,turing/wakeup                                                                    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/abb0000.qcom,cvpss/wakeup                                                                      u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/aab0000.qcom,venus/subsys9/wakeup                                                              u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/aab0000.qcom,venus/subsys10/wakeup                                                             u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/abb0000.qcom,evass/wakeup                                                                      u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6390/wakeup                                                              u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/subsys9/wakeup                                                      u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/subsys10/wakeup                                                     u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/wakeup                                                              u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm8150@0:qcom,pm8150_rtc/wakeup       u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm8150@0:qcom,power-on@800/wakeup     u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/wakeup       u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,sdam-qnovo@b000/wakeup u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qpnp,fg/wakeup              u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-04/c440000.qcom,spmi:qcom,pm8150l@4:qcom,power-on@800/wakeup    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-03/c440000.qcom,spmi:qcom,pm8350b@3:qcom,amoled/wakeup          u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:rtc@6100/rtc/rtc0/wakeup    u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-08/c440000.qcom,spmi:qcom,pmxprairie@8:qcom,power-on@800/wakeup u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/soc:qcom,ipa_uc/wakeup                                                                                  u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink_log/wakeup                                                                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/soc:qcom,trustedvm@d0800000/wakeup                                                             u:object_r:sysfs_wakeup:s0
+
+# Wakeup (from stock)
+genfscon sysfs /devices/platform/soc/0.goodix_gf3626/goodix_fp/goodix_fp/wakeup u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/171c0000.slim/tavil-slim-pgd/wakeup                 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/a84000.i2c/i2c-3/3-0029/wakeup                      u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/soc:asustek_googlekey/wakeup                        u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/vendor/vendor:extcon_usb1/wakeup                        u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/18800000.qcom,icnss/wakeup                          u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/soc:asustek_lid2/wakeup                             u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc/soc:asustek_lid/wakeup                              u:object_r:sysfs_wakeup:s0
diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te
new file mode 100644
index 0000000..af218c6
--- /dev/null
+++ b/sepolicy/vendor/hal_audio_default.te
@@ -0,0 +1,14 @@
+allow hal_audio_default system_suspend_hwservice:hwservice_manager find;
+
+set_prop(hal_audio_default, vendor_audio_prop)
+
+get_prop(hal_audio_default, asus_prop)
+get_prop(hal_audio_default, vendor_asus_prop)
+set_prop(hal_audio_default, vendor_asus_prop)
+
+get_prop(hal_audio_default, vendor_asus_sp_prop)
+
+get_prop(hal_audio_default, vendor_dts_audio_prop)
+
+# Allow hal_audio_default to read files in mnt_vendor_file
+r_dir_file(hal_audio_default, mnt_vendor_file)
diff --git a/sepolicy/vendor/hal_bootctl_default.te b/sepolicy/vendor/hal_bootctl_default.te
new file mode 100644
index 0000000..e5c73b6
--- /dev/null
+++ b/sepolicy/vendor/hal_bootctl_default.te
@@ -0,0 +1 @@
+allow hal_bootctl_default vendor_uefi_block_device:blk_file getattr;
diff --git a/sepolicy/vendor/hal_camera_default.te b/sepolicy/vendor/hal_camera_default.te
index 32d9928..690c03d 100644
--- a/sepolicy/vendor/hal_camera_default.te
+++ b/sepolicy/vendor/hal_camera_default.te
@@ -1,7 +1,33 @@
-get_prop(hal_camera_default, asus_sensors_prop)
+binder_call(hal_camera_default, system_server)
+binder_call(hal_camera_default, system_app)
+
+hal_client_domain(hal_camera_default, vendor_hal_qspmhal)
+
+# Allow hal_camera_default to find motor camera service
+allow hal_camera_default asus_bspcam_hwservice:hwservice_manager { add find };
+
+allow hal_camera_default asus_laser_device:chr_file rw_file_perms;
+allow hal_camera_default mnt_vendor_file:file { read getattr open };
+allow hal_camera_default mnt_vendor_file:dir { search };
+allow hal_camera_default system_data_file:dir { search };
+
+allow hal_camera_default vendor_file:file lock;
+allow hal_camera_default vendor_public_lib_file:file lock;
 
 # Allow camera to read/write to proc files into bin/Camera_OIS-* and bin/q_af_cali
 allow hal_camera_default proc:file rw_file_perms;
 
 # Camera for ParameterDB.db
 allow hal_camera_default system_lib_file:file { getattr lock open read };
+
+get_prop(hal_camera_default, bootanim_system_prop)
+get_prop(hal_camera_default, vendor_asus_prop)
+get_prop(hal_camera_default, vendor_video_prop)
+
+get_prop(hal_camera_default, vendor_camera_prop)
+set_prop(hal_camera_default, vendor_camera_prop)
+
+get_prop(hal_camera_default, asus_prop)
+set_prop(hal_camera_default, asus_prop)
+
+get_prop(hal_camera_default, asus_sensors_prop)
diff --git a/sepolicy/vendor/hal_fingerprint_default.te b/sepolicy/vendor/hal_fingerprint_default.te
new file mode 100644
index 0000000..767d77a
--- /dev/null
+++ b/sepolicy/vendor/hal_fingerprint_default.te
@@ -0,0 +1,24 @@
+binder_call(hal_fingerprint_default, vendor_hal_perf_default)
+
+allow hal_fingerprint_default vendor_hal_perf_hwservice:hwservice_manager find;
+
+allow hal_fingerprint_default fingerprintd_device:chr_file rw_file_perms;
+allow hal_fingerprint_default tee_device:chr_file rw_file_perms;
+
+allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl;
+
+allow hal_fingerprint_default input_device:dir r_dir_perms;
+allow hal_fingerprint_default input_device:chr_file rw_file_perms;
+
+allow hal_fingerprint_default vendor_goodix_data_file:file create_file_perms;
+allow hal_fingerprint_default vendor_goodix_data_file:dir create_dir_perms;
+
+allow hal_fingerprint_default vendor_sysfs_battery_supply:dir search;
+allow hal_fingerprint_default vendor_sysfs_battery_supply:file r_file_perms;
+
+get_prop(hal_fingerprint_default, vendor_asus_prop)
+
+# Allow hal_fingerprint_default to get vendor_adsprpc_prop
+get_prop(hal_fingerprint_default, vendor_adsprpc_prop)
+
+set_prop(hal_fingerprint_default, vendor_gx_fpd_prop);
diff --git a/sepolicy/vendor/hal_health_default.te b/sepolicy/vendor/hal_health_default.te
new file mode 100644
index 0000000..453b783
--- /dev/null
+++ b/sepolicy/vendor/hal_health_default.te
@@ -0,0 +1,4 @@
+get_prop(hal_health_default, vendor_health_prop)
+
+dontaudit hal_health_default system_prop:file read;
+allow hal_health_default sysfs:file { getattr open read };
diff --git a/sepolicy/vendor/hal_nfc_default.te b/sepolicy/vendor/hal_nfc_default.te
new file mode 100644
index 0000000..e121aa9
--- /dev/null
+++ b/sepolicy/vendor/hal_nfc_default.te
@@ -0,0 +1,6 @@
+allow hal_nfc_default hal_nfc_hwservice:hwservice_manager find;
+
+allow hal_nfc_default vendor_nfc_prop:file read;
+
+set_prop(hal_nfc_default, vendor_nfc_prop)
+r_dir_file(hal_nfc_default, vendor_nfc_vendor_data_file)
diff --git a/sepolicy/vendor/hal_perf_default.te b/sepolicy/vendor/hal_perf_default.te
new file mode 100644
index 0000000..4fddf81
--- /dev/null
+++ b/sepolicy/vendor/hal_perf_default.te
@@ -0,0 +1 @@
+set_prop(vendor_hal_perf_default, vendor_camera_prop)
diff --git a/sepolicy/vendor/hal_power_default.te b/sepolicy/vendor/hal_power_default.te
new file mode 100644
index 0000000..1726086
--- /dev/null
+++ b/sepolicy/vendor/hal_power_default.te
@@ -0,0 +1 @@
+allow hal_power_default vendor_proc_evt:file rw_file_perms;
diff --git a/sepolicy/vendor/hal_sensors_default.te b/sepolicy/vendor/hal_sensors_default.te
index adf4d20..7dad75e 100644
--- a/sepolicy/vendor/hal_sensors_default.te
+++ b/sepolicy/vendor/hal_sensors_default.te
@@ -1,2 +1,11 @@
+allow hal_sensors_default sensors_device:chr_file rw_file_perms;
+allow hal_sensors_default asus_sensors_device:chr_file rw_file_perms; 
+#allow hal_sensors_default vendor_sysfs_sensors:file rw_file_perms;
+
 get_prop(hal_sensors_default, asus_sensors_prop)
 set_prop(hal_sensors_default, asus_sensors_prop)
+
+set_prop(hal_sensors_default, vendor_asus_prop)
+
+get_prop(hal_sensors_default, vendor_thermal_prop)
+set_prop(hal_sensors_default, vendor_thermal_prop)
diff --git a/sepolicy/vendor/hwservice.te b/sepolicy/vendor/hwservice.te
index e9408a1..02f6fbb 100644
--- a/sepolicy/vendor/hwservice.te
+++ b/sepolicy/vendor/hwservice.te
@@ -1,2 +1,5 @@
+# Asus Camera
+type asus_bspcam_hwservice, hwservice_manager_type;
+
 # Pixelworks display
 type hal_display_iris_hwservice, hwservice_manager_type;
diff --git a/sepolicy/vendor/hwservice_contexts b/sepolicy/vendor/hwservice_contexts
index 12e7f35..d353d2f 100644
--- a/sepolicy/vendor/hwservice_contexts
+++ b/sepolicy/vendor/hwservice_contexts
@@ -1,2 +1,15 @@
+# Camera
+vendor.asus.bspcam::IAsusBspCameraInterface                                        u:object_r:asus_bspcam_hwservice:s0
+
 # Display
 vendor.pixelworks.hardware.display::IIris                                        u:object_r:hal_display_iris_hwservice:s0
+
+# Goodix fingerprint
+vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon            u:object_r:hal_fingerprint_hwservice:s0
+vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemonExt         u:object_r:hal_fingerprint_hwservice:s0
+vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemonFido        u:object_r:hal_fingerprint_hwservice:s0
+vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemonHbd         u:object_r:hal_fingerprint_hwservice:s0
+
+# Nfc
+vendor.nxp.nxpnfc::INxpNfc                                                         u:object_r:hal_nfc_hwservice:s0
+vendor.nxp.nxpnfclegacy::INxpNfcLegacy                                             u:object_r:hal_nfc_hwservice:s0
diff --git a/sepolicy/vendor/init.te b/sepolicy/vendor/init.te
index 6f6d8bc..07d302f 100644
--- a/sepolicy/vendor/init.te
+++ b/sepolicy/vendor/init.te
@@ -1,2 +1,25 @@
-get_prop(init, asus_sensors_prop)
+allow init {
+    xrom_file
+}:dir mounton;
 
+allow init {
+    demoapp_file
+    log_file
+    bat_file
+}:dir { create mounton relabelto};
+allow init demoapp_file:lnk_file r_file_perms;
+
+allow init vendor_motor_camera:file write;
+
+allow init asus_sensors_exec:file r_file_perms;
+allow init asus_sensors:process transition;
+
+allow init asus_sp_exec:file r_file_perms;
+allow init asus_sp:process transition;
+
+allow init lasercsc_exec:file r_file_perms;
+allow init lasercsc:process transition;
+
+allow init asus_storage_exec:file r_file_perms;
+
+get_prop(init, asus_sensors_prop)
diff --git a/sepolicy/vendor/kernel.te b/sepolicy/vendor/kernel.te
new file mode 100644
index 0000000..948c2f8
--- /dev/null
+++ b/sepolicy/vendor/kernel.te
@@ -0,0 +1,8 @@
+# Battery
+allow kernel bat_file:dir { read write add_name search };
+allow kernel bat_file:file {read write create open };
+allow kernel log_file:dir rw_dir_perms;
+allow kernel log_file:file create_file_perms;
+allow kernel log_file:file rw_file_perms;
+
+#allow kernel mnt_vendor_file:dir search;
diff --git a/sepolicy/vendor/lasercsc.te b/sepolicy/vendor/lasercsc.te
new file mode 100644
index 0000000..7df049a
--- /dev/null
+++ b/sepolicy/vendor/lasercsc.te
@@ -0,0 +1,19 @@
+# Policy for Asus laser camera HAL service
+type lasercsc, domain;
+type lasercsc_exec, exec_type, vendor_file_type, file_type;
+
+# Started by init
+init_daemon_domain(lasercsc)
+
+allow lasercsc vendor_toolbox_exec:file {execute_no_trans };
+allow lasercsc vendor_file:file {execute_no_trans };
+allow lasercsc asus_laser_device:chr_file {ioctl read write open };
+allow lasercsc kmsg_device:chr_file {write getattr open };
+allow lasercsc mnt_vendor_file:dir {write add_name remove_name search };
+allow lasercsc mnt_vendor_file:file {read write create getattr setattr unlink open };
+allow lasercsc vendor_camera_data_file:dir {write add_name search };
+allow lasercsc vendor_camera_data_file:file r_file_perms;
+allow lasercsc proc:file {write open };
+
+get_prop(lasercsc, asus_laservalue_prop)
+set_prop(lasercsc, asus_laservalue_prop)
diff --git a/sepolicy/vendor/platform_app.te b/sepolicy/vendor/platform_app.te
index 0144aea..a821a2c 100644
--- a/sepolicy/vendor/platform_app.te
+++ b/sepolicy/vendor/platform_app.te
@@ -1,3 +1,35 @@
+binder_call(platform_app, hal_camera_default)
+
+# Battery
+allow platform_app bat_file:file r_file_perms;
+allow platform_app bat_file:dir search;
+allow platform_app vendor_sysfs_battery_supply:dir search;
+allow platform_app vendor_sysfs_battery_supply:file { read getattr open };
+
+# Some apps ship with shared libraries and binaries that they write out
+# to their sandbox directory and then execute.
+allow platform_app privapp_data_file:file { r_file_perms execute };
+allow platform_app app_data_file:file { r_file_perms execute };
+auditallow platform_app app_data_file:file execute;
+
+allow platform_app asus_laser_device:chr_file rw_file_perms;
+allow platform_app asus_motor_device:chr_file rw_file_perms;
+allow platform_app rs_exec:file rx_file_perms;
+
+get_prop(platform_app, asus_prop)
+get_prop(platform_app, vendor_asus_prop)
+get_prop(platform_app, vendor_asus_sp_prop)
+get_prop(platform_app, vendor_camera_prop)
+
+# Allow SystemUI overlay to find NFC for the tile
+allow platform_app nfc_service:service_manager find;
+
+# for system/lib64/DataSet/ispDB/ParameterDB.db
+allow platform_app system_lib_file:file lock ;
+
+allow platform_app vendor_camera_data_file:dir create_dir_perms;
+allow platform_app vendor_camera_data_file:file create_file_perms;
+
 # Camera for ParameterDB.db
 allow platform_app system_lib_file:file { getattr lock open read };
 
diff --git a/sepolicy/vendor/priv_app.te b/sepolicy/vendor/priv_app.te
index 4b1c043..72db576 100644
--- a/sepolicy/vendor/priv_app.te
+++ b/sepolicy/vendor/priv_app.te
@@ -1,3 +1,7 @@
+allow priv_app system_lib_file:file { read getattr lock open };
+
+get_prop(priv_app, asus_prop)
+
 # Pixelworks
 allow priv_app asus_display_proc_exec:file rw_file_perms;
 hal_client_domain(priv_app, hal_display_iris)
diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te
index 8f75383..9eb9b71 100644
--- a/sepolicy/vendor/property.te
+++ b/sepolicy/vendor/property.te
@@ -1,5 +1,33 @@
+# Asus default prop
+type asus_laservalue_prop, property_type;
+type asus_prop, property_type;
+type vendor_asus_prop, property_type;
+type vendor_asus_sp_prop, property_type;
+
+# Audio
+type vendor_dts_audio_prop, property_type;
+
+# Fingerprint
+type vendor_gx_fpd_prop, property_type;
+
+# Gps
+type vendor_gps_prop, property_type;
+
+# Health
+type vendor_health_prop, property_type;
+
 # Ims
 type asus_sp_system_prop, property_type;
 
+# NFC
+type vendor_nfc_prop, property_type;
+
 # Sensor
 type asus_sensors_prop, property_type;
+
+# Storage
+type vendor_asus_storage_prop_2, property_type;
+type vendor_asus_storage_prop, property_type;
+
+# Thermal
+type vendor_thermal_prop, property_type;
diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts
index c46640b..0c28285 100644
--- a/sepolicy/vendor/property_contexts
+++ b/sepolicy/vendor/property_contexts
@@ -1,26 +1,128 @@
-# Asus_sp
-persist.vendor.asus.adrt                                                u:object_r:vendor_asus_prop:s0
+# AsusLogTool
+persist.vendor.dbg.                             u:object_r:system_prop:s0
+persist.vendor.port_bridge                      u:object_r:system_prop:s0
+persist.vendor.asus.gcf.mode                    u:object_r:radio_control_prop:s0
+persist.vendor.asus.amr2g.mode                  u:object_r:radio_control_prop:s0
+persist.vendor.asus.amr3g.mode                  u:object_r:radio_control_prop:s0
+persist.vendor.asus.psconfig.mode               u:object_r:radio_control_prop:s0
+# for antenna switch
+persist.vendor.radio.airplane_mode_on           u:object_r:radio_control_prop:s0
+
+# Asus sp
+persist.vendor.asus.adrt                     u:object_r:vendor_asus_prop:s0
+ro.vendor.config.CID                            u:object_r:vendor_asus_prop:s0
+ro.vendor.config.idcode                         u:object_r:vendor_asus_prop:s0
+ro.vendor.config.versatility                    u:object_r:vendor_asus_prop:s0
+ro.vendor.config.revenuecountry                 u:object_r:vendor_asus_prop:s0
+ro.vendor.build.asus.                           u:object_r:vendor_asus_prop:s0
+
+ro.vendor.asus.product.mkt_name                 u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.asus.phone.hac                        u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.asus.phone.tty                        u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.build.asus.fota                       u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.build.csc.version                     u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.build.asus.version                    u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.build.asus.sku                        u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.build.asus.number                     u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.build.fota.version                    u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.facebook.partnerid                    u:object_r:vendor_asus_sp_prop:s0
+vendor.atd.oem-uart                             u:object_r:vendor_asus_sp_prop:s0
+vendor.atd.unlocked.ready                       u:object_r:vendor_asus_sp_prop:s0
+vendor.atd.fusing.ready                         u:object_r:vendor_asus_sp_prop:s0
+vendor.factory.adbon                            u:object_r:vendor_asus_sp_prop:s0
+vendor.debug.update.deviceinfo.result           u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.cpufreq                               u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.memsize                               u:object_r:vendor_asus_sp_prop:s0
+ro.vendor.isn                                   u:object_r:vendor_asus_sp_prop:s0
+persist.vendor.asus.serialno                    u:object_r:vendor_asus_sp_prop:s0
+vendor.asus.build.ext.version                   u:object_r:vendor_asus_sp_prop:s0
+vendor.asus.build.sub.version                   u:object_r:vendor_asus_sp_prop:s0
+vendor.asus.country.fp                          u:object_r:vendor_asus_sp_prop:s0
+persist.vendor.asus.                            u:object_r:system_prop:s0
+persist.vendor.asus.no.country                  u:object_r:vendor_asus_sp_prop:s0
+vendor.x-rr.                                    u:object_r:vendor_asus_sp_prop:s0
 
 # Audio
-vendor.asus.audiocalibration                                      u:object_r:exported_system_prop:s0
+vendor.asus.audiocalibration                                    u:object_r:exported_system_prop:s0
 vendor.audio.calibration.rcv                                      u:object_r:exported_system_prop:s0
-vendor.audio.calibration.spk                                      u:object_r:exported_system_prop:s0
-vendor.audio.calibration.value.range                              u:object_r:exported_system_prop:s0
-vendor.audio.calibration.rcv.value                                u:object_r:exported_system_prop:s0
-vendor.audio.calibration.spk.value                                u:object_r:exported_system_prop:s0
-vendor.use.audio.eu.parameters                                    u:object_r:exported_system_prop:s0
+vendor.audio.calibration.spk                                     u:object_r:exported_system_prop:s0
+vendor.audio.calibration.value.range                     u:object_r:exported_system_prop:s0
+vendor.audio.calibration.rcv.value                           u:object_r:exported_system_prop:s0
+vendor.audio.calibration.spk.value                          u:object_r:exported_system_prop:s0
+vendor.asus.vendor_audiocalibration                     u:object_r:vendor_asus_prop:s0
+vendor.use.audio.eu.parameters                              u:object_r:exported_system_prop:s0
+
+# Audio Dts
+vendor.dts.audio.                                                            u:object_r:vendor_dts_audio_prop:s0
+ro.vendor.dts.                                                                  u:object_r:vendor_dts_audio_prop:s0
+
+# BT and Wifi
+ro.vendor.wifimac                               u:object_r:vendor_asus_prop:s0
+ro.vendor.wifimac_2                             u:object_r:vendor_asus_prop:s0
+vendor.wifi.version.driver                      u:object_r:vendor_asus_prop:s0
+vendor.debug.camera.lasercsc                    u:object_r:vendor_asus_prop:s0
+vendor.debug.camera.lasercsc.laservalue         u:object_r:asus_laservalue_prop:s0
 
 # Camera
-vendor.sys.asus.camprobe                                          u:object_r:vendor_asus_prop:s0
+persist.vendor.camera.hal3only                  u:object_r:system_prop:s0
+vendor.camera.                                  u:object_r:vendor_camera_prop:s0
+vendor.camera.apk.usingname                     u:object_r:exported_system_prop:s0
+vendor.camera.expTimeMax                        u:object_r:asus_prop:s0
+vendor.camera.facing                            u:object_r:asus_prop:s0
+vendor.camera.motiontracking                    u:object_r:asus_prop:s0
+vendor.camera.sound.forced                      u:object_r:vendor_asus_prop:s0
+vendor.sys.asus.camprobe                           u:object_r:vendor_asus_prop:s0
+
+# Charging
+ro.vendor.smartcharging                         u:object_r:vendor_health_prop:s0
+persist.vendor.pps.power_limit_w                u:object_r:vendor_health_prop:s0
+persist.vendor.chg.max_volt_mv                  u:object_r:vendor_health_prop:s0
+
+# Display
+vendor.drm.keystatus                            u:object_r:vendor_display_prop:s0
+vendor.debug.drm.keystatus              u:object_r:exported_system_prop:s0
+
+# Fingerprint
+vendor.asus.fp.wakeup                           u:object_r:vendor_gx_fpd_prop:s0
+vendor.fp.version.driver                        u:object_r:vendor_gx_fpd_prop:s0
+persist.vendor.asus.fp.wakeup                   u:object_r:vendor_gx_fpd_prop:s0
+persist.vendor.asus.fp.wakeup_support           u:object_r:vendor_gx_fpd_prop:s0
+vendor.gf.debug.dump_bigdata_data      u:object_r:vendor_gx_fpd_prop:s0
+vendor.gf.debug.dump_data                       u:object_r:vendor_gx_fpd_prop:s0
+vendor.gf.debug.dump_talog_data                 u:object_r:vendor_gx_fpd_prop:s0
+vendor.gf.debug.whitebox.enabled                u:object_r:vendor_gx_fpd_prop:s0
+vendor.goodix.                                  u:object_r:vendor_gx_fpd_prop:s0
 
 # Gallery
 persist.vendor.sys.cta.security                                  u:object_r:vendor_asus_prop:s0
 
-# Fingerprint
-vendor.gf.debug.dump_bigdata_data                                 u:object_r:vendor_gx_fpd_prop:s0
+# Gps
+persist.vendor.asus.agps.ntpinjecttime          u:object_r:vendor_gps_prop:s0
+persist.vendor.asus.agps.injecttime             u:object_r:vendor_gps_prop:s0
+persist.vendor.asus.gps.engstate                u:object_r:vendor_gps_prop:s0
 
 # Ims
-ro.vendor.tc.qkey                                                 u:object_r:asus_sp_system_prop:s0
+ro.vendor.tc.qkey                                         u:object_r:asus_sp_system_prop:s0
+
+# Motor
+persist.vendor.asus.motor                       u:object_r:vendor_asus_prop:s0
+persist.vendor.asus.motorservice.               u:object_r:exported_system_prop:s0
+persist.vendor.asus.motorservice.playsound      u:object_r:system_prop:s0
+persist.vendor.asus.asusrecord.                 u:object_r:vendor_asus_prop:s0
+
+# NFC
+persist.vendor.nfc.                             u:object_r:vendor_nfc_prop:s0
+
+# Radio
+persist.vendor.odm.tel.                         u:object_r:radio_control_prop:s0
+ro.vendor.asus.phone.                           u:object_r:radio_control_prop:s0
+ro.vendor.asus.network.types                    u:object_r:radio_control_prop:s0
+ro.vendor.csc.modemhash1                        u:object_r:radio_control_prop:s0
+ro.vendor.csc.modemhash2                        u:object_r:radio_control_prop:s0
+ro.vendor.odm.tel.                              u:object_r:radio_control_prop:s0
+vendor.odm.tel.                                 u:object_r:radio_control_prop:s0
+vendor.tel.                                     u:object_r:radio_control_prop:s0
+vendor.telephony.default_network                u:object_r:radio_control_prop:s0
 
 # Sensors
 vendor.asus.rstg2k                                                u:object_r:debug_prop:s0
@@ -32,9 +134,36 @@
 persist.vendor.asus.gyrosensor2calibz                             u:object_r:asus_sensors_prop:s0
 persist.vendor.asus.gyrosensor2calibtime                          u:object_r:asus_sensors_prop:s0
 
-# Termal
+# SIM Card active
+persist.vendor.asus.sim1.enabled                u:object_r:vendor_radio_prop:s0
+persist.vendor.asus.sim2.enabled                u:object_r:vendor_radio_prop:s0
+
+# SIM Card Present
+vendor.gsm.sim1.present                         u:object_r:radio_control_prop:s0
+vendor.gsm.sim2.present                         u:object_r:radio_control_prop:s0
+
+# Storage
+ro.vendor.atd.memvendor                       u:object_r:vendor_asus_storage_prop:s0
+ro.vendor.atd.datafmt                         u:object_r:vendor_asus_storage_prop:s0
+vendor.asus.storage.primary.size              u:object_r:vendor_asus_storage_prop:s0
+vendor.asus.storage.primary.health            u:object_r:vendor_asus_storage_prop:s0
+vendor.asus.storage.primary.healthtypeA       u:object_r:vendor_asus_storage_prop:s0
+vendor.asus.storage.primary.healthtypeB       u:object_r:vendor_asus_storage_prop:s0
+vendor.asus.storage.primary.vendor            u:object_r:vendor_asus_storage_prop:s0
+vendor.asus.update.storage.status             u:object_r:system_prop:s0
+vendor.asus.ddr_info                          u:object_r:vendor_asus_storage_prop_2:s0
+vendor.asus.storage.primary.status            u:object_r:vendor_asus_storage_prop_2:s0
+vendor.asus.storage.primary.type              u:object_r:vendor_asus_storage_prop_2:s0
+vendor.asus.storage.primary.ufs_info          u:object_r:vendor_asus_storage_prop_2:s0
+
+# Thermal
 persist.vendor.asus.foregroundapp                                 u:object_r:exported_system_prop:s0
-vendor.proximity.                                                 u:object_r:vendor_thermal_prop:s0
+ro.vendor.thermal                               u:object_r:vendor_thermal_prop:s0
 vendor.asus.foregroundapp                                         u:object_r:vendor_asus_prop:s0
+vendor.asus.thermal_config_id                   u:object_r:vendor_thermal_prop:s0
+vendor.proximity.                                                 u:object_r:vendor_thermal_prop:s0
 vendor.sys.enableDevPerfTHM                                       u:object_r:vendor_asus_prop:s0
 vendor.sys.asus.dongletype                                             u:object_r:vendor_asus_prop:s0
+vendor.thermal.dumpsys                          u:object_r:vendor_thermal_prop:s0
+vendor.thermal.                                 u:object_r:vendor_thermal_prop:s0
+vendor.thermal_                                 u:object_r:vendor_thermal_prop:s0
diff --git a/sepolicy/vendor/rild.te b/sepolicy/vendor/rild.te
new file mode 100644
index 0000000..be73435
--- /dev/null
+++ b/sepolicy/vendor/rild.te
@@ -0,0 +1,8 @@
+get_prop(rild, vendor_asus_sp_prop)
+
+set_prop(rild, vendor_radio_prop)
+
+# Allow to read/ write to proc asusevtlog
+allow rild vendor_proc_evt:file rw_file_perms;
+
+allow rild vendor_toolbox_exec:file execute_no_trans;
diff --git a/sepolicy/vendor/seapp_contexts b/sepolicy/vendor/seapp_contexts
new file mode 100644
index 0000000..67ecd4a
--- /dev/null
+++ b/sepolicy/vendor/seapp_contexts
@@ -0,0 +1 @@
+user=radio seinfo=platform name=.qtidataservices domain=vendor_qtidataservices_app type=radio_data_file
diff --git a/sepolicy/vendor/surfaceflinger.te b/sepolicy/vendor/surfaceflinger.te
index d4d514d..1225e25 100644
--- a/sepolicy/vendor/surfaceflinger.te
+++ b/sepolicy/vendor/surfaceflinger.te
@@ -1 +1,3 @@
 allow surfaceflinger asus_display_proc_exec:file rw_file_perms;
+
+allow surfaceflinger vendor_firmware_file:dir { read search };
diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te
index 5102da2..cee0797 100644
--- a/sepolicy/vendor/system_app.te
+++ b/sepolicy/vendor/system_app.te
@@ -7,3 +7,37 @@
 
 # Motor
 allow system_app vendor_motor_camera:file rw_file_perms;
+
+binder_call(system_app, hal_camera_default)
+
+allow system_app asus_laser_device:chr_file rw_file_perms;
+allow system_app asus_motor_device:chr_file rw_file_perms;
+
+# Allow system_app to find asus_bspcam_hwservice
+allow system_app asus_bspcam_hwservice:hwservice_manager find;
+
+# Allow system_app to read/write for display gestures and smart key
+allow system_app vendor_proc_graphics:file { rw_file_perms setattr };
+allow system_app vendor_sysfs_gestures:file { rw_file_perms setattr };
+
+allow system_app sysfs_hallsensor_file:file rw_file_perms;
+allow system_app sysfs_mcu_version:file {read getattr setattr open};
+
+# Allow motor app to read property
+get_prop(system_app, vendor_asus_prop)
+
+allow system_app self:netlink_kobject_uevent_socket { bind create getopt read setopt };
+
+allow system_app cache_file:lnk_file read;
+allow system_app cache_file:dir search;
+allow system_app log_file:file rw_file_perms;
+allow system_app log_file:dir { rw_dir_perms search };
+allow system_app bat_file:file r_file_perms;
+allow system_app bat_file:dir search;
+
+allow system_app vendor_sysfs_battery_supply:dir search;
+allow system_app vendor_sysfs_battery_supply:file { read getattr open };
+
+# Storage
+get_prop(system_app, vendor_asus_storage_prop)
+get_prop(system_app, vendor_asus_storage_prop_2)
diff --git a/sepolicy/vendor/system_server.te b/sepolicy/vendor/system_server.te
index c07aea6..c893f17 100644
--- a/sepolicy/vendor/system_server.te
+++ b/sepolicy/vendor/system_server.te
@@ -1,3 +1,18 @@
+# Battery
+allow system_server vendor_sysfs_battery_supply:file { read getattr open };
+
+# Camera
+allow system_server omni_data_file:file r_file_perms;
+
+# Allow system_server to read/write for display gestures and smart key
+allow system_server vendor_proc_graphics:file rw_file_perms;
+allow system_server vendor_sysfs_gestures:file { rw_file_perms setattr };
+allow system_server vendor_sysfs_sensors:file r_file_perms;
+
+allow system_server sysfs_hallsensor_file:file rw_file_perms;
+allow system_server vendor_proc_evt:file append;
+allow system_server vendor_proc_evt:file {ioctl read write getattr lock append map open watch watch_reads };
+
 # Display
 allow system_server asus_display_proc_exec:file rw_file_perms;
 
diff --git a/sepolicy/vendor/tee.te b/sepolicy/vendor/tee.te
new file mode 100644
index 0000000..6ae0d02
--- /dev/null
+++ b/sepolicy/vendor/tee.te
@@ -0,0 +1,2 @@
+allow tee mnt_vendor_file:dir w_dir_perms;
+allow tee mnt_vendor_file:file create_file_perms;
diff --git a/sepolicy/vendor/untrusted_app.te b/sepolicy/vendor/untrusted_app.te
new file mode 100644
index 0000000..a4cd064
--- /dev/null
+++ b/sepolicy/vendor/untrusted_app.te
@@ -0,0 +1,2 @@
+allow untrusted_app asus_laser_device:chr_file rw_file_perms;
+allow untrusted_app asus_motor_device:chr_file rw_file_perms;
diff --git a/sepolicy/vendor/vendor_hal_drm_widevine.te b/sepolicy/vendor/vendor_hal_drm_widevine.te
new file mode 100644
index 0000000..55bc1d4
--- /dev/null
+++ b/sepolicy/vendor/vendor_hal_drm_widevine.te
@@ -0,0 +1 @@
+set_prop(vendor_hal_drm_widevine, vendor_display_prop)
diff --git a/sepolicy/vendor/vendor_hal_gnss_qti.te b/sepolicy/vendor/vendor_hal_gnss_qti.te
new file mode 100644
index 0000000..a6353d8
--- /dev/null
+++ b/sepolicy/vendor/vendor_hal_gnss_qti.te
@@ -0,0 +1,6 @@
+use_vendor_per_mgr(vendor_hal_gnss_qti)
+allow vendor_hal_gnss_qti init:unix_stream_socket connectto;
+
+allow vendor_hal_gnss_qti vendor_proc_evt:file rw_file_perms;
+
+set_prop(vendor_hal_gnss_qti, vendor_gps_prop)
diff --git a/sepolicy/vendor/vendor_hal_perf_default.te b/sepolicy/vendor/vendor_hal_perf_default.te
index 68affb8..770d7a0 100644
--- a/sepolicy/vendor/vendor_hal_perf_default.te
+++ b/sepolicy/vendor/vendor_hal_perf_default.te
@@ -1,2 +1,6 @@
+set_prop(vendor_hal_perf_default, vendor_thermal_prop)
+allow vendor_hal_perf_default hal_camera_default:dir search;
+allow vendor_hal_perf_default hal_camera_default:file r_file_perms;
+
 allow vendor_hal_perf_default sysfs_thermal:file rw_file_perms;
 get_prop(vendor_hal_perf_default, vendor_asus_prop)
diff --git a/sepolicy/vendor/vendor_hvdcp.te b/sepolicy/vendor/vendor_hvdcp.te
new file mode 100644
index 0000000..a0c2386
--- /dev/null
+++ b/sepolicy/vendor/vendor_hvdcp.te
@@ -0,0 +1,2 @@
+get_prop(vendor_hvdcp, vendor_asus_prop)
+get_prop(vendor_hvdcp, vendor_health_prop)
diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te
index b5f3721..108d6fa 100644
--- a/sepolicy/vendor/vendor_init.te
+++ b/sepolicy/vendor/vendor_init.te
@@ -1 +1,24 @@
+allow vendor_init cgroup:file getattr;
+allow vendor_init vendor_proc_camera:file rw_file_perms;
+allow vendor_init asus_laser_device:chr_file {ioctl open read write };
+allow vendor_init asus_sensors_device:chr_file rw_file_perms;
+
 get_prop(vendor_init, asus_sensors_prop)
+
+set_prop(vendor_init, vendor_asus_sp_prop)
+
+get_prop(vendor_init, vendor_asus_prop)
+set_prop(vendor_init, vendor_asus_prop)
+
+get_prop(vendor_init, vendor_camera_prop)
+set_prop(vendor_init, vendor_camera_prop)
+
+set_prop(vendor_init, vendor_dts_audio_prop)
+set_prop(vendor_init, vendor_gx_fpd_prop)
+set_prop(vendor_init, vendor_health_prop)
+set_prop(vendor_init, vendor_thermal_prop)
+set_prop(vendor_init, vendor_wifi_prop)
+
+# Storage
+get_prop(vendor_init, vendor_asus_storage_prop_2)
+set_prop(vendor_init, vendor_asus_storage_prop_2)
diff --git a/sepolicy/vendor/vendor_location.te b/sepolicy/vendor/vendor_location.te
new file mode 100644
index 0000000..6eb5243
--- /dev/null
+++ b/sepolicy/vendor/vendor_location.te
@@ -0,0 +1 @@
+set_prop(vendor_location, vendor_gps_prop)
diff --git a/sepolicy/vendor/vendor_qtelephony.te b/sepolicy/vendor/vendor_qtelephony.te
new file mode 100644
index 0000000..1f6a2e2
--- /dev/null
+++ b/sepolicy/vendor/vendor_qtelephony.te
@@ -0,0 +1 @@
+set_prop(vendor_qtelephony, radio_control_prop)
diff --git a/sepolicy/vendor/vendor_qti_init_shell.te b/sepolicy/vendor/vendor_qti_init_shell.te
new file mode 100644
index 0000000..c00d68f
--- /dev/null
+++ b/sepolicy/vendor/vendor_qti_init_shell.te
@@ -0,0 +1,27 @@
+get_prop(vendor_qti_init_shell, vendor_gx_fpd_prop)
+set_prop(vendor_qti_init_shell, vendor_gx_fpd_prop);
+
+get_prop(vendor_qti_init_shell, vendor_ssr_prop)
+set_prop(vendor_qti_init_shell, vendor_ssr_prop)
+
+get_prop(vendor_qti_init_shell, vendor_asus_storage_prop)
+set_prop(vendor_qti_init_shell, vendor_asus_storage_prop)
+get_prop(vendor_qti_init_shell, vendor_asus_storage_prop_2)
+set_prop(vendor_qti_init_shell, vendor_asus_storage_prop_2)
+
+get_prop(vendor_qti_init_shell, vendor_asus_sp_prop)
+
+set_prop(vendor_qti_init_shell, ctl_start_prop)
+set_prop(vendor_qti_init_shell, ctl_stop_prop)
+set_prop(vendor_qti_init_shell, vendor_asus_prop)
+set_prop(vendor_qti_init_shell, vendor_asus_prop)
+
+allow vendor_qti_init_shell asus_block_device:chr_file rw_file_perms;
+r_dir_file(vendor_qti_init_shell, bat_file)
+r_dir_file(vendor_qti_init_shell, demoapp_file)
+
+allow vendor_qti_init_shell bat_file:dir setattr;
+allow vendor_qti_init_shell bat_file:file setattr;
+allow vendor_qti_init_shell demoapp_file:dir setattr;
+allow vendor_qti_init_shell demoapp_file:file r_file_perms;
+allow vendor_qti_init_shell demoapp_file:file setattr;
diff --git a/sepolicy/vendor/vendor_sensors.te b/sepolicy/vendor/vendor_sensors.te
new file mode 100644
index 0000000..4876d57
--- /dev/null
+++ b/sepolicy/vendor/vendor_sensors.te
@@ -0,0 +1,2 @@
+allow vendor_sensors mnt_vendor_file:file r_file_perms;
+r_dir_file(vendor_sensors, mnt_vendor_file)
diff --git a/sepolicy/vendor/vendor_sensors_qti.te b/sepolicy/vendor/vendor_sensors_qti.te
new file mode 100644
index 0000000..e021934
--- /dev/null
+++ b/sepolicy/vendor/vendor_sensors_qti.te
@@ -0,0 +1,3 @@
+allow vendor_sensors_qti vendor_persist_sensors_file:dir w_dir_perms;
+allow vendor_sensors_qti vendor_persist_sensors_file:fifo_file r_file_perms;
+allow vendor_sensors_qti vendor_persist_sensors_file:file create_file_perms;
diff --git a/sepolicy/vendor/vendor_thermal-engine.te b/sepolicy/vendor/vendor_thermal-engine.te
new file mode 100644
index 0000000..6e5e613
--- /dev/null
+++ b/sepolicy/vendor/vendor_thermal-engine.te
@@ -0,0 +1,13 @@
+get_prop(vendor_thermal-engine, vendor_camera_prop)
+set_prop(vendor_thermal-engine, vendor_camera_prop)
+
+set_prop(vendor_thermal-engine, vendor_thermal_prop)
+
+allow vendor_thermal-engine mnt_vendor_file:file { read write create getattr open execute_no_trans };
+allow vendor_thermal-engine self:capability fowner;
+allow vendor_thermal-engine vendor_proc_evt:file rw_file_perms;
+allow vendor_thermal-engine vendor_sysfs_battery_supply:file r_file_perms;
+allow vendor_thermal-engine vendor_toolbox_exec:file execute_no_trans;
+
+allow vendor_thermal-engine vendor_thermal-engine:capability {fowner sys_boot sys_nice };
+allow vendor_thermal-engine vendor_thermal-engine:socket { ioctl create read write };
diff --git a/sepolicy/vendor/vendor_wcnss_service.te b/sepolicy/vendor/vendor_wcnss_service.te
new file mode 100644
index 0000000..9f0c3b8
--- /dev/null
+++ b/sepolicy/vendor/vendor_wcnss_service.te
@@ -0,0 +1 @@
+get_prop(vendor_wcnss_service, vendor_wifi_prop)
diff --git a/system.prop b/system.prop
index 19ee096..fc90e71 100644
--- a/system.prop
+++ b/system.prop
@@ -156,6 +156,10 @@
 external_storage.cross_user.enabled=1
 
 ro.vendor.qti.va_aosp.support=1
+
+# Common Add-on
+sys.vendor.qti.servicetracker.disable=true
+
 ####################################
 # from variable PRODUCT_SYSTEM_DEFAULT_PROPERTIES
 ####################################
diff --git a/system_ext.prop b/system_ext.prop
new file mode 100644
index 0000000..75d8aea
--- /dev/null
+++ b/system_ext.prop
@@ -0,0 +1,3 @@
+#Expose aux camera for below packages
+vendor.camera.aux.packagelist=org.omnirom.snap,com.googlecamera.wichaya,com.asus.camera
+persist.vendor.camera.privapp.list=com.asus.camera