diff --git a/Android.mk b/Android.mk index 091c61c..b50036c 100644 --- a/Android.mk +++ b/Android.mk @@ -15,7 +15,7 @@ LOCAL_PATH := $(call my-dir) -ifneq ($(filter nx511j,$(TARGET_DEVICE)),) +ifneq ($(filter nx512j,$(TARGET_DEVICE)),) include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 8671f19..9d3d61b 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -14,4 +14,4 @@ # limitations under the License. PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/full_nx511j.mk + $(LOCAL_DIR)/full_nx512j.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index 78c1f10..2ae55c4 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -14,10 +14,10 @@ # limitations under the License. # Properties -TARGET_OTA_ASSERT_DEVICE := NX511J,nx511j +TARGET_OTA_ASSERT_DEVICE := NX512J,nx512j -VENDOR_PATH := device/nubia/nx511j -include device/nubia/nx511j/board/*.mk +VENDOR_PATH := device/nubia/nx512j +include device/nubia/nx512j/board/*.mk # Inherit from proprietary files --include vendor/nubia/nx511j/BoardConfigVendor.mk +-include vendor/nubia/nx512j/BoardConfigVendor.mk diff --git a/README.md b/README.md index 4c97e61..9fb8f73 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ - Resurrection Remix 6.0 (Android 8.1 Oreo) device configuration for -ZTE Nubia Z9 Mini NX511J +ZTE Nubia Z9 Max NX512J ===================================== Basic | Spec Sheet @@ -9,15 +8,15 @@ Basic | Spec Sheet Processor | Qualcomm® Snapdragon™ 615 processor(MSM8939) Quad-core ARM® Cortex™ A53, Quad-core ARM® Cortex™ A53, 64 bit GPU | Adreno 405 graphic processor,550MHz RAM | 2GB 64-bit dual channel LPDDR4 1600MHz 2x32 (25.6GBps) -Shipped Android Version | 5.1 +Shipped Android Version | 5.0.1 Storage | 16 GB eMMC 5.0 MicroSD | Up to 128 GB -Battery | 3000 mAh (non-removable) -Display | 1080 x 1920 pixels, 5.0" SHARP IPS +Battery | 2900 mAh (non-removable) +Display | 1080 x 1920 pixels, 5.5" Rear Camera | 16.0 MP, LED flash, Sony® IMAX234 Exmor RS™ stacked image sensor, 1080P HD video recording Front Camera | 8.0 MP, Sony ®IMAX179 Exmor R™ back-illuminated image, Sapphire glass IR filter Release Date | March 2015 -![ZTE Nubia Z9 Mini](http://static.nubia.cn/product/max/images/params/params_z9max02.jpg "ZTE Nubia Z9 Mini") +![ZTE Nubia Z9 Max](http://static.nubia.cn/product/max/images/params/params_z9max02.jpg "ZTE Nubia Z9 Max") P.S. After "lunch", check the availability of repositories in your work directory, specified in rr.dependencies, and add them manually, if they are missing. diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h index 3126d0a..fe1a472 100644 --- a/bluetooth/bdroid_buildcfg.h +++ b/bluetooth/bdroid_buildcfg.h @@ -17,7 +17,7 @@ #ifndef _BDROID_BUILDCFG_H #define _BDROID_BUILDCFG_H -#define BTM_DEF_LOCAL_NAME "Nubia Z9 mini" +#define BTM_DEF_LOCAL_NAME "Z9MAX" #define BLUETOOTH_QTI_SW TRUE #define BLE_VND_INCLUDED TRUE #endif diff --git a/board/bluetooth.mk b/board/bluetooth.mk index 9d27648..dd8ce2d 100644 --- a/board/bluetooth.mk +++ b/board/bluetooth.mk @@ -1,2 +1,2 @@ # Bluetooth -BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/nubia/nx511j/bluetooth +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/nubia/nx512j/bluetooth diff --git a/board/kernel.mk b/board/kernel.mk index fbfa30e..1936ba7 100644 --- a/board/kernel.mk +++ b/board/kernel.mk @@ -6,8 +6,8 @@ BOARD_KERNEL_PAGESIZE := 2048 BOARD_KERNEL_SEPARATED_DT := true BOARD_KERNEL_TAGS_OFFSET := 0x01E00000 BOARD_RAMDISK_OFFSET := 0x02000000 -TARGET_KERNEL_SOURCE := kernel/nubia/nx511j +TARGET_KERNEL_SOURCE := kernel/nubia/nx512j ENABLE_CPUSETS := true BOARD_KERNEL_IMAGE_NAME := Image-dtb -TARGET_KERNEL_CONFIG := lineageos_nx511j_defconfig +TARGET_KERNEL_CONFIG := lineageos_nx512j_defconfig LZMA_RAMDISK_TARGETS := recovery diff --git a/board/qcom-sepolicy.mk b/board/qcom-sepolicy.mk index 3fc2851..fc67412 100644 --- a/board/qcom-sepolicy.mk +++ b/board/qcom-sepolicy.mk @@ -3,5 +3,5 @@ include device/qcom/sepolicy/sepolicy.mk include device/qcom/sepolicy/legacy-sepolicy.mk BOARD_SEPOLICY_DIRS += \ - device/nubia/nx511j/sepolicy + device/nubia/nx512j/sepolicy diff --git a/board/recovery.mk b/board/recovery.mk index f5e54ba..da7d019 100644 --- a/board/recovery.mk +++ b/board/recovery.mk @@ -1,5 +1,5 @@ # Recovery TARGET_RECOVERY_DENSITY := xxhdpi -TARGET_RECOVERY_FSTAB := device/nubia/nx511j/rootdir/etc/fstab.full +TARGET_RECOVERY_FSTAB := device/nubia/nx512j/rootdir/etc/fstab.full TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888 TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_cm diff --git a/configs/nfc/libnfc-brcm-20795a10.conf b/configs/nfc/libnfc-brcm-20795a10.conf new file mode 100644 index 0000000..4df9c2b --- /dev/null +++ b/configs/nfc/libnfc-brcm-20795a10.conf @@ -0,0 +1,39 @@ +############################################################################### +# Firmware patch file +# If the value is not set then patch download is disabled. +FW_PATCH="/vendor/firmware/BCM20795A1_001.002.012.0003.0104_Generic_I2C_NCD_Unsigned_configdata.ncd" + +############################################################################### +# Firmware pre-patch file (sent before the above patch file) +# If the value is not set then pre-patch is not used. +FW_PRE_PATCH="" + +############################################################################### +# LPTD mode configuration +LPTD_CFG={66:B9:64:01:00:FF:FF:50:00:8B:13:00:10:00:5C:00:00:00:00:00:FF:00:00:00:FF:0C:00:04:00:00:00:00:03:00:00:00:03:00:0C:00:00:0D:00:00:00:00:00:00:00:00:00:00:33:23:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:02:53:3B:0F:00:00:00:00:00:00:00:00:00:00:00:00:04:00:00:00:00:00:00:00} + +############################################################################### +# Startup Configuration (256 bytes maximum) +# Baseline +#NFA_DM_START_UP_CFG={B0:80:01:01:A0:02:08:00:B0:05:01:03:03:03:08:C9:0D:24:00:00:00:01:00:BB:00:E4:00:0A:01:02:CA:20:00:00:00:00:08:E8:03:00:00:90:01:00:00:FF:FF:00:00:03:02:00:00:00:00:00:00:00:59:59:01:04:59:59:D6:0D:20:02:02:00:00:00:00:01:00:01:6C:00:8A:B2:02:B8:0B:C8:1E:06:1F:00:0A:04:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:5B:01:00:00:40:04:DD:3C:06:00:00:16:18:08:08:06:04:03:02:00:0D:12:0A:67:38:FF:59:20:00:00:00:01:85:00:00:32:1F:E3:E3:14:16:04:00:02:55:55:55:55:55:55:55:55:55:55:55:55:55:1E:A8:77:97:82:42:8C:8C:0F:0F:00} + +# Add C2:02:07:00 +#NFA_DM_START_UP_CFG={B4:80:01:01:A0:02:08:00:B0:05:01:03:03:03:08:C9:0D:24:00:00:00:01:00:BB:00:E4:00:0A:01:02:CA:20:00:00:00:00:08:E8:03:00:00:90:01:00:00:FF:FF:00:00:03:02:00:00:00:00:00:00:00:59:59:01:04:59:59:D6:0D:20:02:02:00:00:00:00:01:00:01:6C:00:8A:B2:02:B8:0B:C8:1E:06:1F:00:0A:04:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:5B:01:00:00:40:04:DD:3C:06:00:00:16:18:08:08:06:04:03:02:00:0D:12:0A:67:38:FF:59:20:00:00:00:01:85:00:00:32:1F:E3:E3:14:16:04:00:02:55:55:55:55:55:55:55:55:55:55:55:55:55:1E:A8:77:97:82:42:8C:8C:0F:0F:00:C2:02:07:00} + +# Tuned by HW +NFA_DM_START_UP_CFG={B4:80:01:01:A0:02:08:00:B0:05:01:03:03:03:08:C9:0D:24:00:00:00:01:00:BB:00:E4:00:0A:01:02:CA:20:00:00:00:00:08:E8:03:00:00:90:01:00:00:FF:FF:00:00:03:02:00:00:00:00:00:00:00:60:60:09:04:60:60:D6:0D:20:02:02:00:00:00:00:01:00:01:5E:00:97:B2:02:B8:0B:C8:1E:06:1F:00:0A:04:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:5B:01:00:00:40:04:DD:3C:06:00:00:22:22:08:08:06:04:03:02:00:12:12:0A:6D:20:FF:67:20:00:00:00:01:85:00:00:32:1F:E3:E3:14:14:04:00:02:55:55:55:55:55:55:55:55:55:55:55:55:55:1E:A8:77:97:82:42:8C:8C:6F:0F:00:C2:02:05:00} + +############################################################################### +# Pre-Discovery Startup Configuration (256 bytes maximum) +#NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:00:C3:04:40:4B:4C:00} +#NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:05:00:C3:04:40:4B:4C:00} + +############################################################################### +# Snooze Mode Settings +SNOOZE_MODE_CFG={08:00:00:00:01} + +############################################################################### +# Choose the presence-check algorithm for type-4 tag. +PRESENCE_CHECK_ALGORITHM=1 + + diff --git a/configs/nfc/libnfc-brcm.conf b/configs/nfc/libnfc-brcm.conf new file mode 100644 index 0000000..3db0067 --- /dev/null +++ b/configs/nfc/libnfc-brcm.conf @@ -0,0 +1,343 @@ +############################################################################### +# Application options +APPL_TRACE_LEVEL=0xFF +PROTOCOL_TRACE_LEVEL=0xFFFFFFFF + +############################################################################### +# Logging +# Set USE_RAW_NCI_TRACE = 1 for protocol logging in a raw format +# instead of decoded +#USE_RAW_NCI_TRACE=0 + +############################################################################### +# performance measurement +# Change this setting to control how often USERIAL log the performance (throughput) +# data on read/write/poll +# defailt is to log performance dara for every 100 read or write +#REPORT_PERFORMANCE_MEASURE=100 + +############################################################################### +# File used for NFA storage +NFA_STORAGE="/data/nfc" + +############################################################################### +# Low Power Mode Settings +# +# If NFA_DM_LP_CFG is not provided, stack default settings are +# used (see nfa_dm_brcm_cfg.c). They are as follows: +# 1 Power cycle to full power mode from CEx +# 1 Parameter for low power mode command +# 0 Primary Threshold for battery monitor +# 0-7 representing below voltages: +# {2, 2.2, 2.7, 2.8, 2.9, 3, 3.1, 3.2} +# 8 Secondary Threshold for battery monitor +# 0-15 representing below voltages: +# {5.2, 4.87, 4.54, 4.22, 3.9, 3.73, 3.57, 3.4, +# 3.2, 3.1, 3.0, 2.9, 2.8, 2.7, 2.2, 2.0} +# +#NFA_DM_LP_CFG={01:01:00:08} + +############################################################################### +# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC +NFC_WAKE_DELAY=20 + +############################################################################### +# Various Delay settings (in ms) used in USERIAL +# POWER_ON_DELAY +# Delay after turning on chip, before writing to transport (default 300) +# PRE_POWER_OFF_DELAY +# Delay after deasserting NFC-Wake before turn off chip (default 0) +# POST_POWER_OFF_DELAY +# Delay after turning off chip, before USERIAL_close returns (default 0) +# CE3_PRE_POWER_OFF_DELAY +# Delay after deasserting NFC-Wake before turn off chip (default 1000) +# when going to CE3 Switch Off mode +# +POWER_ON_DELAY=50 +PRE_POWER_OFF_DELAY=10 +#POST_POWER_OFF_DELAY=0 +CE3_PRE_POWER_OFF_DELAY=1500 + +############################################################################### +# Maximum time (ms) to wait for RESET NTF after setting REG_PU to high +# The default is 1000. +NFCC_ENABLE_TIMEOUT=1000 +################################################ +#Disable BOC before sending XTAL_INDEX_CMD. +DO_GLOBAL_RESET=1 + +############################################################################### +# Device Manager Config +# +# If NFA_DM_CFG is not provided, stack default settings are +# used (see nfa_dm_cfg.c). They are as follows: +# 0 (FALSE) Automatic NDEF detection when background polling +# 0 (FALSE) Automatic NDEF read when background polling +# +#NFA_DM_CFG={00:00} + +############################################################################### +# Default poll duration (in ms) +# The defualt is 500ms if not set (see nfc_target.h) +#NFA_DM_DISC_DURATION_POLL=500 + +############################################################################### +# Startup Vendor Specific Configuration (100 bytes maximum); +# byte[0] TLV total len = 0x5 +# byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f +# byte[2] NCI_MSG_FRAME_LOG = 0x9 +# byte[3] 2 +# byte[4] 0=turn off RF frame logging; 1=turn on +# byte[5] 0=turn off SWP frame logging; 1=turn on +# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01} + +############################################################################### +# Configure the default Destination Gate used by HCI (the default is 4, which +# is the ETSI loopback gate. +#NFA_HCI_DEFAULT_DEST_GATE=0x04 + +############################################################################### +# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h. +# The value is set to 3 by default as it assumes we will discover 0xF2, +# 0xF3, and 0xF4. If a platform will exclude an SE, this value can be reduced +# so that the stack will not wait any longer than necessary. It can be set to +# 0 to disable EE and HCI sub-systems (i.e. if there are no SE on the system). +# Note, if set to 0, the ACTIVE_SE setting should also be set to 0. +# +# Note (China): Default to 3 for 20793 support. Adjust this setting based on +# the number of SE on your program. The more EE is supported, +# the longer it takes to enable NFC +# +#NFA_MAX_EE_SUPPORTED=3 +NFA_MAX_EE_SUPPORTED=3 + +############################################################################### +# Configure the single default SE to use. The default is to use the first +# SE that is detected by the stack. This value might be used when the phone +# supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use +# one of them (e.g. 0xF4). This can be set to 0 if there are no SE on the +# system in order to skip SE initialization. +#ACTIVE_SE=0xF3 + +############################################################################### +# Configure the default NfcA/IsoDep techology and protocol route. Can be +# either a secure element (e.g. 0xF4) or the host (0x00) +DEFAULT_ISODEP_ROUTE=0xF4 + +############################################################################### +# Configure the default "off-host" AID route. The default is 0xF4 +DEFAULT_OFFHOST_ROUTE=0xF4 + +############################################################################### +# Configure the NFC Extras to open and use a static pipe. If the value is +# not set or set to 0, then the default is use a dynamic pipe based on a +# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value +# for each UICC (where F3="UICC0" and F4="UICC1") +#NFA_HCI_STATIC_PIPE_ID_F3=0x70 +NFA_HCI_STATIC_PIPE_ID_F4=0x71 + +############################################################################### +# When disconnecting from Oberthur secure element, perform a warm-reset of +# the secure element to deselect the applet. +# The default hex value of the command is 0x3. If this variable is undefined, +# then this feature is not used. +OBERTHUR_WARM_RESET_COMMAND=0x03 + +############################################################################### +# Force UICC to only listen to the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B. +# If variable is not defined, code will detect UICC's technologies. +#UICC_LISTEN_TECH_MASK=0x03 + +############################################################################### +# Exclude some technologies when establishing the listen mask. This is handy +# when UICC_LISTEN_TECH_MASK is not specified and the mask is based on what is +# discovered in the UICC. This provides a method to remove certain techs. +# Default is 0x00 (i.e. don't exclude any technology). +UICC_LISTEN_TECH_EXCLUDE_MASK=0x10 + +############################################################################### +# AID for Empty Select command +# If specified, this AID will be substituted when an Empty SELECT command is +# detected. The first byte is the length of the AID. Maximum length is 16. +AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00} + +############################################################################### +# Force tag polling for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | +# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | +# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_A_ACTIVE | +# NFA_TECHNOLOGY_MASK_F_ACTIVE. +# +# Notable bits: +# NFA_TECHNOLOGY_MASK_A 0x01 +# NFA_TECHNOLOGY_MASK_B 0x02 +# NFA_TECHNOLOGY_MASK_F 0x04 +# NFA_TECHNOLOGY_MASK_ISO15693 0x08 +# NFA_TECHNOLOGY_MASK_B_PRIME 0x10 +# NFA_TECHNOLOGY_MASK_KOVIO 0x20 +# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 +# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 +POLLING_TECH_MASK=0xEF + +############################################################################### +# Force P2P to only listen for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_F | +# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE +#P2P_LISTEN_TECH_MASK=0xC4 + +############################################################################### +# Maximum Number of Credits to be allowed by the NFCC +# This value overrides what the NFCC specifices allowing the host to have +# the control to work-around transport limitations. If this value does +# not exist or is set to 0, the NFCC will provide the number of credits. +#MAX_RF_DATA_CREDITS=1 + +############################################################################### +# When screen is turned off, specify the desired power state of the controller. +# 0: power-off-sleep state; DEFAULT +# 1: full-power state +# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) +# 3: FPM CE in snooze mode, Switch Off, Battery Off still available. +SCREEN_OFF_POWER_STATE=3 + +############################################################################### +# SPD Debug mode +# If set to 1, any failure of downloading a patch will trigger a hard-stop +#SPD_DEBUG=0 + +############################################################################### +# SPD Max Retry Count +# The number of attempts to download a patch before giving up (defualt is 3). +# Note, this resets after a power-cycle. +#SPD_MAX_RETRY_COUNT=3 + +############################################################################### +# transport driver +# +# TRANSPORT_DRIVER= +# +# where can be, for example: +# "/dev/ttyS" (UART) +# "/dev/bcmi2cnfc" (I2C) +# "hwtun" (HW Tunnel) +# "/dev/bcmspinfc" (SPI) +# "/dev/btusb0" (BT USB) +TRANSPORT_DRIVER="/dev/bcm2079x" + +############################################################################### +# power control driver +# Specify a kernel driver that support ioctl commands to control NFC_EN and +# NFC_WAKE gpio signals. +# +# POWER_CONTRL_DRIVER= +# where can be, for example: +# "/dev/nfcpower" +# "/dev/bcmi2cnfc" (I2C) +# "/dev/bcmspinfc" (SPI) +# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal +POWER_CONTROL_DRIVER="/dev/bcm2079x" + +############################################################################### +# I2C transport driver options +# BCMI2CNFC_ADDRESS=0 + +############################################################################### +# I2C transport driver try to read multiple packets in read() if data is available +# remove the comment below to enable this feature +#READ_MULTIPLE_PACKETS=1 + +############################################################################### +# SPI transport driver options +#SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00} + +############################################################################### +# UART transport driver options +# +# PORT=1,2,3,... +# BAUD=115200, 19200, 9600, 4800, +# DATABITS=8, 7, 6, 5 +# PARITY="even" | "odd" | "none" +# STOPBITS="0" | "1" | "1.5" | "2" + +#UART_PORT=2 +#UART_BAUD=115200 +#UART_DATABITS=8 +#UART_PARITY="none" +#UART_STOPBITS="1" + +############################################################################### +# Insert a delay in microseconds per byte after a write to NFCC. +# after writing a block of data to the NFCC, delay this an amopunt of time before +# writing next block of data. the delay is calculated as below +# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds +# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write +NFC_WRITE_DELAY=20 + +############################################################################### +# Configuration for the RF discovery frequency for each technology. The values mean +# frequency for NFC Technology A +# Technology B +# Technology F +# Proprietary Technology/15693 +# Proprietary Technology/B-Prime +# Proprietary Technology/Kovio +# Technology A active mode +# Technology F active mode +#POLL_FREQUENCY={01:01:01:01:01:01:01:01} + +############################################################################### +# Define the following variables to override the NFC stack's crystal +# frequency selection algorithm. Set XTAL_FREQ_INDEX=0xFF to use XTAL_PARAMS_CFG. +# Otherwise, XTAL_PARAMS_CFG is ignored. +# XTAL_HARDWARE_ID: Controller's hardware ID. +# XTAL_FREQUENCY: Controller's crystal frequency. +# XTAL_FREQ_INDEX: Controller's crystal frequency index. +# XTAL_PARAMS_CFG: Custom crystal frequency. +#XTAL_HARDWARE_ID=0x20791000 +#XTAL_FREQUENCY=26000 +#XTAL_FREQ_INDEX=5 +#XTAL_PARAMS_CFG={08:00:00:00:00:00:00:00:00} + +XTAL_HARDWARE_ID=0x20795A10 +XTAL_FREQUENCY=19200 +XTAL_FREQ_INDEX=3 + +############################################################################### +# For debug purpose, setting this value to 1 will disable the JNI layer from +# toggling the UICC IDLE timeout feature when connecting/disconnecting to the +# SE. The default behavior is to toggle the setting. +# +#DBG_NO_UICC_IDLE_TIMEOUT_TOGGLING=0 + +############################################################################### +# Allows NFC to bootup even if there is no NVRAM detected +#ALLOW_NO_NVM=0 + +############################################################################### +# Define the device host whitelist of HCI host ID's. See specification ETSI TS 102 622 +# V11.1.0 (2012-10), section 6.1.3.1. Variable shall contain an array +# of HCI host ID's. Stack's default is {02:03:04}. +#DEVICE_HOST_WHITE_LIST={02:03:04} + +############################################################################### +# Verizon-specific feature +# Set to 0 or remove the variable to disable Verizon Aid Filtering +ENABLE_AID_FILTERING=0 + +# Preserve stack NV store +PRESERVE_STORAGE=1 + +############################################################################### +# Select controller support for AID matching +# the default value is 0. +# 0 Exact matching only +# 1 Exact+Prefix matching +# 2 Prefix matching only +AID_MATCHING_MODE=2 + + + diff --git a/configs/nfc/nfcee_access.xml b/configs/nfc/nfcee_access.xml new file mode 100644 index 0000000..be9c0d1 --- /dev/null +++ b/configs/nfc/nfcee_access.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + diff --git a/device.mk b/device.mk index 06d2725..d70d2f5 100644 --- a/device.mk +++ b/device.mk @@ -24,4 +24,4 @@ DEVICE_PACKAGE_OVERLAYS += \ # Include package config fragments include $(LOCAL_PATH)/product/*.mk -$(call inherit-product, vendor/nubia/nx511j/nx511j-vendor.mk) +$(call inherit-product, vendor/nubia/nx512j/nx512j-vendor.mk) diff --git a/full_nx511j.mk b/full_nx512j.mk similarity index 84% rename from full_nx511j.mk rename to full_nx512j.mk index 9deca8c..05fdff5 100644 --- a/full_nx511j.mk +++ b/full_nx512j.mk @@ -18,14 +18,14 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) -# Inherit from nx511j device -$(call inherit-product, device/nubia/nx511j/device.mk) +# Inherit from nx512j device +$(call inherit-product, device/nubia/nx512j/device.mk) # Device identifier. This must come after all inclusions -PRODUCT_DEVICE := nx511j -PRODUCT_NAME := full_nx511j +PRODUCT_DEVICE := nx512j +PRODUCT_NAME := full_nx512j PRODUCT_BRAND := NUBIA -PRODUCT_MODEL := Z9 mini +PRODUCT_MODEL := Z9MAX PRODUCT_MANUFACTURER := NUBIA diff --git a/liblight/lights.c b/liblight/lights.c index d62c205..b6395e0 100644 --- a/liblight/lights.c +++ b/liblight/lights.c @@ -471,7 +471,7 @@ struct hw_module_t HAL_MODULE_INFO_SYM = { .version_major = 1, .version_minor = 0, .id = LIGHTS_HARDWARE_MODULE_ID, - .name = "NX511J Lights Module v1.1", + .name = "NX512J Lights Module v1.1", .author = "several authors", .methods = &lights_module_methods, }; diff --git a/manifest.xml b/manifest.xml index 1f03287..ccfb436 100644 --- a/manifest.xml +++ b/manifest.xml @@ -141,6 +141,15 @@ default + + android.hardware.nfc + hwbinder + 1.0 + + INfc + default + + android.hardware.power hwbinder diff --git a/product/misc.mk b/product/misc.mk index 0cdec37..ca032bb 100644 --- a/product/misc.mk +++ b/product/misc.mk @@ -6,7 +6,7 @@ PRODUCT_PACKAGES += \ libshim_atomic PRODUCT_PROPERTY_OVERRIDES += \ - ro.product.model=NX511J \ + ro.product.model=NX512J \ dalvik.vm.heapstartsize=8m \ dalvik.vm.heapgrowthlimit=192m \ dalvik.vm.heapsize=512m \ diff --git a/product/nfc.mk b/product/nfc.mk new file mode 100644 index 0000000..da09d35 --- /dev/null +++ b/product/nfc.mk @@ -0,0 +1,20 @@ +# NFC packages +PRODUCT_PACKAGES += \ + android.hardware.nfc@1.0-impl-bcm \ + android.hardware.nfc@1.0-service \ + nfc_nci.bcm2079x.default \ + NfcNci \ + Tag \ + com.android.nfc_extras + +# NFC +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ + frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ + frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \ + $(LOCAL_PATH)/configs/nfc/libnfc-brcm-20795a10.conf:system/vendor/etc/libnfc-brcm-20795a10.conf \ + $(LOCAL_PATH)/configs/nfc/libnfc-brcm.conf:system/vendor/etc/libnfc-brcm.conf + +# NFCEE access control +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/nfc/nfcee_access.xml:system/vendor/etc/nfcee_access.xml diff --git a/proprietary-files.txt b/proprietary-files.txt index b153820..29c1f1b 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -290,6 +290,15 @@ vendor/lib64/libOmxMux.so vendor/lib64/libSHIMDivxDrm.so vendor/lib64/libmmparser.so +#NFC firmware +etc/firmware/nfc_test.bin:vendor/firmware/nfc_test.bin +vendor/firmware/BCM20795A1_001.002.012.0003.0078_Generic_I2C_NCD_Unsigned_configdata.ncd +vendor/firmware/BCM20795A1_001.002.012.0003.0090_Generic_I2C_NCD_Unsigned_configdata.ncd +vendor/firmware/BCM20795A1_001.002.012.0003.0092_Generic_I2C_NCD_Unsigned_configdata.ncd +vendor/firmware/BCM20795A1_001.002.012.0003.0102_Generic_I2C_NCD_Unsigned_configdata.ncd +vendor/firmware/BCM20795A1_001.002.012.0003.0104_Generic_I2C_NCD_Unsigned_configdata.ncd +vendor/firmware/BCM20795A2_001.003.025.0005.0035_Generic_I2C_NCD_Unsigned_configdata.ncd + # OemCrypto vendor/lib/liboemcrypto.so diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 08fb577..7fd1b10 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -87,6 +87,10 @@ on post-fs-data mkdir /data/system/perfd 0770 root system chmod 2770 /data/system/perfd + # NFC local data and nfcee xml storage + mkdir /data/nfc 0770 nfc nfc + mkdir /data/nfc/param 0770 nfc nfc + mkdir /data/tombstones 0771 system system mkdir /tombstones/modem 0771 system system mkdir /tombstones/lpass 0771 system system diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index 38e97d8..db9edbe 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -193,6 +193,10 @@ on boot chown system system /persist/audio chmod 0755 /persist/audio + # create directory for nfc- give nfc the read/write access to + # the following directory-added by ZTEMT 2015.1.8 + mkdir /data/nfc 0660 nfc nfc + #lcd-backlight chown system system /sys/class/leds/lcd-backlight/max_brightness chmod 0666 /sys/class/leds/lcd-backlight/max_brightness diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc index 6ceaff1..d66fafa 100644 --- a/rootdir/etc/ueventd.qcom.rc +++ b/rootdir/etc/ueventd.qcom.rc @@ -205,6 +205,12 @@ /dev/wcnss_wlan 0660 system system /dev/wcnss_ctrl 0660 system system +#nfc permissions +/dev/nfc-nci 0660 nfc nfc +/dev/assd 0660 nfc nfc +/dev/bcm2079x 0660 nfc nfc +/sys/devices/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0/queues/rx-* rps_cpus 0660 system system + # UIO devices /dev/uio0 0660 system system /dev/uio1 0660 system system diff --git a/rr.mk b/rr.mk index 5ebd0c4..5343bdc 100644 --- a/rr.mk +++ b/rr.mk @@ -13,26 +13,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -$(call inherit-product, device/nubia/nx511j/full_nx511j.mk) +$(call inherit-product, device/nubia/nx512j/full_nx512j.mk) # Inherit some common stuff. $(call inherit-product, vendor/rr/config/common_full_phone.mk) # Device identifiers -PRODUCT_NAME := rr_nx511j -PRODUCT_DEVICE := nx511j +PRODUCT_NAME := rr_nx512j +PRODUCT_DEVICE := nx512j PRODUCT_MANUFACTURER := Nubia PRODUCT_BRAND := Nubia -PRODUCT_MODEL := Nubia Z9 mini +PRODUCT_MODEL := Nubia Z9 Max PRODUCT_GMS_CLIENTID_BASE := android-nubia -TARGET_VENDOR_PRODUCT_NAME := NX511J -TARGET_VENDOR_DEVICE_NAME := NX511J +TARGET_VENDOR_PRODUCT_NAME := NX512J +TARGET_VENDOR_DEVICE_NAME := NX512J -PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=NX511J PRODUCT_NAME=NX511J +PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=NX512J PRODUCT_NAME=NX512J PRODUCT_BUILD_PROP_OVERRIDES += \ - PRIVATE_BUILD_DESC="NX511J-user 5.1.1 LMY47V eng.nubia.20180320.191149 release-keys" + PRIVATE_BUILD_DESC="NX512J-user 5.1.1 LMY47V eng.nubia.20171018.105347 release-keys" -BUILD_FINGERPRINT := nubia/NX511J/NX511J:5.1.1/LMY47V/eng.nubia.20180320.191149:user/release-keys +BUILD_FINGERPRINT := nubia/NX512J/NX512J:5.1.1/LMY47V/eng.nubia.20171018.105347:user/release-keys diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 3b188b3..54023f5 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -1,3 +1,6 @@ +# NFC +/dev/bcm2079x u:object_r:nfc_device:s0 + # Shell files /system/vendor/bin/init\.qcom\.mem\.sh u:object_r:qti_init_shell_exec:s0 /system/vendor/bin/tp\.node\.sh u:object_r:qti_init_shell_exec:s0