Remove spn-conf.xml
am: aebe1d6b3b

Change-Id: I3dcb38da02d525afa083090a5a74146cb7c7ef6d
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 939076f..0c74679 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -61,3 +61,5 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/ETC/system_build_prop_intermediates/build.prop)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib/hw/android.hardware.broadcastradio@1.0-impl.so)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib64/hw/android.hardware.broadcastradio@1.0-impl.so)
diff --git a/camera/QCamera2/HAL3/QCamera3Channel.cpp b/camera/QCamera2/HAL3/QCamera3Channel.cpp
index cb31953..bfeb46a 100644
--- a/camera/QCamera2/HAL3/QCamera3Channel.cpp
+++ b/camera/QCamera2/HAL3/QCamera3Channel.cpp
@@ -1974,6 +1974,8 @@
 
         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));
 
         // Some raw processing may be needed prior to conversion.
         static bool raw_proc_lib_load_attempted = false;
@@ -2007,13 +2009,19 @@
             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 {
         ALOGE("%s: Could not find stream", __func__);
     }
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index febd972..8fc129c 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -6794,7 +6794,12 @@
        ANDROID_STATISTICS_HISTOGRAM_MODE, ANDROID_STATISTICS_SHARPNESS_MAP_MODE,
        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};
+       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
+       };
 
     size_t request_keys_cnt =
             sizeof(request_keys_basic)/sizeof(request_keys_basic[0]);
@@ -6831,7 +6836,13 @@
        ANDROID_STATISTICS_FACE_SCORES,
        ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL,
        ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL, NEXUS_EXPERIMENTAL_2016_HYBRID_AE_ENABLE,
-       ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST };
+       ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST,
+       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
+       };
     size_t result_keys_cnt =
             sizeof(result_keys_basic)/sizeof(result_keys_basic[0]);
 
@@ -6909,7 +6920,8 @@
        ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
        ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES,
        ANDROID_SHADING_AVAILABLE_MODES,
-       ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL };
+       ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL, QCAMERA3_OPAQUE_RAW_FORMAT
+       };
 
     Vector<int32_t> available_characteristics_keys;
     available_characteristics_keys.appendArray(characteristics_keys_basic,
@@ -6917,9 +6929,6 @@
     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*/
@@ -6992,8 +7001,15 @@
             &gCamCapability[cameraId]->padding_info, &buf_planes);
         strides[i*3+2] = buf_planes.plane_info.mp[0].stride;
     }
-    staticInfo.update(QCAMERA3_OPAQUE_RAW_STRIDES, strides,
-            3*raw_count);
+
+    if (raw_count > 0) {
+        staticInfo.update(QCAMERA3_OPAQUE_RAW_STRIDES, strides,
+                3*raw_count);
+        available_characteristics_keys.add(QCAMERA3_OPAQUE_RAW_STRIDES);
+    }
+    staticInfo.update(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
+                      available_characteristics_keys.array(),
+                      available_characteristics_keys.size());
 
     gStaticMetadata[cameraId] = staticInfo.release();
     return rc;
diff --git a/camera/QCamera2/HAL3/QCamera3Stream.cpp b/camera/QCamera2/HAL3/QCamera3Stream.cpp
index 399e73d..e87d1ec 100644
--- a/camera/QCamera2/HAL3/QCamera3Stream.cpp
+++ b/camera/QCamera2/HAL3/QCamera3Stream.cpp
@@ -588,9 +588,9 @@
             break;
         case CAMERA_CMD_TYPE_EXIT:
             CDBG_HIGH("%s: Exit", __func__);
+            pme->flushFreeBatchBufQ();
             /* flush data buf queue */
             pme->mDataQ.flush();
-            pme->flushFreeBatchBufQ();
             running = 0;
             break;
         default:
diff --git a/camera/QCamera2/QCamera2Factory.cpp b/camera/QCamera2/QCamera2Factory.cpp
index 676dd65..6101036 100644
--- a/camera/QCamera2/QCamera2Factory.cpp
+++ b/camera/QCamera2/QCamera2Factory.cpp
@@ -58,7 +58,6 @@
  *==========================================================================*/
 QCamera2Factory::QCamera2Factory()
 {
-    camera_info info;
     mHalDescriptors = NULL;
     mCallbacks = NULL;
     mNumOfCameras = get_num_of_cameras();
@@ -78,10 +77,6 @@
                 } else {
                     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 {
             ALOGE("%s: Not enough resources to allocate HAL descriptor table!",
diff --git a/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera.h b/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera.h
index 57154e3..c32e1ce 100644
--- a/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera.h
+++ b/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera.h
@@ -47,7 +47,7 @@
 #define MM_CAMERA_CHANNEL_POLL_THREAD_MAX 1
 
 #define MM_CAMERA_DEV_NAME_LEN 32
-#define MM_CAMERA_DEV_OPEN_TRIES 30
+#define MM_CAMERA_DEV_OPEN_TRIES 300
 #define MM_CAMERA_DEV_OPEN_RETRY_SLEEP 20
 #define THREAD_NAME_SIZE 15
 
diff --git a/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c b/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c
index 9e6f30f..df2d93c 100644
--- a/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c
+++ b/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c
@@ -250,7 +250,7 @@
 {
     char dev_name[MM_CAMERA_DEV_NAME_LEN];
     int32_t rc = 0;
-    int8_t n_try=MM_CAMERA_DEV_OPEN_TRIES;
+    int32_t n_try=MM_CAMERA_DEV_OPEN_TRIES;
     uint8_t sleep_msec=MM_CAMERA_DEV_OPEN_RETRY_SLEEP;
     int cam_idx = 0;
     const char *dev_name_value = NULL;
diff --git a/device.mk b/device.mk
index 0c98600..dc069d5 100644
--- a/device.mk
+++ b/device.mk
@@ -236,7 +236,6 @@
 PRODUCT_PACKAGES += \
     android.hardware.audio@2.0-impl \
     android.hardware.audio.effect@2.0-impl \
-    android.hardware.broadcastradio@1.0-impl \
     android.hardware.soundtrigger@2.0-impl
 
 #CAMERA
@@ -264,6 +263,7 @@
 NANOHUB_SENSORHAL_LID_STATE_ENABLED := true
 NANOHUB_SENSORHAL_USB_MAG_BIAS_ENABLED := true
 NANOHUB_SENSORHAL_SENSORLIST := $(LOCAL_PATH)/sensorhal/sensorlist.cpp
+NANOHUB_SENSORHAL_DIRECT_REPORT_ENABLED := true
 
 PRODUCT_PACKAGES += \
     sensors.angler \
@@ -542,17 +542,6 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.product.first_api_level=23
 
-# In userdebug, add minidebug info the the boot image and the system server to support
-# diagnosing native crashes.
-ifneq (,$(filter userdebug, $(TARGET_BUILD_VARIANT)))
-    # Boot image.
-    PRODUCT_DEX_PREOPT_BOOT_FLAGS += --generate-mini-debug-info
-    # System server and some of its services.
-    # Note: we cannot use PRODUCT_SYSTEM_SERVER_JARS, as it has not been expanded at this point.
-    $(call add-product-dex-preopt-module-config,services,--generate-mini-debug-info)
-    $(call add-product-dex-preopt-module-config,wifi-service,--generate-mini-debug-info)
-endif
-
 # setup dalvik vm configs.
 $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
 
diff --git a/init.angler.usb.rc b/init.angler.usb.rc
index e4f4215..0cb9d21 100644
--- a/init.angler.usb.rc
+++ b/init.angler.usb.rc
@@ -26,12 +26,12 @@
     write /sys/module/dwc3/boot_finished 1
 
 on post-fs
-    mkdir /dev/usb-ffs 0775 shell shell
+    mkdir /dev/usb-ffs 0770 shell shell
     mkdir /dev/usb-ffs/adb 0770 shell shell
     mount functionfs adb /dev/usb-ffs/adb noatime uid=2000,gid=2000,no_disconnect=1
-    mkdir /dev/usb-ffs/mtp 0770 mtp mtp
-    mount functionfs mtp /dev/usb-ffs/mtp noatime rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
-    write /sys/class/android_usb/android0/f_ffs/aliases adb,mtp
+    write /sys/class/android_usb/android0/f_ffs/aliases adb
+    write /sys/module/g_android/parameters/mtp_rx_req_len 131072
+    write /sys/module/g_android/parameters/mtp_tx_reqs 32
     setprop sys.usb.ffs.max_write 262144
     setprop sys.usb.ffs.max_read 262144
     setprop sys.usb.mtp.device_type 3
@@ -100,7 +100,7 @@
     write /sys/class/android_usb/android0/bDeviceClass 0
     write /sys/class/android_usb/android0/bDeviceSubClass 0
     write /sys/class/android_usb/android0/bDeviceProtocol 0
-    write /sys/class/android_usb/android0/functions mtp
+    write /sys/class/android_usb/android0/functions ptp
     write /sys/class/android_usb/android0/enable 1
     setprop sys.usb.state ${sys.usb.config}
 
@@ -111,7 +111,7 @@
     write /sys/class/android_usb/android0/bDeviceClass 0
     write /sys/class/android_usb/android0/bDeviceSubClass 0
     write /sys/class/android_usb/android0/bDeviceProtocol 0
-    write /sys/class/android_usb/android0/functions mtp,adb
+    write /sys/class/android_usb/android0/functions ptp,adb
     write /sys/class/android_usb/android0/enable 1
     start adbd
     setprop sys.usb.state ${sys.usb.config}
diff --git a/media_codecs.xml b/media_codecs.xml
index 9ca7d80..eb1008b 100644
--- a/media_codecs.xml
+++ b/media_codecs.xml
@@ -111,9 +111,10 @@
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
             <Quirk name="requires-loaded-to-idle-after-allocation" />
-            <Limit name="size" min="96x64" max="4096x2160" />
+            <Limit name="size" min="96x64" max="4096x4096" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
             <Limit name="blocks-per-second" min="1" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="concurrent-instances" max="13" />
@@ -123,9 +124,10 @@
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
             <Quirk name="requires-loaded-to-idle-after-allocation" />
-            <Limit name="size" min="96x64" max="3840x2160" />
+            <Limit name="size" min="96x64" max="3840x3840" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-32400" /> <!-- max 3840x2160 -->
             <Limit name="blocks-per-second" min="1" max="972000" />
             <Limit name="bitrate" range="1-20000000" />
             <Limit name="concurrent-instances" max="13" />
@@ -135,9 +137,10 @@
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
             <Quirk name="requires-loaded-to-idle-after-allocation" />
-            <Limit name="size" min="176x64" max="4096x2160" />
+            <Limit name="size" min="176x64" max="4096x4096" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
             <Limit name="blocks-per-second" min="1" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="concurrent-instances" max="13" />
@@ -148,9 +151,10 @@
         <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="64x64" max="4096x2160" />
+            <Limit name="size" min="64x64" max="4096x4096" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
             <Limit name="blocks-per-second" min="1" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Feature name="adaptive-playback" />
@@ -159,9 +163,10 @@
         <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="64x64" max="1920x1088" />
+            <Limit name="size" min="64x64" max="2048x2048" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-8192" /> <!-- max 2048x1024 -->
             <Limit name="blocks-per-second" min="1" max="489600" />
             <Limit name="bitrate" range="1-60000000" />
             <Feature name="adaptive-playback" />
@@ -193,9 +198,10 @@
         <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="64x64" max="3840x2160" />
+            <Limit name="size" min="64x64" max="3840x3840" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-32400" /> <!-- max 3840x2160 -->
             <Limit name="blocks-per-second" min="1" max="972000" />
             <Limit name="bitrate" range="1-20000000" />
             <Feature name="adaptive-playback" />
@@ -204,9 +210,10 @@
         <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="64x64" max="4096x2160" />
+            <Limit name="size" min="64x64" max="4096x4096" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
             <Limit name="blocks-per-second" min="1" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Feature name="adaptive-playback" />
@@ -215,9 +222,10 @@
         <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="64x64" max="1920x1088" />
+            <Limit name="size" min="64x64" max="2048x2048" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-8192" /> <!-- max 2048x1024 -->
             <Limit name="blocks-per-second" min="1" max="489600" />
             <Limit name="bitrate" range="1-60000000" />
             <Feature name="adaptive-playback" />
diff --git a/media_codecs_performance.xml b/media_codecs_performance.xml
index beea050..dc2a042 100644
--- a/media_codecs_performance.xml
+++ b/media_codecs_performance.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2016 The Android Open Source Project
+<!-- Copyright 2017 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.
@@ -14,120 +14,138 @@
      limitations under the License.
 -->
 
+<!-- Generated file for angler using measurements between OPM1.170720.001 and OPM1.170912.002 -->
 <MediaCodecs>
+    <!-- Measurements between OPR1.170623.010 and OPM1.170906.002 -->
     <Encoders>
         <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" update="true">
-            <Limit name="measured-frame-rate-176x144" range="315-443" /> <!-- TWEAKED -->
-            <Limit name="measured-frame-rate-352x288" range="248-248" /> <!-- N=40 v95%=1.4 -->
+            <!-- measured 98%:120-525 med:183/183 variance:2.1 -->
+            <Limit name="measured-frame-rate-176x144" range="179-321" /> <!-- N=128 -->
+            <Limit name="measured-frame-rate-352x288" range="284-284" /> <!-- N=118 v98%=1.6 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="258-258" /> <!-- N=40 v95%=1.4 -->
-            <Limit name="measured-frame-rate-720x480" range="123-123" /> <!-- N=40 v95%=1.5 -->
-            <Limit name="measured-frame-rate-1280x720" range="61-62" /> <!-- N=40 v95%=1.5 -->
-            <Limit name="measured-frame-rate-1920x1080" range="30-30" /> <!-- N=40 v95%=1.4 -->
+            <!-- measured 98%:129-525 med:288/285 FLAKY(mn=122.1 < 129 - 570) variance:2.0 -->
+            <Limit name="measured-frame-rate-320x240" range="257-285" /> <!-- N=118 -->
+            <!-- measured 98%:76-203 med:163/163 FLAKY(mn=59.4 < 76 - 326) -->
+            <Limit name="measured-frame-rate-720x480" range="118-163" /> <!-- TWEAKED N=118 v98%=1.6 -->
+            <Limit name="measured-frame-rate-1280x720" range="67-68" /> <!-- N=118 v98%=1.3 -->
+            <Limit name="measured-frame-rate-1920x1080" range="41-41" /> <!-- N=118 v98%=1.4 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="329-329" /> <!-- N=40 v95%=1.3 -->
-            <Limit name="measured-frame-rate-720x480" range="121-121" /> <!-- N=40 v95%=1.5 -->
-            <Limit name="measured-frame-rate-1280x720" range="62-62" /> <!-- N=40 v95%=1.5 -->
-            <Limit name="measured-frame-rate-1920x1080" range="30-30" /> <!-- N=40 v95%=1.4 -->
-            <!-- measured 95%:5-20 med:9 SLOW -->
-            <Limit name="measured-frame-rate-3840x2160" range="8-16" /> <!-- TWEAKED -->
+            <Limit name="measured-frame-rate-320x240" range="285-309" /> <!-- N=118 v98%=1.6 -->
+            <Limit name="measured-frame-rate-720x480" range="157-157" /> <!-- N=118 v98%=1.5 -->
+            <Limit name="measured-frame-rate-1280x720" range="67-67" /> <!-- N=118 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="41-41" /> <!-- N=118 v98%=1.3 -->
+            <!-- measured 98%:7-33 med:14/14 variance:2.2 -->
+            <Limit name="measured-frame-rate-3840x2160" range="11-20" /> <!-- N=120 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" update="true">
-            <Limit name="measured-frame-rate-176x144" range="380-380" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-352x288" range="189-189" /> <!-- N=40 v95%=1.2 -->
-            <Limit name="measured-frame-rate-640x480" range="82-82" /> <!-- N=40 v95%=1.1 -->
+            <!-- measured 98%:111-406 med:175/173 FLAKY(87 - 406 < mx=406.2) -->
+            <Limit name="measured-frame-rate-176x144" range="173-203" /> <!-- N=132 v98%=1.9 -->
+            <Limit name="measured-frame-rate-352x288" range="222-222" /> <!-- N=118 v98%=1.1 -->
+            <Limit name="measured-frame-rate-640x480" range="85-85" /> <!-- N=118 v98%=1.0 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="121-122" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-640x360" range="117-117" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-1280x720" range="38-38" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-1920x1080" range="15-15" /> <!-- N=40 v95%=1.0 -->
+            <Limit name="measured-frame-rate-320x180" range="122-122" /> <!-- N=118 v98%=1.0 -->
+            <Limit name="measured-frame-rate-640x360" range="113-113" /> <!-- N=112 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="39-39" /> <!-- N=116 v98%=1.0 (OPR1.170623.009-) -->
+            <Limit name="measured-frame-rate-1920x1080" range="15-15" /> <!-- N=118 v98%=1.0 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
-            <!-- measured 95%:205-329 med:231 SLOW -->
-            <Limit name="measured-frame-rate-176x144" range="231-259" /> <!-- N=40 v95%=1.3 -->
+            <Limit name="measured-frame-rate-176x144" range="234-234" /> <!-- N=118 v98%=1.3 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="219-219" /> <!-- N=40 v95%=1.4 -->
-            <Limit name="measured-frame-rate-720x480" range="76-76" /> <!-- N=40 v95%=1.6 -->
-            <!-- measured 95%:21-53 med:26 SLOW -->
-            <Limit name="measured-frame-rate-1280x720" range="25-34" /> <!-- N=40 v95%=1.6 -->
-            <Limit name="measured-frame-rate-1920x1080" range="12-20" /> <!-- TWEAKED -->
+            <!-- measured 98%:113-364 med:227/232 FLAKY(mn=90.3 < 113 - 464) -->
+            <Limit name="measured-frame-rate-320x240" range="180-232" /> <!-- TWEAKED N=118 v98%=1.8 -->
+            <!-- measured 97%:48-124 med:85/86 FLAKY(mn=29.1 < 43 - 178) -->
+            <Limit name="measured-frame-rate-720x480" range="58-89" /> <!-- TWEAKED N=118 v97%=1.6 -->
+            <Limit name="measured-frame-rate-1280x720" range="41-46" /> <!-- N=118 v98%=1.7 -->
+            <Limit name="measured-frame-rate-1920x1080" range="17-22" /> <!-- N=122 v98%=1.7 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
-            <Limit name="measured-frame-rate-176x144" range="275-293" /> <!-- N=40 v93%=1.2 -->
+            <Limit name="measured-frame-rate-176x144" range="268-269" /> <!-- N=118 v98%=1.3 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="89-92" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-640x360" range="38-39" /> <!-- N=40 v95%=1.1 -->
-            <!-- measured 95%:17-27 med:19 SLOW -->
-            <Limit name="measured-frame-rate-1280x720" range="18-21" /> <!-- N=40 v95%=1.2 -->
-            <Limit name="measured-frame-rate-1920x1080" range="9-10" /> <!-- N=40 v93%=1.2 -->
+            <Limit name="measured-frame-rate-320x180" range="96-96" /> <!-- N=118 v98%=1.1 -->
+            <Limit name="measured-frame-rate-640x360" range="37-37" /> <!-- N=118 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1280x720" range="27-30" /> <!-- N=116 v98%=1.3 (OPR1.170623.009-) -->
+            <Limit name="measured-frame-rate-1920x1080" range="13-13" /> <!-- N=118 v98%=1.5 -->
+        </MediaCodec>
+        <!-- Measurements between OPR1.170207.001 and OPM1.170906.002 -->
+        <MediaCodec name="OMX.google.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
+            <!-- measured 98%:48-128 med:106/106 N=96 -->
+            <Limit name="measured-frame-rate-320x180" range="96-106" /> <!-- v98%=1.6 -->
+            <!-- measured 98%:23-46 med:39/39 N=94 -->
+            <Limit name="measured-frame-rate-640x360" range="39-39" /> <!-- v98%=1.4 -->
+            <!-- measured 98%:4-11 med:9/9 N=96 -->
+            <Limit name="measured-frame-rate-1280x720" range="7-9" /> <!-- v98%=1.7 -->
         </MediaCodec>
     </Encoders>
     <Decoders>
         <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" update="true">
-            <Limit name="measured-frame-rate-176x144" range="707-707" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-352x288" range="752-752" /> <!-- N=40 v95%=1.1 -->
+            <Limit name="measured-frame-rate-176x144" range="721-721" /> <!-- N=112 v98%=1.3 -->
+            <Limit name="measured-frame-rate-352x288" range="685-687" /> <!-- N=112 v98%=1.4 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="421-421" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-720x480" range="248-248" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-1280x720" range="298-298" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-1920x1088" range="144-145" /> <!-- N=40 v95%=1.0 -->
+            <Limit name="measured-frame-rate-320x240" range="407-407" /> <!-- N=110 v98%=1.2 -->
+            <Limit name="measured-frame-rate-720x480" range="239-239" /> <!-- N=112 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="290-290" /> <!-- N=112 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1920x1080" range="145-145" /> <!-- N=110 v98%=1.1 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
-            <Limit name="measured-frame-rate-352x288" range="503-526" /> <!-- N=40 v95%=1.3 -->
-            <Limit name="measured-frame-rate-640x360" range="426-426" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-720x480" range="346-346" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1280x720" range="452-452" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1920x1080" range="238-238" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-3840x2160" range="43-43" /> <!-- N=40 v95%=1.0 -->
+            <Limit name="measured-frame-rate-352x288" range="450-451" /> <!-- N=114 v98%=1.4 (OPR1.170623.019-) -->
+            <Limit name="measured-frame-rate-640x360" range="407-408" /> <!-- N=110 v98%=1.2 -->
+            <Limit name="measured-frame-rate-720x480" range="364-364" /> <!-- N=110 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="430-430" /> <!-- N=114 v98%=1.3 (OPR1.170623.019-) -->
+            <Limit name="measured-frame-rate-1920x1080" range="250-250" /> <!-- N=112 v98%=1.1 -->
+            <Limit name="measured-frame-rate-3840x2160" range="43-43" /> <!-- N=110 v98%=1.0 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" update="true">
-            <Limit name="measured-frame-rate-176x144" range="727-727" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-480x360" range="651-651" /> <!-- N=40 v95%=1.0 -->
+            <!-- measured 98%:467-742 med:690/690 FLAKY(mn=326.9 < 345 - 1380) -->
+            <Limit name="measured-frame-rate-176x144" range="690-690" /> <!-- N=112 v98%=1.3 -->
+            <Limit name="measured-frame-rate-480x360" range="613-613" /> <!-- N=112 v98%=1.3 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="413-413" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-640x360" range="405-405" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-1280x720" range="468-468" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1920x1080" range="248-249" /> <!-- N=40 v95%=1.0 -->
+            <Limit name="measured-frame-rate-320x180" range="411-411" /> <!-- N=114 v98%=1.1 (OPR1.170623.019-) -->
+            <Limit name="measured-frame-rate-640x360" range="391-391" /> <!-- N=112 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="442-442" /> <!-- N=112 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="248-248" /> <!-- N=110 v98%=1.0 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
-            <Limit name="measured-frame-rate-176x144" range="145-155" /> <!-- N=40 v95%=1.2 -->
+            <Limit name="measured-frame-rate-176x144" range="124-181" /> <!-- N=112 v98%=1.9 -->
         </MediaCodec>
+        <!-- Measurements between OPR1.170623.019 and OPM1.170912.002 -->
         <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="384-384" /> <!-- N=40 v93%=1.0 -->
-            <Limit name="measured-frame-rate-720x480" range="112-112" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1280x720" range="40-43" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1920x1080" range="17-18" /> <!-- N=40 v95%=1.1 -->
+            <Limit name="measured-frame-rate-320x240" range="345-345" /> <!-- N=114 v98%=1.2 -->
+            <Limit name="measured-frame-rate-720x480" range="117-117" /> <!-- N=114 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="45-45" /> <!-- N=112 v98%=1.3 (OPM1.170720.001-) -->
+            <Limit name="measured-frame-rate-1920x1080" range="18-18" /> <!-- N=114 v98%=1.2 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
-            <Limit name="measured-frame-rate-352x288" range="300-323" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-640x360" range="134-146" /> <!-- N=40 v95%=1.2 -->
-            <Limit name="measured-frame-rate-720x480" range="119-128" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1280x720" range="45-46" /> <!-- N=40 v95%=1.0 -->
-            <Limit name="measured-frame-rate-1920x1080" range="23-25" /> <!-- N=40 v95%=1.2 -->
+            <Limit name="measured-frame-rate-352x288" range="279-280" /> <!-- N=110 v98%=1.6 -->
+            <!-- measured 98%:90-204 med:162/162 FLAKY(mn=70.0 < 81 - 324) -->
+            <Limit name="measured-frame-rate-640x360" range="140-162" /> <!-- TWEAKED N=110 v98%=1.5 -->
+            <Limit name="measured-frame-rate-720x480" range="142-142" /> <!-- N=120 v98%=1.6 (OPR1.170623.019-) -->
+            <!-- measured 98%:32-74 med:58/58 FLAKY(mn=22.7 < 29 - 116) -->
+            <Limit name="measured-frame-rate-1280x720" range="45-58" /> <!-- TWEAKED N=116 v98%=1.5 -->
+            <Limit name="measured-frame-rate-1920x1080" range="33-33" /> <!-- N=114 v98%=1.6 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
-            <!-- measured 95%:169-364 med:187 SLOW -->
-            <Limit name="measured-frame-rate-176x144" range="186-248" /> <!-- N=40 v95%=1.5 -->
+            <Limit name="measured-frame-rate-176x144" range="156-231" /> <!-- N=116 v98%=2.0 -->
         </MediaCodec>
+        <!-- Measurements between OPR1.170623.019 and OPM1.170912.002 -->
         <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="508-514" /> <!-- N=40 v95%=1.4 -->
-            <!-- measured 93%:150-232 med:160 SLOW -->
-            <Limit name="measured-frame-rate-640x360" range="160-187" /> <!-- N=40 v93%=1.2 -->
-            <Limit name="measured-frame-rate-1280x720" range="34-38" /> <!-- N=40 v95%=1.2 -->
-            <Limit name="measured-frame-rate-1920x1080" range="13-15" /> <!-- N=40 v95%=1.2 -->
+            <Limit name="measured-frame-rate-320x180" range="358-462" /> <!-- N=114 v98%=1.7 -->
+            <!-- measured 98%:105-287 med:231/230 FLAKY(mn=101.0 < 105 - 460) -->
+            <Limit name="measured-frame-rate-640x360" range="202-230" /> <!-- TWEAKED N=114 v98%=1.7 (OPM1.170720.001-) -->
+            <Limit name="measured-frame-rate-1280x720" range="48-48" /> <!-- N=118 v98%=1.6 (OPR1.170623.010-) -->
+            <Limit name="measured-frame-rate-1920x1080" range="19-19" /> <!-- N=114 v98%=1.5 -->
         </MediaCodec>
         <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
-            <Limit name="measured-frame-rate-320x180" range="326-337" /> <!-- N=40 v95%=1.4 -->
-            <Limit name="measured-frame-rate-640x360" range="122-122" /> <!-- N=40 v95%=1.2 -->
-            <Limit name="measured-frame-rate-1280x720" range="41-43" /> <!-- N=40 v95%=1.1 -->
-            <Limit name="measured-frame-rate-1920x1080" range="25-27" /> <!-- N=40 v95%=1.1 -->
+            <Limit name="measured-frame-rate-320x180" range="279-305" /> <!-- N=112 v98%=1.5 -->
+            <Limit name="measured-frame-rate-640x360" range="138-138" /> <!-- N=114 v98%=1.5 (OPR1.170623.019-) -->
+            <Limit name="measured-frame-rate-1280x720" range="54-54" /> <!-- N=114 v98%=1.4 (OPR1.170623.019-) -->
+            <Limit name="measured-frame-rate-1920x1080" range="34-34" /> <!-- N=112 v98%=1.4 -->
         </MediaCodec>
     </Decoders>
 </MediaCodecs>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
index b066794..1713b4d 100755
--- a/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
@@ -26,7 +26,7 @@
 
     <!-- Values for GPS configuration (AT&T) -->
     <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=NONE</item>
+        <item>SUPL_HOST=supl.google.com</item>
         <item>SUPL_PORT=7275</item>
         <item>NTP_SERVER=north-america.pool.ntp.org</item>
         <item>SUPL_MODE=3</item>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
index 16b4a40..0bae5fe 100755
--- a/overlay/frameworks/base/core/res/res/xml/power_profile.xml
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -18,17 +18,132 @@
 -->
 <device name="Android">
     <!-- All values are in mAh except as noted -->
+
+    <!-- Nothing -->
     <item name="none">0</item>
-    <item name="screen.on">169.4278765</item>
-    <item name="screen.full">79.09344216</item>
-    <item name="bluetooth.active">25.2</item>
-    <item name="bluetooth.on">1.7</item>
-    <item name="wifi.on">21.21733311</item>
-    <item name="wifi.active">98.04989804</item>
-    <item name="wifi.scan">129.8951166</item>
-    <item name="dsp.audio">26.5</item>
+
+    <!-- This is the battery capacity in mAh -->
+    <item name="battery.capacity">3450</item>
+
+    <!-- Number of cores each CPU cluster contains -->
+    <array name="cpu.clusters.cores">
+        <value>4</value> <!-- Cluster 0 has 4 cores (cpu0, cpu1, cpu2, cpu3) -->
+        <value>4</value> <!-- Cluster 1 has 4 cores (cpu4, cpu5, cpu6, cpu7) -->
+    </array>
+
+    <!-- Power consumption when CPU is suspended -->
+    <item name="cpu.idle">5.567</item>
+    <!-- Additional power consumption when CPU is in a kernel idle loop -->
+    <item name="cpu.awake">0.025</item>
+
+    <!-- Different CPU speeds as reported in
+         /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies -->
+    <array name="cpu.speeds.cluster0">
+        <value>384000</value> <!-- 384 MHz CPU speed -->
+        <value>460800</value> <!-- 460 MHz CPU speed -->
+        <value>600000</value> <!-- 600 MHz CPU speed -->
+        <value>672000</value> <!-- 672 MHz CPU speed -->
+        <value>768000</value> <!-- 768 MHz CPU speed -->
+        <value>864000</value> <!-- 864 MHz CPU speed -->
+        <value>960000</value> <!-- 960 MHz CPU speed -->
+        <value>1248000</value> <!-- 1248 MHz CPU speed -->
+        <value>1344000</value> <!-- 1344 MHz CPU speed -->
+        <value>1478400</value> <!-- 1478 MHz CPU speed -->
+        <value>1555200</value> <!-- 1555 MHz CPU speed -->
+    </array>
+    <!-- Different CPU speeds as reported in
+         /sys/devices/system/cpu/cpu4/cpufreq/scaling_available_frequencies -->
+    <array name="cpu.speeds.cluster1">
+        <value>384000</value> <!-- 384 MHz CPU speed -->
+        <value>480000</value> <!-- 480 MHz CPU speed -->
+        <value>633600</value> <!-- 633 MHz CPU speed -->
+        <value>768000</value> <!-- 768 MHz CPU speed -->
+        <value>864000</value> <!-- 864 MHz CPU speed -->
+        <value>960000</value> <!-- 960 MHz CPU speed -->
+        <value>1248000</value> <!-- 1248 MHz CPU speed -->
+        <value>1344000</value> <!-- 1344 MHz CPU speed -->
+        <value>1440000</value> <!-- 1440 MHz CPU speed -->
+        <value>1536000</value> <!-- 1536 MHz CPU speed -->
+        <value>1632000</value> <!-- 1632 MHz CPU speed -->
+        <value>1728000</value> <!-- 1728 MHz CPU speed -->
+        <value>1824000</value> <!-- 1824 MHz CPU speed -->
+        <value>1958400</value> <!-- 1958 MHz CPU speed -->
+    </array>
+
+    <!-- Additional power used by a CPU from cluster 0 when running at different
+         speeds. Currently this measurement also includes cluster cost. -->
+    <array name="cpu.active.cluster0">
+        <value>85.973</value> <!-- 384 MHz CPU speed -->
+        <value>87.787</value> <!-- 460 MHz CPU speed -->
+        <value>91.985</value> <!-- 600 MHz CPU speed -->
+        <value>97.400</value> <!-- 672 MHz CPU speed -->
+        <value>101.936</value> <!-- 768 MHz CPU speed -->
+        <value>108.948</value> <!-- 864 MHz CPU speed -->
+        <value>114.649</value> <!-- 960 MHz CPU speed -->
+        <value>139.994</value> <!-- 1248 MHz CPU speed -->
+        <value>149.298</value> <!-- 1344 MHz CPU speed -->
+        <value>164.705</value> <!-- 1478 MHz CPU speed -->
+        <value>173.731</value> <!-- 1555 MHz CPU speed -->
+    </array>
+    <!-- Additional power used by a CPU from cluster 1 when running at different
+         speeds. Currently this measurement also includes cluster cost. -->
+    <array name="cpu.active.cluster1">
+        <value>174.141</value> <!-- 384 MHz CPU speed -->
+        <value>190.939</value> <!-- 480 MHz CPU speed -->
+        <value>219.240</value> <!-- 633 MHz CPU speed -->
+        <value>242.060</value> <!-- 768 MHz CPU speed -->
+        <value>271.477</value> <!-- 864 MHz CPU speed -->
+        <value>299.373</value> <!-- 960 MHz CPU speed -->
+        <value>373.423</value> <!-- 1248 MHz CPU speed -->
+        <value>409.111</value> <!-- 1344 MHz CPU speed -->
+        <value>436.408</value> <!-- 1440 MHz CPU speed -->
+        <value>466.983</value> <!-- 1536 MHz CPU speed -->
+        <value>515.210</value> <!-- 1632 MHz CPU speed -->
+        <value>563.748</value> <!-- 1728 MHz CPU speed -->
+        <value>615.519</value> <!-- 1824 MHz CPU speed -->
+        <value>701.696</value> <!-- 1958 MHz CPU speed -->
+    </array>
+
+    <!-- Additional power used when screen is turned on at minimum brightness -->
+    <item name="screen.on">137.013</item>
+    <!-- Additional power used when screen is at maximum brightness, compared to
+         screen at minimum brightness -->
+    <item name="screen.full">225.640</item>
+
+    <!-- Average power used by the camera flash module when on -->
+    <item name="camera.flashlight">315.269</item>
+    <!-- Average power use by the camera subsystem for a typical camera
+         application. Intended as a rough estimate for an application running a
+         preview and capturing approximately 10 full-resolution pictures per
+         minute. -->
+    <item name="camera.avg">1235.773</item>
+
+    <!-- Additional power used when audio decoding/encoding via DSP -->
+    <item name="dsp.audio">30.714</item>
+    <!-- Additional power used when video decoding via DSP -->
     <item name="dsp.video">242.0</item>
+
+    <!-- Additional power used when GPS is acquiring a signal -->
     <item name="gps.on">5.661105191</item>
+
+    <!-- Additional power used when Wi-Fi is turned on but not receiving,
+         transmitting, or scanning -->
+    <item name="wifi.on">21.21733311</item>
+    <!-- Additional power used when transmitting or receiving over Wi-Fi -->
+    <item name="wifi.active">98.04989804</item>
+    <!-- Additional power used when Wi-Fi is scanning for access points -->
+    <item name="wifi.scan">129.8951166</item>
+
+    <!-- mA.  Current figures based on .0801 s/c and 75.48mA while scanning -->
+    <array name="wifi.batchedscan">
+        <value>0.0003</value>   <!-- 1-8/hr -->
+        <value>0.003</value>    <!-- 9-64/hr -->
+        <value>0.03</value>     <!-- 65-512/hr -->
+        <value>0.3</value>      <!-- 513-4,096/hr -->
+        <value>3</value>        <!-- 4097-/hr -->
+    </array>
+
+    <!-- Additional power used when cellular radio is transmitting/receiving -->
     <item name="radio.active">64.8918361</item>
     <!-- The current consumed by the radio when it is scanning for a signal -->
     <item name="radio.scanning">19.13559783</item>
@@ -41,82 +156,4 @@
         <value>6.725541238</value>
     </array>
 
-    <!-- Different CPU speeds as reported in
-         /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
-    <array name="cpu.speeds.cluster0">
-        <value>384000</value> <!-- 384 MHz CPU speed -->
-        <value>460800</value> <!-- 460.8 MHz CPU speed -->
-        <value>600000</value> <!-- 600 MHz CPU speed -->
-        <value>672000</value> <!-- 672 MHz CPU speed -->
-        <value>768000</value> <!-- 768 MHz CPU speed -->
-        <value>864000</value> <!-- 864 MHz CPU speed -->
-        <value>960000</value> <!-- 960 MHz CPU speed -->
-        <value>1248000</value> <!-- 1248 MHz CPU speed -->
-        <value>1344000</value> <!-- 1344 MHz CPU speed -->
-        <value>1478400</value> <!-- 1478.4 MHz CPU speed -->
-        <value>1555200</value> <!-- 1555.2 MHz CPU speed -->
-    </array>
-    <array name="cpu.speeds.cluster1">
-        <value>384000</value> <!-- 384 MHz CPU speed -->
-        <value>480000</value> <!-- 480 MHz CPU speed -->
-        <value>633600</value> <!-- 633.6 MHz CPU speed -->
-        <value>768000</value> <!-- 768 MHz CPU speed -->
-        <value>864000</value> <!-- 864 MHz CPU speed -->
-        <value>960000</value> <!-- 960 MHz CPU speed -->
-        <value>1248000</value> <!-- 1248 MHz CPU speed -->
-        <value>1344000</value> <!-- 1344 MHz CPU speed -->
-        <value>1440000</value> <!-- 1440 MHz CPU speed -->
-        <value>1536000</value> <!-- 1536 MHz CPU speed -->
-        <value>1632000</value> <!-- 1632 MHz CPU speed -->
-        <value>1728000</value> <!-- 1728 MHz CPU speed -->
-        <value>1824000</value> <!-- 1824 MHz CPU speed -->
-        <value>1958400</value> <!-- 1958.4 MHz CPU speed -->
-    </array>
-    <!-- Power consumption when CPU is idle -->
-    <item name="cpu.idle">0.144925583</item>
-    <item name="cpu.awake">9.488210416</item>
-    <!-- Power consumption at different speeds -->
-    <array name="cpu.active.cluster0">
-        <value>202.17</value> <!-- 384 MHz CPU speed -->
-        <value>211.34</value> <!-- 460.8 MHz CPU speed -->
-        <value>224.22</value> <!-- 600 MHz CPU speed -->
-        <value>238.72</value> <!-- 672 MHz CPU speed -->
-        <value>251.89</value> <!-- 768 MHz CPU speed -->
-        <value>263.07</value> <!-- 864 MHz CPU speed -->
-        <value>276.33</value> <!-- 960 MHz CPU speed -->
-        <value>314.40</value> <!-- 1248 MHz CPU speed -->
-        <value>328.12</value> <!-- 1344 MHz CPU speed -->
-        <value>369.63</value> <!-- 1478 MHz CPU speed -->
-        <value>391.05</value> <!-- 1555.2 MHz CPU speed -->
-    </array>
-    <array name="cpu.active.cluster1">
-        <value>354.95</value> <!-- 384 MHz CPU speed -->
-        <value>387.15</value> <!-- 480 MHz CPU speed -->
-        <value>442.86</value> <!-- 633.6 MHz CPU speed -->
-        <value>510.20</value> <!-- 768 MHz CPU speed -->
-        <value>582.65</value> <!-- 864 MHz CPU speed -->
-        <value>631.99</value> <!-- 960 MHz CPU speed -->
-        <value>812.02</value> <!-- 1248 MHz CPU speed -->
-        <value>858.84</value> <!-- 1344 MHz CPU speed -->
-        <value>943.23</value> <!-- 1440 MHz CPU speed -->
-        <value>992.45</value> <!-- 1536 MHz CPU speed -->
-        <value>1086.32</value> <!-- 1632 MHz CPU speed -->
-        <value>1151.96</value> <!-- 1728 MHz CPU speed -->
-        <value>1253.80</value> <!-- 1824 MHz CPU speed -->
-        <value>1397.67</value> <!-- 1958.4 MHz CPU speed -->
-    </array>
-    <array name="cpu.clusters.cores">
-        <value>4</value> <!-- Cluster 0 has 4 cores (cpu0, cpu1, cpu2, cpu3) -->
-        <value>4</value> <!-- Cluster 1 has 4 cores (cpu4, cpu5, cpu6, cpu7) -->
-    </array>
-    <!-- This is the battery capacity in mAh -->
-    <item name="battery.capacity">3450</item>
-
-    <array name="wifi.batchedscan"> <!-- mA.  Current figures based on .0801 s/c and 75.48mA while scanning -->
-        <value>.0003</value> <!-- 1-8/hr -->
-        <value>.003</value>  <!-- 9-64/hr -->
-        <value>.03</value>   <!-- 65-512/hr -->
-        <value>.3</value>    <!-- 513-4,096/hr -->
-        <value>3</value>    <!-- 4097-/hr -->
-    </array>
 </device>
diff --git a/proprietary-blobs.txt b/proprietary-blobs.txt
index fe9a7ae..0599c51 100644
--- a/proprietary-blobs.txt
+++ b/proprietary-blobs.txt
@@ -15,7 +15,6 @@
 # This file is generated by device/common/generate-blob-lists.sh - DO NOT EDIT
 
 /system/bin/diag_qshrink4_daemon
-/system/bin/halutil
 /system/bin/mm-audio-alsa-test
 /system/bin/PktRspTest
 /system/bin/qmi-framework-tests/check_system_health
diff --git a/self-extractors/extract-lists.txt b/self-extractors/extract-lists.txt
index f1f4fe3..1fdcd56 100644
--- a/self-extractors/extract-lists.txt
+++ b/self-extractors/extract-lists.txt
@@ -6,7 +6,6 @@
   qcom)
     TO_EXTRACT="\
             system/bin/diag_qshrink4_daemon \
-            system/bin/halutil \
             system/bin/mm-audio-alsa-test \
             system/bin/PktRspTest \
             system/bin/qmi-framework-tests/check_system_health \
diff --git a/self-extractors/qcom/staging/device-partial.mk b/self-extractors/qcom/staging/device-partial.mk
index 65eff93..9bd906a 100644
--- a/self-extractors/qcom/staging/device-partial.mk
+++ b/self-extractors/qcom/staging/device-partial.mk
@@ -15,7 +15,6 @@
 # Qualcomm blob(s) necessary for Shamu hardware
 PRODUCT_COPY_FILES := \
     vendor/qcom/angler/proprietary/diag_qshrink4_daemon:system/bin/diag_qshrink4_daemon:qcom \
-    vendor/qcom/angler/proprietary/halutil:system/bin/halutil:qcom \
     vendor/qcom/angler/proprietary/mm-audio-alsa-test:system/bin/mm-audio-alsa-test:qcom \
     vendor/qcom/angler/proprietary/PktRspTest:system/bin/PktRspTest:qcom \
     vendor/qcom/angler/proprietary/check_system_health:system/bin/qmi-framework-tests/check_system_health:qcom \
diff --git a/ueventd.angler.rc b/ueventd.angler.rc
index 8bb8327..f877e3f 100644
--- a/ueventd.angler.rc
+++ b/ueventd.angler.rc
@@ -82,8 +82,8 @@
 /dev/block/platform/soc.0/f9824900.sdhci/by-name/frp 0600 system system
 # sensor HUB
 /dev/spich                0660   system     system
-/dev/nanohub              0640   system     system
-/dev/nanohub_comms        0640   system     system
+/dev/nanohub              0660   system     system
+/dev/nanohub_comms        0660   system     system
 /dev/pn54x                0660   nfc        nfc
 #add audio calib device for audio
 /dev/msm_audio_cal        0664   system     audio
diff --git a/vendor_owner_info.txt b/vendor_owner_info.txt
index e1c783a..e401d89 100644
--- a/vendor_owner_info.txt
+++ b/vendor_owner_info.txt
@@ -1,5 +1,4 @@
 system/bin/diag_qshrink4_daemon:qcom
-system/bin/halutil:qcom
 system/bin/mm-audio-alsa-test:qcom
 system/bin/PktRspTest:qcom
 system/bin/qmi-framework-tests/check_system_health:qcom