Skip to content

Commit

Permalink
inital support for Xperia XA2 (nile board)
Browse files Browse the repository at this point in the history
Signed-off-by: Alin Jerpelea <[email protected]>
  • Loading branch information
jerpelea committed Jan 30, 2018
1 parent d1e9f2f commit a3932a1
Show file tree
Hide file tree
Showing 28 changed files with 4,850 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#
# This empty Android.mk file exists to prevent the build system from
# automatically including any other Android.mk files under this directory.
#
17 changes: 17 additions & 0 deletions AndroidProducts.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2014 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.

PRODUCT_MAKEFILES := $(LOCAL_DIR)/aosp_h3113.mk \
$(LOCAL_DIR)/aosp_h4113.mk

33 changes: 33 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2014 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.

include device/sony/nile/PlatformConfig.mk

TARGET_BOOTLOADER_BOARD_NAME := H3113

# Platform
PRODUCT_PLATFORM := nile

# NFC
NXP_CHIP_TYPE := PN553
NXP_CHIP_FW_TYPE := PN553

BOARD_KERNEL_CMDLINE += androidboot.hardware=pioneer

# Partition information
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_CACHEIMAGE_PARTITION_SIZE := 398458880
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3011510272
# Reserve space for data encryption (16986931200-16384)
BOARD_USERDATAIMAGE_PARTITION_SIZE := 16986914816
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# device-sony-pioneer
Copyright (C) Sony Mobile Communications 2017
=============================================

This is the Android device configuration for Xperia XA2 (nile platform).

Build instructions
https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/
26 changes: 26 additions & 0 deletions aosp_h3113.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2014 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.

TARGET_KERNEL_CONFIG := aosp_nile_pioneer_defconfig

# Inherit from those products. Most specific first.
$(call inherit-product, device/sony/pioneer/device.mk)
$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)

PRODUCT_NAME := aosp_h3113
PRODUCT_DEVICE := pioneer
PRODUCT_MODEL := Xperia XA2 (AOSP)
PRODUCT_BRAND := Sony
PRODUCT_MANUFACTURER := Sony
28 changes: 28 additions & 0 deletions aosp_h4113.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2014 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.

# Inherit from those products. Most specific first.
$(call inherit-product, device/sony/pioneer/aosp_h3113.mk)

# DualSim
PRODUCT_PROPERTY_OVERRIDES += \
persist.multisim.config=dsds \
persist.radio.multisim.config=dsds \
ro.telephony.default_network=9,1

PRODUCT_NAME := aosp_h4113
PRODUCT_DEVICE := pioneer
PRODUCT_MODEL := Xperia XA2 Dual (AOSP)
PRODUCT_BRAND := Sony
PRODUCT_MANUFACTURER := Sony
111 changes: 111 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Copyright 2014 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.

# Device path
DEVICE_PATH := device/sony/pioneer/rootdir

DEVICE_PACKAGE_OVERLAYS += \
device/sony/pioneer/overlay

# Device Specific Permissions
PRODUCT_COPY_FILES := \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml

# Sensors Configuration
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/etc/sensors/sensor_def_qcomdev.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/sensor_def_qcomdev.conf

# Thermal Configuration
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/etc/thermanager.xml:$(TARGET_COPY_OUT_VENDOR)/etc/thermanager.xml

# Camera Configuration
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/etc/camera/camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/camera/camera_config.xml \
$(DEVICE_PATH)/vendor/etc/camera/imx219_chromatix.xml:$(TARGET_COPY_OUT_VENDOR)/etc/camera/imx219_chromatix.xml \
$(DEVICE_PATH)/vendor/etc/camera/imx300_chromatix.xml:$(TARGET_COPY_OUT_VENDOR)/etc/camera/imx300_chromatix.xml

# Audio Configuration
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/etc/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \
$(DEVICE_PATH)/vendor/etc/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml

# Audio calibration
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/etc/acdbdata/Bluetooth_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Bluetooth_cal.acdb \
$(DEVICE_PATH)/vendor/etc/acdbdata/General_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/General_cal.acdb \
$(DEVICE_PATH)/vendor/etc/acdbdata/Global_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Global_cal.acdb \
$(DEVICE_PATH)/vendor/etc/acdbdata/Handset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Handset_cal.acdb \
$(DEVICE_PATH)/vendor/etc/acdbdata/Hdmi_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Hdmi_cal.acdb \
$(DEVICE_PATH)/vendor/etc/acdbdata/Headset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Headset_cal.acdb \
$(DEVICE_PATH)/vendor/etc/acdbdata/Speaker_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Speaker_cal.acdb

# NFC Configuration
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/etc/libnfc-brcm.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm.conf \
$(DEVICE_PATH)/vendor/etc/libnfc-nxp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nxp.conf

# BT/Wifi patch file
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vendor/firmware/wlan/qca_cld/bdwlan.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/bdwlan.bin

# Device Init
PRODUCT_PACKAGES += \
fstab.pioneer \
init.recovery.pioneer \
init.pioneer \
ueventd.pioneer

# Lights
PRODUCT_PACKAGES += \
lights.pioneer

# Simple PowerHAL
PRODUCT_PACKAGES += \
power.pioneer

# Fingerprint HAL
PRODUCT_PACKAGES += \
fingerprintd \
fingerprint.pioneer

# NFC config
PRODUCT_PACKAGES += \
nfc_nci.pioneer

# Telephony Packages (AOSP)
PRODUCT_PACKAGES += \
InCallUI \
Stk

PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREBUILT_DPI := xxhdpi xhdpi hdpi
PRODUCT_AAPT_PREF_CONFIG := xxhdpi

PRODUCT_PROPERTY_OVERRIDES := \
ro.sf.lcd_density=480 \
ro.usb.pid_suffix=1F3

# Inherit from those products. Most specific first.
$(call inherit-product, device/sony/nile/platform.mk)

# copy NFC firmware
$(call inherit-product-if-exists, vendor/nxp/nxp-vendor.mk)

# include board vendor blobs
$(call inherit-product-if-exists, vendor/sony/nile-common/nile-partial.mk)

# include optional vendor configuration
$(call inherit-product-if-exists, vendor/qcom/proprietary/common/build/qcom-packages.mk)
96 changes: 96 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?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. Do not translate. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N 1 zones as follows:
Zone 0: 0 <= LUX < array[0]
Zone 1: array[0] <= LUX < array[1]
...
Zone N: array[N - 1] <= LUX < array[N]
Zone N + 1 array[N] <= LUX < infinity
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>64</item>
<item>128</item>
<item>170</item>
<item>220</item>
<item>256</item>
<item>384</item>
<item>512</item>
<item>768</item>
<item>1024</item>
<item>1536</item>
<item>2048</item>
<item>4096</item>
</integer-array>

<!-- Array of output values for LCD backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>10</item> <!-- 0 -->
<item>32</item> <!-- 64 -->
<item>64</item> <!-- 128 -->
<item>80</item> <!-- 170 -->
<item>96</item> <!-- 220 -->
<item>112</item> <!-- 256 -->
<item>128</item> <!-- 384 -->
<item>144</item> <!-- 512 -->
<item>176</item> <!-- 768 -->
<item>196</item> <!-- 1024 -->
<item>208</item> <!-- 1536 -->
<item>224</item> <!-- 2048 -->
<item>255</item> <!-- 4096 -->
</integer-array>

<!-- Minimum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness below this level. -->
<integer name="config_screenBrightnessSettingMinimum">10</integer>

<!-- Screen brightness used to dim the screen while dozing in a very low power state.
May be less than the minimum allowed brightness setting
that can be set by the user. -->
<integer name="config_screenBrightnessDoze">5</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>

<!-- Minimum allowable screen brightness to use in a very dark room.
This value sets the floor for the darkest possible auto-brightness
adjustment. It is expected to be somewhat less than the first entry in
config_autoBrightnessLcdBacklightValues so as to allow the user to have
some range of adjustment to dim the screen further than usual in very
dark rooms. The contents of the screen must still be clearly visible
in darkness (although they may not be visible in a bright room). -->
<integer name="config_screenBrightnessDark">5</integer>

<!-- Whether device supports double tap to wake -->
<bool name="config_supportDoubleTapWake">false</bool>

<!-- MMS user agent prolfile url -->
<string name="config_mms_user_agent_profile_url" translatable="false">http://uaprof.sonymobile.com/H3113R5001.xml</string>
</resources>
Loading

0 comments on commit a3932a1

Please sign in to comment.