aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Das <surajdazz@gmail.com>2017-04-04 19:11:16 +0530
committerSuraj Das <surajdazz@gmail.com>2017-04-04 19:11:16 +0530
commitf6995753e0b5eb009a0085003545a64dfd300991 (patch)
tree58fd76c8d3dad45babdd18770399e6cd12d02bd9
parentdc161da478097fb68a5eaa80ffaca409061c2c7b (diff)
find7-common : squashed up to latest LOS
Change-Id: I5b5b46d62ca67625ea354e3abb25f4dd36b5cb0a
-rw-r--r--Android.mk2
-rw-r--r--BoardConfigCommon.mk27
-rw-r--r--README.md2
-rw-r--r--audio/audio_platform_info.xml5
-rw-r--r--audio/audio_policy.conf31
-rw-r--r--audio/mixer_paths.xml84
-rw-r--r--bluetooth/bdroid_buildcfg.h14
-rw-r--r--camera/CameraWrapper.cpp27
-rw-r--r--device-proprietary-files.txt36
-rwxr-xr-xextract-files.sh23
-rw-r--r--find7.mk9
-rw-r--r--include/camera/CameraParametersExtra.h25
-rw-r--r--init/init_find7.cpp54
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml71
-rw-r--r--overlay/frameworks/base/core/res/res/xml/storage_list.xml46
-rw-r--r--overlay/packages/apps/Camera2/res/values/config.xml23
-rw-r--r--overlay/packages/apps/Camera2/res/values/qcomstrings.xml9
-rw-r--r--overlay/packages/apps/Dialer/res/values/config.xml20
-rw-r--r--overlay/packages/apps/Torch/res/values/config.xml24
-rw-r--r--rootdir/Android.mk15
-rw-r--r--rootdir/etc/fstab.qcom19
-rw-r--r--rootdir/etc/fstab.recovery22
-rw-r--r--rootdir/etc/init.qcom.rc41
-rw-r--r--rootdir/etc/init.qcom.usb.rc29
-rwxr-xr-xsetup-makefiles.sh23
-rw-r--r--system.prop19
-rw-r--r--system_prop.mk22
27 files changed, 457 insertions, 265 deletions
diff --git a/Android.mk b/Android.mk
index 9bd887e..7600bb8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,6 +16,6 @@
LOCAL_PATH := $(call my-dir)
-ifneq ($(filter find7 find7s find7u find7ext,$(TARGET_DEVICE)),)
+ifneq ($(filter find7 find7s,$(TARGET_DEVICE)),)
include $(call all-subdir-makefiles,$(LOCAL_PATH))
endif
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 7668a8f..125b724 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -17,17 +17,22 @@
# Inherit from msm8974-common
-include device/oppo/msm8974-common/BoardConfigCommon.mk
+# Include path
+TARGET_SPECIFIC_HEADER_PATH += device/oppo/find7-common/include
+
# Kernel
-BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.selinux=permissive
-TARGET_KERNEL_CONFIG := cyanogenmod_find7_defconfig
+BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3
+TARGET_KERNEL_CONFIG := lineageos_find7_defconfig
+TARGET_KERNEL_SOURCE := kernel/oppo/msm8974
+
+# Audio
+AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/oppo/find7-common/bluetooth
# Camera
USE_DEVICE_SPECIFIC_CAMERA := true
-COMMON_GLOBAL_CFLAGS += -DOPPO_CAMERA_HARDWARE
-TARGET_RELEASE_CPPFLAGS += -DNEEDS_VECTORIMPL_SYMBOLS
# Filesystem
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
@@ -38,8 +43,18 @@ BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824
BOARD_USERDATAIMAGE_PARTITION_SIZE := 13747929088 # 13747945472 - 16384 for crypto footer
#BOARD_USERDATAIMAGE_PARTITION_SIZE := 3221225472
+# Flags for modem (we still have an old modem)
+BOARD_GLOBAL_CFLAGS += -DUSE_RIL_VERSION_10
+BOARD_GLOBAL_CPPFLAGS += -DUSE_RIL_VERSION_10
-AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
+# Init
+TARGET_LIBINIT_MSM8974_DEFINES_FILE := device/oppo/find7-common/init/init_find7.cpp
+
+# Properties
+TARGET_SYSTEM_PROP += device/oppo/find7-common/system.prop
+
+# Recovery
+TARGET_RECOVERY_FSTAB := device/oppo/find7-common/rootdir/etc/fstab.recovery
# Inherit from the proprietary version
--include vendor/oppo/find7/BoardConfigVendor.mk
+-include vendor/oppo/find7-common/BoardConfigVendor.mk
diff --git a/README.md b/README.md
index b8c8247..9457546 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,3 @@
Copyright 2014 - The CyanogenMod Project
-Device configuration for Oppo Find7 (common device repo)
+Device configuration for OPPO Find7 (common device repo)
diff --git a/audio/audio_platform_info.xml b/audio/audio_platform_info.xml
index 0ace9c8..72abbb2 100644
--- a/audio/audio_platform_info.xml
+++ b/audio/audio_platform_info.xml
@@ -29,10 +29,12 @@
<device name="SND_DEVICE_OUT_HANDSET" acdb_id="7" />
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15" />
<device name="SND_DEVICE_OUT_HEADPHONES" acdb_id="10" />
+ <device name="SND_DEVICE_OUT_LINE" acdb_id="10"/>
<device name="SND_DEVICE_OUT_VOICE_HANDSET" acdb_id="7" />
<device name="SND_DEVICE_OUT_VOICE_SPEAKER" acdb_id="15" />
<device name="SND_DEVICE_OUT_VOICE_HEADPHONES" acdb_id="10" />
+ <device name="SND_DEVICE_OUT_VOICE_LINE" acdb_id="10"/>
<device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="40" />
<device name="SND_DEVICE_IN_SPEAKER_MIC" acdb_id="42" />
@@ -46,6 +48,9 @@
<device name="SND_DEVICE_IN_SPEAKER_STEREO_DMIC" acdb_id="35" />
<device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="35" />
+ <device name="SND_DEVICE_IN_VOICE_REC_DMIC_STEREO" acdb_id="35" />
+
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_LINE" acdb_id="10"/>
</acdb_ids>
<backend_names>
diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf
index 3aed27c..871c869 100644
--- a/audio/audio_policy.conf
+++ b/audio/audio_policy.conf
@@ -5,7 +5,7 @@
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_TELEPHONY_TX
default_output_device AUDIO_DEVICE_OUT_SPEAKER
- attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_TELEPHONY_TX
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_TELEPHONY_RX
}
# audio hardware module section: contains descriptors for all audio hw modules present on the
@@ -26,14 +26,14 @@ audio_hw_modules {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX
- flags AUDIO_OUTPUT_FLAG_PRIMARY
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_LINE
+ flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_RAW
}
deep_buffer {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_LINE
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
}
multichannel {
@@ -44,17 +44,17 @@ audio_hw_modules {
flags AUDIO_OUTPUT_FLAG_DIRECT
}
compress_offload {
- sampling_rates 8000|11025|16000|22050|32000|44100|48000|64000|88200|96000|176400|192000
+ sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000
channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1
formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD
- devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_FM_TX
+ devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_LINE
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
}
incall_music {
sampling_rates 8000|16000|48000
channel_masks AUDIO_CHANNEL_OUT_MONO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
+ devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_LINE
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC
}
voice_tx {
@@ -63,20 +63,13 @@ audio_hw_modules {
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_TELEPHONY_TX
}
- voip_rx {
- sampling_rates 8000|16000
- channel_masks AUDIO_CHANNEL_OUT_MONO
- formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
- devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
- flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX
- }
}
inputs {
primary {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
- channel_masks AUDIO_CHANNEL_IN_5POINT1|AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
- formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
- devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_FM_RX|AUDIO_DEVICE_IN_FM_RX_A2DP|AUDIO_DEVICE_IN_VOICE_CALL
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_VOICE_CALL
}
voice_rx {
sampling_rates 8000|16000|48000
@@ -114,8 +107,8 @@ audio_hw_modules {
inputs {
usb_device {
sampling_rates dynamic
- channel_masks AUDIO_CHANNEL_IN_STEREO
- formats AUDIO_FORMAT_PCM_16_BIT
+ channel_masks dynamic
+ formats dynamic
devices AUDIO_DEVICE_IN_USB_DEVICE
}
}
diff --git a/audio/mixer_paths.xml b/audio/mixer_paths.xml
index 386673e..5699663 100644
--- a/audio/mixer_paths.xml
+++ b/audio/mixer_paths.xml
@@ -40,10 +40,10 @@
<ctl name="ADC5 Volume" value="0" />
<ctl name="ADC6 Volume" value="0" />
<ctl name="DEC1 Volume" value="0" />
- <ctl name="DEC2 Volume" value="0" />
- <ctl name="DEC3 Volume" value="0" />
+ <ctl name="DEC2 Volume" value="84" />
+ <ctl name="DEC3 Volume" value="84" />
<ctl name="DEC4 Volume" value="84" />
- <ctl name="DEC5 Volume" value="0" />
+ <ctl name="DEC5 Volume" value="84" />
<ctl name="DEC6 Volume" value="0" />
<ctl name="DEC7 Volume" value="0" />
<ctl name="DEC8 Volume" value="0" />
@@ -278,6 +278,32 @@
<path name="low-latency-playback" />
</path>
+ <path name="audio-ull-playback">
+ <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia3" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco">
+ <ctl name="INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco-wb">
+ <path name="audio-ull-playback bt-sco" />
+ <ctl name="Internal BTSCO SampleRate" value="16000" />
+ </path>
+
+ <path name="audio-ull-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia3" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headphones">
+ <path name="audio-ull-playback afe-proxy" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-usb-headphones">
+ <path name="audio-ull-playback usb-headphones" />
+ <path name="audio-ull-playback" />
+ </path>
+
<path name="multi-channel-playback afe-proxy">
<ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="1" />
</path>
@@ -404,6 +430,23 @@
<path name="audio-record bt-sco" />
</path>
+ <path name="low-latency-record">
+ <ctl name="MultiMedia5 Mixer SLIM_0_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record usb-headset-mic">
+ <ctl name="MultiMedia5 Mixer AFE_PCM_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco">
+ <ctl name="MultiMedia5 Mixer INTERNAL_BT_SCO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco-wb">
+ <ctl name="Internal BTSCO SampleRate" value="16000" />
+ <path name="audio-record bt-sco" />
+ </path>
+
<path name="audio-record-compress">
<ctl name="MultiMedia8 Mixer SLIM_0_TX" value="1" />
</path>
@@ -734,12 +777,20 @@
<ctl name="RX2 Digital Volume" value="84" />
</path>
+ <path name="line">
+ <path name="headphones" />
+ </path>
+
<path name="voice-headphones">
<path name="hph" />
<ctl name="RX1 Digital Volume" value="85" />
<ctl name="RX2 Digital Volume" value="85" />
</path>
+ <path name="voice-line">
+ <path name="voice-headphones" />
+ </path>
+
<path name="speaker-and-headphones">
<path name="spk-hph" />
<ctl name="RX1 Digital Volume" value="84" />
@@ -748,31 +799,31 @@
<ctl name="RX4 Digital Volume" value="80" />
</path>
+ <path name="speaker-and-line">
+ <path name="speaker-and-headphones" />
+ </path>
+
<!-- Analog input devices -->
<path name="hph-mic">
<ctl name="DEC5 MUX" value="ADC2" />
<ctl name="IIR1 INP1 MUX" value="DEC5" />
- <ctl name="DEC5 Volume" value="84" />
</path>
<path name="main-mic">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1"/>
<ctl name="SLIM TX7 MUX" value="DEC4" />
<ctl name="DEC4 MUX" value="ADC3" />
- <ctl name="DEC4 Volume" value="84" />
</path>
<path name="sec-mic">
<ctl name="DEC3 MUX" value="ADC4" />
<ctl name="ADC4 Volume" value="19" />
- <ctl name="DEC3 Volume" value="84" />
</path>
<path name="anc-mic">
<ctl name="DEC2 MUX" value="ADC5" />
<ctl name="ADC5 Volume" value="19" />
- <ctl name="DEC2 Volume" value="84" />
</path>
@@ -855,10 +906,8 @@
<ctl name="SLIM_0_TX Channels" value="Two" />
<ctl name="SLIM TX7 MUX" value="DEC4" />
<ctl name="DEC4 MUX" value="ADC3" />
- <ctl name="DEC4 Volume" value="84" />
<ctl name="SLIM TX8 MUX" value="DEC3" />
<ctl name="DEC3 MUX" value="ADC4" />
- <ctl name="DEC3 Volume" value="84" />
</path>
<path name="dmic-endfire">
@@ -871,20 +920,18 @@
<path name="dmic-endfire" />
</path>
-
<!-- Stereo recording -->
<path name="speaker-stereo-dmic-ef">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
- <ctl name="SLIM_0_TX Channels" value="Two" />
- <ctl name="SLIM TX7 MUX" value="DEC4" />
+ <ctl name="SLIM TX7 MUX" value="DEC3" />
+ <ctl name="DEC3 MUX" value="ADC4" />
+ <ctl name="SLIM TX8 MUX" value="DEC4" />
<ctl name="DEC4 MUX" value="ADC3" />
- <ctl name="DEC4 Volume" value="84" />
- <ctl name="SLIM TX8 MUX" value="DEC2" />
- <ctl name="DEC2 MUX" value="ADC5" />
- <ctl name="DEC2 Volume" value="84" />
+ <ctl name="SLIM_0_TX Channels" value="Two" />
+ <ctl name="ADC4 Volume" value="19" />
<ctl name="ADC3 Volume" value="19" />
- <ctl name="ADC5 Volume" value="19" />
+ <ctl name="SLIM_0_RX Format" value="S16_LE" />
</path>
<path name="handset-stereo-dmic-ef">
@@ -897,6 +944,9 @@
<path name="speaker-stereo-dmic-ef" />
</path>
+ <path name="voice-rec-dmic-ef">
+ <path name="speaker-stereo-dmic-ef" />
+ </path>
<!-- TTY devices -->
<path name="tty-headphones">
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
index db72b4c..543b90a 100644
--- a/bluetooth/bdroid_buildcfg.h
+++ b/bluetooth/bdroid_buildcfg.h
@@ -19,14 +19,14 @@
#define BLUETOOTH_QTI_SW TRUE
-#define BTM_DEF_LOCAL_NAME "Oppo Find7"
-#define MAX_ACL_CONNECTIONS 7
-#define MAX_L2CAP_CHANNELS 16
-
+#define BTM_DEF_LOCAL_NAME "OPPO Find7"
+// Disables read remote device feature
#define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE
-#define BTA_BLE_SKIP_CONN_UPD FALSE
-
+#define MAX_L2CAP_CHANNELS 16
#define BLE_VND_INCLUDED TRUE
-#define BLE_PERIPHERAL_ADV_NAME TRUE
+// skips conn update at conn completion
+#define BTA_BLE_SKIP_CONN_UPD FALSE
+#define BLE_PERIPHERAL_ADV_NAME FALSE
+#define BT_CLEAN_TURN_ON_DISABLED 1
#endif
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp
index d235ef7..2110b33 100644
--- a/camera/CameraWrapper.cpp
+++ b/camera/CameraWrapper.cpp
@@ -64,6 +64,8 @@ camera_module_t HAL_MODULE_INFO_SYM = {
.set_callbacks = NULL, /* remove compilation warnings */
.get_vendor_tag_ops = NULL, /* remove compilation warnings */
.open_legacy = NULL, /* remove compilation warnings */
+ .set_torch_mode = NULL, /* remove compilation warnings */
+ .init = NULL, /* remove compilation warnings */
.reserved = {0}, /* remove compilation warnings */
};
@@ -112,16 +114,25 @@ static char *camera_fixup_getparams(int id, const char *settings)
params.dump();
#endif
- const char *videoSizesStr = params.get(android::CameraParameters::KEY_SUPPORTED_VIDEO_SIZES);
- char tmpsz[strlen(videoSizesStr) + 10 + 1];
- sprintf(tmpsz, "3840x2160,%s", videoSizesStr);
- params.set(android::CameraParameters::KEY_SUPPORTED_VIDEO_SIZES, tmpsz);
-
if (params.get(android::CameraParameters::KEY_RECORDING_HINT)) {
videoMode = (!strcmp(params.get(
android::CameraParameters::KEY_RECORDING_HINT), "true"));
}
+ /* Remove unsupported features */
+ params.remove("af-bracket");
+ params.remove("af-bracket-values");
+ params.remove("chroma-flash");
+ params.remove("chroma-flash-values");
+ params.remove("dis");
+ params.remove("dis-values");
+ params.remove("opti-zoom");
+ params.remove("opti-zoom-values");
+ params.remove("see-more");
+ params.remove("see-more-values");
+ params.remove("still-more");
+ params.remove("still-more-values");
+
if (!videoMode) {
/* Back camera */
if (id == 0) {
@@ -134,6 +145,10 @@ static char *camera_fixup_getparams(int id, const char *settings)
/* Remove HDR scene mode */
params.set(android::CameraParameters::KEY_SUPPORTED_SCENE_MODES,
supportedSceneModes);
+
+ /* Remove ISO */
+ params.remove("iso");
+ params.remove("iso-values");
}
}
@@ -583,7 +598,7 @@ static int camera_device_open(const hw_module_t *module, const char *name,
memset(camera_ops, 0, sizeof(*camera_ops));
camera_device->base.common.tag = HARDWARE_DEVICE_TAG;
- camera_device->base.common.version = 0;
+ camera_device->base.common.version = HARDWARE_DEVICE_API_VERSION(1, 0);
camera_device->base.common.module = (hw_module_t *)(module);
camera_device->base.common.close = camera_device_close;
camera_device->base.ops = camera_ops;
diff --git a/device-proprietary-files.txt b/device-proprietary-files.txt
index ecacc11..b9998a2 100644
--- a/device-proprietary-files.txt
+++ b/device-proprietary-files.txt
@@ -1,5 +1,26 @@
# Camera
lib/hw/camera.msm8974.so:lib/hw/camera.vendor.msm8974.so
+vendor/lib/libchromaflash.so
+vendor/lib/libllvd_smore.so
+vendor/lib/libmmcamera2_q3a_special.so
+vendor/lib/libmmcamera_chromaflash_lib.so
+vendor/lib/libmmcamera_imx214.so
+vendor/lib/libmmcamera_llvd.so
+vendor/lib/libmmcamera_optizoom_lib.so
+vendor/lib/libmmcamera_ov5648.so
+vendor/lib/libmmcamera_stillmore_lib.so
+vendor/lib/libmmcamera_ubifocus_lib.so
+vendor/lib/liboptizoom.so
+vendor/lib/libseemore.so
+vendor/lib/libt2tmanager.so
+vendor/lib/libubifocus.so
+
+# Camera Actuator
+vendor/lib/libactuator_dw9714.so
+vendor/lib/libactuator_dw9714_camera.so
+vendor/lib/libactuator_dw9714_camcorder.so
+
+# Camera Chromatix
vendor/lib/libchromatix_imx214_common.so
vendor/lib/libchromatix_imx214_default_video.so
vendor/lib/libchromatix_imx214_default_video_find7s.so
@@ -19,27 +40,16 @@ vendor/lib/libchromatix_imx214_snapshot_hdr.so
vendor/lib/libchromatix_imx214_snapshot_hdr_find7s.so
vendor/lib/libchromatix_imx214_video_binning.so
vendor/lib/libchromatix_imx214_video_binning_find7s.so
-vendor/lib/libchromatix_imx214_video_cmcc.so
vendor/lib/libchromatix_imx214_video_hdr.so
vendor/lib/libchromatix_imx214_video_hdr_find7s.so
-vendor/lib/libchromatix_ov16825_common.so
-vendor/lib/libchromatix_ov16825_default_video.so
-vendor/lib/libchromatix_ov16825_hfr_120.so
-vendor/lib/libchromatix_ov16825_hfr_60.so
-vendor/lib/libchromatix_ov16825_liveshot.so
-vendor/lib/libchromatix_ov16825_preview.so
-vendor/lib/libchromatix_ov16825_snapshot.so
vendor/lib/libchromatix_ov5648_common.so
vendor/lib/libchromatix_ov5648_default_video.so
vendor/lib/libchromatix_ov5648_default_video_find7s.so
+vendor/lib/libchromatix_ov5648_liveshot.so
+vendor/lib/libchromatix_ov5648_liveshot_find7s.so
vendor/lib/libchromatix_ov5648_preview.so
vendor/lib/libchromatix_ov5648_preview_fb.so
vendor/lib/libchromatix_ov5648_preview_find7s.so
-vendor/lib/libchromatix_ov5648_video_cmcc.so
vendor/lib/libchromatix_ov5648_zsl.so
vendor/lib/libchromatix_ov5648_zsl_fb.so
vendor/lib/libchromatix_ov5648_zsl_find7s.so
-vendor/lib/libmmcamera_ov16825.so
-
-# NFC
-etc/firmware/libpn544_fw.so:vendor/firmware/libpn544_fw.so
diff --git a/extract-files.sh b/extract-files.sh
index 8309cd6..82894d9 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -1,7 +1,24 @@
-#!/bin/sh
+#!/bin/bash
+#
+# Copyright (C) 2016 The CyanogenMod 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.
+#
set -e
+export DEVICE=find7-common
+export DEVICE_COMMON=msm8974-common
export VENDOR=oppo
-export DEVICE=find7
-./../../oppo/msm8974-common/extract-files.sh $@
+
+./../$DEVICE_COMMON/extract-files.sh $@
diff --git a/find7.mk b/find7.mk
index b382bb5..2e43f3a 100644
--- a/find7.mk
+++ b/find7.mk
@@ -17,11 +17,10 @@
# Overlays
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
-# System properties
--include $(LOCAL_PATH)/system_prop.mk
-
-# Ramdisk - fstab/init.qcom.rc is different for each variant
+# Ramdisk
PRODUCT_PACKAGES += \
+ fstab.qcom \
+ init.qcom.rc \
init.qcom.usb.rc
# Audio
@@ -49,7 +48,7 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml
# Call the proprietary setup
-$(call inherit-product-if-exists, vendor/oppo/find7/find7-vendor.mk)
+$(call inherit-product-if-exists, vendor/oppo/find7-common/find7-common-vendor.mk)
# Inherit from msm8974-common
$(call inherit-product, device/oppo/msm8974-common/msm8974.mk)
diff --git a/include/camera/CameraParametersExtra.h b/include/camera/CameraParametersExtra.h
new file mode 100644
index 0000000..f6a4a80
--- /dev/null
+++ b/include/camera/CameraParametersExtra.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod 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.
+ */
+
+#define CAMERA_PARAMETERS_EXTRA_C \
+const char CameraParameters::KEY_TRACK_AREAS[] = "track-areas"; \
+const char CameraParameters::FOCUS_MODE_MANUAL_POSITION[] = "manual"; \
+const char CameraParameters::WHITE_BALANCE_MANUAL_CCT[] = "manual-cct";
+
+#define CAMERA_PARAMETERS_EXTRA_H \
+ static const char KEY_TRACK_AREAS[]; \
+ static const char FOCUS_MODE_MANUAL_POSITION[]; \
+ static const char WHITE_BALANCE_MANUAL_CCT[];
diff --git a/init/init_find7.cpp b/init/init_find7.cpp
new file mode 100644
index 0000000..d40fb1c
--- /dev/null
+++ b/init/init_find7.cpp
@@ -0,0 +1,54 @@
+/*
+ Copyright (c) 2014, The CyanogenMod 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 <stdlib.h>
+
+#include "vendor_init.h"
+#include "property_service.h"
+#include "log.h"
+#include "util.h"
+
+#include "init_msm8974.h"
+
+static void import_kernel_nv(const std::string& key,
+ const std::string& value, bool for_emulator __attribute__((unused)))
+{
+ if (key.empty()) return;
+
+ if (key == "oppo.rf_version") {
+ property_set("ro.oppo.rf_version", value.c_str());
+ } else if (key == "oppo.pcb_version") {
+ property_set("ro.oppo.pcb_version", value.c_str());
+ }
+}
+
+void init_target_properties()
+{
+ import_kernel_cmdline(0, import_kernel_nv);
+}
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 8963de8..75545a6 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -30,17 +30,19 @@
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
- <item>10</item>
+ <item>2</item>
+ <item>7</item>
+ <item>15</item>
<item>50</item>
<item>100</item>
<item>200</item>
<item>400</item>
- <item>500</item>
- <item>800</item>
<item>1000</item>
- <item>1600</item>
+ <item>2000</item>
<item>3000</item>
+ <item>5000</item>
<item>10000</item>
+ <item>30000</item>
</integer-array>
<!-- Array of output values for LCD backlight corresponding to the LUX values
@@ -48,55 +50,26 @@
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLcdBacklightValues">
- <item>14</item> <!-- 0-10 -->
- <item>28</item> <!-- 10-50 -->
- <item>37</item> <!-- 50-100 -->
- <item>51</item> <!-- 100-200 -->
- <item>71</item> <!-- 200-400 -->
- <item>80</item> <!-- 400-500 -->
- <item>96</item> <!-- 500-800 -->
- <item>108</item> <!-- 800-1000 -->
- <item>144</item> <!-- 1000-1600 -->
- <item>181</item> <!-- 1600-3000 -->
- <item>254</item> <!-- 3000-10000 -->
- <item>255</item> <!-- 10000+ -->
- </integer-array>
-
- <!-- Array of output values for button 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_autoBrightnessButtonBacklightValues">
- <item>14</item> <!-- 0-10 -->
- <item>28</item> <!-- 10-50 -->
- <item>37</item> <!-- 50-100 -->
- <item>51</item> <!-- 100-200 -->
- <item>71</item> <!-- 200-400 -->
- <item>80</item> <!-- 400-500 -->
- <item>96</item> <!-- 500-800 -->
- <item>108</item> <!-- 800-1000 -->
- <item>144</item> <!-- 1000-1600 -->
- <item>181</item> <!-- 1600-3000 -->
- <item>254</item> <!-- 3000-10000 -->
- <item>255</item> <!-- 10000+ -->
+ <item>13</item> <!-- 0-2 -->
+ <item>25</item> <!-- 3-7 -->
+ <item>32</item> <!-- 5-15 -->
+ <item>41</item> <!-- 15-50 -->
+ <item>52</item> <!-- 50-100 -->
+ <item>62</item> <!-- 100-200 -->
+ <item>69</item> <!-- 200-400 -->
+ <item>78</item> <!-- 400-1000 -->
+ <item>88</item> <!-- 1000-2000 -->
+ <item>134</item> <!-- 2000-3000 -->
+ <item>178</item> <!-- 3000-5000 -->
+ <item>225</item> <!-- 5000-10000 -->
+ <item>255</item> <!-- 10000-30000 -->
+ <item>255</item> <!-- 30000+ -->
</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">2</integer>
- <!-- Maximum screen brightness allowed by the power manager.
- The user is forbidden from setting the brightness above this level. -->
- <integer name="config_screenBrightnessSettingMaximum">255</integer>
-
- <!-- Default screen brightness setting.
- Must be in the range specified by minimum and maximum. -->
- <integer name="config_screenBrightnessSettingDefault">255</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">20</integer>
<!-- Indicate whether closing the lid causes the device to go to sleep and opening
it causes the device to wake up.
@@ -114,8 +87,4 @@
<!-- Default value for led color when battery is fully charged -->
<integer name="config_notificationsBatteryFullARGB">0xff0000ff</integer>
-
- <!-- Boolean to enable adb by default on a per-device basis -->
- <bool name="config_enableAdbByDefault">true</bool>
-
</resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
deleted file mode 100644
index eb72d56..0000000
--- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2011, 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.
-*/
--->
-
-<!-- See storage config details at http://source.android.com/tech/storage/ -->
-
-<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
-
- <!-- internal SD card -->
- <storage android:mountPoint="/storage/sdcard0"
- android:storageDescription="@string/storage_internal"
- android:primary="true"
- android:emulated="false"
- android:mtpReserve="100" />
-
- <!-- external SD card -->
- <storage android:mountPoint="/storage/sdcard1"
- android:storageDescription="@string/storage_sd_card"
- android:primary="false"
- android:emulated="false"
- android:removable="true"
- android:allowMassStorage="true" />
-
- <!-- external usb storage -->
- <storage android:mountPoint="/storage/usbdisk"
- android:storageDescription="@string/storage_usb"
- android:primary="false"
- android:emulated="false"
- android:removable="true" />
-
-</StorageList>
diff --git a/overlay/packages/apps/Camera2/res/values/config.xml b/overlay/packages/apps/Camera2/res/values/config.xml
deleted file mode 100644
index b442aa4..0000000
--- a/overlay/packages/apps/Camera2/res/values/config.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2011, The CyanogenMod 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>
- <!-- Use ZSL mode for Qualcomm cameras -->
- <bool name="enableZSL">true</bool>
-</resources>
diff --git a/overlay/packages/apps/Camera2/res/values/qcomstrings.xml b/overlay/packages/apps/Camera2/res/values/qcomstrings.xml
deleted file mode 100644
index 302a358..0000000
--- a/overlay/packages/apps/Camera2/res/values/qcomstrings.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!--
- Copyright (C) 2014 The CyanogenMod Project
--->
-
-<resources>
-
- <string name="pref_camera_denoise_default" translatable="false">denoise-on</string>
-
-</resources>
diff --git a/overlay/packages/apps/Dialer/res/values/config.xml b/overlay/packages/apps/Dialer/res/values/config.xml
new file mode 100644
index 0000000..b8a3c13
--- /dev/null
+++ b/overlay/packages/apps/Dialer/res/values/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2014 The CyanogenMod 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>
+ <bool name="call_recording_enabled">true</bool>
+ <integer name="call_recording_audio_source">4</integer>
+</resources>
diff --git a/overlay/packages/apps/Torch/res/values/config.xml b/overlay/packages/apps/Torch/res/values/config.xml
deleted file mode 100644
index 86eded7..0000000
--- a/overlay/packages/apps/Torch/res/values/config.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The CyanogenMod 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>
- <bool name="useCameraInterface">true</bool>
-</resources>
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index d68fb29..aff3375 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -3,6 +3,21 @@ include $(CLEAR_VARS)
# Device init files
+include $(CLEAR_VARS)
+LOCAL_MODULE := fstab.qcom
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/fstab.qcom
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.rc
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.rc
diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom
new file mode 100644
index 0000000..4ea40be
--- /dev/null
+++ b/rootdir/etc/fstab.qcom
@@ -0,0 +1,19 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
+/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic,journal_async_commit wait,check,encryptable=footer,length=-16384
+/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,rw,inline_xattr wait,check,encryptable=footer,length=-16384
+/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic,journal_async_commit wait,check
+/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,rw,inline_xattr wait,check
+/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,notrim
+/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
+/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
+/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
+/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
+
+/devices/msm_sdcc.1/mmc_host/*/mmcblk0 auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007,ignore_case=1 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
+/devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/platform/xhci-hcd* auto auto defaults voldmanaged=usb:auto
diff --git a/rootdir/etc/fstab.recovery b/rootdir/etc/fstab.recovery
new file mode 100644
index 0000000..31e12e6
--- /dev/null
+++ b/rootdir/etc/fstab.recovery
@@ -0,0 +1,22 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
+/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic,journal_async_commit wait,check,encryptable=footer,length=-16384
+/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,rw,inline_xattr wait,check,encryptable=footer,length=-16384
+/dev/block/platform/msm_sdcc.1/by-name/sdcard /storage/57f8f4bc-abf4-655f-bf67-946fc0f9f25b ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic,journal_async_commit wait,check
+/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic,journal_async_commit wait,check
+/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,rw,inline_xattr wait,check
+/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,notrim
+/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
+/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
+/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
+/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
+
+/devices/msm_sdcc.1/mmc_host/*/mmcblk0 auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007,ignore_case=1 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
+/devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/platform/xhci-hcd* auto auto defaults voldmanaged=usb:auto
+
+/dev/block/zram0 none swap defaults zramsize=533413200,zramstreams=4,notrim
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
new file mode 100644
index 0000000..3db749e
--- /dev/null
+++ b/rootdir/etc/init.qcom.rc
@@ -0,0 +1,41 @@
+#
+# Copyright 2014 The CyanogenMod 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.
+#
+
+import /init.qcom-common.rc
+
+on fs
+ mount_all ./fstab.qcom
+
+ restorecon_recursive /persist
+
+on init
+ # Support legacy paths
+ symlink /sdcard /storage/sdcard0
+
+on boot
+ # For find7s notification LED
+ chown system system /sys/class/leds/led:rgb_red/brightness
+ chown system system /sys/class/leds/led:rgb_red/ramp_step_ms
+ chown system system /sys/class/leds/led:rgb_red/duty_pcts
+ chown system system /sys/class/leds/led:rgb_red/blink
+ chown system system /sys/class/leds/led:rgb_green/brightness
+ chown system system /sys/class/leds/led:rgb_green/ramp_step_ms
+ chown system system /sys/class/leds/led:rgb_green/duty_pcts
+ chown system system /sys/class/leds/led:rgb_green/blink
+ chown system system /sys/class/leds/led:rgb_blue/brightness
+ chown system system /sys/class/leds/led:rgb_blue/ramp_step_ms
+ chown system system /sys/class/leds/led:rgb_blue/duty_pcts
+ chown system system /sys/class/leds/led:rgb_blue/blink
diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc
index 650b891..9f33fec 100644
--- a/rootdir/etc/init.qcom.usb.rc
+++ b/rootdir/etc/init.qcom.usb.rc
@@ -33,15 +33,6 @@ on boot
write /sys/class/android_usb/android0/f_rndis/vendorID 22D9
write /sys/class/android_usb/android0/f_rndis/wceis 1
-on property:sys.usb.config=charging
- stop adbd
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 22D9
- write /sys/class/android_usb/android0/idProduct 2768
- write /sys/class/android_usb/android0/functions charging
- write /sys/class/android_usb/android0/enable 1
- setprop sys.usb.state ${sys.usb.config}
-
on property:sys.usb.config=mtp
stop adbd
write /sys/class/android_usb/android0/enable 0
@@ -201,6 +192,26 @@ on property:sys.usb.config=rndis,diag,adb
start adbd
setprop sys.usb.state ${sys.usb.config}
+# USB midi configuration
+on property:sys.usb.config=midi
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 22D9
+ write /sys/class/android_usb/android0/idProduct 6776
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# USB midi configuration, with adb
+on property:sys.usb.config=midi,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 22D9
+ write /sys/class/android_usb/android0/idProduct 6777
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial 0123456789ABCDEF
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
index 99212cd..70936bc 100755
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -1,7 +1,24 @@
-#!/bin/sh
+#!/bin/bash
+#
+# Copyright (C) 2016 The CyanogenMod 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.
+#
set -e
-export DEVICE=find7
+export DEVICE=find7-common
+export DEVICE_COMMON=msm8974-common
export VENDOR=oppo
-./../../oppo/msm8974-common/setup-makefiles.sh $@
+
+./../$DEVICE_COMMON/setup-makefiles.sh $@
diff --git a/system.prop b/system.prop
new file mode 100644
index 0000000..191e4a5
--- /dev/null
+++ b/system.prop
@@ -0,0 +1,19 @@
+# RIL
+rild.libpath=/system/vendor/lib/libril-qc-qmi-1.so
+persist.radio.add_power_save=1
+persist.radio.apm_sim_not_pwdn=1
+
+# Sensors
+ro.qc.sdk.camera.facialproc=true
+ro.qc.sdk.gestures.camera=false
+ro.qti.sdk.sensors.gestures=true
+ro.qti.sensors.bte=true
+ro.qti.sensors.gtap=true
+ro.qti.sensors.ir_proximity=true
+ro.qti.sensors.vmd=true
+
+# CABL is handled by the panel
+ro.qualcomm.cabl=0
+
+# By default, primary storage is physical
+ro.vold.primary_physical=1
diff --git a/system_prop.mk b/system_prop.mk
deleted file mode 100644
index 7208a67..0000000
--- a/system_prop.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# RIL
-PRODUCT_PROPERTY_OVERRIDES += \
- rild.libpath=/system/vendor/lib/libril-qc-qmi-1.so \
- persist.radio.add_power_save=1
-
-# Sensors
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.qc.sdk.camera.facialproc=true \
- ro.qc.sdk.gestures.camera=false \
- ro.qti.sdk.sensors.gestures=true \
- ro.qti.sensors.bte=true \
- ro.qti.sensors.gtap=true \
- ro.qti.sensors.vmd=true \
-
-# GPS
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.gps.qc_nlp_in_use=0 \
- ro.gps.agps_provider=1
-
-# CABL is handled by the panel
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.qualcomm.cabl=0