summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-28 23:32:30 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-28 23:32:30 +0000
commit371f6a4a3ced85142a16328d8ce652c4b748d2ae (patch)
treee33de71ddd8f6b74e5ece1130178046fb973f8e0
parent93827d19f8c78f8adbc9d084d5c3d585a78bb20b (diff)
parent1e670fbd27f1238fbac3c3bcb6f95d632ff00a51 (diff)
downloadmarlin-oreo-m5-release.tar.gz
Change-Id: Ife3d2f5453033e102d728c028d79e0b84b289eb5
-rw-r--r--camera/QCamera2/HAL3/QCamera3Channel.cpp10
-rw-r--r--camera/QCamera2/HAL3/QCamera3HWI.cpp66
-rw-r--r--camera/QCamera2/HAL3/QCamera3HWI.h1
-rw-r--r--camera/QCamera2/HAL3/QCamera3Stream.cpp2
-rw-r--r--camera/QCamera2/QCamera2Factory.cpp5
-rw-r--r--default-permissions.xml16
-rw-r--r--device-common.mk9
-rw-r--r--device-marlin.mk7
-rw-r--r--device-sailfish.mk7
-rwxr-xr-xdumpstate/DumpstateDevice.cpp6
-rw-r--r--init.common.diag.rc.userdebug8
-rw-r--r--init.common.rc16
-rw-r--r--manifest.xml2
-rw-r--r--marlin/BoardConfig.mk4
-rw-r--r--marlin/android_filesystem_config.h5
-rw-r--r--media_codecs_performance.xml171
-rwxr-xr-xoverlay/frameworks/base/core/res/res/values/config.xml4
-rw-r--r--p2p_supplicant_overlay.conf1
-rw-r--r--sailfish/BoardConfig.mk4
-rw-r--r--sailfish/android_filesystem_config.h5
-rw-r--r--self-extractors/extract-lists.txt2
-rw-r--r--self-extractors/qcom/staging/device-partial.mk2
-rw-r--r--self-extractors_sailfish/extract-lists.txt2
-rw-r--r--self-extractors_sailfish/qcom/staging/device-partial.mk2
-rw-r--r--sepolicy/bootanim.te5
-rw-r--r--sepolicy/cnd.te3
-rw-r--r--sepolicy/cnss_diag.te3
-rw-r--r--sepolicy/file.te3
-rw-r--r--sepolicy/genfs_contexts4
-rw-r--r--sepolicy/hal_camera_default.te4
-rw-r--r--sepolicy/hal_dumpstate_impl.te6
-rw-r--r--sepolicy/hal_graphics_composer_default.te3
-rw-r--r--sepolicy/hal_nfc_default.te2
-rw-r--r--sepolicy/hal_power.te2
-rw-r--r--sepolicy/hal_thermal.te4
-rw-r--r--sepolicy/hal_wifi.te3
-rw-r--r--sepolicy/ims.te3
-rw-r--r--sepolicy/kernel.te3
-rw-r--r--sepolicy/logger_app.te1
-rw-r--r--sepolicy/priv_app.te6
-rw-r--r--sepolicy/property.te1
-rw-r--r--sepolicy/property_contexts1
-rw-r--r--sepolicy/radio.te3
-rw-r--r--sepolicy/rild.te6
-rw-r--r--sepolicy/rmt.te3
-rw-r--r--sepolicy/system_app.te4
-rw-r--r--sepolicy/thermal-engine.te10
-rw-r--r--sepolicy/time.te3
-rw-r--r--sepolicy/vold.te3
-rw-r--r--sepolicy/wcnss_filter.te9
-rwxr-xr-xthermal-engine-marlin-vr.conf4
-rwxr-xr-xthermal-engine-marlin.conf13
-rw-r--r--thermal/Android.mk29
-rw-r--r--thermal/thermal.c281
54 files changed, 303 insertions, 479 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3Channel.cpp b/camera/QCamera2/HAL3/QCamera3Channel.cpp
index fcfe70db..7148d1ba 100644
--- a/camera/QCamera2/HAL3/QCamera3Channel.cpp
+++ b/camera/QCamera2/HAL3/QCamera3Channel.cpp
@@ -2297,6 +2297,8 @@ void QCamera3RawChannel::convertMipiToRaw16(mm_camera_buf_def_t *frame)
uint32_t raw16_stride = ((uint32_t)dim.width + 15U) & ~15U;
uint16_t* raw16_buffer = (uint16_t *)frame->buffer;
+ uint8_t first_quintuple[5];
+ memcpy(first_quintuple, raw16_buffer, sizeof(first_quintuple));
// In-place format conversion.
// Raw16 format always occupy more memory than opaque raw10.
@@ -2312,13 +2314,19 @@ void QCamera3RawChannel::convertMipiToRaw16(mm_camera_buf_def_t *frame)
for (int32_t xs = dim.width - 1; xs >= 0; xs--) {
uint32_t x = (uint32_t)xs;
uint8_t upper_8bit = row_start[5*(x/4)+x%4];
- uint8_t lower_2bit = ((row_start[5*(x/4)+4] >> (x%4)) & 0x3);
+ uint8_t lower_2bit = ((row_start[5*(x/4)+4] >> ((x%4) << 1)) & 0x3);
uint16_t raw16_pixel =
(uint16_t)(((uint16_t)upper_8bit)<<2 |
(uint16_t)lower_2bit);
raw16_buffer[y*raw16_stride+x] = raw16_pixel;
}
}
+
+ // Re-convert the first 2 pixels of the buffer because the loop above messes
+ // them up by reading the first quintuple while modifying it.
+ raw16_buffer[0] = ((uint16_t)first_quintuple[0]<<2) | (first_quintuple[4] & 0x3);
+ raw16_buffer[1] = ((uint16_t)first_quintuple[1]<<2) | ((first_quintuple[4] >> 2) & 0x3);
+
} else {
LOGE("Could not find stream");
}
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 8dfec977..3b49d5e9 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -3089,9 +3089,10 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
i->frame_number, urgent_frame_number);
if ((!i->input_buffer) && (i->frame_number < urgent_frame_number) &&
- (i->partial_result_cnt == 0)) {
+ (i->partial_result_cnt == 0)) {
LOGE("Error: HAL missed urgent metadata for frame number %d",
i->frame_number);
+ i->partialResultDropped = true;
i->partial_result_cnt++;
}
@@ -3181,23 +3182,15 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
/* we could hit this case when we either
* 1. have a pending reprocess request or
* 2. miss a metadata buffer callback */
+ bool errorResult = false;
if (i->frame_number < frame_number) {
if (i->input_buffer) {
/* this will be handled in handleInputBufferWithLock */
i++;
continue;
} else {
-
- CameraMetadata dummyMetadata;
- dummyMetadata.update(ANDROID_REQUEST_ID, &(i->request_id), 1);
- result.result = dummyMetadata.release();
-
- notifyError(i->frame_number, CAMERA3_MSG_ERROR_RESULT);
-
- // partial_result should be PARTIAL_RESULT_CNT in case of
- // ERROR_RESULT.
- i->partial_result_cnt = PARTIAL_RESULT_COUNT;
- result.partial_result = PARTIAL_RESULT_COUNT;
+ mPendingLiveRequest--;
+ errorResult = true;
}
} else {
mPendingLiveRequest--;
@@ -3211,6 +3204,8 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
notify_msg.message.shutter.timestamp = (uint64_t)capture_time;
mCallbackOps->notify(mCallbackOps, &notify_msg);
+ errorResult = i->partialResultDropped;
+
i->timestamp = capture_time;
/* Set the timestamp in display metadata so that clients aware of
@@ -3267,7 +3262,11 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
}
}
}
- if (!result.result) {
+ if (errorResult) {
+ notifyError(i->frame_number, CAMERA3_MSG_ERROR_RESULT);
+ }
+
+ if (!errorResult && !result.result) {
LOGE("metadata is NULL");
}
result.frame_number = i->frame_number;
@@ -3277,7 +3276,7 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
for (List<RequestedBufferInfo>::iterator j = i->buffers.begin();
j != i->buffers.end(); j++) {
if (j->buffer) {
- result.num_output_buffers++;
+ result.num_output_buffers++;
}
}
@@ -3315,18 +3314,19 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
mCallbackOps->process_capture_result(mCallbackOps, &result);
LOGD("meta frame_number = %u, capture_time = %lld",
result.frame_number, i->timestamp);
- free_camera_metadata((camera_metadata_t *)result.result);
delete[] result_buffers;
}else {
LOGE("Fatal error: out of memory");
}
- } else {
+ } else if (!errorResult) {
mCallbackOps->process_capture_result(mCallbackOps, &result);
LOGD("meta frame_number = %u, capture_time = %lld",
result.frame_number, i->timestamp);
- free_camera_metadata((camera_metadata_t *)result.result);
}
+ if (result.result) {
+ free_camera_metadata((camera_metadata_t *)result.result);
+ }
i = erasePendingRequest(i);
if (!mPendingReprocessResultList.empty()) {
@@ -4218,7 +4218,7 @@ no_error:
mLastCustIntentFrmNum = frameNumber;
}
/* Update pending request list and pending buffers map */
- PendingRequestInfo pendingRequest;
+ PendingRequestInfo pendingRequest = {};
pendingRequestIterator latestRequest;
pendingRequest.frame_number = frameNumber;
pendingRequest.num_buffers = request->num_output_buffers;
@@ -7944,6 +7944,12 @@ int QCamera3HardwareInterface::initStaticMetadata(uint32_t cameraId)
ANDROID_STATISTICS_LENS_SHADING_MAP_MODE, ANDROID_TONEMAP_CURVE_BLUE,
ANDROID_TONEMAP_CURVE_GREEN, ANDROID_TONEMAP_CURVE_RED, ANDROID_TONEMAP_MODE,
ANDROID_BLACK_LEVEL_LOCK, NEXUS_EXPERIMENTAL_2016_HYBRID_AE_ENABLE,
+ QCAMERA3_PRIVATEDATA_REPROCESS, QCAMERA3_CDS_MODE, QCAMERA3_CDS_INFO,
+ QCAMERA3_CROP_COUNT_REPROCESS, QCAMERA3_CROP_REPROCESS,
+ QCAMERA3_CROP_ROI_MAP_REPROCESS, QCAMERA3_TEMPORAL_DENOISE_ENABLE,
+ QCAMERA3_TEMPORAL_DENOISE_PROCESS_TYPE, QCAMERA3_USE_AV_TIMER,
+ QCAMERA3_DUALCAM_LINK_ENABLE, QCAMERA3_DUALCAM_LINK_IS_MAIN,
+ QCAMERA3_DUALCAM_LINK_RELATED_CAMERA_ID,
/* DevCamDebug metadata request_keys_basic */
DEVCAMDEBUG_META_ENABLE,
/* DevCamDebug metadata end */
@@ -7985,6 +7991,13 @@ int QCamera3HardwareInterface::initStaticMetadata(uint32_t cameraId)
ANDROID_STATISTICS_FACE_SCORES,
NEXUS_EXPERIMENTAL_2016_HYBRID_AE_ENABLE,
NEXUS_EXPERIMENTAL_2016_AF_SCENE_CHANGE,
+ QCAMERA3_PRIVATEDATA_REPROCESS, QCAMERA3_CDS_MODE, QCAMERA3_CDS_INFO,
+ QCAMERA3_CROP_COUNT_REPROCESS, QCAMERA3_CROP_REPROCESS,
+ QCAMERA3_CROP_ROI_MAP_REPROCESS, QCAMERA3_TUNING_META_DATA_BLOB,
+ QCAMERA3_TEMPORAL_DENOISE_ENABLE, QCAMERA3_TEMPORAL_DENOISE_PROCESS_TYPE,
+ QCAMERA3_SENSOR_DYNAMIC_BLACK_LEVEL_PATTERN,
+ QCAMERA3_DUALCAM_LINK_ENABLE, QCAMERA3_DUALCAM_LINK_IS_MAIN,
+ QCAMERA3_DUALCAM_LINK_RELATED_CAMERA_ID,
// DevCamDebug metadata result_keys_basic
DEVCAMDEBUG_META_ENABLE,
// DevCamDebug metadata result_keys AF
@@ -8115,7 +8128,8 @@ int QCamera3HardwareInterface::initStaticMetadata(uint32_t cameraId)
ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE,
ANDROID_SHADING_AVAILABLE_MODES,
ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL,
- ANDROID_SENSOR_OPAQUE_RAW_SIZE };
+ ANDROID_SENSOR_OPAQUE_RAW_SIZE, QCAMERA3_OPAQUE_RAW_FORMAT
+ };
Vector<int32_t> available_characteristics_keys;
available_characteristics_keys.appendArray(characteristics_keys_basic,
@@ -8123,9 +8137,6 @@ int QCamera3HardwareInterface::initStaticMetadata(uint32_t cameraId)
if (hasBlackRegions) {
available_characteristics_keys.add(ANDROID_SENSOR_OPTICAL_BLACK_REGIONS);
}
- staticInfo.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
- available_characteristics_keys.array(),
- available_characteristics_keys.size());
/*available stall durations depend on the hw + sw and will be different for different devices */
/*have to add for raw after implementation*/
@@ -8195,8 +8206,15 @@ int QCamera3HardwareInterface::initStaticMetadata(uint32_t cameraId)
&gCamCapability[cameraId]->padding_info, &buf_planes);
strides.add(buf_planes.plane_info.mp[0].stride);
}
- staticInfo.update(QCAMERA3_OPAQUE_RAW_STRIDES, strides.array(),
- strides.size());
+
+ if (!strides.isEmpty()) {
+ staticInfo.update(QCAMERA3_OPAQUE_RAW_STRIDES, strides.array(),
+ strides.size());
+ available_characteristics_keys.add(QCAMERA3_OPAQUE_RAW_STRIDES);
+ }
+ staticInfo.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
+ available_characteristics_keys.array(),
+ available_characteristics_keys.size());
Vector<int32_t> opaque_size;
for (size_t j = 0; j < scalar_formats_count; j++) {
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.h b/camera/QCamera2/HAL3/QCamera3HWI.h
index e1e1294b..7739b516 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.h
+++ b/camera/QCamera2/HAL3/QCamera3HWI.h
@@ -431,6 +431,7 @@ private:
bool focusStateSent = false;
bool focusStateValid = false;
uint8_t focusState = ANDROID_CONTROL_AF_STATE_INACTIVE;
+ bool partialResultDropped; // Whether partial metadata is dropped.
} PendingRequestInfo;
typedef struct {
uint32_t frame_number;
diff --git a/camera/QCamera2/HAL3/QCamera3Stream.cpp b/camera/QCamera2/HAL3/QCamera3Stream.cpp
index 0cf2c7a0..249fa9de 100644
--- a/camera/QCamera2/HAL3/QCamera3Stream.cpp
+++ b/camera/QCamera2/HAL3/QCamera3Stream.cpp
@@ -707,10 +707,10 @@ void *QCamera3Stream::dataProcRoutine(void *data)
break;
case CAMERA_CMD_TYPE_EXIT:
LOGH("Exit");
+ pme->flushFreeBatchBufQ();
/* flush data buf queue */
pme->mDataQ.flush();
pme->mTimeoutFrameQ.clear();
- pme->flushFreeBatchBufQ();
running = 0;
break;
default:
diff --git a/camera/QCamera2/QCamera2Factory.cpp b/camera/QCamera2/QCamera2Factory.cpp
index a464a3e2..dfa900a6 100644
--- a/camera/QCamera2/QCamera2Factory.cpp
+++ b/camera/QCamera2/QCamera2Factory.cpp
@@ -70,7 +70,6 @@ volatile uint32_t gKpiDebugLevel = 1;
*==========================================================================*/
QCamera2Factory::QCamera2Factory()
{
- camera_info info;
mHalDescriptors = NULL;
mCallbacks = NULL;
mNumOfCameras = get_num_of_cameras();
@@ -111,10 +110,6 @@ QCamera2Factory::QCamera2Factory()
mHalDescriptors[i].device_version =
CAMERA_DEVICE_API_VERSION_1_0;
}
- //Query camera at this point in order
- //to avoid any delays during subsequent
- //calls to 'getCameraInfo()'
- getCameraInfo(i, &info);
}
} else {
LOGE("Not enough resources to allocate HAL descriptor table!");
diff --git a/default-permissions.xml b/default-permissions.xml
index 5516119c..3f20f740 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -48,8 +48,12 @@
<exception
package="com.verizon.mips.services">
+ <!-- Call -->
+ <permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
<!-- Phone -->
<permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
+ <!-- SMS -->
+ <permission name="android.permission.RECEIVE_SMS" fixed="false"/>
</exception>
<exception
@@ -62,4 +66,16 @@
<permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
</exception>
+ <exception
+ package="com.google.vr.apps.ornament"
+ sha256-cert-digest="4A:9E:3F:3B:C8:D6:0C:E4:D3:CB:E5:A9:C6:6E:EC:11:EF:D0:1C:5F:E9:C7:8D:8C:92:3B:9D:42:48:23:00:13">
+ <!-- Camera -->
+ <permission name="android.permission.CAMERA" fixed="false"/>
+ <!-- Microphone -->
+ <permission name="android.permission.RECORD_AUDIO" fixed="false"/>
+ <!-- Storage -->
+ <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
+ <permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
+ </exception>
+
</exceptions>
diff --git a/device-common.mk b/device-common.mk
index 4a17a62c..08ef6442 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -70,6 +70,10 @@ endif
PRODUCT_PROPERTY_OVERRIDES += \
ro.opengles.version=196610
+# b/68017541
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.qcom.adreno.qgl.ShaderStorageImageExtendedFormats=0
+
# HWUI common settings
PRODUCT_PROPERTY_OVERRIDES += \
ro.hwui.gradient_cache_size=1 \
@@ -134,7 +138,6 @@ PRODUCT_PACKAGES += \
android.hardware.nfc@1.0-service \
android.hardware.power@1.1-service.marlin \
android.hardware.sensors@1.0-service \
- android.hardware.thermal@1.0-service \
android.hardware.vr@1.0-service \
PRODUCT_PROPERTY_OVERRIDES += ro.hardware.power=marlin
@@ -471,10 +474,6 @@ PRODUCT_PACKAGES += \
Tag \
android.hardware.nfc@1.0-impl
-# Thermal HAL
-PRODUCT_PACKAGES += \
- android.hardware.thermal@1.0-impl
-
#GNSS HAL
PRODUCT_PACKAGES += \
android.hardware.gnss@1.0-impl
diff --git a/device-marlin.mk b/device-marlin.mk
index 2e37809f..9e30e581 100644
--- a/device-marlin.mk
+++ b/device-marlin.mk
@@ -33,7 +33,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Audio
PRODUCT_PROPERTY_OVERRIDES += \
- ro.config.vc_call_vol_steps=7
+ ro.config.vc_call_vol_steps=7 \
+ fmas.hdph_sgain=0
# HWUI cache sizes
PRODUCT_PROPERTY_OVERRIDES += \
@@ -61,10 +62,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
lights.marlin
-# Thermal packages
-PRODUCT_PACKAGES += \
- thermal.marlin
-
# VR packages
PRODUCT_PACKAGES += \
vr.marlin
diff --git a/device-sailfish.mk b/device-sailfish.mk
index aad9d2ca..2127727a 100644
--- a/device-sailfish.mk
+++ b/device-sailfish.mk
@@ -33,7 +33,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Audio
PRODUCT_PROPERTY_OVERRIDES += \
- ro.config.vc_call_vol_steps=7
+ ro.config.vc_call_vol_steps=7 \
+ fmas.hdph_sgain=0
# HWUI cache sizes
PRODUCT_PROPERTY_OVERRIDES += \
@@ -61,10 +62,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
lights.sailfish
-# Thermal packages
-PRODUCT_PACKAGES += \
- thermal.sailfish
-
# VR packages
PRODUCT_PACKAGES += \
vr.sailfish
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index 9e4423ab..01db23ff 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -138,6 +138,12 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
DumpFileToFd(fd, "CPU online", "/sys/devices/system/cpu/online");
DumpFileToFd(fd, "INTERRUPTS", "/proc/interrupts");
+ DumpFileToFd(fd, "UFS model", "/sys/block/sda/device/model");
+ DumpFileToFd(fd, "UFS rev", "/sys/block/sda/device/rev");
+ DumpFileToFd(fd, "UFS size", "/sys/block/sda/size");
+ DumpFileToFd(fd, "UFS heath", "/sys/devices/soc/624000.ufshc/health");
+ RunCommandToFd(fd, "UFS dump", {"/vendor/bin/sh", "-c", "for f in $(find /sys/kernel/debug/ufshcd0 -type f); do if [[ -r $f && -f $f ]]; then echo --- $f; cat $f; fi; done"});
+
DumpFileToFd(fd, "RPM Stats", "/d/rpm_stats");
DumpFileToFd(fd, "Power Management Stats", "/d/rpm_master_stats");
DumpFileToFd(fd, "WLAN Power Stats", "/d/wlan_wcnss/power_stats");
diff --git a/init.common.diag.rc.userdebug b/init.common.diag.rc.userdebug
index a678b810..03533e70 100644
--- a/init.common.diag.rc.userdebug
+++ b/init.common.diag.rc.userdebug
@@ -125,3 +125,11 @@ on property:persist.sys.crash_rcu=true
on property:persist.sys.crash_rcu=false
write /proc/sys/kernel/panic_on_rcu_stall 0
+
+on property:sys.logger.bluetooth=true
+ setprop persist.service.bdroid.snooplog true
+ setprop persist.service.bdroid.fwsnoop true
+
+on property:sys.logger.bluetooth=false
+ setprop persist.service.bdroid.snooplog false
+ setprop persist.service.bdroid.fwsnoop false
diff --git a/init.common.rc b/init.common.rc
index cd660436..84bd4608 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -84,7 +84,7 @@ on init
write /dev/stune/foreground/schedtune.prefer_idle 1
write /dev/stune/top-app/schedtune.boost 10
write /dev/stune/top-app/schedtune.prefer_idle 1
- write /dev/stune/rt/schedtune.boost 20
+ write /dev/stune/rt/schedtune.boost 30
write /dev/stune/rt/schedtune.prefer_idle 1
# Create UDS structure for base VR services.
@@ -649,7 +649,7 @@ service ss_ramdump /vendor/bin/subsystem_ramdump
on property:persist.sys.ssr.enable_ramdumps=1
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
mkdir /data/vendor/ramdump 761 root system
- mkdir /data/vendor/ssrdump 761 root system
+ mkdir /data/vendor/ssrdump 771 root system
start ss_ramdump
on property:persist.sys.ssr.enable_ramdumps=0
@@ -814,6 +814,18 @@ on property:sys.boot_completed=1
write /sys/block/dm-1/queue/read_ahead_kb 128
write /sys/block/sda/queue/iostats 1
+ # UFS health
+ chmod 755 /sys/kernel/debug/ufshcd0
+ chown 644 /sys/kernel/debug/ufshcd0/err_state
+ chmod 644 /sys/kernel/debug/ufshcd0/power_mode
+ chmod 644 /sys/kernel/debug/ufshcd0/host_regs
+ chmod 644 /sys/kernel/debug/ufshcd0/show_hba
+ chmod 644 /sys/kernel/debug/ufshcd0/dump_device_desc
+ chmod 755 /sys/kernel/debug/ufshcd0/stats
+ chmod 644 /sys/kernel/debug/ufshcd0/stats/req_stats
+ chmod 644 /sys/kernel/debug/ufshcd0/stats/query_stats
+ chmod 644 /sys/kernel/debug/ufshcd0/stats/err_stats
+
on property:sys.boot_completed=1 && property:ro.build.type=user
write /proc/sys/kernel/modules_disabled 1
diff --git a/manifest.xml b/manifest.xml
index da729e21..8dd77ceb 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -259,7 +259,7 @@
<hal format="hidl">
<name>android.hardware.thermal</name>
<transport>hwbinder</transport>
- <version>1.0</version>
+ <version>1.1</version>
<interface>
<name>IThermal</name>
<instance>default</instance>
diff --git a/marlin/BoardConfig.mk b/marlin/BoardConfig.mk
index 56ac136c..391363d8 100644
--- a/marlin/BoardConfig.mk
+++ b/marlin/BoardConfig.mk
@@ -100,7 +100,7 @@ endif
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=marlin user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff loop.max_part=7
-BOARD_ROOT_EXTRA_FOLDERS := bt_firmware firmware firmware/radio persist
+BOARD_ROOT_EXTRA_FOLDERS := firmware firmware/radio persist
BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp
BOARD_SEPOLICY_DIRS += device/google/marlin/sepolicy
@@ -200,7 +200,7 @@ BOARD_USES_SYSTEM_OTHER_ODEX := true
TARGET_COPY_OUT_VENDOR := vendor
#NFC
-NXP_CHIP_TYPE := PN551
+NXP_CHIP_TYPE := 3
# Testing related defines
BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/sailin-setup.sh
diff --git a/marlin/android_filesystem_config.h b/marlin/android_filesystem_config.h
index bc92bd47..dfec7d64 100644
--- a/marlin/android_filesystem_config.h
+++ b/marlin/android_filesystem_config.h
@@ -21,9 +21,8 @@
#include <private/android_filesystem_config.h>
-static const struct fs_path_config android_device_dirs[] = {
- { 00771, AID_SYSTEM, AID_SYSTEM, 0, "bt_firmware"},
-};
+#define NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
+/* static const struct fs_path_config android_device_dirs[] = { }; */
/* Rules for files.
** These rules are applied based on "first match", so they
diff --git a/media_codecs_performance.xml b/media_codecs_performance.xml
index 2927c7ee..2ad4847b 100644
--- a/media_codecs_performance.xml
+++ b/media_codecs_performance.xml
@@ -14,140 +14,139 @@
limitations under the License.
-->
-<!-- Generated file for marlin/sailfish using measurements between OPM1.170809.002/OPM1.170810.002 and OPM1.170904.001 -->
+<!-- Generated file for marlin/sailfish using measurements between OPM1.170817.003/OPM1.170821.001 and OPM1.170911.003 -->
<MediaCodecs>
<Encoders>
<MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" update="true">
- <!-- measured 98%:73-154 med:111/111 FLAKY(56 - 222 < mx=230.8) -->
- <Limit name="measured-frame-rate-176x144" range="111-116" /> <!-- TWEAKED N=188 v98%=1.5 -->
- <Limit name="measured-frame-rate-352x288" range="87-87" /> <!-- N=198 v98%=1.4 -->
+ <!-- measured 98%:73-177 med:114/114 FLAKY(57 - 228 < mx=230.8) -->
+ <Limit name="measured-frame-rate-176x144" range="114-114" /> <!-- N=164 v98%=1.6 -->
+ <Limit name="measured-frame-rate-352x288" range="89-89" /> <!-- N=180 v98%=1.4 -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
- <!-- measured 98%:60-173 med:91/90 FLAKY(45 - 180 < mx=202.2) -->
- <Limit name="measured-frame-rate-320x240" range="90-102" /> <!-- TWEAKED N=198 v98%=1.7 -->
- <Limit name="measured-frame-rate-720x480" range="55-55" /> <!-- N=188 v98%=1.4 -->
- <Limit name="measured-frame-rate-1280x720" range="33-33" /> <!-- N=188 v98%=1.2 -->
- <Limit name="measured-frame-rate-1920x1080" range="23-23" /> <!-- N=188 v98%=1.2 -->
+ <!-- measured 98%:60-173 med:93/93 FLAKY(47 - 186 < mx=202.2) -->
+ <Limit name="measured-frame-rate-320x240" range="93-102" /> <!-- TWEAKED N=178 v98%=1.7 -->
+ <Limit name="measured-frame-rate-720x480" range="55-55" /> <!-- N=166 v98%=1.4 -->
+ <Limit name="measured-frame-rate-1280x720" range="34-34" /> <!-- N=164 v98%=1.2 -->
+ <Limit name="measured-frame-rate-1920x1080" range="23-23" /> <!-- N=164 v98%=1.2 -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
- <!-- measured 98%:63-168 med:94/94 FLAKY(47 - 188 < mx=204.6) -->
- <Limit name="measured-frame-rate-320x240" range="94-103" /> <!-- TWEAKED N=194 v98%=1.6 (OPM1.170807.001-) -->
- <Limit name="measured-frame-rate-720x480" range="55-55" /> <!-- N=188 v98%=1.3 -->
- <Limit name="measured-frame-rate-1280x720" range="33-33" /> <!-- N=188 v98%=1.3 -->
- <Limit name="measured-frame-rate-1920x1080" range="24-24" /> <!-- N=188 v98%=1.3 -->
- <!-- measured 98%:8-31 med:19/22 FLAKY(8 - 46) -->
- <Limit name="measured-frame-rate-3840x2160" range="15-23" /> <!-- TWEAKED N=196 v98%=1.9 -->
+ <!-- measured 98%:63-168 med:96/97 FLAKY(48 - 194 < mx=204.6) -->
+ <Limit name="measured-frame-rate-320x240" range="96-103" /> <!-- TWEAKED N=178 v98%=1.6 (OPM1.170817.002-) -->
+ <Limit name="measured-frame-rate-720x480" range="56-56" /> <!-- N=164 v98%=1.2 -->
+ <Limit name="measured-frame-rate-1280x720" range="33-33" /> <!-- N=166 v98%=1.3 -->
+ <Limit name="measured-frame-rate-1920x1080" range="24-24" /> <!-- N=166 v98%=1.3 -->
+ <Limit name="measured-frame-rate-3840x2160" range="15-23" /> <!-- N=168 v98%=1.9 -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" update="true">
- <Limit name="measured-frame-rate-176x144" range="108-108" /> <!-- N=190 v98%=1.5 -->
- <Limit name="measured-frame-rate-352x288" range="83-83" /> <!-- N=198 v98%=1.5 -->
- <Limit name="measured-frame-rate-640x480" range="59-59" /> <!-- N=192 v98%=1.4 (OPM1.170803.002-) -->
+ <Limit name="measured-frame-rate-176x144" range="109-109" /> <!-- N=168 v98%=1.7 -->
+ <Limit name="measured-frame-rate-352x288" range="84-84" /> <!-- N=166 v98%=1.5 -->
+ <Limit name="measured-frame-rate-640x480" range="61-61" /> <!-- N=172 v98%=1.4 (OPM1.170817.001-) -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
- <Limit name="measured-frame-rate-320x180" range="95-95" /> <!-- N=200 v98%=1.6 -->
- <Limit name="measured-frame-rate-640x360" range="66-66" /> <!-- N=190 v98%=1.3 -->
- <Limit name="measured-frame-rate-1280x720" range="32-32" /> <!-- N=194 v98%=1.3 -->
- <Limit name="measured-frame-rate-1920x1080" range="22-22" /> <!-- N=198 v98%=1.4 -->
+ <Limit name="measured-frame-rate-320x180" range="95-95" /> <!-- N=170 v98%=1.6 -->
+ <Limit name="measured-frame-rate-640x360" range="68-68" /> <!-- N=168 v98%=1.4 -->
+ <Limit name="measured-frame-rate-1280x720" range="32-32" /> <!-- N=162 v98%=1.3 -->
+ <Limit name="measured-frame-rate-1920x1080" range="21-21" /> <!-- N=166 v98%=1.4 -->
</MediaCodec>
<MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
- <!-- measured 98%:71-233 med:135/136 FLAKY(mn=61.2 < 68 - 272 < mx=308.3) -->
- <Limit name="measured-frame-rate-176x144" range="122-155" /> <!-- TWEAKED N=198 v98%=1.8 -->
+ <!-- measured 98%:71-309 med:137/135 FLAKY(mn=61.2 < 68 - 310 < mx=394.3) variance:2.1 -->
+ <Limit name="measured-frame-rate-176x144" range="135-198" /> <!-- TWEAKED N=180 -->
</MediaCodec>
<MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
- <Limit name="measured-frame-rate-320x240" range="264-264" /> <!-- N=192 v98%=1.4 (OPM1.170803.002-) -->
- <Limit name="measured-frame-rate-720x480" range="123-123" /> <!-- N=190 v98%=1.4 -->
- <!-- measured 98%:36-89 med:72/73 FLAKY(mn=34.6 < 36 - 146) -->
- <Limit name="measured-frame-rate-1280x720" range="69-73" /> <!-- TWEAKED N=186 v98%=1.6 -->
- <!-- measured 98%:26-48 med:38/37 FLAKY(mn=17.1 < 19 - 74) -->
- <Limit name="measured-frame-rate-1920x1080" range="34-37" /> <!-- TWEAKED N=188 v98%=1.4 -->
+ <!-- measured 98%:163-310 med:268/266 FLAKY(mn=130.7 < 133 - 532) -->
+ <Limit name="measured-frame-rate-320x240" range="261-266" /> <!-- TWEAKED N=174 v98%=1.4 (OPM1.170817.001-) -->
+ <Limit name="measured-frame-rate-720x480" range="126-126" /> <!-- N=168 v98%=1.4 -->
+ <!-- measured 98%:35-90 med:70/72 FLAKY(mn=33.8 < 35 - 144) -->
+ <Limit name="measured-frame-rate-1280x720" range="67-72" /> <!-- TWEAKED N=162 v98%=1.6 -->
+ <!-- measured 98%:26-50 med:35/37 FLAKY(mn=17.1 < 18 - 74) -->
+ <Limit name="measured-frame-rate-1920x1080" range="35-37" /> <!-- N=164 v98%=1.4 -->
</MediaCodec>
<MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
- <!-- measured 96%:75-260 med:138/138 FLAKY(mn=60.9 < 69 - 276 < mx=386.7) -->
- <Limit name="measured-frame-rate-176x144" range="121-194" /> <!-- TWEAKED N=190 v96%=1.9 -->
+ <!-- measured 95%:75-260 med:139/140 FLAKY(mn=60.9 < 70 - 280 < mx=386.7) -->
+ <Limit name="measured-frame-rate-176x144" range="121-140" /> <!-- TWEAKED N=166 v95%=1.9 -->
</MediaCodec>
<MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
- <!-- measured 98%:44-145 med:105/105 FLAKY(mn=40.6 < 44 - 210) -->
- <Limit name="measured-frame-rate-320x180" range="81-105" /> <!-- TWEAKED N=190 v98%=1.8 -->
- <Limit name="measured-frame-rate-640x360" range="38-39" /> <!-- N=198 v98%=1.3 -->
- <Limit name="measured-frame-rate-1280x720" range="38-38" /> <!-- N=198 v98%=1.1 -->
- <Limit name="measured-frame-rate-1920x1080" range="20-20" /> <!-- N=190 v98%=1.2 -->
+ <!-- measured 98%:42-145 med:84/85 FLAKY(mn=40.2 < 41 - 176) -->
+ <Limit name="measured-frame-rate-320x180" range="80-88" /> <!-- TWEAKED N=168 v98%=1.8 -->
+ <Limit name="measured-frame-rate-640x360" range="38-38" /> <!-- N=166 v98%=1.3 -->
+ <Limit name="measured-frame-rate-1280x720" range="38-38" /> <!-- N=166 v98%=1.1 -->
+ <Limit name="measured-frame-rate-1920x1080" range="21-21" /> <!-- N=168 v98%=1.2 -->
</MediaCodec>
<MediaCodec name="OMX.google.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
- <Limit name="measured-frame-rate-320x180" range="142-142" /> <!-- N=198 v98%=1.1 -->
- <Limit name="measured-frame-rate-640x360" range="52-52" /> <!-- N=188 v98%=1.1 -->
- <Limit name="measured-frame-rate-1280x720" range="13-13" /> <!-- N=190 v98%=1.1 -->
+ <Limit name="measured-frame-rate-320x180" range="142-142" /> <!-- N=166 v98%=1.1 -->
+ <Limit name="measured-frame-rate-640x360" range="52-52" /> <!-- N=164 v98%=1.1 -->
+ <Limit name="measured-frame-rate-1280x720" range="13-13" /> <!-- N=168 v98%=1.1 -->
<Limit name="measured-frame-rate-1920x1080" range="5-5" /> <!-- N=132 v98%=1.3 (OPR1.170207.001-OPM1.170814.001) -->
</MediaCodec>
</Encoders>
<Decoders>
<MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" update="true">
- <Limit name="measured-frame-rate-176x144" range="154-154" /> <!-- N=212 v98%=1.1 -->
- <Limit name="measured-frame-rate-352x288" range="154-154" /> <!-- N=216 v98%=1.1 (OPM1.170810.003-) -->
+ <Limit name="measured-frame-rate-176x144" range="155-155" /> <!-- N=174 v98%=1.1 -->
+ <Limit name="measured-frame-rate-352x288" range="155-155" /> <!-- N=176 v98%=1.1 (OPM1.170822.001-) -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
- <Limit name="measured-frame-rate-320x240" range="291-291" /> <!-- N=230 v98%=1.1 -->
- <Limit name="measured-frame-rate-720x480" range="175-175" /> <!-- N=218 v98%=1.1 (OPM1.170806.001-) -->
- <Limit name="measured-frame-rate-1280x720" range="322-322" /> <!-- N=214 v98%=1.0 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-1920x1080" range="198-198" /> <!-- N=230 v98%=1.0 -->
+ <Limit name="measured-frame-rate-320x240" range="292-292" /> <!-- N=194 v98%=1.1 -->
+ <Limit name="measured-frame-rate-720x480" range="175-175" /> <!-- N=180 v98%=1.1 -->
+ <Limit name="measured-frame-rate-1280x720" range="327-328" /> <!-- N=178 v98%=1.1 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1920x1080" range="198-198" /> <!-- N=194 v98%=1.0 -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
- <Limit name="measured-frame-rate-352x288" range="336-336" /> <!-- N=220 v98%=1.2 -->
- <Limit name="measured-frame-rate-640x360" range="236-236" /> <!-- N=228 v98%=1.1 -->
- <Limit name="measured-frame-rate-720x480" range="182-182" /> <!-- N=210 v98%=1.1 (OPM1.170809.001-) -->
- <Limit name="measured-frame-rate-1280x720" range="82-82" /> <!-- N=204 v98%=1.0 -->
- <Limit name="measured-frame-rate-1920x1080" range="252-252" /> <!-- N=212 v98%=1.0 -->
- <Limit name="measured-frame-rate-3840x2160" range="69-69" /> <!-- N=224 v98%=1.0 (OPM1.170807.001-) -->
+ <Limit name="measured-frame-rate-352x288" range="338-338" /> <!-- N=178 v98%=1.2 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-640x360" range="236-236" /> <!-- N=192 v98%=1.1 -->
+ <Limit name="measured-frame-rate-720x480" range="182-182" /> <!-- N=172 v98%=1.1 -->
+ <Limit name="measured-frame-rate-1280x720" range="82-82" /> <!-- N=176 v98%=1.0 (OPM1.170821.002-) -->
+ <Limit name="measured-frame-rate-1920x1080" range="252-252" /> <!-- N=174 v98%=1.0 -->
+ <Limit name="measured-frame-rate-3840x2160" range="69-69" /> <!-- N=190 v98%=1.0 (OPM1.170820.001-) -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" update="true">
- <Limit name="measured-frame-rate-176x144" range="149-149" /> <!-- N=212 v98%=1.1 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-480x360" range="147-147" /> <!-- N=212 v98%=1.1 -->
+ <Limit name="measured-frame-rate-176x144" range="151-151" /> <!-- N=176 v98%=1.1 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-480x360" range="149-149" /> <!-- N=174 v98%=1.1 -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
- <Limit name="measured-frame-rate-320x180" range="369-369" /> <!-- N=218 v98%=1.0 (OPM1.170806.001-) -->
- <Limit name="measured-frame-rate-640x360" range="274-274" /> <!-- N=216 v98%=1.0 (OPM1.170806.001-) -->
- <Limit name="measured-frame-rate-1280x720" range="360-360" /> <!-- N=204 v98%=1.1 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-1920x1080" range="254-254" /> <!-- N=224 v98%=1.0 (OPM1.170807.001-) -->
+ <Limit name="measured-frame-rate-320x180" range="369-369" /> <!-- N=192 v98%=1.0 (OPM1.170816.001-OPM1.170911.002) -->
+ <Limit name="measured-frame-rate-640x360" range="274-274" /> <!-- N=178 v98%=1.0 -->
+ <Limit name="measured-frame-rate-1280x720" range="367-367" /> <!-- N=164 v98%=1.1 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1920x1080" range="254-254" /> <!-- N=190 v98%=1.0 (OPM1.170820.001-) -->
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
- <Limit name="measured-frame-rate-320x180" range="285-285" /> <!-- N=214 v98%=1.0 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-640x360" range="252-252" /> <!-- N=214 v98%=1.0 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-1280x720" range="305-305" /> <!-- N=210 v98%=1.0 -->
- <Limit name="measured-frame-rate-1920x1080" range="270-270" /> <!-- N=202 v98%=1.0 -->
- <Limit name="measured-frame-rate-3840x2160" range="45-45" /> <!-- N=210 v98%=1.0 (OPM1.170810.003-) -->
+ <Limit name="measured-frame-rate-320x180" range="286-286" /> <!-- N=176 v98%=1.0 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-640x360" range="252-252" /> <!-- N=176 v98%=1.0 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1280x720" range="305-305" /> <!-- N=174 v98%=1.0 -->
+ <Limit name="measured-frame-rate-1920x1080" range="270-270" /> <!-- N=176 v98%=1.0 (OPM1.170821.002-) -->
+ <Limit name="measured-frame-rate-3840x2160" range="45-45" /> <!-- N=176 v98%=1.0 (OPM1.170822.001-) -->
</MediaCodec>
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
- <Limit name="measured-frame-rate-176x144" range="263-263" /> <!-- N=228 v98%=1.4 -->
+ <Limit name="measured-frame-rate-176x144" range="271-271" /> <!-- N=192 v98%=1.4 -->
</MediaCodec>
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
- <!-- measured 98%:302-493 med:431/430 FLAKY(mn=209.4 < 215 - 860) -->
- <Limit name="measured-frame-rate-320x240" range="418-430" /> <!-- TWEAKED N=222 v98%=1.3 -->
- <Limit name="measured-frame-rate-720x480" range="195-196" /> <!-- N=198 v98%=1.3 -->
- <Limit name="measured-frame-rate-1280x720" range="74-74" /> <!-- N=214 v98%=1.2 -->
- <Limit name="measured-frame-rate-1920x1080" range="33-33" /> <!-- N=198 v98%=1.2 -->
+ <!-- measured 98%:295-484 med:427/425 FLAKY(mn=209.4 < 213 - 850) -->
+ <Limit name="measured-frame-rate-320x240" range="425-425" /> <!-- N=180 v98%=1.3 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-720x480" range="194-194" /> <!-- N=162 v98%=1.3 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1280x720" range="73-73" /> <!-- N=178 v98%=1.2 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1920x1080" range="33-33" /> <!-- N=162 v98%=1.2 (OPM1.170822.001-) -->
</MediaCodec>
<MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
- <Limit name="measured-frame-rate-352x288" range="488-488" /> <!-- N=210 v98%=1.1 (OPM1.170809.001-) -->
- <Limit name="measured-frame-rate-640x360" range="295-295" /> <!-- N=224 v98%=1.1 (OPM1.170807.001-) -->
- <Limit name="measured-frame-rate-720x480" range="261-261" /> <!-- N=220 v98%=1.2 -->
- <!-- measured 98%:81-140 med:124/124 FLAKY(mn=53.7 < 62 - 248) -->
- <Limit name="measured-frame-rate-1280x720" range="107-124" /> <!-- TWEAKED N=210 v98%=1.3 (OPM1.170809.001-) -->
- <Limit name="measured-frame-rate-1920x1080" range="67-67" /> <!-- N=216 v98%=1.3 (OPM1.170810.003-) -->
+ <Limit name="measured-frame-rate-352x288" range="484-484" /> <!-- N=172 v98%=1.1 -->
+ <Limit name="measured-frame-rate-640x360" range="294-294" /> <!-- N=190 v98%=1.1 (OPM1.170820.001-) -->
+ <Limit name="measured-frame-rate-720x480" range="258-259" /> <!-- N=178 v98%=1.2 (OPM1.170822.001-) -->
+ <!-- measured 98%:79-137 med:123/123 FLAKY(mn=53.7 < 62 - 246) -->
+ <Limit name="measured-frame-rate-1280x720" range="107-123" /> <!-- TWEAKED N=172 v98%=1.3 -->
+ <Limit name="measured-frame-rate-1920x1080" range="66-66" /> <!-- N=176 v98%=1.3 (OPM1.170822.001-) -->
</MediaCodec>
<MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
- <Limit name="measured-frame-rate-176x144" range="331-331" /> <!-- N=227 v98%=1.3 -->
+ <Limit name="measured-frame-rate-176x144" range="337-337" /> <!-- N=192 v98%=1.3 -->
</MediaCodec>
<MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
- <!-- measured 98%:801-946 med:890/891 FLAKY(mn=342.5 < 445 - 1782) -->
- <Limit name="measured-frame-rate-320x180" range="684-891" /> <!-- TWEAKED N=201 v98%=1.1 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-640x360" range="338-338" /> <!-- N=212 v98%=1.1 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-1280x720" range="77-77" /> <!-- N=222 v98%=1.0 (OPD1.170710.001-) -->
- <Limit name="measured-frame-rate-1920x1080" range="34-34" /> <!-- N=218 v98%=1.0 (OPM1.170806.001-) -->
+ <Limit name="measured-frame-rate-320x180" range="890-890" /> <!-- N=176 v98%=1.1 (OPM1.170821.002-) -->
+ <Limit name="measured-frame-rate-640x360" range="339-339" /> <!-- N=176 v98%=1.2 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1280x720" range="77-77" /> <!-- N=194 v98%=1.0 (OPM1.170816.001-OPM1.170911.002) -->
+ <Limit name="measured-frame-rate-1920x1080" range="33-33" /> <!-- N=192 v98%=1.0 (OPM1.170816.001-OPM1.170911.002) -->
</MediaCodec>
<MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
- <Limit name="measured-frame-rate-320x180" range="621-621" /> <!-- N=212 v98%=1.1 (OPM1.170810.003-) -->
- <Limit name="measured-frame-rate-640x360" range="191-191" /> <!-- N=204 v98%=1.2 -->
- <Limit name="measured-frame-rate-1280x720" range="87-87" /> <!-- N=220 v98%=1.2 -->
- <Limit name="measured-frame-rate-1920x1080" range="53-53" /> <!-- N=214 v98%=1.1 (OPM1.170810.003-) -->
+ <Limit name="measured-frame-rate-320x180" range="621-621" /> <!-- N=176 v98%=1.2 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-640x360" range="189-189" /> <!-- N=176 v98%=1.1 (OPM1.170821.002-) -->
+ <Limit name="measured-frame-rate-1280x720" range="86-86" /> <!-- N=178 v98%=1.2 (OPM1.170822.001-) -->
+ <Limit name="measured-frame-rate-1920x1080" range="53-53" /> <!-- N=176 v98%=1.1 (OPM1.170822.001-) -->
</MediaCodec>
</Decoders>
</MediaCodecs>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index b45970dc..a3eced24 100755
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -265,8 +265,8 @@
<integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer>
<integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer>
<!-- Integer thresholds for low network score, should be somewhat less than the entry threshholds -->
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-77</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-80</integer>
+ <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer>
+ <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer>
<!-- Setting this true forces the headset jack switches to use the/dev/input/event subsystem
rather than the uevent framework. -->
diff --git a/p2p_supplicant_overlay.conf b/p2p_supplicant_overlay.conf
index acbace22..b5e89e03 100644
--- a/p2p_supplicant_overlay.conf
+++ b/p2p_supplicant_overlay.conf
@@ -1 +1,2 @@
disable_scan_offload=1
+p2p_no_group_iface=1
diff --git a/sailfish/BoardConfig.mk b/sailfish/BoardConfig.mk
index cb8aff2a..33b8ab47 100644
--- a/sailfish/BoardConfig.mk
+++ b/sailfish/BoardConfig.mk
@@ -90,7 +90,7 @@ endif
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=sailfish user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff loop.max_part=7
-BOARD_ROOT_EXTRA_FOLDERS := bt_firmware firmware firmware/radio persist
+BOARD_ROOT_EXTRA_FOLDERS := firmware firmware/radio persist
BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp
BOARD_SEPOLICY_DIRS += device/google/marlin/sepolicy
@@ -190,7 +190,7 @@ BOARD_USES_SYSTEM_OTHER_ODEX := true
TARGET_COPY_OUT_VENDOR := vendor
#NFC
-NXP_CHIP_TYPE := PN551
+NXP_CHIP_TYPE := 3
# Testing related defines
BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/sailin-setup.sh
diff --git a/sailfish/android_filesystem_config.h b/sailfish/android_filesystem_config.h
index bc92bd47..dfec7d64 100644
--- a/sailfish/android_filesystem_config.h
+++ b/sailfish/android_filesystem_config.h
@@ -21,9 +21,8 @@
#include <private/android_filesystem_config.h>
-static const struct fs_path_config android_device_dirs[] = {
- { 00771, AID_SYSTEM, AID_SYSTEM, 0, "bt_firmware"},
-};
+#define NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
+/* static const struct fs_path_config android_device_dirs[] = { }; */
/* Rules for files.
** These rules are applied based on "first match", so they
diff --git a/self-extractors/extract-lists.txt b/self-extractors/extract-lists.txt
index 8d050c04..c2971817 100644
--- a/self-extractors/extract-lists.txt
+++ b/self-extractors/extract-lists.txt
@@ -10,8 +10,6 @@
system/etc/cne/Nexus/ROW/ROW_profiles.xml \
system/etc/cne/Nexus/VZW/VZW_profiles.xml \
system/etc/permissions/com.android.ims.rcsmanager.xml \
- system/etc/permissions/com.android.vzwomatrigger.xml \
- system/etc/permissions/vzw_mvs_permissions.xml \
system/framework/com.android.ims.rcsmanager.jar \
system/lib64/libaptX_encoder.so \
system/lib64/libaptXHD_encoder.so \
diff --git a/self-extractors/qcom/staging/device-partial.mk b/self-extractors/qcom/staging/device-partial.mk
index ba7a92dc..495955c1 100644
--- a/self-extractors/qcom/staging/device-partial.mk
+++ b/self-extractors/qcom/staging/device-partial.mk
@@ -19,8 +19,6 @@ PRODUCT_COPY_FILES := \
vendor/qcom/marlin/proprietary/ROW_profiles.xml:system/etc/cne/Nexus/ROW/ROW_profiles.xml:qcom \
vendor/qcom/marlin/proprietary/VZW_profiles.xml:system/etc/cne/Nexus/VZW/VZW_profiles.xml:qcom \
vendor/qcom/marlin/proprietary/com.android.ims.rcsmanager.xml:system/etc/permissions/com.android.ims.rcsmanager.xml:qcom \
- vendor/qcom/marlin/proprietary/com.android.vzwomatrigger.xml:system/etc/permissions/com.android.vzwomatrigger.xml:qcom \
- vendor/qcom/marlin/proprietary/vzw_mvs_permissions.xml:system/etc/permissions/vzw_mvs_permissions.xml:qcom \
vendor/qcom/marlin/proprietary/com.android.ims.rcsmanager.jar:system/framework/com.android.ims.rcsmanager.jar:qcom \
vendor/qcom/marlin/proprietary/lib64/libaptX_encoder.so:system/lib64/libaptX_encoder.so:qcom \
vendor/qcom/marlin/proprietary/lib64/libaptXHD_encoder.so:system/lib64/libaptXHD_encoder.so:qcom \
diff --git a/self-extractors_sailfish/extract-lists.txt b/self-extractors_sailfish/extract-lists.txt
index 8d050c04..c2971817 100644
--- a/self-extractors_sailfish/extract-lists.txt
+++ b/self-extractors_sailfish/extract-lists.txt
@@ -10,8 +10,6 @@
system/etc/cne/Nexus/ROW/ROW_profiles.xml \
system/etc/cne/Nexus/VZW/VZW_profiles.xml \
system/etc/permissions/com.android.ims.rcsmanager.xml \
- system/etc/permissions/com.android.vzwomatrigger.xml \
- system/etc/permissions/vzw_mvs_permissions.xml \
system/framework/com.android.ims.rcsmanager.jar \
system/lib64/libaptX_encoder.so \
system/lib64/libaptXHD_encoder.so \
diff --git a/self-extractors_sailfish/qcom/staging/device-partial.mk b/self-extractors_sailfish/qcom/staging/device-partial.mk
index 376d1898..70d1b4ed 100644
--- a/self-extractors_sailfish/qcom/staging/device-partial.mk
+++ b/self-extractors_sailfish/qcom/staging/device-partial.mk
@@ -19,8 +19,6 @@ PRODUCT_COPY_FILES := \
vendor/qcom/sailfish/proprietary/ROW_profiles.xml:system/etc/cne/Nexus/ROW/ROW_profiles.xml:qcom \
vendor/qcom/sailfish/proprietary/VZW_profiles.xml:system/etc/cne/Nexus/VZW/VZW_profiles.xml:qcom \
vendor/qcom/sailfish/proprietary/com.android.ims.rcsmanager.xml:system/etc/permissions/com.android.ims.rcsmanager.xml:qcom \
- vendor/qcom/sailfish/proprietary/com.android.vzwomatrigger.xml:system/etc/permissions/com.android.vzwomatrigger.xml:qcom \
- vendor/qcom/sailfish/proprietary/vzw_mvs_permissions.xml:system/etc/permissions/vzw_mvs_permissions.xml:qcom \
vendor/qcom/sailfish/proprietary/com.android.ims.rcsmanager.jar:system/framework/com.android.ims.rcsmanager.jar:qcom \
vendor/qcom/sailfish/proprietary/lib64/libaptX_encoder.so:system/lib64/libaptX_encoder.so:qcom \
vendor/qcom/sailfish/proprietary/lib64/libaptXHD_encoder.so:system/lib64/libaptXHD_encoder.so:qcom \
diff --git a/sepolicy/bootanim.te b/sepolicy/bootanim.te
new file mode 100644
index 00000000..b5d00b93
--- /dev/null
+++ b/sepolicy/bootanim.te
@@ -0,0 +1,5 @@
+# TODO(b/62954877). On Android Wear, bootanim reads the time
+# during boot to display. It currently gets that time from a file
+# in /data/system. This should be moved. In the meantime, suppress
+# this denial on Marlin since this functionality is not used.
+dontaudit bootanim system_data_file:dir read;
diff --git a/sepolicy/cnd.te b/sepolicy/cnd.te
index fa1c2c46..95d55207 100644
--- a/sepolicy/cnd.te
+++ b/sepolicy/cnd.te
@@ -30,6 +30,9 @@ r_dir_file(cnd, sysfs_type)
userdebug_or_eng(`
allow cnd diag_device:chr_file rw_file_perms;
')
+userbuild(`
+ dontaudit cnd diag_device:chr_file rw_file_perms;
+')
# use for mobile hostspot
allow cnd shell_exec:file rx_file_perms;
diff --git a/sepolicy/cnss_diag.te b/sepolicy/cnss_diag.te
index 2dc3dc65..6d0a13c3 100644
--- a/sepolicy/cnss_diag.te
+++ b/sepolicy/cnss_diag.te
@@ -17,3 +17,6 @@ userdebug_or_eng(`
allow cnss_diag cnss_vendor_data_file:dir create_dir_perms;
allow cnss_diag cnss_vendor_data_file:file create_file_perms;
')
+userbuild(`
+ dontaudit cnss_diag diag_device:chr_file rw_file_perms;
+')
diff --git a/sepolicy/file.te b/sepolicy/file.te
index a7f02af0..14cf52ff 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -36,6 +36,8 @@ type sysfs_soc, sysfs_type, fs_type, mlstrustedobject;
type sysfs_timestamp_switch, sysfs_type, fs_type;
type sysfs_video, sysfs_type, fs_type;
type sysfs_wifi, sysfs_type, fs_type, mlstrustedobject;
+type sysfs_scsi_devices_0000, sysfs_type, fs_type;
+type sysfs_diag, fs_type, sysfs_type;
# debugfs
type debugfs_msm_core, debugfs_type, fs_type;
@@ -52,6 +54,7 @@ type debugfs_qsee_log, debugfs_type, fs_type;
type debugfs_usb, debugfs_type, fs_type;
type debugfs_runtime_pm, debugfs_type, fs_type;
type debugfs_cnss, debugfs_type, fs_type;
+type debugfs_ufs, debugfs_type, fs_type;
# /proc
type proc_kernel_sched, fs_type;
diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts
index 2517b901..949701b3 100644
--- a/sepolicy/genfs_contexts
+++ b/sepolicy/genfs_contexts
@@ -54,6 +54,9 @@ genfscon sysfs /devices/soc/qpnp-smbcharger-16/power_supply/battery/capacity u:o
genfscon sysfs /devices/virtual/timed_output/vibrator/voltage_level u:object_r:sysfs_vibrator:s0
genfscon sysfs /module/diagchar/parameters/timestamp_switch u:object_r:sysfs_timestamp_switch:s0
genfscon sysfs /devices/soc/qpnp-smbcharger-16/power_supply/battery/system_temp_level u:object_r:sysfs_msm_subsys:s0
+genfscon sysfs /devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:0 u:object_r:sysfs_scsi_devices_0000:s0
+genfscon sysfs /devices/soc/624000.ufshc/health u:object_r:sysfs_scsi_devices_0000:s0
+genfscon sysfs /module/diagchar u:object_r:sysfs_diag:s0
# debugfs
genfscon debugfs /kgsl/proc u:object_r:debugfs_kgsl:s0
@@ -72,3 +75,4 @@ genfscon debugfs /tcpm/9-0022 u:object_r:debugfs_usb:s0
genfscon debugfs /ipc_logging/fusb302/log u:object_r:debugfs_usb:s0
genfscon debugfs /cnss_runtime_pm u:object_r:debugfs_runtime_pm:s0
genfscon debugfs /cnss-prealloc/status u:object_r:debugfs_cnss:s0
+genfscon debugfs /ufshcd0 u:object_r:debugfs_ufs:s0
diff --git a/sepolicy/hal_camera_default.te b/sepolicy/hal_camera_default.te
index 9b407ac1..4a2d2bdd 100644
--- a/sepolicy/hal_camera_default.te
+++ b/sepolicy/hal_camera_default.te
@@ -2,6 +2,7 @@ vndbinder_use(hal_camera_default);
allow hal_camera_default qdisplay_service:service_manager { find };
allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
+hal_client_domain(hal_camera_default, hal_configstore)
binder_call(hal_camera_default, hal_graphics_composer)
binder_call(hal_camera_default, system_server)
@@ -14,3 +15,6 @@ userdebug_or_eng(`
allow hal_camera_default camera_vendor_data_file:dir create_dir_perms;
allow hal_camera_default camera_vendor_data_file:file create_file_perms;
')
+userbuild(`
+ dontaudit hal_camera_default camera_vendor_data_file:dir search;
+')
diff --git a/sepolicy/hal_dumpstate_impl.te b/sepolicy/hal_dumpstate_impl.te
index 08f6d2aa..f60bbdf1 100644
--- a/sepolicy/hal_dumpstate_impl.te
+++ b/sepolicy/hal_dumpstate_impl.te
@@ -53,3 +53,9 @@ r_dir_file(hal_dumpstate_impl, sysfs_thermal)
r_dir_file(hal_dumpstate_impl, sysfs_devices_system_cpu)
# usb logs
userdebug_or_eng(`allow hal_dumpstate_impl debugfs_usb:file r_file_perms;')
+
+# Access to UFS info
+allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms;
+allow hal_dumpstate_impl sysfs_scsi_devices_0000:file r_file_perms;
+allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms;
+allow hal_dumpstate_impl debugfs_ufs:file r_file_perms;
diff --git a/sepolicy/hal_graphics_composer_default.te b/sepolicy/hal_graphics_composer_default.te
index b000054a..f5781d42 100644
--- a/sepolicy/hal_graphics_composer_default.te
+++ b/sepolicy/hal_graphics_composer_default.te
@@ -1,6 +1,9 @@
userdebug_or_eng(`
allow hal_graphics_composer_default diag_device:chr_file rw_file_perms;
')
+userbuild(`
+ dontaudit hal_graphics_composer_default diag_device:chr_file rw_file_perms;
+')
# misc
allow hal_graphics_composer_default display_data_file:dir create_dir_perms;
diff --git a/sepolicy/hal_nfc_default.te b/sepolicy/hal_nfc_default.te
index 3044f1d5..1e5ceb9b 100644
--- a/sepolicy/hal_nfc_default.te
+++ b/sepolicy/hal_nfc_default.te
@@ -1,3 +1,5 @@
# Data file accesses.
allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms;
allow hal_nfc_default nfc_vendor_data_file:file create_file_perms;
+
+dontaudit hal_nfc_default debugfs_ipc:dir search;
diff --git a/sepolicy/hal_power.te b/sepolicy/hal_power.te
index b2a719ea..2f891f70 100644
--- a/sepolicy/hal_power.te
+++ b/sepolicy/hal_power.te
@@ -5,11 +5,9 @@ allow hal_power perfd_data_file:sock_file write;
allow hal_power sysfs_soc:dir search;
allow hal_power sysfs_soc:file { open read };
-userdebug_or_eng(`
# debugfs entries are only needed in user-debug or eng builds
allow hal_power debugfs_rpm:file r_file_perms;
allow hal_power debugfs_wlan:dir r_dir_perms;
allow hal_power debugfs_wlan:file r_file_perms;
-')
diff --git a/sepolicy/hal_thermal.te b/sepolicy/hal_thermal.te
deleted file mode 100644
index 025806a4..00000000
--- a/sepolicy/hal_thermal.te
+++ /dev/null
@@ -1,4 +0,0 @@
-allow hal_thermal sysfs_thermal:dir search;
-allow hal_thermal sysfs_thermal:file { getattr open read };
-allow hal_thermal sysfs_thermal:lnk_file read;
-allow hal_thermal proc_stat:file { getattr open read };
diff --git a/sepolicy/hal_wifi.te b/sepolicy/hal_wifi.te
index 63f076b9..49f764c0 100644
--- a/sepolicy/hal_wifi.te
+++ b/sepolicy/hal_wifi.te
@@ -16,3 +16,6 @@ userdebug_or_eng(`
allow hal_wifi debugfs_wlan:dir r_dir_perms;
')
+userbuild(`
+ dontaudit hal_wifi debugfs_wlan:dir r_dir_perms;
+')
diff --git a/sepolicy/ims.te b/sepolicy/ims.te
index ccda68b9..88d74d65 100644
--- a/sepolicy/ims.te
+++ b/sepolicy/ims.te
@@ -33,6 +33,9 @@ allowxperm ims self:socket ioctl msm_sock_ipc_ioctls;
userdebug_or_eng(`
allow ims diag_device:chr_file rw_file_perms;
')
+userbuild(`
+ dontaudit ims diag_device:chr_file rw_file_perms;
+')
# Runs /system/bin/sh for executing ndc commands via popen
allow ims shell_exec:file rx_file_perms;
diff --git a/sepolicy/kernel.te b/sepolicy/kernel.te
index 4359e268..8a940fe3 100644
--- a/sepolicy/kernel.te
+++ b/sepolicy/kernel.te
@@ -7,3 +7,6 @@ allow kernel debugfs_ipc:dir search;
userdebug_or_eng(`
allow kernel self:socket create;
')
+userbuild(`
+ dontaudit kernel self:socket create;
+')
diff --git a/sepolicy/logger_app.te b/sepolicy/logger_app.te
index 2813feb2..5d87df77 100644
--- a/sepolicy/logger_app.te
+++ b/sepolicy/logger_app.te
@@ -17,4 +17,5 @@ userdebug_or_eng(`
allow logger_app cnss_vendor_data_file:file create_file_perms;
set_prop(logger_app, cnss_diag_prop);
+ set_prop(logger_app, bluetooth_log_prop)
')
diff --git a/sepolicy/priv_app.te b/sepolicy/priv_app.te
index 04a1594d..d5cb82bb 100644
--- a/sepolicy/priv_app.te
+++ b/sepolicy/priv_app.te
@@ -1,3 +1,9 @@
allowxperm priv_app self:udp_socket ioctl { SIOCGIWESSID };
r_dir_file(priv_app, sysfs_type)
+
+# Clean up logspam
+dontaudit priv_app device:dir read;
+dontaudit priv_app proc_interrupts:file read;
+dontaudit priv_app proc_modules:file read;
+dontaudit priv_app firstboot_prop:file read;
diff --git a/sepolicy/property.te b/sepolicy/property.te
index 5866416b..91bb598c 100644
--- a/sepolicy/property.te
+++ b/sepolicy/property.te
@@ -9,3 +9,4 @@ type thermal_prop, property_type;
type ramdump_prop, property_type;
type sys_time_prop, property_type;
type post_boot_prop, property_type;
+type bluetooth_log_prop, property_type;
diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts
index 325b4cde..68e9df43 100644
--- a/sepolicy/property_contexts
+++ b/sepolicy/property_contexts
@@ -14,3 +14,4 @@ sys.qcom.thermalcfg u:object_r:thermal_prop:s0
ctl.thermal-engine u:object_r:thermal_prop:s0
sys.time.set u:object_r:sys_time_prop:s0
sys.post_boot.parsed u:object_r:post_boot_prop:s0
+sys.logger.bluetooth u:object_r:bluetooth_log_prop:s0
diff --git a/sepolicy/radio.te b/sepolicy/radio.te
index db47a29c..609b6d5c 100644
--- a/sepolicy/radio.te
+++ b/sepolicy/radio.te
@@ -23,6 +23,9 @@ unix_socket_connect(radio, rild, rild)
userdebug_or_eng(`
allow radio diag_device:chr_file rw_file_perms;
')
+userbuild(`
+ dontaudit radio diag_device:chr_file rw_file_perms;
+')
# access to /dev/avtimer
allow radio avtimer_device:chr_file rw_file_perms;
diff --git a/sepolicy/rild.te b/sepolicy/rild.te
index 689be59c..d82f94c4 100644
--- a/sepolicy/rild.te
+++ b/sepolicy/rild.te
@@ -27,6 +27,9 @@ allowxperm rild self:socket ioctl msm_sock_ipc_ioctls;
userdebug_or_eng(`
allow rild diag_device:chr_file rw_file_perms;
')
+userbuild(`
+ dontaudit rild diag_device:chr_file rw_file_perms;
+')
# rild needs 'lock' for /vendor/qcril.db
allow rild vendor_file:file { lock };
@@ -35,6 +38,9 @@ allow rild vendor_file:file { lock };
allow rild radio_data_file:dir rw_dir_perms;
allow rild radio_data_file:file create_file_perms;
+# In order to be able to use system()
+allow rild vendor_shell_exec:file rx_file_perms;
+
# TODO(b/36613472): Remove this once system_server, mediaserver, bluetooth, and radio no longer
# communicate with rild over sockets.
typeattribute rild socket_between_core_and_vendor_violators;
diff --git a/sepolicy/rmt.te b/sepolicy/rmt.te
index 2b77c34f..1671b8d3 100644
--- a/sepolicy/rmt.te
+++ b/sepolicy/rmt.te
@@ -2,10 +2,7 @@
type rmt, domain;
type rmt_exec, exec_type, vendor_file_type, file_type;
-# STOPSHIP b/28340421
-# Temporarily grant this permission and log its use.
allow rmt self:capability net_bind_service;
-auditallow rmt self:capability net_bind_service;
init_daemon_domain(rmt)
wakelock_use(rmt)
diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te
index 241d6498..b87bca5a 100644
--- a/sepolicy/system_app.te
+++ b/sepolicy/system_app.te
@@ -8,3 +8,7 @@ get_prop(system_app, hw_sku_prop);
# Needed by Settings app's TelephonyMonitorPreferenceController, available only on a subset of
# userdebug and eng devices
userdebug_or_eng(`set_prop(system_app, radio_prop)')
+
+# Needed by Settings app's CameraLaserSensorPreferenceController, available only on a subset of
+# userdebug and eng devices
+userdebug_or_eng(`set_prop(system_app, camera_prop)')
diff --git a/sepolicy/thermal-engine.te b/sepolicy/thermal-engine.te
index b195cb55..a07ecc5e 100644
--- a/sepolicy/thermal-engine.te
+++ b/sepolicy/thermal-engine.te
@@ -16,7 +16,12 @@ allow thermal-engine thermal_device:chr_file rw_file_perms;
# files in /sys/
r_dir_file(thermal-engine, sysfs_type)
allow thermal-engine sysfs_msm_subsys:file write;
-allow thermal-engine sysfs_thermal:file write;
+allow thermal-engine sysfs_thermal:file rw_file_perms;
+allow thermal-engine sysfs_thermal:lnk_file read;
+allow thermal-engine sysfs_thermal:dir search;
+
+# /proc/stat
+allow thermal-engine proc_stat:file { getattr open read };
allow thermal-engine uio_device:chr_file rw_file_perms;
@@ -27,3 +32,6 @@ userdebug_or_eng(`
# reboot/shutdown for thermal limits exceeded
set_prop(thermal-engine, powerctl_prop)
+
+# IThermal Thermal HAL
+hal_server_domain(thermal-engine, hal_thermal)
diff --git a/sepolicy/time.te b/sepolicy/time.te
index 1b28d361..3d655cb0 100644
--- a/sepolicy/time.te
+++ b/sepolicy/time.te
@@ -27,3 +27,6 @@ set_prop(time, sys_time_prop)
userdebug_or_eng(`
allow time diag_device:chr_file rw_file_perms;
')
+userbuild(`
+ dontaudit time diag_device:chr_file rw_file_perms;
+')
diff --git a/sepolicy/vold.te b/sepolicy/vold.te
index 34bb5f10..6d22e19c 100644
--- a/sepolicy/vold.te
+++ b/sepolicy/vold.te
@@ -1,2 +1,5 @@
# generated by proc scan, unnecessary
dontaudit vold proc_irq:dir read;
+
+allow vold sysfs_scsi_devices_0000:file w_file_perms;
+allow vold persist_file:dir r_dir_perms;
diff --git a/sepolicy/wcnss_filter.te b/sepolicy/wcnss_filter.te
index 2b949b33..23b39896 100644
--- a/sepolicy/wcnss_filter.te
+++ b/sepolicy/wcnss_filter.te
@@ -15,6 +15,15 @@ allow wcnss_filter proc_sysrq:file w_file_perms;
# access to /dev/diag on debug builds
userdebug_or_eng(`
allow wcnss_filter diag_device:chr_file rw_file_perms;
+ allow wcnss_filter sysfs_timestamp_switch:file r_file_perms;
+ r_dir_file(wcnss_filter, sysfs_diag)
+ allow wcnss_filter ramdump_vendor_data_file:dir w_dir_perms;
+ allow wcnss_filter ramdump_vendor_data_file:file { create w_file_perms };
+ r_dir_file(wcnss_filter, debugfs_ipc)
+ set_prop(wcnss_filter, ssr_prop)
+')
+userbuild(`
+ dontaudit wcnss_filter diag_device:chr_file rw_file_perms;
')
# Allow reading Bluetooth-related system properties
diff --git a/thermal-engine-marlin-vr.conf b/thermal-engine-marlin-vr.conf
index ae80d86d..1c612c97 100755
--- a/thermal-engine-marlin-vr.conf
+++ b/thermal-engine-marlin-vr.conf
@@ -13,8 +13,8 @@ sensor emmc_therm
sampling 1000
thresholds 58000
thresholds_clr 52000
-actions cluster0+cluster1+gpu
-action_info 691200+691200+214000000
+actions cluster0+cluster1+gpu+report
+action_info 691200+691200+214000000+1
[BATTERY-MONITOR]
algo_type monitor
diff --git a/thermal-engine-marlin.conf b/thermal-engine-marlin.conf
index 02c3c267..1896e259 100755
--- a/thermal-engine-marlin.conf
+++ b/thermal-engine-marlin.conf
@@ -7,6 +7,15 @@ thresholds_clr 59000
actions shutdown
action_info 1
+[THROTTLING-NOTIFY]
+algo_type monitor
+sampling 2000
+sensor emmc_therm
+thresholds 47000
+thresholds_clr 44000
+actions report
+action_info 1
+
[SKIN-HIGH-FLOOR]
algo_type ss
sampling 2000
@@ -53,8 +62,8 @@ sensor emmc_therm
sampling 1000
thresholds 56000 58000
thresholds_clr 55000 57000
-actions cluster0+cluster1+gpu cluster0+cluster1+gpu
-action_info 691200+691200+133000000 307200+307200+133000000
+actions cluster0+cluster1+gpu+report cluster0+cluster1+gpu+report
+action_info 691200+691200+133000000+1 307200+307200+133000000+1
[BATTERY-MONITOR]
algo_type monitor
diff --git a/thermal/Android.mk b/thermal/Android.mk
deleted file mode 100644
index 5a75ee04..00000000
--- a/thermal/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_CFLAGS := -Wno-unused-parameter
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_SRC_FILES := thermal.c
-LOCAL_SHARED_LIBRARIES := liblog libcutils
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_OWNER := qcom
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_MODULE := thermal.$(TARGET_DEVICE)
-include $(BUILD_SHARED_LIBRARY)
diff --git a/thermal/thermal.c b/thermal/thermal.c
deleted file mode 100644
index fd5ec040..00000000
--- a/thermal/thermal.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <ctype.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define LOG_TAG "ThermalHAL"
-#include <utils/Log.h>
-
-#include <hardware/hardware.h>
-#include <hardware/thermal.h>
-
-#define MAX_LENGTH 50
-
-#define CPU_USAGE_FILE "/proc/stat"
-#define TEMPERATURE_FILE_FORMAT "/sys/class/thermal/thermal_zone%d/temp"
-#define CPU_ONLINE_FILE_FORMAT "/sys/devices/system/cpu/cpu%d/online"
-
-#define BATTERY_SENSOR_NUM 29
-#define GPU_SENSOR_NUM 14
-#define SKIN_SENSOR_NUM 24
-
-const int CPU_SENSORS[] = {4, 6, 9, 11};
-
-#define CPU_NUM (sizeof(CPU_SENSORS) / sizeof(int))
-// Sum of CPU_NUM + 3 for GPU, BATTERY, and SKIN.
-#define TEMPERATURE_NUM 7
-
-//qcom, therm-reset-temp
-#define CPU_SHUTDOWN_THRESHOLD 115
-//qcom,freq-mitigation-temp
-#define CPU_THROTTLING_THRESHOLD 95
-#define BATTERY_SHUTDOWN_THRESHOLD 60
-// device/google/marlin/thermal-engine-marlin.conf
-#define SKIN_THROTTLING_THRESHOLD 47
-#define SKIN_SHUTDOWN_THRESHOLD 60
-#define VR_THROTTLED_BELOW_MIN 58
-
-#define GPU_LABEL "GPU"
-#define BATTERY_LABEL "battery"
-#define SKIN_LABEL "skin"
-
-const char *CPU_LABEL[] = {"CPU0", "CPU1", "CPU2", "CPU3"};
-
-/**
- * Reads device temperature.
- *
- * @param sensor_num Number of sensor file with temperature.
- * @param type Device temperature type.
- * @param name Device temperature name.
- * @param mult Multiplier used to translate temperature to Celsius.
- * @param throttling_threshold Throttling threshold for the temperature.
- * @param shutdown_threshold Shutdown threshold for the temperature.
- * @param out Pointer to temperature_t structure that will be filled with current
- * values.
- *
- * @return 0 on success or negative value -errno on error.
- */
-static ssize_t read_temperature(int sensor_num, int type, const char *name, float mult,
- float throttling_threshold, float shutdown_threshold, float vr_throttling_threshold,
- temperature_t *out) {
- FILE *file;
- char file_name[MAX_LENGTH];
- float temp;
-
- sprintf(file_name, TEMPERATURE_FILE_FORMAT, sensor_num);
- file = fopen(file_name, "r");
- if (file == NULL) {
- ALOGE("%s: failed to open: %s", __func__, strerror(errno));
- return -errno;
- }
- if (1 != fscanf(file, "%f", &temp)) {
- fclose(file);
- ALOGE("%s: failed to read a float: %s", __func__, strerror(errno));
- return errno ? -errno : -EIO;
- }
-
- fclose(file);
-
- (*out) = (temperature_t) {
- .type = type,
- .name = name,
- .current_value = temp * mult,
- .throttling_threshold = throttling_threshold,
- .shutdown_threshold = shutdown_threshold,
- .vr_throttling_threshold = vr_throttling_threshold
- };
-
- return 0;
-}
-
-static ssize_t get_cpu_temperatures(temperature_t *list, size_t size) {
- size_t cpu;
-
- for (cpu = 0; cpu < CPU_NUM; cpu++) {
- if (cpu >= size) {
- break;
- }
- // tsens_tz_sensor[4,6,9,11]: temperature in decidegrees Celsius.
- ssize_t result = read_temperature(CPU_SENSORS[cpu], DEVICE_TEMPERATURE_CPU, CPU_LABEL[cpu],
- 0.1, CPU_THROTTLING_THRESHOLD, CPU_SHUTDOWN_THRESHOLD, CPU_THROTTLING_THRESHOLD,
- &list[cpu]);
- if (result != 0) {
- return result;
- }
- }
- return cpu;
-}
-
-static ssize_t get_temperatures(thermal_module_t *module, temperature_t *list, size_t size) {
- ssize_t result = 0;
- size_t current_index = 0;
-
- if (list == NULL) {
- return TEMPERATURE_NUM;
- }
-
- result = get_cpu_temperatures(list, size);
- if (result < 0) {
- return result;
- }
- current_index += result;
-
- // GPU temperature.
- if (current_index < size) {
- // tsens_tz_sensor14: temperature in decidegrees Celsius.
- result = read_temperature(GPU_SENSOR_NUM, DEVICE_TEMPERATURE_GPU, GPU_LABEL, 0.1,
- UNKNOWN_TEMPERATURE, UNKNOWN_TEMPERATURE, UNKNOWN_TEMPERATURE,
- &list[current_index]);
- if (result < 0) {
- return result;
- }
- current_index++;
- }
-
- // Battery temperature.
- if (current_index < size) {
- // tsens_tz_sensor29: battery: temperature in millidegrees Celsius.
- result = read_temperature(BATTERY_SENSOR_NUM, DEVICE_TEMPERATURE_BATTERY, BATTERY_LABEL,
- 0.001, UNKNOWN_TEMPERATURE, BATTERY_SHUTDOWN_THRESHOLD, UNKNOWN_TEMPERATURE,
- &list[current_index]);
- if (result < 0) {
- return result;
- }
- current_index++;
- }
-
- // Skin temperature.
- if (current_index < size) {
- // tsens_tz_sensor24: temperature in Celsius.
- result = read_temperature(SKIN_SENSOR_NUM, DEVICE_TEMPERATURE_SKIN, SKIN_LABEL, 1.,
- SKIN_THROTTLING_THRESHOLD, SKIN_SHUTDOWN_THRESHOLD, VR_THROTTLED_BELOW_MIN,
- &list[current_index]);
- if (result < 0) {
- return result;
- }
- current_index++;
- }
- return TEMPERATURE_NUM;
-}
-
-static ssize_t get_cpu_usages(thermal_module_t *module, cpu_usage_t *list) {
- int vals, cpu_num, online;
- ssize_t read;
- uint64_t user, nice, system, idle, active, total;
- char *line = NULL;
- size_t len = 0;
- size_t size = 0;
- char file_name[MAX_LENGTH];
- FILE *file;
- FILE *cpu_file;
-
- if (list == NULL) {
- return CPU_NUM;
- }
-
- file = fopen(CPU_USAGE_FILE, "r");
- if (file == NULL) {
- ALOGE("%s: failed to open: %s", __func__, strerror(errno));
- return -errno;
- }
-
- while ((read = getline(&line, &len, file)) != -1) {
- // Skip non "cpu[0-9]" lines.
- if (strnlen(line, read) < 4 || strncmp(line, "cpu", 3) != 0 || !isdigit(line[3])) {
- free(line);
- line = NULL;
- len = 0;
- continue;
- }
-
- vals = sscanf(line, "cpu%d %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64, &cpu_num, &user,
- &nice, &system, &idle);
-
- free(line);
- line = NULL;
- len = 0;
-
- if (vals != 5 || size == CPU_NUM) {
- if (vals != 5) {
- ALOGE("%s: failed to read CPU information from file: %s", __func__,
- strerror(errno));
- } else {
- ALOGE("/proc/stat file has incorrect format.");
- }
- fclose(file);
- return errno ? -errno : -EIO;
- }
-
- active = user + nice + system;
- total = active + idle;
-
- // Read online CPU information.
- snprintf(file_name, MAX_LENGTH, CPU_ONLINE_FILE_FORMAT, cpu_num);
- cpu_file = fopen(file_name, "r");
- online = 0;
- if (cpu_file == NULL) {
- ALOGE("%s: failed to open file: %s (%s)", __func__, file_name, strerror(errno));
- fclose(file);
- return -errno;
- }
- if (1 != fscanf(cpu_file, "%d", &online)) {
- ALOGE("%s: failed to read CPU online information from file: %s (%s)", __func__,
- file_name, strerror(errno));
- fclose(file);
- fclose(cpu_file);
- return errno ? -errno : -EIO;
- }
- fclose(cpu_file);
-
- list[size] = (cpu_usage_t) {
- .name = CPU_LABEL[size],
- .active = active,
- .total = total,
- .is_online = online
- };
-
- size++;
- }
- fclose(file);
-
- if (size != CPU_NUM) {
- ALOGE("/proc/stat file has incorrect format.");
- return -EIO;
- }
- return CPU_NUM;
-}
-
-static struct hw_module_methods_t thermal_module_methods = {
- .open = NULL,
-};
-
-thermal_module_t HAL_MODULE_INFO_SYM = {
- .common = {
- .tag = HARDWARE_MODULE_TAG,
- .module_api_version = THERMAL_HARDWARE_MODULE_API_VERSION_0_1,
- .hal_api_version = HARDWARE_HAL_API_VERSION,
- .id = THERMAL_HARDWARE_MODULE_ID,
- .name = "Marlin / Sailfish Thermal HAL",
- .author = "The Android Open Source Project",
- .methods = &thermal_module_methods,
- },
- .getTemperatures = get_temperatures,
- .getCpuUsages = get_cpu_usages,
-};