diff --git a/Android.mk b/Android.mk index 4124272..571419a 100644 --- a/Android.mk +++ b/Android.mk @@ -15,7 +15,7 @@ LOCAL_PATH := $(call my-dir) -ifeq ($(TARGET_DEVICE),apollo) +ifeq ($(TARGET_DEVICE),akari) subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH)) $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk))) endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk index ade242b..f350812 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -14,9 +14,9 @@ # limitations under the License. PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/lineage_apollo.mk + $(LOCAL_DIR)/lineage_akari.mk COMMON_LUNCH_CHOICES := \ - lineage_apollo-user \ - lineage_apollo-userdebug \ - lineage_apollo-eng + lineage_akari-user \ + lineage_akari-userdebug \ + lineage_akari-eng diff --git a/BoardConfig.mk b/BoardConfig.mk index d553289..fef712c 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -7,25 +7,26 @@ # Inherit from tama-common -include device/sony/tama-common/BoardConfigCommon.mk -DEVICE_PATH := device/sony/apollo +DEVICE_PATH := device/sony/akari # Assert -TARGET_OTA_ASSERT_DEVICE := apollo +TARGET_OTA_ASSERT_DEVICE := akari # Crypto TARGET_HW_DISK_ENCRYPTION := true # Display -TARGET_SCREEN_DENSITY := 480 +TARGET_SCREEN_DENSITY := 440 # Kernel -TARGET_KERNEL_CONFIG := tama_apollo_defconfig +TARGET_KERNEL_CONFIG := tama_akari_defconfig # HIDL DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml # Partitions -BOARD_USERDATAIMAGE_PARTITION_SIZE := 51448807424 +# Reserve space for data encryption (44712771584-16384) +BOARD_USERDATAIMAGE_PARTITION_SIZE := 44712755200 # Properties TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop @@ -35,4 +36,4 @@ TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop BOARD_VNDK_RUNTIME_DISABLE := true # Inherit from the proprietary version --include vendor/sony/apollo/BoardConfigVendor.mk +-include vendor/sony/akari/BoardConfigVendor.mk diff --git a/README.md b/README.md index 0507824..7926046 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,36 @@ -Copyright (C) 2019 The LineageOS Project +# Device Tree for Xperia XZ2 (akari) + By Sjll +The Xperia (codenamed _"akari"_) is a smartphone from Sony Mobile. +It was released in 2018. -Device configuration for Sony Xperia XZ2 Compact -========================================= +| Basic | Spec Sheet | +| -----------------------:|:------------------------------------------------------------------------------------------------------------------------------ | +| CPU | Octa-core (4x2.8 GHz Kryo 385 Gold & 4x1.7 GHz Kryo 385 Silver) | +| Chipset | Qualcomm SDM845 Snapdragon 845 | +| GPU | Adreno 630 | +| Memory | 4/6 GB RAM | +| Shipped Android Version | 8.1 | +| Storage | 64 GB | +| Battery | Non-removable Li-Po 3180 mAh battery | +| Display | Toppest LCD, 1080 x 2160 pixels, 18:9 ratio (~424 ppi density) | +| Camera (Back) | 19 MP (f/2.0, 25mm, 1/2.3", 1.22 µm), gyro EIS, predictive phase detection and laser AF, LED flash, 4K at 30fps, 1080p at 30, 60fps or 960fps | +| Camera (Front) | 5 MP (f/2.2, 1/5"), gyro EIS, 1080p | -The Sony Xperia XZ2 Compact (codenamed _"apollo"_) is a high-end smartphone from Sony. +Copyright 2018 - The LineageOS Project. -It was announced in July 2019. Release date was August 2019. +![Xperia XZ2](https://images-na.ssl-images-amazon.com/images/I/71nC8hZVTIL._SL1500_.jpg "Xperia XZ2") -## Device specifications -Basic | Spec Sheet --------:|:------------------------- -SoC | Qualcomm SDM845 Snapdragon 845 -CPU | Octa-core (4x2.8 GHz Kryo 385 Gold & 4x1.8 GHz Kryo 385 Silver) -GPU | Adreno 630 -Memory | 4 GB RAM -Shipped Android Version | 8.0 -Storage | 64 GB -Battery | Non-removable Li-Ion 3400 mAh battery -Display | 1080 x 2160 pixels, 18:9 ratio, 5.99 inches, IPS LCD (~403 ppi density) -Camera | Dual 12 MP, 4-axis OIS, 2x optical zoom, dual PDAF, dual-LED (dual tone) flash +## Temporary build instructions -## Device picture +``` +# Compiling +$ m[ake|ka] bootimage systemimage + +# Installing +$ fastboot --disable-verity --disable-verification flash vbmeta stock_vbmeta.img +$ fastboot flash boot boot.img +$ fastboot flash system system.img +$ fastboot -w reboot +``` -![Sony Xperia XZ2 Compact](https://www.cellphoneage.com/pub/media/catalog/product/cache/207e23213cf636ccdef205098cf3c8a3/x/p/xperia_xz2_compact_dual_1600x1600.jpg "Sony Xperia XZ2 Compact") diff --git a/audio/audio_platform_info.xml b/audio/audio_platform_info.xml index c8cf13d..f699eb2 100644 --- a/audio/audio_platform_info.xml +++ b/audio/audio_platform_info.xml @@ -235,13 +235,13 @@ + responses="-0.84 -0.76 -0.68 -0.60 -0.52 -0.45 -0.36 -0.27 -0.17 -0.09 -0.01 0.06 0.08 0.11 0.14 0.16 0.19 0.22 0.25 0.35 0.42 0.52 0.61 0.69 0.53 0.38 0.24 0.19 0.37 0.58 0.77 1.15 1.42 1.49 1.03 0.59 1.32 1.88 1.59 1.19 0.45 0.47 1.42 1.43 1.23 1.01 1.87 2.48 0.81 1.71 0.49 -0.08 -0.40 -1.51 -2.00 -1.17 0.22 1.10 1.15 1.64 2.25 2.15 1.31 0.83 0.82 1.05 0.60 0.14 1.01 2.19 1.74 1.26 0.76 1.27 1.35 0.44 2.70 3.44 3.11 1.01 0.35 -0.99 -0.82 -0.17 0.26 -0.57 1.18 -0.94 -5.29 2.35 3.65 2.56 2.99" + sensitivity="-37.0" max_spl="130.0" min_spl="29.0" orientation="0.0 -1.0 0.0" geometric_location="0.02471 0.000 0.007474" /> + responses="-0.66 -0.59 -0.53 -0.47 -0.41 -0.34 -0.28 -0.20 -0.13 -0.06 0.00 0.05 0.06 0.06 0.07 0.07 0.08 0.08 0.09 0.02 -0.03 -0.09 -0.15 -0.21 -0.23 -0.25 -0.28 -0.27 -0.22 -0.15 -0.09 -0.07 -0.07 -0.04 0.02 0.08 0.10 0.10 -0.08 -0.17 -0.06 0.00 0.00 0.07 0.10 0.09 0.17 -0.42 -0.54 -0.86 -0.80 -0.40 -0.50 -0.46 -0.51 -0.17 0.79 0.82 0.66 -0.04 0.08 -0.17 0.51 1.15 0.83 1.96 1.59 2.05 1.92 1.84 1.61 2.36 2.22 2.31 2.40 1.24 1.84 3.03 3.94 2.30 2.94 3.20 2.71 3.95 2.70 -0.88 -1.50 1.11 5.07 2.80 5.53 4.62 2.68" + sensitivity="-37.0" max_spl="130.0" min_spl="29.0" orientation="0.0 1.0 0.0" geometric_location="0.04986 0.15279 0.007474" /> diff --git a/device.mk b/device.mk index 080c468..17c059f 100644 --- a/device.mk +++ b/device.mk @@ -7,7 +7,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_o_mr1.mk) # Get non-open-source specific aspects -$(call inherit-product-if-exists, vendor/sony/apollo/apollo-vendor.mk) +$(call inherit-product-if-exists, vendor/sony/akari/akari-vendor.mk) # Boot animation TARGET_SCREEN_HEIGHT := 2160 diff --git a/extract-files.sh b/extract-files.sh index f33a397..9e3aa0c 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -14,7 +14,7 @@ fi set -e # Required! -export DEVICE=apollo +export DEVICE=akari export DEVICE_COMMON=tama-common export VENDOR=sony diff --git a/idc/clearpad.idc b/idc/clearpad.idc index ddfd4d7..1214f1f 100644 --- a/idc/clearpad.idc +++ b/idc/clearpad.idc @@ -2,4 +2,4 @@ touch.deviceType = touchScreen # Pressure -touch.pressure.scale = 0.009 +touch.pressure.scale = 0.007 diff --git a/idc/synaptics_tcm_touch.idc b/idc/synaptics_tcm_touch.idc index c404c9c..ebbc38d 100644 --- a/idc/synaptics_tcm_touch.idc +++ b/idc/synaptics_tcm_touch.idc @@ -38,4 +38,4 @@ touch.size.scale = 1 touch.size.bias = 0 touch.size.isSummed = 0 -touch.pressure.scale = 0.008 +touch.pressure.scale = 0.007 diff --git a/lineage_apollo.mk b/lineage_akari.mk similarity index 60% rename from lineage_apollo.mk rename to lineage_akari.mk index daea860..a39df9c 100644 --- a/lineage_apollo.mk +++ b/lineage_akari.mk @@ -4,23 +4,23 @@ # SPDX-License-Identifier: Apache-2.0 # -# Inherit from apollo device -$(call inherit-product, device/sony/apollo/device.mk) +# Inherit from akari device +$(call inherit-product, device/sony/akari/device.mk) # Inherit some common Lineage stuff. $(call inherit-product, vendor/lineage/config/common_full_phone.mk) -PRODUCT_NAME := lineage_apollo -PRODUCT_DEVICE := apollo +PRODUCT_NAME := lineage_akari +PRODUCT_DEVICE := akari PRODUCT_MANUFACTURER := Sony PRODUCT_BRAND := Sony -PRODUCT_MODEL := Xperia XZ2 Compact +PRODUCT_MODEL := Xperia XZ2 PRODUCT_GMS_CLIENTID_BASE := android-sony-mobile PRODUCT_BUILD_PROP_OVERRIDES += \ - PRODUCT_DEVICE="H8324" \ - PRODUCT_NAME="H8324" \ + PRODUCT_DEVICE="H8296" \ + PRODUCT_NAME="H8296" \ PRIVATE_BUILD_DESC="10/52.1.A.0.618/052001A000061802006556692:user/release-keys" -BUILD_FINGERPRINT := Sony/H8324/H8324:10/52.1.A.0.618/052001A000061802006556692:user/release-keys +BUILD_FINGERPRINT := Sony/H8296/H8296:10/52.1.A.0.618/052001A000061802006556692:user/release-keys diff --git a/nfc/libnfc-nxp.conf b/nfc/libnfc-nxp.conf index 932e826..a6aefb9 100644 --- a/nfc/libnfc-nxp.conf +++ b/nfc/libnfc-nxp.conf @@ -69,7 +69,7 @@ NXP_EXT_TVDD_CFG=0x01 ############################################################################### #config1:SLALM, 3.3V for both RM and CM -NXP_EXT_TVDD_CFG_1={20, 02, 0F, 01, A0, 0E, 0B, 31, 01, 01, 31, 00, 00, 00, 80, 00, 10, 0C} +NXP_EXT_TVDD_CFG_1={20, 02, 0F, 01, A0, 0E, 0B, 31, 01, 01, 31, 00, 00, 00, 10, 00, 10, 0C} ############################################################################### #config2: use DCDC in CE, use Tx_Pwr_Req, set CFG2 mode, SLALM, diff --git a/nfc/libnfc-nxp_RF.conf b/nfc/libnfc-nxp_RF.conf index f7d6215..70b15fb 100644 --- a/nfc/libnfc-nxp_RF.conf +++ b/nfc/libnfc-nxp_RF.conf @@ -29,7 +29,7 @@ NXP_RF_CONF_BLK_1={ A0, 0D, 06, 48, 44, 65, 0A, 00, 00, A0, 0D, 06, 48, 2D, 15, 34, 1F, 01, A0, 0D, 06, 46, 4A, 34, 07, 00, 07, - A0, 0D, 04, 46, 42, 70, 40, + A0, 0D, 04, 46, 42, 80, 40, A0, 0D, 06, 4C, 44, 65, 09, 00, 00, A0, 0D, 06, 4C, 2D, 05, 35, 1E, 01, A0, 0D, 06, 4A, 4A, 43, 07, 01, 07 @@ -49,11 +49,11 @@ NXP_RF_CONF_BLK_2={ A0, 0D, 06, 54, 2D, 05, 25, 0F, 01, A0, 0D, 04, 52, 42, 70, 40, A0, 0D, 06, 52, 4A, 11, 07, 01, 07, - A0, 0D, 06, 58, 44, 55, 08, 00, 00, + A0, 0D, 06, 58, 44, 66, 08, 00, 00, A0, 0D, 06, 5E, 2D, 0D, 5A, 0C, 01, - A0, 0D, 06, 5E, 44, 55, 08, 00, 00, - A0, 0D, 04, 56, 42, 78, 40, - A0, 0D, 04, 5C, 42, 78, 40, + A0, 0D, 06, 5E, 44, 66, 08, 00, 00, + A0, 0D, 04, 56, 42, 88, 40, + A0, 0D, 04, 5C, 42, 88, 40, A0, 0D, 06, 5C, 4A, 11, 07, 01, 07, A0, 0D, 06, 30, 44, 05, 04, C4, 00, A0, 0D, 06, 30, 85, 25, 03, 00, 00, @@ -84,23 +84,23 @@ NXP_RF_CONF_BLK_3={ A0, 0D, 06, CA, 44, 65, 0A, 00, 00, A0, 0D, 06, CA, 2D, 15, 34, 1F, 01, A0, 0D, 06, 06, 42, 00, 03, FF, FF, - A0, 0D, 03, 24, 03, 7F, + A0, 0D, 03, 24, 03, 80, A0, 0D, 06, 04, 42, F8, 40, FF, FF, - A0, 0D, 06, 06, 37, 28, 76, 00, 00 + A0, 0D, 06, 06, 37, 08, 76, 00, 00 } ############################################################################### # NXP RF configuration ALM/PLM settings # This section needs to be updated with the correct values based on the platform NXP_RF_CONF_BLK_4={ - 20, 02, D6, 01, A0, 34, D2, 23, 04, 18, 45, 40, - 00, 00, 00, 02, - AD, 41, 33, 02, - CE, 02, 29, 02, - B0, 04, 29, 02, - D9, 07, 08, 02, - 3E, 04, 38, 02, - 06, 07, 38, 02, +20, 02, D6, 01, A0, 34, D2, 23, 04, 18, 47, 40, + 00, 00, 30, 00, + 32, 00, 30, 00, + 4B, 00, 30, 00, + 78, 00, 30, 00, + 04, 01, 08, 00, + B3, 01, 08, 00, + 58, 02, 08, 00, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, @@ -111,14 +111,14 @@ NXP_RF_CONF_BLK_4={ 00, 00, 68, 00, 00, 00, 18, 00, 00, 00, 08, 02, 00, 00, 00, 00, 00, 00, 00, 00, - 45, - 00, 00, 00, 02, - AD, 41, 33, 02, - CE, 02, 2B, 02, - B0, 04, 2B, 02, - D9, 07, 09, 02, - 3E, 04, 38, 02, - 06, 07, 38, 02, + 47, + 00, 00, 30, 00, + 32, 00, 30, 00, + 4B, 00, 30, 00, + 78, 00, 30, 00, + 04, 01, 08, 00, + B3, 01, 08, 00, + 58, 02, 08, 00, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, @@ -179,20 +179,20 @@ NXP_RF_CONF_BLK_5={ # SWP1A interface A0D4 # DWP intf behavior config, SVDD Load activated by default if set to 0x31 - A037 # For Symmetric baud rate UICC's set A086 to 77 -NXP_CORE_CONF_EXTN={20, 02, 6F, 0F, +NXP_CORE_CONF_EXTN={20, 02, 77, 11, A0, EC, 01, 01, A0, ED, 01, 00, A0, 5E, 01, 01, A0, 12, 01, 02, A0, 40, 01, 01, - A0, 41, 01, 04, + A0, 41, 01, 03, A0, 43, 01, 00, A0, DD, 01, 2D, A0, D1, 01, 02, A0, D4, 01, 00, A0, 37, 01, 11, A0, 07, 01, 03, - A0, B1, 02, E0, 15, + A0, B1, 02, 5C, 12, A0, A9, 32, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, @@ -204,6 +204,8 @@ NXP_CORE_CONF_EXTN={20, 02, 6F, 0F, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, + A0, 02, 01, 01, + A0, 03, 01, 01, A0, 86, 01, 77 } # A0, F2, 01, 01, @@ -233,7 +235,7 @@ NXP_CORE_CONF={ 20, 02, 39, 0F, 81, 01, 01, 82, 01, 0E, 18, 01, 01, - A0, 3A, 08, 64, 00, 64, 00, 64, 00, 64, 00 + A0, 3A, 08, 32, 00, 32, 00, 32, 00, 1E, 00 } ############################################################################### diff --git a/proprietary-files.txt b/proprietary-files.txt index 37f0bcb..70f7bad 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -543,8 +543,8 @@ vendor/lib/libscvePanorama.so vendor/lib/libscveScan3D.so # Display calibration -vendor/etc/qdcm_calib_data_4.xml -vendor/etc/qdcm_calib_data_8.xml +vendor/etc/qdcm_calib_data_3.xml +vendor/etc/qdcm_calib_data_7.xml vendor/etc/qdcm_calib_data_Dual_nt35597_cmd_mode_dsi_truly_panel_without_DSC.xml vendor/etc/qdcm_calib_data_Dual_nt35597_video_mode_dsi_truly_panel_without_DSC.xml vendor/etc/qdcm_calib_data_Dual_nt36850_cmd_mode_dsi_truly_panel_without_DSC.xml @@ -747,8 +747,8 @@ vendor/bin/hw/touchbacklightd vendor/etc/init/init.touchbacklightd.rc # Touch firmware -vendor/firmware/touch_module_id_0x30.img -vendor/firmware/touch_module_id_0x31.img +vendor/firmware/touch_module_id_0x20.img +vendor/firmware/touch_module_id_0x21.img # WiFi vendor/etc/wifi/bdwlan.bin diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 58694b5..4e71c82 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -8,7 +8,7 @@ set -e # Required! -export DEVICE=apollo +export DEVICE=akari export DEVICE_COMMON=tama-common export VENDOR=sony diff --git a/system.prop b/system.prop index a9f6477..17335c6 100644 --- a/system.prop +++ b/system.prop @@ -2,13 +2,13 @@ camera.disable_zsl_mode=1 # SEMC -ro.semc.ms_type_id=PM-1130-BV -ro.semc.product.device=H83 -ro.semc.product.model=H8324 -ro.semc.product.name=Xperia XZ2 Compact +ro.semc.ms_type_id=PM-1119-BV +ro.semc.product.device=H82 +ro.semc.product.model=H8296 +ro.semc.product.name=Xperia XZ2 ro.semc.version.fs=GENERIC -ro.semc.version.fs_revision=52.1.A.0.618 -ro.semc.version.sw=1311-5320 -ro.semc.version.sw_revision=52.1.A.0.618 +ro.semc.version.fs_revision=52.1.A.0.532 +ro.semc.version.sw=1311-7920 +ro.semc.version.sw_revision=52.1.A.0.532 ro.semc.version.sw_type=user -ro.semc.version.sw_variant=GLOBAL-A2 +ro.semc.version.sw_variant=GLOBAL4GB-C2