summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk113
-rw-r--r--BoardConfigCommon.mk284
-rw-r--r--README.md20
-rw-r--r--audio/audio_effects.xml90
-rw-r--r--audio/audio_output_policy.conf70
-rw-r--r--audio/audio_platform_info.xml429
-rw-r--r--audio/audio_policy_configuration.xml348
-rw-r--r--audio/audio_tuning_mixer.txt41
-rw-r--r--audio/graphite_ipc_platform_info.xml47
-rw-r--r--audio/listen_platform_info.xml42
-rw-r--r--audio/mixer_paths.xml2516
-rw-r--r--audio/sound_trigger_mixer_paths.xml178
-rw-r--r--audio/sound_trigger_platform_info.xml137
-rw-r--r--biometrics/Android.bp34
-rw-r--r--biometrics/BiometricsFingerprint.cpp409
-rw-r--r--biometrics/BiometricsFingerprint.h84
-rw-r--r--biometrics/Hardware.h58
-rw-r--r--biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc25
-rw-r--r--biometrics/service.cpp51
-rw-r--r--bluetooth/bdroid_buildcfg.h33
-rw-r--r--compatibility_matrix.xml115
-rw-r--r--config.fs191
-rw-r--r--configs/gps/flp.conf91
-rw-r--r--configs/gps/gps.conf212
-rw-r--r--configs/gps/izat.conf279
-rw-r--r--configs/gps/lowi.conf21
-rw-r--r--configs/gps/sap.conf70
-rw-r--r--configs/gps/xtwifi.conf75
-rw-r--r--configs/media_codecs.xml381
-rw-r--r--configs/media_codecs_performance.xml146
-rw-r--r--configs/media_profiles_V1_0.xml1173
-rw-r--r--configs/msm_irqbalance.conf5
-rw-r--r--configs/privapp-permissions-qti.xml111
-rw-r--r--configs/public.libraries.txt3
-rw-r--r--configs/qti_whitelist.xml45
-rw-r--r--configs/sec_config330
-rw-r--r--configs/whitelistedapps.xml63
-rw-r--r--doze/Android.mk31
-rw-r--r--doze/AndroidManifest.xml59
-rw-r--r--doze/proguard.flags8
-rw-r--r--doze/res/color/switch_bar_bg.xml20
-rw-r--r--doze/res/color/switchbar_switch_thumb_tint.xml20
-rw-r--r--doze/res/color/switchbar_switch_track_tint.xml21
-rw-r--r--doze/res/drawable/switchbar_background.xml20
-rw-r--r--doze/res/layout/doze.xml28
-rw-r--r--doze/res/layout/switch_bar.xml48
-rw-r--r--doze/res/values/styles.xml62
-rw-r--r--doze/res/xml/doze_settings.xml49
-rw-r--r--doze/src/org/lineageos/settings/doze/BootCompletedReceiver.java38
-rw-r--r--doze/src/org/lineageos/settings/doze/DozeService.java98
-rw-r--r--doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java34
-rw-r--r--doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java168
-rw-r--r--doze/src/org/lineageos/settings/doze/ProximitySensor.java106
-rw-r--r--doze/src/org/lineageos/settings/doze/TiltSensor.java94
-rw-r--r--doze/src/org/lineageos/settings/doze/Utils.java116
-rwxr-xr-xextract-files.sh89
-rw-r--r--framework_manifest.xml39
-rw-r--r--gps/Android.mk5
-rw-r--r--gps/CleanSpec.mk (renamed from CleanSpec.mk)0
-rw-r--r--gps/Makefile.am (renamed from Makefile.am)0
-rw-r--r--gps/android/1.0/AGnss.cpp (renamed from android/1.0/AGnss.cpp)0
-rw-r--r--gps/android/1.0/AGnss.h (renamed from android/1.0/AGnss.h)0
-rw-r--r--gps/android/1.0/AGnssRil.cpp (renamed from android/1.0/AGnssRil.cpp)0
-rw-r--r--gps/android/1.0/AGnssRil.h (renamed from android/1.0/AGnssRil.h)0
-rw-r--r--gps/android/1.0/Android.mk (renamed from android/1.0/Android.mk)0
-rw-r--r--gps/android/1.0/Gnss.cpp (renamed from android/1.0/Gnss.cpp)0
-rw-r--r--gps/android/1.0/Gnss.h (renamed from android/1.0/Gnss.h)0
-rw-r--r--gps/android/1.0/GnssBatching.cpp (renamed from android/1.0/GnssBatching.cpp)0
-rw-r--r--gps/android/1.0/GnssBatching.h (renamed from android/1.0/GnssBatching.h)0
-rw-r--r--gps/android/1.0/GnssConfiguration.cpp (renamed from android/1.0/GnssConfiguration.cpp)0
-rw-r--r--gps/android/1.0/GnssConfiguration.h (renamed from android/1.0/GnssConfiguration.h)0
-rw-r--r--gps/android/1.0/GnssDebug.cpp (renamed from android/1.0/GnssDebug.cpp)0
-rw-r--r--gps/android/1.0/GnssDebug.h (renamed from android/1.0/GnssDebug.h)0
-rw-r--r--gps/android/1.0/GnssGeofencing.cpp (renamed from android/1.0/GnssGeofencing.cpp)0
-rw-r--r--gps/android/1.0/GnssGeofencing.h (renamed from android/1.0/GnssGeofencing.h)0
-rw-r--r--gps/android/1.0/GnssMeasurement.cpp (renamed from android/1.0/GnssMeasurement.cpp)0
-rw-r--r--gps/android/1.0/GnssMeasurement.h (renamed from android/1.0/GnssMeasurement.h)0
-rw-r--r--gps/android/1.0/GnssNi.cpp (renamed from android/1.0/GnssNi.cpp)0
-rw-r--r--gps/android/1.0/GnssNi.h (renamed from android/1.0/GnssNi.h)0
-rw-r--r--gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc (renamed from android/1.0/android.hardware.gnss@1.0-service-qti.rc)0
-rw-r--r--gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml (renamed from android/1.0/android.hardware.gnss@1.0-service-qti.xml)0
-rw-r--r--gps/android/1.0/location_api/BatchingAPIClient.cpp (renamed from android/1.0/location_api/BatchingAPIClient.cpp)0
-rw-r--r--gps/android/1.0/location_api/BatchingAPIClient.h (renamed from android/1.0/location_api/BatchingAPIClient.h)0
-rw-r--r--gps/android/1.0/location_api/GeofenceAPIClient.cpp (renamed from android/1.0/location_api/GeofenceAPIClient.cpp)0
-rw-r--r--gps/android/1.0/location_api/GeofenceAPIClient.h (renamed from android/1.0/location_api/GeofenceAPIClient.h)0
-rw-r--r--gps/android/1.0/location_api/GnssAPIClient.cpp (renamed from android/1.0/location_api/GnssAPIClient.cpp)0
-rw-r--r--gps/android/1.0/location_api/GnssAPIClient.h (renamed from android/1.0/location_api/GnssAPIClient.h)0
-rw-r--r--gps/android/1.0/location_api/LocationUtil.cpp (renamed from android/1.0/location_api/LocationUtil.cpp)0
-rw-r--r--gps/android/1.0/location_api/LocationUtil.h (renamed from android/1.0/location_api/LocationUtil.h)0
-rw-r--r--gps/android/1.0/location_api/MeasurementAPIClient.cpp (renamed from android/1.0/location_api/MeasurementAPIClient.cpp)0
-rw-r--r--gps/android/1.0/location_api/MeasurementAPIClient.h (renamed from android/1.0/location_api/MeasurementAPIClient.h)0
-rw-r--r--gps/android/1.0/service.cpp (renamed from android/1.0/service.cpp)0
-rw-r--r--gps/android/1.1/AGnss.cpp (renamed from android/1.1/AGnss.cpp)0
-rw-r--r--gps/android/1.1/AGnss.h (renamed from android/1.1/AGnss.h)0
-rw-r--r--gps/android/1.1/AGnssRil.cpp (renamed from android/1.1/AGnssRil.cpp)0
-rw-r--r--gps/android/1.1/AGnssRil.h (renamed from android/1.1/AGnssRil.h)0
-rw-r--r--gps/android/1.1/Android.mk (renamed from android/1.1/Android.mk)0
-rw-r--r--gps/android/1.1/Gnss.cpp (renamed from android/1.1/Gnss.cpp)0
-rw-r--r--gps/android/1.1/Gnss.h (renamed from android/1.1/Gnss.h)0
-rw-r--r--gps/android/1.1/GnssBatching.cpp (renamed from android/1.1/GnssBatching.cpp)0
-rw-r--r--gps/android/1.1/GnssBatching.h (renamed from android/1.1/GnssBatching.h)0
-rw-r--r--gps/android/1.1/GnssConfiguration.cpp (renamed from android/1.1/GnssConfiguration.cpp)0
-rw-r--r--gps/android/1.1/GnssConfiguration.h (renamed from android/1.1/GnssConfiguration.h)0
-rw-r--r--gps/android/1.1/GnssDebug.cpp (renamed from android/1.1/GnssDebug.cpp)0
-rw-r--r--gps/android/1.1/GnssDebug.h (renamed from android/1.1/GnssDebug.h)0
-rw-r--r--gps/android/1.1/GnssGeofencing.cpp (renamed from android/1.1/GnssGeofencing.cpp)0
-rw-r--r--gps/android/1.1/GnssGeofencing.h (renamed from android/1.1/GnssGeofencing.h)0
-rw-r--r--gps/android/1.1/GnssMeasurement.cpp (renamed from android/1.1/GnssMeasurement.cpp)0
-rw-r--r--gps/android/1.1/GnssMeasurement.h (renamed from android/1.1/GnssMeasurement.h)0
-rw-r--r--gps/android/1.1/GnssNi.cpp (renamed from android/1.1/GnssNi.cpp)0
-rw-r--r--gps/android/1.1/GnssNi.h (renamed from android/1.1/GnssNi.h)0
-rw-r--r--gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc (renamed from android/1.1/android.hardware.gnss@1.1-service-qti.rc)0
-rw-r--r--gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml (renamed from android/1.1/android.hardware.gnss@1.1-service-qti.xml)0
-rw-r--r--gps/android/1.1/location_api/BatchingAPIClient.cpp (renamed from android/1.1/location_api/BatchingAPIClient.cpp)0
-rw-r--r--gps/android/1.1/location_api/BatchingAPIClient.h (renamed from android/1.1/location_api/BatchingAPIClient.h)0
-rw-r--r--gps/android/1.1/location_api/GeofenceAPIClient.cpp (renamed from android/1.1/location_api/GeofenceAPIClient.cpp)0
-rw-r--r--gps/android/1.1/location_api/GeofenceAPIClient.h (renamed from android/1.1/location_api/GeofenceAPIClient.h)0
-rw-r--r--gps/android/1.1/location_api/GnssAPIClient.cpp (renamed from android/1.1/location_api/GnssAPIClient.cpp)0
-rw-r--r--gps/android/1.1/location_api/GnssAPIClient.h (renamed from android/1.1/location_api/GnssAPIClient.h)0
-rw-r--r--gps/android/1.1/location_api/LocationUtil.cpp (renamed from android/1.1/location_api/LocationUtil.cpp)0
-rw-r--r--gps/android/1.1/location_api/LocationUtil.h (renamed from android/1.1/location_api/LocationUtil.h)0
-rw-r--r--gps/android/1.1/location_api/MeasurementAPIClient.cpp (renamed from android/1.1/location_api/MeasurementAPIClient.cpp)0
-rw-r--r--gps/android/1.1/location_api/MeasurementAPIClient.h (renamed from android/1.1/location_api/MeasurementAPIClient.h)0
-rw-r--r--gps/android/1.1/service.cpp (renamed from android/1.1/service.cpp)0
-rw-r--r--gps/android/2.0/AGnss.cpp (renamed from android/2.0/AGnss.cpp)0
-rw-r--r--gps/android/2.0/AGnss.h (renamed from android/2.0/AGnss.h)0
-rw-r--r--gps/android/2.0/AGnssRil.cpp (renamed from android/2.0/AGnssRil.cpp)0
-rw-r--r--gps/android/2.0/AGnssRil.h (renamed from android/2.0/AGnssRil.h)0
-rw-r--r--gps/android/2.0/Android.mk (renamed from android/2.0/Android.mk)0
-rw-r--r--gps/android/2.0/Gnss.cpp (renamed from android/2.0/Gnss.cpp)0
-rw-r--r--gps/android/2.0/Gnss.h (renamed from android/2.0/Gnss.h)0
-rw-r--r--gps/android/2.0/GnssBatching.cpp (renamed from android/2.0/GnssBatching.cpp)0
-rw-r--r--gps/android/2.0/GnssBatching.h (renamed from android/2.0/GnssBatching.h)0
-rw-r--r--gps/android/2.0/GnssConfiguration.cpp (renamed from android/2.0/GnssConfiguration.cpp)0
-rw-r--r--gps/android/2.0/GnssConfiguration.h (renamed from android/2.0/GnssConfiguration.h)0
-rw-r--r--gps/android/2.0/GnssDebug.cpp (renamed from android/2.0/GnssDebug.cpp)0
-rw-r--r--gps/android/2.0/GnssDebug.h (renamed from android/2.0/GnssDebug.h)0
-rw-r--r--gps/android/2.0/GnssGeofencing.cpp (renamed from android/2.0/GnssGeofencing.cpp)0
-rw-r--r--gps/android/2.0/GnssGeofencing.h (renamed from android/2.0/GnssGeofencing.h)0
-rw-r--r--gps/android/2.0/GnssMeasurement.cpp (renamed from android/2.0/GnssMeasurement.cpp)0
-rw-r--r--gps/android/2.0/GnssMeasurement.h (renamed from android/2.0/GnssMeasurement.h)0
-rw-r--r--gps/android/2.0/GnssNi.cpp (renamed from android/2.0/GnssNi.cpp)0
-rw-r--r--gps/android/2.0/GnssNi.h (renamed from android/2.0/GnssNi.h)0
-rw-r--r--gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc (renamed from android/2.0/android.hardware.gnss@2.0-service-qti.rc)0
-rw-r--r--gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml (renamed from android/2.0/android.hardware.gnss@2.0-service-qti.xml)0
-rw-r--r--gps/android/2.0/location_api/BatchingAPIClient.cpp (renamed from android/2.0/location_api/BatchingAPIClient.cpp)0
-rw-r--r--gps/android/2.0/location_api/BatchingAPIClient.h (renamed from android/2.0/location_api/BatchingAPIClient.h)0
-rw-r--r--gps/android/2.0/location_api/GeofenceAPIClient.cpp (renamed from android/2.0/location_api/GeofenceAPIClient.cpp)0
-rw-r--r--gps/android/2.0/location_api/GeofenceAPIClient.h (renamed from android/2.0/location_api/GeofenceAPIClient.h)0
-rw-r--r--gps/android/2.0/location_api/GnssAPIClient.cpp (renamed from android/2.0/location_api/GnssAPIClient.cpp)0
-rw-r--r--gps/android/2.0/location_api/GnssAPIClient.h (renamed from android/2.0/location_api/GnssAPIClient.h)0
-rw-r--r--gps/android/2.0/location_api/LocationUtil.cpp (renamed from android/2.0/location_api/LocationUtil.cpp)0
-rw-r--r--gps/android/2.0/location_api/LocationUtil.h (renamed from android/2.0/location_api/LocationUtil.h)0
-rw-r--r--gps/android/2.0/location_api/MeasurementAPIClient.cpp (renamed from android/2.0/location_api/MeasurementAPIClient.cpp)0
-rw-r--r--gps/android/2.0/location_api/MeasurementAPIClient.h (renamed from android/2.0/location_api/MeasurementAPIClient.h)0
-rw-r--r--gps/android/2.0/service.cpp (renamed from android/2.0/service.cpp)0
-rw-r--r--gps/android/Android.mk (renamed from android/Android.mk)0
-rw-r--r--gps/android/measurement_corrections/1.0/MeasurementCorrections.cpp (renamed from android/measurement_corrections/1.0/MeasurementCorrections.cpp)0
-rw-r--r--gps/android/measurement_corrections/1.0/MeasurementCorrections.h (renamed from android/measurement_corrections/1.0/MeasurementCorrections.h)0
-rw-r--r--gps/android/utils/Android.mk (renamed from android/utils/Android.mk)0
-rw-r--r--gps/android/utils/battery_listener.cpp (renamed from android/utils/battery_listener.cpp)0
-rw-r--r--gps/android/utils/battery_listener.h (renamed from android/utils/battery_listener.h)0
-rw-r--r--gps/android/visibility_control/1.0/GnssVisibilityControl.cpp (renamed from android/visibility_control/1.0/GnssVisibilityControl.cpp)0
-rw-r--r--gps/android/visibility_control/1.0/GnssVisibilityControl.h (renamed from android/visibility_control/1.0/GnssVisibilityControl.h)0
-rw-r--r--gps/batching/Android.mk (renamed from batching/Android.mk)0
-rw-r--r--gps/batching/BatchingAdapter.cpp (renamed from batching/BatchingAdapter.cpp)0
-rw-r--r--gps/batching/BatchingAdapter.h (renamed from batching/BatchingAdapter.h)0
-rw-r--r--gps/batching/Makefile.am (renamed from batching/Makefile.am)0
-rw-r--r--gps/batching/configure.ac (renamed from batching/configure.ac)0
-rw-r--r--gps/batching/location-batching.pc.in (renamed from batching/location-batching.pc.in)0
-rw-r--r--gps/batching/location_batching.cpp (renamed from batching/location_batching.cpp)0
-rw-r--r--gps/build/target_specific_features.mk (renamed from build/target_specific_features.mk)0
-rw-r--r--gps/configure.ac (renamed from configure.ac)0
-rw-r--r--gps/core/Android.mk (renamed from core/Android.mk)0
-rw-r--r--gps/core/ContextBase.cpp (renamed from core/ContextBase.cpp)0
-rw-r--r--gps/core/ContextBase.h (renamed from core/ContextBase.h)0
-rw-r--r--gps/core/EngineHubProxyBase.h (renamed from core/EngineHubProxyBase.h)0
-rw-r--r--gps/core/LBSProxyBase.h (renamed from core/LBSProxyBase.h)0
-rw-r--r--gps/core/LocAdapterBase.cpp (renamed from core/LocAdapterBase.cpp)0
-rw-r--r--gps/core/LocAdapterBase.h (renamed from core/LocAdapterBase.h)0
-rw-r--r--gps/core/LocAdapterProxyBase.h (renamed from core/LocAdapterProxyBase.h)0
-rw-r--r--gps/core/LocApiBase.cpp (renamed from core/LocApiBase.cpp)0
-rw-r--r--gps/core/LocApiBase.h (renamed from core/LocApiBase.h)0
-rw-r--r--gps/core/LocContext.cpp (renamed from core/LocContext.cpp)0
-rw-r--r--gps/core/LocContext.h (renamed from core/LocContext.h)0
-rw-r--r--gps/core/Makefile.am (renamed from core/Makefile.am)0
-rw-r--r--gps/core/SystemStatus.cpp (renamed from core/SystemStatus.cpp)0
-rw-r--r--gps/core/SystemStatus.h (renamed from core/SystemStatus.h)0
-rw-r--r--gps/core/SystemStatusOsObserver.cpp (renamed from core/SystemStatusOsObserver.cpp)0
-rw-r--r--gps/core/SystemStatusOsObserver.h (renamed from core/SystemStatusOsObserver.h)0
-rw-r--r--gps/core/configure.ac (renamed from core/configure.ac)0
-rw-r--r--gps/core/data-items/DataItemConcreteTypesBase.h (renamed from core/data-items/DataItemConcreteTypesBase.h)0
-rw-r--r--gps/core/data-items/DataItemId.h (renamed from core/data-items/DataItemId.h)0
-rw-r--r--gps/core/data-items/DataItemsFactoryProxy.cpp (renamed from core/data-items/DataItemsFactoryProxy.cpp)0
-rw-r--r--gps/core/data-items/DataItemsFactoryProxy.h (renamed from core/data-items/DataItemsFactoryProxy.h)0
-rw-r--r--gps/core/data-items/IDataItemCore.h (renamed from core/data-items/IDataItemCore.h)0
-rw-r--r--gps/core/loc-core.pc.in (renamed from core/loc-core.pc.in)0
-rw-r--r--gps/core/loc_core_log.cpp (renamed from core/loc_core_log.cpp)0
-rw-r--r--gps/core/loc_core_log.h (renamed from core/loc_core_log.h)0
-rw-r--r--gps/core/observer/IDataItemObserver.h (renamed from core/observer/IDataItemObserver.h)0
-rw-r--r--gps/core/observer/IDataItemSubscription.h (renamed from core/observer/IDataItemSubscription.h)0
-rw-r--r--gps/core/observer/IFrameworkActionReq.h (renamed from core/observer/IFrameworkActionReq.h)0
-rw-r--r--gps/core/observer/IOsObserver.h (renamed from core/observer/IOsObserver.h)0
-rw-r--r--gps/etc/Android.mk (renamed from etc/Android.mk)0
-rw-r--r--gps/etc/flp.conf (renamed from etc/flp.conf)0
-rw-r--r--gps/etc/gps.conf (renamed from etc/gps.conf)0
-rw-r--r--gps/geofence/Android.mk (renamed from geofence/Android.mk)0
-rw-r--r--gps/geofence/GeofenceAdapter.cpp (renamed from geofence/GeofenceAdapter.cpp)0
-rw-r--r--gps/geofence/GeofenceAdapter.h (renamed from geofence/GeofenceAdapter.h)0
-rw-r--r--gps/geofence/Makefile.am (renamed from geofence/Makefile.am)0
-rw-r--r--gps/geofence/configure.ac (renamed from geofence/configure.ac)0
-rw-r--r--gps/geofence/location-geofence.pc.in (renamed from geofence/location-geofence.pc.in)0
-rw-r--r--gps/geofence/location_geofence.cpp (renamed from geofence/location_geofence.cpp)0
-rw-r--r--gps/gnss/Agps.cpp (renamed from gnss/Agps.cpp)0
-rw-r--r--gps/gnss/Agps.h (renamed from gnss/Agps.h)0
-rw-r--r--gps/gnss/Android.mk (renamed from gnss/Android.mk)0
-rw-r--r--gps/gnss/GnssAdapter.cpp (renamed from gnss/GnssAdapter.cpp)0
-rw-r--r--gps/gnss/GnssAdapter.h (renamed from gnss/GnssAdapter.h)0
-rw-r--r--gps/gnss/Makefile.am (renamed from gnss/Makefile.am)0
-rw-r--r--gps/gnss/XtraSystemStatusObserver.cpp (renamed from gnss/XtraSystemStatusObserver.cpp)0
-rw-r--r--gps/gnss/XtraSystemStatusObserver.h (renamed from gnss/XtraSystemStatusObserver.h)0
-rw-r--r--gps/gnss/location_gnss.cpp (renamed from gnss/location_gnss.cpp)0
-rw-r--r--gps/gps_vendor_board.mk (renamed from gps_vendor_board.mk)0
-rw-r--r--gps/gps_vendor_product.mk (renamed from gps_vendor_product.mk)0
-rw-r--r--gps/loc-hal.pc.in (renamed from loc-hal.pc.in)0
-rw-r--r--gps/location/Android.mk (renamed from location/Android.mk)0
-rw-r--r--gps/location/ILocationAPI.h (renamed from location/ILocationAPI.h)0
-rw-r--r--gps/location/LocationAPI.cpp (renamed from location/LocationAPI.cpp)0
-rw-r--r--gps/location/LocationAPI.h (renamed from location/LocationAPI.h)0
-rw-r--r--gps/location/LocationAPIClientBase.cpp (renamed from location/LocationAPIClientBase.cpp)0
-rw-r--r--gps/location/LocationAPIClientBase.h (renamed from location/LocationAPIClientBase.h)0
-rw-r--r--gps/location/LocationDataTypes.h (renamed from location/LocationDataTypes.h)0
-rw-r--r--gps/location/Makefile.am (renamed from location/Makefile.am)0
-rw-r--r--gps/location/configure.ac (renamed from location/configure.ac)0
-rw-r--r--gps/location/location-api.pc.in (renamed from location/location-api.pc.in)0
-rw-r--r--gps/location/location_interface.h (renamed from location/location_interface.h)0
-rw-r--r--gps/pla/Android.mk (renamed from pla/Android.mk)0
-rw-r--r--gps/pla/android/loc_pla.h (renamed from pla/android/loc_pla.h)0
-rw-r--r--gps/pla/oe/loc_pla.h (renamed from pla/oe/loc_pla.h)0
-rw-r--r--gps/utils/Android.mk (renamed from utils/Android.mk)0
-rw-r--r--gps/utils/LocHeap.cpp (renamed from utils/LocHeap.cpp)0
-rw-r--r--gps/utils/LocHeap.h (renamed from utils/LocHeap.h)0
-rw-r--r--gps/utils/LocIpc.cpp (renamed from utils/LocIpc.cpp)0
-rw-r--r--gps/utils/LocIpc.h (renamed from utils/LocIpc.h)0
-rw-r--r--gps/utils/LocSharedLock.h (renamed from utils/LocSharedLock.h)0
-rw-r--r--gps/utils/LocThread.cpp (renamed from utils/LocThread.cpp)0
-rw-r--r--gps/utils/LocThread.h (renamed from utils/LocThread.h)0
-rw-r--r--gps/utils/LocTimer.cpp (renamed from utils/LocTimer.cpp)0
-rw-r--r--gps/utils/LocTimer.h (renamed from utils/LocTimer.h)0
-rw-r--r--gps/utils/LocUnorderedSetMap.h (renamed from utils/LocUnorderedSetMap.h)0
-rw-r--r--gps/utils/Makefile.am (renamed from utils/Makefile.am)0
-rw-r--r--gps/utils/MsgTask.cpp (renamed from utils/MsgTask.cpp)0
-rw-r--r--gps/utils/MsgTask.h (renamed from utils/MsgTask.h)0
-rw-r--r--gps/utils/configure.ac (renamed from utils/configure.ac)0
-rw-r--r--gps/utils/gps-utils.pc.in (renamed from utils/gps-utils.pc.in)0
-rw-r--r--gps/utils/gps_extended.h (renamed from utils/gps_extended.h)0
-rw-r--r--gps/utils/gps_extended_c.h (renamed from utils/gps_extended_c.h)0
-rw-r--r--gps/utils/linked_list.c (renamed from utils/linked_list.c)0
-rw-r--r--gps/utils/linked_list.h (renamed from utils/linked_list.h)0
-rw-r--r--gps/utils/loc_cfg.cpp (renamed from utils/loc_cfg.cpp)0
-rw-r--r--gps/utils/loc_cfg.h (renamed from utils/loc_cfg.h)0
-rw-r--r--gps/utils/loc_gps.h (renamed from utils/loc_gps.h)0
-rw-r--r--gps/utils/loc_log.cpp (renamed from utils/loc_log.cpp)0
-rw-r--r--gps/utils/loc_log.h (renamed from utils/loc_log.h)0
-rw-r--r--gps/utils/loc_misc_utils.cpp (renamed from utils/loc_misc_utils.cpp)0
-rw-r--r--gps/utils/loc_misc_utils.h (renamed from utils/loc_misc_utils.h)0
-rw-r--r--gps/utils/loc_nmea.cpp (renamed from utils/loc_nmea.cpp)0
-rw-r--r--gps/utils/loc_nmea.h (renamed from utils/loc_nmea.h)0
-rw-r--r--gps/utils/loc_target.cpp (renamed from utils/loc_target.cpp)0
-rw-r--r--gps/utils/loc_target.h (renamed from utils/loc_target.h)0
-rw-r--r--gps/utils/loc_timer.h (renamed from utils/loc_timer.h)0
-rw-r--r--gps/utils/log_util.h (renamed from utils/log_util.h)0
-rw-r--r--gps/utils/msg_q.c (renamed from utils/msg_q.c)0
-rw-r--r--gps/utils/msg_q.h (renamed from utils/msg_q.h)0
-rw-r--r--idc/uinput-fpc.idc15
-rw-r--r--idc/uinput-goodix.idc15
-rw-r--r--init/Android.mk37
-rw-r--r--init/init_sdm660.cpp95
-rw-r--r--init/init_sdm660.h36
-rw-r--r--keylayout/sdm660-snd-card_Button_Jack.kl5
-rw-r--r--keylayout/uinput-fpc.kl15
-rw-r--r--keylayout/uinput-goodix.kl14
-rw-r--r--libhidl/Android.mk21
-rw-r--r--light/Android.bp32
-rw-r--r--light/Light.cpp209
-rw-r--r--light/Light.h56
-rw-r--r--light/android.hardware.light@2.0-service.xiaomi_sdm660.rc21
-rw-r--r--light/service.cpp50
-rw-r--r--lineage.dependencies10
-rw-r--r--manifest.xml730
-rw-r--r--org.ifaa.android.manager/Android.mk29
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManager.java61
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerFactory.java9
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerImpl.java338
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV2.java7
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV3.java12
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV4.java7
-rw-r--r--org.ifaa.android.manager/src/org/ifaa/android/manager/IIFAAService.aidl12
-rw-r--r--overlay-lineage/frameworks/base/core/res/res/values/config.xml22
-rw-r--r--overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml58
-rw-r--r--overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml20
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml487
-rw-r--r--overlay/frameworks/base/core/res/res/xml/power_profile.xml58
-rw-r--r--overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml24
-rw-r--r--overlay/packages/apps/Settings/res/values/arrays.xml30
-rw-r--r--overlay/packages/apps/Snap/res/values/config.xml25
-rw-r--r--overlay/packages/services/Telecomm/res/values/config.xml24
-rw-r--r--overlay/packages/services/Telephony/res/values/config.xml30
-rw-r--r--properties.mk156
-rw-r--r--proprietary-files.txt775
-rw-r--r--rootdir/Android.mk105
-rwxr-xr-xrootdir/bin/init.class_main.sh174
-rwxr-xr-xrootdir/bin/init.goodix.sh32
-rwxr-xr-xrootdir/bin/init.qcom.post_boot.sh4229
-rwxr-xr-xrootdir/bin/init.qcom.sensors.sh44
-rwxr-xr-xrootdir/bin/init.qcom.sh418
-rwxr-xr-xrootdir/bin/init.qcom.usb.sh283
-rw-r--r--rootdir/etc/fstab.qcom26
-rw-r--r--rootdir/etc/fstab_AB.qcom18
-rwxr-xr-xrootdir/etc/init.msm.usb.configfs.rc1226
-rwxr-xr-xrootdir/etc/init.qcom.rc1314
-rwxr-xr-xrootdir/etc/init.qcom.usb.rc1667
-rwxr-xr-xrootdir/etc/init.target.rc465
-rw-r--r--rootdir/etc/ueventd.qcom.rc352
-rw-r--r--sdm660.mk437
-rw-r--r--seccomp/mediacodec-seccomp.policy12
-rw-r--r--seccomp/mediaextractor-seccomp.policy5
-rw-r--r--sensors/hals.conf1
-rw-r--r--sensors/sensor_def_qcomdev.conf555
-rw-r--r--sepolicy/vendor/app.te6
-rw-r--r--sepolicy/vendor/atfwd.te1
-rw-r--r--sepolicy/vendor/device.te2
-rw-r--r--sepolicy/vendor/file.te8
-rw-r--r--sepolicy/vendor/file_contexts45
-rw-r--r--sepolicy/vendor/genfs_contexts2
-rw-r--r--sepolicy/vendor/hal_audio_default.te2
-rw-r--r--sepolicy/vendor/hal_camera_default.te6
-rw-r--r--sepolicy/vendor/hal_cas_default.te1
-rw-r--r--sepolicy/vendor/hal_fingerprint_sdm660.te39
-rw-r--r--sepolicy/vendor/hal_gnss_qti.te1
-rw-r--r--sepolicy/vendor/hal_graphics_composer_default.te2
-rw-r--r--sepolicy/vendor/hal_ir_default.te1
-rw-r--r--sepolicy/vendor/hal_light_default.te1
-rw-r--r--sepolicy/vendor/hal_mlipay_default.te16
-rw-r--r--sepolicy/vendor/hal_power_default.te2
-rw-r--r--sepolicy/vendor/hal_sensors_default.te1
-rw-r--r--sepolicy/vendor/hvdcp.te1
-rw-r--r--sepolicy/vendor/hwservice.te2
-rw-r--r--sepolicy/vendor/hwservice_contexts2
-rw-r--r--sepolicy/vendor/hwservicemanager.te4
-rw-r--r--sepolicy/vendor/init.te6
-rw-r--r--sepolicy/vendor/init_fingerprint.te14
-rw-r--r--sepolicy/vendor/kernel.te1
-rw-r--r--sepolicy/vendor/location.te1
-rw-r--r--sepolicy/vendor/netmgrd.te1
-rw-r--r--sepolicy/vendor/priv_app.te1
-rw-r--r--sepolicy/vendor/property.te3
-rw-r--r--sepolicy/vendor/property_contexts12
-rw-r--r--sepolicy/vendor/qti_init_shell.te4
-rw-r--r--sepolicy/vendor/rild.te1
-rw-r--r--sepolicy/vendor/system_app.te3
-rw-r--r--sepolicy/vendor/system_server.te4
-rw-r--r--sepolicy/vendor/tee.te6
-rw-r--r--sepolicy/vendor/thermal-engine.te6
-rw-r--r--sepolicy/vendor/vendor_init.te13
-rw-r--r--sepolicy/vendor/vndservice.te1
-rw-r--r--sepolicy/vendor/vndservice_contexts1
-rw-r--r--sepolicy/vendor/vndservicemanager.te3
-rwxr-xr-xsetup-makefiles.sh62
-rwxr-xr-xupdate-sha1sums.py79
-rw-r--r--vendor_framework_compatibility_matrix.xml519
-rw-r--r--vndk/Android.mk49
-rw-r--r--vndk/vndk-sp-libs.mk33
-rw-r--r--wifi/WCNSS_qcom_cfg.ini462
-rw-r--r--wifi/p2p_supplicant_overlay.conf4
-rw-r--r--wifi/wpa_supplicant_overlay.conf3
376 files changed, 25816 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index f1088a4..ce43203 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,5 +1,114 @@
-ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
+#
+# Copyright (C) 2018 The LineageOS 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 $(LOCAL_PATH)/build/target_specific_features.mk
+
+ifneq ($(filter jasmine_sprout tulip wayne,$(TARGET_DEVICE)),)
+
+$(shell mkdir -p $(TARGET_OUT_VENDOR)/firmware; \
+ ln -sf /dev/block/bootdevice/by-name/msadp \
+ $(TARGET_OUT_VENDOR)/firmware/msadp)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := wifi_symlinks
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := FAKE
+LOCAL_MODULE_SUFFIX := -timestamp
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): ACTUAL_INI_FILE := /vendor/etc/wifi/WCNSS_qcom_cfg.ini
+$(LOCAL_BUILT_MODULE): WCNSS_INI_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini
+
+$(LOCAL_BUILT_MODULE): ACTUAL_BIN_FILE := /persist/wlan_mac.bin
+$(LOCAL_BUILT_MODULE): WCNSS_BIN_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/wlan_mac.bin
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/Android.mk
+$(LOCAL_BUILT_MODULE):
+ $(hide) echo "Making symlinks for wifi"
+ $(hide) mkdir -p $(dir $@)
+ $(hide) mkdir -p $(dir $(WCNSS_INI_SYMLINK))
+ $(hide) rm -rf $@
+ $(hide) rm -rf $(WCNSS_INI_SYMLINK)
+ $(hide) ln -sf $(ACTUAL_INI_FILE) $(WCNSS_INI_SYMLINK)
+ $(hide) rm -rf $(WCNSS_BIN_SYMLINK)
+ $(hide) ln -sf $(ACTUAL_BIN_FILE) $(WCNSS_BIN_SYMLINK)
+ $(hide) touch $@
+
+# A/B builds require us to create the mount points at compile time.
+# Just creating it for all cases since it does not hurt.
+FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
+BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware
+DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp
+
+$(FIRMWARE_MOUNT_POINT):
+ @echo "Creating $(FIRMWARE_MOUNT_POINT)"
+ @mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
+
+$(BT_FIRMWARE_MOUNT_POINT):
+ @echo "Creating $(BT_FIRMWARE_MOUNT_POINT)"
+ @mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware
+
+$(DSP_MOUNT_POINT):
+ @echo "Creating $(DSP_MOUNT_POINT)"
+ @mkdir -p $(TARGET_OUT_VENDOR)/dsp
+
+ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT)
+
+RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/
+$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
+ @echo "Creating RFS MSM ADSP folder structure: $@"
+ @rm -rf $@/*
+ @mkdir -p $(dir $@)/readonly/vendor
+ $(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps
+ $(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite
+ $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
+ $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
+ $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
+ $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
+
+RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/
+$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
+ @echo "Creating RFS MSM MPSS folder structure: $@"
+ @rm -rf $@/*
+ @mkdir -p $(dir $@)/readonly/vendor
+ $(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps
+ $(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite
+ $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
+ $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
+ $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
+ $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
+
+RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/
+$(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
+ @echo "Creating RFS MSM SLPI folder structure: $@"
+ @rm -rf $@/*
+ @mkdir -p $(dir $@)/readonly/vendor
+ $(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps
+ $(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite
+ $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
+ $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
+ $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
+ $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
+
+ALL_DEFAULT_INSTALLED_MODULES += \
+ $(RFS_MSM_ADSP_SYMLINKS) \
+ $(RFS_MSM_MPSS_SYMLINKS) \
+ $(RFS_MSM_SLPI_SYMLINKS)
+
include $(call all-makefiles-under,$(LOCAL_PATH))
endif
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
new file mode 100644
index 0000000..30304ac
--- /dev/null
+++ b/BoardConfigCommon.mk
@@ -0,0 +1,284 @@
+#
+# Copyright (C) 2018 The LineageOS 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.
+#
+
+#
+# This file sets variables that control the way modules are built
+# thorughout the system. It should not be used to conditionally
+# disable makefiles (the proper mechanism to control what gets
+# included in a build is to use PRODUCT_PACKAGES in a product
+# definition file).
+#
+
+COMMON_PATH := device/xiaomi/sdm660-common
+
+BOARD_VENDOR := xiaomi
+
+# Use Snapdragon LLVM, if available
+TARGET_USE_SDCLANG := true
+
+# Bootloader
+TARGET_BOOTLOADER_BOARD_NAME := sdm660
+TARGET_NO_BOOTLOADER := true
+
+# Platform
+TARGET_BOARD_PLATFORM := sdm660
+TARGET_BOARD_PLATFORM_GPU := qcom-adreno512
+
+# Architecture
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := kryo
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-a
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := kryo
+
+TARGET_USES_64_BIT_BINDER := true
+
+# Kernel
+BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 earlycon=msm_serial_dm,0xc170000 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=1 androidboot.configfs=true androidboot.usbcontroller=a800000.dwc3
+BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware_mnt/image
+BOARD_KERNEL_CMDLINE += loop.max_part=7
+BOARD_KERNEL_BASE := 0x00000000
+BOARD_KERNEL_PAGESIZE := 4096
+BOARD_KERNEL_TAGS_OFFSET := 0x00000100
+BOARD_RAMDISK_OFFSET := 0x01000000
+BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
+TARGET_KERNEL_ARCH := arm64
+TARGET_KERNEL_HEADER_ARCH := arm64
+TARGET_KERNEL_SOURCE := kernel/xiaomi/sdm660
+TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
+
+# QCOM hardware
+BOARD_USES_QCOM_HARDWARE := true
+
+# ANT+
+BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
+
+# Audio
+BOARD_USES_ALSA_AUDIO := true
+USE_CUSTOM_AUDIO_POLICY := 1
+USE_XML_AUDIO_POLICY_CONF := 1
+BOARD_SUPPORTS_SOUND_TRIGGER := true
+AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
+AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
+AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := false
+AUDIO_FEATURE_ENABLED_EXT_HDMI := true
+AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
+AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
+AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := false
+AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
+AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
+AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
+AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
+AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
+AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO := true
+AUDIO_FEATURE_ENABLED_SPLIT_A2DP := true
+AUDIO_FEATURE_ENABLED_3D_AUDIO := false
+AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
+AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
+AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
+AUDIO_FEATURE_ENABLED_FLUENCE := true
+AUDIO_FEATURE_ENABLED_HDMI_EDID := true
+AUDIO_FEATURE_ENABLED_HFP := true
+AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
+AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
+AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
+AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
+AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
+AUDIO_FEATURE_ENABLED_DEV_ARBI := false
+AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
+AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
+AUDIO_FEATURE_ENABLED_RAS := true
+AUDIO_FEATURE_ENABLED_SND_MONITOR := true
+AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := false
+TARGET_USES_QCOM_MM_AUDIO := true
+AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
+
+# Bluetooth
+BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_QCOM := true
+BOARD_HAS_QCA_BT_SOC := "cherokee"
+BLUETOOTH_HCI_USE_MCT := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth
+QCOM_BT_USE_BTNV := true
+QCOM_BT_USE_SMD_TTY := true
+
+# Camera
+USE_DEVICE_SPECIFIC_CAMERA := true
+TARGET_USES_QTI_CAMERA_DEVICE := true
+TARGET_USES_QTI_CAMERA2CLIENT := true
+BOARD_QTI_CAMERA_32BIT_ONLY := true
+TARGET_USES_MEDIA_EXTENSIONS := true
+
+# Charger
+BOARD_CHARGER_ENABLE_SUSPEND := true
+BOARD_CHARGER_DISABLE_INIT_BLANK := true
+
+# CNE and DPM
+BOARD_USES_QCNE := true
+
+# Crypto
+TARGET_HW_DISK_ENCRYPTION := true
+
+# Display
+TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
+TARGET_USES_HWC2 := true
+TARGET_USES_GRALLOC1 := true
+TARGET_USES_ION := true
+TARGET_USES_NEW_ION_API :=true
+TARGET_USES_OVERLAY := true
+USE_OPENGL_RENDERER := true
+
+MAX_EGL_CACHE_KEY_SIZE := 12*1024
+MAX_EGL_CACHE_SIZE := 2048*1024
+
+MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
+
+OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
+
+VSYNC_EVENT_PHASE_OFFSET_NS := 2000000
+SF_VSYNC_EVENT_PHASE_OFFSET_NS := 6000000
+
+# DRM
+TARGET_ENABLE_MEDIADRM_64 := true
+
+# DT2W
+TARGET_TAP_TO_WAKE_NODE := "/proc/nvt_wake_gesture"
+
+# Enable dexpreopt to speed boot time
+ifeq ($(HOST_OS),linux)
+ ifneq ($(TARGET_BUILD_VARIANT),eng)
+ ifeq ($(WITH_DEXPREOPT),)
+ WITH_DEXPREOPT := true
+ WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := true
+ endif
+ endif
+endif
+
+# FM
+AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
+BOARD_HAS_QCA_FM_SOC := cherokee
+BOARD_HAVE_QCOM_FM := true
+
+# GPS
+TARGET_NO_RPC := true
+USE_DEVICE_SPECIFIC_GPS := true
+BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := $(TARGET_BOARD_PLATFORM)
+
+# HIDL
+DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(COMMON_PATH)/vendor_framework_compatibility_matrix.xml
+DEVICE_FRAMEWORK_MANIFEST_FILE := $(COMMON_PATH)/framework_manifest.xml
+DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml
+DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
+
+# Init
+TARGET_INIT_VENDOR_LIB := libinit_sdm660
+TARGET_PLATFORM_DEVICE_BASE := /devices/soc/
+TARGET_RECOVERY_DEVICE_MODULES := libinit_sdm660
+
+# Keystore
+TARGET_PROVIDES_KEYMASTER := true
+
+# Partitions
+BOARD_FLASH_BLOCK_SIZE := 262144
+BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
+ifneq ($(AB_OTA_UPDATER), true)
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
+endif
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
+BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
+BOARD_VENDORIMAGE_PARTITION_SIZE := 2147483648
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
+
+TARGET_EXFAT_DRIVER := exfat
+
+BOARD_ROOT_EXTRA_SYMLINKS := \
+ /vendor/dsp:/dsp \
+ /vendor/firmware_mnt:/firmware \
+ /vendor/bt_firmware:/bt_firmware
+
+TARGET_COPY_OUT_VENDOR := vendor
+TARGET_USERIMAGES_USE_EXT4 := true
+
+TARGET_USES_MKE2FS := true
+
+TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
+
+# Peripheral manager
+TARGET_PER_MGR_ENABLED := true
+
+# Power
+TARGET_USES_INTERACTION_BOOST := true
+
+# Properties
+BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
+
+# Recovery
+ifeq ($(AB_OTA_UPDATER), true)
+TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab_AB.qcom
+else
+TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom
+endif
+BOARD_HAS_LARGE_FILESYSTEM := true
+
+# RIL
+TARGET_PROVIDES_QTI_TELEPHONY_JAR := true
+TARGET_RIL_VARIANT := caf
+PROTOBUF_SUPPORTED := true
+
+# SELinux
+include device/qcom/sepolicy/sepolicy.mk
+BOARD_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
+BOARD_PLAT_PUBLIC_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/public
+BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private
+
+# Treble
+PRODUCT_FULL_TREBLE_OVERRIDE := true
+PRODUCT_VENDOR_MOVE_ENABLED := true
+
+# Timeservice
+BOARD_USES_QC_TIME_SERVICES := true
+
+# Wifi
+BOARD_HAS_QCOM_WLAN := true
+BOARD_HAS_QCOM_WLAN_SDK := true
+BOARD_WLAN_DEVICE := qcwcn
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
+WIFI_DRIVER_FW_PATH_AP := "ap"
+WIFI_DRIVER_FW_PATH_STA := "sta"
+WIFI_DRIVER_FW_PATH_P2P := "p2p"
+WIFI_DRIVER_OPERSTATE_PATH := "/sys/class/net/wlan0/operstate"
+WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+
+# Inherit the proprietary files
+-include vendor/xiaomi/sdm660-common/BoardConfigVendor.mk
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ed63ec1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,20 @@
+This repository contains common device configuration for Xiaomi sdm660-based devices
+
+## Copyright
+
+```
+#
+# Copyright (C) 2018 The LineageOS 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.
+#
diff --git a/audio/audio_effects.xml b/audio/audio_effects.xml
new file mode 100644
index 0000000..434f090
--- /dev/null
+++ b/audio/audio_effects.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0">
+ <libraries>
+ <library name="bundle" path="libbundlewrapper.so"/>
+ <library name="reverb" path="libreverbwrapper.so"/>
+ <library name="qcbassboost" path="libqcbassboost.so"/>
+ <library name="qcvirt" path="libqcvirt.so"/>
+ <library name="qcreverb" path="libqcreverb.so"/>
+ <library name="visualizer_sw" path="libvisualizer.so"/>
+ <library name="visualizer_hw" path="libqcomvisualizer.so"/>
+ <library name="downmix" path="libdownmix.so"/>
+ <library name="loudness_enhancer" path="libldnhncr.so"/>
+ <library name="proxy" path="libeffectproxy.so"/>
+ <library name="offload_bundle" path="libqcompostprocbundle.so"/>
+ <library name="audio_pre_processing" path="libqcomvoiceprocessing.so"/>
+ <library name="volume_listener" path="libvolumelistener.so"/>
+ <library name="audiosphere" path="libasphere.so"/>
+ <library name="dynamics_processing" path="libdynproc.so"/>
+ </libraries>
+ <effects>
+ <effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
+ <libsw library="qcbassboost" uuid="23aca180-44bd-11e2-bcfd-0800200c9a66"/>
+ <libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/>
+ </effectProxy>
+ <effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b">
+ <libsw library="qcvirt" uuid="e6c98a16-22a3-11e2-b87b-f23c91aec05e"/>
+ <libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/>
+ </effectProxy>
+ <effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
+ <libsw library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
+ <libhw library="offload_bundle" uuid="a0dac280-401c-11e3-9379-0002a5d5c51b"/>
+ </effectProxy>
+ <effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
+ <effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b">
+ <libsw library="qcreverb" uuid="a8c1e5f3-293d-43cd-95ec-d5e26c02e217"/>
+ <libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/>
+ </effectProxy>
+ <effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b">
+ <libsw library="qcreverb" uuid="791fff8b-8129-4655-83a4-59bc61034c3a"/>
+ <libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/>
+ </effectProxy>
+ <effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b">
+ <libsw library="qcreverb" uuid="53ef1db5-c0c0-445b-b060-e34d20ebb70a"/>
+ <libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/>
+ </effectProxy>
+ <effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b">
+ <libsw library="qcreverb" uuid="b08a0e38-22a5-11e2-b87b-f23c91aec05e"/>
+ <libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/>
+ </effectProxy>
+ <effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c">
+ <libsw library="visualizer_sw" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/>
+ <libhw library="visualizer_hw" uuid="7a8044a0-1a71-11e3-a184-0002a5d5c51b"/>
+ </effectProxy>
+ <effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/>
+ <effect name="hw_acc" library="offload_bundle" uuid="7d1580bd-297f-4683-9239-e475b6d1d69f"/>
+ <effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
+ <effect name="aec" library="audio_pre_processing" uuid="0f8d0d2a-59e5-45fe-b6e4-248c8a799109"/>
+ <effect name="ns" library="audio_pre_processing" uuid="1d97bb0b-9e2f-4403-9ae3-58c2554306f8"/>
+ <effect name="music_helper" library="volume_listener" uuid="08b8b058-0590-11e5-ac71-0025b32654a0"/>
+ <effect name="ring_helper" library="volume_listener" uuid="0956df94-0590-11e5-bdbe-0025b32654a0"/>
+ <effect name="alarm_helper" library="volume_listener" uuid="09f303e2-0590-11e5-8fdb-0025b32654a0"/>
+ <effect name="voice_helper" library="volume_listener" uuid="0ace5c08-0590-11e5-ae9e-0025b32654a0"/>
+ <effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
+ <effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
+ <effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/>
+ </effects>
+ <postprocess>
+ <stream type="music">
+ <apply effect="music_helper"/>
+ </stream>
+ <stream type="ring">
+ <apply effect="ring_helper"/>
+ </stream>
+ <stream type="alarm">
+ <apply effect="alarm_helper"/>
+ </stream>
+ <stream type="voice_call">
+ <apply effect="voice_helper"/>
+ </stream>
+ <stream type="notification">
+ <apply effect="notification_helper"/>
+ </stream>
+ </postprocess>
+ <preprocess>
+ <stream type="voice_communication">
+ <apply effect="aec"/>
+ <apply effect="ns"/>
+ </stream>
+ </preprocess>
+</audio_effects_conf>
diff --git a/audio/audio_output_policy.conf b/audio/audio_output_policy.conf
new file mode 100644
index 0000000..a74791b
--- /dev/null
+++ b/audio/audio_output_policy.conf
@@ -0,0 +1,70 @@
+# List of profiles for the output device session where stream is routed.
+# A stream opened with the inputs attributes which match the "flags" and
+# "formats" as specified in the profile is routed to a device at
+# sample rate specified under "sampling_rates" and bit width under
+# "bit_width" and the topology extracted from the acdb data against
+# the "app_type".
+#
+# the flags and formats are specified using the strings corresponding to
+# enums in audio.h and audio_policy.h. They are concatenated with "|"
+# without space or "\n".
+# the flags and formats should match the ones in "audio_policy.conf"
+
+outputs {
+ default {
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69937
+ }
+ deep_buffer {
+ flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69936
+ }
+ direct_pcm_16 {
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 16
+ app_type 69936
+ }
+ direct_pcm_24 {
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
+ sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000
+ bit_width 24
+ app_type 69940
+ }
+ direct_pcm_32 {
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ formats AUDIO_FORMAT_PCM_32_BIT
+ sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000
+ bit_width 32
+ app_type 69942
+ }
+ compress_passthrough {
+ flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH
+ formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_E_AC3_JOC|AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD
+ sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800
+ bit_width 16
+ app_type 69941
+ }
+ compress_offload_16 {
+ flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
+ formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 16
+ app_type 69936
+ }
+ compress_offload_24 {
+ flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
+ formats AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 24
+ app_type 69940
+ }
+}
diff --git a/audio/audio_platform_info.xml b/audio/audio_platform_info.xml
new file mode 100644
index 0000000..2dec1a7
--- /dev/null
+++ b/audio/audio_platform_info.xml
@@ -0,0 +1,429 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Copyright (c) 2014, 2016-2018, The Linux Foundation. All rights reserved. -->
+<!-- -->
+<!-- Redistribution and use in source and binary forms, with or without -->
+<!-- modification, are permitted provided that the following conditions are -->
+<!-- met: -->
+<!-- * Redistributions of source code must retain the above copyright -->
+<!-- notice, this list of conditions and the following disclaimer. -->
+<!-- * Redistributions in binary form must reproduce the above -->
+<!-- copyright notice, this list of conditions and the following -->
+<!-- disclaimer in the documentation and/or other materials provided -->
+<!-- with the distribution. -->
+<!-- * Neither the name of The Linux Foundation nor the names of its -->
+<!-- contributors may be used to endorse or promote products derived -->
+<!-- from this software without specific prior written permission. -->
+<!-- -->
+<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
+<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
+<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
+<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
+<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
+<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
+<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
+<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
+<audio_platform_info>
+ <bit_width_configs>
+ <device name="SND_DEVICE_OUT_SPEAKER" bit_width="24"/>
+ </bit_width_configs>
+ <interface_names>
+ <device name="AUDIO_DEVICE_IN_BUILTIN_MIC" interface="SLIMBUS_0" codec_type="external"/>
+ <device name="AUDIO_DEVICE_IN_BACK_MIC" interface="SLIMBUS_0" codec_type="external"/>
+ <device name="AUDIO_DEVICE_IN_BUILTIN_MIC" interface="INT3_MI2S" codec_type="internal"/>
+ <device name="AUDIO_DEVICE_IN_BACK_MIC" interface="INT3_MI2S" codec_type="internal"/>
+ </interface_names>
+ <pcm_ids>
+ <usecase name="USECASE_AUDIO_PLAYBACK_LOW_LATENCY" type="out" id="13"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD" type="out" id="8"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD2" type="out" id="15"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD3" type="out" id="16"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD4" type="out" id="28"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD5" type="out" id="29"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD6" type="out" id="30"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD7" type="out" id="31"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD8" type="out" id="32"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_OFFLOAD9" type="out" id="33"/>
+ <usecase name="USECASE_VOICEMMODE1_CALL" type="in" id="2"/>
+ <usecase name="USECASE_VOICEMMODE1_CALL" type="out" id="2"/>
+ <usecase name="USECASE_VOICEMMODE2_CALL" type="in" id="19"/>
+ <usecase name="USECASE_VOICEMMODE2_CALL" type="out" id="19"/>
+ <usecase name="USECASE_VOWLAN_CALL" type="in" id="-1"/>
+ <usecase name="USECASE_VOWLAN_CALL" type="out" id="-1"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_FM" type="out" id="5"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_FM" type="in" id="34"/>
+ <usecase name="USECASE_AUDIO_SPKR_CALIB_RX" type="out" id="5"/>
+ <usecase name="USECASE_AUDIO_SPKR_CALIB_TX" type="in" id="40"/>
+ <usecase name="USECASE_AUDIO_PLAYBACK_AFE_PROXY" type="out" id="6"/>
+ <usecase name="USECASE_AUDIO_RECORD_AFE_PROXY" type="in" id="7"/>
+ <usecase name="USECASE_AUDIO_RECORD_LOW_LATENCY" type="in" id="17" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_ULL" type="out" id="17" />
+ <usecase name="USECASE_AUDIO_PLAYBACK_SILENCE" type="out" id="27" />
+ <usecase name="USECASE_AUDIO_HFP_SCO" type="in" id="12" />
+ <usecase name="USECASE_AUDIO_HFP_SCO_WB" type="in" id="12" />
+ </pcm_ids>
+ <config_params>
+ <!-- In the below value string, the value indicates default mono -->
+ <!-- speaker. It can be set to either left or right -->
+ <param key="mono_speaker" value="left"/>
+ <param key="spkr_1_tz_name" value="wsatz.11"/>
+ <param key="spkr_2_tz_name" value="wsatz.12"/>
+ <param key="true_32_bit" value="true"/>
+ <param key="native_audio_mode" value="true"/>
+ <param key="hfp_pcm_dev_id" value="39"/>
+ <param key="input_mic_max_count" value="4"/>
+ </config_params>
+ <acdb_ids>
+ <device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="124"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="101"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" acdb_id="124"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT" acdb_id="101"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" acdb_id="102"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED" acdb_id="150"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED_VBAT" acdb_id="150"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_1" acdb_id="151"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_2" acdb_id="152"/>
+
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES" acdb_id="124"/>
+ <device name="SND_DEVICE_OUT_VOICE_HANDSET" acdb_id="18"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER" acdb_id="34"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2" acdb_id="34"/>
+ <device name="SND_DEVICE_OUT_VOICE_HEADPHONES" acdb_id="52"/>
+ <device name="SND_DEVICE_OUT_VOICE_USB_HEADSET" acdb_id="52"/>
+ <device name="SND_DEVICE_OUT_VOICE_USB_HEADPHONES" acdb_id="52"/>
+ <device name="SND_DEVICE_OUT_BT_SCO" acdb_id="66"/>
+ <device name="SND_DEVICE_OUT_BT_SCO_WB" acdb_id="578"/>
+ <device name="SND_DEVICE_OUT_VOICE_TX" acdb_id="52"/>
+ <device name="SND_DEVICE_OUT_TRANSMISSION_FM" acdb_id="0"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="124"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_QMIC_FLUENCE" acdb_id="131"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_TMIC" acdb_id="131"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE" acdb_id="132"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="546"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="19"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC" acdb_id="41"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC" acdb_id="35"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC" acdb_id="37"/>
+ <device name="SND_DEVICE_IN_HEADSET_MIC" acdb_id="51"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" acdb_id="291"/>
+ <device name="SND_DEVICE_IN_VOICE_HEADSET_MIC" acdb_id="307"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC" acdb_id="323"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_NREC" acdb_id="835"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_WB" acdb_id="1347"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_WB_NREC" acdb_id="1859"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="4"/>
+ <device name="SND_DEVICE_IN_VOICE_DMIC" acdb_id="277"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" acdb_id="293"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC_ECHO" acdb_id="293"/>
+ <device name="SND_DEVICE_IN_VOICE_RX" acdb_id="819"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_MIC" acdb_id="4"/>
+ <device name="SND_DEVICE_IN_CAPTURE_FM" acdb_id="0"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" acdb_id="102"/>
+ <device name="SND_DEVICE_IN_MAIN_MIC" acdb_id="4"/>
+ <device name="SND_DEVICE_IN_TOP_MIC" acdb_id="11"/>
+ <device name="SND_DEVICE_IN_FRONT_MIC" acdb_id="11"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_MUSIC" acdb_id="21"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_VOICE" acdb_id="533"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_NS" acdb_id="533"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_MIC_NS" acdb_id="533"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_INTERVIEW" acdb_id="1045"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_HD" acdb_id="2581"/>
+ <device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" acdb_id="2069"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_TMIC" acdb_id="295"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_TMIC_CONF" acdb_id="1319"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_DMIC" acdb_id="85"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_TMIC" acdb_id="87"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_TMIC_FAR_END" acdb_id="599"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_TMIC_NEAR_END" acdb_id="1111"/>
+ <device name="SND_DEVICE_IN_VOICE_USB_HEADSET_MIC" acdb_id="357"/>
+ </acdb_ids>
+ <backend_names>
+ <device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_HEADPHONES_KARAOKE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_HEADPHONES_CE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_HEADPHONES_NO_CE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_BT_SCO_WB" backend="bt-sco-wb" interface="SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_BT_SCO" backend="bt-sco" interface="SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_BT_A2DP" backend="bt-a2dp" interface="SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_LINE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_ANC_HEADSET" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES" backend="speaker-and-headphones" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_CE" backend="speaker-and-headphones" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_NO_CE" backend="speaker-and-headphones" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_LINE" backend="speaker-and-headphones" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_ANC_HEADSET" backend="speaker-and-headphones" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_ANC_HEADSET" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_LINE" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES" backend="headphones" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_HANDSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER" backend="speaker" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_EXTERNAL_1" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_EXTERNAL_2" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_REVERSE" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_VBAT" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" interface="PRI_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_HANDSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER" backend="speaker" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_VBAT" backend="speaker" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_VBAT" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_HDMI" interface="PRI_MI2S_RX-and-HDMI"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_DISPLAY_PORT" interface="PRI_MI2S_RX-and-DISPLAY_PORT"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_AND_BT_A2DP" interface="PRI_MI2S_RX-and-SLIMBUS_7_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_ANC_FB_HEADSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_ANC_FB_HEADSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_ANC_HANDSET" interface="INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_PROTECTED_VBAT" interface="INT4_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_SPEAKER_WSA" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_WSA" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_2_WSA" interface="PRI_MI2S_RX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_EXTERNAL" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_MIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_MIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_VOICE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_MUSIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_INTERVIEW" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_DMIC_HD" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_TMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_TMIC_CONF" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_TMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_TMIC_FAR_END" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_TMIC_NEAR_END" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_USB_HEADSET_MIC" interface="USB_AUDIO_TX"/>
+ <device name="SND_DEVICE_IN_HEADSET_MIC_FLUENCE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HDMI_MIC" interface="HDMI"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_NREC" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_WB" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_BT_SCO_MIC_WB_NREC" interface="SLIMBUS_7_TX"/>
+ <device name="SND_DEVICE_IN_CAMCORDER_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC_ECHO" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_QMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_MIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_DMIC_STEREO" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_AANC_HANDSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_QUAD_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_STEREO_DMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_1" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_CAPTURE_VI_FEEDBACK_MONO_2" interface="INT5_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_FLUENCE_DMIC_AANC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_QMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_QMIC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_SPEAKER_QMIC_AEC_NS" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_THREE_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_HANDSET_TMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_VOICE_REC_TMIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_THREE_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_QUAD_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_IN_UNPROCESSED_HEADSET_MIC" interface="INT3_MI2S_TX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_HEADPHONES" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ <device name="SND_DEVICE_OUT_VOICE_SPEAKER_AND_VOICE_ANC_HEADSET" backend="speaker-and-headphones" interface="INT4_MI2S_RX-and-INT0_MI2S_RX"/>
+ </backend_names>
+ <!-- below values are for ref purpose to OEM, doesn't contain actual hardware info on MTP -->
+ <microphone_characteristics>
+ <microphone valid_mask="31" device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+ group="0" index_in_the_group="0" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
+ frequencies="100.00 106.00 112.00 118.00 125.00 132.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 212.00 224.00 236.00 250.00 265.00 280.00 300.00 315.00 335.00 355.00 375.00 400.00 425.00 450.00 475.00 500.00 530.00 560.00 600.00 630.00 670.00 710.00 750.00 800.00 850.00 900.00 950.00 1000.00 1060.00 1120.00 1180.00 1250.00 1320.00 1400.00 1500.00 1600.00 1700.00 1800.00 1900.00 2000.00 2120.00 2240.00 2360.00 2500.00 2650.00 2800.00 3000.00 3150.00 3350.00 3550.00 3750.00 4000.00 4250.00 4500.00 4750.00 5000.00 5300.00 5600.00 6000.00 6300.00 6700.00 7100.00 7500.00 8000.00 8500.00 9000.00 9500.00 10000.00 10600.00 11200.00 11800.00 12500.00 13200.00 14000.00 15000.00 16000.00 17000.00 18000.00 19000.00 20000.00"
+ responses="-0.78 -0.71 -0.64 -0.60 -0.55 -0.50 -0.47 -0.42 -0.39 -0.36 -0.34 -0.33 -0.32 -0.29 -0.28 -0.28 -0.27 -0.25 -0.25 -0.24 -0.23 -0.23 -0.22 -0.22 -0.19 -0.17 -0.15 -0.15 -0.14 -0.14 -0.12 -0.11 -0.10 -0.10 -0.08 -0.07 -0.07 -0.04 -0.03 -0.01 0.00 0.04 0.06 0.07 0.08 0.13 0.09 0.14 0.19 0.23 0.28 0.29 0.31 0.37 0.88 0.86 0.77 0.78 0.84 0.86 1.05 1.12 1.18 1.25 1.43 1.66 1.83 2.02 2.23 2.59 2.84 3.35 4.01 6.82 6.62 6.42 7.30 8.23 7.54 12.68 13.76 18.69 19.68 20.90 23.70 25.10 21.65 16.18 18.84 25.44 23.48 23.22 24.89"
+ sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 1.0" geometric_location="0.0269 0.0058 0.0079" />
+ <microphone valid_mask="31" device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+ group="0" index_in_the_group="1" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="92"
+ frequencies="106.00 112.00 118.00 125.00 132.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 212.00 224.00 236.00 250.00 265.00 280.00 300.00 315.00 335.00 355.00 375.00 400.00 425.00 450.00 475.00 500.00 530.00 560.00 600.00 630.00 670.00 710.00 750.00 800.00 850.00 900.00 950.00 1000.00 1060.00 1120.00 1180.00 1250.00 1320.00 1400.00 1500.00 1600.00 1700.00 1800.00 1900.00 2000.00 2120.00 2240.00 2360.00 2500.00 2650.00 2800.00 3000.00 3150.00 3350.00 3550.00 3750.00 4000.00 4250.00 4500.00 4750.00 5000.00 5300.00 5600.00 6000.00 6300.00 6700.00 7100.00 7500.00 8000.00 8500.00 9000.00 9500.00 10000.00 10600.00 11200.00 11800.00 12500.00 13200.00 14000.00 15000.00 16000.00 17000.00 18000.00 19000.00 20000.00"
+ responses="-0.75 -0.74 -0.69 -0.65 -0.62 -0.61 -0.56 -0.53 -0.50 -0.47 -0.43 -0.40 -0.37 -0.36 -0.33 -0.30 -0.28 -0.25 -0.24 -0.24 -0.24 -0.25 -0.24 -0.12 -0.10 -0.08 -0.09 -0.07 -0.07 -0.06 -0.06 -0.06 -0.05 -0.04 -0.05 -0.04 -0.01 0.02 0.02 0.00 0.02 0.03 0.07 0.10 0.10 0.13 0.01 0.01 0.10 0.11 0.19 0.24 0.38 0.46 0.26 0.27 0.43 0.76 0.75 1.09 1.09 0.94 1.06 1.21 1.47 1.45 1.36 2.07 2.85 2.90 3.85 4.65 5.84 5.46 6.15 7.50 8.30 10.62 12.70 16.65 20.95 25.41 26.32 20.20 16.60 11.24 7.85 7.62 20.19 7.32 2.87 5.18"
+ sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 1.0 0.0" geometric_location="0.0546 0.1456 0.00415" />
+ <microphone valid_mask="31" device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+ group="0" index_in_the_group="2" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="92"
+ frequencies="100.00 106.00 112.00 118.00 125.00 132.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 212.00 224.00 236.00 250.00 265.00 280.00 300.00 315.00 335.00 355.00 375.00 400.00 425.00 450.00 475.00 500.00 530.00 560.00 600.00 630.00 670.00 710.00 750.00 800.00 850.00 900.00 950.00 1000.00 1060.00 1120.00 1180.00 1250.00 1320.00 1400.00 1500.00 1600.00 1700.00 1800.00 1900.00 2000.00 2120.00 2240.00 2360.00 2500.00 2650.00 2800.00 3000.00 3150.00 3350.00 3550.00 3750.00 4000.00 4250.00 4500.00 4750.00 5000.00 5300.00 5600.00 6000.00 6300.00 6700.00 7100.00 7500.00 8000.00 8500.00 9000.00 9500.00 10000.00 10600.00 11200.00 11800.00 12500.00 13200.00 14000.00 15000.00 16000.00 17000.00 18000.00 19000.00"
+ responses="-9.24 -9.31 -9.39 -9.45 -9.46 -9.47 -9.50 -9.52 -9.51 -9.52 -9.51 -9.50 -9.49 -9.47 -9.48 -9.49 -9.48 -9.50 -9.51 -9.53 -9.55 -9.59 -9.63 -9.67 -9.58 -9.57 -9.65 -9.68 -9.71 -9.75 -9.79 -9.84 -9.87 -9.87 -9.90 -9.90 -9.91 -9.97 -10.01 -10.05 -9.85 -9.93 -9.94 -9.98 -10.04 -10.12 -10.28 -10.25 -10.01 -9.86 -9.81 -9.82 -9.61 -9.46 -8.27 -8.42 -8.98 -8.99 -8.82 -9.21 -8.92 -8.97 -9.30 -9.44 -9.52 -9.28 -9.09 -8.81 -7.02 -5.72 -5.30 -7.26 -8.39 -12.28 -8.23 -6.99 -5.52 -4.87 -3.82 -6.09 0.00 -2.15 -0.26 1.48 5.22 10.92 6.41 9.55 12.96 3.35 22.00 19.75"
+ sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 1.0" geometric_location="0.0274 0.14065 0.0079" />
+ </microphone_characteristics>
+ <snd_devices>
+ <input_snd_device>
+ <input_snd_device_mic_mapping>
+ <snd_dev in_snd_device="SND_DEVICE_IN_CAMCORDER_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_REC_MIC_AEC_NS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_REC_MIC_AEC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_REC_MIC_NS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_REC_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_DMIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_DMIC_TMUS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_VOICE_SPEAKER_DMIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_DMIC_AEC_NS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_DMIC_AEC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_DMIC_NS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_DMIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_SPEAKER_DMIC_AEC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_SPEAKER_DMIC_NS">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_SPEAKER_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_UNPROCESSED_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_UNPROCESSED_THREE_MIC">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_HANDSET_DMIC_STEREO">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ <snd_dev in_snd_device="SND_DEVICE_IN_SPEAKER_DMIC_STEREO">
+ <mic_info mic_device_id="builtin_mic_1"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_2"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ <mic_info mic_device_id="builtin_mic_3"
+ channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
+ </snd_dev>
+ </input_snd_device_mic_mapping>
+ </input_snd_device>
+ </snd_devices>
+</audio_platform_info>
+
diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml
new file mode 100644
index 0000000..b7319d5
--- /dev/null
+++ b/audio/audio_policy_configuration.xml
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright (c) 2016-2017, The Linux Foundation. All rights reserved
+ Not a Contribution.
+-->
+<!-- Copyright (C) 2015 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.
+-->
+
+<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
+
+ <!-- Global configuration Decalaration -->
+ <globalConfiguration speaker_drc_enabled="true"/>
+
+
+ <!-- Modules section:
+ There is one section per audio HW module present on the platform.
+ Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
+ The module names are the same as in current .conf file:
+ “primary”, “A2DP”, “remote_submix”, “USB”
+ Each module will contain the following sections:
+ “devicePorts”: a list of device descriptors for all input and output devices accessible via this
+ module.
+ This contains both permanently attached devices and removable devices.
+ “mixPorts”: listing all output and input streams exposed by the audio HAL
+ “routes”: list of possible connections between input and output devices or between stream and
+ devices.
+ "route": is defined by an attribute:
+ -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
+ -"sink": the sink involved in this route
+ -"sources": all the sources than can be connected to the sink via vis route
+ “attachedDevices”: permanently attached devices.
+ The attachedDevices section is a list of devices names. The names correspond to device names
+ defined in <devicePorts> section.
+ “defaultOutputDevice”: device to be used by default when no policy rule applies
+ -->
+ <modules>
+ <!-- Primary Audio HAL -->
+ <module name="primary" halVersion="2.0">
+ <attachedDevices>
+ <item>Earpiece</item>
+ <item>Speaker</item>
+ <item>Telephony Tx</item>
+ <item>Built-In Mic</item>
+ <item>Built-In Back Mic</item>
+ <item>FM Tuner</item>
+ <item>Telephony Rx</item>
+ </attachedDevices>
+ <defaultOutputDevice>Speaker</defaultOutputDevice>
+ <mixPorts>
+ <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="deep_buffer" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="hifi_playback" role="source" />
+ <mixPort name="compress_passthrough" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
+ <profile name="" format="dynamic"
+ samplingRates="dynamic" channelMasks="dynamic"/>
+ </mixPort>
+ <mixPort name="direct_pcm" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800,384000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ </mixPort>
+ <mixPort name="compressed_offload" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
+ <profile name="" format="AUDIO_FORMAT_MP3"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_FLAC"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_ALAC"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_APE"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_LC"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_DTS"
+ samplingRates="32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_DTS_HD"
+ samplingRates="32000,44100,48000,64000,88200,96000,128000,176400,192000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <!-- remove wma by wangyuhao lct 2018/1/17
+ <profile name="" format="AUDIO_FORMAT_WMA"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_WMA_PRO"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ end-->
+ <profile name="" format="AUDIO_FORMAT_VORBIS"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_ADTS_LC"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V1"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V2"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ </mixPort>
+ <mixPort name="dsd_compress_passthrough" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
+ <profile name="" format="AUDIO_FORMAT_DSD"
+ samplingRates="2822400,5644800"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ </mixPort>
+ <mixPort name="voice_tx" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="voip_rx" role="source"
+ flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ </mixPort>
+
+ <mixPort name="primary input" role="sink" maxOpenCount="2" maxActiveCount="2">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </mixPort>
+ <mixPort name="surround_sound" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4,AUDIO_CHANNEL_IN_5POINT1,AUDIO_CHANNEL_INDEX_MASK_6"/>
+ </mixPort>
+ <mixPort name="record_24" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,96000,192000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,96000,192000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,96000,192000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4"/>
+ </mixPort>
+ <mixPort name="voice_rx" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
+ <mixPort name="hifi_input" role="sink" />
+ </mixPorts>
+
+ <devicePorts>
+ <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
+ <devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ </devicePort>
+ <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Line" type="AUDIO_DEVICE_OUT_LINE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ </devicePort>
+ <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ </devicePort>
+ <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ </devicePort>
+ <devicePort tagName="BT SCO All" type="AUDIO_DEVICE_OUT_ALL_SCO" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ </devicePort>
+ <devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="HDMI" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
+ </devicePort>
+ <devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
+ </devicePort>
+ <devicePort tagName="FM" type="AUDIO_DEVICE_OUT_FM" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+
+ <!-- Input devices declaration, i.e. Source DEVICE PORT -->
+ <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </devicePort>
+ <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </devicePort>
+ <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </devicePort>
+ <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ </devicePort>
+ <devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ </devicePort>
+ <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
+ samplingRates="44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+
+ </devicePorts>
+ <!-- route declaration, i.e. list all available sources for a given sink -->
+ <routes>
+ <route type="mix" sink="Earpiece"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Speaker"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Wired Headset"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx"/>
+ <route type="mix" sink="Wired Headphones"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx"/>
+ <route type="mix" sink="Line"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx"/>
+ <route type="mix" sink="HDMI"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,compress_passthrough"/>
+ <route type="mix" sink="Proxy"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload"/>
+ <route type="mix" sink="FM"
+ sources="primary output"/>
+ <route type="mix" sink="BT SCO All"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="USB Device Out"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,hifi_playback"/>
+ <route type="mix" sink="USB Headset Out"
+ sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx,hifi_playback"/>
+ <route type="mix" sink="Telephony Tx"
+ sources="voice_tx"/>
+ <route type="mix" sink="voice_rx"
+ sources="Telephony Rx"/>
+ <route type="mix" sink="primary input"
+ sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
+ <route type="mix" sink="surround_sound"
+ sources="Built-In Mic,Built-In Back Mic"/>
+ <route type="mix" sink="record_24"
+ sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
+ <route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
+ </routes>
+
+ </module>
+
+ <!-- Remote Submix Audio HAL -->
+ <xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
+ <!-- A2dp Audio HAL -->
+ <xi:include href="/vendor/etc/a2dp_audio_policy_configuration.xml"/>
+ <!-- Usb Audio HAL -->
+ <xi:include href="/vendoe/etc/usb_audio_policy_configuration.xml"/>
+
+ </modules>
+ <!-- End of Modules section -->
+
+ <!-- Volume section -->
+
+ <xi:include href="/vendor/etc/audio_policy_volumes.xml"/>
+ <xi:include href="/vendor/etc/default_volume_tables.xml"/>
+
+ <!-- End of Volume section -->
+
+</audioPolicyConfiguration>
diff --git a/audio/audio_tuning_mixer.txt b/audio/audio_tuning_mixer.txt
new file mode 100644
index 0000000..fd48369
--- /dev/null
+++ b/audio/audio_tuning_mixer.txt
@@ -0,0 +1,41 @@
+#RAS_TEST_SPKR_PHONE_SPKR_STEREO
+acdb_dev_id:136
+!Playback
+Rxdevice:0
+
+enable
+INT4_MI2S_RX Channels:Two
+RX4 MIX1 INP1:RX4
+RX5 MIX1 INP1:RX5
+COMP1 Switch:1
+COMP2 Switch:1
+SpkrLeft COMP Switch:1
+SpkrLeft BOOST Switch:1
+SpkrLeft VISENSE Switch:1
+SpkrLeft SWR DAC_Port Switch:1
+SpkrRight COMP Switch:1
+SpkrRight BOOST Switch:1
+SpkrRight VISENSE Switch:1
+SpkrRight SWR DAC_Port Switch:1
+SpkrLeft WSA PA Mute:0
+SpkrRight WSA PA Mute:0
+INT4_MI2S_RX Audio Mixer MultiMedia1:1
+
+disable
+INT4_MI2S_RX Channels:One
+RX4 MIX1 INP1:ZERO
+RX5 MIX1 INP1:ZERO
+COMP1 Switch:0
+COMP2 Switch:0
+SpkrLeft COMP Switch:0
+SpkrLeft BOOST Switch:0
+SpkrLeft VISENSE Switch:0
+SpkrLeft SWR DAC_Port Switch:0
+SpkrRight COMP Switch:0
+SpkrRight BOOST Switch:0
+SpkrRight VISENSE Switch:0
+SpkrRight SWR DAC_Port Switch:0
+SpkrLeft WSA PA Mute:0
+SpkrRight WSA PA Mute:0
+INT4_MI2S_RX Audio Mixer MultiMedia1:0
+
diff --git a/audio/graphite_ipc_platform_info.xml b/audio/graphite_ipc_platform_info.xml
new file mode 100644
index 0000000..f6775be
--- /dev/null
+++ b/audio/graphite_ipc_platform_info.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--- Copyright (c) 2016, The Linux Foundation. All rights reserved. -->
+<!--- -->
+<!--- Redistribution and use in source and binary forms, with or without -->
+<!--- modification, are permitted provided that the following conditions are -->
+<!--- met: -->
+<!--- * Redistributions of source code must retain the above copyright -->
+<!--- notice, this list of conditions and the following disclaimer. -->
+<!--- * Redistributions in binary form must reproduce the above -->
+<!--- copyright notice, this list of conditions and the following -->
+<!--- disclaimer in the documentation and/or other materials provided -->
+<!--- with the distribution. -->
+<!--- * Neither the name of The Linux Foundation nor the names of its -->
+<!--- contributors may be used to endorse or promote products derived -->
+<!--- from this software without specific prior written permission. -->
+<!--- -->
+<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
+<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
+<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
+<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
+<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
+<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
+<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
+<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
+<graphite_ipc_platform_info>
+ <no_of_glink_channels value="4">
+ </no_of_glink_channels>
+ <!-- channel 1 configuration -->
+ <glink_channel name="g_glink_ctrl" latency_in_us="5000"
+ no_of_intents="1" intents_size="1024">
+ </glink_channel>
+ <!-- channel 2 configuration -->
+ <glink_channel name="g_glink_persistent_data_ild" latency_in_us="30000"
+ no_of_intents="0">
+ </glink_channel>
+ <!-- channel 3 configuration -->
+ <glink_channel name="g_glink_persistent_data_nild" latency_in_us="30000"
+ no_of_intents="0">
+ </glink_channel>
+ <!-- channel 4 configuration -->
+ <glink_channel name="g_glink_audio_data" latency_in_us="10000"
+ no_of_intents="2" intents_size="4096, 4096">
+ </glink_channel>
+</graphite_ipc_platform_info>
diff --git a/audio/listen_platform_info.xml b/audio/listen_platform_info.xml
new file mode 100644
index 0000000..36d7566
--- /dev/null
+++ b/audio/listen_platform_info.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--- Copyright (c) 2014, 2016, The Linux Foundation. All rights reserved. -->
+<!--- -->
+<!--- Redistribution and use in source and binary forms, with or without -->
+<!--- modification, are permitted provided that the following conditions are -->
+<!--- met: -->
+<!--- * Redistributions of source code must retain the above copyright -->
+<!--- notice, this list of conditions and the following disclaimer. -->
+<!--- * Redistributions in binary form must reproduce the above -->
+<!--- copyright notice, this list of conditions and the following -->
+<!--- disclaimer in the documentation and/or other materials provided -->
+<!--- with the distribution. -->
+<!--- * Neither the name of The Linux Foundation nor the names of its -->
+<!--- contributors may be used to endorse or promote products derived -->
+<!--- from this software without specific prior written permission. -->
+<!--- -->
+<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
+<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
+<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
+<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
+<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
+<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
+<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
+<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
+<listen_platform_info>
+ <device name="DEVICE_HANDSET_APE_ACDB_ID" acdb_id="100" />
+ <device name="DEVICE_HANDSET_CPE_ACDB_ID" acdb_id="128" />
+ <ctrl name="execution_type" value="CPE" /> <!-- value: "CPE" "APE" -->
+ <ctrl name="max_cpe_sessions" value="1" />
+ <ctrl name="max_cpe_keywords" value="6" />
+ <ctrl name="max_cpe_kw_user_pairs" value="6" />
+ <ctrl name="max_ape_sessions" value="8" />
+ <ctrl name="max_ape_keywords" value="10" />
+ <ctrl name="max_ape_kw_user_pairs" value="10" />
+ <ctrl name="dump_lab_data" value="false" /> <!-- value: "true" "false" -->
+ <!-- If value is true, it requires write permissions to /data folder to -->
+ <!-- dump lab data to file under /data/LHAL foloder. Do "chmod 777 /data/" -->
+</listen_platform_info>
+
diff --git a/audio/mixer_paths.xml b/audio/mixer_paths.xml
new file mode 100644
index 0000000..9d7633d
--- /dev/null
+++ b/audio/mixer_paths.xml
@@ -0,0 +1,2516 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. -->
+<!-- -->
+<!-- Redistribution and use in source and binary forms, with or without -->
+<!-- modification, are permitted provided that the following conditions are -->
+<!-- met: -->
+<!-- * Redistributions of source code must retain the above copyright -->
+<!-- notice, this list of conditions and the following disclaimer. -->
+<!-- * Redistributions in binary form must reproduce the above -->
+<!-- copyright notice, this list of conditions and the following -->
+<!-- disclaimer in the documentation and/or other materials provided -->
+<!-- with the distribution. -->
+<!-- * Neither the name of The Linux Foundation nor the names of its -->
+<!-- contributors may be used to endorse or promote products derived -->
+<!-- from this software without specific prior written permission. -->
+<!-- -->
+<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
+<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
+<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
+<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
+<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
+<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
+<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
+<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
+<mixer>
+ <!-- These are the initial mixer settings -->
+ <ctl name="Voice Rx Device Mute" id="0" value="0" />
+ <ctl name="Voice Rx Device Mute" id="1" value="-1" />
+ <ctl name="Voice Rx Device Mute" id="2" value="20" />
+ <ctl name="Voice Tx Mute" id="0" value="0" />
+ <ctl name="Voice Tx Mute" id="1" value="-1" />
+ <ctl name="Voice Tx Mute" id="2" value="500" />
+ <ctl name="Voice Rx Gain" id="0" value="0" />
+ <ctl name="Voice Rx Gain" id="1" value="-1" />
+ <ctl name="Voice Rx Gain" id="2" value="20" />
+ <ctl name="Voip Tx Mute" id="0" value="0" />
+ <ctl name="Voip Tx Mute" id="1" value="500" />
+ <ctl name="Voip Rx Gain" id="0" value="0" />
+ <ctl name="Voip Rx Gain" id="1" value="20" />
+ <ctl name="Voip Mode Config" value="12" />
+ <ctl name="Voip Rate Config" value="0" />
+ <ctl name="Voip Evrc Min Max Rate Config" id="0" value="1" />
+ <ctl name="Voip Evrc Min Max Rate Config" id="1" value="4" />
+ <ctl name="Voip Dtx Mode" value="0" />
+ <ctl name="TTY Mode" value="OFF" />
+ <ctl name="Load acoustic model" value="0" />
+ <ctl name="Backlog size" value="0" />
+ <ctl name="Microphone mode" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="PRI_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="0" />
+ <ctl name="HDMI Mixer MultiMedia1" value="0" />
+ <ctl name="HDMI Mixer MultiMedia2" value="0" />
+ <ctl name="HDMI Mixer MultiMedia3" value="0" />
+ <ctl name="HDMI Mixer MultiMedia4" value="0" />
+ <ctl name="HDMI Mixer MultiMedia5" value="0" />
+ <ctl name="HDMI Mixer MultiMedia7" value="0" />
+ <ctl name="HDMI Mixer MultiMedia9" value="0" />
+ <ctl name="HDMI Mixer MultiMedia10" value="0" />
+ <ctl name="HDMI Mixer MultiMedia11" value="0" />
+ <ctl name="HDMI Mixer MultiMedia12" value="0" />
+ <ctl name="HDMI Mixer MultiMedia13" value="0" />
+ <ctl name="HDMI Mixer MultiMedia14" value="0" />
+ <ctl name="HDMI Mixer MultiMedia15" value="0" />
+ <ctl name="HDMI Mixer MultiMedia16" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia1" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia3" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia4" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia5" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia6" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia7" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia8" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia9" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia11" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia12" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia13" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia14" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia15" value="0" />
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="0" />
+ <ctl name="Display Port RX Bit Format" value="S16_LE" />
+ <ctl name="Display Port RX SampleRate" value="KHZ_48" />
+ <ctl name="Display Port RX Channels" value="Two" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <!-- PRI_MI2S start -->
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia16" value="0" />
+ <!-- PRI_MI2S end -->
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia3" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="USB_AUDIO_RX Format" value="S16_LE" />
+ <ctl name="USB_AUDIO_RX SampleRate" value="KHZ_48" />
+ <ctl name="USB_AUDIO_RX Channels" value="Two" />
+ <ctl name="MultiMedia1 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia2 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia5 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="0" />
+ <ctl name="USB_AUDIO_TX Format" value="S16_LE" />
+ <ctl name="USB_AUDIO_TX SampleRate" value="KHZ_48" />
+ <ctl name="USB_AUDIO_TX Channels" value="One" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="PRI_MI2S_RX Channels" value="One" />
+ <ctl name="INT0_MI2S_RX Channels" value="One" />
+ <ctl name="INT3_MI2S_TX Channels" value="One" />
+ <!-- ctl name="PowerCtrl" value="0" /-->
+ <ctl name="I2S TX2 INP1" value="ZERO" />
+ <ctl name="I2S TX2 INP2" value="ZERO" />
+ <ctl name="INT4_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="ADC1_INP1 Switch" value="0" />
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="HDMI Mixer MultiMedia4" value="0" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
+ <ctl name="INT4_MI2S_RX_VI_FB_STEREO_CH_MUX" value="ZERO" />
+ <ctl name="PRI_MI2S_RX_VI_FB_MONO_CH_MUX" value="ZERO" />
+ <ctl name="PRI_MI2S_RX_VI_FB_STEREO_CH_MUX" value="ZERO" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="0" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="0" />
+ <ctl name="INT5 MI2S VI MONO" value="Left" />
+ <!-- HFP start -->
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <ctl name="PRI_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="0" />
+ <!-- HFP end -->
+ <!-- echo reference -->
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="None" />
+ <!-- usb headset -->
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia7" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia12" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia13" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia14" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia15" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="0" />
+ <ctl name="MultiMedia1 Mixer AFE_PCM_TX" value="0" />
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia5" value="0" />
+ <!-- usb headset end -->
+ <!-- fm -->
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="0" />
+ <ctl name="INT4_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="PRI_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="PRI_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="0" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="0" />
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="0" />
+ <!-- fm end -->
+
+ <!-- Multimode Voice1 -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="PRI_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="0" />
+ <!-- Multimode Voice1 HDMI -->
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode1" value="0" />
+ <!-- Multimode Voice1 BTSCO -->
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer SLIM_7_TX_MMode1" value="0" />
+ <!-- Multimode Voice1 USB headset -->
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="0" />
+ <ctl name="VoiceMMode1_Tx Mixer USB_AUDIO_TX_MMode1" value="0" />
+ <!-- Miltimode Voice1 end-->
+
+ <!-- Multimode Voice2 -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="PRI_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 HDMI -->
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode2" value="0" />
+ <!-- Multimode Voice2 BTSCO -->
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer SLIM_7_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 USB headset -->
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="0" />
+ <ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="0" />
+ <!-- Multimode Voice2 end-->
+
+ <!-- Voice external ec. reference -->
+ <ctl name="VOC_EXT_EC MUX" value="NONE" />
+ <!-- Voice external ec. reference end -->
+
+ <!-- RT Proxy Cal -->
+ <ctl name="RT_PROXY_1_RX SetCalMode" value="CAL_MODE_NONE" />
+ <ctl name="RT_PROXY_1_TX SetCalMode" value="CAL_MODE_NONE" />
+ <!-- RT Proxy Cal end -->
+
+ <!-- Incall Recording -->
+ <ctl name="MultiMedia1 Mixer VOC_REC_UL" value="0" />
+ <ctl name="MultiMedia1 Mixer VOC_REC_DL" value="0" />
+ <ctl name="MultiMedia8 Mixer VOC_REC_UL" value="0" />
+ <ctl name="MultiMedia8 Mixer VOC_REC_DL" value="0" />
+ <!-- Incall Recording End -->
+
+ <!-- Incall Music -->
+ <ctl name="Incall_Music Audio Mixer MultiMedia2" value="0" />
+ <!-- Incall Music End -->
+
+ <!-- compress-voip-call start -->
+ <ctl name="INT4_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="PRI_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="0" />
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer SLIM_7_TX_Voip" value="0" />
+ <ctl name="AFE_PCM_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer AFE_PCM_TX_Voip" value="0" />
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="0" />
+ <ctl name="Voip_Tx Mixer USB_AUDIO_TX_Voip" value="0" />
+ <!-- compress-voip-call end-->
+
+ <!-- Audio BTSCO -->
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="0" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="0" />
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="0" />
+ <!-- audio record compress-->
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="0" />
+ <ctl name="MultiMedia8 Mixer AFE_PCM_TX" value="0" />
+ <!-- audio record compress end-->
+
+ <!-- split a2dp -->
+ <ctl name="SLIM7_RX ADM Channels" value="Zero" />
+ <!-- split a2dp end-->
+
+ <!-- ADSP testfwk -->
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="PRI_MI2S_RX_DL_HL Switch" value="0" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="0" />
+ <!-- ADSP testfwk end-->
+
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia3" value="0" />
+
+ <!-- Codec controls -->
+ <!-- WSA controls -->
+ <ctl name="SpkrLeft COMP Switch" value="0" />
+ <ctl name="SpkrRight COMP Switch" value="0" />
+ <ctl name="SpkrLeft BOOST Switch" value="0" />
+ <ctl name="SpkrRight BOOST Switch" value="0" />
+ <ctl name="SpkrLeft VISENSE Switch" value="0" />
+ <ctl name="SpkrRight VISENSE Switch" value="0" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="0" />
+ <ctl name="SpkrRight SWR DAC_Port Switch" value="0" />
+ <ctl name="SpkrLeft WSA PA Gain" value="G_0_DB" />
+ <ctl name="SpkrRight WSA PA Gain" value="G_0_DB" />
+ <ctl name="SpkrLeft WSA PA Mute" value="1" />
+ <ctl name="SpkrRight WSA PA Mute" value="1" />
+ <ctl name="EAR SPKR PA Gain" value="G_DEFAULT" />
+
+ <!-- Volume controls -->
+ <ctl name="HPHL Volume" value="9" />
+ <ctl name="HPHR Volume" value="9" />
+ <ctl name="EAR PA Gain" value="POS_1P5_DB" />
+ <ctl name="EAR PA Boost" value="ENABLE" />
+
+ <ctl name="RX1 Digital Volume" value="84" />
+ <ctl name="RX2 Digital Volume" value="84" />
+ <ctl name="RX3 Digital Volume" value="84" />
+ <ctl name="RX4 Digital Volume" value="84" />
+ <ctl name="RX5 Digital Volume" value="84" />
+ <ctl name="ADC1 Volume" value="4" />
+ <ctl name="ADC2 Volume" value="4" />
+ <ctl name="ADC3 Volume" value="4" />
+ <ctl name="DEC1 Volume" value="84" />
+ <ctl name="DEC2 Volume" value="84" />
+ <ctl name="DEC3 Volume" value="84" />
+ <ctl name="DEC4 Volume" value="84" />
+
+ <!-- Compander controls -->
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="COMP2 Switch" value="1" />
+
+ <!-- config adc1 tangshouxing 08/24 -->
+ <ctl name="ADC1_INP1 Switch" value="0" />
+
+ <!-- MUX controls -->
+ <ctl name="DEC1 MUX" value="ZERO" />
+ <ctl name="DEC2 MUX" value="ZERO" />
+ <ctl name="DEC3 MUX" value="ZERO" />
+ <ctl name="DEC4 MUX" value="ZERO" />
+ <ctl name="ADC2 MUX" value="ZERO" />
+ <ctl name="RDAC2 MUX" value="ZERO" />
+
+ <!-- Interpolator chain controls -->
+ <!-- ADD RX Chain Controls -->
+
+ <ctl name="RX1 MIX1 INP1" value="ZERO" />
+ <ctl name="RX2 MIX1 INP1" value="ZERO" />
+ <ctl name="RDAC2 MUX" value="ZERO" />
+ <ctl name="HPHL" value="ZERO" />
+ <ctl name="HPHR" value="ZERO" />
+ <ctl name="RX1 MIX2 INP1" value="ZERO" />
+ <ctl name="RX2 MIX2 INP1" value="ZERO" />
+ <ctl name="RX3 MIX1 INP1" value="ZERO" />
+ <ctl name="RX4 MIX1 INP1" value="ZERO" />
+ <ctl name="RX5 MIX1 INP1" value="ZERO" />
+ <ctl name="RX HPH Mode" value="NORMAL" />
+ <ctl name="COMP0 RX1" value="0" />
+ <ctl name="COMP0 RX2" value="0" />
+
+ <!-- IIR/voice anc -->
+ <ctl name="IIR1 Band1" id ="0" value="268435456" />
+ <ctl name="IIR1 Band1" id ="1" value="0" />
+ <ctl name="IIR1 Band1" id ="2" value="0" />
+ <ctl name="IIR1 Band1" id ="3" value="0" />
+ <ctl name="IIR1 Band1" id ="4" value="0" />
+ <ctl name="IIR1 Band2" id ="0" value="268435456" />
+ <ctl name="IIR1 Band2" id ="1" value="0" />
+ <ctl name="IIR1 Band2" id ="2" value="0" />
+ <ctl name="IIR1 Band2" id ="3" value="0" />
+ <ctl name="IIR1 Band2" id ="4" value="0" />
+ <ctl name="IIR1 Band3" id ="0" value="268435456" />
+ <ctl name="IIR1 Band3" id ="1" value="0" />
+ <ctl name="IIR1 Band3" id ="2" value="0" />
+ <ctl name="IIR1 Band3" id ="3" value="0" />
+ <ctl name="IIR1 Band3" id ="4" value="0" />
+ <ctl name="IIR1 Band4" id ="0" value="268435456" />
+ <ctl name="IIR1 Band4" id ="1" value="0" />
+ <ctl name="IIR1 Band4" id ="2" value="0" />
+ <ctl name="IIR1 Band4" id ="3" value="0" />
+ <ctl name="IIR1 Band4" id ="4" value="0" />
+ <ctl name="IIR1 Band5" id ="0" value="268435456" />
+ <ctl name="IIR1 Band5" id ="1" value="0" />
+ <ctl name="IIR1 Band5" id ="2" value="0" />
+ <ctl name="IIR1 Band5" id ="3" value="0" />
+ <ctl name="IIR1 Band5" id ="4" value="0" />
+ <ctl name="IIR1 Enable Band1" value="0" />
+ <ctl name="IIR1 Enable Band2" value="0" />
+ <ctl name="IIR1 Enable Band3" value="0" />
+ <ctl name="IIR1 Enable Band4" value="0" />
+ <ctl name="IIR1 Enable Band5" value="0" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ <ctl name="IIR1 INP2 Volume" value="53" />
+ <ctl name="IIR1 INP3 Volume" value="53" />
+ <ctl name="IIR1 INP4 Volume" value="53" />
+ <ctl name="IIR1 INP1 MUX" value="ZERO" />
+
+ <!-- smart PA TFA 9894 -->
+ <ctl name="TFA Profile" value="music" />
+
+ <!-- anc related -->
+
+ <!-- vbat related data -->
+ <!-- vbat related data end -->
+
+ <!-- Codec controls end -->
+
+ <!-- These are audio route (FE to BE) specific mixer settings -->
+ <path name="gsm-mode">
+ <ctl name="GSM mode Enable" value="ON" />
+ </path>
+
+ <path name="echo-reference speaker-vbat-mono">
+ </path>
+
+ <path name="echo-reference speaker-vbat-mono-2">
+ </path>
+
+ <path name="echo-reference speaker-vbat">
+ </path>
+
+ <path name="echo-reference">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT0_MI2S_RX" />
+ </path>
+
+ <path name="echo-reference headphones">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT0_MI2S_RX" />
+ </path>
+
+ <path name="echo-reference headphones-44.1">
+ </path>
+
+ <path name="echo-reference speaker">
+ <ctl name="EC Reference Channels" value="One"/>
+ <ctl name="EC Reference Bit Format" value="S16_LE"/>
+ <ctl name="EC Reference SampleRate" value="48000"/>
+ </path>
+
+ <path name="deep-buffer-playback">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+ <path name="deep-buffer-playback speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-protected">
+ <path name="deep-buffer-playback speaker" />
+ </path>
+
+ <path name="deep-buffer-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-hdmi">
+ <path name="deep-buffer-playback hdmi" />
+ <path name="deep-buffer-playback speaker" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-display-port">
+ <path name="deep-buffer-playback display-port" />
+ <path name="deep-buffer-playback speaker" />
+ </path>
+
+ <path name="deep-buffer-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="deep-buffer-playback bt-sco" />
+ </path>
+
+ <path name="deep-buffer-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-usb-headphones">
+ <path name="deep-buffer-playback usb-headphones" />
+ <path name="deep-buffer-playback speaker" />
+ </path>
+
+ <path name="deep-buffer-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-headphones">
+ <path name="deep-buffer-playback headphones" />
+ <path name="deep-buffer-playback speaker" />
+ </path>
+
+ <path name="low-latency-playback">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+ <path name="low-latency-playback speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ <ctl name="TFA Profile" value="ringtone" />
+ </path>
+
+ <path name="low-latency-playback speaker-protected">
+ <path name="low-latency-playback speaker" />
+ </path>
+
+ <path name="low-latency-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="low-latency-playback bt-sco" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-hdmi">
+ <path name="low-latency-playback hdmi" />
+ <path name="low-latency-playback speaker" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-display-port">
+ <path name="low-latency-playback display-port" />
+ <path name="low-latency-playback speaker" />
+ </path>
+
+ <path name="low-latency-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-usb-headphones">
+ <path name="low-latency-playback usb-headphones" />
+ <path name="low-latency-playback speaker" />
+ </path>
+
+ <path name="low-latency-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-headphones">
+ <path name="low-latency-playback headphones" />
+ <path name="low-latency-playback speaker" />
+ </path>
+
+ <path name="audio-ull-playback">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+ <path name="audio-ull-playback speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-protected">
+ <path name="audio-ull-playback speaker" />
+ </path>
+
+ <path name="audio-ull-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-headphones">
+ <path name="audio-ull-playback speaker" />
+ <path name="audio-ull-playback headphones" />
+ </path>
+
+ <path name="audio-ull-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="audio-ull-playback bt-sco" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-hdmi">
+ <path name="audio-ull-playback hdmi" />
+ <path name="audio-ull-playback speaker" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-display-port">
+ <path name="audio-ull-playback display-port" />
+ <path name="audio-ull-playback speaker" />
+ </path>
+
+ <path name="audio-ull-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="audio-ull-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="multi-channel-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="multi-channel-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="multi-channel-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="compress-offload-playback">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+ <path name="compress-offload-playback speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback speaker-protected">
+ <path name="compress-offload-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="silence-playback hdmi">
+ <ctl name="HDMI Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="compress-offload-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="silence-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia9" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-hdmi">
+ <path name="compress-offload-playback hdmi" />
+ <path name="compress-offload-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-display-port">
+ <path name="compress-offload-playback display-port" />
+ <path name="compress-offload-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-usb-headphones">
+ <path name="compress-offload-playback usb-headphones" />
+ <path name="compress-offload-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback speaker-and-headphones">
+ <path name="compress-offload-playback headphones" />
+ <path name="compress-offload-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback2">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+ <path name="compress-offload-playback2 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 hdmi">
+ <ctl name="HDMI Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback2 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-hdmi">
+ <path name="compress-offload-playback2 hdmi" />
+ <path name="compress-offload-playback2 speaker" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-display-port">
+ <path name="compress-offload-playback2 display-port" />
+ <path name="compress-offload-playback2 speaker" />
+ </path>
+
+ <path name="compress-offload-playback2 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-usb-headphones">
+ <path name="compress-offload-playback2 usb-headphones" />
+ <path name="compress-offload-playback2 speaker" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-headphones">
+ <path name="compress-offload-playback2 headphones" />
+ <path name="compress-offload-playback2 speaker" />
+ </path>
+
+ <path name="compress-offload-playback3">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+ <path name="compress-offload-playback3 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 hdmi">
+ <ctl name="HDMI Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback3 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-hdmi">
+ <path name="compress-offload-playback3 hdmi" />
+ <path name="compress-offload-playback3 speaker" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-display-port">
+ <path name="compress-offload-playback3 display-port" />
+ <path name="compress-offload-playback3 speaker" />
+ </path>
+
+ <path name="compress-offload-playback3 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-usb-headphones">
+ <path name="compress-offload-playback3 usb-headphones" />
+ <path name="compress-offload-playback3 speaker" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-headphones">
+ <path name="compress-offload-playback3 headphones" />
+ <path name="compress-offload-playback3 speaker" />
+ </path>
+
+ <path name="compress-offload-playback4">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 hdmi">
+ <ctl name="HDMI Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback4 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-hdmi">
+ <path name="compress-offload-playback4 hdmi" />
+ <path name="compress-offload-playback4 speaker" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-display-port">
+ <path name="compress-offload-playback4 display-port" />
+ <path name="compress-offload-playback4 speaker" />
+ </path>
+
+
+ <path name="compress-offload-playback4 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-usb-headphones">
+ <path name="compress-offload-playback4 usb-headphones" />
+ <path name="compress-offload-playback4 speaker" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-headphones">
+ <path name="compress-offload-playback4 headphones" />
+ <path name="compress-offload-playback4 speaker" />
+ </path>
+
+ <path name="compress-offload-playback5">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 hdmi">
+ <ctl name="HDMI Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback5 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-hdmi">
+ <path name="compress-offload-playback5 hdmi" />
+ <path name="compress-offload-playback5 speaker" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-display-port">
+ <path name="compress-offload-playback5 display-port" />
+ <path name="compress-offload-playback5 speaker" />
+ </path>
+
+ <path name="compress-offload-playback5 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-usb-headphones">
+ <path name="compress-offload-playback5 usb-headphones" />
+ <path name="compress-offload-playback5 speaker" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-headphones">
+ <path name="compress-offload-playback5 headphones" />
+ <path name="compress-offload-playback5 speaker" />
+ </path>
+
+ <path name="compress-offload-playback6">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 hdmi">
+ <ctl name="HDMI Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback6 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-hdmi">
+ <path name="compress-offload-playback6 hdmi" />
+ <path name="compress-offload-playback6 speaker" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-display-port">
+ <path name="compress-offload-playback6 display-port" />
+ <path name="compress-offload-playback6 speaker" />
+ </path>
+
+ <path name="compress-offload-playback6 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-usb-headphones">
+ <path name="compress-offload-playback6 usb-headphones" />
+ <path name="compress-offload-playback6 speaker" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-headphones">
+ <path name="compress-offload-playback6 headphones" />
+ <path name="compress-offload-playback6 speaker" />
+ </path>
+
+ <path name="compress-offload-playback7">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 hdmi">
+ <ctl name="HDMI Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback7 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-hdmi">
+ <path name="compress-offload-playback7 hdmi" />
+ <path name="compress-offload-playback7 speaker" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-display-port">
+ <path name="compress-offload-playback7 display-port" />
+ <path name="compress-offload-playback7 speaker" />
+ </path>
+
+ <path name="compress-offload-playback7 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-usb-headphones">
+ <path name="compress-offload-playback7 usb-headphones" />
+ <path name="compress-offload-playback7 speaker" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-headphones">
+ <path name="compress-offload-playback7 headphones" />
+ <path name="compress-offload-playback7 speaker" />
+ </path>
+
+ <path name="compress-offload-playback8">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 hdmi">
+ <ctl name="HDMI Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback8 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-hdmi">
+ <path name="compress-offload-playback8 hdmi" />
+ <path name="compress-offload-playback8 speaker" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-display-port">
+ <path name="compress-offload-playback8 display-port" />
+ <path name="compress-offload-playback8 speaker" />
+ </path>
+
+ <path name="compress-offload-playback8 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-usb-headphones">
+ <path name="compress-offload-playback8 usb-headphones" />
+ <path name="compress-offload-playback8 speaker" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-headphones">
+ <path name="compress-offload-playback8 headphones" />
+ <path name="compress-offload-playback8 speaker" />
+ </path>
+
+ <path name="compress-offload-playback9">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker">
+ <ctl name="PRI_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 hdmi">
+ <ctl name="HDMI Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-offload-playback9 bt-sco" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-hdmi">
+ <path name="compress-offload-playback9 hdmi" />
+ <path name="compress-offload-playback9 speaker" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-display-port">
+ <path name="compress-offload-playback9 display-port" />
+ <path name="compress-offload-playback9 speaker" />
+ </path>
+
+ <path name="compress-offload-playback9 afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-usb-headphones">
+ <path name="compress-offload-playback9 usb-headphones" />
+ <path name="compress-offload-playback9 speaker" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones-44.1">
+ <ctl name="INT0_MI2S_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 headphones-dsd">
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-headphones">
+ <path name="compress-offload-playback9 headphones" />
+ <path name="compress-offload-playback9 speaker" />
+ </path>
+
+ <path name="audio-record">
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record usb-headset-mic">
+ <ctl name="MultiMedia1 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="audio-record bt-sco">
+ <ctl name="MultiMedia1 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="audio-record bt-sco" />
+ </path>
+
+ <path name="audio-record capture-fm">
+ <ctl name="MultiMedia1 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress">
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress bt-sco">
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="audio-record-compress bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="audio-record-compress bt-sco" />
+ </path>
+
+ <path name="audio-record-compress usb-headset-mic">
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record">
+ <ctl name="MultiMedia8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco">
+ <ctl name="MultiMedia8 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="low-latency-record bt-sco" />
+ </path>
+
+ <path name="low-latency-record usb-headset-mic">
+ <ctl name="MultiMedia8 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="low-latency-record capture-fm">
+ <ctl name="MultiMedia8 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="fm-virtual-record capture-fm">
+ <ctl name="MultiMedia2 Mixer SLIM_8_TX" value="1" />
+ </path>
+
+ <path name="play-fm">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="play-fm speaker">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="PRI_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="PRI_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="play-fm headphones">
+ <ctl name="SLIMBUS_8 LOOPBACK Volume" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_8_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink">
+ <ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink bt-sco">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink bt-sco-wb">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink usb-headset-mic">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink afe-proxy">
+ <path name="incall-rec-uplink" />
+ </path>
+
+ <path name="incall-rec-uplink-compress">
+ <ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
+ </path>
+
+ <path name="incall-rec-uplink-compress bt-sco">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress bt-sco-wb">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress usb-headset-mic">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-compress afe-proxy">
+ <path name="incall-rec-uplink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink">
+ <ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
+ </path>
+
+ <path name="incall-rec-downlink bt-sco">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink bt-sco-wb">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink usb-headset-mic">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink afe-proxy">
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-downlink-compress">
+ <ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
+ </path>
+
+ <path name="incall-rec-downlink-compress bt-sco">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress bt-sco-wb">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress usb-headset-mic">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-downlink-compress afe-proxy">
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink">
+ <path name="incall-rec-uplink" />
+ <path name="incall-rec-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink bt-sco">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink bt-sco-wb">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink usb-headset-mic">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink afe-proxy">
+ <path name="incall-rec-uplink-and-downlink" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress">
+ <path name="incall-rec-uplink-compress" />
+ <path name="incall-rec-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress bt-sco">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress bt-sco-wb">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress usb-headset-mic">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="incall-rec-uplink-and-downlink-compress afe-proxy">
+ <path name="incall-rec-uplink-and-downlink-compress" />
+ </path>
+
+ <path name="hfp-sco">
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="1" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="1" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="hfp-sco headphones">
+ <ctl name="HFP_SLIM7_UL_HL Switch" value="1" />
+ <ctl name="INT0_MI2S_RX Port Mixer SLIM_7_TX" value="1" />
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia6" value="1" />
+ <ctl name="MultiMedia6 Mixer INT3_MI2S_TX" value="1" />
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="hfp-sco-wb">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="hfp-sco" />
+ </path>
+
+ <path name="hfp-sco-wb headphones">
+ <ctl name="BT SampleRate" value="KHZ_16" />
+ <path name="hfp-sco headphones" />
+ </path>
+
+ <path name="compress-voip-call">
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call speaker">
+ <ctl name="PRI_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ <ctl name="VOC_EXT_EC MUX" value="PRI_MI2S_TX" />
+ </path>
+
+ <path name="compress-voip-call bt-a2dp">
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+
+ <path name="compress-voip-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer SLIM_7_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="compress-voip-call bt-sco" />
+ </path>
+
+ <path name="compress-voip-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer AFE_PCM_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer INT3_MI2S_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer Voip" value="1" />
+ <ctl name="Voip_Tx Mixer USB_AUDIO_TX_Voip" value="1" />
+ </path>
+
+ <path name="compress-voip-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="compress-voip-call"/>
+ </path>
+
+ <path name="compress-voip-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="compress-voip-call"/>
+ </path>
+
+ <path name="voicemmode1-call">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+ <path name="voicemmode1-call speaker">
+ <ctl name="PRI_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ <ctl name="VOC_EXT_EC MUX" value="PRI_MI2S_TX" />
+ </path>
+ <path name="voicemmode1-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call hdmi">
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer SLIM_7_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="voicemmode1-call bt-sco" />
+ </path>
+
+ <path name="voicemmode1-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer INT3_MI2S_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode1" value="1" />
+ <ctl name="VoiceMMode1_Tx Mixer USB_AUDIO_TX_MMode1" value="1" />
+ </path>
+
+ <path name="voicemmode1-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="voicemmode1-call"/>
+ </path>
+
+ <path name="voicemmode1-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="voicemmode1-call"/>
+ </path>
+
+ <path name="voicemmode2-call">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+ <path name="voicemmode2-call speaker">
+ <ctl name="PRI_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ <ctl name="VOC_EXT_EC MUX" value="PRI_MI2S_TX" />
+ </path>
+ <path name="voicemmode2-call headphones">
+ <ctl name="INT0_MI2S_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call hdmi">
+ <ctl name="HDMI_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call bt-sco">
+ <ctl name="SLIM_7_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer SLIM_7_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="voicemmode2-call bt-sco" />
+ </path>
+
+ <path name="voicemmode2-call afe-proxy">
+ <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer AFE_PCM_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call usb-headphones">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer INT3_MI2S_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call usb-headset">
+ <ctl name="USB_AUDIO_RX_Voice Mixer VoiceMMode2" value="1" />
+ <ctl name="VoiceMMode2_Tx Mixer USB_AUDIO_TX_MMode2" value="1" />
+ </path>
+
+ <path name="voicemmode2-call voice-speaker-vbat">
+ <path name="echo-reference speaker-vbat-mono" />
+ <path name="voicemmode2-call"/>
+ </path>
+
+ <path name="voicemmode2-call voice-speaker-2-vbat">
+ <path name="echo-reference speaker-vbat-mono-2" />
+ <path name="voicemmode2-call"/>
+ </path>
+
+ <path name="spkr-rx-calib">
+ <ctl name="INT4_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+ <path name="spkr-rx-calib speaker">
+ <ctl name="PRI_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+ <path name="spkr-vi-record">
+ </path>
+
+ <!-- These are actual sound device specific mixer settings -->
+ <path name="adc1">
+ <ctl name="ADC1 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC1" />
+ <ctl name="ADC1_INP1 Switch" value="1" />
+ </path>
+
+ <path name="adc2">
+ <ctl name="ADC2 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP2" />
+ </path>
+
+ <path name="adc3">
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC1 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ </path>
+
+ <!-- DMIC numbered from 1 to 4 -->
+ <path name="dmic1">
+ <ctl name="DEC1 MUX" value="DMIC1" />
+ </path>
+
+ <path name="dmic2">
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ </path>
+
+ <path name="dmic3">
+ <ctl name="DEC1 MUX" value="DMIC3" />
+ </path>
+
+ <path name="dmic4">
+ <ctl name="DEC1 MUX" value="DMIC4" />
+ </path>
+
+ <path name="speaker">
+ <!-- ctl name="PowerCtrl" value="1" /-->
+ </path>
+
+ <path name="speaker-mono">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX4 MIX1 INP1" value="RX4" />
+ <ctl name="COMP1 Switch" value="1" />
+ <ctl name="SpkrLeft COMP Switch" value="1" />
+ <ctl name="SpkrLeft BOOST Switch" value="1" />
+ <ctl name="SpkrLeft VISENSE Switch" value="1" />
+ <ctl name="SpkrLeft SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrLeft WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-mono-2">
+ <ctl name="INT4_MI2S_RX Channels" value="One" />
+ <ctl name="RX5 MIX1 INP1" value="RX4" />
+ <ctl name="COMP2 Switch" value="1" />
+ <ctl name="SpkrRight COMP Switch" value="1" />
+ <ctl name="SpkrRight BOOST Switch" value="1" />
+ <ctl name="SpkrRight VISENSE Switch" value="1" />
+ <ctl name="SpkrRight SWR DAC_Port Switch" value="1" />
+ <ctl name="SpkrRight WSA PA Mute" value="0" />
+ </path>
+
+ <path name="speaker-fluid">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="speaker-liquid">
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-vbat-mono">
+ <path name="speaker-mono" />
+ </path>
+
+ <path name="speaker-vbat-mono-2">
+ <path name="speaker-mono-2" />
+ </path>
+
+ <path name="speaker-vbat">
+ <path name="speaker" />
+ </path>
+
+ <path name="sidetone-iir">
+ <ctl name="IIR1 Enable Band1" value="1" />
+ <ctl name="IIR1 Enable Band2" value="1" />
+ <ctl name="IIR1 Enable Band3" value="1" />
+ <ctl name="IIR1 Enable Band4" value="1" />
+ <ctl name="IIR1 Enable Band5" value="1" />
+ </path>
+
+ <path name="sidetone-headphones">
+ <path name="sidetone-iir" />
+ <ctl name="RX1 MIX2 INP1" value="IIR1" />
+ <ctl name="RX2 MIX2 INP1" value="IIR1" />
+ <ctl name="IIR1 INP1 Volume" value="0" />
+ </path>
+
+ <path name="sidetone-handset">
+ <path name="sidetone-iir" />
+ <ctl name="IIR1 INP1 Volume" value="53" />
+ <ctl name="RX1 MIX2 INP1" value="IIR1" />
+ </path>
+
+ <path name="speaker-mic">
+ <path name="adc1" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="speaker-mic-liquid">
+ <path name="dmic2" />
+ </path>
+
+ <path name="speaker-mic-sbc">
+ </path>
+
+ <path name="speaker-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="1" />
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="1" />
+ <path name="speaker" />
+ <ctl name="VI_FEED_TX Channels" value="Two" />
+ <ctl name="INT4_MI2S_RX_VI_FB_STEREO_CH_MUX" value="INT5_MI2S_TX" />
+ </path>
+
+ <path name="voice-speaker-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_1" value="1" />
+ <path name="speaker-mono" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="voice-speaker-2-protected">
+ <ctl name="AIF1_VI_SDW Mixer SPKR_VI_2" value="1" />
+ <path name="speaker-mono-2" />
+ <ctl name="VI_FEED_TX Channels" value="One" />
+ <ctl name="INT4_MI2S_RX_VI_FB_MONO_CH_MUX" value="INT5_MI2S_TX" />
+ <ctl name="INT5 MI2S VI MONO" value="Right" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="vi-feedback">
+ </path>
+
+ <path name="vi-feedback-mono-1">
+ </path>
+
+ <path name="vi-feedback-mono-2">
+ </path>
+
+ <path name="speaker-protected-vbat">
+ <path name="speaker-protected" />
+ </path>
+
+ <path name="voice-speaker-protected-vbat">
+ <path name="voice-speaker-protected" />
+ </path>
+
+ <path name="voice-speaker-2-protected-vbat">
+ <path name="voice-speaker-2-protected" />
+ </path>
+
+ <path name="handset">
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="RDAC2 MUX" value="RX1" />
+ <ctl name="RX1 Digital Volume" value="84" />
+ <ctl name="EAR PA Gain" value="POS_6_DB" />
+ <ctl name="EAR_S" value="Switch" />
+ </path>
+
+ <path name="handset-mic">
+ <path name="adc1" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="secondary-mic">
+ <path name="adc3" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="handset-mic-db">
+ </path>
+
+ <path name="handset-mic-cdp">
+ <path name="adc1" />
+ </path>
+
+ <path name="handset-mic-sbc">
+ </path>
+
+ <path name="three-mic">
+ <ctl name="INT3_MI2S_TX Channels" value="Three" />
+ <ctl name="DEC1 MUX" value="DMIC1" />
+ <ctl name="DEC2 MUX" value="DMIC3" />
+ <ctl name="DEC3 MUX" value="DMIC4" />
+ <ctl name="I2S TX2 INP1" value="DEC3" />
+ </path>
+
+ <path name="anc-handset">
+ </path>
+
+ <path name="headphones">
+ <ctl name="INT0_MI2S_RX Channels" value="Two" />
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="RX2 MIX1 INP1" value="RX2" />
+ <ctl name="RDAC2 MUX" value="RX2" />
+ <ctl name="RX HPH Mode" value="HD2" />
+ <!--ctl name="COMP0 RX1" value="1" /-->
+ <!--ctl name="COMP0 RX2" value="1" /-->
+ <ctl name="HPHL" value="Switch" />
+ <ctl name="HPHR" value="Switch" />
+ </path>
+
+ <path name="headphones-44.1">
+ <path name="headphones" />
+ </path>
+
+ <path name="headphones-ce">
+ <path name="headphones" />
+ <ctl name="RX1 Digital Volume" value="72" />
+ <ctl name="RX2 Digital Volume" value="72" />
+ </path>
+
+ <path name="headphones-no-ce">
+ <path name="headphones" />
+ <ctl name="RX1 Digital Volume" value="81" />
+ <ctl name="RX2 Digital Volume" value="81" />
+ </path>
+
+ <path name="headphones-karaoke">
+ <path name="headphones" />
+ <ctl name="RX1 MIX2 INP1" value="IIR1" />
+ <ctl name="RX2 MIX2 INP1" value="IIR1" />
+ <ctl name="IIR1 INP1 Volume" value="80" />
+ <ctl name="IIR1 INP2 Volume" value="80" />
+ </path>
+
+ <path name="true-native-mode">
+ </path>
+
+ <path name="line">
+ <path name="headphones" />
+ </path>
+
+ <path name="headset-mic">
+ <path name="adc2" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="headset-mic-liquid">
+ <path name="adc2" />
+ </path>
+
+ <path name="voice-handset">
+ <path name="handset" />
+ </path>
+
+ <path name="voice-handset-tmus">
+ <path name="handset" />
+ </path>
+
+ <path name="voice-speaker">
+ <!--ctl name="VOC_EXT_EC MUX" value="PRI_MI2S_TX" /-->
+ <path name="speaker" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="voice-speaker-2">
+ <path name="speaker-mono-2" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="voice-speaker-fluid">
+ <path name="speaker-fluid" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="voice-speaker-mic">
+ <path name="speaker-mic" />
+ </path>
+
+ <path name="voice-speaker-vbat">
+ <path name="speaker-vbat-mono" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="voice-speaker-2-vbat">
+ <path name="speaker-vbat-mono-2" />
+ <ctl name="TFA Profile" value="voice" />
+ </path>
+
+ <path name="voice-headphones">
+ <path name="headphones" />
+ </path>
+
+ <path name="voice-line">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="voice-headset-mic">
+ <path name="headset-mic" />
+ </path>
+
+ <path name="speaker-and-headphones">
+ <path name="headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-headphones-ce">
+ <path name="headphones-ce" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-headphones-no-ce">
+ <path name="headphones-no-ce" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-line">
+ <path name="speaker-and-headphones" />
+ </path>
+
+ <path name="speaker-and-headphones-liquid">
+ <path name="headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="speaker-and-line-liquid">
+ <path name="speaker-and-headphones-liquid" />
+ </path>
+
+ <path name="usb-headphones">
+ </path>
+
+ <path name="usb-headset">
+ </path>
+
+ <path name="afe-proxy">
+ </path>
+
+ <path name="anc-headphones">
+ <path name="headphones" />
+ </path>
+
+ <path name="speaker-and-anc-headphones">
+ <path name="anc-headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="anc-fb-headphones">
+ <path name="anc-headphones" />
+ </path>
+
+ <path name="speaker-and-anc-fb-headphones">
+ <path name="anc-fb-headphones" />
+ <path name="speaker" />
+ </path>
+
+ <path name="voice-anc-headphones">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="voice-anc-fb-headphones">
+ <path name="voice-headphones" />
+ </path>
+
+ <path name="speaker-and-anc-headphones-liquid">
+ <path name="anc-headphones" />
+ </path>
+
+ <path name="hdmi">
+ </path>
+
+ <path name="display-port">
+ </path>
+
+ <path name="speaker-and-usb-headphones">
+ <path name="speaker" />
+ <path name="usb-headphones" />
+ </path>
+
+ <path name="speaker-and-hdmi">
+ <path name="speaker" />
+ <path name="hdmi" />
+ </path>
+
+ <path name="speaker-and-display-port">
+ <path name="speaker" />
+ <path name="display-port" />
+ </path>
+
+ <path name="voice-rec-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="camcorder-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="hdmi-tx">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="bt-sco-headset">
+ </path>
+
+ <path name="bt-sco-mic">
+ </path>
+
+ <path name="bt-sco-headset-wb">
+ </path>
+
+ <path name="bt-sco-mic-wb">
+ </path>
+
+ <path name="usb-headset-mic">
+ </path>
+
+ <path name="capture-fm">
+ </path>
+
+ <path name="aanc-path">
+ </path>
+
+ <path name="aanc-handset-mic">
+ </path>
+
+ <!-- Dual MIC devices -->
+ <path name="handset-dmic-endfire">
+ <path name="adc1" />
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC2 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ </path>
+
+ <path name="speaker-dmic-endfire">
+ <path name="adc1" />
+ <ctl name="ADC3 Volume" value="6" />
+ <ctl name="DEC2 MUX" value="ADC2" />
+ <ctl name="ADC2 MUX" value="INP3" />
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ </path>
+
+ <path name="dmic-endfire">
+ <path name="handset-dmic-endfire" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="dmic-endfire-liquid">
+ <path name="handset-dmic-endfire" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="handset-stereo-dmic-ef">
+ <path name="handset-dmic-endfire" />
+ </path>
+
+ <path name="speaker-stereo-dmic-ef">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="camcorder-dmic">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef-tmus">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-speaker-tmic">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef-echo">
+ <path name="speaker-dmic-endfire" />
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="I2S_RX" />
+ <ctl name="MultiMedia1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="voice-rec-dmic-ef">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-fluence">
+ <path name="dmic-endfire" />
+ </path>
+
+ <path name="handset-stereo-dmic-ef-liquid">
+ <path name="handset-dmic-endfire" />
+ </path>
+
+ <path name="speaker-stereo-dmic-ef-liquid">
+ <path name="speaker-dmic-endfire" />
+ </path>
+
+ <path name="voice-dmic-ef-liquid-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-speaker-dmic-ef-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="voice-rec-dmic-ef-fluence-liquid">
+ <path name="dmic-endfire-liquid" />
+ </path>
+
+ <path name="speaker-dmic-broadside">
+ <ctl name="INT3_MI2S_TX Channels" value="Two" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC3" />
+ </path>
+
+ <path name="dmic-broadside">
+ <path name="speaker-dmic-broadside" />
+ <ctl name="IIR1 INP1 MUX" value="DEC1" />
+ </path>
+
+ <path name="voice-speaker-dmic-broadside">
+ <path name="dmic-broadside" />
+ </path>
+
+ <!-- Quad MIC devices -->
+ <path name="speaker-qmic">
+ <ctl name="INT3_MI2S_TX Channels" value="Four" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ <ctl name="DEC3 MUX" value="DMIC3" />
+ <ctl name="I2S TX2 INP1" value="DEC3" />
+ <ctl name="DEC4 MUX" value="DMIC4" />
+ <ctl name="I2S TX2 INP2" value="DEC4" />
+ </path>
+
+ <path name="speaker-qmic-liquid">
+ </path>
+
+ <path name="voice-speaker-qmic">
+ <path name="speaker-qmic" />
+ </path>
+
+ <path name="quad-mic">
+ <path name="speaker-qmic" />
+ </path>
+
+ <path name="voice-speaker-qmic-liquid">
+ <path name="speaker-qmic-liquid" />
+ </path>
+
+ <path name="quad-mic-liquid">
+ <path name="speaker-qmic-liquid" />
+ </path>
+
+ <!-- TTY devices -->
+
+ <path name="tty-headphones">
+ <ctl name="RX1 MIX1 INP1" value="RX1" />
+ <ctl name="HPHL" value="Switch" />
+ </path>
+
+ <path name="voice-tty-full-headphones">
+ <ctl name="TTY Mode" value="FULL" />
+ <path name="tty-headphones" />
+ </path>
+
+ <path name="voice-tty-vco-headphones">
+ <ctl name="TTY Mode" value="VCO" />
+ <path name="tty-headphones" />
+ </path>
+
+ <path name="voice-tty-hco-handset">
+ <ctl name="TTY Mode" value="HCO" />
+ <path name="handset" />
+ </path>
+
+ <path name="voice-tty-full-headset-mic">
+ <path name="adc2" />
+ </path>
+
+ <path name="voice-tty-hco-headset-mic">
+ <path name="voice-tty-full-headset-mic" />
+ </path>
+
+ <path name="voice-tty-vco-handset-mic">
+ <path name="adc1" />
+ </path>
+
+ <path name="unprocessed-handset-mic">
+ <path name="handset-mic" />
+ </path>
+
+ <path name="unprocessed-mic">
+ <path name="unprocessed-handset-mic" />
+ </path>
+
+ <!-- Added for ADSP testfwk -->
+ <path name="ADSP testfwk">
+ <ctl name="INT0_MI2S_RX_DL_HL Switch" value="1" />
+ </path>
+
+ <path name="bt-a2dp">
+ <ctl name="SLIM7_RX ADM Channels" value="Two" />
+ </path>
+
+ <path name="speaker-and-bt-a2dp">
+ <path name="speaker" />
+ <path name="bt-a2dp" />
+ </path>
+
+ <path name="deep-buffer-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <path name="low-latency-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia5" value="1" />
+ </path>
+
+ <path name="compress-offload-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia4" value="1" />
+ </path>
+
+ <path name="compress-offload-playback2 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia7" value="1" />
+ </path>
+
+ <path name="compress-offload-playback3 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia10" value="1" />
+ </path>
+
+ <path name="compress-offload-playback4 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia11" value="1" />
+ </path>
+
+ <path name="compress-offload-playback5 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia12" value="1" />
+ </path>
+
+ <path name="compress-offload-playback6 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia13" value="1" />
+ </path>
+
+ <path name="compress-offload-playback7 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia14" value="1" />
+ </path>
+
+ <path name="compress-offload-playback8 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia15" value="1" />
+ </path>
+
+ <path name="compress-offload-playback9 bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="audio-ull-playback bt-a2dp">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia8" value="1" />
+ </path>
+
+ <path name="deep-buffer-playback speaker-and-bt-a2dp">
+ <path name="deep-buffer-playback bt-a2dp" />
+ <path name="deep-buffer-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback speaker-and-bt-a2dp">
+ <path name="compress-offload-playback bt-a2dp" />
+ <path name="compress-offload-playback speaker" />
+ </path>
+
+ <path name="low-latency-playback speaker-and-bt-a2dp">
+ <path name="low-latency-playback bt-a2dp" />
+ <path name="low-latency-playback speaker" />
+ </path>
+
+ <path name="compress-offload-playback2 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback2 bt-a2dp" />
+ <path name="compress-offload-playback2 speaker" />
+ </path>
+
+ <path name="compress-offload-playback3 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback3 bt-a2dp" />
+ <path name="compress-offload-playback3 speaker" />
+ </path>
+
+ <path name="compress-offload-playback4 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback4 bt-a2dp" />
+ <path name="compress-offload-playback4 speaker" />
+ </path>
+
+ <path name="compress-offload-playback5 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback5 bt-a2dp" />
+ <path name="compress-offload-playback5 speaker" />
+ </path>
+
+ <path name="compress-offload-playback6 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback6 bt-a2dp" />
+ <path name="compress-offload-playback6 speaker" />
+ </path>
+
+ <path name="compress-offload-playback7 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback7 bt-a2dp" />
+ <path name="compress-offload-playback7 speaker" />
+ </path>
+
+ <path name="compress-offload-playback8 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback8 bt-a2dp" />
+ <path name="compress-offload-playback8 speaker" />
+ </path>
+
+ <path name="compress-offload-playback9 speaker-and-bt-a2dp">
+ <path name="compress-offload-playback9 bt-a2dp" />
+ <path name="compress-offload-playback9 speaker" />
+ </path>
+
+ <path name="audio-ull-playback speaker-and-bt-a2dp">
+ <path name="audio-ull-playback bt-a2dp" />
+ <path name="audio-ull-playback speaker" />
+ </path>
+
+ <path name="mmap-playback">
+ <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback headphones">
+ <ctl name="SLIMBUS_6_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback speaker-and-headphones">
+ <path name="mmap-playback" />
+ <path name="mmap-playback headphones" />
+ </path>
+
+ <path name="mmap-playback bt-sco">
+ <ctl name="SLIMBUS_7_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <path name="mmap-playback bt-sco" />
+ </path>
+
+ <path name="mmap-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia16" value="1" />
+ </path>
+
+ <path name="mmap-record">
+ <ctl name="MultiMedia16 Mixer SLIM_0_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco">
+ <ctl name="MultiMedia16 Mixer SLIM_7_TX" value="1" />
+ </path>
+
+ <path name="mmap-record bt-sco-wb">
+ <ctl name="BT SampleRate RX" value="KHZ_16" />
+ <ctl name="BT SampleRate TX" value="KHZ_16" />
+ <ctl name="AUX PCM SampleRate" value="16000" />
+ <path name="mmap-record bt-sco" />
+ </path>
+
+ <path name="mmap-record capture-fm">
+ <ctl name="MultiMedia16 Mixer TERT_MI2S_TX" value="1" />
+ </path>
+
+ <path name="mmap-record usb-headset-mic">
+ <ctl name="MultiMedia16 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+ <path name="hifi-playback display-port">
+ <ctl name="DISPLAY_PORT Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="hifi-playback afe-proxy">
+ <ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="hifi-playback usb-headset">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="hifi-playback usb-headphones">
+ <ctl name="USB_AUDIO_RX Audio Mixer MultiMedia2" value="1" />
+ </path>
+
+ <path name="hifi-record usb-headset-mic">
+ <ctl name="MultiMedia2 Mixer USB_AUDIO_TX" value="1" />
+ </path>
+
+</mixer>
diff --git a/audio/sound_trigger_mixer_paths.xml b/audio/sound_trigger_mixer_paths.xml
new file mode 100644
index 0000000..7619e26
--- /dev/null
+++ b/audio/sound_trigger_mixer_paths.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--- Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. -->
+<!--- -->
+<!--- Redistribution and use in source and binary forms, with or without -->
+<!--- modification, are permitted provided that the following conditions are -->
+<!--- met: -->
+<!--- * Redistributions of source code must retain the above copyright -->
+<!--- notice, this list of conditions and the following disclaimer. -->
+<!--- * Redistributions in binary form must reproduce the above -->
+<!--- copyright notice, this list of conditions and the following -->
+<!--- disclaimer in the documentation and/or other materials provided -->
+<!--- with the distribution. -->
+<!--- * Neither the name of The Linux Foundation nor the names of its -->
+<!--- contributors may be used to endorse or promote products derived -->
+<!--- from this software without specific prior written permission. -->
+<!--- -->
+<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
+<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
+<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
+<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
+<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
+<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
+<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
+<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
+
+<mixer>
+ <!-- These are the initial mixer settings -->
+ <ctl name="LSM1 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM2 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM3 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM4 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM5 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM6 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM7 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM8 Mixer INT3_MI2S_TX" value="0" />
+ <ctl name="LSM1 Port" value="None" />
+ <ctl name="LSM2 Port" value="None" />
+ <ctl name="LSM3 Port" value="None" />
+ <ctl name="LSM4 Port" value="None" />
+ <ctl name="LSM5 Port" value="None" />
+ <ctl name="LSM6 Port" value="None" />
+ <ctl name="LSM7 Port" value="None" />
+ <ctl name="LSM8 Port" value="None" />
+ <ctl name="INT3_MI2S_TX LSM Function" value="None" />
+ <ctl name="DEC1 MUX" value="ZERO" />
+ <ctl name="DEC2 MUX" value="ZERO" />
+ <ctl name="DEC3 MUX" value="ZERO" />
+ <ctl name="DEC4 MUX" value="ZERO" />
+ <ctl name="I2S TX2 INP1" value="ZERO" />
+ <ctl name="I2S TX2 INP2" value="ZERO" />
+
+ <path name="listen-voice-wakeup-1">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM1 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-2">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM2 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM2 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-3">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM3 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM3 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-4">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM4 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM4 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-5">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM5 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM5 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-6">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM6 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM6 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-7">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM7 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM7 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-8">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM8 Port" value="INT3_MI2S_TX" />
+ <ctl name="LSM8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-1 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM1 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM1 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-2 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM2 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM2 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-3 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM3 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM3 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-4 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM4 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM4 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-5 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM5 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM5 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-6 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM6 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM6 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-7 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM7 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM7 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-voice-wakeup-8 preproc">
+ <ctl name="INT3_MI2S_TX LSM Function" value="SWAUDIO" />
+ <ctl name="LSM8 Port" value="ADM_LSM_TX" />
+ <ctl name="LSM8 Mixer INT3_MI2S_TX" value="1" />
+ </path>
+
+ <path name="listen-ape-handset-mic">
+ <ctl name="DEC1 Volume" value="84" />
+ <ctl name="DEC1 MUX" value="DMIC3" />
+ </path>
+
+ <path name="listen-ape-handset-mic-preproc">
+ <path name="listen-ape-handset-mic"/>
+ </path>
+
+ <path name="listen-ape-handset-qmic">
+ <ctl name="INT3_MI2S_TX Channels" value="Four" />
+ <ctl name="DEC1 MUX" value="DMIC2" />
+ <ctl name="DEC2 MUX" value="DMIC1" />
+ <ctl name="DEC3 MUX" value="DMIC3" />
+ <ctl name="I2S TX2 INP1" value="DEC3" />
+ <ctl name="DEC4 MUX" value="DMIC4" />
+ <ctl name="I2S TX2 INP2" value="DEC4" />
+ </path>
+
+ <path name="echo-reference">
+ <ctl name="AUDIO_REF_EC_UL1 MUX" value="INT4_MI2S_RX"/>
+ <ctl name="EC Reference Channels" value="Two"/>
+ <ctl name="EC Reference Bit Format" value="S16_LE"/>
+ <ctl name="EC Reference SampleRate" value="48000"/>
+ </path>
+
+
+</mixer>
diff --git a/audio/sound_trigger_platform_info.xml b/audio/sound_trigger_platform_info.xml
new file mode 100644
index 0000000..271f99d
--- /dev/null
+++ b/audio/sound_trigger_platform_info.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--- Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. -->
+<!--- -->
+<!--- Redistribution and use in source and binary forms, with or without -->
+<!--- modification, are permitted provided that the following conditions are -->
+<!--- met: -->
+<!--- * Redistributions of source code must retain the above copyright -->
+<!--- notice, this list of conditions and the following disclaimer. -->
+<!--- * Redistributions in binary form must reproduce the above -->
+<!--- copyright notice, this list of conditions and the following -->
+<!--- disclaimer in the documentation and/or other materials provided -->
+<!--- with the distribution. -->
+<!--- * Neither the name of The Linux Foundation nor the names of its -->
+<!--- contributors may be used to endorse or promote products derived -->
+<!--- from this software without specific prior written permission. -->
+<!--- -->
+<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
+<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
+<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
+<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
+<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
+<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
+<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
+<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
+<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
+<sound_trigger_platform_info>
+ <param version="0x0101" /> <!-- this must be the first param -->
+ <common_config>
+ <param max_cpe_sessions="1" />
+ <param max_wdsp_sessions="2" />
+ <param max_ape_sessions="8" />
+ <param enable_failure_detection="false" />
+ <!-- Below backend params must match with port used in mixer path file -->
+ <!-- param used to configure backend sample rate, format and channels -->
+ <param backend_port_name="SLIM_0_TX" />
+ <!-- Param used to match and obtain device backend index -->
+ <param backend_dai_name="SLIMBUS_0_TX" />
+ </common_config>
+ <acdb_ids>
+ <param DEVICE_HANDSET_MIC_APE="100" />
+ <param DEVICE_HANDSET_MIC_CPE="128" />
+ <param DEVICE_HANDSET_MIC_ECPP_CPE="128" />
+ <param DEVICE_HANDSET_MIC_PP_APE="137" />
+ <param DEVICE_HANDSET_QMIC_APE="138" />
+ </acdb_ids>
+ <!-- Multiple sound_model_config tags can be listed, each with unique -->
+ <!-- vendor_uuid. The below tag represents QTI SVA engine sound model -->
+ <!-- configuration. ISV must use their own unique vendor_uuid. -->
+ <sound_model_config>
+ <param vendor_uuid="68ab2d40-e860-11e3-95ef-0002a5d5c51b" />
+ <param execution_type="WDSP" /> <!-- value: "WDSP" "ADSP" "DYNAMIC" -->
+ <param app_type="2" /> <!-- app type used in ACDB -->
+ <param library="libsmwrapper.so" />
+ <param max_cpe_phrases="6" />
+ <param max_cpe_users="3" />
+ <param max_ape_phrases="10" />
+ <param max_ape_users="10" />
+ <!-- Profile specific data which the algorithm can support -->
+ <param sample_rate="16000" />
+ <param bit_width="16" />
+ <param channel_count="1"/>
+ <!-- adm_cfg_profile should match with the one defined under adm_config -->
+ <!-- Set it to NONE if LSM directly connects to AFE -->
+ <param adm_cfg_profile="NONE" />
+ <!-- fluence_type: "FLUENCE", FLUENCE_DMIC", FLUENCE_QMIC" -->
+ <!-- param value is valid when adm_cfg_profile="FLUENCE" -->
+ <param fluence_type="FLUENCE_QMIC" />
+ <gcs_usecase>
+ <param uid="0x1" />
+ <!-- module_id, instance_id, param_id -->
+ <param load_sound_model_ids="0x00012C0D, 0x2, 0x00012C14" />
+ <param confidence_levels_ids="0x00012C0D, 0x2, 0x00012C28" />
+ <param detection_event_ids="0x00012C0D, 0x2, 0x00012C29" />
+ <param read_cmd_ids="0x00020013, 0x2, 0x00020015" />
+ <param read_rsp_ids="0x00020013, 0x2, 0x00020016" />
+ </gcs_usecase>
+ <gcs_usecase>
+ <param uid="0x2" />
+ <param load_sound_model_ids="0x00012C0D, 0x3, 0x00012C14" />
+ <param confidence_levels_ids="0x00012C0D, 0x3, 0x00012C28" />
+ <param detection_event_ids="0x00012C0D, 0x3, 0x00012C29" />
+ <param read_cmd_ids="0x00020013, 0x3, 0x00020015" />
+ <param read_rsp_ids="0x00020013, 0x3, 0x00020016" />
+ </gcs_usecase>
+ <!-- Module and param ids with which the algorithm is integrated
+ in non-graphite firmware (note these must come after gcs params)
+ Extends flexibility to have different ids based on execution mode.
+ valid execution_mode values: "WDSP" "ADSP" -->
+ <lsm_usecase>
+ <param execution_mode="ADSP" />
+ <param load_sound_model_ids="0x00012C1C, 0x00012C14" />
+ <param unload_sound_model_ids="0x00012C1C, 0x00012C15" />
+ <param confidence_levels_ids="0x00012C1C, 0x00012C07" />
+ <param operation_mode_ids="0x00012C1C, 0x00012C02" />
+ <param polling_enable_ids="0x00012C1C, 0x00012C1B" />
+ </lsm_usecase>
+
+ <lsm_usecase>
+ <param execution_mode="WDSP" />
+ <param load_sound_model_ids="0x00012C0D, 0x00012C14" />
+ <param unload_sound_model_ids="0x00012C0D, 0x00012C15" />
+ <param confidence_levels_ids="0x00012C0D, 0x00012C07" />
+ <param operation_mode_ids="0x00012C0D, 0x00012C02" />
+ </lsm_usecase>
+
+ <!-- format: "ADPCM_packet" or "PCM_packet" !-->
+ <!-- transfer_mode: "FTRT" or "RT" -->
+ <!-- kw_duration is in milli seconds. It is valid only for FTRT
+ transfer mode -->
+ <param capture_keyword="PCM_packet, RT, 2000" />
+ <param client_capture_read_delay="2000" />
+ </sound_model_config>
+
+ <!-- Multiple adm_config tags can be listed, each with unique profile name. -->
+ <!-- app_type to match corresponding value from ACDB -->
+ <adm_config>
+ <param adm_cfg_profile="DEFAULT" />
+ <param app_type="69938" />
+ <param sample_rate="16000" />
+ <param bit_width="16" />
+ </adm_config>
+
+ <adm_config>
+ <param adm_cfg_profile="FLUENCE" />
+ <param app_type="69943" />
+ <param sample_rate="16000" />
+ <param bit_width="16" />
+ </adm_config>
+
+ <!-- backend_type tag defines backend type for each device -->
+ <!-- Default value is assumed for devices that are not listed here -->
+ <backend_type>
+ <param DEVICE_HANDSET_MIC_ECPP_CPE="BACKEND_ECPP" />
+ </backend_type>
+</sound_trigger_platform_info>
diff --git a/biometrics/Android.bp b/biometrics/Android.bp
new file mode 100644
index 0000000..dacc3e3
--- /dev/null
+++ b/biometrics/Android.bp
@@ -0,0 +1,34 @@
+//
+// Copyright (C) 2017-2018 The LineageOS 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.
+
+cc_binary {
+ name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660",
+ relative_install_path: "hw",
+ defaults: ["hidl_defaults"],
+ init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc"],
+ srcs: ["service.cpp", "BiometricsFingerprint.cpp"],
+ shared_libs: [
+ "libbase",
+ "libcutils",
+ "libhardware",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "android.hardware.biometrics.fingerprint@2.1",
+ ],
+ proprietary: true,
+}
diff --git a/biometrics/BiometricsFingerprint.cpp b/biometrics/BiometricsFingerprint.cpp
new file mode 100644
index 0000000..42243ab
--- /dev/null
+++ b/biometrics/BiometricsFingerprint.cpp
@@ -0,0 +1,409 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660"
+
+#include <cutils/properties.h>
+
+#include <hardware/hw_auth_token.h>
+
+#include <hardware/hardware.h>
+#include <hardware/fingerprint.h>
+#include "BiometricsFingerprint.h"
+#include "Hardware.h"
+
+#include <inttypes.h>
+#include <unistd.h>
+
+namespace android {
+namespace hardware {
+namespace biometrics {
+namespace fingerprint {
+namespace V2_1 {
+namespace implementation {
+
+// Supported fingerprint HAL version
+static const uint16_t kVersion = HARDWARE_MODULE_API_VERSION(2, 1);
+
+using RequestStatus =
+ android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
+
+BiometricsFingerprint *BiometricsFingerprint::sInstance = nullptr;
+
+BiometricsFingerprint::BiometricsFingerprint() : mClientCallback(nullptr), mDevice(nullptr) {
+ sInstance = this; // keep track of the most recent instance
+ mDevice = openHal();
+ if (!mDevice) {
+ ALOGE("Can't open HAL module");
+ }
+}
+
+BiometricsFingerprint::~BiometricsFingerprint() {
+ ALOGV("~BiometricsFingerprint()");
+ if (mDevice == nullptr) {
+ ALOGE("No valid device");
+ return;
+ }
+ int err;
+ if (0 != (err = mDevice->common.close(
+ reinterpret_cast<hw_device_t*>(mDevice)))) {
+ ALOGE("Can't close fingerprint module, error: %d", err);
+ return;
+ }
+ mDevice = nullptr;
+}
+
+Return<RequestStatus> BiometricsFingerprint::ErrorFilter(int32_t error) {
+ switch(error) {
+ case 0: return RequestStatus::SYS_OK;
+ case -2: return RequestStatus::SYS_ENOENT;
+ case -4: return RequestStatus::SYS_EINTR;
+ case -5: return RequestStatus::SYS_EIO;
+ case -11: return RequestStatus::SYS_EAGAIN;
+ case -12: return RequestStatus::SYS_ENOMEM;
+ case -13: return RequestStatus::SYS_EACCES;
+ case -14: return RequestStatus::SYS_EFAULT;
+ case -16: return RequestStatus::SYS_EBUSY;
+ case -22: return RequestStatus::SYS_EINVAL;
+ case -28: return RequestStatus::SYS_ENOSPC;
+ case -110: return RequestStatus::SYS_ETIMEDOUT;
+ default:
+ ALOGE("An unknown error returned from fingerprint vendor library: %d", error);
+ return RequestStatus::SYS_UNKNOWN;
+ }
+}
+
+// Translate from errors returned by traditional HAL (see fingerprint.h) to
+// HIDL-compliant FingerprintError.
+FingerprintError BiometricsFingerprint::VendorErrorFilter(int32_t error,
+ int32_t* vendorCode) {
+ *vendorCode = 0;
+ switch(error) {
+ case FINGERPRINT_ERROR_HW_UNAVAILABLE:
+ return FingerprintError::ERROR_HW_UNAVAILABLE;
+ case FINGERPRINT_ERROR_UNABLE_TO_PROCESS:
+ return FingerprintError::ERROR_UNABLE_TO_PROCESS;
+ case FINGERPRINT_ERROR_TIMEOUT:
+ return FingerprintError::ERROR_TIMEOUT;
+ case FINGERPRINT_ERROR_NO_SPACE:
+ return FingerprintError::ERROR_NO_SPACE;
+ case FINGERPRINT_ERROR_CANCELED:
+ return FingerprintError::ERROR_CANCELED;
+ case FINGERPRINT_ERROR_UNABLE_TO_REMOVE:
+ return FingerprintError::ERROR_UNABLE_TO_REMOVE;
+ case FINGERPRINT_ERROR_LOCKOUT:
+ return FingerprintError::ERROR_LOCKOUT;
+ default:
+ if (error >= FINGERPRINT_ERROR_VENDOR_BASE) {
+ // vendor specific code.
+ *vendorCode = error - FINGERPRINT_ERROR_VENDOR_BASE;
+ return FingerprintError::ERROR_VENDOR;
+ }
+ }
+ ALOGE("Unknown error from fingerprint vendor library: %d", error);
+ return FingerprintError::ERROR_UNABLE_TO_PROCESS;
+}
+
+// Translate acquired messages returned by traditional HAL (see fingerprint.h)
+// to HIDL-compliant FingerprintAcquiredInfo.
+FingerprintAcquiredInfo BiometricsFingerprint::VendorAcquiredFilter(
+ int32_t info, int32_t* vendorCode) {
+ *vendorCode = 0;
+ switch(info) {
+ case FINGERPRINT_ACQUIRED_GOOD:
+ return FingerprintAcquiredInfo::ACQUIRED_GOOD;
+ case FINGERPRINT_ACQUIRED_PARTIAL:
+ return FingerprintAcquiredInfo::ACQUIRED_PARTIAL;
+ case FINGERPRINT_ACQUIRED_INSUFFICIENT:
+ return FingerprintAcquiredInfo::ACQUIRED_INSUFFICIENT;
+ case FINGERPRINT_ACQUIRED_IMAGER_DIRTY:
+ return FingerprintAcquiredInfo::ACQUIRED_IMAGER_DIRTY;
+ case FINGERPRINT_ACQUIRED_TOO_SLOW:
+ return FingerprintAcquiredInfo::ACQUIRED_TOO_SLOW;
+ case FINGERPRINT_ACQUIRED_TOO_FAST:
+ return FingerprintAcquiredInfo::ACQUIRED_TOO_FAST;
+ default:
+ if (info >= FINGERPRINT_ACQUIRED_VENDOR_BASE) {
+ // vendor specific code.
+ *vendorCode = info - FINGERPRINT_ACQUIRED_VENDOR_BASE;
+ return FingerprintAcquiredInfo::ACQUIRED_VENDOR;
+ }
+ }
+ ALOGE("Unknown acquiredmsg from fingerprint vendor library: %d", info);
+ return FingerprintAcquiredInfo::ACQUIRED_INSUFFICIENT;
+}
+
+Return<uint64_t> BiometricsFingerprint::setNotify(
+ const sp<IBiometricsFingerprintClientCallback>& clientCallback) {
+ std::lock_guard<std::mutex> lock(mClientCallbackMutex);
+ mClientCallback = clientCallback;
+ // This is here because HAL 2.1 doesn't have a way to propagate a
+ // unique token for its driver. Subsequent versions should send a unique
+ // token for each call to setNotify(). This is fine as long as there's only
+ // one fingerprint device on the platform.
+ return reinterpret_cast<uint64_t>(mDevice);
+}
+
+Return<uint64_t> BiometricsFingerprint::preEnroll() {
+ return mDevice->pre_enroll(mDevice);
+}
+
+Return<RequestStatus> BiometricsFingerprint::enroll(const hidl_array<uint8_t, 69>& hat,
+ uint32_t gid, uint32_t timeoutSec) {
+ const hw_auth_token_t* authToken =
+ reinterpret_cast<const hw_auth_token_t*>(hat.data());
+ return ErrorFilter(mDevice->enroll(mDevice, authToken, gid, timeoutSec));
+}
+
+Return<RequestStatus> BiometricsFingerprint::postEnroll() {
+ return ErrorFilter(mDevice->post_enroll(mDevice));
+}
+
+Return<uint64_t> BiometricsFingerprint::getAuthenticatorId() {
+ return mDevice->get_authenticator_id(mDevice);
+}
+
+Return<RequestStatus> BiometricsFingerprint::cancel() {
+ return ErrorFilter(mDevice->cancel(mDevice));
+}
+
+Return<RequestStatus> BiometricsFingerprint::enumerate() {
+ return ErrorFilter(mDevice->enumerate(mDevice));
+}
+
+Return<RequestStatus> BiometricsFingerprint::remove(uint32_t gid, uint32_t fid) {
+ return ErrorFilter(mDevice->remove(mDevice, gid, fid));
+}
+
+Return<RequestStatus> BiometricsFingerprint::setActiveGroup(uint32_t gid,
+ const hidl_string& storePath) {
+ if (storePath.size() >= PATH_MAX || storePath.size() <= 0) {
+ ALOGE("Bad path length: %zd", storePath.size());
+ return RequestStatus::SYS_EINVAL;
+ }
+ if (access(storePath.c_str(), W_OK)) {
+ return RequestStatus::SYS_EINVAL;
+ }
+
+ return ErrorFilter(mDevice->set_active_group(mDevice, gid,
+ storePath.c_str()));
+}
+
+Return<RequestStatus> BiometricsFingerprint::authenticate(uint64_t operationId,
+ uint32_t gid) {
+ return ErrorFilter(mDevice->authenticate(mDevice, operationId, gid));
+}
+
+IBiometricsFingerprint* BiometricsFingerprint::getInstance() {
+ if (!sInstance) {
+ sInstance = new BiometricsFingerprint();
+ }
+ return sInstance;
+}
+
+void setFpVendorProp(const char *fp_vendor) {
+ property_set("persist.vendor.sys.fp.vendor", fp_vendor);
+}
+
+fingerprint_device_t* getDeviceForVendor(const char *class_name)
+{
+ const hw_module_t *hw_module = nullptr;
+ int err;
+
+ if (!strcmp(class_name, "fpc")) {
+ setFpVendorProp("fpc");
+ err = load("/system/vendor/lib64/hw/fingerprint.fpc.so", &hw_module);
+ } else if (!strcmp(class_name, "gdx")) {
+ setFpVendorProp("goodix");
+ err = load("/system/vendor/lib64/hw/fingerprint.goodix.so", &hw_module);
+ } else {
+ setFpVendorProp("none");
+ ALOGE("No fingerprint module class specified.");
+ err = 1;
+ }
+
+ if (err) {
+ ALOGE("Failed to get fingerprint module: class %s, error %d", class_name, err);
+ return nullptr;
+ }
+
+ if (hw_module == nullptr) {
+ ALOGE("No valid fingerprint module: class %s", class_name);
+ return nullptr;
+ }
+
+ fingerprint_module_t const *fp_module =
+ reinterpret_cast<const fingerprint_module_t*>(hw_module);
+
+ if (fp_module->common.methods->open == nullptr) {
+ ALOGE("No valid open method: class %s", class_name);
+ return nullptr;
+ }
+
+ hw_device_t *device = nullptr;
+
+ err = fp_module->common.methods->open(hw_module, nullptr, &device);
+ if (err) {
+ ALOGE("Can't open fingerprint methods, class %s, error: %d", class_name, err);
+ return nullptr;
+ }
+
+ if (kVersion != device->version) {
+ ALOGE("Wrong fingerprint version: expected %d, got %d", kVersion, device->version);
+ return nullptr;
+ }
+
+ fingerprint_device_t *fp_device =
+ reinterpret_cast<fingerprint_device_t*>(device);
+
+ ALOGI("Loaded fingerprint module: class %s", class_name);
+ return fp_device;
+}
+
+fingerprint_device_t* getFingerprintDevice()
+{
+ fingerprint_device_t *fp_device;
+ char class_name[PROPERTY_VALUE_MAX];
+
+ property_get("ro.boot.fpsensor",
+ class_name, NULL);
+
+ fp_device = getDeviceForVendor(class_name);
+ if (fp_device == nullptr) {
+ ALOGE("Failed to load %s fingerprint module", class_name);
+ } else {
+ return fp_device;
+ }
+ return nullptr;
+}
+
+fingerprint_device_t* BiometricsFingerprint::openHal() {
+ int err;
+
+ fingerprint_device_t *fp_device;
+ fp_device = getFingerprintDevice();
+ if (fp_device == nullptr) {
+ return nullptr;
+ }
+
+ if (0 != (err =
+ fp_device->set_notify(fp_device, BiometricsFingerprint::notify))) {
+ ALOGE("Can't register fingerprint module callback, error: %d", err);
+ return nullptr;
+ }
+
+ return fp_device;
+}
+
+void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
+ BiometricsFingerprint* thisPtr = static_cast<BiometricsFingerprint*>(
+ BiometricsFingerprint::getInstance());
+ std::lock_guard<std::mutex> lock(thisPtr->mClientCallbackMutex);
+ if (thisPtr == nullptr || thisPtr->mClientCallback == nullptr) {
+ ALOGE("Receiving callbacks before the client callback is registered.");
+ return;
+ }
+ const uint64_t devId = reinterpret_cast<uint64_t>(thisPtr->mDevice);
+ switch (msg->type) {
+ case FINGERPRINT_ERROR: {
+ int32_t vendorCode = 0;
+ FingerprintError result = VendorErrorFilter(msg->data.error, &vendorCode);
+ ALOGD("onError(%d)", result);
+ if (!thisPtr->mClientCallback->onError(devId, result, vendorCode).isOk()) {
+ ALOGE("failed to invoke fingerprint onError callback");
+ }
+ }
+ break;
+ case FINGERPRINT_ACQUIRED: {
+ int32_t vendorCode = 0;
+ FingerprintAcquiredInfo result =
+ VendorAcquiredFilter(msg->data.acquired.acquired_info, &vendorCode);
+ ALOGD("onAcquired(%d)", result);
+ if (!thisPtr->mClientCallback->onAcquired(devId, result, vendorCode).isOk()) {
+ ALOGE("failed to invoke fingerprint onAcquired callback");
+ }
+ }
+ break;
+ case FINGERPRINT_TEMPLATE_ENROLLING:
+ ALOGD("onEnrollResult(fid=%d, gid=%d, rem=%d)",
+ msg->data.enroll.finger.fid,
+ msg->data.enroll.finger.gid,
+ msg->data.enroll.samples_remaining);
+ if (!thisPtr->mClientCallback->onEnrollResult(devId,
+ msg->data.enroll.finger.fid,
+ msg->data.enroll.finger.gid,
+ msg->data.enroll.samples_remaining).isOk()) {
+ ALOGE("failed to invoke fingerprint onEnrollResult callback");
+ }
+ break;
+ case FINGERPRINT_TEMPLATE_REMOVED:
+ ALOGD("onRemove(fid=%d, gid=%d, rem=%d)",
+ msg->data.removed.finger.fid,
+ msg->data.removed.finger.gid,
+ msg->data.removed.remaining_templates);
+ if (!thisPtr->mClientCallback->onRemoved(devId,
+ msg->data.removed.finger.fid,
+ msg->data.removed.finger.gid,
+ msg->data.removed.remaining_templates).isOk()) {
+ ALOGE("failed to invoke fingerprint onRemoved callback");
+ }
+ break;
+ case FINGERPRINT_AUTHENTICATED:
+ if (msg->data.authenticated.finger.fid != 0) {
+ ALOGD("onAuthenticated(fid=%d, gid=%d)",
+ msg->data.authenticated.finger.fid,
+ msg->data.authenticated.finger.gid);
+ const uint8_t* hat =
+ reinterpret_cast<const uint8_t *>(&msg->data.authenticated.hat);
+ const hidl_vec<uint8_t> token(
+ std::vector<uint8_t>(hat, hat + sizeof(msg->data.authenticated.hat)));
+ if (!thisPtr->mClientCallback->onAuthenticated(devId,
+ msg->data.authenticated.finger.fid,
+ msg->data.authenticated.finger.gid,
+ token).isOk()) {
+ ALOGE("failed to invoke fingerprint onAuthenticated callback");
+ }
+ } else {
+ // Not a recognized fingerprint
+ if (!thisPtr->mClientCallback->onAuthenticated(devId,
+ msg->data.authenticated.finger.fid,
+ msg->data.authenticated.finger.gid,
+ hidl_vec<uint8_t>()).isOk()) {
+ ALOGE("failed to invoke fingerprint onAuthenticated callback");
+ }
+ }
+ break;
+ case FINGERPRINT_TEMPLATE_ENUMERATING:
+ ALOGD("onEnumerate(fid=%d, gid=%d, rem=%d)",
+ msg->data.enumerated.finger.fid,
+ msg->data.enumerated.finger.gid,
+ msg->data.enumerated.remaining_templates);
+ if (!thisPtr->mClientCallback->onEnumerate(devId,
+ msg->data.enumerated.finger.fid,
+ msg->data.enumerated.finger.gid,
+ msg->data.enumerated.remaining_templates).isOk()) {
+ ALOGE("failed to invoke fingerprint onEnumerate callback");
+ }
+ break;
+ }
+}
+
+} // namespace implementation
+} // namespace V2_1
+} // namespace fingerprint
+} // namespace biometrics
+} // namespace hardware
+} // namespace android
diff --git a/biometrics/BiometricsFingerprint.h b/biometrics/BiometricsFingerprint.h
new file mode 100644
index 0000000..6d64e3d
--- /dev/null
+++ b/biometrics/BiometricsFingerprint.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 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.
+ * 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.
+ */
+
+#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
+#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
+
+#include <log/log.h>
+#include <android/log.h>
+#include <hardware/hardware.h>
+#include <hardware/fingerprint.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
+
+namespace android {
+namespace hardware {
+namespace biometrics {
+namespace fingerprint {
+namespace V2_1 {
+namespace implementation {
+
+using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
+using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
+using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::hidl_string;
+using ::android::sp;
+
+struct BiometricsFingerprint : public IBiometricsFingerprint {
+public:
+ BiometricsFingerprint();
+ ~BiometricsFingerprint();
+
+ // Method to wrap legacy HAL with BiometricsFingerprint class
+ static IBiometricsFingerprint* getInstance();
+
+ // Methods from ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint follow.
+ Return<uint64_t> setNotify(const sp<IBiometricsFingerprintClientCallback>& clientCallback) override;
+ Return<uint64_t> preEnroll() override;
+ Return<RequestStatus> enroll(const hidl_array<uint8_t, 69>& hat, uint32_t gid, uint32_t timeoutSec) override;
+ Return<RequestStatus> postEnroll() override;
+ Return<uint64_t> getAuthenticatorId() override;
+ Return<RequestStatus> cancel() override;
+ Return<RequestStatus> enumerate() override;
+ Return<RequestStatus> remove(uint32_t gid, uint32_t fid) override;
+ Return<RequestStatus> setActiveGroup(uint32_t gid, const hidl_string& storePath) override;
+ Return<RequestStatus> authenticate(uint64_t operationId, uint32_t gid) override;
+
+private:
+ static fingerprint_device_t* openHal();
+ static void notify(const fingerprint_msg_t *msg); /* Static callback for legacy HAL implementation */
+ static Return<RequestStatus> ErrorFilter(int32_t error);
+ static FingerprintError VendorErrorFilter(int32_t error, int32_t* vendorCode);
+ static FingerprintAcquiredInfo VendorAcquiredFilter(int32_t error, int32_t* vendorCode);
+ static BiometricsFingerprint* sInstance;
+
+ std::mutex mClientCallbackMutex;
+ sp<IBiometricsFingerprintClientCallback> mClientCallback;
+ fingerprint_device_t *mDevice;
+};
+
+} // namespace implementation
+} // namespace V2_1
+} // namespace fingerprint
+} // namespace biometrics
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H
diff --git a/biometrics/Hardware.h b/biometrics/Hardware.h
new file mode 100644
index 0000000..90a6067
--- /dev/null
+++ b/biometrics/Hardware.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2017, The LineageOS 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.
+ */
+#ifndef _CUSTOM_HARDWARE_H
+#define _CUSTOM_HARDWARE_H
+
+#include <dlfcn.h>
+
+#include <cutils/log.h>
+
+#include <utils/threads.h>
+
+static union {
+ const fingerprint_module_t *module;
+ const hw_module_t *hw_module;
+} vendor;
+
+static int load(const char *path,
+ const struct hw_module_t **pHmi)
+{
+ int status = 0;
+ void *handle = NULL;
+ struct hw_module_t *hmi = NULL;
+
+ ALOGE("Opening vendor module from : %s", path);
+ handle = dlopen(path, RTLD_NOW);
+ if (handle == NULL) {
+ status = -EINVAL;
+ goto done;
+ }
+
+ hmi = (struct hw_module_t *)dlsym(handle,
+ HAL_MODULE_INFO_SYM_AS_STR);
+ if (hmi == NULL) {
+ status = -EINVAL;
+ goto done;
+ }
+
+ hmi->dso = handle;
+
+done:
+ *pHmi = hmi;
+
+ return status;
+}
+#endif /* _CUSTOM_HARDWARE_H */
diff --git a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc b/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc
new file mode 100644
index 0000000..00312b3
--- /dev/null
+++ b/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc
@@ -0,0 +1,25 @@
+on boot
+ # Fingerprint
+ chown system system /dev/goodix_fp
+ chmod 0644 /dev/goodix_fp
+ chown system system /sys/devices/soc/soc:fpc1020/fingerdown_wait
+ chmod 0220 /sys/devices/soc/soc:fpc1020/fingerdown_wait
+ chown system system /sys/devices/soc/soc:fpc1020/irq
+ chmod 0660 /sys/devices/soc/soc:fpc1020/irq
+ chown system system /sys/devices/soc/soc:fpc1020/hw_reset
+ chmod 0660 /sys/devices/soc/soc:fpc1020/hw_reset
+ chown system system /sys/devices/soc/soc:fpc1020/wakeup_enable
+ chmod 0660 /sys/devices/soc/soc:fpc1020/wakeup_enable
+
+service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660
+ class late_start
+ user system
+ group system input
+
+service vendor.goodix_script /vendor/bin/init.goodix.sh
+ class late_start
+ user system
+ disabled
+
+on property:ro.boot.fpsensor=gdx
+ start vendor.goodix_script
diff --git a/biometrics/service.cpp b/biometrics/service.cpp
new file mode 100644
index 0000000..bf833b3
--- /dev/null
+++ b/biometrics/service.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660"
+
+#include <android/log.h>
+#include <hidl/HidlTransportSupport.h>
+
+#include "BiometricsFingerprint.h"
+
+// libhwbinder:
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+
+// Generated HIDL files
+using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
+using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint;
+
+int main() {
+ android::sp<IBiometricsFingerprint> service = BiometricsFingerprint::getInstance();
+
+ if (service == nullptr) {
+ ALOGE("Instance of BiometricsFingerprint is null");
+ return 1;
+ }
+
+ configureRpcThreadpool(1, true /*callerWillJoin*/);
+
+ android::status_t status = service->registerAsService();
+ if (status != android::OK) {
+ ALOGE("Cannot register BiometricsFingerprint service");
+ return 1;
+ }
+
+ joinRpcThreadpool();
+
+ return 0; // should never get here
+}
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 0000000..c14932d
--- /dev/null
+++ b/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Not a Contribution, Apache license notifications and license are retained
+ * for attribution purposes only.
+ *
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+// Disables read remote device feature
+#define MAX_ACL_CONNECTIONS 16
+#define MAX_L2CAP_CHANNELS 16
+#define BLE_VND_INCLUDED TRUE
+// skips conn update at conn completion
+#define BT_CLEAN_TURN_ON_DISABLED 1
+
+/* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */
+#define AVDT_NUM_SEPS 12
+#endif
diff --git a/compatibility_matrix.xml b/compatibility_matrix.xml
new file mode 100644
index 0000000..fa043d9
--- /dev/null
+++ b/compatibility_matrix.xml
@@ -0,0 +1,115 @@
+<!-- Copyright (c) 2017, The Linux Foundation. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<compatibility-matrix version="1.0" type="device">
+ <hal format="hidl" optional="false">
+ <name>android.frameworks.displayservice</name>
+ <version>1.0</version>
+ <interface>
+ <name>IDisplayService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.frameworks.schedulerservice</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISchedulingPolicyService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.frameworks.sensorservice</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISensorManager</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.composer</name>
+ <version>2.1</version>
+ <interface>
+ <name>IComposer</name>
+ <instance>vr</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.health</name>
+ <version>2.0</version>
+ <interface>
+ <name>IHealth</name>
+ <instance>backup</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hidl.allocator</name>
+ <version>1.0</version>
+ <interface>
+ <name>IAllocator</name>
+ <instance>ashmem</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hidl.manager</name>
+ <version>1.1</version>
+ <interface>
+ <name>IServiceManager</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hidl.memory</name>
+ <version>1.0</version>
+ <interface>
+ <name>IMapper</name>
+ <instance>ashmem</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hidl.token</name>
+ <version>1.0</version>
+ <interface>
+ <name>ITokenManager</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.system.net.netd</name>
+ <version>1.1</version>
+ <interface>
+ <name>INetd</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.system.wifi.keystore</name>
+ <version>1.0</version>
+ <interface>
+ <name>IKeystore</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</compatibility-matrix>
diff --git a/config.fs b/config.fs
new file mode 100644
index 0000000..fc7e06a
--- /dev/null
+++ b/config.fs
@@ -0,0 +1,191 @@
+[AID_VENDOR_QCOM_DIAG]
+value:2950
+
+[AID_VENDOR_QTI_DIAG]
+value:2901
+
+[AID_VENDOR_QDSS]
+value:2902
+
+[AID_VENDOR_RFS]
+value:2951
+
+[AID_VENDOR_RFS_SHARED]
+value:2952
+
+[AID_VENDOR_ADPL_ODL]
+value:2905
+
+[vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: BLOCK_SUSPEND NET_ADMIN
+
+[system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: BLOCK_SUSPEND NET_ADMIN
+
+[system/bin/cnss-daemon]
+mode: 0755
+user: AID_BLUETOOTH
+group: AID_BLUETOOTH
+caps: NET_BIND_SERVICE
+
+[vendor/bin/pm-service]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/pm-service]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/bin/pm-service]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/pd-mapper]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/pd-mapper]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/bin/pd-mapper]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/imsdatadaemon]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/imsdatadaemon]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/ims_rtp_daemon]
+mode: 0755
+user: AID_SYSTEM
+group: AID_RADIO
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/ims_rtp_daemon]
+mode: 0755
+user: AID_SYSTEM
+group: AID_RADIO
+caps: NET_BIND_SERVICE
+
+[vendor/bin/imsrcsd]
+mode: 0755
+user: AID_SYSTEM
+group: AID_RADIO
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[system/vendor/bin/imsrcsd]
+mode: 0755
+user: AID_SYSTEM
+group: AID_RADIO
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[vendor/bin/cnd]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN
+
+[system/vendor/bin/cnd]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN
+
+[vendor/bin/sensors.qti]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/sensors.qti]
+mode: 0755
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: NET_BIND_SERVICE
+
+[vendor/bin/slim_daemon]
+mode: 0755
+user: AID_GPS
+group: AID_GPS
+caps: NET_BIND_SERVICE
+
+[system/vendor/bin/slim_daemon]
+mode: 0755
+user: AID_GPS
+group: AID_GPS
+caps: NET_BIND_SERVICE
+
+[vendor/bin/loc_launcher]
+mode: 0755
+user: AID_GPS
+group: AID_GPS
+caps: SETUID SETGID
+
+[vendor/bin/xtwifi-client]
+mode: 0755
+user: AID_GPS
+group: AID_GPS
+caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
+
+[firmware/]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[firmware/image/*]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[vendor/firmware_mnt/image/*]
+mode: 0771
+user: AID_ROOT
+group: AID_SYSTEM
+caps: 0
+
+[bt_firmware/]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[persist/]
+mode: 0771
+user: AID_SYSTEM
+group: AID_SYSTEM
+caps: 0
+
+[dsp/]
+mode: 0771
+user: AID_MEDIA
+group: AID_MEDIA
+caps: 0
diff --git a/configs/gps/flp.conf b/configs/gps/flp.conf
new file mode 100644
index 0000000..dae3b82
--- /dev/null
+++ b/configs/gps/flp.conf
@@ -0,0 +1,91 @@
+###################################
+##### FLP settings #####
+###################################
+
+###################################
+# FLP BATCHING SIZE
+###################################
+# The number of batched locations
+# requested to modem. The desired number
+# defined below may not be satisfied, as
+# the modem can only return the number
+# of batched locations that can be allocated,
+# which is limited by memory. The default
+# batch size defined as 20 as below.
+BATCH_SIZE=20
+
+# The number of batched locations
+# requested to modem for outdoor
+# trip batching. The desired number
+# defined below may not be satisfied, as
+# the modem can only return the number
+# of batched locations that can be allocated,
+# which is limited by memory. The default
+# trip batch size defined as 600 as below.
+OUTDOOR_TRIP_BATCH_SIZE=600
+
+###################################
+# FLP BATCHING SESSION TIMEOUT
+###################################
+# Duration with which batch session timeout
+# happens in milliseconds. If not specified
+# or set to zero, batching session timeout
+# defaults to 20 seconds by the modem.
+# BATCH_SESSION_TIMEOUT=20000
+
+###################################
+# FLP CAPABILITIES BIT MASK
+###################################
+# GEOFENCE = 0x01
+# BATCHING = 0x02
+# default = GEOFENCE | BATCHING
+CAPABILITIES=0x03
+
+###################################
+# FLP BATCHING ACCURACY
+###################################
+# Set to one of the defined values below
+# to define the accuracy of batching.
+# If not specified, accuracy defaults
+# to LOW.
+# FLP BATCHING ACCURACY values:
+# Low accuracy = 0
+# Medium accuracy = 1
+# High accuracy = 2
+ACCURACY=1
+
+###################################
+# FLP GEOFENCE RESPONSIVENESS
+###################################
+# If set to one of the defined values below,
+# it will override the responsiveness for
+# FLP geofence, which implements the fused
+# location API. If not set to a value defined
+# below, which is default, it will not
+# override the responsivness.
+# FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE Values:
+# 1: LOW responsiveness
+# 2: MEDIUM responsiveness
+# 3: HIGH responsiveness
+FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE = 0
+
+####################################
+# By default APPS must support LB only if modem support
+# LB 1.5 and above. This parameter adds an exception
+# for targets where modem only supports LB 1.0.
+# This might be useful for primarily outdoor devices.
+# 0: MUST NOT ALLOW LB IF MODEM ONLY SUPPORTS
+# LB 1.0
+# 1: ALLOW LB IF MODEM ONLY SUPPORTS LB 1.0
+####################################
+ALLOW_LB_1_0 = 0
+
+####################################
+# By default if network fixes are not sensor assisted
+# these fixes must be dropped. This parameter adds an exception
+# for targets where there is no PDR and we still want to
+# report out network fixes
+# 0: MUST NOT ALLOW NETWORK FIXES
+# 1: ALLOW NETWORK FIXES
+####################################
+ALLOW_NETWORK_FIXES = 0
diff --git a/configs/gps/gps.conf b/configs/gps/gps.conf
new file mode 100644
index 0000000..54036df
--- /dev/null
+++ b/configs/gps/gps.conf
@@ -0,0 +1,212 @@
+#Uncommenting these urls would only enable
+#the power up auto injection and force injection(test case).
+#XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
+#XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
+#XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
+
+#Version check for XTRA
+#DISABLE = 0
+#AUTO = 1
+#XTRA2 = 2
+#XTRA3 = 3
+XTRA_VERSION_CHECK=0
+
+XTRA_TEST_ENABLED = 1
+XTRA_THROTTLE_ENABLED = 0
+
+
+
+# Error Estimate
+# _SET = 1
+# _CLEAR = 0
+ERR_ESTIMATE=0
+
+#NTP server
+NTP_SERVER=time.izatcloud.net
+
+#XTRA CA path
+XTRA_CA_PATH=/system/etc/security/cacerts
+
+# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
+# 4 - Debug, 5 - Verbose
+# If DEBUG_LEVEL is commented, Android's logging levels will be used
+DEBUG_LEVEL = 5
+
+# Intermediate position report, 1=enable, 0=disable
+INTERMEDIATE_POS=0
+
+# Below bit mask configures how GPS functionalities
+# should be locked when user turns off GPS on Settings
+# Set bit 0x1 if MO GPS functionalities are to be locked
+# Set bit 0x2 if NI GPS functionalities are to be locked
+# default - non is locked for backward compatibility
+#GPS_LOCK = 0
+
+# supl version 1.0
+SUPL_VER=0x20000
+
+# Emergency SUPL, 1=enable, 0=disable
+#SUPL_ES=0
+
+#Choose PDN for Emergency SUPL
+#1 - Use emergency PDN
+#0 - Use regular SUPL PDN for Emergency SUPL
+USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0
+
+#SUPL_MODE is a bit mask set in config.xml per carrier by default.
+#If it is uncommented here, this value will overwrite the value from
+#config.xml.
+#MSA=0X2
+#MSB=0X1
+#SUPL_MODE=
+
+# GPS Capabilities bit mask
+# SCHEDULING = 0x01
+# MSB = 0x02
+# MSA = 0x04
+# ON_DEMAND_TIME = 0x10
+# GEOFENCE = 0x20
+# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
+CAPABILITIES=0x37
+
+# Accuracy threshold for intermediate positions
+# less accurate positions are ignored, 0 for passing all positions
+# ACCURACY_THRES=5000
+
+################################
+##### AGPS server settings #####
+################################
+
+# FOR SUPL SUPPORT, set the following
+SUPL_HOST=supl.qxwz.com
+SUPL_PORT=7275
+
+# FOR C2K PDE SUPPORT, set the following
+# C2K_HOST=c2k.pde.com or IP
+# C2K_PORT=1234
+
+# Bitmask of slots that are available
+# for write/install to, where 1s indicate writable,
+# and the default value is 0 where no slots
+# are writable. For example, AGPS_CERT_WRITABLE_MASK
+# of b1000001010 makes 3 slots available
+# and the remaining 7 slots unwritable.
+#AGPS_CERT_WRITABLE_MASK=0
+
+####################################
+# LTE Positioning Profile Settings
+####################################
+# 0: Enable RRLP on LTE(Default)
+# 1: Enable LPP_User_Plane on LTE
+# 2: Enable LPP_Control_Plane
+# 3: Enable both LPP_User_Plane and LPP_Control_Plane
+LPP_PROFILE = 3
+
+################################
+# EXTRA SETTINGS
+################################
+# NMEA provider (1=Modem Processor, 0=Application Processor)
+NMEA_PROVIDER=0
+# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
+SGLTE_TARGET=0
+
+##################################################
+# Select Positioning Protocol on A-GLONASS system
+##################################################
+# 0x1: RRC CPlane
+# 0x2: RRLP UPlane
+# 0x4: LLP Uplane
+A_GLONASS_POS_PROTOCOL_SELECT = 0
+
+##################################################
+# Select technology for LPPe Control Plane
+##################################################
+# 0x1: DBH for LPPe CP
+# 0x2: WLAN AP Measurements for LPPe CP
+# 0x4: SRN AP measurement for CP
+# 0x8: Sensor Barometer Measurement LPPe CP
+LPPE_CP_TECHNOLOGY = 0
+
+##################################################
+# Select technology for LPPe User Plane
+##################################################
+# 0x1: DBH for LPPe UP
+# 0x2: WLAN AP Measurements for LPPe UP
+# 0x4: SRN AP measurement for UP
+# 0x8: Sensor Barometer Measurement LPPe UP
+LPPE_UP_TECHNOLOGY = 0
+
+##################################################
+# AGPS_CONFIG_INJECT
+##################################################
+# enable/disable injection of AGPS configurations:
+# SUPL_VER
+# SUPL_HOST
+# SUPL_PORT
+# C2K_HOST
+# C2K_PORT
+# LPP_PROFILE
+# A_GLONASS_POS_PROTOCOL_SELECT
+# 0: disable
+# 1: enable
+AGPS_CONFIG_INJECT = 1
+
+##################################################
+# GNSS settings for automotive use cases
+# Configurations in following section are
+# specific to automotive use cases, others
+# please do not change, keep the default values
+##################################################
+
+# AP Coarse Timestamp Uncertainty
+##################################################
+# default : 10
+# AP time stamp uncertainty, until GNSS receiver
+# is able to acquire better timing information
+AP_TIMESTAMP_UNCERTAINTY = 10
+
+##################################################
+# QDR engine availability status
+##################################################
+# 0 : NO QDR (default)
+# 1 : QDR enabled
+# This settings enables QDR Configuration for
+# automotive use case, if enabled then
+# DR_AP_Service needs to be enabled in izat.conf
+#EXTERNAL_DR_ENABLED = 0
+
+#####################################
+# DR_SYNC Pulse Availability
+#####################################
+# 0 : DR_SYNC pulse not available (default)
+# 1 : DR_SYNC pulse available
+# This configuration enables the driver to make use
+# of PPS events generated by DR_SYNC pulse
+# Standard Linux PPS driver needs to be enabled
+DR_SYNC_ENABLED = 0
+
+#####################################
+# PPS Device name
+#####################################
+PPS_DEVICENAME = /dev/pps0
+
+#####################################
+# AP Clock Accuracy
+#####################################
+# Quality of APPS processor clock (in PPM).
+# Value specified is used for calculation of
+# APPS time stamp uncertainty
+AP_CLOCK_PPM = 100
+
+#####################################
+# MAX ms difference to detect missing pulse
+#####################################
+# Specifies time threshold in ms to validate any missing PPS pulses
+MISSING_PULSE_TIME_DELTA = 900
+
+#####################################
+# Propagation time uncertainty
+#####################################
+# This settings enables time uncertainty propagation
+# logic incase of missing PPS pulse
+PROPAGATION_TIME_UNCERTAINTY = 1
diff --git a/configs/gps/izat.conf b/configs/gps/izat.conf
new file mode 100644
index 0000000..79d779c
--- /dev/null
+++ b/configs/gps/izat.conf
@@ -0,0 +1,279 @@
+#########################################
+# Log verbosity control for izat modules
+#########################################
+# OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5
+IZAT_DEBUG_LEVEL = 5
+
+##################################################
+# Select WIFI Wait Timeout value in seconds for SUPL
+##################################################
+WIFI_WAIT_TIMEOUT_SELECT = 0
+
+##################################################
+# Time interval of injecting SRN scan data to modem
+# time in seconds.
+# Note: recommended value is between 1-5 sec
+##################################################
+LPPE_SRN_DATA_SCAN_INJECT_TIME=2
+
+################################
+# NLP Settings
+################################
+# NLP_MODE 1: OSNLP Only, 2: QNP Only, 3: Combo, 4: QNP preferred
+# For Automotive products, please use NLP_MODE = 4 only.
+# NLP_TOLERANCE_TIME_FIRST: Time in ms used in Combo mode
+# to determine how much Tolerance for first position
+# NLP_TOLERANCE_TIME_AFTER: Time in ms used in Combo mode
+# to determine how much Tolerance for positions after first
+# NLP_THRESHOLD: Sets how many failures needed before
+# switching preferred NLP in Combo mode
+# NLP_ACCURACY_MULTIPLE: Determines how far off the accuracy
+# must be, in multiples, between two NLP location reports to
+# be considered much worse accuracy. Used in switching logic
+# NLP COMBO MODE USES QNP WITH NO EULA CONSENT: Determines
+# whether or not to still send network location requests to
+# QNP when the EULA is not consented to by the user. QNP can
+# still return ZPP locations or injected locations even
+# without EULA consent, but the uncertainty can be high.
+# QNP preferred mode prefers QNP when there is EULA consent,
+# otherwise OSNLP is used.
+NLP_MODE = 1
+NLP_MODE_EMERGENCY = 2
+NLP_TOLERANCE_TIME_FIRST = 5000
+NLP_TOLERANCE_TIME_AFTER = 20000
+NLP_THRESHOLD = 3
+NLP_ACCURACY_MULTIPLE = 2
+NLP_COMBO_MODE_USES_QNP_WITH_NO_EULA_CONSENT = 1
+
+#########################################
+# NLP PACKAGE AND ACTION SETTINGS
+#########################################
+# OSNLP_PACKAGE/OSNLP_ACTION: name/action of default NLP package
+#OSNLP_PACKAGE = com.google.android.gms
+#OSNLP_ACTION = com.android.location.service.v3.NetworkLocationProvider
+# REGION_OSNLP_PACKAGE/REGION_OSNLP_ACTION:
+# These two values will be used as alternative
+# for particular region where default NLP is not functional.
+#REGION_OSNLP_PACKAGE = com.baidu.map.location
+#REGION_OSNLP_ACTION = com.android.location.service.v3.NetworkLocationProvider
+
+# Threshold period for ZPP triggers
+ZPP_TRIGGER_THRESHOLD=60000
+# Accuracy threshold for ZPP positions
+# less accurate positions are ignored
+ZPP_ACCURACY_THRESHOLD=20000
+
+###################################
+# GEOFENCE SERVICES
+###################################
+# If set to one of the defined values below, it will override
+# the responsiveness for geofence services, which implements
+# the Proximity Alert API. If not set to a value defined below,
+# which is default, it will not override the responsivness.
+# The geofence HAL API is unaffected by this value.
+# GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE Values:
+# 1: LOW responsiveness
+# 2: MEDIUM responsiveness
+# 3: HIGH responsiveness
+GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE = 0
+
+#####################################
+#GTP Opt-In app
+#####################################
+
+#GTP privacy policy version url
+#https support is required
+GTP_PRIVACY_VERSION_URL = https://info.izatcloud.net/privacy/version.html
+
+#GTP privacy policy version download retry interval
+#unit is second. default is 86400
+GTP_PRIVACY_RETRY_INTERVAL = 86400
+
+#####################################
+# IZAT PREMIUM FEATURE SETTINGS
+#####################################
+#Possible states of a feature:
+#DISABLED
+#BASIC
+#PREMIUM
+
+#GTP_CELL_PROC valid options:
+# AP
+# MODEM
+GTP_CELL_PROC=MODEM
+
+#GTP_CELL valid modes:
+# DISABLED
+# BASIC
+GTP_CELL=DISABLED
+
+#GTP_WIFI valid modes:
+# DISABLED
+# BASIC
+GTP_WIFI=DISABLED
+
+#GTP_WAA valid modes:
+# DISABLED
+# BASIC
+GTP_WAA=DISABLED
+
+#SAP valid modes:
+# DISABLED
+# BASIC
+# PREMIUM
+SAP=PREMIUM
+
+#ODCPI valid modes:
+#DISABLED
+#BASIC
+ODCPI=BASIC
+
+#FREE_WIFI_SCAN_INJECT valid modes:
+#DISABLED
+#BASIC
+FREE_WIFI_SCAN_INJECT=BASIC
+
+#SUPL_WIFI valid modes:
+#DISABLED
+#BASIC
+SUPL_WIFI=BASIC
+
+#WIFI_SUPPLICANT_INFO valid modes:
+#DISABLED
+#BASIC
+WIFI_SUPPLICANT_INFO=BASIC
+
+#####################################
+# Location process launcher settings
+#####################################
+
+# DO NOT MODIFY
+# Modifying below attributes without
+# caution can have serious implications.
+
+#Values for PROCESS_STATE:
+# ENABLED
+# DISABLED
+
+#PROCESS_NAME
+# Name of the executable file.
+
+#FEATURE MASKS:
+# GTP-WIFI 0X03
+# GTP-AP-CELL 0X0c
+# GTP-MP-CELL 0xc00
+# GTP-WAA 0X300
+# SAP 0Xc0
+# ODCPI 0x1000
+# FREE_WIFI_SCAN_INJECT 0x2000
+# SUPL_WIFI 0x4000
+# WIFI_SUPPLICANT_INFO 0x8000
+
+#Values for PLATFORMS can be:
+#1. Any valid values obtained from ro.board.platform separated by single space. For example: msm8960 msm8226
+#2. 'all' or 'all exclude' -> for All platforms
+#3. 'all exclude XXXX' -> All platforms exclude XXXX. For example: all exclude msm8937
+
+#Values for BASEBAND can be:
+#1. Any valid values obtained from ro.baseband separated by single space. For example: sglte sglte2
+#2. 'all' or 'all exclude' -> for all basebands
+#3. 'all exclude XXXX' -> All basebands exclude XXXX. For example: all exclude sglte
+PROCESS_NAME=DR_AP_Service
+PROCESS_ARGUMENT=
+PROCESS_STATE=DISABLED
+PROCESS_GROUPS=gps diag
+PREMIUM_FEATURE=0
+IZAT_FEATURE_MASK=0
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=automotive
+
+#Valyes for LEAN_TARGETS can be:
+#ENABLED -> if this process is supposed to run on lean and mean targets
+#DISABLED -> if this process is to be disabled on lean and mean targets
+PROCESS_NAME=garden_app
+PROCESS_ARGUMENT=-l 0 -T 1
+PROCESS_STATE=DISABLED
+PROCESS_GROUPS=gps diag
+PREMIUM_FEATURE=0
+IZAT_FEATURE_MASK=0
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=automotive
+
+PROCESS_NAME=gpsone_daemon
+PROCESS_ARGUMENT=
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=inet
+PREMIUM_FEATURE=0
+IZAT_FEATURE_MASK=0
+PLATFORMS=msm7630_fusion
+BASEBAND=svlte2a sglte sglte2
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=all
+
+PROCESS_NAME=lowi-server
+PROCESS_ARGUMENT=
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=gps net_admin wifi inet qcom_diag
+PREMIUM_FEATURE=0
+IZAT_FEATURE_MASK=0xf303
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=all
+
+PROCESS_NAME=xtwifi-inet-agent
+PROCESS_ARGUMENT=
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=inet gps
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0xf0f
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=all
+
+PROCESS_NAME=xtwifi-client
+PROCESS_ARGUMENT=
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=wifi inet gps system oem_2952
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0xf0f
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=all
+
+PROCESS_NAME=slim_daemon
+PROCESS_ARGUMENT=
+PROCESS_STATE=DISABLED
+PROCESS_GROUPS=gps qcom_diag can
+PREMIUM_FEATURE=1
+IZAT_FEATURE_MASK=0xf0
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=all
+
+PROCESS_NAME=xtra-daemon
+PROCESS_ARGUMENT=
+PROCESS_STATE=ENABLED
+PROCESS_GROUPS=inet gps system
+PREMIUM_FEATURE=0
+IZAT_FEATURE_MASK=0
+PLATFORMS=all
+BASEBAND=all
+LEAN_TARGETS=DISABLED
+HARDWARE_TYPE=all
+
+##################################################
+# The name of process which launches XTRA client.
+# Default process name in software which launches
+# XTRA client is system-server. Uncomment the below
+# to set the desired process which will start the
+# XTRA client.
+##################################################
+# XC20_LAUNCH_PROCESS_NAME=garden_app
diff --git a/configs/gps/lowi.conf b/configs/gps/lowi.conf
new file mode 100644
index 0000000..5fdca39
--- /dev/null
+++ b/configs/gps/lowi.conf
@@ -0,0 +1,21 @@
+#*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
+#
+# LOWI Config file
+#
+# GENERAL DESCRIPTION
+# This file contains the config params for LOWI
+#
+# Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
+# All Rights Reserved.
+# Qualcomm Atheros Confidential and Proprietary.
+#
+# Export of this technology or software is regulated by the U.S. Government.
+# Diversion contrary to U.S. law prohibited.
+#=============================================================================*/
+
+# X86 ONLY - UBUNTU:
+# Copy this file in the same directory where the executable is
+
+# Log level
+# EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100
+LOWI_LOG_LEVEL = 3
diff --git a/configs/gps/sap.conf b/configs/gps/sap.conf
new file mode 100644
index 0000000..eb21f01
--- /dev/null
+++ b/configs/gps/sap.conf
@@ -0,0 +1,70 @@
+################################
+# Sensor Settings
+################################
+#The following parameters are optional.
+#Internal defaults support MEMS sensors
+#native to most handset devices.
+#Device specific sensor characterization
+#for improved performance is possible as
+#described in SAP application notes.
+#GYRO_BIAS_RANDOM_WALK=
+#ACCEL_RANDOM_WALK_SPECTRAL_DENSITY=
+#ANGLE_RANDOM_WALK_SPECTRAL_DENSITY=
+#RATE_RANDOM_WALK_SPECTRAL_DENSITY=
+#VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY=
+
+# Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0)
+# used in loc_eng_reinit
+SENSOR_ACCEL_BATCHES_PER_SEC=2
+SENSOR_ACCEL_SAMPLES_PER_BATCH=5
+SENSOR_GYRO_BATCHES_PER_SEC=2
+SENSOR_GYRO_SAMPLES_PER_BATCH=5
+# Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0)
+SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4
+SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25
+SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4
+SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25
+
+# Sensor Control Mode (0=AUTO, 1=FORCE_ON)
+# used in loc_eng_reinit
+SENSOR_CONTROL_MODE=0
+
+# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable)
+# used in loc_eng_reinit
+SENSOR_USAGE=0
+
+# Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK)
+SENSOR_PROVIDER=1
+
+# Bit mask used to define which sensor algorithms are used.
+# Setting each bit has the following definition:
+# 0x1 - DISABLE_INS_POSITIONING_FILTER
+# 0x0 - ENABLE_INS_POSITIONING_FILTER
+SENSOR_ALGORITHM_CONFIG_MASK=0x1
+
+#Vehicle Network Provider configuration
+
+#Service configuration strings
+#The number before colon in VN_X items defines version of the format of the rest of the string
+#VN_ACCEL_CFG=0:5
+#VN_GYRO_CFG=0:5.5
+#VN_ODOMETRY_CFG=0:2,4.5
+VN_ACCEL_CFG=1:128,0,12,0.0048828125,12,12,0.0048828125,24,12,0.0048828125
+VN_GYRO_CFG=1:129,0,16,0.00006103515625,16,16,0.00006103515625,32,16,0.00006103515625
+VN_ODOMETRY_CFG=1:130,0,1,5,6,32
+VN_SPEED_CFG=1:131,5,8,1,2,3,1,1,9,2,14,2
+VN_DWS_CFG=1:132,5,8,1,2,3,1,1,5,2,7,2,9,2,11,2,13,2,15,2,17,2,19,2
+VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8
+
+#Procesors clock ratio: AP and CAN bus microcontroller
+VN_PROC_CLOCK_RATIO=1.93165618815148
+
+# Time source used by Sensor HAL
+# Setting this value controls accuracy of location sensor services.
+# 0 - Unknown
+# 1 - CLOCK_BOOTTIME
+# 2 - CLOCK_MONOTONIC
+# 3 - CLOCK_REALTIME
+# 4 - CLOCK_BOOTTIME using Alarm timer interface
+NDK_PROVIDER_TIME_SOURCE=1
+
diff --git a/configs/gps/xtwifi.conf b/configs/gps/xtwifi.conf
new file mode 100644
index 0000000..583dd3f
--- /dev/null
+++ b/configs/gps/xtwifi.conf
@@ -0,0 +1,75 @@
+#GTP AP Project client core config file
+#
+#GENERAL DESCRIPTION
+#This is used by client core
+#
+#Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
+#All Rights Reserved.
+#Qualcomm Atheros Confidential and Proprietary.
+#
+#Copyright (c) 2017 Qualcomm Technologies, Inc.
+#All Rights Reserved.
+#Confidential and Proprietary - Qualcomm Technologies, Inc.
+
+##############################################################################
+# non-IOT devices configuration items #
+# For non-IOT devices, configure below configuration items #
+# according to the app note: 80-NK218-1 and remove the configuration items #
+# in section of "IOT devices configuration items". #
+##############################################################################
+
+# ASN URI v2 to be used by some GTP AP modules that
+# need to run with ASN URI v2 protocol.
+XT_SERVER_ROOT_URL = https://gtp1.izatcloud.net:443/uds/v2
+
+# ASN URI v3 to be used by GTP AP modules that
+# can support ASN URI v3 protocol.
+XT_SERVER_ROOT_URL_V3 = https://gtp1.izatcloud.net:443/uds/v3
+
+# size, in bytes, of the cache on device
+SIZE_BYTE_TOTAL_CACHE = 5000000
+
+##############################################################################
+# IOT devices configuration items #
+# For IOT devices, configure below configuration items #
+# according to the app note and remove the configuration items in section of #
+# "non-IOT devices configuration items". #
+##############################################################################
+
+# ASN URI v3 to be used by GTP AP modules that
+# can support ASN URI v3 protocol.
+# XT_SERVER_ROOT_URL_V3 = https://gtpma1.izatcloud.net:443/uds/v3
+
+# 1: default mode, where mobile downloads tiles and partitions
+# 2: mode for memory and bandwidth limited devices, where mobile
+# downloads AP list and cell list
+# GTP_AP_MODE = 2
+
+# 1: MP cell features relies on GTP AP for either download or upload
+# 0: MP cell features does not rely on GTP AP
+# GTP_AP_NEEDED_BY_MP_CELL = 1
+
+##############################################################################
+# Configuration items applicable to all devices #
+##############################################################################
+
+# Log verbosity control for most of the GTP WiFi system, including native and
+# Java componenets
+# OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5, ALL = 100
+DEBUG_GLOBAL_LOG_LEVEL = 2
+
+# this is used at the server side to distinguish uploads from different maker/model
+# default "Qualcomm"
+OEM_ID_IN_REQUEST_TO_SERVER = "Qualcomm"
+
+# this is used at the server side to distinguish uploads from different maker/model
+# default "UNKNOWN"
+MODEL_ID_IN_REQUEST_TO_SERVER = "UNKNOWN"
+
+##############################################################################
+# Qualcomm Network Location Provider config #
+##############################################################################
+
+# Accuracy Threshold for NLP position. Position exceeds thsi threshold will be filtered out.
+# Default is 25000 meters.
+LARGE_ACCURACY_THRESHOLD_TO_FILTER_NLP_POSITION = 25000
diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml
new file mode 100644
index 0000000..578ed79
--- /dev/null
+++ b/configs/media_codecs.xml
@@ -0,0 +1,381 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright (C) 2012-2017 The Linux Foundation. All rights reserved.
+ Not a contribution.
+
+ Copyright (C) 2012-2013 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+
+<!--
+ Non secure decoder capabilities for sdm660
+ __________ _________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | hevc | 3840 2160 30 100 972000 |
+ | h264 | 3840 2160 30 100 972000 |
+ | h263 | 864 480 30 2 48600 |
+ | mpeg4 | 1920 1088 60 60 489600 |
+ | mpeg2 | 1920 1088 30 40 244800 |
+ | vc1 | 1920 1088 60 60 489600 |
+ | vp8 | 3840 2160 30 100 972000 |
+ | vp9 | 3840 2160 30 100 972000 |
+ | divx3 | 720 480 30 2 40500 |
+ | div4/5/6 | 1920 1088 30 10 244800 |
+ |__________|_________________________________________|
+
+ sdm660 secure decoder capabilities
+ ______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 3840 2160 30 35 972000 |
+ | hevc | 3840 2160 30 35 972000 |
+ | VP9 | 3840 2160 30 35 979200 |
+ | vc1 | 1920 1088 30 20 489600 |
+ | mpeg2 | 1920 1088 30 20 244800 |
+ |__________|_________________________________________|
+-->
+
+<!--
+ Encoder capabilities for sdm660
+ ____________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | hevc | 3840 2160 30 100 972000 |
+ | h264 | 3840 2160 30 100 972000 |
+ | h263 | 864 480 30 2 48600 |
+ | mpeg4 | 1920 1088 30 40 244800 |
+ | vp8 | 1920 1088 30 40 244800 |
+ |____________________________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <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="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="intra-refresh" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <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="96x96" max="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="intra-refresh" />
+ <Feature name="can-swap-width-height" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" >
+ <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="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" >
+ <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="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
+ <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="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="intra-refresh" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <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="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" />
+ </MediaCodec>
+ <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="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="244800" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vc1" type="video/x-ms-wmv" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vc1.secure" type="video/x-ms-wmv" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="489600" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="7" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.divx" type="video/divx" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="244800" />
+ <Limit name="bitrate" range="1-10000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.divx311" type="video/divx311" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="720x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="40500" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.divx4" type="video/divx4" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="244800" />
+ <Limit name="bitrate" range="1-10000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <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="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="64x64" max="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="979200" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ </MediaCodec>
+ <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="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ </MediaCodec>
+ <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="3840x2160" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="1" max="972000" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video.xml" />
+</MediaCodecs>
diff --git a/configs/media_codecs_performance.xml b/configs/media_codecs_performance.xml
new file mode 100644
index 0000000..907bdfa
--- /dev/null
+++ b/configs/media_codecs_performance.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
+
+ Not a Contribution.
+
+ Copyright 2015 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.
+-->
+
+<MediaCodecs>
+ <Encoders>
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="294-294" />
+ <Limit name="measured-frame-rate-720x480" range="80-90" />
+ <Limit name="measured-frame-rate-1280x720" range="32-37" />
+ <Limit name="measured-frame-rate-1920x1080" range="40-40" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-1280x720" range="49-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="16-45" />
+ <Limit name="measured-frame-rate-3840x2160" range="6-24" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="400-400" />
+ <Limit name="measured-frame-rate-352x288" range="261-261" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="351-351" />
+ <Limit name="measured-frame-rate-352x288" range="263-263" />
+ <Limit name="measured-frame-rate-640x480" range="144-144" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="312-312" />
+ <Limit name="measured-frame-rate-640x360" range="175-174" />
+ <Limit name="measured-frame-rate-1280x720" range="30-40" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-25" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="185-185" />
+ <Limit name="measured-frame-rate-720x480" range="87-87" />
+ <Limit name="measured-frame-rate-1280x720" range="45-45" />
+ <Limit name="measured-frame-rate-1920x1080" range="28-28" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="354-354" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="385-385" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="100-120" />
+ <Limit name="measured-frame-rate-640x360" range="45-50" />
+ <Limit name="measured-frame-rate-1280x720" range="30-35" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="140-180" />
+ <Limit name="measured-frame-rate-640x360" range="45-60" />
+ <Limit name="measured-frame-rate-1280x720" range="12-15" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="409-409" />
+ <Limit name="measured-frame-rate-720x480" range="239-239" />
+ <Limit name="measured-frame-rate-1280x720" range="197-197" />
+ <Limit name="measured-frame-rate-1920x1088" range="88-88" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="434-434" />
+ <Limit name="measured-frame-rate-720x480" range="338-338" />
+ <Limit name="measured-frame-rate-1280x720" range="241-241" />
+ <Limit name="measured-frame-rate-1920x1088" range="90-100" />
+ <Limit name="measured-frame-rate-3840x2160" range="30-40" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="400-400" />
+ <Limit name="measured-frame-rate-352x288" range="323-323" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="635-650" />
+ <Limit name="measured-frame-rate-480x360" range="268-268" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x240" range="430-430" />
+ <Limit name="measured-frame-rate-640x360" range="303-303" />
+ <Limit name="measured-frame-rate-1280x720" range="389-389" />
+ <Limit name="measured-frame-rate-1920x1080" range="199-199" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x240" range="250-270" />
+ <Limit name="measured-frame-rate-640x360" range="230-250" />
+ <Limit name="measured-frame-rate-1280x720" range="190-210" />
+ <Limit name="measured-frame-rate-1920x1080" range="170-190" />
+ <Limit name="measured-frame-rate-3840x2160" range="48-48" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="320-350" />
+ <Limit name="measured-frame-rate-720x480" range="100-130" />
+ <Limit name="measured-frame-rate-1280x720" range="50-58" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="458-458" />
+ <Limit name="measured-frame-rate-640x360" range="210-215" />
+ <Limit name="measured-frame-rate-720x480" range="120-125" />
+ <Limit name="measured-frame-rate-1280x720" range="70-85" />
+ <Limit name="measured-frame-rate-1920x1080" range="27-29" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="190-210" />
+ <Limit name="measured-frame-rate-352x288" range="170-182" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x240" range="575-580" />
+ <Limit name="measured-frame-rate-640x360" range="200-220" />
+ <Limit name="measured-frame-rate-1280x720" range="45-55" />
+ <Limit name="measured-frame-rate-1920x1080" range="18-22" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x240" range="580-604" />
+ <Limit name="measured-frame-rate-640x360" range="180-185" />
+ <Limit name="measured-frame-rate-1280x720" range="88-92" />
+ <Limit name="measured-frame-rate-1920x1080" range="47-52" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.decoder" update="true">
+ <Type name="video/mp4v-es">
+ <Limit name="measured-frame-rate-176x144" range="380-400" />
+ </Type>
+ </MediaCodec>
+ </Decoders>
+</MediaCodecs>
+
diff --git a/configs/media_profiles_V1_0.xml b/configs/media_profiles_V1_0.xml
new file mode 100644
index 0000000..f656ced
--- /dev/null
+++ b/configs/media_profiles_V1_0.xml
@@ -0,0 +1,1173 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2012-2016 The Linux Foundation. All rights reserved.
+ Not a contribution.
+
+ Copyright (C) 2010 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.
+-->
+<!DOCTYPE MediaSettings SYSTEM "/system/etc/media_profiles_V1_0.dtd">
+<!--
+ This file is used to declare the multimedia profiles and capabilities
+ on an android-powered device.
+-->
+<MediaSettings>
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <!-- Back Camera -->
+ <CamcorderProfiles cameraId="0">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="2160p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <!-- CAMCORDER_QUALITY_HIGH_SPEED_LOW/720P : 720p@240fps; 42.0 Mbps -->
+ <EncoderProfile quality="highspeedlow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="1280"
+ height="720"
+ frameRate="240" />
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <!-- CAMCORDER_QUALITY_HIGH_SPEED_HIGH/1080P : 1080p@120fps; 42.0 Mbps -->
+ <EncoderProfile quality="highspeedhigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="1920"
+ height="1080"
+ frameRate="120" />
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="highspeed720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="1280"
+ height="720"
+ frameRate="240" />
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="1920"
+ height="1080"
+ frameRate="120" />
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+ <!-- Front Camera -->
+ <CamcorderProfiles cameraId="1">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <!-- TIMELAPSE profiles for front camera -->
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="5000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="8000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+ <!-- Logical Camera -->
+ <CamcorderProfiles cameraId="2">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="2160p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+ <!-- Logical Camera -->
+ <CamcorderProfiles cameraId="3">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="2160p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="42000000"
+ width="3840"
+ height="2160"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
+ If a codec is not enabled, it is invisible to the applications
+ In other words, the applications won't be able to use the codec
+ or query the capabilities of the codec at all if it is disabled
+ -->
+ <VideoEncoderCap name="h264" enabled="true"
+ minBitRate="64000" maxBitRate="42000000"
+ minFrameWidth="176" maxFrameWidth="4096"
+ minFrameHeight="144" maxFrameHeight="2160"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="1920" maxHFRFrameHeight="1080"
+ maxHFRMode="60" />
+
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="64000" maxBitRate="2000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="64000" maxBitRate="40000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1088"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <VideoEncoderCap name="hevc" enabled="true"
+ minBitRate="64000" maxBitRate="100000000"
+ minFrameWidth="176" maxFrameWidth="4096"
+ minFrameHeight="144" maxFrameHeight="2160"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <AudioEncoderCap name="aac" enabled="true"
+ minBitRate="8000" maxBitRate="96000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="6" />
+
+ <AudioEncoderCap name="heaac" enabled="true"
+ minBitRate="8000" maxBitRate="64000"
+ minSampleRate="16000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="aaceld" enabled="true"
+ minBitRate="16000" maxBitRate="192000"
+ minSampleRate="16000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrwb" enabled="true"
+ minBitRate="6600" maxBitRate="23850"
+ minSampleRate="16000" maxSampleRate="16000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
+
+ <!--
+ FIXME:
+ We do not check decoder capabilities at present
+ At present, we only check whether windows media is visible
+ for TEST applications. For other applications, we do
+ not perform any checks at all.
+ -->
+ <VideoDecoderCap name="wmv" enabled="true"/>
+ <AudioDecoderCap name="wma" enabled="true"/>
+
+ <!--
+ The VideoEditor Capability configuration:
+ - maxInputFrameWidth: maximum video width of imported video clip.
+ - maxInputFrameHeight: maximum video height of imported video clip.
+ - maxOutputFrameWidth: maximum video width of exported video clip.
+ - maxOutputFrameHeight: maximum video height of exported video clip.
+ - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
+ used to limit the amount of memory for prefetched YUV frames.
+ For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
+ frames) memory.
+ -->
+ <VideoEditorCap maxInputFrameWidth="1280"
+ maxInputFrameHeight="720" maxOutputFrameWidth="1280"
+ maxOutputFrameHeight="720" maxPrefetchYUVFrames="10"/>
+ <!--
+ The VideoEditor Export codec profile and level values
+ correspond to the values in OMX_Video.h.
+ E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
+ and level 4096 means OMX_VIDEO_AVCLevel41.
+ Please note that the values are in decimal.
+ These values are for video encoder.
+ -->
+ <!--
+ Codec = h.264, Baseline profile, level 4.0
+ -->
+ <ExportVideoProfile name="h264" profile= "1" level="2048"/>
+ <!--
+ Codec = h.263, Baseline profile, level 70
+ -->
+ <ExportVideoProfile name="h263" profile= "1" level="128"/>
+ <!--
+ Codec = mpeg4, Simple profile, level 5
+ -->
+ <ExportVideoProfile name="m4v" profile= "1" level="128"/>
+</MediaSettings>
diff --git a/configs/msm_irqbalance.conf b/configs/msm_irqbalance.conf
new file mode 100644
index 0000000..981ba23
--- /dev/null
+++ b/configs/msm_irqbalance.conf
@@ -0,0 +1,5 @@
+PRIO=1,1,0,0,0,0,0,0
+#arch_timer, arm-pmu, arch_mem_timer, glink-smem-rpm, mpm irqs
+IGNORED_IRQ=19,22,39,200,203
+#WLAN irqs
+BLACKLIST_IRQ=446,455,456
diff --git a/configs/privapp-permissions-qti.xml b/configs/privapp-permissions-qti.xml
new file mode 100644
index 0000000..d100bc1
--- /dev/null
+++ b/configs/privapp-permissions-qti.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (c) 2017, The Linux Foundation. All rights reserved.
+
+ ~ Not a Contribution.
+-->
+
+<!--
+ ~ 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
+ -->
+
+<!--
+This XML file declares which signature|privileged permissions should be
+granted to privileged applications on QTI devices.
+It allows additional grants on top of privapp-permissions-platform.xml
+-->
+
+<permissions>
+ <privapp-permissions package="com.quicinc.cne.CNEService">
+ <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+ <permission name="android.permission.PACKET_KEEPALIVE_OFFLOAD"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.qti.dpmserviceapp">
+ <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.qualcomm.qcrilmsgtunnel">
+ <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+ </privapp-permissions>
+ <privapp-permissions package="se.dirac.acs">
+ <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="org.codeaurora.dialer">
+ <permission name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"/>
+ <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
+ <permission name="android.permission.GET_ACCOUNTS_PRIVILEGED"/>
+ <permission name="android.permission.MODIFY_PHONE_STATE"/>
+ <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
+ <permission name="android.permission.STATUS_BAR"/>
+ <permission name="android.permission.STOP_APP_SWITCHES"/>
+ <permission name="com.android.voicemail.permission.READ_VOICEMAIL"/>
+ <permission name="com.android.voicemail.permission.WRITE_VOICEMAIL"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="org.codeaurora.qti.qtiNetworkApp">
+ <permission name="android.permission.MODIFY_PHONE_STATE"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="org.codeaurora.ims">
+ <permission name="android.permission.READ_PRECISE_PHONE_STATE"/>
+ <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+ <permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.android.soundrecorder">
+ <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+ <permission name="android.permission.CAPTURE_AUDIO_OUTPUT"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.quicinc.voice.activation">
+ <permission name="android.permission.CAPTURE_AUDIO_HOTWORD"/>
+ <permission name="android.permission.MANAGE_SOUND_TRIGGER"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.qualcomm.qti.carrierswitch">
+ <permission name="android.permission.REBOOT"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.qualcomm.wfd.service">
+ <permission name="android.permission.READ_FRAME_BUFFER"/>
+ <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.android.mms">
+ <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
+ <permission name="android.permission.WRITE_APN_SETTINGS"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="org.codeaurora.bluetooth.batestapp">
+ <permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
+ <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="org.codeaurora.snapcam">
+ <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
+ <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
+ </privapp-permissions>
+
+ <privapp-permissions package="com.qualcomm.qti.callenhancement">
+ <permission name="android.permission.RECORD_AUDIO" />
+ <permission name="android.permission.CAPTURE_AUDIO_OUTPUT" />
+ <permission name="android.permission.READ_EXTERNAL_STORAGE" />
+ <permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <permission name="android.permission.READ_BLOCKED_NUMBERS" />
+ <permission name="android.permission.VIBRATE" />
+ </privapp-permissions>
+</permissions>
diff --git a/configs/public.libraries.txt b/configs/public.libraries.txt
new file mode 100644
index 0000000..19c3863
--- /dev/null
+++ b/configs/public.libraries.txt
@@ -0,0 +1,3 @@
+libqti-perfd-client.so
+libadsprpc.so
+libOpenCL.so
diff --git a/configs/qti_whitelist.xml b/configs/qti_whitelist.xml
new file mode 100644
index 0000000..798b876
--- /dev/null
+++ b/configs/qti_whitelist.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+
+<!--
+/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+-->
+
+<config>
+ <!-- These are telephony components that need to freely run in the background -->
+ <allow-in-power-save package="com.qualcomm.atfwd" />
+ <allow-in-power-save package="com.qualcomm.qti.telephonyservice" />
+ <allow-in-power-save package="com.qualcomm.qcrilmsgtunnel" />
+ <allow-in-power-save package="com.qualcomm.qti.ims" />
+ <allow-in-power-save package="com.qualcomm.qti.radioconfiginterface" />
+ <allow-in-power-save package="com.qualcomm.simcontacts" />
+ <allow-in-power-save package="com.qualcomm.qti.autoregistration" />
+ <allow-in-power-save package="com.qualcomm.qti.server.wigigapp" />
+ <allow-in-power-save package="com.qualcomm.qti.StatsPollManager" />
+ <allow-in-power-save package="com.qualcomm.qti.gsma.services.nfc" />
+</config>
diff --git a/configs/sec_config b/configs/sec_config
new file mode 100644
index 0000000..9f8fe23
--- /dev/null
+++ b/configs/sec_config
@@ -0,0 +1,330 @@
+/* IPC Security Config */
+/* <GPS QMI Service ID - 16>:<GPS QMI Instance ID - all instances>:<Client Group ID> */
+16:4294967295:1000:1021:1026
+/* <QDMA QMI Service ID - 75>:<QDMA QMI Instance ID - all instances>:<Client Group ID> */
+75:4294967295:1000:1001:3006
+/* <LOWI QMI Service ID - 38>:<LOWI QMI Instance ID - all instances>:<Client Group ID> */
+56:4294967295:1021
+/* Allow SS CTL service to be used by system and net_raw processes */
+43:4294967295:1000:3004
+/* <UIMHTTP QMI Service ID - 16>:<UIMHTTP QMI Instance ID - all instances>:<Client Group ID> */
+71:4294967295:1001
+/* <UIMRMT QMI Service ID - 16>:<UIMRMT QMI Instance ID - all instances>:<Client Group ID> */
+50:4294967295:1001
+/* QMI-SLIM service permitted to gps and net_raw */
+55:4294967295:1021
+/* Allow Sensor services to be used by sensor process */
+256:4294967295:1000:1006:1013:1021:1047:3011
+257:4294967295:1000:1006:1013:1021:1047:3011
+258:4294967295:1000:1006:1013:1021:1047:3011
+259:4294967295:1000:1006:1013:1021:1047:3011
+260:4294967295:1000:1006:1013:1021:1047:3011
+261:4294967295:1000:1006:1013:1021:1047:3011
+262:4294967295:1000:1006:1013:1021:1047:3011
+263:4294967295:1000:1006:1013:1021:1047:3011
+264:4294967295:1000:1006:1013:1021:1047:3011
+265:4294967295:1000:1006:1013:1021:1047:3011
+266:4294967295:1000:1006:1013:1021:1047:3011
+267:4294967295:1000:1006:1013:1021:1047:3011
+268:4294967295:1000:1006:1013:1021:1047:3011
+269:4294967295:1000:1006:1013:1021:1047:3011
+270:4294967295:1000:1006:1013:1021:1047:3011
+271:4294967295:1000:1006:1013:1021:1047:3011
+272:4294967295:1000:1006:1013:1021:1047:3011
+273:4294967295:1000:1006:1013:1021:1047:3011
+274:4294967295:1000:1006:1013:1021:1047:3011
+275:4294967295:1000:1006:1013:1021:1047:3011
+276:4294967295:1000:1006:1013:1021:1047:3011
+277:4294967295:1000:1006:1013:1021:1047:3011
+278:4294967295:1000:1006:1013:1021:1047:3011
+279:4294967295:1000:1006:1013:1021:1047:3011
+280:4294967295:1000:1006:1013:1021:1047:3011
+281:4294967295:1000:1006:1013:1021:1047:3011
+282:4294967295:1000:1006:1013:1021:1047:3011
+283:4294967295:1000:1006:1013:1021:1047:3011
+284:4294967295:1000:1006:1013:1021:1047:3011
+285:4294967295:1000:1006:1013:1021:1047:3011
+286:4294967295:1000:1006:1013:1021:1047:3011
+287:4294967295:1000:1006:1013:1021:1047:3011
+288:4294967295:1000:1006:1013:1021:1047:3011
+289:4294967295:1000:1006:1013:1021:1047:3011
+290:4294967295:1000:1006:1013:1021:1047:3011
+291:4294967295:1000:1006:1013:1021:1047:3011
+292:4294967295:1000:1006:1013:1021:1047:3011
+293:4294967295:1000:1006:1013:1021:1047:3011
+294:4294967295:1000:1006:1013:1021:1047:3011
+295:4294967295:1000:1006:1013:1021:1047:3011
+296:4294967295:1000:1006:1013:1021:1047:3011
+297:4294967295:1000:1006:1013:1021:1047:3011
+298:4294967295:1000:1006:1013:1021:1047:3011
+299:4294967295:1000:1006:1013:1021:1047:3011
+300:4294967295:1000:1006:1013:1021:1047:3011
+301:4294967295:1000:1006:1013:1021:1047:3011
+302:4294967295:1000:1006:1013:1021:1047:3011
+303:4294967295:1000:1006:1013:1021:1047:3011
+304:4294967295:1000:1006:1013:1021:1047:3011
+305:4294967295:1000:1006:1013:1021:1047:3011
+306:4294967295:1000:1006:1013:1021:1047:3011
+307:4294967295:1000:1006:1013:1021:1047:3011
+308:4294967295:1000:1006:1013:1021:1047:3011
+309:4294967295:1000:1006:1013:1021:1047:3011
+310:4294967295:1000:1006:1013:1021:1047:3011
+311:4294967295:1000:1006:1013:1021:1047:3011
+312:4294967295:1000:1006:1013:1021:1047:3011
+313:4294967295:1000:1006:1013:1021:1047:3011
+314:4294967295:1000:1006:1013:1021:1047:3011
+315:4294967295:1000:1006:1013:1021:1047:3011
+316:4294967295:1000:1006:1013:1021:1047:3011
+317:4294967295:1000:1006:1013:1021:1047:3011
+318:4294967295:1000:1006:1013:1021:1047:3011
+319:4294967295:1000:1006:1013:1021:1047:3011
+320:4294967295:1000:1006:1013:1021:1047:3011
+321:4294967295:1000:1006:1013:1021:1047:3011
+322:4294967295:1000:1006:1013:1021:1047:3011
+323:4294967295:1000:1006:1013:1021:1047:3011
+324:4294967295:1000:1006:1013:1021:1047:3011
+325:4294967295:1000:1006:1013:1021:1047:3011
+326:4294967295:1000:1006:1013:1021:1047:3011
+327:4294967295:1000:1006:1013:1021:1047:3011
+328:4294967295:1000:1006:1013:1021:1047:3011
+329:4294967295:1000:1006:1013:1021:1047:3011
+330:4294967295:1000:1006:1013:1021:1047:3011
+331:4294967295:1000:1006:1013:1021:1047:3011
+332:4294967295:1000:1006:1013:1021:1047:3011
+333:4294967295:1000:1006:1013:1021:1047:3011
+334:4294967295:1000:1006:1013:1021:1047:3011
+335:4294967295:1000:1006:1013:1021:1047:3011
+336:4294967295:1000:1006:1013:1021:1047:3011
+337:4294967295:1000:1006:1013:1021:1047:3011
+338:4294967295:1000:1006:1013:1021:1047:3011
+339:4294967295:1000:1006:1013:1021:1047:3011
+340:4294967295:1000:1006:1013:1021:1047:3011
+341:4294967295:1000:1006:1013:1021:1047:3011
+342:4294967295:1000:1006:1013:1021:1047:3011
+343:4294967295:1000:1006:1013:1021:1047:3011
+344:4294967295:1000:1006:1013:1021:1047:3011
+345:4294967295:1000:1006:1013:1021:1047:3011
+346:4294967295:1000:1006:1013:1021:1047:3011
+347:4294967295:1000:1006:1013:1021:1047:3011
+348:4294967295:1000:1006:1013:1021:1047:3011
+349:4294967295:1000:1006:1013:1021:1047:3011
+350:4294967295:1000:1006:1013:1021:1047:3011
+351:4294967295:1000:1006:1013:1021:1047:3011
+352:4294967295:1000:1006:1013:1021:1047:3011
+353:4294967295:1000:1006:1013:1021:1047:3011
+354:4294967295:1000:1006:1013:1021:1047:3011
+355:4294967295:1000:1006:1013:1021:1047:3011
+356:4294967295:1000:1006:1013:1021:1047:3011
+357:4294967295:1000:1006:1013:1021:1047:3011
+358:4294967295:1000:1006:1013:1021:1047:3011
+359:4294967295:1000:1006:1013:1021:1047:3011
+360:4294967295:1000:1006:1013:1021:1047:3011
+361:4294967295:1000:1006:1013:1021:1047:3011
+362:4294967295:1000:1006:1013:1021:1047:3011
+363:4294967295:1000:1006:1013:1021:1047:3011
+364:4294967295:1000:1006:1013:1021:1047:3011
+365:4294967295:1000:1006:1013:1021:1047:3011
+366:4294967295:1000:1006:1013:1021:1047:3011
+367:4294967295:1000:1006:1013:1021:1047:3011
+368:4294967295:1000:1006:1013:1021:1047:3011
+369:4294967295:1000:1006:1013:1021:1047:3011
+370:4294967295:1000:1006:1013:1021:1047:3011
+371:4294967295:1000:1006:1013:1021:1047:3011
+372:4294967295:1000:1006:1013:1021:1047:3011
+373:4294967295:1000:1006:1013:1021:1047:3011
+374:4294967295:1000:1006:1013:1021:1047:3011
+375:4294967295:1000:1006:1013:1021:1047:3011
+376:4294967295:1000:1006:1013:1021:1047:3011
+377:4294967295:1000:1006:1013:1021:1047:3011
+378:4294967295:1000:1006:1013:1021:1047:3011
+379:4294967295:1000:1006:1013:1021:1047:3011
+380:4294967295:1000:1006:1013:1021:1047:3011
+381:4294967295:1000:1006:1013:1021:1047:3011
+382:4294967295:1000:1006:1013:1021:1047:3011
+383:4294967295:1000:1006:1013:1021:1047:3011
+384:4294967295:1000:1006:1013:1021:1047:3011
+385:4294967295:1000:1006:1013:1021:1047:3011
+386:4294967295:1000:1006:1013:1021:1047:3011
+387:4294967295:1000:1006:1013:1021:1047:3011
+388:4294967295:1000:1006:1013:1021:1047:3011
+389:4294967295:1000:1006:1013:1021:1047:3011
+390:4294967295:1000:1006:1013:1021:1047:3011
+391:4294967295:1000:1006:1013:1021:1047:3011
+392:4294967295:1000:1006:1013:1021:1047:3011
+393:4294967295:1000:1006:1013:1021:1047:3011
+394:4294967295:1000:1006:1013:1021:1047:3011
+395:4294967295:1000:1006:1013:1021:1047:3011
+396:4294967295:1000:1006:1013:1021:1047:3011
+397:4294967295:1000:1006:1013:1021:1047:3011
+398:4294967295:1000:1006:1013:1021:1047:3011
+399:4294967295:1000:1006:1013:1021:1047:3011
+400:4294967295:1000:1006:1013:1021:1047:3011
+401:4294967295:1000:1006:1013:1021:1047:3011
+402:4294967295:1000:1006:1013:1021:1047:3011
+403:4294967295:1000:1006:1013:1021:1047:3011
+404:4294967295:1000:1006:1013:1021:1047:3011
+405:4294967295:1000:1006:1013:1021:1047:3011
+406:4294967295:1000:1006:1013:1021:1047:3011
+407:4294967295:1000:1006:1013:1021:1047:3011
+408:4294967295:1000:1006:1013:1021:1047:3011
+409:4294967295:1000:1006:1013:1021:1047:3011
+410:4294967295:1000:1006:1013:1021:1047:3011
+411:4294967295:1000:1006:1013:1021:1047:3011
+412:4294967295:1000:1006:1013:1021:1047:3011
+413:4294967295:1000:1006:1013:1021:1047:3011
+414:4294967295:1000:1006:1013:1021:1047:3011
+415:4294967295:1000:1006:1013:1021:1047:3011
+416:4294967295:1000:1006:1013:1021:1047:3011
+417:4294967295:1000:1006:1013:1021:1047:3011
+418:4294967295:1000:1006:1013:1021:1047:3011
+419:4294967295:1000:1006:1013:1021:1047:3011
+420:4294967295:1000:1006:1013:1021:1047:3011
+421:4294967295:1000:1006:1013:1021:1047:3011
+422:4294967295:1000:1006:1013:1021:1047:3011
+423:4294967295:1000:1006:1013:1021:1047:3011
+424:4294967295:1000:1006:1013:1021:1047:3011
+425:4294967295:1000:1006:1013:1021:1047:3011
+426:4294967295:1000:1006:1013:1021:1047:3011
+427:4294967295:1000:1006:1013:1021:1047:3011
+428:4294967295:1000:1006:1013:1021:1047:3011
+429:4294967295:1000:1006:1013:1021:1047:3011
+430:4294967295:1000:1006:1013:1021:1047:3011
+431:4294967295:1000:1006:1013:1021:1047:3011
+432:4294967295:1000:1006:1013:1021:1047:3011
+433:4294967295:1000:1006:1013:1021:1047:3011
+434:4294967295:1000:1006:1013:1021:1047:3011
+435:4294967295:1000:1006:1013:1021:1047:3011
+436:4294967295:1000:1006:1013:1021:1047:3011
+437:4294967295:1000:1006:1013:1021:1047:3011
+438:4294967295:1000:1006:1013:1021:1047:3011
+439:4294967295:1000:1006:1013:1021:1047:3011
+440:4294967295:1000:1006:1013:1021:1047:3011
+441:4294967295:1000:1006:1013:1021:1047:3011
+442:4294967295:1000:1006:1013:1021:1047:3011
+443:4294967295:1000:1006:1013:1021:1047:3011
+444:4294967295:1000:1006:1013:1021:1047:3011
+445:4294967295:1000:1006:1013:1021:1047:3011
+446:4294967295:1000:1006:1013:1021:1047:3011
+447:4294967295:1000:1006:1013:1021:1047:3011
+448:4294967295:1000:1006:1013:1021:1047:3011
+449:4294967295:1000:1006:1013:1021:1047:3011
+450:4294967295:1000:1006:1013:1021:1047:3011
+451:4294967295:1000:1006:1013:1021:1047:3011
+452:4294967295:1000:1006:1013:1021:1047:3011
+453:4294967295:1000:1006:1013:1021:1047:3011
+454:4294967295:1000:1006:1013:1021:1047:3011
+455:4294967295:1000:1006:1013:1021:1047:3011
+456:4294967295:1000:1006:1013:1021:1047:3011
+457:4294967295:1000:1006:1013:1021:1047:3011
+458:4294967295:1000:1006:1013:1021:1047:3011
+459:4294967295:1000:1006:1013:1021:1047:3011
+460:4294967295:1000:1006:1013:1021:1047:3011
+461:4294967295:1000:1006:1013:1021:1047:3011
+462:4294967295:1000:1006:1013:1021:1047:3011
+463:4294967295:1000:1006:1013:1021:1047:3011
+464:4294967295:1000:1006:1013:1021:1047:3011
+465:4294967295:1000:1006:1013:1021:1047:3011
+466:4294967295:1000:1006:1013:1021:1047:3011
+467:4294967295:1000:1006:1013:1021:1047:3011
+468:4294967295:1000:1006:1013:1021:1047:3011
+469:4294967295:1000:1006:1013:1021:1047:3011
+470:4294967295:1000:1006:1013:1021:1047:3011
+471:4294967295:1000:1006:1013:1021:1047:3011
+472:4294967295:1000:1006:1013:1021:1047:3011
+473:4294967295:1000:1006:1013:1021:1047:3011
+474:4294967295:1000:1006:1013:1021:1047:3011
+475:4294967295:1000:1006:1013:1021:1047:3011
+476:4294967295:1000:1006:1013:1021:1047:3011
+477:4294967295:1000:1006:1013:1021:1047:3011
+478:4294967295:1000:1006:1013:1021:1047:3011
+479:4294967295:1000:1006:1013:1021:1047:3011
+480:4294967295:1000:1006:1013:1021:1047:3011
+481:4294967295:1000:1006:1013:1021:1047:3011
+482:4294967295:1000:1006:1013:1021:1047:3011
+483:4294967295:1000:1006:1013:1021:1047:3011
+484:4294967295:1000:1006:1013:1021:1047:3011
+485:4294967295:1000:1006:1013:1021:1047:3011
+486:4294967295:1000:1006:1013:1021:1047:3011
+487:4294967295:1000:1006:1013:1021:1047:3011
+488:4294967295:1000:1006:1013:1021:1047:3011
+489:4294967295:1000:1006:1013:1021:1047:3011
+490:4294967295:1000:1006:1013:1021:1047:3011
+491:4294967295:1000:1006:1013:1021:1047:3011
+492:4294967295:1000:1006:1013:1021:1047:3011
+493:4294967295:1000:1006:1013:1021:1047:3011
+494:4294967295:1000:1006:1013:1021:1047:3011
+495:4294967295:1000:1006:1013:1021:1047:3011
+496:4294967295:1000:1006:1013:1021:1047:3011
+497:4294967295:1000:1006:1013:1021:1047:3011
+498:4294967295:1000:1006:1013:1021:1047:3011
+499:4294967295:1000:1006:1013:1021:1047:3011
+500:4294967295:1000:1006:1013:1021:1047:3011
+501:4294967295:1000:1006:1013:1021:1047:3011
+502:4294967295:1000:1006:1013:1021:1047:3011
+503:4294967295:1000:1006:1013:1021:1047:3011
+504:4294967295:1000:1006:1013:1021:1047:3011
+505:4294967295:1000:1006:1013:1021:1047:3011
+506:4294967295:1000:1006:1013:1021:1047:3011
+507:4294967295:1000:1006:1013:1021:1047:3011
+508:4294967295:1000:1006:1013:1021:1047:3011
+509:4294967295:1000:1006:1013:1021:1047:3011
+510:4294967295:1000:1006:1013:1021:1047:3011
+511:4294967295:1000:1006:1013:1021:1047:3011
+/* Allow RCS service to aquire net_raw permission */
+18:4294967295:1001:3004
+/* Allow RCS service to communicate to IMS QMI Priv Svc*/
+77:4294967295:1001:3003
+/* Allow SSGQMIGD to communicate to SSGCCS service*/
+76:4294967295:1001
+/* Allow cnd to accquire netbind */
+18:4294967295:1000:3003
+/* Allow QMID service to aquire net_raw permission */
+3:4294967295:1001:1021:3004
+2:4294967295:1000:1001:3004
+42:4294967295:1001:3004
+18:4294967295:1001:3004
+9:4294967295:1001:3004
+1:4294967295:1001:3004:1000
+4:4294967295:1001:3004
+7:4294967295:1001:3004
+8:4294967295:1001:3004:1000
+68:4294967295:1001:3004
+/* DPM */
+47:4294967295:1001:3004
+/* Allow communication to some QMI services with radio privilages */
+/* Format is <Service id>:<all instances>:<radio> */
+/* PBM */
+12:4294967295:1001
+/* WMS */
+5:4294967295:1001
+/* IMS VT */
+32:4294967295:1001
+/* IMSP */
+31:4294967295:1001
+/* PDC */
+36:4294967295:1001
+/* SAR */
+17:4294967295:1001
+/* RFRPE */
+41:4294967295:1001
+/*UIM*/
+11:4294967295:1001
+/*CAT*/
+10:4294967295:1001
+/*IMSA*/
+33:4294967295:1001
+/* CSVT */
+29:4294967295:1001
+/*SERVREG_NOTIF*/
+64:4294967295:1001
+66:4294967295:1001
+/*LTE*/
+70:4294967295:1001
+/* Allow Data dpmd to access QMI DFS */
+48:4294967295:1000:3004
+/* DIAG */
+4097:4294967295:2002:2950:3009:2901
+/* <WLFW QMI Service ID - 0x45>:<WLFW QMI Instance ID - all instances>:<Client Group ID> */
+69:4294967295:1000
+/* <WLPS QMI Service ID - 0x39>:<WLFW QMI Instance ID - all instances>:<Client Group ID> */
+57:4294967295:1000
diff --git a/configs/whitelistedapps.xml b/configs/whitelistedapps.xml
new file mode 100644
index 0000000..06e3874
--- /dev/null
+++ b/configs/whitelistedapps.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+
+<!--
+/* Copyright (c) 2017 Qualcomm Technologies, Inc.
+ * All Rights Reserved.
+ * Confidential and Proprietary - Qualcomm Technologies, Inc.
+ */
+-->
+
+<AppCatalog>
+ <ResolutionOverrideApps>
+
+ <!-- In AppAttributes, PackageName is must.
+ ActivityName and VersionCode are optional and can be used to
+ further restrict the whitelisting in terms of when and where to apply
+
+ 1. <AppAttributes PackageName="com.imangi.templerun" />
+ Straight forward whitelisting when activityTrigger is called with this PackageName
+ 2. <AppAttributes PackageName="com.imangi.templerun"
+ ActivityName="com.unity3d.player.UnityPlayerProxyActivity" />
+ Updating ApplicationInfo to override the resolution is done when activityTrigger
+ is called with both the above PackageName and ActivityName
+ 3. <AppAttributes PackageName="com.imangi.templerun"
+ VersionCode="11" />
+ Same as (1) but happens when app is of verionCode 11
+ 4. <AppAttributes PackageName="com.imangi.templerun"
+ ActivityName="com.unity3d.player.UnityPlayerProxyActivity"
+ VersionCode="11" />
+ Same as (2) but happens when app is of versionCode 11
+ -->
+
+ <AppAttributes
+ PackageName="com.imangi.templerun"
+ ActivityName="com.unity3d.player.UnityPlayerProxyActivity" />
+
+ <AppAttributes
+ PackageName="com.imangi.templerun2"
+ ActivityName="com.prime31.UnityPlayerProxyActivity" />
+
+ </ResolutionOverrideApps>
+ <GameTriggerApps>
+ </GameTriggerApps>
+ <AnimTriggerApps>
+ <AppAttributes
+ PackageName="com.tencent.mm"
+ ActivityName="com.tencent.mm.plugin.luckymoney.ui.LuckyMoneyReceiveUI"
+ WindowAnimationScale = "0"
+ TransitionAnimationScale = "0"
+ AnimatorDurationScale = "0" />
+ </AnimTriggerApps>
+ <NetTriggerApps>
+ <AppAttributes
+ PackageName="com.tencent.mm" />
+ </NetTriggerApps>
+ <HWAccelApps>
+ <AppAttributes PackageName="com.autonavi.xmgd.navigator" />
+ <AppAttributes PackageName="com.tencent.qqpimsecure" />
+ <AppAttributes PackageName="com.ludashi.benchmark" />
+ <AppAttributes PackageName="com.tencent.mobileqq" />
+ <AppAttributes PackageName="com.taobao.taobao" />
+ <AppAttributes PackageName="com.youdao.dict" />
+ </HWAccelApps>
+</AppCatalog>
diff --git a/doze/Android.mk b/doze/Android.mk
new file mode 100644
index 0000000..76a8405
--- /dev/null
+++ b/doze/Android.mk
@@ -0,0 +1,31 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := XiaomiDoze
+LOCAL_CERTIFICATE := platform
+LOCAL_PRIVATE_PLATFORM_APIS := true
+LOCAL_PRIVILEGED_MODULE := true
+
+LOCAL_USE_AAPT2 := true
+
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+ android-support-v4 \
+ android-support-v13 \
+ android-support-v7-recyclerview \
+ android-support-v7-preference \
+ android-support-v7-appcompat \
+ android-support-v14-preference
+
+LOCAL_RESOURCE_DIR := \
+ $(LOCAL_PATH)/res \
+ $(TOP)/packages/resources/devicesettings/res
+
+LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+
+include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/doze/AndroidManifest.xml b/doze/AndroidManifest.xml
new file mode 100644
index 0000000..93f5a3b
--- /dev/null
+++ b/doze/AndroidManifest.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015-2016 The CyanogenMod Project
+ 2017 The LineageOS 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.lineageos.settings.doze"
+ android:versionCode="1"
+ android:versionName="1.0"
+ android:sharedUserId="android.uid.system">
+
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
+
+ <protected-broadcast android:name="com.android.systemui.doze.pulse" />
+
+ <uses-sdk
+ android:minSdkVersion="24"
+ android:targetSdkVersion="24"/>
+
+ <application
+ android:label="@string/device_settings_app_name"
+ android:persistent="true">
+
+ <receiver android:name=".BootCompletedReceiver">
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </receiver>
+
+ <service android:name=".DozeService"
+ android:permission="XiaomiDozeService">
+ </service>
+
+ <activity
+ android:name=".DozeSettingsActivity"
+ android:label="@string/ambient_display_title"
+ android:theme="@style/Theme.Main">
+ <intent-filter>
+ <action android:name="org.lineageos.settings.device.DOZE_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ </application>
+</manifest>
diff --git a/doze/proguard.flags b/doze/proguard.flags
new file mode 100644
index 0000000..b1cabdb
--- /dev/null
+++ b/doze/proguard.flags
@@ -0,0 +1,8 @@
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keep class ** extends android.support.v14.preference.PreferenceFragment
+-keep class org.lineageos.settings.doze.* {
+ *;
+}
diff --git a/doze/res/color/switch_bar_bg.xml b/doze/res/color/switch_bar_bg.xml
new file mode 100644
index 0000000..ba2dae1
--- /dev/null
+++ b/doze/res/color/switch_bar_bg.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The LineageOS 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="#ff80868B" android:state_activated="false" />
+ <item android:color="?android:attr/colorAccent" android:state_activated="true" />
+</selector>
diff --git a/doze/res/color/switchbar_switch_thumb_tint.xml b/doze/res/color/switchbar_switch_thumb_tint.xml
new file mode 100644
index 0000000..d4bf9b3
--- /dev/null
+++ b/doze/res/color/switchbar_switch_thumb_tint.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 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.
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="#FFFFFF" />
+</selector>
diff --git a/doze/res/color/switchbar_switch_track_tint.xml b/doze/res/color/switchbar_switch_track_tint.xml
new file mode 100644
index 0000000..ae45c7a
--- /dev/null
+++ b/doze/res/color/switchbar_switch_track_tint.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 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.
+ -->
+
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="#BFFFFFFF" />
+</selector>
diff --git a/doze/res/drawable/switchbar_background.xml b/doze/res/drawable/switchbar_background.xml
new file mode 100644
index 0000000..f210707
--- /dev/null
+++ b/doze/res/drawable/switchbar_background.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The LineageOS 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <solid android:color="@color/switch_bar_bg" />
+</shape>
diff --git a/doze/res/layout/doze.xml b/doze/res/layout/doze.xml
new file mode 100644
index 0000000..941cdf6
--- /dev/null
+++ b/doze/res/layout/doze.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <include layout="@layout/switch_bar" />
+
+</LinearLayout>
+
diff --git a/doze/res/layout/switch_bar.xml b/doze/res/layout/switch_bar.xml
new file mode 100644
index 0000000..9e11a0a
--- /dev/null
+++ b/doze/res/layout/switch_bar.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/switch_bar"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:background="@drawable/switchbar_background"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:clickable="true"
+ android:gravity="center">
+
+ <TextView android:id="@+id/switch_text"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:paddingStart="56dp"
+ android:maxLines="2"
+ android:ellipsize="end"
+ android:textAppearance="@android:style/TextAppearance.Material.Title"
+ android:textColor="@android:color/white"
+ android:textSize="18sp"
+ android:textAlignment="viewStart" />
+
+ <Switch
+ android:id="@android:id/switch_widget"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:background="@null"
+ android:theme="@style/Theme.Main.SwitchBar.Switch" />
+
+</LinearLayout>
diff --git a/doze/res/values/styles.xml b/doze/res/values/styles.xml
new file mode 100644
index 0000000..3443c0b
--- /dev/null
+++ b/doze/res/values/styles.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015-2016 The CyanogenMod Project
+ 2017 The LineageOS Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <style name="Theme.Main" parent="@android:style/Theme.DeviceDefault.Settings">
+ <item name="dialogPreferenceStyle">@style/Theme.Main.DialogPreferenceStyle</item>
+ <item name="preferenceCategoryStyle">@style/Theme.Main.PreferenceCategoryStyle</item>
+ <item name="preferenceFragmentStyle">@style/Theme.Main.PreferenceFragmentStyle</item>
+ <item name="preferenceStyle">@style/Theme.Main.PreferenceStyle</item>
+ <item name="preferenceTheme">@style/Theme.Main.PreferenceTheme</item>
+ <item name="switchPreferenceStyle">@style/Theme.Main.SwitchPreferenceStyle</item>
+ </style>
+
+ <style name="Theme.Main.DialogPreferenceStyle" parent="@style/Theme.Main.PreferenceStyle">
+ </style>
+
+ <style name="Theme.Main.PreferenceCategoryStyle" parent="@*android:style/Preference.DeviceDefault.Category">
+ <item name="allowDividerAbove">true</item>
+ <item name="allowDividerBelow">true</item>
+ <item name="android:layout">@layout/preference_category_material_settings</item>
+ </style>
+
+ <style name="Theme.Main.PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
+ <item name="allowDividerAfterLastItem">false</item>
+ </style>
+
+ <style name="Theme.Main.PreferenceStyle" parent="@*android:style/Preference.DeviceDefault">
+ <item name="allowDividerAbove">false</item>
+ <item name="allowDividerBelow">true</item>
+ <item name="singleLineTitle">false</item>
+ <item name="android:layout">@layout/preference_material_settings</item>
+ </style>
+
+ <style name="Theme.Main.PreferenceTheme">
+ </style>
+
+ <style name="Theme.Main.SwitchPreferenceStyle" parent="@style/Theme.Main.PreferenceStyle">
+ <item name="widgetLayout">@*android:layout/preference_widget_switch</item>
+ </style>
+
+ <style name="Theme.Main.SwitchBar" parent="@android:style/ThemeOverlay.Material.ActionBar">
+ </style>
+
+ <style name="Theme.Main.SwitchBar.Switch">
+ <item name="android:trackTint">@color/switchbar_switch_track_tint</item>
+ <item name="android:thumbTint">@color/switchbar_switch_thumb_tint</item>
+ </style>
+</resources>
diff --git a/doze/res/xml/doze_settings.xml b/doze/res/xml/doze_settings.xml
new file mode 100644
index 0000000..005c6ae
--- /dev/null
+++ b/doze/res/xml/doze_settings.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License"
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <PreferenceCategory
+ android:key="tilt_sensor"
+ android:title="@string/tilt_sensor_title">
+
+ <SwitchPreference
+ android:key="gesture_pick_up"
+ android:defaultValue="false"
+ android:title="@string/pick_up_gesture_title"
+ android:summary="@string/pick_up_gesture_summary" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="proximity_sensor"
+ android:title="@string/proximity_sensor_title">
+
+ <SwitchPreference
+ android:key="gesture_hand_wave"
+ android:defaultValue="false"
+ android:title="@string/hand_wave_gesture_title"
+ android:summary="@string/hand_wave_gesture_summary" />
+
+ <SwitchPreference
+ android:key="gesture_pocket"
+ android:defaultValue="false"
+ android:title="@string/pocket_gesture_title"
+ android:summary="@string/pocket_gesture_summary" />
+
+ </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/doze/src/org/lineageos/settings/doze/BootCompletedReceiver.java b/doze/src/org/lineageos/settings/doze/BootCompletedReceiver.java
new file mode 100644
index 0000000..dcb8d91
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/BootCompletedReceiver.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod Project
+ * 2017 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+public class BootCompletedReceiver extends BroadcastReceiver {
+
+ private static final boolean DEBUG = false;
+ private static final String TAG = "XiaomiDoze";
+
+ @Override
+ public void onReceive(final Context context, Intent intent) {
+ if (Utils.isDozeEnabled(context) && Utils.sensorsEnabled(context)) {
+ if (DEBUG) Log.d(TAG, "Starting service");
+ Utils.startService(context);
+ }
+ }
+
+}
diff --git a/doze/src/org/lineageos/settings/doze/DozeService.java b/doze/src/org/lineageos/settings/doze/DozeService.java
new file mode 100644
index 0000000..5b161e2
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/DozeService.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod Project
+ * 2017-2018 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.app.Service;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.IBinder;
+import android.util.Log;
+
+public class DozeService extends Service {
+ private static final String TAG = "DozeService";
+ private static final boolean DEBUG = false;
+
+ private ProximitySensor mProximitySensor;
+ private TiltSensor mTiltSensor;
+
+ @Override
+ public void onCreate() {
+ if (DEBUG) Log.d(TAG, "Creating service");
+ mProximitySensor = new ProximitySensor(this);
+ mTiltSensor = new TiltSensor(this);
+
+ IntentFilter screenStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);
+ screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
+ registerReceiver(mScreenStateReceiver, screenStateFilter);
+ }
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ if (DEBUG) Log.d(TAG, "Starting service");
+ return START_STICKY;
+ }
+
+ @Override
+ public void onDestroy() {
+ if (DEBUG) Log.d(TAG, "Destroying service");
+ super.onDestroy();
+ this.unregisterReceiver(mScreenStateReceiver);
+ mProximitySensor.disable();
+ mTiltSensor.disable();
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ private void onDisplayOn() {
+ if (DEBUG) Log.d(TAG, "Display on");
+ if (Utils.isPickUpEnabled(this)) {
+ mTiltSensor.disable();
+ }
+ if (Utils.isHandwaveGestureEnabled(this) ||
+ Utils.isPocketGestureEnabled(this)) {
+ mProximitySensor.disable();
+ }
+ }
+
+ private void onDisplayOff() {
+ if (DEBUG) Log.d(TAG, "Display off");
+ if (Utils.isPickUpEnabled(this)) {
+ mTiltSensor.enable();
+ }
+ if (Utils.isHandwaveGestureEnabled(this) ||
+ Utils.isPocketGestureEnabled(this)) {
+ mProximitySensor.enable();
+ }
+ }
+
+ private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
+ onDisplayOn();
+ } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
+ onDisplayOff();
+ }
+ }
+ };
+}
diff --git a/doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java b/doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java
new file mode 100644
index 0000000..1591b2c
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2015-2016 The CyanogenMod Project
+ * 2017 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+
+public class DozeSettingsActivity extends PreferenceActivity {
+
+ private static final String TAG_DOZE = "doze";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ getFragmentManager().beginTransaction().replace(android.R.id.content,
+ new DozeSettingsFragment(), TAG_DOZE).commit();
+ }
+}
diff --git a/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java b/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java
new file mode 100644
index 0000000..fd1756e
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod Project
+ * 2017-2018 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.support.v14.preference.PreferenceFragment;
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceCategory;
+import android.support.v7.preference.Preference.OnPreferenceChangeListener;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CompoundButton;
+import android.widget.Switch;
+import android.widget.TextView;
+
+public class DozeSettingsFragment extends PreferenceFragment implements OnPreferenceChangeListener,
+ CompoundButton.OnCheckedChangeListener {
+
+ private TextView mTextView;
+ private View mSwitchBar;
+
+ private SwitchPreference mPickUpPreference;
+ private SwitchPreference mHandwavePreference;
+ private SwitchPreference mPocketPreference;
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ addPreferencesFromResource(R.xml.doze_settings);
+ final ActionBar actionBar = getActivity().getActionBar();
+ actionBar.setDisplayHomeAsUpEnabled(true);
+
+ SharedPreferences prefs = getActivity().getSharedPreferences("doze_settings",
+ Activity.MODE_PRIVATE);
+ if (savedInstanceState == null && !prefs.getBoolean("first_help_shown", false)) {
+ showHelp();
+ }
+
+ boolean dozeEnabled = Utils.isDozeEnabled(getActivity());
+
+ PreferenceCategory proximitySensorCategory =
+ (PreferenceCategory) getPreferenceScreen().findPreference(Utils.CATEG_PROX_SENSOR);
+
+ mPickUpPreference = (SwitchPreference) findPreference(Utils.GESTURE_PICK_UP_KEY);
+ mPickUpPreference.setEnabled(dozeEnabled);
+ mPickUpPreference.setOnPreferenceChangeListener(this);
+
+ mHandwavePreference = (SwitchPreference) findPreference(Utils.GESTURE_HAND_WAVE_KEY);
+ mHandwavePreference.setEnabled(dozeEnabled);
+ mHandwavePreference.setOnPreferenceChangeListener(this);
+
+ mPocketPreference = (SwitchPreference) findPreference(Utils.GESTURE_POCKET_KEY);
+ mPocketPreference.setEnabled(dozeEnabled);
+ mPocketPreference.setOnPreferenceChangeListener(this);
+
+ // Hide proximity sensor related features if the device doesn't support them
+ if (!Utils.getProxCheckBeforePulse(getActivity())) {
+ getPreferenceScreen().removePreference(proximitySensorCategory);
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ final View view = LayoutInflater.from(getContext()).inflate(R.layout.doze, container, false);
+ ((ViewGroup) view).addView(super.onCreateView(inflater, container, savedInstanceState));
+ return view;
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+
+ boolean dozeEnabled = Utils.isDozeEnabled(getActivity());
+
+ mTextView = view.findViewById(R.id.switch_text);
+ mTextView.setText(getString(dozeEnabled ?
+ R.string.switch_bar_on : R.string.switch_bar_off));
+
+ mSwitchBar = view.findViewById(R.id.switch_bar);
+ Switch switchWidget = mSwitchBar.findViewById(android.R.id.switch_widget);
+ switchWidget.setChecked(dozeEnabled);
+ switchWidget.setOnCheckedChangeListener(this);
+ mSwitchBar.setActivated(dozeEnabled);
+ mSwitchBar.setOnClickListener(v -> {
+ switchWidget.setChecked(!switchWidget.isChecked());
+ mSwitchBar.setActivated(switchWidget.isChecked());
+ });
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ Utils.enableGesture(getActivity(), preference.getKey(), (Boolean) newValue);
+ Utils.checkDozeService(getActivity());
+ return true;
+ }
+
+ @Override
+ public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {
+ Utils.enableDoze(getActivity(), isChecked);
+ Utils.checkDozeService(getActivity());
+
+ mTextView.setText(getString(isChecked ? R.string.switch_bar_on : R.string.switch_bar_off));
+ mSwitchBar.setActivated(isChecked);
+
+ mPickUpPreference.setEnabled(isChecked);
+ mHandwavePreference.setEnabled(isChecked);
+ mPocketPreference.setEnabled(isChecked);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ getActivity().onBackPressed();
+ return true;
+ }
+ return false;
+ }
+
+ private static class HelpDialogFragment extends DialogFragment {
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ return new AlertDialog.Builder(getActivity())
+ .setTitle(R.string.doze_settings_help_title)
+ .setMessage(R.string.doze_settings_help_text)
+ .setNegativeButton(R.string.dialog_ok, (dialog, which) -> dialog.cancel())
+ .create();
+ }
+
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ getActivity().getSharedPreferences("doze_settings", Activity.MODE_PRIVATE)
+ .edit()
+ .putBoolean("first_help_shown", true)
+ .commit();
+ }
+ }
+
+ private void showHelp() {
+ HelpDialogFragment fragment = new HelpDialogFragment();
+ fragment.show(getFragmentManager(), "help_dialog");
+ }
+}
diff --git a/doze/src/org/lineageos/settings/doze/ProximitySensor.java b/doze/src/org/lineageos/settings/doze/ProximitySensor.java
new file mode 100644
index 0000000..71594ff
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/ProximitySensor.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2015 The CyanogenMod Project
+ * 2017-2018 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.content.Context;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.util.Log;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+public class ProximitySensor implements SensorEventListener {
+
+ private static final boolean DEBUG = false;
+ private static final String TAG = "ProximitySensor";
+
+ // Maximum time for the hand to cover the sensor: 1s
+ private static final int HANDWAVE_MAX_DELTA_NS = 1000 * 1000 * 1000;
+
+ // Minimum time until the device is considered to have been in the pocket: 2s
+ private static final int POCKET_MIN_DELTA_NS = 2000 * 1000 * 1000;
+
+ private SensorManager mSensorManager;
+ private Sensor mSensor;
+ private Context mContext;
+ private ExecutorService mExecutorService;
+
+ private boolean mSawNear = false;
+ private long mInPocketTime = 0;
+
+ public ProximitySensor(Context context) {
+ mContext = context;
+ mSensorManager = mContext.getSystemService(SensorManager.class);
+ mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY, false);
+ mExecutorService = Executors.newSingleThreadExecutor();
+ }
+
+ private Future<?> submit(Runnable runnable) {
+ return mExecutorService.submit(runnable);
+ }
+
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ boolean isNear = event.values[0] < mSensor.getMaximumRange();
+ if (mSawNear && !isNear) {
+ if (shouldPulse(event.timestamp)) {
+ Utils.launchDozePulse(mContext);
+ }
+ } else {
+ mInPocketTime = event.timestamp;
+ }
+ mSawNear = isNear;
+ }
+
+ private boolean shouldPulse(long timestamp) {
+ long delta = timestamp - mInPocketTime;
+
+ if (Utils.isHandwaveGestureEnabled(mContext) && Utils.isPocketGestureEnabled(mContext)) {
+ return true;
+ } else if (Utils.isHandwaveGestureEnabled(mContext)) {
+ return delta < HANDWAVE_MAX_DELTA_NS;
+ } else if (Utils.isPocketGestureEnabled(mContext)) {
+ return delta >= POCKET_MIN_DELTA_NS;
+ }
+ return false;
+ }
+
+ @Override
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ /* Empty */
+ }
+
+ protected void enable() {
+ if (DEBUG) Log.d(TAG, "Enabling");
+ submit(() -> {
+ mSensorManager.registerListener(this, mSensor,
+ SensorManager.SENSOR_DELAY_NORMAL);
+ });
+ }
+
+ protected void disable() {
+ if (DEBUG) Log.d(TAG, "Disabling");
+ submit(() -> {
+ mSensorManager.unregisterListener(this, mSensor);
+ });
+ }
+}
diff --git a/doze/src/org/lineageos/settings/doze/TiltSensor.java b/doze/src/org/lineageos/settings/doze/TiltSensor.java
new file mode 100644
index 0000000..6598127
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/TiltSensor.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2015 The CyanogenMod Project
+ * 2017-2018 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.content.Context;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.os.SystemClock;
+import android.util.Log;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+public class TiltSensor implements SensorEventListener {
+
+ private static final boolean DEBUG = false;
+ private static final String TAG = "TiltSensor";
+
+ private static final int BATCH_LATENCY_IN_MS = 100;
+ private static final int MIN_PULSE_INTERVAL_MS = 2500;
+
+ private SensorManager mSensorManager;
+ private Sensor mSensor;
+ private Context mContext;
+ private ExecutorService mExecutorService;
+
+ private long mEntryTimestamp;
+
+ public TiltSensor(Context context) {
+ mContext = context;
+ mSensorManager = mContext.getSystemService(SensorManager.class);
+ mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_TILT_DETECTOR);
+ mExecutorService = Executors.newSingleThreadExecutor();
+ }
+
+ private Future<?> submit(Runnable runnable) {
+ return mExecutorService.submit(runnable);
+ }
+
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ if (DEBUG) Log.d(TAG, "Got sensor event: " + event.values[0]);
+
+ long delta = SystemClock.elapsedRealtime() - mEntryTimestamp;
+ if (delta < MIN_PULSE_INTERVAL_MS) {
+ return;
+ } else {
+ mEntryTimestamp = SystemClock.elapsedRealtime();
+ }
+
+ if (event.values[0] == 1) {
+ Utils.launchDozePulse(mContext);
+ }
+ }
+
+ @Override
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ /* Empty */
+ }
+
+ protected void enable() {
+ if (DEBUG) Log.d(TAG, "Enabling");
+ submit(() -> {
+ mSensorManager.registerListener(this, mSensor,
+ SensorManager.SENSOR_DELAY_NORMAL, BATCH_LATENCY_IN_MS * 1000);
+ mEntryTimestamp = SystemClock.elapsedRealtime();
+ });
+ }
+
+ protected void disable() {
+ if (DEBUG) Log.d(TAG, "Disabling");
+ submit(() -> {
+ mSensorManager.unregisterListener(this, mSensor);
+ });
+ }
+}
diff --git a/doze/src/org/lineageos/settings/doze/Utils.java b/doze/src/org/lineageos/settings/doze/Utils.java
new file mode 100644
index 0000000..9cd7fdd
--- /dev/null
+++ b/doze/src/org/lineageos/settings/doze/Utils.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2015 The CyanogenMod Project
+ * 2017-2018 The LineageOS 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.
+ */
+
+package org.lineageos.settings.doze;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.os.UserHandle;
+import android.support.v7.preference.PreferenceManager;
+import android.provider.Settings;
+import android.util.Log;
+
+import static android.provider.Settings.Secure.DOZE_ENABLED;
+
+public final class Utils {
+
+ private static final String TAG = "DozeUtils";
+ private static final boolean DEBUG = false;
+
+ private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
+
+ protected static final String CATEG_PROX_SENSOR = "proximity_sensor";
+
+ protected static final String GESTURE_PICK_UP_KEY = "gesture_pick_up";
+ protected static final String GESTURE_HAND_WAVE_KEY = "gesture_hand_wave";
+ protected static final String GESTURE_POCKET_KEY = "gesture_pocket";
+
+ protected static void startService(Context context) {
+ if (DEBUG) Log.d(TAG, "Starting service");
+ context.startServiceAsUser(new Intent(context, DozeService.class),
+ UserHandle.CURRENT);
+ }
+
+ protected static void stopService(Context context) {
+ if (DEBUG) Log.d(TAG, "Stopping service");
+ context.stopServiceAsUser(new Intent(context, DozeService.class),
+ UserHandle.CURRENT);
+ }
+
+ protected static void checkDozeService(Context context) {
+ if (isDozeEnabled(context) && sensorsEnabled(context)) {
+ startService(context);
+ } else {
+ stopService(context);
+ }
+ }
+
+ protected static boolean getProxCheckBeforePulse(Context context) {
+ try {
+ Context con = context.createPackageContext("com.android.systemui", 0);
+ int id = con.getResources().getIdentifier("doze_proximity_check_before_pulse",
+ "bool", "com.android.systemui");
+ return con.getResources().getBoolean(id);
+ } catch (PackageManager.NameNotFoundException e) {
+ return false;
+ }
+ }
+
+ protected static boolean isDozeEnabled(Context context) {
+ return Settings.Secure.getInt(context.getContentResolver(),
+ DOZE_ENABLED, 1) != 0;
+ }
+
+ protected static boolean enableDoze(Context context, boolean enable) {
+ return Settings.Secure.putInt(context.getContentResolver(),
+ DOZE_ENABLED, enable ? 1 : 0);
+ }
+
+ protected static void launchDozePulse(Context context) {
+ if (DEBUG) Log.d(TAG, "Launch doze pulse");
+ context.sendBroadcastAsUser(new Intent(DOZE_INTENT),
+ new UserHandle(UserHandle.USER_CURRENT));
+ }
+
+ protected static void enableGesture(Context context, String gesture, boolean enable) {
+ PreferenceManager.getDefaultSharedPreferences(context).edit()
+ .putBoolean(gesture, enable).apply();
+ }
+
+ protected static boolean isGestureEnabled(Context context, String gesture) {
+ return PreferenceManager.getDefaultSharedPreferences(context)
+ .getBoolean(gesture, false);
+ }
+
+ protected static boolean isPickUpEnabled(Context context) {
+ return isGestureEnabled(context, GESTURE_PICK_UP_KEY);
+ }
+
+ protected static boolean isHandwaveGestureEnabled(Context context) {
+ return isGestureEnabled(context, GESTURE_HAND_WAVE_KEY);
+ }
+
+ protected static boolean isPocketGestureEnabled(Context context) {
+ return isGestureEnabled(context, GESTURE_POCKET_KEY);
+ }
+
+ protected static boolean sensorsEnabled(Context context) {
+ return isPickUpEnabled(context) || isHandwaveGestureEnabled(context)
+ || isPocketGestureEnabled(context);
+ }
+}
diff --git a/extract-files.sh b/extract-files.sh
new file mode 100755
index 0000000..1536608
--- /dev/null
+++ b/extract-files.sh
@@ -0,0 +1,89 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+DEVICE_COMMON=sdm660-common
+VENDOR=xiaomi
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
+
+LINEAGE_ROOT="$MY_DIR"/../../..
+
+HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
+if [ ! -f "$HELPER" ]; then
+ echo "Unable to find helper script at $HELPER"
+ exit 1
+fi
+. "$HELPER"
+
+# Default to sanitizing the vendor folder before extraction
+CLEAN_VENDOR=true
+
+while [ "${#}" -gt 0 ]; do
+ case "${1}" in
+ -n | --no-cleanup )
+ CLEAN_VENDOR=false
+ ;;
+ -k | --kang )
+ KANG="--kang"
+ ;;
+ -s | --section )
+ SECTION="${2}"; shift
+ CLEAN_VENDOR=false
+ ;;
+ * )
+ SRC="${1}"
+ ;;
+ esac
+ shift
+done
+
+if [ -z "$SRC" ]; then
+ SRC=adb
+fi
+
+function blob_fixup() {
+ case "${1}" in
+
+ vendor/bin/mlipayd@1.1)
+ patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "${2}"
+ ;;
+
+ vendor/lib64/libmlipay.so | vendor/lib64/libmlipay@1.1.so)
+ patchelf --remove-needed vendor.xiaomi.hardware.mtdservice@1.0.so "${2}"
+ sed -i "s|/system/etc/firmware|/vendor/firmware\x0\x0\x0\x0|g" "${2}"
+ ;;
+ esac
+}
+
+# Initialize the common helper
+setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $CLEAN_VENDOR
+
+extract "$MY_DIR"/proprietary-files.txt "$SRC" \
+ "${KANG}" --section "${SECTION}"
+
+if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then
+ # Reinitialize the helper for device
+ setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR"
+ extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" \
+ "${KANG}" --section "${SECTION}"
+fi
+
+"$MY_DIR"/setup-makefiles.sh
diff --git a/framework_manifest.xml b/framework_manifest.xml
new file mode 100644
index 0000000..b2276a5
--- /dev/null
+++ b/framework_manifest.xml
@@ -0,0 +1,39 @@
+<!-- Copyright (c) 2018, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<manifest version="1.0" type="framework">
+ <!-- atfwd -->
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.atcmdfwd</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IAtCmdFwd</name>
+ <instance>AtCmdFwdService</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/gps/Android.mk b/gps/Android.mk
new file mode 100644
index 0000000..f1088a4
--- /dev/null
+++ b/gps/Android.mk
@@ -0,0 +1,5 @@
+ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
+LOCAL_PATH := $(call my-dir)
+include $(LOCAL_PATH)/build/target_specific_features.mk
+include $(call all-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/CleanSpec.mk b/gps/CleanSpec.mk
index dd1849d..dd1849d 100644
--- a/CleanSpec.mk
+++ b/gps/CleanSpec.mk
diff --git a/Makefile.am b/gps/Makefile.am
index cd4a731..cd4a731 100644
--- a/Makefile.am
+++ b/gps/Makefile.am
diff --git a/android/1.0/AGnss.cpp b/gps/android/1.0/AGnss.cpp
index 79f665c..79f665c 100644
--- a/android/1.0/AGnss.cpp
+++ b/gps/android/1.0/AGnss.cpp
diff --git a/android/1.0/AGnss.h b/gps/android/1.0/AGnss.h
index cdd5931..cdd5931 100644
--- a/android/1.0/AGnss.h
+++ b/gps/android/1.0/AGnss.h
diff --git a/android/1.0/AGnssRil.cpp b/gps/android/1.0/AGnssRil.cpp
index 0437cf1..0437cf1 100644
--- a/android/1.0/AGnssRil.cpp
+++ b/gps/android/1.0/AGnssRil.cpp
diff --git a/android/1.0/AGnssRil.h b/gps/android/1.0/AGnssRil.h
index 7f18c57..7f18c57 100644
--- a/android/1.0/AGnssRil.h
+++ b/gps/android/1.0/AGnssRil.h
diff --git a/android/1.0/Android.mk b/gps/android/1.0/Android.mk
index 9337325..9337325 100644
--- a/android/1.0/Android.mk
+++ b/gps/android/1.0/Android.mk
diff --git a/android/1.0/Gnss.cpp b/gps/android/1.0/Gnss.cpp
index d85e0a4..d85e0a4 100644
--- a/android/1.0/Gnss.cpp
+++ b/gps/android/1.0/Gnss.cpp
diff --git a/android/1.0/Gnss.h b/gps/android/1.0/Gnss.h
index 900a510..900a510 100644
--- a/android/1.0/Gnss.h
+++ b/gps/android/1.0/Gnss.h
diff --git a/android/1.0/GnssBatching.cpp b/gps/android/1.0/GnssBatching.cpp
index 3e5a9f4..3e5a9f4 100644
--- a/android/1.0/GnssBatching.cpp
+++ b/gps/android/1.0/GnssBatching.cpp
diff --git a/android/1.0/GnssBatching.h b/gps/android/1.0/GnssBatching.h
index 8fab857..8fab857 100644
--- a/android/1.0/GnssBatching.h
+++ b/gps/android/1.0/GnssBatching.h
diff --git a/android/1.0/GnssConfiguration.cpp b/gps/android/1.0/GnssConfiguration.cpp
index 0b62249..0b62249 100644
--- a/android/1.0/GnssConfiguration.cpp
+++ b/gps/android/1.0/GnssConfiguration.cpp
diff --git a/android/1.0/GnssConfiguration.h b/gps/android/1.0/GnssConfiguration.h
index 1629e06..1629e06 100644
--- a/android/1.0/GnssConfiguration.h
+++ b/gps/android/1.0/GnssConfiguration.h
diff --git a/android/1.0/GnssDebug.cpp b/gps/android/1.0/GnssDebug.cpp
index ead72e1..ead72e1 100644
--- a/android/1.0/GnssDebug.cpp
+++ b/gps/android/1.0/GnssDebug.cpp
diff --git a/android/1.0/GnssDebug.h b/gps/android/1.0/GnssDebug.h
index a7116cb..a7116cb 100644
--- a/android/1.0/GnssDebug.h
+++ b/gps/android/1.0/GnssDebug.h
diff --git a/android/1.0/GnssGeofencing.cpp b/gps/android/1.0/GnssGeofencing.cpp
index 2a8ff88..2a8ff88 100644
--- a/android/1.0/GnssGeofencing.cpp
+++ b/gps/android/1.0/GnssGeofencing.cpp
diff --git a/android/1.0/GnssGeofencing.h b/gps/android/1.0/GnssGeofencing.h
index db5f9d2..db5f9d2 100644
--- a/android/1.0/GnssGeofencing.h
+++ b/gps/android/1.0/GnssGeofencing.h
diff --git a/android/1.0/GnssMeasurement.cpp b/gps/android/1.0/GnssMeasurement.cpp
index 1c65bd6..1c65bd6 100644
--- a/android/1.0/GnssMeasurement.cpp
+++ b/gps/android/1.0/GnssMeasurement.cpp
diff --git a/android/1.0/GnssMeasurement.h b/gps/android/1.0/GnssMeasurement.h
index 4247dbf..4247dbf 100644
--- a/android/1.0/GnssMeasurement.h
+++ b/gps/android/1.0/GnssMeasurement.h
diff --git a/android/1.0/GnssNi.cpp b/gps/android/1.0/GnssNi.cpp
index d06cc20..d06cc20 100644
--- a/android/1.0/GnssNi.cpp
+++ b/gps/android/1.0/GnssNi.cpp
diff --git a/android/1.0/GnssNi.h b/gps/android/1.0/GnssNi.h
index 90f62d5..90f62d5 100644
--- a/android/1.0/GnssNi.h
+++ b/gps/android/1.0/GnssNi.h
diff --git a/android/1.0/android.hardware.gnss@1.0-service-qti.rc b/gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc
index 1fbd893..1fbd893 100644
--- a/android/1.0/android.hardware.gnss@1.0-service-qti.rc
+++ b/gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc
diff --git a/android/1.0/android.hardware.gnss@1.0-service-qti.xml b/gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml
index 46bcffb..46bcffb 100644
--- a/android/1.0/android.hardware.gnss@1.0-service-qti.xml
+++ b/gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml
diff --git a/android/1.0/location_api/BatchingAPIClient.cpp b/gps/android/1.0/location_api/BatchingAPIClient.cpp
index 264ab83..264ab83 100644
--- a/android/1.0/location_api/BatchingAPIClient.cpp
+++ b/gps/android/1.0/location_api/BatchingAPIClient.cpp
diff --git a/android/1.0/location_api/BatchingAPIClient.h b/gps/android/1.0/location_api/BatchingAPIClient.h
index 5d64df3..5d64df3 100644
--- a/android/1.0/location_api/BatchingAPIClient.h
+++ b/gps/android/1.0/location_api/BatchingAPIClient.h
diff --git a/android/1.0/location_api/GeofenceAPIClient.cpp b/gps/android/1.0/location_api/GeofenceAPIClient.cpp
index 774a049..774a049 100644
--- a/android/1.0/location_api/GeofenceAPIClient.cpp
+++ b/gps/android/1.0/location_api/GeofenceAPIClient.cpp
diff --git a/android/1.0/location_api/GeofenceAPIClient.h b/gps/android/1.0/location_api/GeofenceAPIClient.h
index dc99ddd..dc99ddd 100644
--- a/android/1.0/location_api/GeofenceAPIClient.h
+++ b/gps/android/1.0/location_api/GeofenceAPIClient.h
diff --git a/android/1.0/location_api/GnssAPIClient.cpp b/gps/android/1.0/location_api/GnssAPIClient.cpp
index b9fe2b2..b9fe2b2 100644
--- a/android/1.0/location_api/GnssAPIClient.cpp
+++ b/gps/android/1.0/location_api/GnssAPIClient.cpp
diff --git a/android/1.0/location_api/GnssAPIClient.h b/gps/android/1.0/location_api/GnssAPIClient.h
index 4e4b4a9..4e4b4a9 100644
--- a/android/1.0/location_api/GnssAPIClient.h
+++ b/gps/android/1.0/location_api/GnssAPIClient.h
diff --git a/android/1.0/location_api/LocationUtil.cpp b/gps/android/1.0/location_api/LocationUtil.cpp
index 102593b..102593b 100644
--- a/android/1.0/location_api/LocationUtil.cpp
+++ b/gps/android/1.0/location_api/LocationUtil.cpp
diff --git a/android/1.0/location_api/LocationUtil.h b/gps/android/1.0/location_api/LocationUtil.h
index 9e0cd36..9e0cd36 100644
--- a/android/1.0/location_api/LocationUtil.h
+++ b/gps/android/1.0/location_api/LocationUtil.h
diff --git a/android/1.0/location_api/MeasurementAPIClient.cpp b/gps/android/1.0/location_api/MeasurementAPIClient.cpp
index 73709e3..73709e3 100644
--- a/android/1.0/location_api/MeasurementAPIClient.cpp
+++ b/gps/android/1.0/location_api/MeasurementAPIClient.cpp
diff --git a/android/1.0/location_api/MeasurementAPIClient.h b/gps/android/1.0/location_api/MeasurementAPIClient.h
index c357313..c357313 100644
--- a/android/1.0/location_api/MeasurementAPIClient.h
+++ b/gps/android/1.0/location_api/MeasurementAPIClient.h
diff --git a/android/1.0/service.cpp b/gps/android/1.0/service.cpp
index 2a6f60f..2a6f60f 100644
--- a/android/1.0/service.cpp
+++ b/gps/android/1.0/service.cpp
diff --git a/android/1.1/AGnss.cpp b/gps/android/1.1/AGnss.cpp
index d8f9706..d8f9706 100644
--- a/android/1.1/AGnss.cpp
+++ b/gps/android/1.1/AGnss.cpp
diff --git a/android/1.1/AGnss.h b/gps/android/1.1/AGnss.h
index 4b599b9..4b599b9 100644
--- a/android/1.1/AGnss.h
+++ b/gps/android/1.1/AGnss.h
diff --git a/android/1.1/AGnssRil.cpp b/gps/android/1.1/AGnssRil.cpp
index 1e774f1..1e774f1 100644
--- a/android/1.1/AGnssRil.cpp
+++ b/gps/android/1.1/AGnssRil.cpp
diff --git a/android/1.1/AGnssRil.h b/gps/android/1.1/AGnssRil.h
index 5c9298a..5c9298a 100644
--- a/android/1.1/AGnssRil.h
+++ b/gps/android/1.1/AGnssRil.h
diff --git a/android/1.1/Android.mk b/gps/android/1.1/Android.mk
index fb72de1..fb72de1 100644
--- a/android/1.1/Android.mk
+++ b/gps/android/1.1/Android.mk
diff --git a/android/1.1/Gnss.cpp b/gps/android/1.1/Gnss.cpp
index bea556f..bea556f 100644
--- a/android/1.1/Gnss.cpp
+++ b/gps/android/1.1/Gnss.cpp
diff --git a/android/1.1/Gnss.h b/gps/android/1.1/Gnss.h
index 15645eb..15645eb 100644
--- a/android/1.1/Gnss.h
+++ b/gps/android/1.1/Gnss.h
diff --git a/android/1.1/GnssBatching.cpp b/gps/android/1.1/GnssBatching.cpp
index 9701aff..9701aff 100644
--- a/android/1.1/GnssBatching.cpp
+++ b/gps/android/1.1/GnssBatching.cpp
diff --git a/android/1.1/GnssBatching.h b/gps/android/1.1/GnssBatching.h
index 8e235d8..8e235d8 100644
--- a/android/1.1/GnssBatching.h
+++ b/gps/android/1.1/GnssBatching.h
diff --git a/android/1.1/GnssConfiguration.cpp b/gps/android/1.1/GnssConfiguration.cpp
index 93f9645..93f9645 100644
--- a/android/1.1/GnssConfiguration.cpp
+++ b/gps/android/1.1/GnssConfiguration.cpp
diff --git a/android/1.1/GnssConfiguration.h b/gps/android/1.1/GnssConfiguration.h
index 96681b6..96681b6 100644
--- a/android/1.1/GnssConfiguration.h
+++ b/gps/android/1.1/GnssConfiguration.h
diff --git a/android/1.1/GnssDebug.cpp b/gps/android/1.1/GnssDebug.cpp
index f164c54..f164c54 100644
--- a/android/1.1/GnssDebug.cpp
+++ b/gps/android/1.1/GnssDebug.cpp
diff --git a/android/1.1/GnssDebug.h b/gps/android/1.1/GnssDebug.h
index cb818ac..cb818ac 100644
--- a/android/1.1/GnssDebug.h
+++ b/gps/android/1.1/GnssDebug.h
diff --git a/android/1.1/GnssGeofencing.cpp b/gps/android/1.1/GnssGeofencing.cpp
index d57a666..d57a666 100644
--- a/android/1.1/GnssGeofencing.cpp
+++ b/gps/android/1.1/GnssGeofencing.cpp
diff --git a/android/1.1/GnssGeofencing.h b/gps/android/1.1/GnssGeofencing.h
index 94a73de..94a73de 100644
--- a/android/1.1/GnssGeofencing.h
+++ b/gps/android/1.1/GnssGeofencing.h
diff --git a/android/1.1/GnssMeasurement.cpp b/gps/android/1.1/GnssMeasurement.cpp
index ffe5c52..ffe5c52 100644
--- a/android/1.1/GnssMeasurement.cpp
+++ b/gps/android/1.1/GnssMeasurement.cpp
diff --git a/android/1.1/GnssMeasurement.h b/gps/android/1.1/GnssMeasurement.h
index 373f0d0..373f0d0 100644
--- a/android/1.1/GnssMeasurement.h
+++ b/gps/android/1.1/GnssMeasurement.h
diff --git a/android/1.1/GnssNi.cpp b/gps/android/1.1/GnssNi.cpp
index 5ce9569..5ce9569 100644
--- a/android/1.1/GnssNi.cpp
+++ b/gps/android/1.1/GnssNi.cpp
diff --git a/android/1.1/GnssNi.h b/gps/android/1.1/GnssNi.h
index 6733e5b..6733e5b 100644
--- a/android/1.1/GnssNi.h
+++ b/gps/android/1.1/GnssNi.h
diff --git a/android/1.1/android.hardware.gnss@1.1-service-qti.rc b/gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc
index bd65584..bd65584 100644
--- a/android/1.1/android.hardware.gnss@1.1-service-qti.rc
+++ b/gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc
diff --git a/android/1.1/android.hardware.gnss@1.1-service-qti.xml b/gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml
index c9c83fb..c9c83fb 100644
--- a/android/1.1/android.hardware.gnss@1.1-service-qti.xml
+++ b/gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml
diff --git a/android/1.1/location_api/BatchingAPIClient.cpp b/gps/android/1.1/location_api/BatchingAPIClient.cpp
index 82a803f..82a803f 100644
--- a/android/1.1/location_api/BatchingAPIClient.cpp
+++ b/gps/android/1.1/location_api/BatchingAPIClient.cpp
diff --git a/android/1.1/location_api/BatchingAPIClient.h b/gps/android/1.1/location_api/BatchingAPIClient.h
index 64d47a0..64d47a0 100644
--- a/android/1.1/location_api/BatchingAPIClient.h
+++ b/gps/android/1.1/location_api/BatchingAPIClient.h
diff --git a/android/1.1/location_api/GeofenceAPIClient.cpp b/gps/android/1.1/location_api/GeofenceAPIClient.cpp
index 93d175e..93d175e 100644
--- a/android/1.1/location_api/GeofenceAPIClient.cpp
+++ b/gps/android/1.1/location_api/GeofenceAPIClient.cpp
diff --git a/android/1.1/location_api/GeofenceAPIClient.h b/gps/android/1.1/location_api/GeofenceAPIClient.h
index c74a59a..c74a59a 100644
--- a/android/1.1/location_api/GeofenceAPIClient.h
+++ b/gps/android/1.1/location_api/GeofenceAPIClient.h
diff --git a/android/1.1/location_api/GnssAPIClient.cpp b/gps/android/1.1/location_api/GnssAPIClient.cpp
index 9a95fdf..9a95fdf 100644
--- a/android/1.1/location_api/GnssAPIClient.cpp
+++ b/gps/android/1.1/location_api/GnssAPIClient.cpp
diff --git a/android/1.1/location_api/GnssAPIClient.h b/gps/android/1.1/location_api/GnssAPIClient.h
index 82f8fbf..82f8fbf 100644
--- a/android/1.1/location_api/GnssAPIClient.h
+++ b/gps/android/1.1/location_api/GnssAPIClient.h
diff --git a/android/1.1/location_api/LocationUtil.cpp b/gps/android/1.1/location_api/LocationUtil.cpp
index f1d051c..f1d051c 100644
--- a/android/1.1/location_api/LocationUtil.cpp
+++ b/gps/android/1.1/location_api/LocationUtil.cpp
diff --git a/android/1.1/location_api/LocationUtil.h b/gps/android/1.1/location_api/LocationUtil.h
index 63f4f6f..63f4f6f 100644
--- a/android/1.1/location_api/LocationUtil.h
+++ b/gps/android/1.1/location_api/LocationUtil.h
diff --git a/android/1.1/location_api/MeasurementAPIClient.cpp b/gps/android/1.1/location_api/MeasurementAPIClient.cpp
index 6f25067..6f25067 100644
--- a/android/1.1/location_api/MeasurementAPIClient.cpp
+++ b/gps/android/1.1/location_api/MeasurementAPIClient.cpp
diff --git a/android/1.1/location_api/MeasurementAPIClient.h b/gps/android/1.1/location_api/MeasurementAPIClient.h
index 38811c5..38811c5 100644
--- a/android/1.1/location_api/MeasurementAPIClient.h
+++ b/gps/android/1.1/location_api/MeasurementAPIClient.h
diff --git a/android/1.1/service.cpp b/gps/android/1.1/service.cpp
index 0cb91f7..0cb91f7 100644
--- a/android/1.1/service.cpp
+++ b/gps/android/1.1/service.cpp
diff --git a/android/2.0/AGnss.cpp b/gps/android/2.0/AGnss.cpp
index a48f1a0..a48f1a0 100644
--- a/android/2.0/AGnss.cpp
+++ b/gps/android/2.0/AGnss.cpp
diff --git a/android/2.0/AGnss.h b/gps/android/2.0/AGnss.h
index c442327..c442327 100644
--- a/android/2.0/AGnss.h
+++ b/gps/android/2.0/AGnss.h
diff --git a/android/2.0/AGnssRil.cpp b/gps/android/2.0/AGnssRil.cpp
index a477fc2..a477fc2 100644
--- a/android/2.0/AGnssRil.cpp
+++ b/gps/android/2.0/AGnssRil.cpp
diff --git a/android/2.0/AGnssRil.h b/gps/android/2.0/AGnssRil.h
index a04d8aa..a04d8aa 100644
--- a/android/2.0/AGnssRil.h
+++ b/gps/android/2.0/AGnssRil.h
diff --git a/android/2.0/Android.mk b/gps/android/2.0/Android.mk
index 7c55504..7c55504 100644
--- a/android/2.0/Android.mk
+++ b/gps/android/2.0/Android.mk
diff --git a/android/2.0/Gnss.cpp b/gps/android/2.0/Gnss.cpp
index af76b72..af76b72 100644
--- a/android/2.0/Gnss.cpp
+++ b/gps/android/2.0/Gnss.cpp
diff --git a/android/2.0/Gnss.h b/gps/android/2.0/Gnss.h
index a403d61..a403d61 100644
--- a/android/2.0/Gnss.h
+++ b/gps/android/2.0/Gnss.h
diff --git a/android/2.0/GnssBatching.cpp b/gps/android/2.0/GnssBatching.cpp
index 7a937fc..7a937fc 100644
--- a/android/2.0/GnssBatching.cpp
+++ b/gps/android/2.0/GnssBatching.cpp
diff --git a/android/2.0/GnssBatching.h b/gps/android/2.0/GnssBatching.h
index 4c8d1db..4c8d1db 100644
--- a/android/2.0/GnssBatching.h
+++ b/gps/android/2.0/GnssBatching.h
diff --git a/android/2.0/GnssConfiguration.cpp b/gps/android/2.0/GnssConfiguration.cpp
index 363d2b1..363d2b1 100644
--- a/android/2.0/GnssConfiguration.cpp
+++ b/gps/android/2.0/GnssConfiguration.cpp
diff --git a/android/2.0/GnssConfiguration.h b/gps/android/2.0/GnssConfiguration.h
index 202a9fd..202a9fd 100644
--- a/android/2.0/GnssConfiguration.h
+++ b/gps/android/2.0/GnssConfiguration.h
diff --git a/android/2.0/GnssDebug.cpp b/gps/android/2.0/GnssDebug.cpp
index dc0d9f4..dc0d9f4 100644
--- a/android/2.0/GnssDebug.cpp
+++ b/gps/android/2.0/GnssDebug.cpp
diff --git a/android/2.0/GnssDebug.h b/gps/android/2.0/GnssDebug.h
index 8d75bea..8d75bea 100644
--- a/android/2.0/GnssDebug.h
+++ b/gps/android/2.0/GnssDebug.h
diff --git a/android/2.0/GnssGeofencing.cpp b/gps/android/2.0/GnssGeofencing.cpp
index b72d835..b72d835 100644
--- a/android/2.0/GnssGeofencing.cpp
+++ b/gps/android/2.0/GnssGeofencing.cpp
diff --git a/android/2.0/GnssGeofencing.h b/gps/android/2.0/GnssGeofencing.h
index caa56d0..caa56d0 100644
--- a/android/2.0/GnssGeofencing.h
+++ b/gps/android/2.0/GnssGeofencing.h
diff --git a/android/2.0/GnssMeasurement.cpp b/gps/android/2.0/GnssMeasurement.cpp
index 721a48c..721a48c 100644
--- a/android/2.0/GnssMeasurement.cpp
+++ b/gps/android/2.0/GnssMeasurement.cpp
diff --git a/android/2.0/GnssMeasurement.h b/gps/android/2.0/GnssMeasurement.h
index 000b00f..000b00f 100644
--- a/android/2.0/GnssMeasurement.h
+++ b/gps/android/2.0/GnssMeasurement.h
diff --git a/android/2.0/GnssNi.cpp b/gps/android/2.0/GnssNi.cpp
index d65a488..d65a488 100644
--- a/android/2.0/GnssNi.cpp
+++ b/gps/android/2.0/GnssNi.cpp
diff --git a/android/2.0/GnssNi.h b/gps/android/2.0/GnssNi.h
index 26e281f..26e281f 100644
--- a/android/2.0/GnssNi.h
+++ b/gps/android/2.0/GnssNi.h
diff --git a/android/2.0/android.hardware.gnss@2.0-service-qti.rc b/gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc
index 36ee47c..36ee47c 100644
--- a/android/2.0/android.hardware.gnss@2.0-service-qti.rc
+++ b/gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc
diff --git a/android/2.0/android.hardware.gnss@2.0-service-qti.xml b/gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml
index ff9fb2c..ff9fb2c 100644
--- a/android/2.0/android.hardware.gnss@2.0-service-qti.xml
+++ b/gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml
diff --git a/android/2.0/location_api/BatchingAPIClient.cpp b/gps/android/2.0/location_api/BatchingAPIClient.cpp
index 49cd18a..49cd18a 100644
--- a/android/2.0/location_api/BatchingAPIClient.cpp
+++ b/gps/android/2.0/location_api/BatchingAPIClient.cpp
diff --git a/android/2.0/location_api/BatchingAPIClient.h b/gps/android/2.0/location_api/BatchingAPIClient.h
index 7198341..7198341 100644
--- a/android/2.0/location_api/BatchingAPIClient.h
+++ b/gps/android/2.0/location_api/BatchingAPIClient.h
diff --git a/android/2.0/location_api/GeofenceAPIClient.cpp b/gps/android/2.0/location_api/GeofenceAPIClient.cpp
index a93c988..a93c988 100644
--- a/android/2.0/location_api/GeofenceAPIClient.cpp
+++ b/gps/android/2.0/location_api/GeofenceAPIClient.cpp
diff --git a/android/2.0/location_api/GeofenceAPIClient.h b/gps/android/2.0/location_api/GeofenceAPIClient.h
index 71049de..71049de 100644
--- a/android/2.0/location_api/GeofenceAPIClient.h
+++ b/gps/android/2.0/location_api/GeofenceAPIClient.h
diff --git a/android/2.0/location_api/GnssAPIClient.cpp b/gps/android/2.0/location_api/GnssAPIClient.cpp
index ffe9075..ffe9075 100644
--- a/android/2.0/location_api/GnssAPIClient.cpp
+++ b/gps/android/2.0/location_api/GnssAPIClient.cpp
diff --git a/android/2.0/location_api/GnssAPIClient.h b/gps/android/2.0/location_api/GnssAPIClient.h
index 63b4561..63b4561 100644
--- a/android/2.0/location_api/GnssAPIClient.h
+++ b/gps/android/2.0/location_api/GnssAPIClient.h
diff --git a/android/2.0/location_api/LocationUtil.cpp b/gps/android/2.0/location_api/LocationUtil.cpp
index 38a083a..38a083a 100644
--- a/android/2.0/location_api/LocationUtil.cpp
+++ b/gps/android/2.0/location_api/LocationUtil.cpp
diff --git a/android/2.0/location_api/LocationUtil.h b/gps/android/2.0/location_api/LocationUtil.h
index 8426de7..8426de7 100644
--- a/android/2.0/location_api/LocationUtil.h
+++ b/gps/android/2.0/location_api/LocationUtil.h
diff --git a/android/2.0/location_api/MeasurementAPIClient.cpp b/gps/android/2.0/location_api/MeasurementAPIClient.cpp
index dc972ec..dc972ec 100644
--- a/android/2.0/location_api/MeasurementAPIClient.cpp
+++ b/gps/android/2.0/location_api/MeasurementAPIClient.cpp
diff --git a/android/2.0/location_api/MeasurementAPIClient.h b/gps/android/2.0/location_api/MeasurementAPIClient.h
index 4146a13..4146a13 100644
--- a/android/2.0/location_api/MeasurementAPIClient.h
+++ b/gps/android/2.0/location_api/MeasurementAPIClient.h
diff --git a/android/2.0/service.cpp b/gps/android/2.0/service.cpp
index 664c661..664c661 100644
--- a/android/2.0/service.cpp
+++ b/gps/android/2.0/service.cpp
diff --git a/android/Android.mk b/gps/android/Android.mk
index 3b5c01f..3b5c01f 100644
--- a/android/Android.mk
+++ b/gps/android/Android.mk
diff --git a/android/measurement_corrections/1.0/MeasurementCorrections.cpp b/gps/android/measurement_corrections/1.0/MeasurementCorrections.cpp
index 2c93cb3..2c93cb3 100644
--- a/android/measurement_corrections/1.0/MeasurementCorrections.cpp
+++ b/gps/android/measurement_corrections/1.0/MeasurementCorrections.cpp
diff --git a/android/measurement_corrections/1.0/MeasurementCorrections.h b/gps/android/measurement_corrections/1.0/MeasurementCorrections.h
index ad534dc..ad534dc 100644
--- a/android/measurement_corrections/1.0/MeasurementCorrections.h
+++ b/gps/android/measurement_corrections/1.0/MeasurementCorrections.h
diff --git a/android/utils/Android.mk b/gps/android/utils/Android.mk
index 47b4081..47b4081 100644
--- a/android/utils/Android.mk
+++ b/gps/android/utils/Android.mk
diff --git a/android/utils/battery_listener.cpp b/gps/android/utils/battery_listener.cpp
index a790702..a790702 100644
--- a/android/utils/battery_listener.cpp
+++ b/gps/android/utils/battery_listener.cpp
diff --git a/android/utils/battery_listener.h b/gps/android/utils/battery_listener.h
index bb6b715..bb6b715 100644
--- a/android/utils/battery_listener.h
+++ b/gps/android/utils/battery_listener.h
diff --git a/android/visibility_control/1.0/GnssVisibilityControl.cpp b/gps/android/visibility_control/1.0/GnssVisibilityControl.cpp
index 5a8c697..5a8c697 100644
--- a/android/visibility_control/1.0/GnssVisibilityControl.cpp
+++ b/gps/android/visibility_control/1.0/GnssVisibilityControl.cpp
diff --git a/android/visibility_control/1.0/GnssVisibilityControl.h b/gps/android/visibility_control/1.0/GnssVisibilityControl.h
index 9c26e38..9c26e38 100644
--- a/android/visibility_control/1.0/GnssVisibilityControl.h
+++ b/gps/android/visibility_control/1.0/GnssVisibilityControl.h
diff --git a/batching/Android.mk b/gps/batching/Android.mk
index b08d155..b08d155 100644
--- a/batching/Android.mk
+++ b/gps/batching/Android.mk
diff --git a/batching/BatchingAdapter.cpp b/gps/batching/BatchingAdapter.cpp
index 135f0ed..135f0ed 100644
--- a/batching/BatchingAdapter.cpp
+++ b/gps/batching/BatchingAdapter.cpp
diff --git a/batching/BatchingAdapter.h b/gps/batching/BatchingAdapter.h
index 66f7c5f..66f7c5f 100644
--- a/batching/BatchingAdapter.h
+++ b/gps/batching/BatchingAdapter.h
diff --git a/batching/Makefile.am b/gps/batching/Makefile.am
index ef8011e..ef8011e 100644
--- a/batching/Makefile.am
+++ b/gps/batching/Makefile.am
diff --git a/batching/configure.ac b/gps/batching/configure.ac
index 27435c6..27435c6 100644
--- a/batching/configure.ac
+++ b/gps/batching/configure.ac
diff --git a/batching/location-batching.pc.in b/gps/batching/location-batching.pc.in
index da1fbf4..da1fbf4 100644
--- a/batching/location-batching.pc.in
+++ b/gps/batching/location-batching.pc.in
diff --git a/batching/location_batching.cpp b/gps/batching/location_batching.cpp
index 571da72..571da72 100644
--- a/batching/location_batching.cpp
+++ b/gps/batching/location_batching.cpp
diff --git a/build/target_specific_features.mk b/gps/build/target_specific_features.mk
index 766402a..766402a 100644
--- a/build/target_specific_features.mk
+++ b/gps/build/target_specific_features.mk
diff --git a/configure.ac b/gps/configure.ac
index 0ab8e68..0ab8e68 100644
--- a/configure.ac
+++ b/gps/configure.ac
diff --git a/core/Android.mk b/gps/core/Android.mk
index bd955c1..bd955c1 100644
--- a/core/Android.mk
+++ b/gps/core/Android.mk
diff --git a/core/ContextBase.cpp b/gps/core/ContextBase.cpp
index d5c3108..d5c3108 100644
--- a/core/ContextBase.cpp
+++ b/gps/core/ContextBase.cpp
diff --git a/core/ContextBase.h b/gps/core/ContextBase.h
index 5da76e2..5da76e2 100644
--- a/core/ContextBase.h
+++ b/gps/core/ContextBase.h
diff --git a/core/EngineHubProxyBase.h b/gps/core/EngineHubProxyBase.h
index ec881f6..ec881f6 100644
--- a/core/EngineHubProxyBase.h
+++ b/gps/core/EngineHubProxyBase.h
diff --git a/core/LBSProxyBase.h b/gps/core/LBSProxyBase.h
index 564c60b..564c60b 100644
--- a/core/LBSProxyBase.h
+++ b/gps/core/LBSProxyBase.h
diff --git a/core/LocAdapterBase.cpp b/gps/core/LocAdapterBase.cpp
index 1b844e5..1b844e5 100644
--- a/core/LocAdapterBase.cpp
+++ b/gps/core/LocAdapterBase.cpp
diff --git a/core/LocAdapterBase.h b/gps/core/LocAdapterBase.h
index 909b6fe..909b6fe 100644
--- a/core/LocAdapterBase.h
+++ b/gps/core/LocAdapterBase.h
diff --git a/core/LocAdapterProxyBase.h b/gps/core/LocAdapterProxyBase.h
index 727d424..727d424 100644
--- a/core/LocAdapterProxyBase.h
+++ b/gps/core/LocAdapterProxyBase.h
diff --git a/core/LocApiBase.cpp b/gps/core/LocApiBase.cpp
index 8c79cf7..8c79cf7 100644
--- a/core/LocApiBase.cpp
+++ b/gps/core/LocApiBase.cpp
diff --git a/core/LocApiBase.h b/gps/core/LocApiBase.h
index 6dac585..6dac585 100644
--- a/core/LocApiBase.h
+++ b/gps/core/LocApiBase.h
diff --git a/core/LocContext.cpp b/gps/core/LocContext.cpp
index 18d3f2d..18d3f2d 100644
--- a/core/LocContext.cpp
+++ b/gps/core/LocContext.cpp
diff --git a/core/LocContext.h b/gps/core/LocContext.h
index fb7d009..fb7d009 100644
--- a/core/LocContext.h
+++ b/gps/core/LocContext.h
diff --git a/core/Makefile.am b/gps/core/Makefile.am
index ffd9357..ffd9357 100644
--- a/core/Makefile.am
+++ b/gps/core/Makefile.am
diff --git a/core/SystemStatus.cpp b/gps/core/SystemStatus.cpp
index 7d76651..7d76651 100644
--- a/core/SystemStatus.cpp
+++ b/gps/core/SystemStatus.cpp
diff --git a/core/SystemStatus.h b/gps/core/SystemStatus.h
index 2cfb25d..2cfb25d 100644
--- a/core/SystemStatus.h
+++ b/gps/core/SystemStatus.h
diff --git a/core/SystemStatusOsObserver.cpp b/gps/core/SystemStatusOsObserver.cpp
index 0427380..0427380 100644
--- a/core/SystemStatusOsObserver.cpp
+++ b/gps/core/SystemStatusOsObserver.cpp
diff --git a/core/SystemStatusOsObserver.h b/gps/core/SystemStatusOsObserver.h
index fd60606..fd60606 100644
--- a/core/SystemStatusOsObserver.h
+++ b/gps/core/SystemStatusOsObserver.h
diff --git a/core/configure.ac b/gps/core/configure.ac
index ea0a128..ea0a128 100644
--- a/core/configure.ac
+++ b/gps/core/configure.ac
diff --git a/core/data-items/DataItemConcreteTypesBase.h b/gps/core/data-items/DataItemConcreteTypesBase.h
index c32d65d..c32d65d 100644
--- a/core/data-items/DataItemConcreteTypesBase.h
+++ b/gps/core/data-items/DataItemConcreteTypesBase.h
diff --git a/core/data-items/DataItemId.h b/gps/core/data-items/DataItemId.h
index 1661be6..1661be6 100644
--- a/core/data-items/DataItemId.h
+++ b/gps/core/data-items/DataItemId.h
diff --git a/core/data-items/DataItemsFactoryProxy.cpp b/gps/core/data-items/DataItemsFactoryProxy.cpp
index f8a5e03..f8a5e03 100644
--- a/core/data-items/DataItemsFactoryProxy.cpp
+++ b/gps/core/data-items/DataItemsFactoryProxy.cpp
diff --git a/core/data-items/DataItemsFactoryProxy.h b/gps/core/data-items/DataItemsFactoryProxy.h
index cfd447d..cfd447d 100644
--- a/core/data-items/DataItemsFactoryProxy.h
+++ b/gps/core/data-items/DataItemsFactoryProxy.h
diff --git a/core/data-items/IDataItemCore.h b/gps/core/data-items/IDataItemCore.h
index 6084c92..6084c92 100644
--- a/core/data-items/IDataItemCore.h
+++ b/gps/core/data-items/IDataItemCore.h
diff --git a/core/loc-core.pc.in b/gps/core/loc-core.pc.in
index 76b514c..76b514c 100644
--- a/core/loc-core.pc.in
+++ b/gps/core/loc-core.pc.in
diff --git a/core/loc_core_log.cpp b/gps/core/loc_core_log.cpp
index ddf18ec..ddf18ec 100644
--- a/core/loc_core_log.cpp
+++ b/gps/core/loc_core_log.cpp
diff --git a/core/loc_core_log.h b/gps/core/loc_core_log.h
index 2beb687..2beb687 100644
--- a/core/loc_core_log.h
+++ b/gps/core/loc_core_log.h
diff --git a/core/observer/IDataItemObserver.h b/gps/core/observer/IDataItemObserver.h
index 7954d85..7954d85 100644
--- a/core/observer/IDataItemObserver.h
+++ b/gps/core/observer/IDataItemObserver.h
diff --git a/core/observer/IDataItemSubscription.h b/gps/core/observer/IDataItemSubscription.h
index 7e8b8c8..7e8b8c8 100644
--- a/core/observer/IDataItemSubscription.h
+++ b/gps/core/observer/IDataItemSubscription.h
diff --git a/core/observer/IFrameworkActionReq.h b/gps/core/observer/IFrameworkActionReq.h
index 4be947f..4be947f 100644
--- a/core/observer/IFrameworkActionReq.h
+++ b/gps/core/observer/IFrameworkActionReq.h
diff --git a/core/observer/IOsObserver.h b/gps/core/observer/IOsObserver.h
index f661828..f661828 100644
--- a/core/observer/IOsObserver.h
+++ b/gps/core/observer/IOsObserver.h
diff --git a/etc/Android.mk b/gps/etc/Android.mk
index 22ca2f7..22ca2f7 100644
--- a/etc/Android.mk
+++ b/gps/etc/Android.mk
diff --git a/etc/flp.conf b/gps/etc/flp.conf
index 65d54d3..65d54d3 100644
--- a/etc/flp.conf
+++ b/gps/etc/flp.conf
diff --git a/etc/gps.conf b/gps/etc/gps.conf
index fc37653..fc37653 100644
--- a/etc/gps.conf
+++ b/gps/etc/gps.conf
diff --git a/geofence/Android.mk b/gps/geofence/Android.mk
index 6e9e870..6e9e870 100644
--- a/geofence/Android.mk
+++ b/gps/geofence/Android.mk
diff --git a/geofence/GeofenceAdapter.cpp b/gps/geofence/GeofenceAdapter.cpp
index e299589..e299589 100644
--- a/geofence/GeofenceAdapter.cpp
+++ b/gps/geofence/GeofenceAdapter.cpp
diff --git a/geofence/GeofenceAdapter.h b/gps/geofence/GeofenceAdapter.h
index 38f4823..38f4823 100644
--- a/geofence/GeofenceAdapter.h
+++ b/gps/geofence/GeofenceAdapter.h
diff --git a/geofence/Makefile.am b/gps/geofence/Makefile.am
index 61883ff..61883ff 100644
--- a/geofence/Makefile.am
+++ b/gps/geofence/Makefile.am
diff --git a/geofence/configure.ac b/gps/geofence/configure.ac
index 8e3cd81..8e3cd81 100644
--- a/geofence/configure.ac
+++ b/gps/geofence/configure.ac
diff --git a/geofence/location-geofence.pc.in b/gps/geofence/location-geofence.pc.in
index 6a0781f..6a0781f 100644
--- a/geofence/location-geofence.pc.in
+++ b/gps/geofence/location-geofence.pc.in
diff --git a/geofence/location_geofence.cpp b/gps/geofence/location_geofence.cpp
index 66729f4..66729f4 100644
--- a/geofence/location_geofence.cpp
+++ b/gps/geofence/location_geofence.cpp
diff --git a/gnss/Agps.cpp b/gps/gnss/Agps.cpp
index 9255f88..9255f88 100644
--- a/gnss/Agps.cpp
+++ b/gps/gnss/Agps.cpp
diff --git a/gnss/Agps.h b/gps/gnss/Agps.h
index d559377..d559377 100644
--- a/gnss/Agps.h
+++ b/gps/gnss/Agps.h
diff --git a/gnss/Android.mk b/gps/gnss/Android.mk
index d809bc2..d809bc2 100644
--- a/gnss/Android.mk
+++ b/gps/gnss/Android.mk
diff --git a/gnss/GnssAdapter.cpp b/gps/gnss/GnssAdapter.cpp
index c2e4a09..c2e4a09 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gps/gnss/GnssAdapter.cpp
diff --git a/gnss/GnssAdapter.h b/gps/gnss/GnssAdapter.h
index 3ccdd96..3ccdd96 100644
--- a/gnss/GnssAdapter.h
+++ b/gps/gnss/GnssAdapter.h
diff --git a/gnss/Makefile.am b/gps/gnss/Makefile.am
index db20c15..db20c15 100644
--- a/gnss/Makefile.am
+++ b/gps/gnss/Makefile.am
diff --git a/gnss/XtraSystemStatusObserver.cpp b/gps/gnss/XtraSystemStatusObserver.cpp
index a58f735..a58f735 100644
--- a/gnss/XtraSystemStatusObserver.cpp
+++ b/gps/gnss/XtraSystemStatusObserver.cpp
diff --git a/gnss/XtraSystemStatusObserver.h b/gps/gnss/XtraSystemStatusObserver.h
index 3a5259d..3a5259d 100644
--- a/gnss/XtraSystemStatusObserver.h
+++ b/gps/gnss/XtraSystemStatusObserver.h
diff --git a/gnss/location_gnss.cpp b/gps/gnss/location_gnss.cpp
index 76839b6..76839b6 100644
--- a/gnss/location_gnss.cpp
+++ b/gps/gnss/location_gnss.cpp
diff --git a/gps_vendor_board.mk b/gps/gps_vendor_board.mk
index e1915ea..e1915ea 100644
--- a/gps_vendor_board.mk
+++ b/gps/gps_vendor_board.mk
diff --git a/gps_vendor_product.mk b/gps/gps_vendor_product.mk
index 6e938b3..6e938b3 100644
--- a/gps_vendor_product.mk
+++ b/gps/gps_vendor_product.mk
diff --git a/loc-hal.pc.in b/gps/loc-hal.pc.in
index 22d174b..22d174b 100644
--- a/loc-hal.pc.in
+++ b/gps/loc-hal.pc.in
diff --git a/location/Android.mk b/gps/location/Android.mk
index bbd6fbd..bbd6fbd 100644
--- a/location/Android.mk
+++ b/gps/location/Android.mk
diff --git a/location/ILocationAPI.h b/gps/location/ILocationAPI.h
index 3df6f79..3df6f79 100644
--- a/location/ILocationAPI.h
+++ b/gps/location/ILocationAPI.h
diff --git a/location/LocationAPI.cpp b/gps/location/LocationAPI.cpp
index 4348c27..4348c27 100644
--- a/location/LocationAPI.cpp
+++ b/gps/location/LocationAPI.cpp
diff --git a/location/LocationAPI.h b/gps/location/LocationAPI.h
index 6f5987c..6f5987c 100644
--- a/location/LocationAPI.h
+++ b/gps/location/LocationAPI.h
diff --git a/location/LocationAPIClientBase.cpp b/gps/location/LocationAPIClientBase.cpp
index 5a09712..5a09712 100644
--- a/location/LocationAPIClientBase.cpp
+++ b/gps/location/LocationAPIClientBase.cpp
diff --git a/location/LocationAPIClientBase.h b/gps/location/LocationAPIClientBase.h
index 098000c..098000c 100644
--- a/location/LocationAPIClientBase.h
+++ b/gps/location/LocationAPIClientBase.h
diff --git a/location/LocationDataTypes.h b/gps/location/LocationDataTypes.h
index 17094ab..17094ab 100644
--- a/location/LocationDataTypes.h
+++ b/gps/location/LocationDataTypes.h
diff --git a/location/Makefile.am b/gps/location/Makefile.am
index fccdf94..fccdf94 100644
--- a/location/Makefile.am
+++ b/gps/location/Makefile.am
diff --git a/location/configure.ac b/gps/location/configure.ac
index 6391d65..6391d65 100644
--- a/location/configure.ac
+++ b/gps/location/configure.ac
diff --git a/location/location-api.pc.in b/gps/location/location-api.pc.in
index c7b146a..c7b146a 100644
--- a/location/location-api.pc.in
+++ b/gps/location/location-api.pc.in
diff --git a/location/location_interface.h b/gps/location/location_interface.h
index fb15bea..fb15bea 100644
--- a/location/location_interface.h
+++ b/gps/location/location_interface.h
diff --git a/pla/Android.mk b/gps/pla/Android.mk
index a57861d..a57861d 100644
--- a/pla/Android.mk
+++ b/gps/pla/Android.mk
diff --git a/pla/android/loc_pla.h b/gps/pla/android/loc_pla.h
index 6104bfb..6104bfb 100644
--- a/pla/android/loc_pla.h
+++ b/gps/pla/android/loc_pla.h
diff --git a/pla/oe/loc_pla.h b/gps/pla/oe/loc_pla.h
index e795a23..e795a23 100644
--- a/pla/oe/loc_pla.h
+++ b/gps/pla/oe/loc_pla.h
diff --git a/utils/Android.mk b/gps/utils/Android.mk
index 3887696..3887696 100644
--- a/utils/Android.mk
+++ b/gps/utils/Android.mk
diff --git a/utils/LocHeap.cpp b/gps/utils/LocHeap.cpp
index d667f14..d667f14 100644
--- a/utils/LocHeap.cpp
+++ b/gps/utils/LocHeap.cpp
diff --git a/utils/LocHeap.h b/gps/utils/LocHeap.h
index b491948..b491948 100644
--- a/utils/LocHeap.h
+++ b/gps/utils/LocHeap.h
diff --git a/utils/LocIpc.cpp b/gps/utils/LocIpc.cpp
index e9dbe9d..e9dbe9d 100644
--- a/utils/LocIpc.cpp
+++ b/gps/utils/LocIpc.cpp
diff --git a/utils/LocIpc.h b/gps/utils/LocIpc.h
index d6f8d1d..d6f8d1d 100644
--- a/utils/LocIpc.h
+++ b/gps/utils/LocIpc.h
diff --git a/utils/LocSharedLock.h b/gps/utils/LocSharedLock.h
index a7af35e..a7af35e 100644
--- a/utils/LocSharedLock.h
+++ b/gps/utils/LocSharedLock.h
diff --git a/utils/LocThread.cpp b/gps/utils/LocThread.cpp
index 568a6bb..568a6bb 100644
--- a/utils/LocThread.cpp
+++ b/gps/utils/LocThread.cpp
diff --git a/utils/LocThread.h b/gps/utils/LocThread.h
index 2a65d8f..2a65d8f 100644
--- a/utils/LocThread.h
+++ b/gps/utils/LocThread.h
diff --git a/utils/LocTimer.cpp b/gps/utils/LocTimer.cpp
index 93775d0..93775d0 100644
--- a/utils/LocTimer.cpp
+++ b/gps/utils/LocTimer.cpp
diff --git a/utils/LocTimer.h b/gps/utils/LocTimer.h
index abc7f64..abc7f64 100644
--- a/utils/LocTimer.h
+++ b/gps/utils/LocTimer.h
diff --git a/utils/LocUnorderedSetMap.h b/gps/utils/LocUnorderedSetMap.h
index 8748134..8748134 100644
--- a/utils/LocUnorderedSetMap.h
+++ b/gps/utils/LocUnorderedSetMap.h
diff --git a/utils/Makefile.am b/gps/utils/Makefile.am
index 9a9c67e..9a9c67e 100644
--- a/utils/Makefile.am
+++ b/gps/utils/Makefile.am
diff --git a/utils/MsgTask.cpp b/gps/utils/MsgTask.cpp
index 73a77fd..73a77fd 100644
--- a/utils/MsgTask.cpp
+++ b/gps/utils/MsgTask.cpp
diff --git a/utils/MsgTask.h b/gps/utils/MsgTask.h
index 9eb1f56..9eb1f56 100644
--- a/utils/MsgTask.h
+++ b/gps/utils/MsgTask.h
diff --git a/utils/configure.ac b/gps/utils/configure.ac
index fd16494..fd16494 100644
--- a/utils/configure.ac
+++ b/gps/utils/configure.ac
diff --git a/utils/gps-utils.pc.in b/gps/utils/gps-utils.pc.in
index a988731..a988731 100644
--- a/utils/gps-utils.pc.in
+++ b/gps/utils/gps-utils.pc.in
diff --git a/utils/gps_extended.h b/gps/utils/gps_extended.h
index 2455629..2455629 100644
--- a/utils/gps_extended.h
+++ b/gps/utils/gps_extended.h
diff --git a/utils/gps_extended_c.h b/gps/utils/gps_extended_c.h
index 69a659e..69a659e 100644
--- a/utils/gps_extended_c.h
+++ b/gps/utils/gps_extended_c.h
diff --git a/utils/linked_list.c b/gps/utils/linked_list.c
index 02e1463..02e1463 100644
--- a/utils/linked_list.c
+++ b/gps/utils/linked_list.c
diff --git a/utils/linked_list.h b/gps/utils/linked_list.h
index 0b33ecb..0b33ecb 100644
--- a/utils/linked_list.h
+++ b/gps/utils/linked_list.h
diff --git a/utils/loc_cfg.cpp b/gps/utils/loc_cfg.cpp
index 9c1f0b3..9c1f0b3 100644
--- a/utils/loc_cfg.cpp
+++ b/gps/utils/loc_cfg.cpp
diff --git a/utils/loc_cfg.h b/gps/utils/loc_cfg.h
index 5c77dc6..5c77dc6 100644
--- a/utils/loc_cfg.h
+++ b/gps/utils/loc_cfg.h
diff --git a/utils/loc_gps.h b/gps/utils/loc_gps.h
index eae7383..eae7383 100644
--- a/utils/loc_gps.h
+++ b/gps/utils/loc_gps.h
diff --git a/utils/loc_log.cpp b/gps/utils/loc_log.cpp
index ab28998..ab28998 100644
--- a/utils/loc_log.cpp
+++ b/gps/utils/loc_log.cpp
diff --git a/utils/loc_log.h b/gps/utils/loc_log.h
index be492b1..be492b1 100644
--- a/utils/loc_log.h
+++ b/gps/utils/loc_log.h
diff --git a/utils/loc_misc_utils.cpp b/gps/utils/loc_misc_utils.cpp
index 70fdbc3..70fdbc3 100644
--- a/utils/loc_misc_utils.cpp
+++ b/gps/utils/loc_misc_utils.cpp
diff --git a/utils/loc_misc_utils.h b/gps/utils/loc_misc_utils.h
index fad1b6d..fad1b6d 100644
--- a/utils/loc_misc_utils.h
+++ b/gps/utils/loc_misc_utils.h
diff --git a/utils/loc_nmea.cpp b/gps/utils/loc_nmea.cpp
index 41a707d..41a707d 100644
--- a/utils/loc_nmea.cpp
+++ b/gps/utils/loc_nmea.cpp
diff --git a/utils/loc_nmea.h b/gps/utils/loc_nmea.h
index c6c83db..c6c83db 100644
--- a/utils/loc_nmea.h
+++ b/gps/utils/loc_nmea.h
diff --git a/utils/loc_target.cpp b/gps/utils/loc_target.cpp
index f6fd728..f6fd728 100644
--- a/utils/loc_target.cpp
+++ b/gps/utils/loc_target.cpp
diff --git a/utils/loc_target.h b/gps/utils/loc_target.h
index 172b475..172b475 100644
--- a/utils/loc_target.h
+++ b/gps/utils/loc_target.h
diff --git a/utils/loc_timer.h b/gps/utils/loc_timer.h
index fff0c46..fff0c46 100644
--- a/utils/loc_timer.h
+++ b/gps/utils/loc_timer.h
diff --git a/utils/log_util.h b/gps/utils/log_util.h
index ed7e19e..ed7e19e 100644
--- a/utils/log_util.h
+++ b/gps/utils/log_util.h
diff --git a/utils/msg_q.c b/gps/utils/msg_q.c
index 2d49b4a..2d49b4a 100644
--- a/utils/msg_q.c
+++ b/gps/utils/msg_q.c
diff --git a/utils/msg_q.h b/gps/utils/msg_q.h
index 16df494..16df494 100644
--- a/utils/msg_q.h
+++ b/gps/utils/msg_q.h
diff --git a/idc/uinput-fpc.idc b/idc/uinput-fpc.idc
new file mode 100644
index 0000000..4cb1a4a
--- /dev/null
+++ b/idc/uinput-fpc.idc
@@ -0,0 +1,15 @@
+#
+# FPC1020 Touch sensor driver
+#
+# Copyright (c) 2013,2014 Fingerprint Cards AB <tech@fingerprints.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License Version 2
+# as published by the Free Software Foundation.
+#
+
+device.internal = 1
+
+keyboard.layout = uinput-fpc
+keyboard.builtIn = 1
+keyboard.orientationAware = 1
diff --git a/idc/uinput-goodix.idc b/idc/uinput-goodix.idc
new file mode 100644
index 0000000..68f2c91
--- /dev/null
+++ b/idc/uinput-goodix.idc
@@ -0,0 +1,15 @@
+#
+# FPC1020 Touch sensor driver
+#
+# Copyright (c) 2013,2014 Fingerprint Cards AB <tech@fingerprints.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License Version 2
+# as published by the Free Software Foundation.
+#
+
+device.internal = 1
+
+keyboard.layout = uinput-goodix
+keyboard.builtIn = 1
+keyboard.orientationAware = 1
diff --git a/init/Android.mk b/init/Android.mk
new file mode 100644
index 0000000..488bdfc
--- /dev/null
+++ b/init/Android.mk
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2016 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_C_INCLUDES := \
+ system/core/base/include \
+ system/core/init
+LOCAL_MODULE := libinit_sdm660
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := init_sdm660.cpp
+LOCAL_STATIC_LIBRARIES := \
+ libbase \
+ libselinux
+LOCAL_CFLAGS := -Wall
+
+ifneq ($(TARGET_LIBINIT_WAYNE_DEFINES_FILE),)
+ LOCAL_CFLAGS += -DTARGET_HAVE_LIBINIT
+ LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_WAYNE_DEFINES_FILE)
+endif
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/init/init_sdm660.cpp b/init/init_sdm660.cpp
new file mode 100644
index 0000000..5b76c75
--- /dev/null
+++ b/init/init_sdm660.cpp
@@ -0,0 +1,95 @@
+/*
+ Copyright (c) 2016, The CyanogenMod Project
+ Copyright (c) 2017, The LineageOS Project
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <cstdlib>
+#include <fstream>
+#include <string.h>
+#include <sys/sysinfo.h>
+#include <unistd.h>
+
+#include <android-base/properties.h>
+#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#include <sys/_system_properties.h>
+
+#include "vendor_init.h"
+#include "property_service.h"
+#include "init_sdm660.h"
+
+using android::base::GetProperty;
+using android::init::property_set;
+
+char const *heapstartsize;
+char const *heapgrowthlimit;
+char const *heapsize;
+char const *heapminfree;
+char const *heapmaxfree;
+
+#ifdef TARGET_HAVE_LIBINIT
+__attribute__ ((weak))
+void init_target_properties() {}
+#endif
+
+void check_device()
+{
+ struct sysinfo sys;
+
+ sysinfo(&sys);
+
+ if (sys.totalram > 3072ull * 1024 * 1024) {
+ // from - phone-xxhdpi-4096-dalvik-heap.mk
+ heapstartsize = "16m";
+ heapgrowthlimit = "256m";
+ heapsize = "512m";
+ heapminfree = "4m";
+ heapmaxfree = "8m";
+ } else if (sys.totalram > 2048ull * 1024 * 1024) {
+ // from - phone-xxhdpi-3072-dalvik-heap.mk
+ heapstartsize = "8m";
+ heapgrowthlimit = "288m";
+ heapsize = "768m";
+ heapminfree = "512k";
+ heapmaxfree = "8m";
+ }
+}
+
+void vendor_load_properties()
+{
+ check_device();
+#ifdef TARGET_HAVE_LIBINIT
+ init_target_properties();
+#endif
+
+ property_set("dalvik.vm.heapstartsize", heapstartsize);
+ property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
+ property_set("dalvik.vm.heapsize", heapsize);
+ property_set("dalvik.vm.heaptargetutilization", "0.75");
+ property_set("dalvik.vm.heapminfree", heapminfree);
+ property_set("dalvik.vm.heapmaxfree", heapmaxfree);
+}
diff --git a/init/init_sdm660.h b/init/init_sdm660.h
new file mode 100644
index 0000000..d25d9a2
--- /dev/null
+++ b/init/init_sdm660.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2016, The CyanogenMod Project
+ Copyright (c) 2017, The LineageOS Project
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INIT_SDM660__H__
+#define __INIT_SDM660__H__
+#ifdef TARGET_HAVE_LIBINIT
+void init_target_properties();
+#endif
+#endif /* __INIT_SDM660__H__ */
diff --git a/keylayout/sdm660-snd-card_Button_Jack.kl b/keylayout/sdm660-snd-card_Button_Jack.kl
new file mode 100644
index 0000000..609d8cc
--- /dev/null
+++ b/keylayout/sdm660-snd-card_Button_Jack.kl
@@ -0,0 +1,5 @@
+# xuke @ 20160104 Import MIUI patch for headset buttons.
+
+key 226 HEADSETHOOK WAKE
+key 257 MEDIA_PREVIOUS WAKE
+key 258 MEDIA_NEXT WAKE
diff --git a/keylayout/uinput-fpc.kl b/keylayout/uinput-fpc.kl
new file mode 100644
index 0000000..d74c6a1
--- /dev/null
+++ b/keylayout/uinput-fpc.kl
@@ -0,0 +1,15 @@
+#
+# FPC1020 Touch sensor driver
+#
+# Copyright (c) 2013,2014 Fingerprint Cards AB <tech@fingerprints.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License Version 2
+# as published by the Free Software Foundation.
+#
+
+#key 96 DPAD_CENTER
+#key 102 HOME
+#key 105 DPAD_LEFT
+#key 106 DPAD_RIGHT
+
diff --git a/keylayout/uinput-goodix.kl b/keylayout/uinput-goodix.kl
new file mode 100644
index 0000000..9f9c65c
--- /dev/null
+++ b/keylayout/uinput-goodix.kl
@@ -0,0 +1,14 @@
+#
+# Goodix fingerprint sensor driver
+#
+# Copyright (c) 2013,2014 Fingerprint Cards AB <tech@fingerprints.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License Version 2
+# as published by the Free Software Foundation.
+#
+#key 96 DPAD_CENTER
+#key 96 DPAD_CENTER
+#key 102 HOME
+#key 105 DPAD_LEFT
+#key 106 DPAD_RIGHT
diff --git a/libhidl/Android.mk b/libhidl/Android.mk
new file mode 100644
index 0000000..b709215
--- /dev/null
+++ b/libhidl/Android.mk
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2017 The LineageOS 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 $(CLEAR_VARS)
+LOCAL_SHARED_LIBRARIES := libhidltransport
+LOCAL_MODULE := android.hidl.base@1.0
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+include $(BUILD_SHARED_LIBRARY)
diff --git a/light/Android.bp b/light/Android.bp
new file mode 100644
index 0000000..e05d16d
--- /dev/null
+++ b/light/Android.bp
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 2018 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.
+
+cc_binary {
+ defaults: ["hidl_defaults"],
+ name: "android.hardware.light@2.0-service.xiaomi_sdm660",
+ init_rc: ["android.hardware.light@2.0-service.xiaomi_sdm660.rc"],
+ srcs: ["service.cpp", "Light.cpp"],
+ shared_libs: [
+ "libhardware",
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.light@2.0",
+ ],
+ relative_install_path : "hw",
+ proprietary: true,
+}
diff --git a/light/Light.cpp b/light/Light.cpp
new file mode 100644
index 0000000..780d3ab
--- /dev/null
+++ b/light/Light.cpp
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+//Author := dev_harsh1998, Isaac Chen
+
+#define LOG_TAG "android.hardware.light@2.0-service.xiaomi_sdm660"
+
+#include <log/log.h>
+#include <fstream>
+#include "Light.h"
+
+namespace android {
+namespace hardware {
+namespace light {
+namespace V2_0 {
+namespace implementation {
+
+#define LEDS "/sys/class/leds/"
+#define LCD_LED LEDS "lcd-backlight/"
+#define BRIGHTNESS "brightness"
+#define RED LEDS "red/"
+#define BLINK "blink"
+#define DUTY_PCTS "duty_pcts"
+#define PAUSE_HI "pause_hi"
+#define PAUSE_LO "pause_lo"
+#define RAMP_STEP_MS "ramp_step_ms"
+#define START_IDX "start_idx"
+
+/*
+ * 8 duty percent steps.
+ */
+#define RAMP_STEPS 15
+/*
+ * Each step will stay on for 50ms by default.
+ */
+#define RAMP_STEP_DURATION 150
+/*
+ * Each value represents a duty percent (0 - 100) for the led pwm.
+ */
+static int32_t BRIGHTNESS_RAMP[RAMP_STEPS] = {0, 12, 25, 37, 50, 72, 85, 100, 85, 72, 50, 37, 25, 12, 0};
+
+/*
+ * Write value to path and close file.
+ */
+static void set(std::string path, std::string value) {
+ std::ofstream file(path);
+ /* Only write brightness value if stream is open, alive & well */
+ if (file.is_open()) {
+ file << value;
+ } else {
+ /* Fire a warning a bail out */
+ ALOGE("failed to write %s to %s", value.c_str(), path.c_str());
+ return;
+ }
+}
+
+static void set(std::string path, int value) {
+ set(path, std::to_string(value));
+}
+
+/*
+ * Scale each value of the brightness ramp according to the
+ * brightness of the color.
+ */
+static std::string getScaledRamp(uint32_t brightness) {
+ std::string ramp, pad;
+
+ for (auto const& step : BRIGHTNESS_RAMP) {
+ ramp += pad + std::to_string(step * brightness / 0xFF);
+ pad = ",";
+ }
+
+ return ramp;
+}
+
+static void handleXiaomiBacklight(Type /*type*/, const LightState& state) {
+ uint32_t brightness = state.color & 0xFF;
+ brightness *= 16; // HACK
+ set(LCD_LED BRIGHTNESS, brightness);
+}
+
+static void setNotification(const LightState& state) {
+ uint32_t redBrightness, brightness;
+
+ /*
+ * Extract brightness from RGB.
+ */
+ redBrightness = (state.color >> 16) & 0xFF;
+ brightness = (state.color >> 24) & 0xFF;
+
+ /*
+ * Scale RGB brightness if the Alpha brightness is not 0xFF.
+ */
+ if (brightness != 0xFF) {
+ redBrightness = (redBrightness * brightness) / 0xFF;
+ }
+
+ /* Turn off the leds (initially) */
+ set(RED BRIGHTNESS, 0);
+ set(RED BLINK, 0);
+
+ if (state.flashMode == Flash::TIMED) {
+ /*
+ * If the flashOnMs duration is not long enough to fit ramping up
+ * and down at the default step duration, step duration is modified
+ * to fit.
+ */
+ int32_t stepDuration = RAMP_STEP_DURATION;
+ int32_t pauseHi = state.flashOnMs - (stepDuration * RAMP_STEPS * 2);
+ int32_t pauseLo = state.flashOffMs;
+
+ if (pauseHi < 0) {
+ pauseHi = 0;
+ }
+
+ /* Red(Actually White) */
+ set(RED BLINK, 1);
+ set(RED START_IDX, 0 * RAMP_STEPS);
+ set(RED DUTY_PCTS, getScaledRamp(redBrightness));
+ set(RED PAUSE_LO, pauseLo);
+ set(RED PAUSE_HI, pauseHi);
+ set(RED RAMP_STEP_MS, stepDuration);
+ } else {
+ set(RED BRIGHTNESS, redBrightness);
+ }
+}
+
+static inline bool isLit(const LightState& state) {
+ return state.color & 0x00ffffff;
+}
+
+/*
+ * Keep sorted in the order of importance.
+ */
+static const LightState offState = {};
+static std::vector<std::pair<Type, LightState>> notificationStates = {
+ { Type::ATTENTION, offState },
+ { Type::NOTIFICATIONS, offState },
+ { Type::BATTERY, offState },
+};
+
+static void handleXiaomiNotification(Type type, const LightState& state) {
+ for(auto it : notificationStates) {
+ if (it.first == type) {
+ it.second = state;
+ }
+
+ if (isLit(it.second)) {
+ setNotification(it.second);
+ return;
+ }
+ }
+
+ setNotification(offState);
+}
+
+static std::map<Type, std::function<void(Type type, const LightState&)>> lights = {
+ {Type::BACKLIGHT, handleXiaomiBacklight},
+ {Type::NOTIFICATIONS, handleXiaomiNotification},
+ {Type::BATTERY, handleXiaomiNotification},
+ {Type::ATTENTION, handleXiaomiNotification},
+};
+
+Light::Light() {}
+
+Return<Status> Light::setLight(Type type, const LightState& state) {
+ auto it = lights.find(type);
+
+ if (it == lights.end()) {
+ return Status::LIGHT_NOT_SUPPORTED;
+ }
+
+ /*
+ * Lock global mutex until light state is updated.
+ */
+
+ std::lock_guard<std::mutex> lock(globalLock);
+ it->second(type, state);
+ return Status::SUCCESS;
+}
+
+Return<void> Light::getSupportedTypes(getSupportedTypes_cb _hidl_cb) {
+ std::vector<Type> types;
+
+ for (auto const& light : lights) types.push_back(light.first);
+
+ _hidl_cb(types);
+
+ return Void();
+}
+
+} // namespace implementation
+} // namespace V2_0
+} // namespace light
+} // namespace hardware
+} // namespace android
diff --git a/light/Light.h b/light/Light.h
new file mode 100644
index 0000000..311b7de
--- /dev/null
+++ b/light/Light.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2017 The LineageOS 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.
+ */
+#ifndef ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
+#define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
+
+#include <android/hardware/light/2.0/ILight.h>
+#include <hardware/lights.h>
+#include <hidl/Status.h>
+#include <map>
+#include <mutex>
+
+namespace android {
+namespace hardware {
+namespace light {
+namespace V2_0 {
+namespace implementation {
+
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::light::V2_0::ILight;
+using ::android::hardware::light::V2_0::LightState;
+using ::android::hardware::light::V2_0::Status;
+using ::android::hardware::light::V2_0::Type;
+
+class Light : public ILight {
+ public:
+ Light();
+
+ Return<Status> setLight(Type type, const LightState& state) override;
+ Return<void> getSupportedTypes(getSupportedTypes_cb _hidl_cb) override;
+
+ private:
+ std::mutex globalLock;
+};
+
+} // namespace implementation
+} // namespace V2_0
+} // namespace light
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
diff --git a/light/android.hardware.light@2.0-service.xiaomi_sdm660.rc b/light/android.hardware.light@2.0-service.xiaomi_sdm660.rc
new file mode 100644
index 0000000..ba0f41a
--- /dev/null
+++ b/light/android.hardware.light@2.0-service.xiaomi_sdm660.rc
@@ -0,0 +1,21 @@
+on boot
+ # Notification LED
+ chown system system /sys/class/leds/red/blink
+ chown system system /sys/class/leds/red/brightness
+ chown system system /sys/class/leds/red/duty_pcts
+ chown system system /sys/class/leds/red/pause_hi
+ chown system system /sys/class/leds/red/pause_lo
+ chown system system /sys/class/leds/red/ramp_step_ms
+ chown system system /sys/class/leds/red/start_idx
+
+ chmod 660 /sys/class/leds/red/duty_pcts
+ chmod 660 /sys/class/leds/red/pause_hi
+ chmod 660 /sys/class/leds/red/pause_lo
+ chmod 660 /sys/class/leds/red/ramp_step_ms
+ chmod 660 /sys/class/leds/red/start_idx
+
+service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_sdm660
+ class hal
+ user system
+ group system
+ shutdown critical
diff --git a/light/service.cpp b/light/service.cpp
new file mode 100644
index 0000000..8f6fa88
--- /dev/null
+++ b/light/service.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2018 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.
+ */
+
+#define LOG_TAG "android.hardware.light@2.0-service.xiaomi_sdm660"
+
+#include <hidl/HidlTransportSupport.h>
+
+#include "Light.h"
+
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+
+using android::hardware::light::V2_0::ILight;
+using android::hardware::light::V2_0::implementation::Light;
+
+using android::OK;
+using android::sp;
+using android::status_t;
+
+int main() {
+ android::sp<ILight> service = new Light();
+
+ configureRpcThreadpool(1, true);
+
+ status_t status = service->registerAsService();
+ if (status != OK) {
+ ALOGE("Cannot register Light HAL service.");
+ return 1;
+ }
+
+ ALOGI("Light HAL service ready.");
+
+ joinRpcThreadpool();
+
+ ALOGI("Light HAL service failed to join thread pool.");
+ return 1;
+}
diff --git a/lineage.dependencies b/lineage.dependencies
new file mode 100644
index 0000000..983140a
--- /dev/null
+++ b/lineage.dependencies
@@ -0,0 +1,10 @@
+[
+ {
+ "repository": "android_kernel_xiaomi_sdm660",
+ "target_path": "kernel/xiaomi/sdm660"
+ },
+ {
+ "repository": "android_packages_resources_devicesettings",
+ "target_path": "packages/resources/devicesettings"
+ }
+]
diff --git a/manifest.xml b/manifest.xml
new file mode 100644
index 0000000..65d39f5
--- /dev/null
+++ b/manifest.xml
@@ -0,0 +1,730 @@
+<!-- Copyright (c) 2017, 2018 The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<manifest version="1.0" type="device" target-level="2">
+ <hal format="hidl">
+ <name>android.hardware.audio</name>
+ <transport>hwbinder</transport>
+ <version>4.0</version>
+ <interface>
+ <name>IDevicesFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.audio.effect</name>
+ <transport>hwbinder</transport>
+ <version>4.0</version>
+ <interface>
+ <name>IEffectsFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.biometrics.fingerprint</name>
+ <transport>hwbinder</transport>
+ <version>2.1</version>
+ <interface>
+ <name>IBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.bluetooth</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IBluetoothHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.boot</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IBootControl</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.broadcastradio</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IBroadcastRadioFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.camera.provider</name>
+ <transport>hwbinder</transport>
+ <version>2.4</version>
+ <interface>
+ <name>ICameraProvider</name>
+ <instance>legacy/0</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.cas</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IMediaCasService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.configstore</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>ISurfaceFlingerConfigs</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.drm</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>ICryptoFactory</name>
+ <instance>clearkey</instance>
+ <instance>default</instance>
+ <instance>widevine</instance>
+ </interface>
+ <interface>
+ <name>IDrmFactory</name>
+ <instance>clearkey</instance>
+ <instance>default</instance>
+ <instance>widevine</instance>
+ </interface>
+ <fqname>@1.1::ICryptoFactory/clearkey</fqname>
+ <fqname>@1.1::IDrmFactory/clearkey</fqname>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.gatekeeper</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IGatekeeper</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.gnss</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ <fqname>@1.0::IGnss/gnss_vendor</fqname>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.graphics.allocator</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IAllocator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.graphics.composer</name>
+ <transport>hwbinder</transport>
+ <version>2.1</version>
+ <interface>
+ <name>IComposer</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.graphics.mapper</name>
+ <transport arch="32+64">passthrough</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IMapper</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.health</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IHealth</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.ir</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IConsumerIr</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.keymaster</name>
+ <transport>hwbinder</transport>
+ <version>3.0</version>
+ <interface>
+ <name>IKeymasterDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.light</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>ILight</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.media.omx</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IOmx</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IOmxStore</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.memtrack</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IMemtrack</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.power</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>IPower</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.radio</name>
+ <transport>hwbinder</transport>
+ <version>1.2</version>
+ <interface>
+ <name>IRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ <interface>
+ <name>ISap</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.radio.config</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IRadioConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.renderscript</name>
+ <transport arch="32+64">passthrough</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.sensors</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>ISensors</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.soundtrigger</name>
+ <transport>hwbinder</transport>
+ <version>2.1</version>
+ <interface>
+ <name>ISoundTriggerHw</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.tetheroffload.config</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IOffloadConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.tetheroffload.control</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IOffloadControl</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.thermal</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IThermal</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.usb</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IUsb</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.vibrator</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IVibrator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.wifi</name>
+ <transport>hwbinder</transport>
+ <version>1.2</version>
+ <interface>
+ <name>IWifi</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.wifi.hostapd</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IHostapd</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.wifi.supplicant</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>ISupplicant</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.fingerprints.extension</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IFingerprintAuthenticator</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintCalibration</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintEngineering</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintNavigation</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintRecalibration</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintSenseTouch</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintSensorTest</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.qualcomm.qti.ant</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IAntHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.qualcomm.qti.bluetooth_audio</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IBluetoothAudio</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.qualcomm.qti.dpm.api</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IdpmQmi</name>
+ <instance>dpmQmiService</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.qualcomm.qti.imscmservice</name>
+ <transport>hwbinder</transport>
+ <version>2.1</version>
+ <interface>
+ <name>IImsCmService</name>
+ <instance>qti.ims.connectionmanagerservice</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.qualcomm.qti.uceservice</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IUceService</name>
+ <instance>com.qualcomm.qti.uceservice</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.quicinc.cne.api</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>IApiService</name>
+ <instance>cnd</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.quicinc.cne.server</name>
+ <transport>hwbinder</transport>
+ <version>2.2</version>
+ <interface>
+ <name>IServer</name>
+ <instance>cnd</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>com.qualcomm.qti.wifidisplayhal</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IDSManager</name>
+ <instance>wifidisplaydshal</instance>
+ </interface>
+ <interface>
+ <name>IHDCPSession</name>
+ <instance>wifidisplayhdcphal</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.display.color</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IDisplayColor</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.display.config</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>IDisplayConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.display.postproc</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IDisplayPostproc</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.goodix.hardware.fingerprint</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IGoodixBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.lineage.livedisplay</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IDisplayModes</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IPictureAdjustment</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.lineage.power</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>ILineagePower</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.lineage.trust</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IUsbRestrict</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.data.factory</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.esepowermanager</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IEsePowerManager</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.gnss</name>
+ <transport>hwbinder</transport>
+ <version>1.2</version>
+ <interface>
+ <name>ILocHidlGnss</name>
+ <instance>gnss_vendor</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.gnss</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>ILocHidlGnss</name>
+ <instance>gnss_vendor</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.alarm</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IAlarm</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.data.latency</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>ILinkLatency</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.fm</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IFmHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.perf</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IPerf</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.am</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IQcRilAudio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.ims</name>
+ <transport>hwbinder</transport>
+ <version>1.4</version>
+ <interface>
+ <name>IImsRadio</name>
+ <instance>imsradio0</instance>
+ <instance>imsradio1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.lpa</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IUimLpa</name>
+ <instance>UimLpa0</instance>
+ <instance>UimLpa1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.qcrilhook</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IQtiOemHook</name>
+ <instance>oemhook0</instance>
+ <instance>oemhook1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.qtiradio</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IQtiRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.qtiradio</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IQtiRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.uim</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>IUim</name>
+ <instance>Uim0</instance>
+ <instance>Uim1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.uim_remote_client</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IUimRemoteServiceClient</name>
+ <instance>uimRemoteClient0</instance>
+ <instance>uimRemoteClient1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.radio.uim_remote_server</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IUimRemoteServiceServer</name>
+ <instance>uimRemoteServer0</instance>
+ <instance>uimRemoteServer1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.hardware.soter</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>ISoter</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.qti.imsrtpservice</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IRTPService</name>
+ <instance>imsrtpservice</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>vendor.xiaomi.hardware.mlipay</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>IMlipayService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/org.ifaa.android.manager/Android.mk b/org.ifaa.android.manager/Android.mk
new file mode 100644
index 0000000..c77d585
--- /dev/null
+++ b/org.ifaa.android.manager/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2017-2019 The LineageOS 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_SRC_FILES := \
+ $(call all-Iaidl-files-under, src) \
+ $(call all-java-files-under, src)
+
+LOCAL_MODULE := org.ifaa.android.manager
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+include $(BUILD_JAVA_LIBRARY)
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManager.java b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManager.java
new file mode 100644
index 0000000..b793d36
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManager.java
@@ -0,0 +1,61 @@
+package org.ifaa.android.manager;
+
+import android.content.Context;
+import android.os.Build.VERSION;
+import android.os.SystemProperties;
+
+public abstract class IFAAManager {
+ private static final int IFAA_VERSION_V2 = 2;
+ private static final int IFAA_VERSION_V3 = 3;
+ private static final int IFAA_VERSION_V4 = 4;
+ static int sIfaaVer;
+ static boolean sIsFod = SystemProperties.getBoolean("ro.hardware.fp.fod", false);
+
+ /**
+ * 返回手机系统上支持的校验方式,目前IFAF协议1.0版本指纹为0x01、虹膜为0x02
+ */
+ public abstract int getSupportBIOTypes(Context context);
+
+ /**
+ * 启动系统的指纹/虹膜管理应用界面,让用户进行指纹录入。指纹录入是在系统的指纹管理应用中实现的,
+ * 本函数的作用只是将指纹管理应用运行起来,直接进行页面跳转,方便用户录入。
+ * @param context
+ * @param authType 生物特征识别类型,指纹为1,虹膜为2
+ * @return 0,成功启动指纹管理应用;-1,启动指纹管理应用失败。
+ */
+ public abstract int startBIOManager(Context context, int authType);
+
+ /**
+ * 通过ifaateeclient的so文件实现REE到TA的通道
+ * @param context
+ * @param param 用于传输到IFAA TA的数据buffer
+ * @return IFAA TA返回给REE数据buffer
+ */
+ public native byte[] processCmd(Context context, byte[] param);
+
+ /**
+ * 获取设备型号,同一款机型型号需要保持一致
+ */
+ public abstract String getDeviceModel();
+
+ /**
+ * 获取IFAAManager接口定义版本,目前为1
+ */
+ public abstract int getVersion();
+
+ /**
+ * load so to communicate from REE to TEE
+ */
+ static {
+ sIfaaVer = 1;
+ if (VERSION.SDK_INT >= 28) {
+ sIfaaVer = 4;
+ } else if (sIsFod) {
+ sIfaaVer = 3;
+ } else if (VERSION.SDK_INT >= 24) {
+ sIfaaVer = 2;
+ } else {
+ System.loadLibrary("teeclientjni");//teeclientjni for TA test binary //ifaateeclient
+ }
+ }
+}
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerFactory.java b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerFactory.java
new file mode 100644
index 0000000..97a948a
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerFactory.java
@@ -0,0 +1,9 @@
+package org.ifaa.android.manager;
+
+import android.content.Context;
+
+public class IFAAManagerFactory {
+ public static IFAAManager getIFAAManager(Context context, int authType) {
+ return IFAAManagerImpl.getInstance(context);
+ }
+}
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerImpl.java b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerImpl.java
new file mode 100644
index 0000000..9c478ca
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerImpl.java
@@ -0,0 +1,338 @@
+package org.ifaa.android.manager;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Build;
+import android.os.Build.VERSION;
+import android.os.HwBinder;
+import android.os.HwBlob;
+import android.os.HwParcel;
+import android.os.IBinder;
+import android.os.IBinder.DeathRecipient;
+import android.os.IHwBinder;
+import android.os.Parcel;
+import android.os.RemoteException;
+import android.os.SystemProperties;
+import android.util.Slog;
+
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class IFAAManagerImpl extends IFAAManagerV4 {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "IfaaManagerImpl";
+
+ private static final int CODE_PROCESS_CMD = 1;
+ private static final int CODE_GETIDLIST_CMD = 2;
+
+ private static final int IFAA_TYPE_FINGER = 1;
+ private static final int IFAA_TYPE_IRIS = (1 << 1);
+ private static final int IFAA_TYPE_SENSOR_FOD = (1 << 4);
+ private static final int IFAA_TYPE_2DFA = (1 << 5);
+
+ private static volatile IFAAManagerImpl INSTANCE = null;
+
+ private static final String INTERFACE_DESCRIPTOR = "vendor.xiaomi.hardware.mlipay@1.0::IMlipayService";
+ private static final String SERVICE_NAME = "vendor.xiaomi.hardware.mlipay@1.0::IMlipayService";
+
+ private static final int ACTIVITY_START_SUCCESS = 0;
+ private static final int ACTIVITY_START_FAILED = -1;
+ // private static final String mFingerActName = "com.android.settings.NewFingerprintActivity";
+ // private static final String mFingerPackName = "com.android.settings";
+ private static final String mIfaaActName = "org.ifaa.android.manager.IFAAService";
+ private static final String mIfaaInterfaceDesc = "org.ifaa.android.manager.IIFAAService";
+ private static final String mIfaaPackName = "com.tencent.soter.soterserver";
+
+ private static IBinder mService = null;
+ private static final String seperate = ",";
+ private String mDevModel = null;
+
+ private static Context mContext = null;
+
+ private static ServiceConnection ifaaconn = new ServiceConnection() {
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ mService = service;
+ try {
+ mService.linkToDeath(mDeathRecipient, 0);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "linkToDeath fail.", e);
+ }
+ }
+
+ public void onServiceDisconnected(ComponentName name) {
+ if (mContext != null) {
+ Slog.i(IFAAManagerImpl.TAG, "re-bind the service.");
+ initService();
+ }
+ }
+ };
+
+ private static DeathRecipient mDeathRecipient = new DeathRecipient() {
+ public void binderDied() {
+ if (mService != null) {
+ Slog.d(TAG, "binderDied, unlink the service.");
+ mService.unlinkToDeath(mDeathRecipient, 0);
+ }
+ }
+ };
+
+ public static IFAAManagerV4 getInstance(Context context) {
+ if (INSTANCE == null) {
+ synchronized (IFAAManagerImpl.class) {
+ if (INSTANCE == null) {
+ INSTANCE = new IFAAManagerImpl();
+ if (VERSION.SDK_INT >= 28) {
+ mContext = context;
+ initService();
+ }
+ }
+ }
+ }
+ return INSTANCE;
+ }
+
+ private static void initService() {
+ Intent ifaaIntent = new Intent();
+ ifaaIntent.setClassName(mIfaaPackName, mIfaaActName);
+ if (!mContext.bindService(ifaaIntent, ifaaconn, 1)) {
+ Slog.e(TAG, "cannot bind service org.ifaa.android.manager.IFAAService");
+ }
+ }
+
+ public int getSupportBIOTypes(Context context) {
+ int ifaaProp;
+ int res;
+ String fpVendor;
+ int ifaa_2dfa_support = 0; // FeatureParser.getInteger("ifaa_2dfa_support", 0);
+
+ if (VERSION.SDK_INT >= 28) {
+ ifaaProp = SystemProperties.getInt("persist.vendor.sys.pay.ifaa", 0);
+ fpVendor = SystemProperties.get(
+ "persist.vendor.sys.fp.vendor", "");
+ } else {
+ ifaaProp = SystemProperties.getInt("persist.sys.ifaa", 0);
+ fpVendor = SystemProperties.get("persist.sys.fp.vendor", "");
+ }
+
+ if ("none".equalsIgnoreCase(fpVendor)) {
+ res = ifaaProp & IFAA_TYPE_IRIS;
+ } else {
+ res = ifaaProp & (IFAA_TYPE_FINGER | IFAA_TYPE_IRIS);
+ }
+
+ if ((res & IFAA_TYPE_FINGER) == IFAA_TYPE_FINGER && sIsFod) {
+ res |= IFAA_TYPE_SENSOR_FOD;
+ }
+
+ if (ifaa_2dfa_support == 1 && IFAAManagerV3.VLAUE_FINGERPRINT_ENABLE.equals(
+ SystemProperties.get("ro.boot.hypvm", ""))) {
+ res |= IFAA_TYPE_2DFA;
+ }
+
+ Slog.i(TAG, "getSupportBIOTypesV26:" + ifaaProp + " " + sIsFod + " " + fpVendor +
+ " res:" + res);
+
+ return res;
+ }
+
+ public int startBIOManager(Context context, int authType) {
+ int res = ACTIVITY_START_FAILED;
+ if (IFAA_TYPE_FINGER == authType) {
+ // Intent intent = new Intent();
+ // intent.setClassName("com.android.settings", mFingerActName);
+ Intent intent = new Intent("android.settings.SECURITY_SETTINGS");
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(intent);
+ res = ACTIVITY_START_SUCCESS;
+ }
+ if (DEBUG) Slog.i(TAG, "startBIOManager authType:" + authType + " res:" + res);
+ return res;
+ }
+
+ public String getDeviceModel() {
+ // String miuiFeature;
+ if (mDevModel == null) {
+ // miuiFeature = FeatureParser.getString("finger_alipay_ifaa_model");
+ // if (miuiFeature != null) {
+ // if (!StringUtils.EMPTY.equalsIgnoreCase(miuiFeature)) {
+ // this.mDevModel = miuiFeature;
+ // }
+ // }
+ mDevModel = "xiaomi" + "-" + "wayne";
+ }
+ if (DEBUG) Slog.i(TAG, "getDeviceModel devcieModel:" + mDevModel);
+ return mDevModel;
+ }
+
+ public int getVersion() {
+ if (DEBUG) Slog.i(TAG, "getVersion sdk:" + VERSION.SDK_INT + " ifaaVer:" + sIfaaVer);
+ return sIfaaVer;
+ }
+
+ public byte[] processCmdV2(Context context, byte[] param) {
+ Slog.i(TAG, "processCmdV2 sdk:" + VERSION.SDK_INT);
+
+ if (VERSION.SDK_INT >= 28) {
+ int retry_count = 10;
+
+ while (true) {
+ int retry_count2 = retry_count - 1;
+ if (retry_count <= 0) {
+ break;
+ }
+ if (mService == null || !mService.pingBinder()) {
+ Slog.i(TAG, "processCmdV2 waiting ifaaService, remain: " +
+ retry_count2 + " time(s)");
+ try {
+ Thread.sleep(30);
+ } catch (InterruptedException e) {
+ Slog.e(TAG, "processCmdV2 InterruptedException while waiting: " + e);
+ }
+ } else {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ try {
+ data.writeInterfaceToken(mIfaaInterfaceDesc);
+ data.writeByteArray(param);
+ mService.transact(CODE_PROCESS_CMD, data, reply, 0);
+ reply.readException();
+ return reply.createByteArray();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "processCmdV2 transact failed. " + e);
+ retry_count = retry_count2;
+ } finally {
+ data.recycle();
+ reply.recycle();
+ }
+ }
+ retry_count = retry_count2;
+ }
+ }
+ HwParcel hidl_reply = new HwParcel();
+ try {
+ IHwBinder hwService = HwBinder.getService(SERVICE_NAME, "default");
+ if (hwService != null) {
+ HwParcel hidl_request = new HwParcel();
+ hidl_request.writeInterfaceToken(INTERFACE_DESCRIPTOR);
+ ArrayList<Byte> sbuf = new ArrayList(Arrays.asList(HwBlob.wrapArray(param)));
+ hidl_request.writeInt8Vector(sbuf);
+ hidl_request.writeInt32(sbuf.size());
+ hwService.transact(CODE_PROCESS_CMD, hidl_request, hidl_reply, 0);
+ hidl_reply.verifySuccess();
+ hidl_request.releaseTemporaryStorage();
+ ArrayList<Byte> val = hidl_reply.readInt8Vector();
+ int n = val.size();
+ byte[] array = new byte[n];
+ for (int i = 0; i < n; i++) {
+ array[i] = ((Byte) val.get(i)).byteValue();
+ }
+ hidl_reply.release();
+ return array;
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "transact failed. " + e);
+ } finally {
+ hidl_reply.release();
+ }
+ Slog.e(TAG, "processCmdV2, return null");
+ return null;
+ }
+
+ public String getExtInfo(int authType, String keyExtInfo) {
+ return initExtString();
+ }
+
+ public void setExtInfo(int authType, String keyExtInfo, String valExtInfo) {
+ }
+
+ public int getEnabled(int bioType) {
+ if (IFAA_TYPE_FINGER == bioType) {
+ return 1000;
+ }
+ return 1003;
+ }
+
+ public int[] getIDList(int bioType) {
+ int[] idList = new int[]{0};
+ if (IFAA_TYPE_FINGER == bioType) {
+ int retry_count = 10;
+ while (true) {
+ int retry_count2 = retry_count - 1;
+ if (retry_count <= 0) {
+ break;
+ }
+ if (mService == null || !mService.pingBinder()) {
+ try {
+ Thread.sleep(30);
+ } catch (InterruptedException e) {
+ Slog.e(TAG, "getIDList InterruptedException while waiting: " + e);
+ }
+ } else {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ try {
+ data.writeInterfaceToken(mIfaaInterfaceDesc);
+ data.writeInt(bioType);
+ mService.transact(CODE_GETIDLIST_CMD, data, reply, 0);
+ reply.readException();
+ idList = reply.createIntArray();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "getIDList transact failed. " + e);
+ } finally {
+ data.recycle();
+ reply.recycle();
+ }
+ }
+ retry_count = retry_count2;
+ }
+ }
+ return idList;
+ }
+
+ private String initExtString() {
+ String extStr = "";
+ JSONObject obj = new JSONObject();
+ JSONObject keyInfo = new JSONObject();
+ String xy = "";
+ String wh = "";
+
+ if (VERSION.SDK_INT >= 28) {
+ xy = SystemProperties.get("persist.vendor.sys.fp.fod.location.X_Y", "");
+ wh = SystemProperties.get("persist.vendor.sys.fp.fod.size.width_height", "");
+ } else {
+ xy = SystemProperties.get("persist.sys.fp.fod.location.X_Y", "");
+ wh = SystemProperties.get("persist.sys.fp.fod.size.width_height", "");
+ }
+
+ try {
+ if (validateVal(xy) && validateVal(wh)) {
+ String[] splitXy = xy.split(seperate);
+ String[] splitWh = wh.split(seperate);
+ keyInfo.put("startX", Integer.parseInt(splitXy[0]));
+ keyInfo.put("startY", Integer.parseInt(splitXy[1]));
+ keyInfo.put("width", Integer.parseInt(splitWh[0]));
+ keyInfo.put("height", Integer.parseInt(splitWh[1]));
+ keyInfo.put("navConflict", true);
+ obj.put("type", 0);
+ obj.put("fullView", keyInfo);
+ extStr = obj.toString();
+ } else {
+ Slog.e(TAG, "initExtString invalidate, xy:" + xy + " wh:" + wh);
+ }
+ } catch (Exception e) {
+ Slog.e(TAG, "Exception , xy:" + xy + " wh:" + wh, e);
+ }
+ return extStr;
+ }
+
+ private boolean validateVal(String value) {
+ if ("".equalsIgnoreCase(value) || !value.contains(seperate)) {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV2.java b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV2.java
new file mode 100644
index 0000000..2d7e3f5
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV2.java
@@ -0,0 +1,7 @@
+package org.ifaa.android.manager;
+
+import android.content.Context;
+
+public abstract class IFAAManagerV2 extends IFAAManager {
+ public abstract byte[] processCmdV2(Context paramContext, byte[] paramArrayOfByte);
+}
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV3.java b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV3.java
new file mode 100644
index 0000000..50e677d
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV3.java
@@ -0,0 +1,12 @@
+package org.ifaa.android.manager;
+
+public abstract class IFAAManagerV3 extends IFAAManagerV2 {
+ public static final String KEY_FINGERPRINT_FULLVIEW = "org.ifaa.ext.key.CUSTOM_VIEW";
+ public static final String KEY_GET_SENSOR_LOCATION = "org.ifaa.ext.key.GET_SENSOR_LOCATION";
+ public static final String VALUE_FINGERPRINT_DISABLE = "disable";
+ public static final String VLAUE_FINGERPRINT_ENABLE = "enable";
+
+ public abstract String getExtInfo(int authType, String keyExtInfo);
+
+ public abstract void setExtInfo(int authType, String keyExtInfo, String valExtInfo);
+}
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV4.java b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV4.java
new file mode 100644
index 0000000..6d0a4d5
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV4.java
@@ -0,0 +1,7 @@
+package org.ifaa.android.manager;
+
+public abstract class IFAAManagerV4 extends IFAAManagerV3 {
+ public abstract int getEnabled(int bioType);
+
+ public abstract int[] getIDList(int bioType);
+}
diff --git a/org.ifaa.android.manager/src/org/ifaa/android/manager/IIFAAService.aidl b/org.ifaa.android.manager/src/org/ifaa/android/manager/IIFAAService.aidl
new file mode 100644
index 0000000..80937fe
--- /dev/null
+++ b/org.ifaa.android.manager/src/org/ifaa/android/manager/IIFAAService.aidl
@@ -0,0 +1,12 @@
+package org.ifaa.android.manager;
+
+interface IIFAAService {
+ byte[] processCmd_v2(in byte[] param);
+ int[] getIDList(int bioType);
+ int faceEnroll(String sessionId, int flags);
+ int faceUpgrade(int action, String path, int offset, in byte[] data, int data_len);
+ int faceAuthenticate_v2(String sessionId, int flags);
+ int faceCancel_v2(String sessionId);
+ byte[] faceInvokeCommand(in byte[] param);
+ int faceGetCellinfo();
+}
diff --git a/overlay-lineage/frameworks/base/core/res/res/values/config.xml b/overlay-lineage/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..6e461c4
--- /dev/null
+++ b/overlay-lineage/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <integer name="config_buttonBrightnessSettingDefault">0</integer>
+</resources>
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
new file mode 100644
index 0000000..1660dce
--- /dev/null
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015-2016 The CyanogenMod Project
+ 2017 The LineageOS Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- Default value for proximity check on screen wake
+ NOTE ! - Enable for devices that have a fast response proximity sensor (ideally < 300ms)-->
+ <bool name="config_proximityCheckOnWake">true</bool>
+ <bool name="config_proximityCheckOnWakeEnabledByDefault">true</bool>
+
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following capabilities present:
+ // Device has a color adjustable battery light.
+ LIGHTS_RGB_NOTIFICATION_LED = 1
+ // Device has a color adjustable notification light.
+ LIGHTS_RGB_BATTERY_LED = 2
+ LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
+ // The notification light has adjustable pulsing capability.
+ LIGHTS_PULSATING_LED = 8
+ // Device has a multi-segment battery light that is able to
+ // use the light brightness value to determine how many
+ // segments to show (in order to represent battery level).
+ LIGHTS_SEGMENTED_BATTERY_LED = 16
+ // The notification light supports HAL adjustable brightness
+ // via the alpha channel.
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
+ // then HAL support is not necessary for brightness control. In this case,
+ // brightness support will be provided by lineage-sdk through the scaling of
+ // RGB color values.
+ LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
+ // Device has a battery light.
+ LIGHTS_BATTERY_LED = 64
+ // The battery light supports HAL adjustable brightness via
+ // the alpha channel.
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
+ // support is not necessary for brightness control. In this case,
+ // brightness support will be provided by lineage-sdk through the scaling of
+ // RGB color values.
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
+ For example, a device with notification and battery lights that supports
+ pulsating and RGB control would set this config to 75. -->
+ <integer name="config_deviceLightCapabilities">232</integer>
+
+ <!-- Whether device has screen with higher aspect ratio -->
+ <bool name="config_haveHigherAspectRatioScreen">true</bool>
+</resources>
diff --git a/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
new file mode 100644
index 0000000..da46c31
--- /dev/null
+++ b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2016 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <bool name="call_recording_enabled">true</bool>
+ <integer name="call_recording_audio_source">4</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..d0a76af
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. Do not translate. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
+ Software implementation will be used if config_hardware_auto_brightness_available is not set -->
+ <bool name="config_automatic_brightness_available">true</bool>
+
+ <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
+ The N entries of this array define N + 1 control points as follows:
+ (1-based arrays)
+ Point 1: (0, value[1]): lux <= 0
+ Point 2: (level[1], value[2]): 0 < lux <= level[1]
+ Point 3: (level[2], value[3]): level[2] < lux <= level[3]
+ ...
+ Point N+1: (level[N], value[N+1]): level[N] < lux
+ The control points must be strictly increasing. Each control point
+ corresponds to an entry in the brightness backlight values arrays.
+ For example, if LUX == level[1] (first element of the levels array)
+ then the brightness will be determined by value[2] (second element
+ of the brightness values array).
+ Spline interpolation is used to determine the auto-brightness
+ backlight values for LUX levels between these control points.
+ Must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessLevels">
+ <item>1</item> <!-- pitch black -->
+ <item>5</item> <!-- dark indoor -->
+ <item>10</item> <!-- twilight -->
+ <item>50</item> <!-- dim indoor -->
+ <item>100</item> <!-- home -->
+ <item>300</item> <!-- office -->
+ <item>500</item> <!-- sunrise -->
+ <item>1000</item> <!-- overcast -->
+ <item>3000</item> <!-- indirect sun -->
+ <item>10000</item> <!-- daylight -->
+ </integer-array>
+
+ <!-- Array of output values for LCD backlight corresponding to the LUX values
+ in the config_autoBrightnessLevels array. This array should have size one greater
+ than the size of the config_autoBrightnessLevels array.
+ The brightness values must be between 0 and 255 and be non-decreasing.
+ This must be overridden in platform specific overlays -->
+ <integer-array name="config_autoBrightnessLcdBacklightValues">
+ <item>16</item>
+ <item>20</item>
+ <item>24</item>
+ <item>31</item>
+ <item>48</item>
+ <item>74</item>
+ <item>107</item>
+ <item>152</item>
+ <item>194</item>
+ <item>254</item>
+ <item>255</item>
+ </integer-array>
+
+ <!-- Screen brightness used to dim the screen when the user activity
+ timeout expires. May be less than the minimum allowed brightness setting
+ that can be set by the user. -->
+ <integer name="config_screenBrightnessDim">10</integer>
+
+ <!-- Default screen brightness setting.
+ Must be in the range specified by minimum and maximum. -->
+ <integer name="config_screenBrightnessSettingDefault">128</integer>
+
+ <!-- Minimum screen brightness setting allowed by the power manager.
+ The user is forbidden from setting the brightness below this level. -->
+ <integer name="config_screenBrightnessSettingMinimum">1</integer>
+
+ <!-- Stability requirements in milliseconds for accepting a new brightness level. This is used
+ for debouncing the light sensor. Different constants are used to debounce the light sensor
+ when adapting to brighter or darker environments. This parameter controls how quickly
+ brightness changes occur in response to an observed change in light level that exceeds the
+ hysteresis threshold. -->
+ <integer name="config_autoBrightnessBrighteningLightDebounce">2000</integer>
+ <integer name="config_autoBrightnessDarkeningLightDebounce">6000</integer>
+
+ <!-- The maximum range of gamma adjustment possible using the screen
+ auto-brightness adjustment setting. -->
+ <fraction name="config_autoBrightnessAdjustmentMaxGamma">200%</fraction>
+
+ <!-- Period of time in which to consider light samples in milliseconds. -->
+ <integer name="config_autoBrightnessAmbientLightHorizon">16000</integer>
+
+ <!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
+ <bool name="config_unplugTurnsOnScreen">true</bool>
+
+ <!-- Boolean indicating if restoring network selection should be skipped -->
+ <!-- The restoring is handled by modem if it is true-->
+ <bool translatable="false" name="skip_restoring_network_selection">true</bool>
+
+ <!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
+ <bool name="config_cellBroadcastAppLinks">true</bool>
+
+ <!-- MMS user agent string -->
+ <string name="config_mms_user_agent" translatable="false">Android-Mms/2.0</string>
+
+ <!-- MMS user agent prolfile url -->
+ <string name="config_mms_user_agent_profile_url" translatable="false">http://www.google.com/oha/rdf/ua-profile-kila.xml</string>
+
+ <!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
+ <bool name="config_intrusiveNotificationLed">true</bool>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ USB interfaces. If the device doesn't want to support tething over USB this should
+ be empty. An example would be "usb.*" -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ <item>"usb\\d"</item>
+ <item>"rndis\\d"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ Wifi interfaces. If the device doesn't want to support tethering over Wifi this
+ should be empty. An example would be "softap.*" -->
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ <item>"wlan0"</item>
+ <item>"wigig0"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
+ should be empty. -->
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ <item>"bnep\\d"</item>
+ <item>"bt-pan"</item>
+ </string-array>
+
+ <!-- Array of allowable ConnectivityManager network types for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>1</item>
+ <item>0</item>
+ <item>5</item>
+ <item>7</item>
+ </integer-array>
+
+ <!-- Dhcp range (min, max) to use for tethering purposes -->
+ <!-- USB is 192.168.42.1 and 255.255.255.0
+ Wifi is 192.168.43.1 and 255.255.255.0
+ BT is limited to max default of 5 connections. 192.168.44.1 to 192.168.48.1
+ with 255.255.255.0
+ P2P is 192.168.49.1 and 255.255.255.0
+ Wigig is 192.168.50.1 and 255.255.255.0
+ Wigig P2P is 192.168.51.1 and 255.255.255.0
+ -->
+ <string-array name="config_tether_dhcp_range">
+ <item>192.168.42.2</item>
+ <item>192.168.42.254</item>
+ <item>192.168.43.2</item>
+ <item>192.168.43.254</item>
+ <item>192.168.44.2</item>
+ <item>192.168.44.254</item>
+ <item>192.168.45.2</item>
+ <item>192.168.45.254</item>
+ <item>192.168.46.2</item>
+ <item>192.168.46.254</item>
+ <item>192.168.47.2</item>
+ <item>192.168.47.254</item>
+ <item>192.168.48.2</item>
+ <item>192.168.48.254</item>
+ <item>192.168.49.2</item>
+ <item>192.168.49.254</item>
+ <item>192.168.50.2</item>
+ <item>192.168.50.254</item>
+ <item>192.168.51.2</item>
+ <item>192.168.51.254</item>
+ </string-array>
+
+ <!-- This string array should be overridden by the device to present a list of network
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
+ [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
+ <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+ before automatically restore the default connection. Set -1 if the connection
+ does not require auto-restore. -->
+ <!-- the 6th element indicates boot-time dependency-met value. -->
+ <string-array translatable="false" name="networkAttributes">
+ <item>wifi,1,1,1,-1,true</item>
+ <item>mobile,0,0,0,-1,true</item>
+ <item>mobile_mms,2,0,4,300000,true</item>
+ <item>mobile_supl,3,0,2,300000,true</item>
+ <item>mobile_dun,4,0,2,300000,true</item>
+ <item>mobile_hipri,5,0,3,300000,true</item>
+ <item>mobile_fota,10,0,2,300000,true</item>
+ <item>mobile_ims,11,0,2,300000,true</item>
+ <item>mobile_cbs,12,0,2,300000,true</item>
+ <item>bluetooth,7,7,2,-1,true</item>
+ <item>ethernet,9,9,4,-1,true</item>
+ </string-array>
+
+ <!-- This string array should be overridden by the device to present a list of radio
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[ConnectivityManager connectionType],
+ [# simultaneous connection types]" -->
+ <string-array translatable="false" name="radioAttributes">
+ <item>"1,1"</item>
+ <item>"0,1"</item>
+ <item>"7,1"</item>
+ <item>"9,1"</item>
+ </string-array>
+
+ <!-- Whether WiFi display is supported by this device.
+ There are many prerequisites for this feature to work correctly.
+ Here are a few of them:
+ * The WiFi radio must support WiFi P2P.
+ * The WiFi radio must support concurrent connections to the WiFi display and
+ to an access point.
+ * The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix"
+ remote submix module. This module is used to record and stream system
+ audio output to the WiFi display encoder in the media server.
+ * The remote submix module "audio.r_submix.default" must be installed on the device.
+ * The device must be provisioned with HDCP keys (for protected content).
+ -->
+ <bool name="config_enableWifiDisplay">true</bool>
+
+ <!-- Set to true if the wifi display supports compositing content stored
+ in gralloc protected buffers. For this to be true, there must exist
+ a protected hardware path for surface flinger to composite and send
+ protected buffers to the wifi display video encoder.
+ If this flag is false, we advise applications not to use protected
+ buffers (if possible) when presenting content to a wifi display because
+ the content may be blanked.
+ This flag controls whether the {@link Display#FLAG_SUPPORTS_PROTECTED_BUFFERS}
+ flag is set for wifi displays.
+ -->
+ <bool name="config_wifiDisplaySupportsProtectedBuffers">true</bool>
+
+ <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
+ <bool translatable="false" name="config_wifi_dual_band_support">true</bool>
+
+ <!-- Boolean indicating whether the wifi chipset has background scan support -->
+ <bool translatable="false" name="config_wifi_background_scan_support">true</bool>
+
+ <!-- Wifi driver supports batched scan -->
+ <bool translatable="false" name="config_wifi_batched_scan_supported">true</bool>
+
+ <!-- When true use the linux /dev/input/event subsystem to detect the switch changes
+ on the headphone/microphone jack. When false use the older uevent framework. -->
+ <bool name="config_useDevInputEventForAudioJack">true</bool>
+
+ <!-- Indicate whether closing the lid causes the device to go to sleep and opening
+ it causes the device to wake up.
+ The default is false. -->
+ <bool name="config_lidControlsSleep">true</bool>
+
+ <!-- Enables or disables fading edges when marquee is enabled in TextView.
+ Off by default, since the framebuffer readback used to implement the
+ fading edges is prohibitively expensive on most GPUs. -->
+ <bool name="config_ui_enableFadingMarquee">false</bool>
+
+ <!-- ComponentName of a dream to show whenever the system would otherwise have
+ gone to sleep. When the PowerManager is asked to go to sleep, it will instead
+ try to start this dream if possible. The dream should typically call startDozing()
+ to put the display into a low power state and allow the application processor
+ to be suspended. When the dream ends, the system will go to sleep as usual.
+ Specify the component name or an empty string if none.
+
+ Note that doze dreams are not subject to the same start conditions as ordinary dreams.
+ Doze dreams will run whenever the power manager is in a dozing state. -->
+ <string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
+
+ <!-- If true, the doze component is not started until after the screen has been
+ turned off and the screen off animation has been performed. -->
+ <bool name="config_dozeAfterScreenOffByDefault">true</bool>
+
+ <!-- Power Management: Specifies whether to decouple the auto-suspend state of the
+ device from the display on/off state.
+
+ When false, autosuspend_disable() will be called before the display is turned on
+ and autosuspend_enable() will be called after the display is turned off.
+ This mode provides best compatibility for devices using legacy power management
+ features such as early suspend / late resume.
+
+ When true, autosuspend_display() and autosuspend_enable() will be called
+ independently of whether the display is being turned on or off. This mode
+ enables the power manager to suspend the application processor while the
+ display is on.
+
+ This resource should be set to "true" when a doze component has been specified
+ to maximize power savings but not all devices support it.
+
+ Refer to autosuspend.h for details.
+ -->
+ <bool name="config_powerDecoupleAutoSuspendModeFromDisplay">false</bool>
+
+ <!-- Power Management: Specifies whether to decouple the interactive state of the
+ device from the display on/off state.
+
+ When false, setInteractive(..., true) will be called before the display is turned on
+ and setInteractive(..., false) will be called after the display is turned off.
+ This mode provides best compatibility for devices that expect the interactive
+ state to be tied to the display state.
+
+ When true, setInteractive(...) will be called independently of whether the display
+ is being turned on or off. This mode enables the power manager to reduce
+ clocks and disable the touch controller while the display is on.
+
+ This resource should be set to "true" when a doze component has been specified
+ to maximize power savings but not all devices support it.
+
+ Refer to power.h for details.
+ -->
+ <bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool>
+
+ <!-- Screen brightness used to dim the screen while dozing in a very low power state.
+ May be less than the minimum allowed brightness setting
+ that can be set by the user. -->
+ <integer name="config_screenBrightnessDoze">17</integer>
+
+ <!-- Whether device supports double tap to wake -->
+ <bool name="config_supportDoubleTapWake">true</bool>
+
+ <!-- Configure mobile tcp buffer sizes in the form:
+ rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
+ If no value is found for the rat-name in use, the system default will be applied.
+ -->
+ <string-array name="config_mobile_tcp_buffers">
+ <item>umts:131072,262144,1452032,4096,16384,399360</item>
+ <item>hspa:131072,262144,2441216,4096,16384,399360</item>
+ <item>hsupa:131072,262144,2441216,4096,16384,399360</item>
+ <item>hsdpa:131072,262144,2441216,4096,16384,399360</item>
+ <item>hspap:131072,262144,2441216,4096,16384,399360</item>
+ <item>edge:16384,32768,131072,4096,16384,65536</item>
+ <item>gprs:4096,8192,24576,4096,8192,24576</item>
+ <item>1xrtt:16384,32768,131070,4096,16384,102400</item>
+ <item>evdo:131072,262144,1048576,4096,16384,524288</item>
+ <item>lte:524288,1048576,8388608,262144,524288,4194304</item>
+ </string-array>
+
+ <!-- Configure wifi tcp buffersizes in the form:
+ rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
+ <string name="config_wifi_tcp_buffers" translatable="false">524288,2097152,8388608,262144,524288,4194304</string>
+
+ <!-- Flag specifying whether VoLTE is available on device -->
+ <bool name="config_device_volte_available">true</bool>
+
+ <!-- Flag specifying whether VoLTE should be available for carrier: independent of
+ carrier provisioning. If false: hard disabled. If true: then depends on carrier
+ provisioning, availability etc -->
+ <bool name="config_carrier_volte_available">true</bool>
+
+ <!-- Flag specifying whether WFC over IMS is available on device -->
+ <bool name="config_device_wfc_ims_available">true</bool>
+
+ <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of
+ carrier provisioning. If false: hard disabled. If true: then depends on carrier
+ provisioning, availability etc -->
+ <bool name="config_carrier_wfc_ims_available">true</bool>
+
+ <!-- ImsService package name to bind to by default, if config_dynamic_bind_ims is true -->
+ <string name="config_ims_package">org.codeaurora.ims</string>
+
+ <!-- Flag specifying whether or not IMS will use the ImsResolver dynamically -->
+ <bool name="config_dynamic_bind_ims">true</bool>
+
+ <!-- Config determines whether to update phone object when voice registration
+ state changes. Voice radio tech change will always trigger an update of
+ phone object irrespective of this config -->
+ <bool name="config_switch_phone_on_voice_reg_state_change">false</bool>
+
+ <!-- Boolean indicating if current platform supports BLE peripheral mode -->
+ <bool name="config_bluetooth_le_peripheral_mode_supported">true</bool>
+
+ <!-- Is the device capable of hot swapping an ICC Card -->
+ <bool name="config_hotswapCapable">true</bool>
+
+ <!-- If true, the screen can be rotated via the accelerometer in all 4
+ rotations as the default behavior. -->
+ <bool name="config_allowAllRotations">true</bool>
+
+ <!-- Integer parameters of the wifi to cellular handover feature
+ wifi should not stick to bad networks -->
+ <integer name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-100</integer>
+ <integer name="config_wifi_framework_wifi_score_low_rssi_threshold_5GHz">-100</integer>
+ <integer name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-100</integer>
+ <integer name="config_wifi_framework_wifi_score_low_rssi_threshold_24GHz">-100</integer>
+
+ <!-- Flag indicating if the speed up audio on mt call code should be executed -->
+ <bool name="config_speed_up_audio_on_mt_calls">true</bool>
+
+ <!-- Vibrator pattern for feedback about a long screen/key press -->
+ <integer-array name="config_longPressVibePattern">
+ <item>0</item>
+ <item>28</item>
+ <item>10</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for feedback about touching a virtual key -->
+ <integer-array name="config_virtualKeyVibePattern">
+ <item>0</item>
+ <item>28</item>
+ <item>8</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
+ <integer-array name="config_keyboardTapVibePattern">
+ <item>28</item>
+ </integer-array>
+
+ <!-- Control the behavior when the user long presses the home button.
+ 0 - Nothing
+ 1 - Menu key
+ 2 - Recent apps view in SystemUI
+ 3 - Launch assist intent
+ 4 - Voice Search
+ 5 - In-app Search
+ This needs to match the constants in
+ policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+ -->
+ <integer name="config_longPressOnHomeBehavior">3</integer>
+
+ <!-- Operating volatage for bluetooth controller. 0 by default-->
+ <integer name="config_bluetooth_operating_voltage_mv">3300</integer>
+
+ <!-- Enable overlay for all location components. -->
+ <string name="config_networkLocationProviderPackageName" translatable="false">com.qualcomm.location</string>
+ <string name="config_fusedLocationProviderPackageName" translatable="false">com.qualcomm.location</string>
+
+ <!-- Define Google play service package for FRP-->
+ <string name="config_persistentDataPackageName" translatable="false">com.google.android.gms</string>
+
+ <!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
+ in hardware. -->
+ <bool name="config_setColorTransformAccelerated">true</bool>
+
+ <!-- Default list of files pinned by the Pinner Service -->
+ <string-array translatable="false" name="config_defaultPinnerServiceFiles">
+ <item>"/system/framework/arm64/boot-framework.oat"</item>
+ <item>"/system/framework/boot-framework.vdex"</item>
+ <item>"/system/framework/oat/arm64/services.odex"</item>
+ <item>"/system/framework/oat/arm64/services.vdex"</item>
+ <item>"/system/framework/arm64/boot.oat"</item>
+ <item>"/system/framework/boot.vdex"</item>
+ <item>"/system/framework/arm64/boot-core-libart.oat"</item>
+ <item>"/system/framework/boot-core-libart.vdex"</item>
+ </string-array>
+
+ <!-- True if camera app should be pinned via Pinner Service -->
+ <bool name="config_pinnerCameraApp">true</bool>
+
+ <!-- Default value for led color when battery is low on charge -->
+ <integer name="config_notificationsBatteryLowARGB">0xFFFFFFFF</integer>
+
+ <!-- Default value for led color when battery is medium charged -->
+ <integer name="config_notificationsBatteryMediumARGB">0xFFFFFFFF</integer>
+
+ <!-- Default value for led color when battery is fully charged -->
+ <integer name="config_notificationsBatteryFullARGB">0xFFFFFFFF</integer>
+
+ <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
+ autodetected from the Configuration. -->
+ <bool name="config_showNavigationBar">true</bool>
+
+ <!-- Whether or not swipe up gesture's opt-in setting is available on this device -->
+ <bool name="config_swipe_up_gesture_setting_available">true</bool>
+
+ <!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) -->
+ <bool translatable="false" name="config_wifi_softap_acs_supported">true</bool>
+
+ <!-- Enable 802.11ac for Wifi hotspot (SAP) -->
+ <bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool>
+
+ <!-- Number of physical SIM slots on the device. This includes both eSIM and pSIM slots, and
+ is not necessarily the same as the number of phones/logical modems supported by the device.
+ For example, a multi-sim device can have 2 phones/logical modems, but 3 physical slots,
+ or a single SIM device can have 1 phones/logical modems, but 2 physical slots (one eSIM
+ and one pSIM) -->
+ <integer name="config_num_physical_slots">2</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
new file mode 100644
index 0000000..8a673f9
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<device name="Android">
+ <item name="none">0</item>
+ <item name="screen.on">88</item>
+ <item name="screen.full">300</item>
+ <array name="cpu.clusters.cores">
+ <value>4</value>
+ <value>4</value>
+ </array>
+ <array name="cpu.core_speeds.cluster0">
+ <value>633600</value>
+ <value>902400</value>
+ <value>1113600</value>
+ <value>1401600</value>
+ <value>1536000</value>
+ <value>1612800</value>
+ </array>
+ <array name="cpu.core_power.cluster0">
+ <value>11</value>
+ <value>18</value>
+ <value>34</value>
+ <value>45</value>
+ <value>52</value>
+ <value>56</value>
+ </array>
+ <array name="cpu.core_speeds.cluster1">
+ <value>1113600</value>
+ <value>1401600</value>
+ <value>1747200</value>
+ <value>1804800</value>
+ </array>
+ <array name="cpu.core_power.cluster1">
+ <value>75</value>
+ <value>108</value>
+ <value>170</value>
+ <value>193</value>
+ </array>
+ <item name="cpu.awake">4</item>
+ <item name="cpu.idle">3</item>
+ <item name="battery.capacity">3010</item>
+ <item name="bluetooth.active">80</item>
+ <item name="bluetooth.at">2</item>
+ <item name="bluetooth.on">2</item>
+ <item name="wifi.on">2</item>
+ <item name="wifi.active">175</item>
+ <item name="wifi.scan">180</item>
+ <item name="dsp.audio">45</item>
+ <item name="dsp.video">60</item>
+ <item name="camera.flashlight">200</item>
+ <item name="camera.avg">550</item>
+ <item name="gps.on">100</item>
+ <item name="radio.active">140</item>
+ <item name="radio.scanning">45</item>
+ <array name="radio.on">
+ <value>8</value>
+ <value>6</value>
+ </array>
+</device>
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..bf10c07
--- /dev/null
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2015, 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.
+ */
+-->
+<resources>
+
+ <!-- Set the automatic brightness mode on by default -->
+ <bool name="def_screen_brightness_automatic_mode">true</bool>
+
+</resources>
diff --git a/overlay/packages/apps/Settings/res/values/arrays.xml b/overlay/packages/apps/Settings/res/values/arrays.xml
new file mode 100644
index 0000000..3a00a89
--- /dev/null
+++ b/overlay/packages/apps/Settings/res/values/arrays.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2015 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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- IDs for each color mode. The values must match the corresponding constants in
+ android.view.Display -->
+ <integer-array name="color_mode_ids">
+ <item>0</item>
+ <item>-1</item>
+ <item>-1</item>
+ </integer-array>
+
+</resources>
diff --git a/overlay/packages/apps/Snap/res/values/config.xml b/overlay/packages/apps/Snap/res/values/config.xml
new file mode 100644
index 0000000..30ee617
--- /dev/null
+++ b/overlay/packages/apps/Snap/res/values/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The LineageOS 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.
+-->
+
+<!-- Camera app resources that may need to be customized
+ for different hardware or product builds. -->
+<resources>
+ <!-- Enable support for camera api v2 -->
+ <bool name="support_camera_api_v2">true</bool>
+
+ <!-- Opens back camera using openLegacy() and forces api v1 -->
+ <bool name="back_camera_open_legacy">false</bool>
+
+ <!-- Opens front camera using openLegacy() and forces api v1 -->
+ <bool name="front_camera_open_legacy">false</bool>
+</resources>
diff --git a/overlay/packages/services/Telecomm/res/values/config.xml b/overlay/packages/services/Telecomm/res/values/config.xml
new file mode 100644
index 0000000..49efa9c
--- /dev/null
+++ b/overlay/packages/services/Telecomm/res/values/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<!-- Telecomm resources that may need to be customized
+ for different hardware or product builds. -->
+<resources>
+
+ <!-- Flag indicating if the tty is enabled -->
+ <bool name="tty_enabled">true</bool>
+
+</resources>
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
new file mode 100644
index 0000000..bca0057
--- /dev/null
+++ b/overlay/packages/services/Telephony/res/values/config.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- NOTE: Many variables that used to be in this file have been migrated to
+ CarrierConfigManager.java. Please consider whether new variables belong
+ there before adding to this file. Variables here should be more closely
+ related to devices than to networks. -->
+
+<!-- Phone app resources that may need to be customized
+ for different hardware or product builds. -->
+<resources>
+ <!-- Flag indicating if hac is enabled -->
+ <bool name="hac_enabled">true</bool>
+
+ <!-- Show enabled lte option for lte device -->
+ <bool name="config_enabled_lte" translatable="false">true</bool>
+</resources>
diff --git a/properties.mk b/properties.mk
new file mode 100644
index 0000000..d28a484
--- /dev/null
+++ b/properties.mk
@@ -0,0 +1,156 @@
+# Audio
+PRODUCT_PROPERTY_OVERRIDES += \
+ af.fast_track_multiplier=1 \
+ audio.deep_buffer.media=true \
+ audio.offload.min.duration.secs=30 \
+ audio.offload.video=true \
+ persist.dirac.acs.controller=qem \
+ persist.dirac.acs.ignore_error=1 \
+ persist.dirac.acs.storeSettings=1 \
+ persist.vendor.audio.fluence.speaker=true \
+ persist.vendor.audio.fluence.voicecall=true \
+ persist.vendor.audio.fluence.voicerec=false \
+ persist.vendor.audio.hifi.int_codec=true \
+ persist.vendor.audio.hw.binder.size_kbyte=1024 \
+ persist.vendor.audio.ras.enabled=false \
+ persist.vendor.bt.a2dp_offload_cap=sbc-aac \
+ ro.af.client_heap_size_kbyte=7168 \
+ ro.audio.soundfx.dirac=true \
+ ro.config.vc_call_vol_steps=7 \
+ ro.config.media_vol_steps=25 \
+ ro.vendor.audio.sdk.fluencetype=fluence \
+ ro.vendor.audio.sdk.ssr=false \
+ vendor.audio.adm.buffering.ms=6 \
+ vendor.audio.dolby.ds2.enabled=false \
+ vendor.audio.dolby.ds2.hardbypass=false \
+ vendor.audio.flac.sw.decoder.24bit=true \
+ vendor.audio.hw.aac.encoder=true \
+ vendor.audio.noisy.broadcast.delay=600 \
+ vendor.audio.offload.buffer.size.kb=64 \
+ vendor.audio.offload.gapless.enabled=true \
+ vendor.audio.offload.multiaac.enable=true \
+ vendor.audio.offload.multiple.enabled=false \
+ vendor.audio.offload.passthrough=false \
+ vendor.audio.offload.pstimeout.secs=3 \
+ vendor.audio.offload.track.enable=false \
+ vendor.audio.parser.ip.buffer.size=262144 \
+ vendor.audio.safx.pbe.enabled=true \
+ vendor.audio.tunnel.encode=false \
+ vendor.audio.use.sw.alac.decoder=true \
+ vendor.audio.use.sw.ape.decoder=true \
+ vendor.audio_hal.period_size=192 \
+ vendor.fm.a2dp.conc.disabled=true \
+ vendor.voice.path.for.pcm.voip=true
+
+# Bluetooth
+PRODUCT_PROPERTY_OVERRIDES += \
+ vendor.qcom.bluetooth.soc=cherokee
+
+# Camera
+PRODUCT_PROPERTY_OVERRIDES += \
+ camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,com.qualcomm.qti.qmmi \
+ persist.vendor.bokeh.switch.lux=290 \
+ persist.vendor.camera.HAL3.enabled=1 \
+ persist.vendor.camera.depth.focus.cb=0 \
+ persist.vendor.camera.exif.make=Xiaomi \
+ persist.vendor.camera.expose.aux=1 \
+ persist.vendor.camera.imglib.usefdlite=1 \
+ persist.vendor.camera.isp.clock.optmz=0 \
+ persist.vendor.camera.isp.turbo=1 \
+ persist.vendor.camera.linkpreview=0 \
+ persist.vendor.camera.preview.ubwc=0 \
+ persist.vendor.camera.stats.test=0 \
+ persist.vendor.imx376_ofilm.light.lux=275 \
+ persist.vendor.imx376_ofilm.low.lux=290 \
+ persist.vendor.imx376_sunny.light.lux=275 \
+ persist.vendor.imx376_sunny.low.lux=290 \
+ vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,com.qualcomm.qti.qmmi
+
+# Display
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.sf.enable_hwc_vds=1 \
+ debug.sf.hw=1 \
+ debug.sf.latch_unsignaled=1 \
+ persist.debug.wfd.enable=1 \
+ persist.hwc.enable_vds=1 \
+ ro.opengles.version=196610 \
+ ro.qualcomm.cabl=0 \
+ ro.sf.lcd_density=440 \
+ vendor.display.disable_skip_validate=1 \
+ vendor.gralloc.enable_fb_ubwc=1 \
+ vendor.video.disable.ubwc=1
+
+# GPS
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.overlay.izat.optin=rro
+
+# Media
+PRODUCT_PROPERTY_OVERRIDES += \
+ media.aac_51_output_enabled=true \
+ media.stagefright.enable-aac=true \
+ media.stagefright.enable-http=true \
+ media.stagefright.enable-player=true \
+ media.stagefright.enable-qcp=true \
+ media.stagefright.enable-scan=true \
+ mm.enable.qcom_parser=13631471 \
+ mm.enable.smoothstreaming=true \
+ mmp.enable.3g2=true \
+ persist.mm.enable.prefetch=true \
+ vendor.vidc.dec.enable.downscalar=1 \
+ vendor.vidc.enc.disable.pq=false \
+ vendor.vidc.enc.disable_bframes=1 \
+ vidc.enc.dcvs.extra-buff-count=2 \
+ vidc.enc.target_support_bframe=1
+
+# Netflix custom property
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.netflix.bsp_rev=Q660-13149-1
+
+# QCOM
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.timed.enable=true \
+ persist.vendor.cne.feature=1 \
+ persist.vendor.dpm.feature=1 \
+ persist.vendor.qcomsysd.enabled=1 \
+ ro.vendor.at_library=libqti-at.so \
+ ro.vendor.extension_library=libqti-perfd-client.so
+
+# Radio
+PRODUCT_PROPERTY_OVERRIDES += \
+ DEVICE_PROVISIONED=1 \
+ persist.data.df.agg.dl_pkt=10 \
+ persist.data.df.agg.dl_size=4096 \
+ persist.data.df.dev_name=rmnet_usb0 \
+ persist.data.df.dl_mode=5 \
+ persist.data.df.iwlan_mux=9 \
+ persist.data.df.mux_count=8 \
+ persist.data.df.ul_mode=5 \
+ persist.data.netmgrd.qos.enable=true \
+ persist.data.wda.enable=true \
+ persist.radio.VT_CAM_INTERFACE=2 \
+ persist.radio.data_con_rprt=1 \
+ persist.radio.multisim.config=dsds \
+ persist.radio.schd.cache=3500 \
+ persist.rmnet.data.enable=true \
+ persist.vendor.data.mode=concurrent \
+ persist.vendor.qti.telephony.vt_cam_interface=1 \
+ persist.vendor.radio.apm_sim_not_pwdn=1 \
+ persist.vendor.radio.atfwd.start=true \
+ persist.vendor.radio.custom_ecc=1 \
+ persist.vendor.radio.rat_on=combine \
+ persist.vendor.radio.sib16_support=1 \
+ ril.subscription.types=NV,RUIM \
+ rild.libpath=/system/vendor/lib64/libril-qc-qmi-1.so \
+ ro.telephony.default_network=22,20 \
+ ro.vendor.use_data_netmgrd=true \
+ telephony.lteOnCdmaDevice=1
+
+# Sensor
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.vendor.sdk.sensors.gestures=false \
+ ro.vendor.sensors.cmc=false \
+ ro.vendor.sensors.dev_ori=false \
+ ro.vendor.sensors.facing=false \
+ ro.vendor.sensors.mot_detect=true \
+ ro.vendor.sensors.pmd=true \
+ ro.vendor.sensors.sta_detect=true
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644
index 0000000..69d41d2
--- /dev/null
+++ b/proprietary-files.txt
@@ -0,0 +1,775 @@
+# ADSP - from jasmine
+vendor/bin/adsprpcd
+vendor/lib/libadsp_default_listener.so
+vendor/lib/libadsp_hvx_callback_skel.so
+vendor/lib/libadsp_hvx_stub.so
+vendor/lib/libadsprpc.so
+vendor/lib/libfastcvadsp_stub.so
+vendor/lib/libfastcvopt.so
+vendor/lib/libmdsprpc.so
+vendor/lib/libsdsprpc.so
+vendor/lib64/libadsp_default_listener.so
+vendor/lib64/libadsprpc.so
+vendor/lib64/libfastcvadsp_stub.so
+vendor/lib64/libfastcvopt.so
+vendor/lib64/libmdsprpc.so
+vendor/lib64/libsdsprpc.so
+
+# ADSP modules - from jasmine
+vendor/etc/scve/facereco/gModel.dat
+vendor/lib/rfsa/adsp/capi_v2_aptX_Classic.so
+vendor/lib/rfsa/adsp/capi_v2_aptX_HD.so
+vendor/lib/rfsa/adsp/dirac_resource.dar
+vendor/lib/rfsa/adsp/libadsp_fd_skel.so
+vendor/lib/rfsa/adsp/libadsp_hvx_add_constant.so
+vendor/lib/rfsa/adsp/libadsp_hvx_skel.so
+vendor/lib/rfsa/adsp/libapps_mem_heap.so
+vendor/lib/rfsa/adsp/libdirac-capiv2.so
+vendor/lib/rfsa/adsp/libdspCV_skel.so
+vendor/lib/rfsa/adsp/libfastcvadsp.so
+vendor/lib/rfsa/adsp/libfastcvadsp_skel.so
+vendor/lib/rfsa/adsp/libscveBlobDescriptor_skel.so
+vendor/lib/rfsa/adsp/libscveObjectSegmentation_skel.so
+vendor/lib/rfsa/adsp/libscveT2T_skel.so
+vendor/lib/rfsa/adsp/libvpp_svc_skel.so
+
+# Alarm - from jasmine
+framework/vendor.qti.hardware.alarm-V1.0-java.jar
+-vendor/app/PowerOffAlarm/PowerOffAlarm.apk
+vendor/bin/hw/vendor.qti.hardware.alarm@1.0-service
+vendor/etc/init/vendor.qti.hardware.alarm@1.0-service.rc
+vendor/lib64/hw/vendor.qti.hardware.alarm@1.0-impl.so
+vendor/lib64/vendor.qti.hardware.alarm@1.0.so
+
+# ANT+ - from enchilada
+lib/com.qualcomm.qti.ant@1.0.so
+-lib/libantradio.so
+lib64/com.qualcomm.qti.ant@1.0.so
+-lib64/libantradio.so
+vendor/lib/com.qualcomm.qti.ant@1.0.so
+vendor/lib/hw/com.qualcomm.qti.ant@1.0-impl.so
+vendor/lib64/com.qualcomm.qti.ant@1.0.so
+vendor/lib64/hw/com.qualcomm.qti.ant@1.0-impl.so
+
+# Audio - from jasmine
+vendor/lib/libacdb-fts.so
+vendor/lib/libacdbloader.so
+vendor/lib/libacdbrtac.so
+vendor/lib/libadiertac.so
+vendor/lib/libadm.so
+vendor/lib/libaudcal.so
+vendor/lib/libaudioalsa.so
+vendor/lib/libaudioparsers.so
+vendor/lib/libdrc.so
+vendor/lib/libqtigef.so
+vendor/lib/libsurround_3mic_proc.so
+vendor/lib/soundfx/libasphere.so
+vendor/lib/soundfx/libqcbassboost.so
+vendor/lib/soundfx/libqcreverb.so
+vendor/lib/soundfx/libqcvirt.so
+vendor/lib64/libacdb-fts.so
+vendor/lib64/libacdbloader.so
+vendor/lib64/libacdbrtac.so
+vendor/lib64/libadiertac.so
+vendor/lib64/libaudcal.so
+vendor/lib64/libaudioalsa.so
+vendor/lib64/libaudioparsers.so
+vendor/lib64/libqtigef.so
+vendor/lib64/soundfx/libasphere.so
+vendor/lib64/soundfx/libqcbassboost.so
+vendor/lib64/soundfx/libqcvirt.so
+
+# Audio ACDB - from jasmine
+vendor/etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_General_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_Global_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_Handset_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_Headset_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_Hdmi_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_Speaker_cal.acdb
+vendor/etc/acdbdata/MTP/MTP_workspaceFile.qwsp
+vendor/etc/acdbdata/adsp_avs_config.acdb
+
+# Audio Power Amplifier - from jasmine
+vendor/firmware/dbmd4_va_fw.bin
+vendor/firmware/tas2557_uCDSP.bin
+vendor/firmware/tfa98xx.cnt
+
+# Bluetooth - from jasmine
+vendor/bin/hci_qcomm_init
+vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti
+vendor/etc/init/android.hardware.bluetooth@1.0-service-qti.rc
+vendor/lib/hw/android.hardware.bluetooth@1.0-impl-qti.so
+vendor/lib/libbt-hidlclient.so
+vendor/lib/libbtnv.so
+vendor/lib64/hw/android.hardware.bluetooth@1.0-impl-qti.so
+vendor/lib64/libbt-hidlclient.so
+vendor/lib64/libbtnv.so
+
+# Charger - from jasmine
+vendor/bin/hvdcp_opti
+
+# CNE - from jasmine
+etc/permissions/cneapiclient.xml
+etc/permissions/com.quicinc.cne.xml
+framework/cneapiclient.jar
+framework/com.quicinc.cne.api-V1.0-java.jar
+framework/com.quicinc.cne.api-V1.1-java.jar
+framework/com.quicinc.cne.constants-V1.0-java.jar
+framework/com.quicinc.cne.constants-V2.0-java.jar
+framework/com.quicinc.cne.constants-V2.1-java.jar
+framework/com.quicinc.cne.jar
+framework/com.quicinc.cne.server-V1.0-java.jar
+framework/com.quicinc.cne.server-V2.0-java.jar
+framework/com.quicinc.cne.server-V2.1-java.jar
+framework/com.quicinc.cne.server-V2.2-java.jar
+framework/vendor.qti.data.factory-V1.0-java.jar
+framework/vendor.qti.hardware.data.qmi-V1.0-java.jar
+-priv-app/CNEService/CNEService.apk
+vendor/bin/cnd
+vendor/etc/cne/wqeclient/ATT/ATT_profile1.xml
+vendor/etc/cne/wqeclient/ATT/ATT_profile2.xml
+vendor/etc/cne/wqeclient/ATT/ATT_profile3.xml
+vendor/etc/cne/wqeclient/ATT/ATT_profile4.xml
+vendor/etc/cne/wqeclient/ATT/ATT_profile5.xml
+vendor/etc/cne/wqeclient/ATT/ATT_profile6.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile1.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile2.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile3.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile4.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile5.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile6.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile7.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile15.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile16.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile17.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile18.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile19.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile20.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile21.xml
+vendor/etc/cne/wqeclient/ROW/ROW_profile32.xml
+vendor/etc/cne/wqeclient/VZW/VZW_profile1.xml
+vendor/etc/cne/wqeclient/VZW/VZW_profile2.xml
+vendor/etc/cne/wqeclient/VZW/VZW_profile3.xml
+vendor/etc/cne/wqeclient/VZW/VZW_profile4.xml
+vendor/etc/cne/wqeclient/VZW/VZW_profile5.xml
+vendor/etc/cne/wqeclient/VZW/VZW_profile6.xml
+-vendor/lib64/com.quicinc.cne.api@1.0.so
+-vendor/lib64/com.quicinc.cne.api@1.1.so
+-vendor/lib64/com.quicinc.cne.constants@1.0.so
+-vendor/lib64/com.quicinc.cne.constants@2.0.so
+-vendor/lib64/com.quicinc.cne.constants@2.1.so
+-vendor/lib64/com.quicinc.cne.server@2.0.so
+-vendor/lib64/com.quicinc.cne.server@2.1.so
+-vendor/lib64/com.quicinc.cne.server@2.2.so
+vendor/lib64/libcne.so
+vendor/lib64/libcneapiclient.so
+vendor/lib64/libcneoplookup.so
+vendor/lib64/libcneqmiutils.so
+vendor/lib64/libwms.so
+vendor/lib64/libwqe.so
+vendor/lib64/libxml.so
+vendor/lib64/vendor.qti.hardware.data.latency@1.0.so
+vendor/lib64/vendor.qti.hardware.data.dynamicdds@1.0.so
+vendor/lib64/vendor.qti.hardware.data.qmi@1.0.so
+vendor/lib64/vendor.qti.data.factory@1.0.so
+vendor/lib64/vendor.qti.latency@2.0.so
+
+# Consumerir - from jasmine
+vendor/lib/hw/consumerir.default.so
+vendor/lib64/hw/consumerir.default.so
+
+# Display Calibration - from jasmine
+vendor/etc/qdcm_calib_data_tianma_nt36672_fhd_video_mode_dsi_panel.xml
+vendor/etc/qdcm_calib_data_jdi_nt36672_fhd_video_mode_dsi_panel.xml
+
+# DPM - from jasmine
+bin/dpmd
+etc/dpm/dpm.conf
+etc/init/dpmd.rc
+etc/permissions/com.qti.dpmframework.xml
+etc/permissions/dpmapi.xml
+framework/com.qti.dpmframework.jar
+framework/dpmapi.jar
+framework/tcmclient.jar
+-priv-app/dpmserviceapp/dpmserviceapp.apk
+lib64/com.qualcomm.qti.dpm.api@1.0.so
+lib64/libdiag_system.so
+lib64/libdpmctmgr.so
+lib64/libdpmfdmgr.so
+lib64/libdpmframework.so
+lib64/libdpmtcm.so
+vendor/bin/dpmQmiMgr
+vendor/lib64/libdpmqmihal.so
+vendor/lib64/com.qualcomm.qti.dpm.api@1.0.so
+
+# DRM - from jasmine
+lib/libGPTEE_system.so
+lib/libQTEEConnector_system.so
+lib/vendor.qti.hardware.qteeconnector@1.0.so
+lib64/libGPTEE_system.so
+lib64/libQTEEConnector_system.so
+lib64/vendor.qti.hardware.qteeconnector@1.0.so
+vendor/bin/hw/vendor.qti.hardware.qteeconnector@1.0-service
+vendor/bin/qseecomd
+vendor/etc/init/vendor.qti.hardware.qteeconnector@1.0-service.rc
+vendor/lib/hw/vendor.qti.hardware.qteeconnector@1.0-impl.so
+vendor/lib/libbase64.so
+vendor/lib/libcppf.so
+vendor/lib/libdrmfs.so
+vendor/lib/libdrmtime.so
+vendor/lib/libGPreqcancel.so
+vendor/lib/libGPreqcancel_svc.so
+vendor/lib/libGPTEE_vendor.so
+vendor/lib/libmm-hdcpmgr.so
+vendor/lib/libqisl.so
+vendor/lib/libQSEEComAPI.so
+vendor/lib/libQTEEConnector_vendor.so
+vendor/lib/librmp.so
+vendor/lib/librpmb.so
+vendor/lib/libsdedrm.so
+vendor/lib/libSecureUILib.so
+vendor/lib/libsecureui.so
+vendor/lib/libsecureui_svcsock.so
+vendor/lib/libsi.so
+vendor/lib/libssd.so
+vendor/lib/libStDrvInt.so
+vendor/lib/libtzdrmgenprov.so
+vendor/lib64/hw/vendor.qti.hardware.qteeconnector@1.0-impl.so
+vendor/lib64/libbase64.so
+vendor/lib64/libdrmfs.so
+vendor/lib64/libdrmtime.so
+vendor/lib64/libGPreqcancel.so
+vendor/lib64/libGPreqcancel_svc.so
+vendor/lib64/libGPTEE_vendor.so
+vendor/lib64/libmm-hdcpmgr.so
+vendor/lib64/libqisl.so
+vendor/lib64/libQSEEComAPI.so
+vendor/lib64/libQTEEConnector_vendor.so
+vendor/lib64/librmp.so
+vendor/lib64/librpmb.so
+vendor/lib64/libsdedrm.so
+vendor/lib64/libSecureUILib.so
+vendor/lib64/libsecureui.so
+vendor/lib64/libsecureui_svcsock.so
+vendor/lib64/libsi.so
+vendor/lib64/libssd.so
+vendor/lib64/libStDrvInt.so
+vendor/lib64/libtzdrmgenprov.so
+vendor/lib64/vendor.qti.hardware.qteeconnector@1.0.so
+
+# Fingerprint firmware - from jasmine
+etc/firmware/goodixfp.b00
+etc/firmware/goodixfp.b01
+etc/firmware/goodixfp.b02
+etc/firmware/goodixfp.b03
+etc/firmware/goodixfp.b04
+etc/firmware/goodixfp.b05
+etc/firmware/goodixfp.b06
+etc/firmware/goodixfp.b07
+etc/firmware/goodixfp.mdt
+vendor/firmware/fpctzappfingerprint.b00
+vendor/firmware/fpctzappfingerprint.b01
+vendor/firmware/fpctzappfingerprint.b02
+vendor/firmware/fpctzappfingerprint.b03
+vendor/firmware/fpctzappfingerprint.b04
+vendor/firmware/fpctzappfingerprint.b05
+vendor/firmware/fpctzappfingerprint.b06
+vendor/firmware/fpctzappfingerprint.b07
+vendor/firmware/fpctzappfingerprint.mdt
+
+# FM - from jasmine
+lib/libfm-hci.so
+lib/fm_helium.so
+lib64/libfm-hci.so
+lib64/fm_helium.so
+vendor/bin/fm_qsoc_patches
+-lib/vendor.qti.hardware.fm@1.0.so
+-lib64/vendor.qti.hardware.fm@1.0.so
+vendor/lib/hw/vendor.qti.hardware.fm@1.0-impl.so
+vendor/lib/vendor.qti.hardware.fm@1.0.so
+vendor/lib64/hw/vendor.qti.hardware.fm@1.0-impl.so
+vendor/lib64/vendor.qti.hardware.fm@1.0.so
+
+# Gatekeeper - from jasmine
+vendor/bin/hw/android.hardware.gatekeeper@1.0-service-qti
+vendor/lib/hw/android.hardware.gatekeeper@1.0-impl-qti.so
+vendor/lib64/hw/android.hardware.gatekeeper@1.0-impl-qti.so
+vendor/etc/init/android.hardware.gatekeeper@1.0-service-qti.rc
+
+# GPS - from jasmine
+etc/permissions/com.qti.location.sdk.xml
+etc/permissions/izat.xt.srv.xml
+framework/com.qti.location.sdk.jar
+framework/izat.xt.srv.jar
+lib/vendor.qti.gnss@1.0.so
+lib/vendor.qti.gnss@1.1.so
+lib/vendor.qti.gnss@1.2.so
+lib/vendor.qti.gnss@2.0.so
+lib/libxt_native.so
+lib64/vendor.qti.gnss@1.0.so
+lib64/vendor.qti.gnss@1.1.so
+lib64/vendor.qti.gnss@1.2.so
+lib64/vendor.qti.gnss@2.0.so
+lib64/libxt_native.so
+vendor/bin/hw/vendor.qti.gnss@2.0-service
+vendor/bin/DR_AP_Service
+vendor/bin/garden_app
+vendor/bin/loc_launcher
+vendor/bin/lowi-server
+vendor/bin/slim_daemon
+vendor/bin/xtra-daemon
+vendor/etc/init/vendor.qti.gnss@2.0-service.rc
+vendor/etc/cacert_location.pem
+vendor/etc/xtra_root_cert.pem
+vendor/lib/hw/vendor.qti.gnss@2.0-impl.so
+vendor/lib/vendor.qti.gnss@1.0.so
+vendor/lib/vendor.qti.gnss@1.1.so
+vendor/lib/vendor.qti.gnss@1.2.so
+vendor/lib/vendor.qti.gnss@2.0.so
+vendor/lib64/hw/vendor.qti.gnss@2.0-impl.so
+vendor/lib64/lib_drplugin_server.so
+vendor/lib64/libalarmservice_jni.so
+vendor/lib64/libdataitems.so
+vendor/lib64/libdrplugin_client.so
+vendor/lib64/libDRPlugin.so
+vendor/lib64/libevent_observer.so
+vendor/lib64/libflp.so
+vendor/lib64/libgdtap.so
+vendor/lib64/libgeofence.so
+vendor/lib64/libizat_client_api.so
+vendor/lib64/libizat_core.so
+vendor/lib64/liblbs_core.so
+vendor/lib64/libloc_api_v02.so
+vendor/lib64/libloc_ds_api.so
+vendor/lib64/libloc_externalDr.so
+vendor/lib64/liblocationservice_glue.so
+vendor/lib64/liblocationservice.so
+vendor/lib64/liblowi_client.so
+vendor/lib64/liblowi_wifihal.so
+vendor/lib64/libquipc_os_api.so
+vendor/lib64/libslimclient.so
+vendor/lib64/libulp2.so
+vendor/lib64/libxtadapter.so
+vendor/lib64/libxtwifi_ulp_adaptor.so
+vendor/lib64/vendor.qti.gnss@1.0.so
+vendor/lib64/vendor.qti.gnss@1.1.so
+vendor/lib64/vendor.qti.gnss@1.2.so
+vendor/lib64/vendor.qti.gnss@2.0.so
+
+# Graphics firmware - from jasmine
+vendor/firmware/a512_zap.b00
+vendor/firmware/a512_zap.b01
+vendor/firmware/a512_zap.b02
+vendor/firmware/a512_zap.elf
+vendor/firmware/a512_zap.mdt
+vendor/firmware/a530_pfp.fw
+vendor/firmware/a530_pm4.fw
+vendor/firmware/a540_gpmu.fw2
+
+# Graphics - from LA.UM.7.2.r1-06900-sdm660.0
+vendor/lib64/egl/eglSubDriverAndroid.so
+vendor/lib64/egl/libEGL_adreno.so
+vendor/lib64/egl/libGLESv1_CM_adreno.so
+vendor/lib64/egl/libGLESv2_adreno.so
+vendor/lib64/egl/libq3dtools_adreno.so
+vendor/lib64/egl/libq3dtools_esx.so
+vendor/lib64/egl/libQTapGLES.so
+vendor/lib64/libadreno_utils.so
+vendor/lib64/libbccQTI.so
+vendor/lib64/libC2D2.so
+vendor/lib64/libc2d30_bltlib.so
+vendor/lib64/libCB.so
+vendor/lib64/libgsl.so
+vendor/lib64/libllvm-glnext.so
+vendor/lib64/libllvm-qcom.so
+vendor/lib64/libOpenCL.so
+vendor/lib64/librs_adreno_sha1.so
+vendor/lib64/librs_adreno.so
+vendor/lib64/libRSDriver_adreno.so
+vendor/lib/egl/eglSubDriverAndroid.so
+vendor/lib/egl/libEGL_adreno.so
+vendor/lib/egl/libGLESv1_CM_adreno.so
+vendor/lib/egl/libGLESv2_adreno.so
+vendor/lib/egl/libq3dtools_adreno.so
+vendor/lib/egl/libq3dtools_esx.so
+vendor/lib/egl/libQTapGLES.so
+vendor/lib/libadreno_utils.so
+vendor/lib/libbccQTI.so
+vendor/lib/libC2D2.so
+vendor/lib/libc2d30_bltlib.so
+vendor/lib/libCB.so
+vendor/lib/libgsl.so
+vendor/lib/libllvm-glnext.so
+vendor/lib/libllvm-qcom.so
+vendor/lib/libOpenCL.so
+vendor/lib/librs_adreno_sha1.so
+vendor/lib/librs_adreno.so
+vendor/lib/libRSDriver_adreno.so
+
+# Graphics (HDR)- from LA.UM.7.2.r1-06900-sdm660.0
+vendor/lib/libhdr_tm.so
+vendor/lib64/libhdr_tm.so
+
+# Graphics (SDM) - from LA.UM.7.2.r1-06900-sdm660.0
+vendor/lib/libqseed3.so
+vendor/lib/libsdm-color.so
+vendor/lib/libsdm-diag.so
+vendor/lib/libsdmextension.so
+vendor/lib/libtinyxml2_1.so
+vendor/lib64/libqseed3.so
+vendor/lib64/libsdm-color.so
+vendor/lib64/libsdm-diag.so
+vendor/lib64/libsdm-disp-vndapis.so
+vendor/lib64/libsdmextension.so
+vendor/lib64/libtinyxml2_1.so
+
+# Graphics (Vulkan) - from LA.UM.7.2.r1-06900-sdm660.0
+vendor/lib/hw/vulkan.sdm660.so
+vendor/lib64/hw/vulkan.sdm660.so
+
+# Keymaster QTI - from jasmine
+vendor/lib64/hw/android.hardware.keymaster@3.0-impl-qti.so
+vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so
+vendor/etc/init/android.hardware.keymaster@3.0-service-qti.rc
+vendor/bin/hw/android.hardware.keymaster@3.0-service-qti
+
+# Keymaster - from jasmine
+vendor/lib/libkeymasterutils.so
+vendor/lib/libkeymasterprovision.so
+vendor/lib/libkeymasterdeviceutils.so
+vendor/lib64/libkeymasterutils.so
+vendor/lib64/libkeymasterprovision.so
+vendor/lib64/libkeymasterdeviceutils.so
+
+# Keystore - from jasmine
+vendor/lib/hw/keystore.sdm660.so
+vendor/lib64/hw/keystore.sdm660.so
+
+# Listen - from jasmine
+vendor/lib/hw/sound_trigger.primary.sdm660.so
+vendor/lib/libadpcmdec.so
+vendor/lib/libsmwrapper.so
+vendor/lib/libgcs-calwrapper.so
+vendor/lib/libgcs-ipc.so
+vendor/lib/libgcs-osal.so
+vendor/lib/libgcs.so
+vendor/lib/vendor.qti.voiceprint@1.0.so
+vendor/lib64/hw/sound_trigger.primary.sdm660.so
+vendor/lib64/libgcs-calwrapper.so
+vendor/lib64/libgcs-ipc.so
+vendor/lib64/libgcs-osal.so
+vendor/lib64/libgcs.so
+vendor/lib64/vendor.qti.voiceprint@1.0.so
+
+# Media - from jasmine
+lib/libmmosal.so
+lib/vendor.qti.hardware.vpp@1.1.so
+lib64/libmmosal.so
+lib64/vendor.qti.hardware.vpp@1.1.so
+vendor/lib/libAlacSwDec.so
+vendor/lib/libApeSwDec.so
+vendor/lib/libdsd2pcm.so
+vendor/lib/libFlacSwDec.so
+-vendor/lib/libgpustats.so
+vendor/lib/libvpplibrary.so
+vendor/lib/libI420colorconvert.so
+vendor/lib/libmm-color-convertor.so
+vendor/lib/libmmsw_detail_enhancement.so
+vendor/lib/libmmsw_math.so
+vendor/lib/libmmsw_opencl.so
+vendor/lib/libmmsw_platform.so
+vendor/lib/libOmxAacDec.so
+vendor/lib/libOmxEvrcDec.so
+vendor/lib/libOmxQcelp13Dec.so
+vendor/lib/libOmxVpp.so
+vendor/lib/libOmxAlacDec.so
+vendor/lib/libOmxAlacDecSw.so
+vendor/lib/libOmxAmrDec.so
+vendor/lib/libOmxAmrwbplusDec.so
+vendor/lib/libOmxApeDec.so
+vendor/lib/libOmxApeDecSw.so
+vendor/lib/libOmxDsdDec.so
+vendor/lib/libOmxG711Dec.so
+vendor/lib/libOmxVideoDSMode.so
+vendor/lib/libOmxWmaDec.so
+vendor/lib/libvpphvx.so
+vendor/lib/libvqzip.so
+vendor/lib/libvpptestutils.so
+vendor/lib/vendor.qti.hardware.vpp@1.1.so
+vendor/lib64/libAlacSwDec.so
+vendor/lib64/libApeSwDec.so
+vendor/lib64/libFlacSwDec.so
+-vendor/lib64/libgpustats.so
+vendor/lib64/libI420colorconvert.so
+vendor/lib64/libmm-color-convertor.so
+vendor/lib64/libmmsw_detail_enhancement.so
+vendor/lib64/libmmsw_math.so
+vendor/lib64/libmmsw_opencl.so
+vendor/lib64/libmmsw_platform.so
+vendor/lib64/libOmxAacDec.so
+vendor/lib64/libOmxAlacDec.so
+vendor/lib64/libOmxAlacDecSw.so
+vendor/lib64/libOmxAmrDec.so
+vendor/lib64/libOmxAmrwbplusDec.so
+vendor/lib64/libOmxApeDec.so
+vendor/lib64/libOmxApeDecSw.so
+vendor/lib64/libOmxEvrcDec.so
+vendor/lib64/libOmxG711Dec.so
+vendor/lib64/libOmxQcelp13Dec.so
+vendor/lib64/libOmxVpp.so
+vendor/lib64/libOmxWmaDec.so
+vendor/lib64/libvpplibrary.so
+vendor/lib64/libvpphvx.so
+vendor/lib64/libvpptestutils.so
+vendor/lib64/vendor.qti.hardware.vpp@1.1.so
+
+# Mlipay - from wayne
+vendor/bin/mlipayd@1.1
+vendor/etc/init/vendor.xiaomi.hardware.mlipay@1.1-service.rc
+vendor/lib64/libmlipay@1.1.so
+vendor/lib64/libmlipay.so
+vendor/lib64/vendor.xiaomi.hardware.mlipay@1.0.so
+vendor/lib64/vendor.xiaomi.hardware.mlipay@1.1.so
+
+# Perf - from jasmine
+lib/libqti_performance.so
+lib/vendor.qti.hardware.perf@1.0.so
+lib/libqti-perfd-client_system.so
+lib64/libqti_performance.so
+lib64/vendor.qti.hardware.perf@1.0.so
+lib64/libqti-perfd-client_system.so
+lib/vendor.qti.hardware.iop@1.0.so
+lib/vendor.qti.hardware.iop@2.0.so
+lib64/vendor.qti.hardware.iop@1.0.so
+lib64/vendor.qti.hardware.iop@2.0.so
+vendor/bin/energy-awareness
+vendor/bin/msm_irqbalance
+vendor/bin/hw/vendor.qti.hardware.perf@1.0-service
+vendor/etc/init/vendor.qti.hardware.perf@1.0-service.rc
+vendor/etc/perf/perfboostsconfig.xml
+vendor/lib/libperfgluelayer.so
+vendor/lib/libqti-perfd-client.so
+vendor/lib/libqti-perfd.so
+vendor/lib/libqti-util.so
+vendor/lib/libqti-utils.so
+vendor/lib/libqti-iopd-client.so
+vendor/lib/hw/vendor.qti.hardware.iop@2.0-impl.so
+vendor/lib/vendor.qti.hardware.perf@1.0.so
+vendor/lib/vendor.qti.hardware.iop@1.0.so
+vendor/lib/vendor.qti.hardware.iop@2.0.so
+vendor/lib64/libperfgluelayer.so
+vendor/lib64/libqti-perfd-client.so
+vendor/lib64/libqti-perfd.so
+vendor/lib64/libqti-util.so
+vendor/lib64/libqti-utils.so
+vendor/lib64/libqti-iopd-client.so
+vendor/lib64/hw/vendor.qti.hardware.iop@2.0-impl.so
+vendor/lib64/vendor.qti.hardware.perf@1.0.so
+vendor/lib64/vendor.qti.hardware.iop@1.0.so
+vendor/lib64/vendor.qti.hardware.iop@2.0.so
+
+# Peripheral manager - from jasmine
+vendor/bin/pm-proxy
+vendor/bin/pm-service
+vendor/lib/libperipheral_client.so
+vendor/lib64/libperipheral_client.so
+
+# Postprocessing - from jasmine
+vendor/bin/hw/vendor.display.color@1.0-service
+vendor/bin/mm-pp-dpps
+vendor/etc/init/vendor.display.color@1.0-service.rc
+vendor/lib64/libdisp-aba.so
+vendor/lib64/vendor.display.color@1.0.so
+vendor/lib64/vendor.display.color@1.1.so
+vendor/lib64/vendor.display.postproc@1.0.so
+
+# QMI - from jasmine
+etc/permissions/qti_permissions.xml
+etc/permissions/qti_libpermissions.xml|ef3c88495f2f61a2d16e1445113a9d80f8db0e0a
+vendor/bin/irsc_util
+vendor/bin/pd-mapper
+vendor/lib/libdiag.so
+vendor/lib/libdsutils.so
+vendor/lib/libidl.so
+vendor/lib/libqcci_legacy.so
+vendor/lib/libqdi.so
+vendor/lib/libqdp.so
+vendor/lib/libqmi_cci.so
+vendor/lib/libqmi_client_helper.so
+vendor/lib/libqmi_client_qmux.so
+vendor/lib/libqmi_common_so.so
+vendor/lib/libqmi_csi.so
+vendor/lib/libqmi_encdec.so
+vendor/lib/libqmi.so
+vendor/lib/libqmiservices.so
+vendor/lib64/libdiag.so
+vendor/lib64/libdsutils.so
+vendor/lib64/libidl.so
+vendor/lib64/libqcci_legacy.so
+vendor/lib64/libqdi.so
+vendor/lib64/libqdp.so
+vendor/lib64/libqmi_cci.so
+vendor/lib64/libqmi_client_helper.so
+vendor/lib64/libqmi_client_qmux.so
+vendor/lib64/libqmi_common_so.so
+vendor/lib64/libqmi_csi.so
+vendor/lib64/libqmi_encdec.so
+vendor/lib64/libqmi.so
+vendor/lib64/libqmiservices.so
+
+
+# Radio - from jasmine
+-app/datastatusnotification/datastatusnotification.apk
+-app/embms/embms.apk
+-app/QtiTelephonyService/QtiTelephonyService.apk
+vendor/bin/ATFWD-daemon
+vendor/bin/netmgrd
+vendor/bin/port-bridge
+vendor/bin/rmt_storage
+vendor/bin/tftp_server
+vendor/bin/hw/qcrild
+vendor/etc/data/dsi_config.xml
+vendor/etc/data/netmgr_config.xml
+vendor/etc/init/qcrild.rc
+etc/permissions/embms.xml
+etc/permissions/qcrilhook.xml
+etc/permissions/telephonyservice.xml
+framework/embmslibrary.jar
+framework/qcrilhook.jar
+framework/qti-telephony-common.jar|e529711775c31da38c9ecd1ab94b27ee15570dc4
+framework/QtiTelephonyServicelibrary.jar
+-priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk
+vendor/bin/qti
+vendor/lib/libmdmdetect.so
+vendor/lib64/libconfigdb.so
+vendor/lib64/libdsi_netctrl.so
+vendor/lib64/liblqe.so
+vendor/lib64/libmdmdetect.so
+vendor/lib64/libnetmgr.so
+vendor/lib64/libpdmapper.so
+vendor/lib64/libpdnotifier.so
+vendor/lib64/libnetmgr_common.so
+vendor/lib64/libnetmgr_nr_fusion.so
+vendor/lib64/libnetmgr_rmnet_ext.so
+vendor/lib64/libnlnetmgr.so
+vendor/lib64/libpdmapper.so
+vendor/lib64/libpdnotifier.so
+vendor/lib64/libqcmaputils.so
+vendor/lib64/libqrtr.so
+vendor/lib64/libqsocket.so
+vendor/lib64/libqcrilFramework.so
+vendor/lib64/libril-qc-hal-qmi.so
+vendor/lib64/libril-qc-ltedirectdisc.so
+vendor/lib64/libril-qc-qmi-1.so
+vendor/lib64/libril-qc-radioconfig.so
+vendor/lib64/libril-qcril-hook-oem.so
+vendor/lib64/librilqmiservices.so
+vendor/lib64/libsettings.so
+vendor/lib64/libsystem_health_mon.so
+vendor/lib64/qcrild_librilutils.so
+vendor/lib64/vendor.qti.hardware.radio.uim_remote_client@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.qtiradio@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.qtiradio@2.0.so
+vendor/lib64/vendor.qti.hardware.radio.lpa@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.atcmdfwd@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.uim@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.uim@1.1.so
+vendor/lib64/vendor.qti.hardware.radio.uim_remote_server@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.qcrilhook@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.am@1.0.so
+vendor/radio/qcril_database/qcril.db
+
+# Radio - IMS - from jasmine
+-app/imssettings/imssettings.apk
+-priv-app/ims/ims.apk
+etc/permissions/com.qualcomm.qti.imscmservice.xml
+etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml
+etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml
+framework/com.qualcomm.qti.imscmservice-V2.0-java.jar
+framework/com.qualcomm.qti.imscmservice-V2.1-java.jar
+framework/com.qualcomm.qti.uceservice-V2.0-java.jar
+framework/vendor.qti.ims.callinfo-V1.0-java.jar
+framework/vendor.qti.ims.rcsconfig-V1.0-java.jar
+lib64/lib-imscamera.so
+lib64/lib-imsvideocodec.so
+lib64/lib-imsvt.so
+lib64/lib-imsvtextutils.so
+lib64/lib-imsvtutils.so
+lib64/libimscamera_jni.so
+lib64/libimsmedia_jni.so
+lib64/librcc.so
+vendor/bin/ims_rtp_daemon
+vendor/bin/imsdatadaemon
+vendor/bin/imsqmidaemon
+vendor/bin/imsrcsd
+vendor/lib64/com.qualcomm.qti.imscmservice@1.0.so
+vendor/lib64/com.qualcomm.qti.imscmservice@2.0.so
+vendor/lib64/com.qualcomm.qti.imscmservice@2.1.so
+vendor/lib64/com.qualcomm.qti.uceservice@2.0.so
+vendor/lib64/lib-dplmedia.so
+vendor/lib64/lib-imscmservice.so
+vendor/lib64/lib-imsdpl.so
+vendor/lib64/lib-imsqimf.so
+vendor/lib64/lib-imsrcs-v2.so
+vendor/lib64/lib-imsrcsbaseimpl.so
+vendor/lib64/lib-imsxml.so
+vendor/lib64/lib-rtpcommon.so
+vendor/lib64/lib-rtpcore.so
+vendor/lib64/lib-rtpdaemoninterface.so
+vendor/lib64/lib-rtpsl.so
+vendor/lib64/lib-uceservice.so
+vendor/lib64/lib-siputility.so
+vendor/lib64/vendor.qti.hardware.radio.ims@1.0.so
+vendor/lib64/vendor.qti.hardware.radio.ims@1.1.so
+vendor/lib64/vendor.qti.hardware.radio.ims@1.2.so
+vendor/lib64/vendor.qti.hardware.radio.ims@1.3.so
+vendor/lib64/vendor.qti.hardware.radio.ims@1.4.so
+vendor/lib64/vendor.qti.imsrtpservice@1.0-service-Impl.so
+vendor/lib64/vendor.qti.imsrtpservice@1.0.so
+vendor/lib64/vendor.qti.ims.callinfo@1.0.so
+vendor/lib64/vendor.qti.ims.rcsconfig@1.0.so
+
+# Sensors - from jasmine
+vendor/bin/sensors.qti
+vendor/lib/hw/activity_recognition.sdm660.so
+vendor/lib/libsensor_reg.so
+vendor/lib/libsensor1.so
+vendor/lib/sensors.ssc.so
+vendor/lib64/hw/activity_recognition.sdm660.so
+vendor/lib64/libsensor_reg.so
+vendor/lib64/libsensor1.so
+vendor/lib64/sensors.ssc.so
+
+# Thermal - from jasmine
+vendor/etc/thermal-engine.conf
+vendor/etc/thermal-engine-map.conf
+vendor/etc/thermal-engine-normal.conf
+vendor/etc/thermal-engine-video.conf
+vendor/bin/thermal-engine
+-vendor/lib/libthermalclient.so
+-vendor/lib64/libthermalclient.so
+vendor/lib64/libthermalioctl.so
+vendor/lib64/libthermalfeature.so
+
+# Time services - from jasmine
+-vendor/app/TimeService/TimeService.apk
+vendor/bin/time_daemon
+-vendor/lib/libtime_genoff.so
+-vendor/lib64/libtime_genoff.so
+
+# TUI - from jasmine
+lib/vendor.qti.hardware.tui_comm@1.0.so
+lib64/vendor.qti.hardware.tui_comm@1.0.so
+vendor/bin/hw/vendor.qti.hardware.tui_comm@1.0-service-qti
+vendor/etc/init/vendor.qti.hardware.tui_comm@1.0-service-qti.rc
+vendor/lib/vendor.qti.hardware.tui_comm@1.0.so
+vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so
+
+# Widevine - from jasmine
+vendor/bin/hw/android.hardware.drm@1.1-service.widevine
+vendor/etc/init/android.hardware.drm@1.1-service.widevine.rc
+vendor/lib64/libwvhidl.so
+
+# Wifi - from jasmine
+vendor/bin/cnss-daemon
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
new file mode 100644
index 0000000..135cf74
--- /dev/null
+++ b/rootdir/Android.mk
@@ -0,0 +1,105 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# files that live under device/qcom/common/rootdir/etc/
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.post_boot.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.sensors.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.class_main.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.class_main.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.usb.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.usb.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.msm.usb.configfs.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.msm.usb.configfs.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.usb.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.usb.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := ueventd.qcom.rc
+LOCAL_MODULE_STEM := ueventd.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/ueventd.qcom.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.target.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.target.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := fstab.qcom
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+ifeq ($(AB_OTA_UPDATER), true)
+LOCAL_SRC_FILES := etc/fstab_AB.qcom
+else
+LOCAL_SRC_FILES := etc/fstab.qcom
+endif
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.goodix.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.goodix.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
diff --git a/rootdir/bin/init.class_main.sh b/rootdir/bin/init.class_main.sh
new file mode 100755
index 0000000..9368ac9
--- /dev/null
+++ b/rootdir/bin/init.class_main.sh
@@ -0,0 +1,174 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# start ril-daemon only for targets on which radio is present
+#
+baseband=`getprop ro.baseband`
+sgltecsfb=`getprop persist.vendor.radio.sglte_csfb`
+datamode=`getprop persist.vendor.data.mode`
+rild_status=`getprop init.svc.ril-daemon`
+vendor_rild_status=`getprop init.svc.vendor.ril-daemon`
+
+case "$baseband" in
+ "apq" | "sda" | "qcs" )
+ setprop ro.vendor.radio.noril yes
+ if [ -n "$rild_status" ] || [ -n "$vendor_rild_status" ]; then
+ stop ril-daemon
+ stop vendor.ril-daemon
+ start vendor.ipacm
+ fi
+esac
+
+case "$baseband" in
+ "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
+ start vendor.qmuxd
+esac
+
+case "$baseband" in
+ "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6")
+
+ if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then
+ modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1`
+ # Check if this is AT 3.0 or below. If so, start ril-daemon
+ if [ "$modem" = "AT" ]; then
+ version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
+ if [ ! -z $version ]; then
+ if [ "$version" \< "3.1" ]; then
+ # For OTA targets, ril-daemon will be defined and for new vendor.ril-daemon
+ # To keep this script agnostic,start both of them as only valid one will start.
+ start ril-daemon
+ start vendor.ril-daemon
+ fi
+ fi
+ # For older than TA 3.0 start ril-daemon
+ elif [ "$modem" = "TA" ]; then
+ version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
+ if [ ! -z $version ]; then
+ if [ "$version" \< "3.0" ]; then
+ # For OTA targets, ril-daemon will be defined and for new vendor.ril-daemon
+ # To keep this script agnostic,start both of them as only valid one will start.
+ start ril-daemon
+ start vendor.ril-daemon
+ fi
+ fi
+ # For older than JO 3.2 start ril-daemon
+ elif [ "$modem" = "JO" ]; then
+ version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1`
+ if [ ! -z $version ]; then
+ if [ "$version" \< "3.2" ]; then
+ # For OTA targets, ril-daemon will be defined and for new vendor.ril-daemon
+ # To keep this script agnostic,start both of them as only valid one will start.
+ start ril-daemon
+ start vendor.ril-daemon
+ fi
+ fi
+ else
+ start ril-daemon
+ start vendor.ril-daemon
+ fi
+ fi
+
+ # Get ril-daemon status again to ensure that we have latest info
+ rild_status=`getprop init.svc.ril-daemon`
+ vendor_rild_status=`getprop init.svc.vendor.ril-daemon`
+
+ if [[ -z "$rild_status" || "$rild_status" = "stopped" ]] && [[ -z "$vendor_rild_status" || "$vendor_rild_status" = "stopped" ]]; then
+ start vendor.qcrild
+ fi
+ start vendor.ipacm-diag
+ start vendor.ipacm
+ case "$baseband" in
+ "svlte2a" | "csfb")
+ start qmiproxy
+ ;;
+ "sglte" | "sglte2" )
+ if [ "x$sgltecsfb" != "xtrue" ]; then
+ start qmiproxy
+ else
+ setprop persist.vendor.radio.voice.modem.index 0
+ fi
+ ;;
+ esac
+
+ multisim=`getprop persist.radio.multisim.config`
+
+ if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
+ if [[ -z "$rild_status" || "$rild_status" = "stopped" ]] && [[ -z "$vendor_rild_status" || "$vendor_rild_status" = "stopped" ]]; then
+ start vendor.qcrild2
+ else
+ start vendor.ril-daemon2
+ fi
+ elif [ "$multisim" = "tsts" ]; then
+ if [[ -z "$rild_status" || "$rild_status" = "stopped" ]] && [[ -z "$vendor_rild_status" || "$vendor_rild_status" = "stopped" ]]; then
+ start vendor.qcrild2
+ start vendor.qcrild3
+ else
+ start vendor.ril-daemon2
+ start vendor.ril-daemon3
+ fi
+ fi
+
+ case "$datamode" in
+ "tethered")
+ start vendor.dataqti
+ start vendor.dataadpl
+ start vendor.port-bridge
+ ;;
+ "concurrent")
+ start vendor.dataqti
+ start vendor.dataadpl
+ start vendor.netmgrd
+ start vendor.port-bridge
+ ;;
+ *)
+ start vendor.netmgrd
+ ;;
+ esac
+esac
+
+#
+# Allow persistent faking of bms
+# User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity
+#
+fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity`
+case "$fake_batt_capacity" in
+ "") ;; #Do nothing here
+ * )
+ echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
+ ;;
+esac
diff --git a/rootdir/bin/init.goodix.sh b/rootdir/bin/init.goodix.sh
new file mode 100755
index 0000000..cb019c5
--- /dev/null
+++ b/rootdir/bin/init.goodix.sh
@@ -0,0 +1,32 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+if [ ! -f /data/system/users/0/settings_fingerprint.xml ]; then
+ rm -rf /mnt/vendor/persist/data/finger_*
+fi
diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh
new file mode 100755
index 0000000..12600b0
--- /dev/null
+++ b/rootdir/bin/init.qcom.post_boot.sh
@@ -0,0 +1,4229 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2012-2013, 2016-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+function 8953_sched_dcvs_eas()
+{
+ #governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1401600 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8953 and sdm450 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_load
+}
+
+function 8917_sched_dcvs_eas()
+{
+ #governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1094400 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8917 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_load
+}
+
+function 8937_sched_dcvs_eas()
+{
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8937 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ ## enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8937 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+
+}
+
+function 8953_sched_dcvs_hmp()
+{
+ #scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ #task packing settings
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_static_cpu_pwr_cost
+ # spill load is set to 100% by default in the kernel
+ echo 3 > /proc/sys/kernel/sched_spill_nr_run
+ # Apply inter-cluster load balancer restrictions
+ echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill
+ # set sync wakee policy tunable
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+
+ #governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1401600:39000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 1401600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "85 1401600:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ echo 19 > /proc/sys/kernel/sched_upmigrate_min_nice
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif
+ echo 200000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 200000 > /proc/sys/kernel/sched_freq_dec_notify
+
+}
+
+function 8917_sched_dcvs_hmp()
+{
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 1 > /proc/sys/kernel/sched_restrict_tasks_spread
+ # HMP Task packing settings
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1094400:39000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 1094400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1094400:90" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+}
+
+function 8937_sched_dcvs_hmp()
+{
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ # HMP Task packing settings
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1094400:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 768000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+}
+target=`getprop ro.board.platform`
+
+function configure_zram_parameters() {
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ low_ram=`getprop ro.config.low_ram`
+
+ # Zram disk - 75% for Go devices.
+ # For 512MB Go device, size = 384MB, set same for Non-Go.
+ # For 1GB Go device, size = 768MB, set same for Non-Go.
+ # For 2GB and 3GB Non-Go device, size = 1GB
+ # For 4GB and 6GB Non-Go device, size = 2GB
+ # And enable lz4 zram compression for Go targets.
+
+ if [ "$low_ram" == "true" ]; then
+ echo lz4 > /sys/block/zram0/comp_algorithm
+ fi
+
+ if [ -f /sys/block/zram0/disksize ]; then
+ if [ $MemTotal -le 524288 ]; then
+ echo 402653184 > /sys/block/zram0/disksize
+ elif [ $MemTotal -le 1048576 ]; then
+ echo 805306368 > /sys/block/zram0/disksize
+ elif [ $MemTotal -le 3145728 ]; then
+ echo 1073741824 > /sys/block/zram0/disksize
+ elif [ $MemTotal -le 6291456 ]; then
+ echo 2147483648 > /sys/block/zram0/disksize
+ fi
+ mkswap /dev/block/zram0
+ swapon /dev/block/zram0 -p 32758
+ fi
+}
+
+function configure_read_ahead_kb_values() {
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ # Set 128 for <= 3GB &
+ # set 512 for >= 4GB targets.
+ if [ $MemTotal -le 3145728 ]; then
+ echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb
+ echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
+ echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
+ echo 128 > /sys/block/dm-0/queue/read_ahead_kb
+ echo 128 > /sys/block/dm-1/queue/read_ahead_kb
+ else
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
+ echo 512 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
+ echo 512 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
+ echo 512 > /sys/block/dm-0/queue/read_ahead_kb
+ echo 512 > /sys/block/dm-1/queue/read_ahead_kb
+ fi
+}
+
+function disable_core_ctl() {
+ if [ -f /sys/devices/system/cpu/cpu0/core_ctl/enable ]; then
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+ else
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
+ fi
+}
+
+function enable_swap() {
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ SWAP_ENABLE_THRESHOLD=1048576
+ swap_enable=`getprop ro.vendor.qti.config.swap`
+
+ # Enable swap initially only for 1 GB targets
+ if [ "$MemTotal" -le "$SWAP_ENABLE_THRESHOLD" ] && [ "$swap_enable" == "true" ]; then
+ # Static swiftness
+ echo 1 > /proc/sys/vm/swap_ratio_enable
+ echo 70 > /proc/sys/vm/swap_ratio
+
+ # Swap disk - 200MB size
+ if [ ! -f /data/vendor/swap/swapfile ]; then
+ dd if=/dev/zero of=/data/vendor/swap/swapfile bs=1m count=200
+ fi
+ mkswap /data/vendor/swap/swapfile
+ swapon /data/vendor/swap/swapfile -p 32758
+ fi
+}
+
+function configure_memory_parameters() {
+ # Set Memory parameters.
+ #
+ # Set per_process_reclaim tuning parameters
+ # All targets will use vmpressure range 50-70,
+ # All targets will use 512 pages swap size.
+ #
+ # Set Low memory killer minfree parameters
+ # 32 bit Non-Go, all memory configurations will use 15K series
+ # 32 bit Go, all memory configurations will use uLMK + Memcg
+ # 64 bit will use Google default LMK series.
+ #
+ # Set ALMK parameters (usually above the highest minfree values)
+ # vmpressure_file_min threshold is always set slightly higher
+ # than LMK minfree's last bin value for all targets. It is calculated as
+ # vmpressure_file_min = (last bin - second last bin ) + last bin
+ #
+ # Set allocstall_threshold to 0 for all targets.
+ #
+
+ProductName=`getprop ro.product.name`
+low_ram=`getprop ro.config.low_ram`
+
+if [ "$ProductName" == "msmnile" ]; then
+ # Enable ZRAM
+ configure_zram_parameters
+ configure_read_ahead_kb_values
+else
+ arch_type=`uname -m`
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ # Set parameters for 32-bit Go targets.
+ if [ $MemTotal -le 1048576 ] && [ "$low_ram" == "true" ]; then
+ # Disable KLMK, ALMK, PPR & Core Control for Go devices
+ echo 0 > /sys/module/lowmemorykiller/parameters/enable_lmk
+ echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
+ echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
+ disable_core_ctl
+ else
+
+ # Read adj series and set adj threshold for PPR and ALMK.
+ # This is required since adj values change from framework to framework.
+ adj_series=`cat /sys/module/lowmemorykiller/parameters/adj`
+ adj_1="${adj_series#*,}"
+ set_almk_ppr_adj="${adj_1%%,*}"
+
+ # PPR and ALMK should not act on HOME adj and below.
+ # Normalized ADJ for HOME is 6. Hence multiply by 6
+ # ADJ score represented as INT in LMK params, actual score can be in decimal
+ # Hence add 6 considering a worst case of 0.9 conversion to INT (0.9*6).
+ # For uLMK + Memcg, this will be set as 6 since adj is zero.
+ set_almk_ppr_adj=$(((set_almk_ppr_adj * 6) + 6))
+ echo $set_almk_ppr_adj > /sys/module/lowmemorykiller/parameters/adj_max_shift
+
+ # Calculate vmpressure_file_min as below & set for 64 bit:
+ # vmpressure_file_min = last_lmk_bin + (last_lmk_bin - last_but_one_lmk_bin)
+ if [ "$arch_type" == "aarch64" ]; then
+ minfree_series=`cat /sys/module/lowmemorykiller/parameters/minfree`
+ minfree_1="${minfree_series#*,}" ; rem_minfree_1="${minfree_1%%,*}"
+ minfree_2="${minfree_1#*,}" ; rem_minfree_2="${minfree_2%%,*}"
+ minfree_3="${minfree_2#*,}" ; rem_minfree_3="${minfree_3%%,*}"
+ minfree_4="${minfree_3#*,}" ; rem_minfree_4="${minfree_4%%,*}"
+ minfree_5="${minfree_4#*,}"
+
+ vmpres_file_min=$((minfree_5 + (minfree_5 - rem_minfree_4)))
+ echo $vmpres_file_min > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
+ else
+ # Set LMK series, vmpressure_file_min for 32 bit non-go targets.
+ # Disable Core Control, enable KLMK for non-go 8909.
+ if [ "$ProductName" == "msm8909" ]; then
+ disable_core_ctl
+ echo 1 > /sys/module/lowmemorykiller/parameters/enable_lmk
+ fi
+ echo "15360,19200,23040,26880,34415,43737" > /sys/module/lowmemorykiller/parameters/minfree
+ echo 53059 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
+ fi
+
+ # Enable adaptive LMK for all targets &
+ # use Google default LMK series for all 64-bit targets >=2GB.
+ echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
+
+ # Enable oom_reaper
+ if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+ fi
+
+ # Set PPR parameters
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ case "$soc_id" in
+ # Do not set PPR parameters for premium targets
+ # sdm845 - 321, 341
+ # msm8998 - 292, 319
+ # msm8996 - 246, 291, 305, 312
+ "321" | "341" | "292" | "319" | "246" | "291" | "305" | "312")
+ ;;
+ *)
+ #Set PPR parameters for all other targets.
+ echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
+ echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
+ echo 50 > /sys/module/process_reclaim/parameters/pressure_min
+ echo 70 > /sys/module/process_reclaim/parameters/pressure_max
+ echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
+ echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
+ ;;
+ esac
+ fi
+
+ # Set allocstall_threshold to 0 for all targets.
+ # Set swappiness to 100 for all targets
+ echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
+ echo 100 > /proc/sys/vm/swappiness
+
+ configure_zram_parameters
+
+ configure_read_ahead_kb_values
+
+ enable_swap
+fi
+}
+
+function enable_memory_features()
+{
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ if [ $MemTotal -le 2097152 ]; then
+ #Enable B service adj transition for 2GB or less memory
+ setprop ro.vendor.qti.sys.fw.bservice_enable true
+ setprop ro.vendor.qti.sys.fw.bservice_limit 5
+ setprop ro.vendor.qti.sys.fw.bservice_age 5000
+
+ #Enable Delay Service Restart
+ setprop ro.vendor.qti.am.reschedule_service true
+ fi
+}
+
+function start_hbtp()
+{
+ # Start the Host based Touch processing but not in the power off mode.
+ bootmode=`getprop ro.bootmode`
+ if [ "charger" != $bootmode ]; then
+ start vendor.hbtp
+ fi
+}
+
+case "$target" in
+ "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a" | "msm7627_surf" | \
+ "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x")
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ ;;
+esac
+
+case "$target" in
+ "msm7201a_ffa" | "msm7201a_surf")
+ echo 500000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ echo 75000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 1 > /sys/module/pm2/parameters/idle_sleep_mode
+ ;;
+esac
+
+case "$target" in
+ "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627_surf" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm7627a" )
+ echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ ;;
+esac
+
+case "$target" in
+ "msm8660")
+ echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
+ echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
+ echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_dig
+ echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_mem
+ echo 1 > /sys/module/rpm_resources/enable_low_power/rpm_cpu
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ ;;
+esac
+
+case "$target" in
+ "msm8960")
+ echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
+ echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
+ echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig
+ echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 1026000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ chown -h system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ # set DCVS parameters for CPU
+ echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
+ echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu0/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu0/disable_pc_threshold
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_max_us
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu1/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu1/disable_pc_threshold
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_max_us
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu2/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu2/disable_pc_threshold
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_max_us
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu3/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu3/disable_pc_threshold
+ # set DCVS parameters for GPU
+ echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_max_us
+ echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_min_us
+ echo 0 > /sys/module/msm_dcvs/cores/gpu0/slack_mode_dynamic
+ # set msm_mpdecision parameters
+ echo 45000 > /sys/module/msm_mpdecision/slack_time_max_us
+ echo 15000 > /sys/module/msm_mpdecision/slack_time_min_us
+ echo 100000 > /sys/module/msm_mpdecision/em_win_size_min_us
+ echo 1000000 > /sys/module/msm_mpdecision/em_win_size_max_us
+ echo 3 > /sys/module/msm_mpdecision/online_util_pct_min
+ echo 25 > /sys/module/msm_mpdecision/online_util_pct_max
+ echo 97 > /sys/module/msm_mpdecision/em_max_util_pct
+ echo 2 > /sys/module/msm_mpdecision/rq_avg_poll_ms
+ echo 10 > /sys/module/msm_mpdecision/mp_em_rounding_point_min
+ echo 85 > /sys/module/msm_mpdecision/mp_em_rounding_point_max
+ echo 50 > /sys/module/msm_mpdecision/iowait_threshold_pct
+ #set permissions for the nodes needed by display on/off hook
+ chown -h system /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
+ chown -h system /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
+ chown -h system /sys/module/msm_mpdecision/slack_time_max_us
+ chown -h system /sys/module/msm_mpdecision/slack_time_min_us
+ chmod -h 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
+ chmod -h 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
+ chmod -h 664 /sys/module/msm_mpdecision/slack_time_max_us
+ chmod -h 664 /sys/module/msm_mpdecision/slack_time_min_us
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+ case "$soc_id" in
+ "130")
+ echo 230 > /sys/class/gpio/export
+ echo 228 > /sys/class/gpio/export
+ echo 229 > /sys/class/gpio/export
+ echo "in" > /sys/class/gpio/gpio230/direction
+ echo "rising" > /sys/class/gpio/gpio230/edge
+ echo "in" > /sys/class/gpio/gpio228/direction
+ echo "rising" > /sys/class/gpio/gpio228/edge
+ echo "in" > /sys/class/gpio/gpio229/direction
+ echo "rising" > /sys/class/gpio/gpio229/edge
+ echo 253 > /sys/class/gpio/export
+ echo 254 > /sys/class/gpio/export
+ echo 257 > /sys/class/gpio/export
+ echo 258 > /sys/class/gpio/export
+ echo 259 > /sys/class/gpio/export
+ echo "out" > /sys/class/gpio/gpio253/direction
+ echo "out" > /sys/class/gpio/gpio254/direction
+ echo "out" > /sys/class/gpio/gpio257/direction
+ echo "out" > /sys/class/gpio/gpio258/direction
+ echo "out" > /sys/class/gpio/gpio259/direction
+ chown -h media /sys/class/gpio/gpio253/value
+ chown -h media /sys/class/gpio/gpio254/value
+ chown -h media /sys/class/gpio/gpio257/value
+ chown -h media /sys/class/gpio/gpio258/value
+ chown -h media /sys/class/gpio/gpio259/value
+ chown -h media /sys/class/gpio/gpio253/direction
+ chown -h media /sys/class/gpio/gpio254/direction
+ chown -h media /sys/class/gpio/gpio257/direction
+ chown -h media /sys/class/gpio/gpio258/direction
+ chown -h media /sys/class/gpio/gpio259/direction
+ echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_dig
+ echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_mem
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm8974")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+ case "$soc_id" in
+ "208" | "211" | "214" | "217" | "209" | "212" | "215" | "218" | "194" | "210" | "213" | "216")
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "cpubw_hwmon" > $devfreq_gov
+ done
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 20 > /sys/module/cpu_boost/parameters/boost_ms
+ echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
+ echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ setprop ro.vendor.perf.cores_online 2
+ ;;
+ *)
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 1190400 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ ;;
+ esac
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate
+ ;;
+esac
+
+case "$target" in
+ "msm8916")
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+ case "$soc_id" in
+ "206")
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 2 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+ ;;
+ "247" | "248" | "249" | "250")
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ ;;
+ "239" | "241" | "263")
+ if [ -f /sys/devices/soc0/revision ]; then
+ revision=`cat /sys/devices/soc0/revision`
+ else
+ revision=`cat /sys/devices/system/soc/soc0/revision`
+ fi
+ echo 10 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ fi
+ case "$soc_id" in
+ "239")
+ case "$hw_platform" in
+ "Surf")
+ case "$platform_subtype_id" in
+ "1" | "2")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ "MTP")
+ case "$platform_subtype_id" in
+ "3")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ "268" | "269" | "270" | "271")
+ echo 10 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+ ;;
+ "233" | "240" | "242")
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm8226")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "msm8610")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ setprop ro.qualcomm.perf.min_freq 7
+ echo 1 > /sys/kernel/mm/ksm/deferred_timer
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "msm8916")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ # HMP scheduler settings for 8916, 8936, 8939, 8929
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # Apply governor settings for 8916
+ case "$soc_id" in
+ "206" | "247" | "248" | "249" | "250")
+
+ # HMP scheduler load tracking settings
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # HMP Task packing settings for 8916
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
+
+ # disable thermal core_control to update scaling_min_freq
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ ;;
+ esac
+
+ # Apply governor settings for 8936
+ case "$soc_id" in
+ "233" | "240" | "242")
+
+ # HMP scheduler load tracking settings
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # HMP Task packing settings for 8936
+ echo 50 > /proc/sys/kernel/sched_small_task
+ echo 50 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 10 > /proc/sys/kernel/sched_mostly_idle_nr_run
+
+ # disable thermal core_control to update scaling_min_freq, interactive gov
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ echo "25000 1113600:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 800000:85 1113600:90 1267200:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ ;;
+ esac
+
+ # Apply governor settings for 8939
+ case "$soc_id" in
+ "239" | "241" | "263" | "268" | "269" | "270" | "271")
+
+ if [ `cat /sys/devices/soc0/revision` != "3.0" ]; then
+ # Apply 1.0 and 2.0 specific Sched & Governor settings
+
+ # HMP scheduler load tracking settings
+ echo 5 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # HMP Task packing settings for 8939, 8929
+ echo 20 > /proc/sys/kernel/sched_small_task
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "20000 1113600:50000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo "25000 800000:50000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 75 > /proc/sys/kernel/sched_upmigrate
+ echo 60 > /proc/sys/kernel/sched_downmigrate
+
+ # cpu idle load threshold
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ # cpu idle nr run threshold
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ else
+ # Apply 3.0 specific Sched & Governor settings
+ # HMP scheduler settings for 8939 V3.0
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ # HMP Task packing settings for 8939 V3.0
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1113600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+ # Enable core control
+# insmod /system/lib/modules/core_ctl.ko
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ case "$revision" in
+ "3.0")
+ # Enable dynamic clock gatin
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "msm8952")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+ case "$soc_id" in
+ "264" | "289")
+ # Apply Scheduler and Governor settings for 8952
+
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ # HMP Task packing settings
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle
+
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1113600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 806400:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable Low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+ # Enable core control
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Enable dynamic clock gating
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ ;;
+ *)
+ panel=`cat /sys/class/graphics/fb0/modes`
+ if [ "${panel:5:1}" == "x" ]; then
+ panel=${panel:2:3}
+ else
+ panel=${panel:2:4}
+ fi
+
+ # Apply Scheduler and Governor settings for 8976
+ # SoC IDs are 266, 274, 277, 278
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+
+ echo 2 > /proc/sys/kernel/sched_window_stats_policy
+ echo 5 > /proc/sys/kernel/sched_ravg_hist_size
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 691200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 883200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 60000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+
+ if [ $panel -gt 1080 ]; then
+ #set texture cache size for resolution greater than 1080p
+ setprop ro.hwui.texture_cache_size 72
+ fi
+
+ echo 59000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo "1 691200:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 1382400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo "19000 1382400:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo "85 1382400:90 1747200:80" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ # HMP Task packing settings for 8976
+ echo 30 > /proc/sys/kernel/sched_small_task
+ echo 20 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ #Disable CPU retention modes for 32bit builds
+ ProductName=`getprop ro.product.name`
+ if [ "$ProductName" == "msm8952_32" ] || [ "$ProductName" == "msm8952_32_LMT" ]; then
+ echo N > /sys/module/lpm_levels/system/a72/cpu4/retention/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/cpu5/retention/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/cpu6/retention/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/cpu7/retention/idle_enabled
+ fi
+
+ if [ `cat /sys/devices/soc0/revision` == "1.0" ]; then
+ # Disable l2-pc and l2-gdhs low power modes
+ echo N > /sys/module/lpm_levels/system/a53/a53-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/a72-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a53/a53-l2-pc/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/a72-l2-pc/idle_enabled
+ fi
+
+ # Enable LPM Prediction
+ echo 1 > /sys/module/lpm_levels/parameters/lpm_prediction
+
+ # Enable Low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ # Disable L2 GDHS on 8976
+ echo N > /sys/module/lpm_levels/system/a53/a53-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/a72-l2-gdhs/idle_enabled
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+ # Enable core control
+ #for 8976
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+
+ case "$soc_id" in
+ "277" | "278")
+ # Start energy-awareness for 8976
+ start energy-awareness
+ ;;
+ esac
+
+ #enable sched colocation and colocation inheritance
+ echo 130 > /proc/sys/kernel/sched_grp_upmigrate
+ echo 110 > /proc/sys/kernel/sched_grp_downmigrate
+ echo 1 > /proc/sys/kernel/sched_enable_thread_grouping
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ ;;
+ esac
+ #Enable Memory Features
+ enable_memory_features
+ restorecon -R /sys/devices/system/cpu
+ ;;
+esac
+
+case "$target" in
+ "msm8953")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ case "$soc_id" in
+ "293" | "304" | "338" | "351")
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ #if this directory is present, it means that a
+ #1200p panel is connected to the device.
+ dir="/sys/bus/i2c/devices/3-0038"
+ if [ ! -d "$dir" ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ if [ $soc_id -eq "338" ]; then
+ case "$hw_platform" in
+ "QRD" )
+ if [ $platform_subtype_id -eq "1" ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+ fi
+
+ #init task load, restrict wakeups to preferred cluster
+ echo 15 > /proc/sys/kernel/sched_init_task_load
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent
+ do
+ echo 34 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps
+ do
+ echo 0 > $cpu_guard_band
+ done
+ for cpu_hist_memory in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory
+ do
+ echo 20 > $cpu_hist_memory
+ done
+ for cpu_hyst_length in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length
+ do
+ echo 10 > $cpu_hyst_length
+ done
+ for cpu_idle_mbps in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/idle_mbps
+ do
+ echo 1600 > $cpu_idle_mbps
+ done
+ for cpu_low_power_delay in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/low_power_delay
+ do
+ echo 20 > $cpu_low_power_delay
+ done
+ for cpu_low_power_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/low_power_io_percent
+ do
+ echo 34 > $cpu_low_power_io_percent
+ done
+ for cpu_mbps_zones in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/mbps_zones
+ do
+ echo "1611 3221 5859 6445 7104" > $cpu_mbps_zones
+ done
+ for cpu_sample_ms in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/sample_ms
+ do
+ echo 4 > $cpu_sample_ms
+ done
+ for cpu_up_scale in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/up_scale
+ do
+ echo 250 > $cpu_up_scale
+ done
+ for cpu_min_freq in /sys/class/devfreq/soc:qcom,cpubw/min_freq
+ do
+ echo 1611 > $cpu_min_freq
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ #if the kernel version >=4.9,use the schedutil governor
+ KernelVersionStr=`cat /proc/sys/kernel/osrelease`
+ KernelVersionS=${KernelVersionStr:2:2}
+ KernelVersionA=${KernelVersionStr:0:1}
+ KernelVersionB=${KernelVersionS%.*}
+ if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then
+ 8953_sched_dcvs_eas
+ else
+ 8953_sched_dcvs_hmp
+ fi
+ echo 652800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # SMP scheduler
+ echo 85 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ esac
+ case "$soc_id" in
+ "349" | "350")
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "1611 3221 5859 6445 7104" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ # Configure DCC module to capture critical register contents when device crashes
+ for DCC_PATH in /sys/bus/platform/devices/*.dcc*
+ do
+ echo 0 > $DCC_PATH/enable
+ echo cap > $DCC_PATH/func_type
+ echo sram > $DCC_PATH/data_sink
+ echo 1 > $DCC_PATH/config_reset
+
+ # Register specifies APC CPR closed-loop settled voltage for current voltage corner
+ echo 0xb1d2c18 1 > $DCC_PATH/config
+
+ # Register specifies SW programmed open-loop voltage for current voltage corner
+ echo 0xb1d2900 1 > $DCC_PATH/config
+
+ # Register specifies APM switch settings and APM FSM state
+ echo 0xb1112b0 1 > $DCC_PATH/config
+
+ # Register specifies CPR mode change state and also #online cores input to CPR HW
+ echo 0xb018798 1 > $DCC_PATH/config
+
+ echo 1 > $DCC_PATH/enable
+ done
+
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # configure governor settings for little cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1363200 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for sdm632 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+
+ # configure governor settings for big cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for sdm632 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+
+ echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+ # choose idle CPU for top app tasks
+ echo 1 > /dev/stune/top-app/schedtune.prefer_idle
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Disable Core control
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+ echo 0 > /sys/devices/system/cpu/cpu4/core_ctl/enable
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Setting b.L scheduler parameters
+ echo 76 > /proc/sys/kernel/sched_downmigrate
+ echo 86 > /proc/sys/kernel/sched_upmigrate
+ echo 80 > /proc/sys/kernel/sched_group_downmigrate
+ echo 90 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # Enable min frequency adjustment for big cluster
+ if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then
+ echo "4-7" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster
+ fi
+ echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust
+
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm8937")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "303" | "307" | "308" | "309" | "320" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" )
+ start_hbtp
+ ;;
+ esac
+
+ case "$hw_platform" in
+ "Surf" | "RCM" )
+ if [ $platform_subtype_id -ne "4" ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+ # Apply Scheduler and Governor settings for 8917 / 8920
+
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ #disable sched_boost in 8917
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # core_ctl is not needed for 8917. Disable it.
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ # disable thermal core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ KernelVersionStr=`cat /proc/sys/kernel/osrelease`
+ KernelVersionS=${KernelVersionStr:2:2}
+ KernelVersionA=${KernelVersionStr:0:1}
+ KernelVersionB=${KernelVersionS%.*}
+ if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then
+ 8917_sched_dcvs_eas
+ else
+ 8917_sched_dcvs_hmp
+ fi
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # re-enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Disable L2-GDHS low power modes
+ echo N > /sys/module/lpm_levels/perf/perf-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/perf/perf-l2-gdhs/suspend_enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # Set rps mask
+ echo 2 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+
+ # Enable dynamic clock gating
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ *)
+ ;;
+ esac
+
+ case "$soc_id" in
+ "294" | "295" | "313" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ start_hbtp
+ ;;
+ esac
+
+ # Apply Scheduler and Governor settings for 8937/8940
+
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ #disable sched_boost in 8937
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ # disable thermal core_control to update interactive gov and core_ctl settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ KernelVersionStr=`cat /proc/sys/kernel/osrelease`
+ KernelVersionS=${KernelVersionStr:2:2}
+ KernelVersionA=${KernelVersionStr:0:1}
+ KernelVersionB=${KernelVersionS%.*}
+ if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then
+ 8937_sched_dcvs_eas
+ else
+ 8937_sched_dcvs_hmp
+ fi
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # Disable L2-GDHS low power modes
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+
+ # Enable core control
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+
+ # re-enable thermal core_control
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Enable dynamic clock gating
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ *)
+
+ ;;
+ esac
+
+ case "$soc_id" in
+ "354" | "364" | "353" | "363" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ # Apply settings for sdm429/sda429/sdm439/sda439
+
+ for cpubw in /sys/class/devfreq/*qcom,mincpubw*
+ do
+ echo "cpufreq" > $cpubw/governor
+ done
+
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 20 > $cpubw/bw_hwmon/io_percent
+ echo 30 > $cpubw/bw_hwmon/guard_band_mbps
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ case "$soc_id" in
+ "353" | "363" )
+ # Apply settings for sdm439/sda439
+ # configure schedutil governor settings
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1497600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+
+ ## enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+
+ # EAS scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+
+ # cpuset settings
+ #echo 0-3 > /dev/cpuset/background/cpus
+ #echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable core control
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+
+ # Big cluster min frequency adjust settings
+ if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then
+ echo "0-3" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster
+ fi
+ echo 1305600 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_floor
+ ;;
+ *)
+ # Apply settings for sdm429/sda429
+ # configure schedutil governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ ;;
+ esac
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ #disable sched_boost
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Disable L2-GDHS low power modes
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ case "$soc_id" in
+ "353" | "363" )
+ echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "sdm660")
+
+ # Set the default IRQ affinity to the primary cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo f > /proc/irq/default_smp_affinity
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ panel=`cat /sys/class/graphics/fb0/modes`
+ if [ "${panel:5:1}" == "x" ]; then
+ panel=${panel:2:3}
+ else
+ panel=${panel:2:4}
+ fi
+
+ if [ $panel -gt 1080 ]; then
+ echo 2 > /proc/sys/kernel/sched_window_stats_policy
+ echo 5 > /proc/sys/kernel/sched_ravg_hist_size
+ else
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ fi
+ #Apply settings for sdm660, sdm636,sda636
+ case "$soc_id" in
+ "317" | "324" | "325" | "326" | "345" | "346" )
+
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 96 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+ echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ echo 5 > /proc/sys/kernel/sched_spill_nr_run
+ echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill
+ echo 100000 > /proc/sys/kernel/sched_short_burst_ns
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+ echo 20 > /proc/sys/kernel/sched_small_wakee_task_load
+
+ # cpuset settings
+ echo 0-7 > /dev/cpuset/top-app/cpus
+ echo 4-7 > /dev/cpuset/foreground/boost/cpus
+ echo 0-2,4-7 > /dev/cpuset/foreground/cpus
+ echo 0-1 > /dev/cpuset/background/cpus
+ echo 0-2 > /dev/cpuset/system-background/cpus
+
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # online CPU0
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo "19000 1401600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1401600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "85 1747200:95" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo "19000 1401600:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "85 1401600:90 2150400:95" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 59000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 1113600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/fast_ramp_down
+
+ # bring all cores online
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # configure LPM
+ echo N > /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-ret/idle_enabled
+ # enable LPM
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ #Add-begin-HMI_M6100_A01-422,lijiang@longcheer.com,2018-10-12
+ #Enable input boost configuration
+ echo "0:1401600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ #Add-end-HMI_M6100_A01-422
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ echo "1525 3143 5859 7759 9887 10327 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ echo 100 > $cpubw/bw_hwmon/decay_rate
+ echo 50 > $cpubw/bw_hwmon/bw_step
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 34 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ # Start cdsprpcd only for sdm660 and disable for sdm630
+ start vendor.cdsprpcd
+##D2SP&F7A has no hbtp feature
+# # Start Host based Touch processing
+# case "$hw_platform" in
+# "MTP" | "Surf" | "RCM" | "QRD" )
+# start_hbtp
+# ;;
+# esac
+#end
+ ;;
+ esac
+ #Apply settings for sdm630 and Tahaa
+ case "$soc_id" in
+ "318" | "327" | "385" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ # Setting b.L scheduler parameters
+ echo 85 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+ echo 900 > /proc/sys/kernel/sched_group_upmigrate
+ echo 900 > /proc/sys/kernel/sched_group_downmigrate
+ echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ echo 3 > /proc/sys/kernel/sched_spill_nr_run
+
+ #init task load, restrict wakeups to preferred cluster
+ echo 15 > /proc/sys/kernel/sched_init_task_load
+ echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill
+ echo 50000 > /proc/sys/kernel/sched_short_burst_ns
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # online CPU0
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ # configure governor settings for Big cluster(CPU0 to CPU3)
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo "19000 1344000:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1344000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "85 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 787200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for Little cluster(CPU4 to CPU7)
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1094400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "85 1094400:80" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 614400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
+
+ # bring all cores online
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # configure LPM
+ echo N > /sys/module/lpm_levels/system/perf/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled
+ # enable LPM
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ echo "1525 3143 4173 5195 5859 7759 9887 10327" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 100 > $cpubw/bw_hwmon/decay_rate
+ echo 50 > $cpubw/bw_hwmon/bw_step
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 50 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "sdm710")
+
+ #Apply settings for sdm710
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo 3f > /proc/irq/default_smp_affinity
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ case "$soc_id" in
+ "336" | "337" | "347" | "360" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 96 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1344000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for DDR scaling
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for L3 scaling
+ for memlat in /sys/class/devfreq/*qcom,l3-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in /sys/class/devfreq/*qcom,l3-cdsp*
+ do
+ echo "userspace" > $l3cdsp/governor
+ chown -h system $l3cdsp/userspace/set_freq
+ done
+
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ # Disable CPU Retention
+ echo N > /sys/module/lpm_levels/L3/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu7/ret/idle_enabled
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "talos")
+
+ #Apply settings for talos
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo 3f > /proc/irq/default_smp_affinity
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ case "$soc_id" in
+ "355" | "369" )
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+ echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
+
+
+ # Setting b.L scheduler parameters
+ # default sched up and down migrate values are 90 and 85
+ echo 65 > /proc/sys/kernel/sched_downmigrate
+ echo 71 > /proc/sys/kernel/sched_upmigrate
+ # default sched up and down migrate values are 100 and 95
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "qcs605")
+
+ #Apply settings for qcs605
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo 3f > /proc/irq/default_smp_affinity
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "347" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ "MTP" )
+ if [ $platform_subtype_id != 5 ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ # Core control parameters on silver
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 96 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1344000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 825600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 68 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for DDR scaling
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for L3 scaling
+ for memlat in /sys/class/devfreq/*qcom,l3-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 100 > /proc/sys/vm/swappiness
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "apq8084")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "cpubw_hwmon" > $devfreq_gov
+ done
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 1497600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 20 > /sys/module/cpu_boost/parameters/boost_ms
+ echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
+ echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ setprop ro.vendor.perf.cores_online 2
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "mpq8092")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "msm8992")
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
+ bcl_hotplug_mask=`cat /sys/devices/soc.*/qcom,bcl.*/hotplug_mask`
+ echo 0 > /sys/devices/soc.*/qcom,bcl.*/hotplug_mask
+ echo -n enable > /sys/devices/soc.*/qcom,bcl.*/mode
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1536000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
+ echo $bcl_hotplug_mask > /sys/devices/soc.*/qcom,bcl.*/hotplug_mask
+ echo $bcl_soc_hotplug_mask > /sys/devices/soc.*/qcom,bcl.*/hotplug_soc_mask
+ echo -n enable > /sys/devices/soc.*/qcom,bcl.*/mode
+ # plugin remaining A57s
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ # input boost configuration
+ echo 0:1248000 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Enable task migration fixups in the scheduler
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ done
+ #enable rps static configuration
+ echo 8 > /sys/class/net/rmnet_ipa0/queues/rx-0/rps_cpus
+ echo 30 > /proc/sys/kernel/sched_small_task
+ ;;
+esac
+
+case "$target" in
+ "msm8994")
+ # ensure at most one A57 is online when thermal hotplug is disabled
+ echo 0 > /sys/devices/system/cpu/cpu5/online
+ echo 0 > /sys/devices/system/cpu/cpu6/online
+ echo 0 > /sys/devices/system/cpu/cpu7/online
+ # in case CPU4 is online, limit its frequency
+ echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ # Limit A57 max freq from msm_perf module in case CPU 4 is offline
+ echo "4:960000 5:960000 6:960000 7:960000" > /sys/module/msm_performance/parameters/cpu_max_freq
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # Best effort limiting for first time boot if msm_performance module is absent
+ echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo "19000 1400000:39000 1700000:19000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1248000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # restore A57's max
+ cat /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+ # plugin remaining A57s
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ # Restore CPU 4 max freq from msm_performance
+ echo "4:4294967295 5:4294967295 6:4294967295 7:4294967295" > /sys/module/msm_performance/parameters/cpu_max_freq
+ # input boost configuration
+ echo 0:1344000 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Setting b.L scheduler parameters
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ echo 30 > /proc/sys/kernel/sched_small_task
+ echo 20 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
+ echo 99 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ #enable rps static configuration
+ echo 8 > /sys/class/net/rmnet_ipa0/queues/rx-0/rps_cpus
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ done
+ ;;
+esac
+
+case "$target" in
+ "msm8996")
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode
+ bcl_hotplug_mask=`cat /sys/devices/soc/soc:qcom,bcl/hotplug_mask`
+ echo 0 > /sys/devices/soc/soc:qcom,bcl/hotplug_mask
+ bcl_soc_hotplug_mask=`cat /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask`
+ echo 0 > /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask
+ echo -n enable > /sys/devices/soc/soc:qcom,bcl/mode
+ # set sync wakee policy tunable
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+ # online CPU2
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_migration_notif
+ echo "19000 1400000:39000 1700000:19000 2100000:79000" > /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_rate
+ echo 1248000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/io_is_busy
+ echo "85 1500000:90 1800000:70 2100000:95" > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/ignore_hispeed_on_notif
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode
+ echo $bcl_hotplug_mask > /sys/devices/soc/soc:qcom,bcl/hotplug_mask
+ echo $bcl_soc_hotplug_mask > /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask
+ echo -n enable > /sys/devices/soc/soc:qcom,bcl/mode
+ # input boost configuration
+ echo "0:1324800 2:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Setting b.L scheduler parameters
+ echo 0 > /proc/sys/kernel/sched_boost
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ echo 45 > /proc/sys/kernel/sched_downmigrate
+ echo 45 > /proc/sys/kernel/sched_upmigrate
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ echo 3 > /proc/sys/kernel/sched_spill_nr_run
+ echo 100 > /proc/sys/kernel/sched_init_task_load
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 1525 > $cpubw/min_freq
+ echo "1525 5195 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 34 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ done
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ soc_revision=`cat /sys/devices/soc0/revision`
+ if [ "$soc_revision" == "2.0" ]; then
+ #Disable suspend for v2.0
+ echo pwr_dbg > /sys/power/wake_lock
+ elif [ "$soc_revision" == "2.1" ]; then
+ # Enable C4.D4.E4.M3 LPM modes
+ # Disable D3 state
+ echo 0 > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
+ echo 0 > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
+ # Disable DEF-FPC mode
+ echo N > /sys/module/lpm_levels/system/pwr/cpu0/fpc-def/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu1/fpc-def/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu2/fpc-def/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu3/fpc-def/idle_enabled
+ else
+ # Enable all LPMs by default
+ # This will enable C4, D4, D3, E4 and M3 LPMs
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+ fi
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+ # Starting io prefetcher service
+ start iop
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "sdm845")
+
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo f > /proc/irq/default_smp_affinity
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "321" | "341")
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "QRD" )
+ case "$platform_subtype_id" in
+ "32") #QVR845 do nothing
+ ;;
+ *)
+ start_hbtp
+ ;;
+ esac
+ ;;
+ *)
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+ # Core control parameters
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/pl
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ echo 1574400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/pl
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Limit the min frequency to 825MHz
+ echo 825000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # Enable oom_reaper
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 6500 8132 9155 10681" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 50 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in /sys/class/devfreq/*qcom,llccbw*
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 50 > $llccbw/polling_interval
+ echo "1720 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 80 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 10 > $llccbw/bw_hwmon/hyst_length
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for DDR scaling
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for L3 scaling
+ for memlat in /sys/class/devfreq/*qcom,l3-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in /sys/class/devfreq/*qcom,l3-cdsp*
+ do
+ echo "userspace" > $l3cdsp/governor
+ chown -h system $l3cdsp/userspace/set_freq
+ done
+
+ #Gold L3 ratio ceil
+ echo 4000 > /sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil
+
+ echo "compute" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+ echo 10 > /sys/class/devfreq/soc:qcom,mincpubw/polling_interval
+
+ # cpuset parameters
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+ # Disable CPU Retention
+ echo N > /sys/module/lpm_levels/L3/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/l3-dyn-ret/idle_enabled
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 100 > /proc/sys/vm/swappiness
+ echo 120 > /proc/sys/vm/watermark_scale_factor
+ ;;
+esac
+
+case "$target" in
+ "msmnile")
+ # Core control parameters for gold
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 3 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Core control parameters for gold+
+ echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu7/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu7/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu7/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/task_thres
+ # Controls how many more tasks should be eligible to run on gold CPUs
+ # w.r.t number of gold CPUs available to trigger assist (max number of
+ # tasks eligible to run on previous cluster minus number of CPUs in
+ # the previous cluster).
+ #
+ # Setting to 3 by default which means there should be at least
+ # 6 tasks eligible to run on gold cluster (tasks running on gold cores
+ # plus misfit tasks on silver cores) to trigger assitance from gold+.
+ echo 3 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
+
+ # Disable Core control on silver
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+
+ # Setting b.L scheduler parameters
+ echo 95 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 85 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # cpuset parameters
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # configure governor settings for silver cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rate_limit_us
+ echo 1075200 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
+
+ # configure governor settings for gold cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/rate_limit_us
+ echo 1248000 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/pl
+
+ # configure governor settings for gold+ cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/rate_limit_us
+ echo 1286400 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
+
+ # configure input boost settings
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ echo 120 > /proc/sys/vm/watermark_scale_factor
+
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Enable oom_reaper
+ if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+ else
+ echo 1 > /proc/sys/vm/reap_mem_on_sigkill
+ fi
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 40 > $cpubw/polling_interval
+ echo "2288 3051 6149 8132 10162 11856" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 50 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 30 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1720 2929 4943 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 80 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 10 > $llccbw/bw_hwmon/hyst_length
+ echo 30 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1720 2929 4943 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 1600 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ #Gold L3 ratio ceil
+ for l3gold in $device/*cpu4-cpu-l3-lat/devfreq/*cpu4-cpu-l3-lat
+ do
+ echo 4000 > $l3gold/mem_latency/ratio_ceil
+ done
+ done
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ # Start Host based Touch processing
+ case "$platform_subtype_id" in
+ "0" | "1")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "msm8998" | "apq8098_latv")
+
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ echo 95 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ echo 5 > /proc/sys/kernel/sched_spill_nr_run
+ echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+ start iop
+
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # online CPU0
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "83 1804800:95" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 518400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1574400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "83 1939200:90 2016000:95" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
+
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Enable input boost configuration
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 1525 > $cpubw/min_freq
+ echo "3143 5859 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 34 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_version ]; then
+ platform_version=`cat /sys/devices/soc0/platform_version`
+ platform_major_version=$((10#${platform_version}>>16))
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "292") #msm8998 apq8098_latv
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "QRD")
+ case "$platform_subtype_id" in
+ "0")
+ start_hbtp
+ ;;
+ "16")
+ if [ $platform_major_version -lt 6 ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ ;;
+ esac
+ ;;
+ esac
+
+ echo N > /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-ret/idle_enabled
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "msm8909")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ # HMP scheduler settings for 8909 similiar to 8917
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ echo 1 > /proc/sys/kernel/sched_restrict_tasks_spread
+
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+
+ # Apply governor settings for 8909
+
+ # disable thermal core_control to update scaling_min_freq
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ echo "29000 1094400:49000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_bimc_bw_step in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/bw_step
+ do
+ echo 60 > $cpu_bimc_bw_step
+ done
+ for cpu_guard_band_mbps in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band_mbps
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ for gpu_bimc_bw_step in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/bw_step
+ do
+ echo 60 > $gpu_bimc_bw_step
+ done
+ for gpu_bimc_guard_band_mbps in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $gpu_bimc_guard_band_mbps
+ done
+
+ # Set Memory parameters
+ configure_memory_parameters
+ restorecon -R /sys/devices/system/cpu
+ ;;
+esac
+
+case "$target" in
+ "msm7627_ffa" | "msm7627_surf" | "msm7627_6x")
+ echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+case "$target" in
+ "qsd8250_surf" | "qsd8250_ffa" | "qsd8650a_st1x")
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+case "$target" in
+ "qsd8650a_st1x")
+ mount -t debugfs none /sys/kernel/debug
+ ;;
+esac
+
+chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+chown -h system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+
+emmc_boot=`getprop vendor.boot.emmc`
+case "$emmc_boot"
+ in "true")
+ chown -h system /sys/devices/platform/rs300000a7.65536/force_sync
+ chown -h system /sys/devices/platform/rs300000a7.65536/sync_sts
+ chown -h system /sys/devices/platform/rs300100a7.65536/force_sync
+ chown -h system /sys/devices/platform/rs300100a7.65536/sync_sts
+ ;;
+esac
+
+case "$target" in
+ "msm8960" | "msm8660" | "msm7630_surf")
+ echo 10 > /sys/devices/platform/msm_sdcc.3/idle_timeout
+ ;;
+ "msm7627a")
+ echo 10 > /sys/devices/platform/msm_sdcc.1/idle_timeout
+ ;;
+esac
+
+# Post-setup services
+case "$target" in
+ "msm8660" | "msm8960" | "msm8226" | "msm8610" | "mpq8092" )
+ start mpdecision
+ ;;
+ "msm8916")
+ setprop vendor.post_boot.parsed 1
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+ case $soc_id in
+ "239" | "241" | "263" | "268" | "269" | "270" | "271")
+ setprop vendor.min_freq_0 960000
+ setprop vendor.min_freq_4 800000
+ ;;
+ "206" | "247" | "248" | "249" | "250" | "233" | "240" | "242")
+ setprop vendor.min_freq_0 800000
+ ;;
+ esac
+ ;;
+ "msm8909")
+ setprop vendor.post_boot.parsed 1
+ ;;
+ "msm8952")
+ setprop vendor.post_boot.parsed 1
+ ;;
+ "msm8937" | "msm8953")
+ setprop vendor.post_boot.parsed 1
+
+ low_ram_enable=`getprop ro.config.low_ram`
+
+ if [ "$low_ram_enable" != "true" ]; then
+ start gamed
+ fi
+ ;;
+ "msm8974")
+ start mpdecision
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ ;;
+ "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "msmnile" | "msmsteppe")
+ setprop vendor.post_boot.parsed 1
+ ;;
+ "apq8084")
+ rm /data/system/perfd/default_values
+ start mpdecision
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 512 > /sys/block/sda/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdb/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdc/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdd/bdi/read_ahead_kb
+ echo 512 > /sys/block/sde/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdf/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdg/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdh/bdi/read_ahead_kb
+ ;;
+ "msm7627a")
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+ case "$soc_id" in
+ "127" | "128" | "129")
+ start mpdecision
+ ;;
+ esac
+ ;;
+esac
+
+# Enable Power modes and set the CPU Freq Sampling rates
+case "$target" in
+ "msm7627a")
+ start qosmgrd
+ echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/suspend_enabled
+ #SuspendPC:
+ echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/suspend_enabled
+ #IdlePC:
+ echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/idle_enabled
+ echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+# Change adj level and min_free_kbytes setting for lowmemory killer to kick in
+case "$target" in
+ "msm7627a")
+ echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj
+ echo 5120 > /proc/sys/vm/min_free_kbytes
+ ;;
+esac
+
+# Install AdrenoTest.apk if not already installed
+if [ -f /data/prebuilt/AdrenoTest.apk ]; then
+ if [ ! -d /data/data/com.qualcomm.adrenotest ]; then
+ pm install /data/prebuilt/AdrenoTest.apk
+ fi
+fi
+
+# Install SWE_Browser.apk if not already installed
+if [ -f /data/prebuilt/SWE_AndroidBrowser.apk ]; then
+ if [ ! -d /data/data/com.android.swe.browser ]; then
+ pm install /data/prebuilt/SWE_AndroidBrowser.apk
+ fi
+fi
+
+# Change adj level and min_free_kbytes setting for lowmemory killer to kick in
+case "$target" in
+ "msm8660")
+ start qosmgrd
+ echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj
+ echo 5120 > /proc/sys/vm/min_free_kbytes
+ ;;
+esac
+
+# Let kernel know our image version/variant/crm_version
+if [ -f /sys/devices/soc0/select_image ]; then
+ image_version="10:"
+ image_version+=`getprop ro.build.id`
+ image_version+=":"
+ image_version+=`getprop ro.build.version.incremental`
+ image_variant=`getprop ro.product.name`
+ image_variant+="-"
+ image_variant+=`getprop ro.build.type`
+ oem_version=`getprop ro.build.version.codename`
+ echo 10 > /sys/devices/soc0/select_image
+ echo $image_version > /sys/devices/soc0/image_version
+ echo $image_variant > /sys/devices/soc0/image_variant
+ echo $oem_version > /sys/devices/soc0/image_crm_version
+fi
+
+# Change console log level as per console config property
+console_config=`getprop persist.console.silent.config`
+case "$console_config" in
+ "1")
+ echo "Enable console config to $console_config"
+ echo 0 > /proc/sys/kernel/printk
+ ;;
+ *)
+ echo "Enable console config to $console_config"
+ ;;
+esac
+
+# Parse misc partition path and set property
+misc_link=$(ls -l /dev/block/bootdevice/by-name/misc)
+real_path=${misc_link##*>}
+setprop persist.vendor.mmi.misc_dev_path $real_path
diff --git a/rootdir/bin/init.qcom.sensors.sh b/rootdir/bin/init.qcom.sensors.sh
new file mode 100755
index 0000000..d2eb8e1
--- /dev/null
+++ b/rootdir/bin/init.qcom.sensors.sh
@@ -0,0 +1,44 @@
+#!/vendor/bin/sh
+# Copyright (c) 2015, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# Function to start sensors for SSC enabled platforms
+#
+start_sensors()
+{
+ chmod -h 664 /persist/sensors/sensors_settings
+ chown -h -R system.system /persist/sensors
+ start vendor.sensors.qti
+
+ # Only for SLPI
+ if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
+ start vendor.sensors
+ fi
+}
+
+start_sensors
diff --git a/rootdir/bin/init.qcom.sh b/rootdir/bin/init.qcom.sh
new file mode 100755
index 0000000..fbf8c82
--- /dev/null
+++ b/rootdir/bin/init.qcom.sh
@@ -0,0 +1,418 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+target=`getprop ro.board.platform`
+low_ram=`getprop ro.config.low_ram`
+if [ -f /sys/devices/soc0/soc_id ]; then
+ platformid=`cat /sys/devices/soc0/soc_id`
+else
+ platformid=`cat /sys/devices/system/soc/soc0/id`
+fi
+
+start_battery_monitor()
+{
+ if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then
+ chown -h root.system /sys/module/pm8921_bms/parameters/*
+ chown -h root.system /sys/module/qpnp_bms/parameters/*
+ chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data
+ chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp
+ chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl
+ chmod 0660 /sys/module/qpnp_bms/parameters/*
+ chmod 0660 /sys/module/pm8921_bms/parameters/*
+ mkdir -p /data/bms
+ chown -h root.system /data/bms
+ chmod 0770 /data/bms
+ start battery_monitor
+ fi
+}
+
+start_charger_monitor()
+{
+ if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
+ chown -h root.system /sys/module/qpnp_charger/parameters/*
+ chown -h root.system /sys/class/power_supply/battery/input_current_max
+ chown -h root.system /sys/class/power_supply/battery/input_current_trim
+ chown -h root.system /sys/class/power_supply/battery/input_current_settled
+ chown -h root.system /sys/class/power_supply/battery/voltage_min
+ chmod 0664 /sys/class/power_supply/battery/input_current_max
+ chmod 0664 /sys/class/power_supply/battery/input_current_trim
+ chmod 0664 /sys/class/power_supply/battery/input_current_settled
+ chmod 0664 /sys/class/power_supply/battery/voltage_min
+ chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
+ start charger_monitor
+ fi
+}
+
+start_vm_bms()
+{
+ if [ -e /dev/vm_bms ]; then
+ chown -h root.system /sys/class/power_supply/bms/current_now
+ chown -h root.system /sys/class/power_supply/bms/voltage_ocv
+ chmod 0664 /sys/class/power_supply/bms/current_now
+ chmod 0664 /sys/class/power_supply/bms/voltage_ocv
+ start vm_bms
+ fi
+}
+
+start_msm_irqbalance_8939()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ case "$platformid" in
+ "239" | "293" | "294" | "295" | "304" | "313" |"353")
+ start vendor.msm_irqbalance;;
+ "349" | "350" )
+ start vendor.msm_irqbal_lb;;
+ esac
+ fi
+}
+
+start_msm_irqbalance()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ case "$platformid" in
+ "317" | "324" | "325" | "326" | "345" | "346")
+ start vendor.msm_irqbalance;;
+ "318" | "327" | "385")
+ start vendor.msm_irqbl_sdm630;;
+ esac
+ fi
+}
+
+baseband=`getprop ro.baseband`
+echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
+
+case "$baseband" in
+ "svlte2a")
+ start bridgemgrd
+ ;;
+esac
+
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ value=`cat /sys/devices/soc0/hw_platform`
+ else
+ value=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$value" in
+ "Fluid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8660" )
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ else
+ platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8960")
+ case "$baseband" in
+ "msm")
+ start_battery_monitor;;
+ esac
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ else
+ platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ "Liquid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8974")
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ "Liquid")
+ start profiler_daemon;;
+ esac
+ case "$baseband" in
+ "msm")
+ start_battery_monitor
+ ;;
+ esac
+ start_charger_monitor
+ ;;
+ "sdm660")
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ case "$soc_id" in
+ "317" | "324" | "325" | "326" | "318" | "327" )
+ case "$hw_platform" in
+ "Surf")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "MTP")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "RCM")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "QRD")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ esac
+ ;;
+ esac
+ start_msm_irqbalance
+ ;;
+ "apq8084")
+ platformvalue=`cat /sys/devices/soc0/hw_platform`
+ case "$platformvalue" in
+ "Fluid")
+ start profiler_daemon;;
+ "Liquid")
+ start profiler_daemon;;
+ esac
+ ;;
+ "msm8226")
+ start_charger_monitor
+ ;;
+ "msm8610")
+ start_charger_monitor
+ ;;
+ "msm8916")
+ start_vm_bms
+ start_msm_irqbalance_8939
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ fi
+ case "$soc_id" in
+ "239")
+ case "$hw_platform" in
+ "Surf")
+ case "$platform_subtype_id" in
+ "1")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ esac
+ ;;
+ "MTP")
+ case "$platform_subtype_id" in
+ "3")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ "msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "msmnile" | "talos")
+ start_msm_irqbalance
+ ;;
+ "msm8996")
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ fi
+ case "$hw_platform" in
+ "MTP" | "CDP")
+ #Loop through the sysfs nodes and determine the correct sysfs to change the permission and ownership.
+ for count in 0 1 2 3 4 5 6 7 8 9 10
+ do
+ dir="/sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input"$count
+ if [ -d "$dir" ]; then
+ chmod 0660 $dir/secure_touch_enable
+ chmod 0440 $dir/secure_touch
+ chown system.drmrpc $dir/secure_touch_enable
+ chown system.drmrpc $dir/secure_touch
+ break
+ fi
+ done
+ ;;
+ esac
+ ;;
+ "msm8909")
+ start_vm_bms
+ ;;
+ "msm8937")
+ start_msm_irqbalance_8939
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ if [ "$low_ram" != "true" ]; then
+ case "$soc_id" in
+ "294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353" | "354" | "363" | "364")
+ case "$hw_platform" in
+ "Surf")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "MTP")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "RCM")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "QRD")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ ;;
+ "msm8953")
+ start_msm_irqbalance_8939
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$soc_id" in
+ "293" | "304" | "338" | "351" | "349" | "350" )
+ case "$hw_platform" in
+ "Surf")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "MTP")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "RCM")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "QRD")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ "sdm710")
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+ case "$soc_id" in
+ "336" | "337" | "347" | "360" )
+ case "$hw_platform" in
+ "Surf")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "MTP")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "RCM")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "QRD")
+ setprop qemu.hw.mainkeys 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+#
+# Make modem config folder and copy firmware config to that folder for RIL
+#
+if [ -f /data/vendor/modem_config/ver_info.txt ]; then
+ prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
+else
+ prev_version_info=""
+fi
+
+cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
+if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
+ # add W for group recursively before delete
+ chmod g+w -R /data/vendor/modem_config/*
+ rm -rf /data/vendor/modem_config/*
+ # preserve the read only mode for all subdir and files
+ cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
+ cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
+ cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
+ # the group must be root, otherwise this script could not add "W" for group recursively
+ chown -hR radio.root /data/vendor/modem_config/*
+fi
+chmod g-w /data/vendor/modem_config
+setprop ro.vendor.ril.mbn_copy_completed 1
+
+#check build variant for printk logging
+#current default minimum boot-time-default
+buildvariant=`getprop ro.build.type`
+case "$buildvariant" in
+ "userdebug" | "eng")
+ #set default loglevel to KERN_INFO
+ echo "6 6 1 7" > /proc/sys/kernel/printk
+ ;;
+ *)
+ #set default loglevel to KERN_WARNING
+ echo "4 4 1 4" > /proc/sys/kernel/printk
+ ;;
+esac
diff --git a/rootdir/bin/init.qcom.usb.sh b/rootdir/bin/init.qcom.usb.sh
new file mode 100755
index 0000000..4a18c40
--- /dev/null
+++ b/rootdir/bin/init.qcom.usb.sh
@@ -0,0 +1,283 @@
+#!/vendor/bin/sh
+# Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+# Set platform variables
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+
+if [ -f /sys/devices/soc0/machine ]; then
+ soc_machine=`cat /sys/devices/soc0/machine` 2> /dev/null
+else
+ soc_machine=`cat /sys/devices/system/soc/soc0/machine` 2> /dev/null
+fi
+
+#
+# Check ESOC for external MDM
+#
+# Note: currently only a single MDM is supported
+#
+if [ -d /sys/bus/esoc/devices ]; then
+for f in /sys/bus/esoc/devices/*; do
+ if [ -d $f ]; then
+ if [ `grep -e "^MDM" -e "^SDX" $f/esoc_name` ]; then
+ esoc_link=`cat $f/esoc_link`
+ break
+ fi
+ fi
+done
+fi
+
+target=`getprop ro.board.platform`
+
+# soc_ids for 8937
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+fi
+
+if [ -f /sys/class/android_usb/f_mass_storage/lun/nofua ]; then
+ echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
+fi
+
+#
+# Override USB default composition
+#
+# If USB persist config not set, set default configuration
+miui_release=`getprop ro.fota.oem`
+miui_debuggable=`getprop ro.debuggable`
+if [ "$(getprop persist.vendor.usb.config)" == "" -a \
+ "$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
+ if [ "$esoc_link" != "" ]; then
+ setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
+ else
+ case "$(getprop ro.baseband)" in
+ "apq")
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ *)
+ case "$soc_hwplatform" in
+ "Dragon" | "SBC")
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ *)
+ soc_machine=${soc_machine:0:3}
+ case "$soc_machine" in
+ "SDA")
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ *)
+ case "$target" in
+ "msm8996")
+ setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
+ ;;
+ "msm8909")
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
+ ;;
+ "msm8937")
+ if [ -d /config/usb_gadget ]; then
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
+ else
+ case "$soc_id" in
+ "313" | "320")
+ echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
+ ;;
+ *)
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
+ ;;
+ esac
+ fi
+ ;;
+ "msm8953")
+ if [ -d /config/usb_gadget ]; then
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
+ else
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
+ fi
+ ;;
+ "msm8998" | "sdm660" | "sdm636"| "apq8098_latv")
+ case "$miui_release" in
+ "")
+ case "$miui_debuggable" in
+ "1")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
+ ;;
+ *)
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet
+ ;;
+ esac
+ ;;
+ *)
+ case "$miui_debuggable" in
+ "1")
+ setprop persist.vendor.usb.config adb
+ ;;
+ *)
+ setprop persist.vendor.usb.config none
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ "sdm845" | "sdm710")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
+ ;;
+ "msmnile" | "talos")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
+ ;;
+ *)
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+fi
+
+# set rndis transport to BAM2BAM_IPA for 8920 and 8940
+if [ "$target" == "msm8937" ]; then
+ if [ ! -d /config/usb_gadget ]; then
+ case "$soc_id" in
+ "313" | "320")
+ echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
+ ;;
+ *)
+ ;;
+ esac
+ fi
+fi
+
+# set device mode notification to USB driver for SA8150 Auto ADP
+product=`getprop ro.build.product`
+
+case "$product" in
+ "msmnile_au")
+ echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
+ ;;
+ *)
+ ;;
+esac
+
+# check configfs is mounted or not
+if [ -d /config/usb_gadget ]; then
+ # Chip-serial is used for unique MSM identification in Product string
+ msm_serial=`cat /sys/devices/soc0/serial_number`;
+ msm_serial_hex=`printf %08X $msm_serial`
+ machine_type=`cat /sys/devices/soc0/machine`
+ product_string="$machine_type-$soc_hwplatform _SN:$msm_serial_hex"
+ echo "$product_string" > /config/usb_gadget/g1/strings/0x409/product
+
+ # ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
+ serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber` 2> /dev/null
+ if [ "$serialnumber" == "" ]; then
+ serialno=1234567
+ echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber
+ fi
+fi
+
+#
+# Initialize RNDIS Diag option. If unset, set it to 'none'.
+#
+diag_extra=`getprop persist.vendor.usb.config.extra`
+if [ "$diag_extra" == "" ]; then
+ setprop persist.vendor.usb.config.extra none
+fi
+
+# enable rps cpus on msm8937 target
+setprop vendor.usb.rps_mask 0
+case "$soc_id" in
+ "294" | "295" | "353" | "354")
+ setprop vendor.usb.rps_mask 40
+ ;;
+esac
+
+#
+# Initialize UVC conifguration.
+#
+if [ -d /config/usb_gadget/g1/functions/uvc.0 ]; then
+ cd /config/usb_gadget/g1/functions/uvc.0
+
+ echo 3072 > streaming_maxpacket
+ echo 1 > streaming_maxburst
+ mkdir control/header/h
+ ln -s control/header/h control/class/fs/
+ ln -s control/header/h control/class/ss
+
+ mkdir -p streaming/uncompressed/u/360p
+ echo "666666\n1000000\n5000000\n" > streaming/uncompressed/u/360p/dwFrameInterval
+
+ mkdir -p streaming/uncompressed/u/720p
+ echo 1280 > streaming/uncompressed/u/720p/wWidth
+ echo 720 > streaming/uncompressed/u/720p/wWidth
+ echo 29491200 > streaming/uncompressed/u/720p/dwMinBitRate
+ echo 29491200 > streaming/uncompressed/u/720p/dwMaxBitRate
+ echo 1843200 > streaming/uncompressed/u/720p/dwMaxVideoFrameBufferSize
+ echo 5000000 > streaming/uncompressed/u/720p/dwDefaultFrameInterval
+ echo "5000000\n" > streaming/uncompressed/u/720p/dwFrameInterval
+
+ mkdir -p streaming/mjpeg/m/360p
+ echo "666666\n1000000\n5000000\n" > streaming/mjpeg/m/360p/dwFrameInterval
+
+ mkdir -p streaming/mjpeg/m/720p
+ echo 1280 > streaming/mjpeg/m/720p/wWidth
+ echo 720 > streaming/mjpeg/m/720p/wWidth
+ echo 29491200 > streaming/mjpeg/m/720p/dwMinBitRate
+ echo 29491200 > streaming/mjpeg/m/720p/dwMaxBitRate
+ echo 1843200 > streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
+ echo 5000000 > streaming/mjpeg/m/720p/dwDefaultFrameInterval
+ echo "5000000\n" > streaming/mjpeg/m/720p/dwFrameInterval
+
+ echo 0x04 > /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
+
+ mkdir -p streaming/h264/h/960p
+ echo 1920 > streaming/h264/h/960p/wWidth
+ echo 960 > streaming/h264/h/960p/wWidth
+ echo 40 > streaming/h264/h/960p/bLevelIDC
+ echo "333667\n" > streaming/h264/h/960p/dwFrameInterval
+
+ mkdir -p streaming/h264/h/1920p
+ echo "333667\n" > streaming/h264/h/1920p/dwFrameInterval
+
+ mkdir streaming/header/h
+ ln -s streaming/uncompressed/u streaming/header/h
+ ln -s streaming/mjpeg/m streaming/header/h
+ ln -s streaming/h264/h streaming/header/h
+ ln -s streaming/header/h streaming/class/fs/
+ ln -s streaming/header/h streaming/class/hs/
+ ln -s streaming/header/h streaming/class/ss/
+fi
diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom
new file mode 100644
index 0000000..3efed1e
--- /dev/null
+++ b/rootdir/etc/fstab.qcom
@@ -0,0 +1,26 @@
+# Android fstab file.
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+# NOTE: /system and /vendor partitions are now early-mounted and the fstab entry is specified in device tree (duplicated below for recovery image purposes only):
+# /proc/device-tree/firmware/android/fstab/system
+# /proc/device-tree/firmware/android/fstab/vendor
+
+#TODO: Add 'check' as fs_mgr_flags with data partition.
+# Currently we dont have e2fsck compiled. So fs check would failed.
+
+# Non-A/B fstab.qcom variant
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,noatime,lazytime,errors=panic wait,resize,check,encryptable=footer,crashcheck,quota
+/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
+/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
+/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait
+/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
+/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
+/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait
+/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,barrier=1,noatime wait,check
+/mnt/vendor/persist /persist none bind wait
+
+/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly
+/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,recoveryonly
+/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
diff --git a/rootdir/etc/fstab_AB.qcom b/rootdir/etc/fstab_AB.qcom
new file mode 100644
index 0000000..c4a781f
--- /dev/null
+++ b/rootdir/etc/fstab_AB.qcom
@@ -0,0 +1,18 @@
+# Android fstab file.
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+#TODO: Add 'check' as fs_mgr_flags with data partition.
+# Currently we dont have e2fsck compiled. So fs check would failed.
+
+# A/B fstab.qcom variant
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,slotselect
+/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=0,noauto_da_alloc,discard,noatime,lazytime wait,resize,check,crashcheck,quota,encryptable=footer
+/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
+/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
+/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect
+/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
+/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect
+/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,barrier=1,noatime wait,check
+/mnt/vendor/persist /persist none bind wait
diff --git a/rootdir/etc/init.msm.usb.configfs.rc b/rootdir/etc/init.msm.usb.configfs.rc
new file mode 100755
index 0000000..7ad3db6
--- /dev/null
+++ b/rootdir/etc/init.msm.usb.configfs.rc
@@ -0,0 +1,1226 @@
+# Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# USB compositions
+on property:sys.usb.config=none && property:sys.usb.configfs=1
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+
+on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0xF000
+ symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb_msc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9015
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901D
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x900E
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default composition"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9091
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default comp without ADB"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9092
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:vendor.usb.tethering=true
+ write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask}
+
+on property:sys.usb.config=rndis
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra}
+
+on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF80
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ write /config/usb_gadget/g1/configs/b.1/f1/wceis 1
+ setprop sys.usb.state rndis
+on property:sys.usb.config=rndis,sec && property:sys.usb.configfs=1
+ write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis"
+ rm /config/usb_gadget/g2/configs/b.1/f1
+ write /config/usb_gadget/g2/idVendor 0x05C6
+ write /config/usb_gadget/g2/idProduct 0xF00E
+ symlink /config/usb_gadget/g2/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g2/configs/b.1/f1
+ write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,adb
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb
+
+on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF88
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ write /config/usb_gadget/g1/configs/b.1/f1/wceis 1
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x902C
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x902D
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_cdev && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B4
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B5
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901B
+ symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x903A
+ symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x904A
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9060
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9083
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9084
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9081
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9082
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0xA4A1
+ symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x908C
+ symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9004
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb_dun"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901f
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90b7
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90b8
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90bf
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90c0
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=ccid && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CE
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CF
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ccid,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D0
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D1
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,ccid && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D2
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D3
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D7
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D8
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DD
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DE
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DC
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DB
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f6
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CA
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2 && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901C
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CB
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uvc && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DF
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CC
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2,uvc && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E0
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E4
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E5
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF08
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF40
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF48
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF10
+
+on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF18
+
+on property:sys.usb.config=accessory && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d00
+
+on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d01
+
+on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d02
+
+on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d03
+
+on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d04
+
+on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d05
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee8
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee9
+
+on property:vendor.usb.eud=1
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 1
+ write /sys/module/eud/parameters/enable 1
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 1
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 500
+
+on property:vendor.usb.eud=0
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 0
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 0
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 0
+ write /sys/module/eud/parameters/enable 0
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
new file mode 100755
index 0000000..1683bb5
--- /dev/null
+++ b/rootdir/etc/init.qcom.rc
@@ -0,0 +1,1314 @@
+# Copyright (c) 2009-2012, 2014-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+import /vendor/etc/init/hw/init.qcom.usb.rc
+import /vendor/etc/init/hw/init.msm.usb.configfs.rc
+import /vendor/etc/init/hw/init.target.rc
+
+on early-init
+ mount debugfs debugfs /sys/kernel/debug
+ chmod 0755 /sys/kernel/debug
+
+ # create symlink for vendor mount points
+ symlink /vendor/firmware_mnt /firmware
+ symlink /vendor/bt_firmware /bt_firmware
+ symlink /vendor/dsp /dsp
+
+ # Change ownership of hw_recovery related nodes
+ chown system graphics /sys/kernel/debug/dri/0/debug/dump
+ chown system graphics /sys/kernel/debug/dri/0/debug/recovery_reg
+ chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dbgbus
+ chown system graphics /sys/kernel/debug/dri/0/debug/recovery_vbif_dbgbus
+
+ chown root system /dev/kmsg
+ chmod 0620 /dev/kmsg
+ # Load WIGIG platform driver
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
+
+on init
+
+ # Support legacy paths
+ symlink /sdcard /mnt/sdcard
+ symlink /sdcard /storage/sdcard0
+
+ # Create cgroup mount point for memory
+ mkdir /sys/fs/cgroup/memory/bg 0750 root system
+ write /sys/fs/cgroup/memory/bg/memory.swappiness 140
+ write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
+ chown root system /sys/fs/cgroup/memory/bg/tasks
+ chmod 0660 /sys/fs/cgroup/memory/bg/tasks
+
+on post-fs
+ chmod 0755 /sys/kernel/debug/tracing
+on early-boot
+ # set RLIMIT_MEMLOCK to 64MB
+ setrlimit 8 67108864 67108864
+ # Allow subsystem (modem etc) debugging
+ write /sys/kernel/boot_adsp/boot 1
+ write /sys/kernel/boot_cdsp/boot 1
+ write /sys/kernel/boot_slpi/boot 1
+ setprop ro.alarm_boot false
+
+ # for backward compatibility
+ chown system system /persist/sensors
+ chown system system /persist/sensors/registry
+ chown system system /persist/sensors/registry/registry
+ chown system system /persist/sensors/registry/registry/sensors_registry
+ chown system system /persist/sensors/sensors_settings
+ chown system system /persist/sensors/registry/config
+ chmod 0664 /persist/sensors/sensors_settings
+
+ chown system system /mnt/vendor/persist/sensors
+ chown system system /mnt/vendor/persist/sensors/sns.reg
+ chown system system /mnt/vendor/persist/sensors/registry
+ chown system system /mnt/vendor/persist/sensors/registry/registry
+ chown system system /mnt/vendor/persist/sensors/registry/registry/sensors_registry
+ chown system system /mnt/vendor/persist/sensors/sensors_settings
+ chown system system /mnt/vendor/persist/sensors/registry/sns_reg_config
+ chown system system /mnt/vendor/persist/sensors/registry/config
+ chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
+
+on boot
+ chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
+ chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
+ chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
+ chown bluetooth bluetooth /proc/bluetooth/sleep/proto
+ chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
+ chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
+ chown system system /sys/module/sco/parameters/disable_esco
+ chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
+ chown system system /sys/module/msm_core/parameters/polling_interval
+ chown system system /sys/module/msm_core/parameters/disabled
+ chown system system /sys/kernel/debug/msm_core/enable
+ chown system system /sys/kernel/debug/msm_core/ptable
+ chown system system /sys/kernel/boot_slpi/ssr
+ chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
+ chmod 0660 /sys/module/bluetooth_power/parameters/power
+ chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
+ chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
+ chmod 0660 /sys/class/rfkill/rfkill0/state
+ chmod 0660 /proc/bluetooth/sleep/proto
+ chown bluetooth net_bt /dev/ttyHS0
+ chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
+ chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
+ chmod 0660 /dev/ttyHS0
+ chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
+ chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
+
+ chmod 0660 /dev/ttyHS2
+ chown bluetooth bluetooth /dev/ttyHS2
+
+ chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
+ chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
+
+ #Create QMUX deamon socket area
+ mkdir /dev/socket/qmux_radio 0770 radio radio
+ chmod 2770 /dev/socket/qmux_radio
+ mkdir /dev/socket/qmux_audio 0770 media audio
+ chmod 2770 /dev/socket/qmux_audio
+ mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
+ chmod 2770 /dev/socket/qmux_bluetooth
+ mkdir /dev/socket/qmux_gps 0770 gps gps
+ chmod 2770 /dev/socket/qmux_gps
+
+
+ #define back flash and front flash
+ chmod 0660 /sys/android_camera/sensor
+ chmod 0660 /sys/class/leds/led:flash_0/brightness
+ chmod 0660 /sys/class/leds/led:flash_1/brightness
+ chmod 0660 /sys/class/leds/led:flash_2/brightness
+ chmod 0660 /sys/class/leds/led:torch_0/brightness
+ chmod 0660 /sys/class/leds/led:torch_1/brightness
+ chmod 0660 /sys/class/leds/led:torch_2/brightness
+ chmod 0660 /sys/class/leds/led:switch_0/brightness
+ chmod 0660 /sys/class/leds/led:switch_1/brightness
+ chmod 0660 /sys/class/leds/flashlight/brightness
+ chown system system /sys/android_camera/sensor
+ chown system system /sys/class/leds/led:flash_0/brightness
+ chown system system /sys/class/leds/led:flash_1/brightness
+ chown system system /sys/class/leds/led:flash_2/brightness
+ chown system system /sys/class/leds/led:torch_0/brightness
+ chown system system /sys/class/leds/led:torch_1/brightness
+ chown system system /sys/class/leds/led:torch_2/brightness
+ chown system system /sys/class/leds/led:switch_0/brightness
+ chown system system /sys/class/leds/led:switch_1/brightness
+ chown system system /sys/class/leds/flashlight/brightness
+ chmod 0660 /sys/class/power_supply/battery/input_suspend
+ chmod 0660 /sys/class/power_supply/battery/charging_enabled
+ chown system system /sys/class/power_supply/battery/input_suspend
+ chown system system /sys/class/power_supply/battery/charging_enabled
+
+ chmod 0770 /sys/class/power_supply/battery/device/thermalcall
+ chown system system /sys/class/power_supply/battery/device/thermalcall
+
+ mkdir /persist/drm 0770 system system
+ mkdir /persist/bluetooth 0770 bluetooth bluetooth
+ mkdir /persist/misc 0770 system system
+ mkdir /mnt/vendor/persist/alarm 0770 system system
+ mkdir /persist/time 0770 system system
+ mkdir /mnt/vendor/persist/secnvm 0770 system system
+
+ #Create NETMGR daemon socket area
+ mkdir /dev/socket/netmgr 0750 radio radio
+
+ setprop wifi.interface wlan0
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
+
+
+ setprop ro.telephony.call_ring.multiple false
+
+ #enable camera read sensors data
+ setprop persist.camera.gyro.disable 0
+
+ #Remove SUID bit for iproute2 ip tool
+ chmod 0755 /system/bin/ip
+
+
+ chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
+ setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
+ setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
+ setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
+ setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
+
+ setprop net.tcp.2g_init_rwnd 10
+
+# Assign TCP buffer thresholds to be ceiling value of technology maximums
+# Increased technology maximums should be reflected here.
+ write /proc/sys/net/core/rmem_max 8388608
+ write /proc/sys/net/core/wmem_max 8388608
+
+ # To prevent out of order acknowledgements from making
+ # connection tracking to treat them as not belonging to
+ # the connection they belong to.
+ # Otherwise, a weird issue happens in which some long
+ # connections on high-throughput links get dropped when
+ # an ack packet comes out of order
+ write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
+
+ #Make MTU adjusting for sometimes cannot access to internet
+ write /proc/sys/net/ipv4/tcp_mtu_probing 1
+
+ # Set the console loglevel to < KERN_INFO
+ # Set the default message loglevel to KERN_INFO
+ write /proc/sys/kernel/printk "6 6 1 7"
+
+ # Allow access for CCID command/response timeout configuration
+ chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
+
+ # bond0 used by FST Manager
+ chown wifi wifi /sys/class/net/bond0/bonding/queue_id
+
+ # Allow access to emmc rawdump block partition and dload sysfs node
+ chown root system /dev/block/bootdevice/by-name/rawdump -p /dev/block/
+ chmod 0660 /dev/block/bootdevice/by-name/rawdump -p /dev/block/
+ chown root system /sys/kernel/dload/emmc_dload
+ chmod 0660 /sys/kernel/dload/emmc_dload
+ chown root system /dev/block/bootdevice/by-name/ramdump -p /dev/block/
+ chmod 0660 /dev/block/bootdevice/by-name/ramdump -p /dev/block/
+ chown root system /sys/kernel/dload/dload_mode
+ chmod 0660 /sys/kernel/dload/dload_mode
+
+ chown system system /sys/class/backlight/panel0-backlight/brightness
+ chown system system /sys/class/backlight/panel0-backlight/max_brightness
+
+ # Allow access to sensors device attributes
+ chown system system /sys/class/sensors/MPU6050-accel/enable
+ chown system system /sys/class/sensors/MPU6050-accel/poll_delay
+ chown system system /sys/class/sensors/MPU6050-gyro/enable
+ chown system system /sys/class/sensors/MPU6050-gyro/poll_delay
+ chown system system /sys/class/sensors/apds9930-light/enable
+ chown system system /sys/class/sensors/apds9930-light/poll_delay
+ chown system system /sys/class/sensors/apds9930-proximity/enable
+ chown system system /sys/class/sensors/apds9930-proximity/poll_delay
+
+ # Create directory used for display
+ mkdir /persist/display 0770 system graphics
+
+ # Create vpp directory
+ mkdir /mnt/vendor/persist/vpp 0770 media media
+
+ # Create hvdcp_opti directory
+ mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
+
+ # Create pa-cal driver directory lct-20180914
+ mkdir /mnt/vendor/persist/audio 0770 root root
+
+# msm specific files that need to be created on /data
+on post-fs-data
+ mkdir /data/vendor/misc 01771 system system
+
+ # Create directory used for dump collection
+ mkdir /data/vendor/ssrdump 0770 root system
+
+ # Create directory used by display clients
+ mkdir /data/vendor/display 0770 system graphics
+
+ # Change lm related dirs
+ mkdir /data/vendor/lm 0700 root root
+
+ # Create directory used by media clients
+ mkdir /data/vendor/media 0770 mediacodec media
+
+ # create QDMA dropbox
+ mkdir /data/vendor/qdmastats 0700 system system
+ mkdir /data/vendor/qdma 0770 system system
+ mkdir /dev/socket/qdma 0770 system system
+ chmod 2770 /dev/socket/qdma
+
+ # Create /data/vendor/tzstorage directory for SFS listener
+ mkdir /data/vendor/tzstorage 0770 system system
+
+ # Create directory for apps access via QTEEConnector
+ mkdir /data/vendor/qtee 0770 system system
+
+ #Create folder of camera
+ mkdir /data/vendor/camera 0770 camera camera
+
+ mkdir /data/media 0770 media_rw media_rw
+ chown media_rw media_rw /data/media
+
+ #Create directory for tftp
+ mkdir /data/vendor/tombstones 0771 system system
+
+ mkdir /data/vendor/ramdump 0771 root system
+ mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
+ mkdir /data/vendor/ramdump/bluetooth 0770 bluetooth bluetooth
+
+ # Create the directories used by the Wireless subsystem
+ mkdir /data/vendor/wifi 0770 wifi wifi
+ mkdir /data/vendor/wifi/sockets 0770 wifi wifi
+ mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
+ mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi
+ mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+
+ #create port-bridge log dir
+ mkdir /data/vendor/port_bridge 0770 radio radio
+ chmod 0770 /data/vendor/port_bridge
+
+ #create netmgr log dir
+ mkdir /data/vendor/netmgr 0770 radio radio
+ chmod 0770 /data/vendor/netmgr
+
+ #create ipacm log dir
+ mkdir /data/vendor/ipa 0770 radio radio
+ chmod 0770 /data/vendor/ipa
+
+ #Create QTI dir for logs
+ mkdir /data/vendor/dataqti 0770 radio radio
+ chmod 0770 /data/vendor/dataqti
+
+ # Create the directories used by CnE subsystem
+ mkdir /data/vendor/connectivity 0771 radio radio
+ chown radio radio /data/vendor/connectivity
+
+ # Create directory used by audio subsystem
+ mkdir /data/vendor/audio 0770 audio audio
+
+ # Create directory for audio delta files
+ mkdir /data/vendor/audio/acdbdata 0770 media audio
+ mkdir /data/vendor/audio/acdbdata/delta 0770 media audio
+
+ # Create directory for radio
+ mkdir /data/vendor/radio 0770 system radio
+
+ # Create directory for modem_config
+ mkdir /data/vendor/modem_config 0570 radio root
+
+ # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
+ # We chown/chmod /persist again so because mount is run as root + defaults
+ chown root system /persist
+ chmod 0771 /persist
+ chown system system /persist/WCNSS_qcom_wlan_nv.bin
+ chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
+ chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
+ chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
+ chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
+
+ # Chown polling nodes as needed from UI running on system server
+ chown system system /sys/devices/platform/msm_sdcc.1/polling
+ chown system system /sys/devices/platform/msm_sdcc.2/polling
+ chown system system /sys/devices/platform/msm_sdcc.3/polling
+ chown system system /sys/devices/platform/msm_sdcc.4/polling
+
+ #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
+ mkdir /data/system 0775 system system
+ #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
+
+ #Create directories for Location services
+ mkdir /data/vendor/location 0770 gps gps
+ mkdir /data/vendor/location/mq 0770 gps gps
+ mkdir /data/vendor/location/xtwifi 0770 gps gps
+ mkdir /dev/socket/location 0770 gps gps
+ mkdir /dev/socket/location/mq 0770 gps gps
+ mkdir /dev/socket/location/xtra 0770 gps gps
+
+ #Create directory from IMS services
+ mkdir /data/shared 0755
+ chown system system /data/shared
+
+ #Create directory for FOTA
+ mkdir /data/fota 0771
+ chown system system /data/fota
+
+ #Create directory for hostapd
+ mkdir /data/hostapd 0770 system wifi
+
+ # Create /data/time folder for time-services
+ mkdir /data/vendor/time/ 0700 system system
+
+ # Create /data/vendor/diag_logs folder for on-device-logging
+ #mkdir /data/vendor/diag_logs 0770 system system
+
+ setprop vold.post_fs_data_done 1
+
+ #Create a folder for SRS to be able to create a usercfg file
+ #mkdir /data/data/media 0770 media media
+
+ #Create FM dir for patchdownloader
+ mkdir /data/vendor/fm 0770 system system
+ chmod 0770 /data/vendor/fm
+
+ #Create PERFD deamon related dirs
+ mkdir /data/vendor/perfd 0770 root system
+ chmod 2770 /data/vendor/perfd
+ rm /data/vendor/perfd/default_values
+
+ #Create IOP deamon related dirs
+ mkdir /data/vendor/iop 0700 root system
+
+ # Mark the copy complete flag to not completed
+ write /data/vendor/radio/copy_complete 0
+ chown radio radio /data/vendor/radio/copy_complete
+ chmod 0660 /data/vendor/radio/copy_complete
+
+ # copy prebuilt qcril.db files always
+ copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db
+ chown radio radio /data/vendor/radio/qcril_prebuilt.db
+ chmod 0660 /data/vendor/radio/qcril_prebuilt.db
+ # File flags for prebuilt ril db file
+ write /data/vendor/radio/prebuilt_db_support 1
+ chown radio radio /data/vendor/radio/prebuilt_db_support
+ chmod 0400 /data/vendor/radio/prebuilt_db_support
+ write /data/vendor/radio/db_check_done 0
+ chown radio radio /data/vendor/radio/db_check_done
+ chmod 0660 /data/vendor/radio/db_check_done
+
+ copy /vendor/etc/ad_calib.cfg /data/vendor/display/ad_calib.cfg
+ chmod 0644 /data/vendor/display/ad_calib.cfg
+ # qti-logkit data
+ mkdir /data/vendor/qti-logkit/ 0771 system system
+ mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
+ mkdir /data/vendor/qti-logkit/shared-public/ 2770 system diag
+ mkdir /data/vendor/qti-logkit/socket-privileged/ 2770 system system
+ mkdir /data/vendor/qti-logkit/socket-public/ 2750 system diag
+ mkdir /data/vendor/qti-logkit/logdata/ 2750 system shell
+
+ #Create SWAP related dirs
+ mkdir /data/vendor/swap 0770 root system
+ chmod 2770 /data/vendor/swap
+
+ # set aggressive read ahead for dm-0 and dm-1 during boot up
+ write /sys/block/dm-0/queue/read_ahead_kb 2048
+ write /sys/block/dm-1/queue/read_ahead_kb 2048
+
+ # Create vpp directory
+ mkdir /data/vendor/vpp 0770 media media
+
+ #Create FTM_AP dir for factory test
+ mkdir /data/FTM_AP 0775 system system
+
+ #Create dir for TUI
+ mkdir /data/vendor/tui 0600 system drmrpc
+
+ #Start move time data to /data/vendor once post-fs-data done
+ start vendor.move_time_data
+
+service nqnfcinfo /system/vendor/bin/nqnfcinfo
+ class late_start
+ group nfc
+ user system
+ oneshot
+
+service iop /system/vendor/bin/iop
+ class main
+ user root
+ group root
+ disabled
+ socket iop seqpacket 0666 root system
+
+service qcomsysd /system/vendor/bin/qcom-system-daemon
+ class main
+ user root
+ group root diag oem_2901
+ disabled
+
+on property:persist.vendor.qcomsysd.enabled=1
+ enable qcomsysd
+
+on property:persist.vendor.qcomsysd.enabled=0
+ stop qcomsysd
+
+service vendor.ssr_setup /system/vendor/bin/ssr_setup
+ oneshot
+ disabled
+
+service vendor.ss_ramdump /system/vendor/bin/subsystem_ramdump
+ class main
+ user system
+ group system
+ disabled
+
+on property:ro.vendor.iocgrp.config=1
+ mkdir /dev/blkio
+ mount cgroup none /dev/blkio blkio
+ chown system system /dev/blkio
+ chown system system /dev/blkio/tasks
+ chmod 0664 /dev/blkio/tasks
+ mkdir /dev/blkio/bg 0755 system system
+ chown system system /dev/blkio/bg/tasks
+ chmod 0664 /dev/blkio/bg/tasks
+ write /dev/blkio/blkio.weight 1000
+ write /dev/blkio/bg/blkio.weight 100
+
+on property:persist.sys.ssr.enable_debug=*
+ write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
+
+on property:persist.sys.mba_boot_timeout=*
+ write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
+
+on property:persist.sys.modem_auth_timeout=*
+ write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
+
+on property:persist.sys.pil_proxy_timeout=*
+ write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
+
+on property:persist.vendor.ssr.restart_level=*
+ start vendor.ssr_setup
+
+on property:persist.vendor.ssr.enable_ramdumps=1
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
+ mkdir /data/vendor/ramdump_ssr 770 system system
+ start vendor.ss_ramdump
+
+on property:persist.vendor.ssr.enable_ramdumps=0
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
+
+on property:sys.boot_completed=1
+ write /dev/kmsg "Boot completed "
+ #Reset read ahead for dm-0 and dm-1 to 512kb
+ write /sys/block/dm-0/queue/read_ahead_kb 512
+ write /sys/block/dm-1/queue/read_ahead_kb 512
+ #WDSP FW boot sysfs node used by STHAL
+ chown media audio /sys/kernel/wdsp0/boot
+ chown media audio /sys/kernel/wcd_cpe0/fw_name
+
+on property:persist.vendor.radio.atfwd.start=false
+ stop vendor.atfwd
+
+on property:vendor.radio.atfwd.start=false
+ stop vendor.atfwd
+
+# corefile limit
+on property:persist.debug.trace=1
+ mkdir /data/core 0777 root root
+ write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
+
+on property:init.svc.wpa_supplicant=stopped
+ stop dhcpcd
+
+on property:vendor.bluetooth.dun.status=running
+ start vendor.bt-dun
+
+on property:vendor.bluetooth.dun.status=stopped
+ stop vendor.bt-dun
+
+on property:ro.bluetooth.ftm_enabled=true
+ start ftmd
+
+on property:vendor.bluetooth.startbtsnoop=true
+ start vendor.btsnoop
+
+on property:vendor.bluetooth.startbtsnoop=false
+ stop vendor.btsnoop
+
+on property:vendor.bluetooth.startbtlogger=true
+ start vendor.bt_logger
+
+on property:vendor.bluetooth.startbtlogger=false
+ stop vendor.bt_logger
+
+service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
+ class core
+ user root
+ oneshot
+
+service qcom-c_main-sh /vendor/bin/init.class_main.sh
+ class main
+ user root
+ oneshot
+
+on property:vold.decrypt=trigger_restart_framework
+ start qcom-c_main-sh
+ start config_bt_addr
+ start wcnss-service
+
+on property:persist.env.fastdorm.enabled=true
+ setprop persist.radio.data_no_toggle 1
+
+service vendor.cnd /system/vendor/bin/cnd
+ class main
+ user system
+ group system wifi inet radio wakelock net_admin
+
+service dpmQmiMgr /system/vendor/bin/dpmQmiMgr
+ class main
+ user system
+ group system
+
+service vendor.qrtr-ns /vendor/bin/qrtr-ns -f -i 1
+ class core
+ user system
+ group system net_admin
+ capabilities NET_BIND_SERVICE NET_ADMIN
+
+service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
+ class core
+ user root
+ oneshot
+
+service vendor.rmt_storage /vendor/bin/rmt_storage
+ class core
+ user root
+ shutdown critical
+ ioprio rt 0
+
+service vendor.tftp_server /vendor/bin/tftp_server
+ class core
+ user root
+
+on property:vendor.wc_transport.start_hci=true
+ start vendor.start_hci_filter
+
+on property:vendor.wc_transport.start_hci=false
+ stop vendor.start_hci_filter
+
+service vendor.start_hci_filter /system/vendor/bin/wcnss_filter
+ class late_start
+ user bluetooth
+ group bluetooth diag system wakelock
+ seclabel u:r:bluetooth:s0
+ disabled
+
+service vendor.bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
+ class late_start
+ user bluetooth
+ group bluetooth net_bt_admin inet
+ disabled
+ oneshot
+
+service vendor.btsnoop /system/bin/btsnoop
+ user bluetooth
+ group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw
+ class late_start
+ disabled
+ oneshot
+
+service vendor.bt_logger /system/bin/bt_logger
+ user bluetooth
+ group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw
+ class late_start
+ disabled
+ oneshot
+
+service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
+ class late_start
+ user root
+ group bluetooth net_bt_admin misc net_bt_stack diag net_bt
+ disabled
+ oneshot
+
+service vendor.port-bridge /system/vendor/bin/port-bridge
+ class main
+ user radio
+ group radio system inet
+ disabled
+ oneshot
+
+service qmiproxy /system/bin/qmiproxy
+ class main
+ user radio
+ group radio diag
+ disabled
+
+# QMUX must be in multiple groups to support external process connections
+service vendor.qmuxd /system/vendor/bin/qmuxd
+ class main
+ user root
+ group radio audio bluetooth gps nfc diag
+ disabled
+
+service vendor.netmgrd /system/vendor/bin/netmgrd
+ class main
+ disabled
+
+service vendor.ipacm-diag /system/vendor/bin/ipacm-diag
+ class main
+ user radio
+ socket ipacm_log_file dgram 660 radio radio
+ group radio diag oem_2901
+ disabled
+
+service vendor.ipacm /system/vendor/bin/ipacm
+ class main
+ user radio
+ group radio inet
+ disabled
+
+service vendor.dataqti /system/vendor/bin/qti
+ class main
+ user radio
+ group radio oem_2901 diag usb net_admin
+ disabled
+
+service vendor.dataadpl /system/vendor/bin/adpl
+ class main
+ user radio
+ group radio oem_2901 diag usb net_admin
+ disabled
+
+service vendor.sensors /vendor/bin/sscrpcd
+ class core
+ user system
+ group system
+ disabled
+
+service vendor.sensors.qti /vendor/bin/sensors.qti
+ class core
+ user system
+ group system
+ disabled
+
+on property:ro.vendor.use_data_netmgrd=false
+ # netmgr not supported on specific target
+ stop vendor.netmgrd
+
+# Adjust socket buffer to enlarge TCP receive window for high bandwidth
+# but only if ro.data.large_tcp_window_size property is set.
+on property:ro.data.large_tcp_window_size=true
+ write /proc/sys/net/ipv4/tcp_adv_win_scale 2
+
+on property:sys.sysctl.tcp_adv_win_scale=*
+ write /proc/sys/net/ipv4/tcp_adv_win_scale ${sys.sysctl.tcp_adv_win_scale}
+
+service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
+ -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
+ -g@android:vendor_wpa_wlan0
+# we will start as root and wpa_supplicant will switch to user wifi
+# after setting up the capabilities required for WEXT
+# user wifi
+# group wifi inet keystore
+ interface android.hardware.wifi.supplicant@1.0::ISupplicant default
+ interface android.hardware.wifi.supplicant@1.1::ISupplicant default
+ class main
+ socket vendor_wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
+ -iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
+ -m/data/vendor/wifi/wigig_p2p_supplicant.conf \
+ -O/data/vendor/wifi/wigig_sockets -dd \
+ -e/data/vendor/wifi/wigig_entropy.bin -g@android:wpa_wigig0 \
+ -S wigigsvc
+ # we will start as root and wpa_supplicant will switch to user wifi
+ # after setting up the capabilities required for WEXT
+ # user wifi
+ # group wifi inet keystore
+ class main
+ socket wpa_wigig0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+# FST Manager with hostapd (softap) - all settings inside ini file
+service fstman /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini -a 1
+ user wifi
+ group wifi
+ capabilities NET_ADMIN NET_RAW
+ class main
+ disabled
+ oneshot
+
+# FST Manager with supplicant - connect to supplicant socket
+service fstman_wlan0 /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini \
+ -a 0 @android:vendor_wpa_wlan0
+ user wifi
+ group wifi
+ capabilities NET_ADMIN NET_RAW
+ class main
+ disabled
+ oneshot
+
+service wigighalsvc /vendor/bin/wigighalsvc
+ interface vendor.qti.hardware.wigig.supptunnel@1.0::ISuppTunnelProvider default
+ class hal
+ user system
+ group wifi
+ # needed for on-demand insmod/rmmod of wigig module
+ capabilities SYS_MODULE
+ disabled
+
+service wigignpt /vendor/bin/wigignpt
+ interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
+ class hal
+ socket wigignpt stream 660 system wifi
+ user system
+ group wifi
+ capabilities NET_ADMIN
+ disabled
+
+service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
+ class late_start
+ disabled
+ oneshot
+
+service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG
+ class late_start
+ disabled
+ oneshot
+
+service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
+ class late_start
+ disabled
+ oneshot
+
+service dhcpcd_wigig0 /system/bin/dhcpcd -ABKLG
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_wlan0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_bond0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_p2p /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_wigig0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
+ user root
+ group root
+ disabled
+ oneshot
+
+service wifi_ftmd /system/vendor/bin/wifi_ftmd
+ user system
+ group system inet net_admin
+ socket wififtmd_server dgram 0660 system system
+ disabled
+ oneshot
+
+on property:vendor.wifi.ftmd.load=true
+ insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
+
+service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f
+ class late_start
+ user system
+ group system wifi inet net_admin sdcard_rw media_rw diag
+ disabled
+ oneshot
+
+service vendor.tcpdump /vendor/bin/tcpdump -i any -W 2 -C 2 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
+ class main
+ user root
+ group root wifi
+ disabled
+ oneshot
+
+service sniffer /vendor/bin/tcpdump -i wlan0 -w /sdcard/wlan_logs/sniffer.pcap
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+on property:sys.user.0.ce_available=true
+ start vendor.cnss_diag
+ start vendor.tcpdump
+
+service startpktlog /system/bin/iwpriv wlan0 pktlog 1
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+service stoppktlog /system/bin/iwpriv wlan0 pktlog 0
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+on property:persist.vendor.data.shs_ko_load=1
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_shs
+
+on property:persist.vendor.data.shs_ko_load=0
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_shs
+
+on property:persist.vendor.data.perf_ko_load=1
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_perf
+
+on property:persist.vendor.data.perf_ko_load=0
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_perf
+
+service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
+ class late_start
+ user system
+ group system inet net_admin wifi
+ capabilities NET_ADMIN
+
+on property:sys.shutdown.requested=*
+ stop cnss-daemon
+
+service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
+ class late_start
+ disabled
+ oneshot
+
+service iprenew_bt-pan /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service ssgqmigd /vendor/bin/ssgqmigd
+ class late_start
+ user radio
+ group radio gps system
+ socket ssgqmig seqpacket 0660 radio inet
+
+service ssgtzd /vendor/bin/ssgtzd
+ class late_start
+ user system
+ group system
+ socket ssgtzd stream 0660 system inet
+
+service mlid /vendor/bin/mlid
+ class late_start
+ user gps
+ group gps
+ socket mlid stream 0666 gps gps
+
+service loc_launcher /system/vendor/bin/loc_launcher
+ class late_start
+ user gps
+ group gps
+
+on property:crypto.driver.load=1
+ insmod /system/lib/modules/qce.ko
+ insmod /system/lib/modules/qcedev.ko
+
+service drmdiag /system/vendor/bin/drmdiagapp
+ class late_start
+ user root
+ disabled
+ oneshot
+
+on property:drmdiag.load=1
+ start drmdiag
+
+on property:drmdiag.load=0
+ stop drmdiag
+
+service qcom-sh /vendor/bin/init.qcom.sh
+ class late_start
+ user root
+ group root system radio
+ oneshot
+
+service vendor-sensor-sh /vendor/bin/init.qcom.sensors.sh
+ class core
+ user root
+ oneshot
+
+service crashdata-sh /vendor/bin/init.qcom.crashdata.sh
+ class late_start
+ user root
+ oneshot
+
+service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
+ class late_start
+ user root
+ group root system wakelock graphics
+ disabled
+ oneshot
+
+service qti-testscripts /system/bin/sh /system/etc/init.qcom.testscripts.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+ seclabel u:r:qti-testscripts:s0
+
+service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
+ class late_start
+ group wifi inet
+ disabled
+ oneshot
+
+service wifi-crda /vendor/bin/init.crda.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+
+on property:sys.boot_completed=1
+ start qcom-post-boot
+ start qti-testscripts
+
+on property:ro.vendor.ril.mbn_copy_completed=1
+ write /data/vendor/radio/copy_complete 1
+
+service qvop-daemon /vendor/bin/qvop-daemon
+ class late_start
+ user system
+ group system drmrpc
+
+service vendor.atfwd /vendor/bin/ATFWD-daemon
+ class late_start
+ user system
+ group system radio
+
+service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
+ interface android.hardware.wifi.hostapd@1.0::IHostapd default
+ class main
+ capabilities NET_ADMIN NET_RAW
+ user wifi
+ group wifi
+ disabled
+ oneshot
+
+service vendor.wigig_hostapd /vendor/bin/hw/hostapd -dd -j wigighostapd /data/vendor/wifi/hostapd/wigig_hostapd.conf
+ class late_start
+ capabilities NET_ADMIN NET_RAW
+ user wifi
+ group wifi inet keystore
+ oneshot
+ disabled
+
+service ims_regmanager /system/vendor/bin/exe-ims-regmanagerprocessnative
+ class late_start
+ group net_bt_admin inet radio wifi
+ disabled
+
+on property:persist.ims.regmanager.mode=1
+ start ims_regmanager
+
+on property:ro.data.large_tcp_window_size=true
+ # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
+ write /proc/sys/net/ipv4/tcp_adv_win_scale 2
+
+service battery_monitor /system/bin/battery_monitor
+ user system
+ group system
+ disabled
+
+service vendor.ril-daemon2 /vendor/bin/hw/rild -c 2
+ class main
+ user radio
+ disabled
+ group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
+ capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
+
+service vendor.ril-daemon3 /vendor/bin/hw/rild -c 3
+ class main
+ user radio
+ disabled
+ group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
+ capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
+
+service profiler_daemon /system/bin/profiler_daemon
+ class late_start
+ user root
+ group root
+ disabled
+
+service charger /charger
+ class charger
+ group system graphics
+ seclabel u:r:healthd:s0
+
+service vendor.ssr_diag /system/vendor/bin/ssr_diag
+ class late_start
+ user system
+ group system
+ disabled
+
+service hvdcp /system/bin/hvdcp
+ class core
+ user root
+ disabled
+
+on property:persist.usb.hvdcp.detect=true
+ start hvdcp
+
+on property:persist.usb.hvdcp.detect=false
+ stop hvdcp
+
+service charger_monitor /system/bin/charger_monitor
+ user root
+ group root
+ disabled
+
+service qbcharger /charger -m 1
+ disabled
+ oneshot
+
+on property:sys.qbcharger.enable=true
+ start qbcharger
+
+on property:sys.qbcharger.enable=false
+ stop qbcharger
+
+
+on property:persist.vendor.mdlog.enable=true
+ start diag_mdlog_start
+on property:persist.vendor.mdlog.enable=false
+ start diag_mdlog_stop
+
+service qlogd /system/xbin/qlogd
+ socket qlogd stream 0662 system system
+ class main
+ disabled
+on property:persist.vendor.qlogd=1
+ start qlogd
+on property:persist.vendor.qlogd=0
+ stop qlogd
+
+service vm_bms /vendor/bin/vm_bms
+ user root
+ group root
+ disabled
+
+service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
+ class core
+ user root
+ group root
+ disabled
+
+service vendor.msm_irqbal_lb /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_little_big.conf
+ class core
+ user root
+ group root
+ disabled
+
+service vendor.msm_irqbl_sdm630 /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_sdm630.conf
+ class core
+ user root
+ group root
+ disabled
+
+# service for USERDEBUG
+service vendor.LKCore-dbg /vendor/bin/LKCore
+ class late_start
+ oneshot
+ disabled
+ user root
+ group root system log diag net_raw
+service sdlog /system/bin/sdlog
+ class late_start
+ user root
+ disabled
+ oneshot
+
+on property:sys.logd_t2.enable=1
+ start sdlog
+
+on property:sys.logd.enable=1
+ start sdlog
+
+on property:persist.vendor.logd.enable=1
+ start sdlog
+on property:persist.vendor.logd.enable=0
+ setprop vendor.sdlog.run 0
+ stop sdlog
+
+# service for USER
+service vendor.LKCore-rel /vendor/bin/LKCore
+ class late_start
+ oneshot
+ disabled
+ user system
+ group system log diag
+
+service qseeproxydaemon /system/vendor/bin/qseeproxydaemon
+ class late_start
+ user system
+ group system
+
+service esepmdaemon /system/vendor/bin/esepmdaemon
+ class core
+ user system
+ group nfc
+
+on charger
+ setprop persist.sys.usb.config mass_storage
+ load_system_props
+ start qcom-post-boot
+
+#add poweroffhandler
+service poweroffhandler /system/vendor/bin/poweroffhandler
+ class core
+ user media
+ group graphics audio
+ disabled
+ oneshot
+
+on property:init.svc.surfaceflinger=restarting
+ stop vendor.hwcomposer-2-1
+ start vendor.hwcomposer-2-1
+
+on property:vendor.display.lcd_density=*
+ setprop ro.sf.lcd_density ${vendor.display.lcd_density}
+
+# Logcat dump daemon, dumps logs to logdump partition
+service logdumpd /system/bin/logcat -b all -v threadtime -D -w /dev/block/bootdevice/by-name/logdump
+ class core
+ writepid /dev/cpuset/system-background/tasks
+ seclabel u:r:logdumpd:s0
+ disabled
+
+# Logdumpd is enabled only for userdebug non-perf build
+on property:ro.logdumpd.enabled=1
+ start logdumpd
+
+service time_daemon /system/vendor/bin/time_daemon
+ class main
+ user root
+ group root
+
+service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
+ class late_start
+ user system
+ group readproc system net_bw_stats radio vendor_rfs_shared
+
+service vendor.vppservice /vendor/bin/vppservice
+ class main
+ user media
+ group camera
+
+# Set vendor-ril lib path based on Meta version
+on property:vendor.rild.libpath=*
+ setprop rild.libpath ${vendor.rild.libpath}
+
+on property:ro.vendor.radio.noril=*
+ setprop ro.radio.noril ${ro.vendor.radio.noril}
+
+service seemp_healthd /vendor/bin/seemp_healthd
+ class late_start
+ user system
+ group system
+
+#ant check change permission
+ chown system system /sys/class/ant_class/ant_state
+ chmod 0644 /sys/class/ant_class/ant_state
+
+service power_off_alarm /vendor/bin/power_off_alarm
+ class core
+ group system
+ disabled
+ oneshot
+
+service vendor.move_time_data /system/bin/move_time_data.sh
+ class main
+ user system
+ group system
+ disabled
+ oneshot
+
+service vendor.hbtp /vendor/bin/hbtp_daemon
+ class main
+ user system
+ group system
+ capabilities SYS_NICE
+ disabled
+
+service chre /vendor/bin/chre
+ class late_start
+ user system
+ group system
+ socket chre seqpacket 0660 root system
+ shutdown critical
+
+service config_bt_addr /vendor/bin/btnvtool -O
+ class core
+ user bluetooth
+ group bluetooth radio
+ oneshot
+
+service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
+ class main
+ disabled
+ oneshot
+ keycodes 114 115 116
+
+#workaround for camera HAL can not read sys property
+on property:sys.camera.face.unlock=*
+ setprop vendor.camera.face.unlock ${sys.camera.face.unlock}
diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc
new file mode 100755
index 0000000..7737741
--- /dev/null
+++ b/rootdir/etc/init.qcom.usb.rc
@@ -0,0 +1,1667 @@
+# Copyright (c) 2011-2016, 2018 The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+on charger
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1 0770 shell shell
+ mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/bcdUSB 0x0200
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ mkdir /config/usb_gadget/g1/functions/mass_storage.0
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
+ mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+ enable vendor.qcom-usb-sh
+ start vendor.qcom-usb-sh
+ setprop sys.usb.config mass_storage
+
+on boot
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1 0770
+ mkdir /config/usb_gadget/g2 0770
+ mkdir /config/usb_gadget/g1/strings/0x409 0770
+ mkdir /config/usb_gadget/g2/strings/0x409 0770
+ write /config/usb_gadget/g1/bcdUSB 0x0200
+ write /config/usb_gadget/g2/bcdUSB 0x0200
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g2/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g2/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ write /config/usb_gadget/g2/strings/0x409/product ${ro.product.model}
+ mkdir /config/usb_gadget/g1/functions/mass_storage.0
+ mkdir /config/usb_gadget/g1/functions/mtp.gs0
+ mkdir /config/usb_gadget/g1/functions/ptp.gs1
+ mkdir /config/usb_gadget/g1/functions/accessory.gs2
+ mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+ mkdir /config/usb_gadget/g1/functions/midi.gs5
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ mkdir /config/usb_gadget/g1/functions/diag.diag
+ mkdir /config/usb_gadget/g1/functions/diag.diag_mdm
+ mkdir /config/usb_gadget/g1/functions/cser.dun.0
+ mkdir /config/usb_gadget/g1/functions/cser.nmea.1
+ mkdir /config/usb_gadget/g1/functions/cser.dun.2
+ mkdir /config/usb_gadget/g1/functions/gsi.rmnet
+ mkdir /config/usb_gadget/g1/functions/gsi.rndis
+ mkdir /config/usb_gadget/g1/functions/gsi.dpl
+ mkdir /config/usb_gadget/g1/functions/qdss.qdss
+ mkdir /config/usb_gadget/g1/functions/qdss.qdss_mdm
+ mkdir /config/usb_gadget/g1/functions/rndis_bam.rndis
+ mkdir /config/usb_gadget/g1/functions/rndis.rndis
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet_bam_dmux
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl_bam_dmux
+ mkdir /config/usb_gadget/g1/functions/ncm.0
+ mkdir /config/usb_gadget/g1/functions/ccid.ccid
+ mkdir /config/usb_gadget/g1/functions/uac2.0
+ mkdir /config/usb_gadget/g1/functions/uvc.0
+ mkdir /config/usb_gadget/g1/configs/b.1 0770
+ mkdir /config/usb_gadget/g2/configs/b.1 0770
+ mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770
+ mkdir /config/usb_gadget/g2/configs/b.1/strings/0x409 0770
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ mkdir /dev/usb-ffs 0775 shell system
+ mkdir /dev/usb-ffs/adb 0770 shell system
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=1000,rmode=0770,fmode=0660
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+ setprop vendor.usb.controller ${sys.usb.controller}
+
+on load_persist_props_action
+ enable vendor.qcom-usb-sh
+
+service vendor.qcom-usb-sh /vendor/bin/init.qcom.usb.sh
+ class core
+ user root
+ oneshot
+ disabled
+
+on property:persist.vendor.usb.config=*
+ setprop persist.sys.usb.config ${persist.vendor.usb.config}
+
+on boot && property:ro.boot.usbconfigfs=true
+ setprop sys.usb.configfs 1
+
+# Following are the parameters required for usb functionality. They provide configurable options like
+# product_id/vendor id and allows specifying required functions:
+#
+# Required parameters:
+#
+# /sys/class/android_usb/android0/enable: Enables/disables usb composition
+# Value: 0 (disable), 1 (enable)
+#
+# /sys/class/android_usb/android0/idVendor: Stores Vendor ID
+# Value: 05c6 (Vendor id for Qualcomm Inc)
+#
+# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition
+# Value: 0x9xxx for composite interface, 0xFxxx for single interface
+#
+# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface.
+# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2]
+#
+# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition.
+# Value: Passed one per function driver. e.g. diag[,adb]
+#
+#Optional parameters:
+#
+# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to
+# communicate to serial interface.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. smd[,sdio,tty,hsic]
+# Only required if serial interface is present.
+#
+# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports
+# used to communicate to serial interface. This is used to distinguish between more than one interface
+# using same transport type.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. serial_hsic[,serial_hsusb]
+# Only required for transport type hsic, optional for other transport types.
+#
+# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to
+# communicate to rmnet interface.
+# Value: Passed two per interface as control, data transport type pair.
+# e.g. smd,bam[,hsuart,hsuart]
+# Only required if rmnet interface is present.
+#
+# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports
+# used to communicate to rmnet interface. This is used to distinguish between more than one interface
+# using same transport type.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. rmnet_hsic[,rmnet_hsusb]
+# Only required for transport type hsic, optional for other transport types.
+
+# USB compositions
+on property:sys.usb.config=diag,serial_tty,serial_smd && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9002
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,smd
+ write /sys/class/android_usb/android0/functions diag,serial
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_smd,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9020
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 901D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 900E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9091
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9091
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9092
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9092
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9037
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9038
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903C
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9031
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9032
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903C
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# RmNet using USB BAM to IPA BAM
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9091
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9092
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition
+on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition with diag_mdm and adb
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9031
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition with diag_mdm
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9032
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA composition with adb
+on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9065
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA composition without adb
+on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9066
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA2 composition with adb
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9065
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA2 composition without adb
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9066
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm and adb
+# Serial & RmNet bridged in userspace with tty and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm
+# Serial & RmNet bridged in userspace with tty and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion HSIC/PCIe Hybrid composition with diag_mdm and adb
+# RmNet is bridged over PCIe using qti,ether ctrl/data transports
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion HSIC/PCIe Hybrid composition with diag_mdm
+# RmNet is bridged over PCIe using qti,ether ctrl/data transports
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm
+# Serial & RmNet bridged in userspace with port bridge and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 2.2 composition with diag_qsc and adb
+on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9053
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 2.2 composition with diag_qsc
+on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9054
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:vendor.usb.tethering=true
+ write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask}
+
+on property:sys.usb.config=rndis
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra}
+
+on property:sys.usb.config=rndis,none && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F00E
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/functions rndis
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=0
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb
+
+on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9024
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/functions rndis,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 902C
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 902D
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+# DPL is implemented using QDSS
+on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90BF
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+# DPL is implemented using QDSS
+on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90C0
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_smd && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B3
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_smd,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B4
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_smd,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B5
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_smd,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B6
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B5
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/functions rndis,serial,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B6
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/functions rndis,serial,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag,diag_mdm && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9041
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9042
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9086
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9087
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 904D
+ write /sys/class/android_usb/android0/functions ptp
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 904E
+ 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}
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F003
+ write /sys/class/android_usb/android0/functions mtp
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9039
+ write /sys/class/android_usb/android0/functions mtp,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 901B
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903A
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9040
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903F
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9088
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9089
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,ccid && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9045
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions diag,ccid
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,ccid,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9044
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions diag,adb,ccid
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9015
+ write /sys/class/android_usb/android0/functions adb,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+#Mass-storage only composition
+on property:sys.usb.config=mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F000
+ write /sys/class/android_usb/android0/functions mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 904A
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9060
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9099
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9098
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_qti_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_qti_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_ipa && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_ipa,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 909B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 909A
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90A3
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports bam,hsic
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90A2
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports bam,hsic
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9081
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9082
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# same as 9025, plus data packet logging (DPL) using QDSS
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AD
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# same as 9026, plus data packet logging (DPL)
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B0
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AD
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B0
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 0525
+ write /sys/class/android_usb/android0/idProduct A4A1
+ write /sys/class/android_usb/android0/functions ncm
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 908C
+ write /sys/class/android_usb/android0/functions ncm,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=charging && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F006
+ write /sys/class/android_usb/android0/functions charging
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B7
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B8
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B2
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,diag_cnss,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B3
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,diag_cnss,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90BA
+ write /sys/class/android_usb/android0/functions midi
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90BB
+ write /sys/class/android_usb/android0/functions midi,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B7
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B8
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AE
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,qdss,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AF
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,uac2
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90CA
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb,uac2_func
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,video && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90CB
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb,video
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,uac2,video && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90CC
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb,uac2_func,video
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
new file mode 100755
index 0000000..3d9ef68
--- /dev/null
+++ b/rootdir/etc/init.target.rc
@@ -0,0 +1,465 @@
+# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+on early-init
+ mkdir /firmware 0771 system system
+ mkdir /bt_firmware 0771 system system
+ mkdir /dsp 0771 media media
+
+on init
+ write /dev/stune/foreground/schedtune.sched_boost_no_override 1
+ write /dev/stune/top-app/schedtune.sched_boost_no_override 1
+ write /dev/stune/schedtune.colocate 0
+ write /dev/stune/background/schedtune.colocate 0
+ write /dev/stune/system-background/schedtune.colocate 0
+ write /dev/stune/foreground/schedtune.colocate 0
+ write /dev/stune/top-app/schedtune.colocate 1
+
+on fs
+ wait /dev/block/platform/soc/${ro.boot.bootdevice}
+ symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
+ mount_all /vendor/etc/fstab.qcom
+ swapon_all /vendor/etc/fstab.qcom
+ chown root system /mnt/vendor/persist
+ chmod 0771 /mnt/vendor/persist
+ mkdir /mnt/vendor/persist/data 0700 system system
+ mkdir /mnt/vendor/persist/bms 0700 root system
+ restorecon_recursive /mnt/vendor/persist
+ write /sys/kernel/boot_adsp/boot 1
+
+ chmod 0664 /sys/class/thermal/thermal_message/sconfig
+ chown system system /sys/class/thermal/thermal_message/sconfig
+
+on post-fs
+ start vendor.qseecomd
+ write /dev/ipa 1
+
+on init
+ write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
+
+on post-fs-data
+ mkdir /data/tombstones/modem 0771 system system
+ mkdir /data/tombstones/lpass 0771 system system
+ mkdir /data/tombstones/wcnss 0771 system system
+ mkdir /data/tombstones/dsps 0771 system system
+#D2SP has no hbtp feature
+# mkdir /data/vendor/hbtp 0750 system system
+#end
+ mkdir /data/misc/seemp 0700 system system
+ mkdir /data/vendor/tloc 0700 system drmrpc
+
+on boot
+ start rmt_storage
+ start rfs_access
+ write /dev/cpuset/top-app/cpus 0-7
+ write /dev/cpuset/foreground/cpus 0-7
+ write /dev/cpuset/foreground/boost/cpus 0-7
+ write /dev/cpuset/background/cpus 0-7
+ write /dev/cpuset/system-background/cpus 0-7
+ chown system system /mnt/vendor/persist/sensors/sns.reg
+#spk pa-cal lct-20180914
+ chmod 0664 /dev/tiload_node
+
+#Create folder dump yuv images while debugging
+ mkdir /data/vendor/camera 0770 camera camera
+
+#USB controller configuration
+ setprop vendor.usb.rndis.func.name "rndis_bam"
+ setprop vendor.usb.rmnet.func.name "rmnet_bam"
+ setprop vendor.usb.rmnet.inst.name "rmnet"
+ setprop vendor.usb.dpl.inst.name "dpl"
+ write /sys/module/usb_f_qcrndis/parameters/rndis_dl_max_xfer_size 15916
+ setprop sys.usb.configfs 1
+
+#Peripheral manager
+service vendor.per_mgr /system/vendor/bin/pm-service
+ class core
+ user system
+ group system
+ ioprio rt 4
+
+service vendor.per_proxy /system/vendor/bin/pm-proxy
+ class core
+ user system
+ group system
+ disabled
+
+on property:init.svc.vendor.per_mgr=running
+ start vendor.per_proxy
+
+on property:sys.shutdown.requested=*
+ stop vendor.per_proxy
+
+#start camera server as daemon
+#service qcamerasvr /system/bin/mm-qcamera-daemon
+# class late_start
+# user camera
+# group camera system inet input graphics
+
+## import cne init file
+#on post-fs
+# export LD_PRELOAD /vendor/lib/libNimsWrap.so
+#
+## Allow usb charging to be disabled peristently
+#on property:persist.usb.chgdisabled=1
+# write /sys/class/power_supply/battery/charging_enabled 0
+#
+#on property:persist.usb.chgdisabled=0
+# write /sys/class/power_supply/battery/charging_enabled 1
+#
+#service qrngd /system/bin/qrngd -f
+# class main
+# user root
+# group root
+#
+#service qrngp /system/bin/qrngp
+# class main
+# user root
+# group root
+# oneshot
+# disabled
+#
+#on property:sys.boot_completed=1
+# start qrngp
+#
+
+service vendor.qseecomd /vendor/bin/qseecomd
+ class core
+ user root
+ group root
+
+#service mpdecision /system/vendor/bin/mpdecision --avg_comp
+# user root
+# disabled
+#
+#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
+# user system
+# group system
+# disabled
+#
+service thermal-engine /system/vendor/bin/thermal-engine
+ class main
+ user root
+ socket thermal-send-client stream 0666 system system
+ socket thermal-recv-client stream 0660 system system
+ socket thermal-recv-passive-client stream 0666 system system
+ socket thermal-send-rule stream 0660 system system
+ group root
+
+#service security-check1 /sbin/security_boot_check system
+# class core
+# oneshot
+#
+#service security-check2 /sbin/security_boot_check recovery
+# class core
+# oneshot
+#
+service time_daemon /system/vendor/bin/time_daemon
+ class late_start
+ user root
+ group root
+
+service adsprpcd_root /vendor/bin/adsprpcd
+ class main
+ user media
+ group media
+
+service adsprpcd /vendor/bin/adsprpcd audiopd
+ class main
+ user media
+ group media
+
+#D2SP has no hbtp feature
+#service hbtp /system/vendor/bin/hbtp_daemon
+# class main
+# user system
+# group system
+# disabled
+#end
+
+service audiod /system/vendor/bin/audiod
+ class late_start
+ user system
+ group system
+
+service vendor.cdsprpcd /vendor/bin/cdsprpcd
+ class main
+ user system
+ group system
+ disabled
+
+#
+#service usf_tester /system/vendor/bin/usf_tester
+# user system
+# group system inet
+# disabled
+#
+#service usf_epos /system/vendor/bin/usf_epos
+# user system
+# group system inet
+# disabled
+#
+#service usf_gesture /system/vendor/bin/usf_gesture
+# user system
+# group system inet
+# disabled
+#
+
+#service usf_sync_gesture /system/vendor/bin/usf_sync_gesture
+# user system
+# group system inet
+# disabled
+#
+
+#service usf_p2p /system/vendor/bin/usf_p2p
+# user system
+# group system inet
+# disabled
+#
+#service usf_hovering /system/vendor/bin/usf_hovering
+# user system
+# group system inet
+# disabled
+#
+#service usf_proximity /system/vendor/bin/usf_proximity
+# user system
+# group system inet
+# disabled
+#
+#service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
+# class late_start
+# user root
+# disabled
+# oneshot
+#
+#on property:init.svc.bootanim=stopped
+# start usf-post-boot
+#
+#
+#on boot
+# insmod /system/lib/modules/adsprpc.ko
+# insmod /system/lib/modules/mhi.ko
+## access permission for secure touch
+# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
+# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
+# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
+# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
+#
+#
+#
+## imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
+service vendor.imsqmidaemon /system/vendor/bin/imsqmidaemon
+ class main
+ user system
+ socket ims_qmid stream 0660 system radio
+ group radio log diag
+
+# imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
+service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon
+ class main
+ user system
+ socket ims_datad stream 0660 system radio
+ group system wifi radio inet log diag
+ disabled
+#
+#service mdm_helper /system/bin/mdm_helper
+# class core
+# onrestart setprop ro.service.mdm_helper_restarted "true"
+# disabled
+#
+#service mdm_helper_proxy /system/bin/mdm_helper_proxy
+# class core
+# disabled
+#
+#service mdm_launcher /system/bin/sh /init.mdm.sh
+# class main
+# oneshot
+#
+#service qcamerasvr /system/bin/mm-qcamera-daemon
+# class late_start
+# user camera
+# group camera system inet input graphics
+#
+# Stop mdm_helper_proxy in case of shutdown
+#on property:sys.shutdown.requested=*
+# stop mdm_helper_proxy
+#
+# Stop mdm_helper_proxy on APQ target
+#on property:ro.radio.noril=yes
+# stop mdm_helper_proxy
+#
+#on property:persist.airplane.mode.pwr.svg=enabled
+# setprop ro.mdm_helper_proxy_req false
+#
+#on property:init.svc.ril-daemon=running
+# setprop ro.mdm_helper_proxy_req true
+#
+## Start mdm_helper_proxy
+#on property:ro.mdm_helper_proxy_req=true
+# start mdm_helper_proxy
+#
+## QCA1530 SoC core detect
+#service gnss-detect /system/vendor/bin/gnss.qca1530.sh detect
+# class core
+# oneshot
+
+service energy-awareness /system/vendor/bin/energy-awareness
+ class main
+ user system
+ group system
+ oneshot
+
+service mdtpd /system/vendor/bin/mdtpd
+ class late_start
+ user root
+ group system radio drmrpc
+
+service vendor.pd_mapper /system/vendor/bin/pd-mapper
+ class core
+
+#
+## QCA1530 SoC late_start group trigger
+#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
+# class late_start
+# oneshot
+#
+## QCA1530 SoC Service Daemon
+#service gnss-svcd /system/vendor/bin/gnss.qca1530.sh start
+# class late_start
+# user root
+# group gps system qcom_diag diag log inet net_raw
+# disabled
+
+on property:vendor.ims.QMI_DAEMON_STATUS=1
+ start vendor.imsdatadaemon
+
+#on property:vold.decrypt=trigger_restart_framework
+# start cnss_diag
+
+service cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
+ class main
+ user system
+ group system wifi inet sdcard_rw media_rw diag
+ disabled
+
+service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
+ class main
+ user system
+ group radio diag inet log
+
+service vendor.imsrcsservice /system/vendor/bin/imsrcsd
+ class main
+ user system
+ group radio diag inet log wakelock
+
+on property:vendor.ims.DATA_DAEMON_STATUS=1
+ restart vendor.ims_rtp_daemon
+
+
+service ppd /system/vendor/bin/mm-pp-dpps
+ class late_start
+ user system
+ group system graphics
+ socket pps stream 0660 system system
+ disabled
+
+on property:init.svc.surfaceflinger=stopped
+ stop ppd
+
+on property:init.svc.surfaceflinger=running
+ start ppd
+
+on property:init.svc.surfaceflinger=restarting
+ stop ppd
+
+on property:init.svc.zygote=stopped
+ stop ppd
+
+on property:init.svc.zygote=running
+ start ppd
+
+on property:init.svc.zygote=restarting
+ stop ppd
+
+on charger
+ load_system_props
+ start qcom-post-boot
+ start vendor.hvdcp_opti
+ setprop sys.usb.configfs 1
+ start power_off_alarm
+
+#
+#service nqs /system/bin/nqs
+# class late_start
+# socket nqs_qsb_comm stream 660 system system
+# user system
+# group drmrpc
+#
+#service adsprpcd /system/vendor/bin/adsprpcd
+# class main
+# user media
+# group media
+#
+##Start picture quality tuning service
+#service vqttoolservice /system/bin/vqttoolservice
+# class late_start
+# socket vqtss stream 0660 system system
+# user system
+# group system
+
+service seempd /system/bin/seempd
+ class late_start
+ user system
+ group system sdcard_rw
+ socket seempdw dgram 0666 system system
+
+service vendor.tlocd /vendor/bin/tloc_daemon
+ class late_start
+ user system
+ group drmrpc gps net_raw
+
+service vendor.hvdcp_opti /system/vendor/bin/hvdcp_opti
+ class main
+ user root
+ group system wakelock
+
+service smcinvoked /system/bin/smcinvoked
+ class main
+ user system
+ group system
+
+on property:persist.sys.display_srgb=1
+ write /sys/class/graphics/fb0/msm_fb_srgb 1
+
+on property:persist.sys.display_srgb=2
+ write /sys/class/graphics/fb0/msm_fb_srgb 2
diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc
new file mode 100644
index 0000000..dde621b
--- /dev/null
+++ b/rootdir/etc/ueventd.qcom.rc
@@ -0,0 +1,352 @@
+# Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Firmware directory Path
+# Below macro will be read by uevent and path will
+# be added to search path for firmware loading
+firmware_directories /vendor/firmware_mnt/image/
+
+# the DIAG device node is not world writable/readable.
+/dev/diag 0660 system oem_2901
+
+/dev/genlock 0666 system system
+/dev/wlan 0660 wifi wifi
+/dev/kgsl 0666 system system
+/dev/kgsl-3d0 0666 system system
+/dev/kgsl-2d0 0666 root root
+/dev/kgsl-2d1 0666 root root
+/dev/ion 0664 system system
+/dev/rtc0 0660 system system
+/dev/smd0 0660 system system
+/dev/smd4 0660 system system
+/dev/smd_cxm_qmi 0640 radio radio
+/dev/smd5 0660 system system
+/dev/smd6 0660 system system
+/dev/smd7 0660 bluetooth bluetooth
+/dev/ccid_bridge 0660 system system
+/dev/ipa 0660 radio radio
+/dev/wwan_ioctl 0660 radio radio
+/dev/ipaNatTable 0660 radio radio
+/dev/rmnet_ctrl 0660 usb usb
+/dev/dpl_ctrl 0660 usb usb
+/dev/ipa_odl_ctl 0660 radio radio
+/dev/ipa_adpl 0660 system oem_2905
+/dev/spidev7.1 0660 system system
+#permissions for CSVT
+/dev/smd11 0660 radio radio
+
+#permsissions for BT/FM
+/dev/smd2 0660 bluetooth bluetooth
+/dev/smd3 0660 bluetooth bluetooth
+/dev/btpower 0660 bluetooth system
+
+#permissions for pta
+/dev/pta 0660 system system
+
+/dev/radio0 0640 system system
+/dev/rfcomm0 0660 bluetooth bluetooth
+/dev/ttyUSB0 0660 bluetooth bluetooth
+/dev/smdcntl0 0640 radio radio
+/dev/smdcntl1 0640 radio radio
+/dev/smdcntl2 0640 radio radio
+/dev/smdcntl3 0640 radio radio
+/dev/smdcntl4 0640 radio radio
+/dev/smdcntl5 0640 radio radio
+/dev/smdcntl6 0640 radio radio
+/dev/smdcntl7 0640 radio radio
+/dev/smdcntl8 0640 radio radio
+/dev/smdcnt_rev0 0640 radio radio
+/dev/smdcnt_rev1 0640 radio radio
+/dev/smdcnt_rev2 0640 radio radio
+/dev/smdcnt_rev3 0640 radio radio
+/dev/smdcnt_rev4 0640 radio radio
+/dev/smdcnt_rev5 0640 radio radio
+/dev/smdcnt_rev6 0640 radio radio
+/dev/smdcnt_rev7 0640 radio radio
+/dev/smdcnt_rev8 0640 radio radio
+/dev/smuxctl32 0640 radio radio
+/dev/sdioctl0 0640 radio radio
+/dev/sdioctl1 0640 radio radio
+/dev/sdioctl2 0640 radio radio
+/dev/sdioctl3 0640 radio radio
+/dev/sdioctl4 0640 radio radio
+/dev/sdioctl5 0640 radio radio
+/dev/sdioctl6 0640 radio radio
+/dev/sdioctl7 0640 radio radio
+/dev/sdioctl8 0640 radio radio
+/dev/rmnet_mux_ctrl 0640 radio radio
+/dev/hsicctl0 0640 radio radio
+/dev/hsicctl1 0640 radio radio
+/dev/hsicctl2 0640 radio radio
+/dev/hsicctl3 0640 radio radio
+/dev/hsicctl4 0640 radio radio
+/dev/hsicctl5 0640 radio radio
+/dev/hsicctl6 0640 radio radio
+/dev/hsicctl7 0640 radio radio
+/dev/hsicctl8 0640 radio radio
+/dev/hsicctl9 0640 radio radio
+/dev/hsicctl10 0640 radio radio
+/dev/hsicctl11 0640 radio radio
+/dev/hsicctl12 0640 radio radio
+/dev/hsicctl13 0640 radio radio
+/dev/hsicctl14 0640 radio radio
+/dev/hsicctl15 0640 radio radio
+/dev/hsicctl16 0640 radio radio
+/dev/mhi_*_pipe_14 0640 radio radio
+/dev/mhi_*_pipe_16 0640 radio radio
+/dev/mhi_*_pipe_32 0640 radio radio
+/dev/at_usb0 0640 radio radio
+/dev/at_mdm0 0640 radio radio
+/dev/video* 0660 system camera
+/dev/media* 0660 system camera
+/dev/v4l-subdev* 0660 system camera
+/dev/qseecom 0660 system drmrpc
+/dev/qce 0660 system drmrpc
+/dev/smcinvoke 0660 system system
+/dev/qsee_ipc_irq_spss 0660 system drmrpc
+/dev/seemplog 0660 system system
+/dev/pft 0660 system drmrpc
+/dev/spcom 0660 system system
+/dev/sp_kernel 0660 system system
+/dev/sp_ssr 0660 system system
+/dev/sp_keymaster 0660 system system
+/dev/sec_nvm_* 0660 system system
+/dev/cryptoapp 0660 system system
+/dev/spdaemon_ssr 0660 system system
+/dev/gemini0 0660 system camera
+/dev/jpeg0 0660 system camera
+/dev/jpeg1 0660 system camera
+/dev/jpeg2 0660 system camera
+/dev/jpeg3 0660 system camera
+/dev/adsprpc-smd 0664 system system
+/dev/adsprpc-smd-secure 0644 system system
+/dev/system_health_monitor 0644 radio system
+/dev/mdss_rotator 0664 system system
+
+#QDSS
+/dev/byte-cntr 0660 system oem_2902
+# fpc fingerprint
+/sys/devices/soc/soc:fpc1020* hw_reset 0660 system system
+/sys/devices/soc/soc:fpc1020* irq 0660 system system
+/sys/devices/soc/soc:fpc1020* wakeup_enable 0660 system system
+/sys/devices/soc/soc:fpc1020* fingerdown_wait 0220 system system
+
+/sys/class/leds/red delay_on 0640 system system
+/sys/class/leds/red delay_off 0640 system system
+/sys/class/leds/red breath 0640 system system
+/sys/class/leds/green delay_on 0640 system system
+/sys/class/leds/green delay_off 0640 system system
+/sys/class/leds/green breath 0640 system system
+/sys/class/leds/blue delay_on 0640 system system
+/sys/class/leds/blue delay_off 0640 system system
+/sys/class/leds/blue breath 0640 system system
+
+# wlan
+/dev/wcnss_wlan 0660 system system
+/dev/wcnss_ctrl 0660 system system
+/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
+/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
+/dev/spidev0.0 0660 system audio
+/dev/msm_camera/* 0660 system camera
+/dev/gemini/ 0660 system camera
+/dev/mercury0 0660 system camera
+/dev/msm_vidc_reg 0660 system audio
+/dev/msm_vidc_dec 0660 system audio
+/dev/msm_vidc_dec_sec 0660 system audio
+/dev/msm_vidc_enc 0660 system audio
+/dev/msm_rotator 0660 system system
+/dev/hw_random 0600 root root
+/dev/sdsprpc-smd 0660 system system
+
+#permissions for audio
+/dev/wcd_dsp0_control 0660 system audio
+/dev/wcd-dsp-glink 0660 system audio
+/dev/audio_slimslave 0660 system audio
+/dev/msm_qcelp 0660 system audio
+/dev/msm_evrc 0660 system audio
+/dev/msm_wma 0660 system audio
+/dev/msm_wmapro 0660 system audio
+/dev/msm_alac 0660 system audio
+/dev/msm_ape 0660 system audio
+/dev/msm_amrnb 0660 system audio
+/dev/msm_amrwb 0660 system audio
+/dev/msm_amrwbplus 0660 system audio
+/dev/msm_aac 0660 system audio
+/dev/msm_multi_aac 0660 system audio
+/dev/msm_aac_in 0660 system audio
+/dev/msm_qcelp_in 0660 system audio
+/dev/msm_evrc_in 0660 system audio
+/dev/msm_amrnb_in 0660 system audio
+/dev/msm_amrwb_in 0660 system audio
+/dev/msm_a2dp_in 0660 system audio
+/dev/msm_ac3 0660 system audio
+/dev/msm_audio_cal 0660 system audio
+/dev/msm_hweffects 0660 system audio
+/dev/msm_cad 0660 system audio
+/dev/msm_fm 0660 system audio
+/dev/msm_mvs 0660 system audio
+/dev/msm_pcm_lp_dec 0660 system audio
+/dev/msm_preproc_ctl 0660 system audio
+/dev/msm_rtac 0660 system audio
+/dev/msm_voicememo 0660 system audio
+/dev/ttyHSL1 0660 system system
+/dev/ttyHS1 0660 system system
+/dev/mdm 0660 system radio
+/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
+/dev/sdio_tty_ciq_00 0660 system system
+/dev/tty_sdio_00 0660 system system
+/dev/ttyGS0 0660 system system
+/dev/i2c-5 0660 media media
+/dev/avtimer 0660 system audio
+
+# DVB devices
+/dev/dvb/adapter0/demux* 0440 media media
+/dev/dvb/adapter0/dvr* 0660 media media
+/dev/dvb/adapter0/video* 0660 media media
+
+# Broadcast devices
+/dev/tsc_mux0 0660 media media
+/dev/tsc_ci0 0660 media media
+
+# sensors
+/dev/sensors 0660 system system
+/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
+/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
+/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* max_latency 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* flush 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibrate 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system
+/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
+/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
+/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
+/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
+/sys/devices/virtual/input/input* poll 0660 input system
+/sys/devices/virtual/input/input* pollrate_ms 0660 input system
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
+
+# laser sensor access
+/sys/devices/virtual/input/input* enable_ps_sensor 0660 system input
+/sys/devices/virtual/input/input* set_delay_ms 0660 system input
+/sys/devices/virtual/input/input* do_flush 0660 system input
+
+# vm_bms
+/dev/vm_bms 0660 system system
+/dev/battery_data 0660 system system
+
+# wlan
+/dev/wcnss_wlan 0660 system system
+/dev/wcnss_ctrl 0660 system system
+/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0/queues/rx-* rps_cpus 0660 system system
+/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/p2p0/queues/rx-* rps_cpus 0660 system system
+
+# wigig
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/snr_thresh 0660 wifi wifi
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
+/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system
+
+#nfc permissions
+/dev/nfc-nci 0660 nfc nfc
+/dev/nq-nci 0660 nfc nfc
+/dev/assd 0660 nfc nfc
+
+# UIO devices
+/dev/uio0 0660 system system
+/dev/uio1 0660 system system
+/dev/uio2 0660 system system
+
+# SSR devices
+/dev/subsys_* 0640 system system
+
+# Ultrasound device
+/dev/usf1 0660 system system
+
+# Ramdump devices
+/dev/ramdump* 0640 system system
+
+# Fingerprint device
+/dev/qbt1000 0660 system system
+
+#ImproveTouch device
+/dev/hbtp_input 0660 system system
+/dev/hbtp_vm 0660 system system
+
+# Add device block for FRP
+/dev/block/platform/soc/7824900.sdhci/by-name/config 0600 system system
+/dev/block/platform/soc/7464900.sdhci/by-name/frp 0600 system system
+/dev/block/platform/soc/624000.ufshc/by-name/frp 0600 system system
+/dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system
+/dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system
+/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system
+/dev/block/platform/soc/7c4000.sdhci/by-name/frp 0600 system system
+
+# This is temporary while using SD card for initial bring-up
+/dev/block/platform/soc/8804000.sdhci/by-name/frp 0600 system system
+
+# Kmsg device
+/dev/kmsg 0620 root system
+
+# LED class devices
+/sys/class/leds/red delay_on 0640 system system
+/sys/class/leds/red delay_off 0640 system system
+/sys/class/leds/red breath 0640 system system
+/sys/class/leds/green delay_on 0640 system system
+/sys/class/leds/green delay_off 0640 system system
+/sys/class/leds/green breath 0640 system system
+/sys/class/leds/blue delay_on 0640 system system
+/sys/class/leds/blue delay_off 0640 system system
+/sys/class/leds/blue breath 0640 system system
+
+# NPU device
+/dev/msm_npu 0644 system system
+
+# USB role switch
+/sys/class/dual_role_usb/* data_role 0660 system system
+/sys/class/dual_role_usb/* power_role 0660 system system
+/sys/class/dual_role_usb/* mode 0660 system system
diff --git a/sdm660.mk b/sdm660.mk
new file mode 100644
index 0000000..b46c85c
--- /dev/null
+++ b/sdm660.mk
@@ -0,0 +1,437 @@
+#
+# Copyright (C) 2018 The LineageOS 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.
+#
+#
+# This file sets variables that control the way modules are built
+# thorughout the system. It should not be used to conditionally
+# disable makefiles (the proper mechanism to control what gets
+# included in a build is to use PRODUCT_PACKAGES in a product
+# definition file).
+#
+
+# Inherit proprietary files
+$(call inherit-product, vendor/xiaomi/sdm660-common/sdm660-common-vendor.mk)
+
+COMMON_PATH := device/xiaomi/sdm660-common
+
+# Inherit properties
+$(call inherit-product, $(COMMON_PATH)/properties.mk)
+
+# Screen density
+PRODUCT_AAPT_CONFIG := normal
+PRODUCT_AAPT_PREF_CONFIG := xxhdpi
+
+# Boot animation
+TARGET_SCREEN_HEIGHT := 2160
+TARGET_SCREEN_WIDTH := 1080
+
+# Overlays
+DEVICE_PACKAGE_OVERLAYS += \
+ $(COMMON_PATH)/overlay \
+ $(COMMON_PATH)/overlay-lineage
+
+# Permissions
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/privapp-permissions-qti.xml:system/etc/permissions/privapp-permissions-qti.xml
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
+ frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+ frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
+ frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
+ frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
+ frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
+ frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
+ frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \
+ frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
+ frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
+ frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
+ frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
+ frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
+ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
+ frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
+ frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
+ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
+ frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+ frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
+ frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
+ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
+ frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml \
+ frameworks/native/data/etc/android.software.webview.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.webview.xml \
+ frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_0_3.xml \
+ frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml
+
+# Audio
+PRODUCT_PACKAGES += \
+ android.hardware.audio@4.0-impl:32 \
+ android.hardware.audio@2.0-service \
+ android.hardware.audio.effect@4.0-impl:32 \
+ android.hardware.audio.effect@2.0-service \
+ android.hardware.soundtrigger@2.1-impl:32 \
+ audio.a2dp.default \
+ audio_amplifier.sdm660 \
+ audio.primary.sdm660 \
+ audio.r_submix.default \
+ audio.usb.default \
+ libaudio-resampler \
+ libqcompostprocbundle \
+ libqcomvisualizer \
+ libqcomvoiceprocessing \
+ libvolumelistener \
+ tinymix
+
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+ $(COMMON_PATH)/audio/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+ $(COMMON_PATH)/audio/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
+ $(COMMON_PATH)/audio/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml \
+ $(COMMON_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
+ $(COMMON_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
+ $(COMMON_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
+ $(COMMON_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+ $(COMMON_PATH)/audio/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt \
+ $(COMMON_PATH)/audio/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml
+
+PRODUCT_COPY_FILES += \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+ $(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
+
+# ANT+
+PRODUCT_PACKAGES += \
+ AntHalService \
+ antradio_app \
+ com.dsi.ant.antradio_library \
+ libantradio
+
+PRODUCT_COPY_FILES += \
+ external/ant-wireless/antradio-library/com.dsi.ant.antradio_library.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.dsi.ant.antradio_library.xml
+
+# Biometrics
+PRODUCT_PACKAGES += \
+ android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660
+
+PRODUCT_PACKAGES += \
+ org.ifaa.android.manager
+
+PRODUCT_BOOT_JARS += \
+ org.ifaa.android.manager
+
+# Camera
+PRODUCT_PACKAGES += \
+ Snap
+
+PRODUCT_PACKAGES += \
+ android.hardware.camera.provider@2.4-impl:32 \
+ android.hardware.camera.provider@2.4-service
+
+# Connectivity Engine support (CNE)
+PRODUCT_PACKAGES += \
+ cneapiclient \
+ com.quicinc.cne \
+ services-ext
+
+# Configstore
+PRODUCT_PACKAGES += \
+ android.hardware.configstore@1.0-service
+
+# Consumerir
+PRODUCT_PACKAGES += \
+ android.hardware.ir@1.0-impl \
+ android.hardware.ir@1.0-service
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
+
+# Display
+PRODUCT_PACKAGES += \
+ gralloc.sdm660 \
+ hwcomposer.sdm660 \
+ memtrack.sdm660 \
+ libdisplayconfig \
+ liboverlay \
+ libtinyxml \
+ libqdMetaData \
+ libqdMetaData.system
+
+PRODUCT_PACKAGES += \
+ android.frameworks.displayservice@1.0_32 \
+ android.hardware.graphics.allocator@2.0-impl:64 \
+ android.hardware.graphics.allocator@2.0-service \
+ android.hardware.graphics.mapper@2.0-impl \
+ android.hardware.graphics.composer@2.1-impl:64 \
+ android.hardware.graphics.composer@2.1-service \
+ android.hardware.memtrack@1.0-impl \
+ android.hardware.memtrack@1.0-service \
+ android.hardware.renderscript@1.0-impl \
+ android.frameworks.displayservice@1.0 \
+ vendor.display.config@1.1 \
+ vendor.display.config@1.1_vendor
+
+# Doze
+PRODUCT_PACKAGES += \
+ XiaomiDoze
+
+# DRM
+PRODUCT_PACKAGES += \
+ android.hardware.drm@1.0-impl \
+ android.hardware.drm@1.0-service \
+ android.hardware.drm@1.1-service.clearkey
+
+# FM
+PRODUCT_PACKAGES += \
+ FM2 \
+ libqcomfm_jni \
+ qcom.fmradio \
+ qcom.fmradio.xml
+
+PRODUCT_PACKAGES += \
+ android.hardware.broadcastradio@1.0-impl
+
+# GPS / Location
+PRODUCT_PACKAGES += \
+ android.hardware.gnss@1.0-impl-qti \
+ android.hardware.gnss@1.0-service-qti \
+ libgnss \
+ libgnsspps \
+ libsensorndkbridge
+
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/gps/flp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/flp.conf \
+ $(COMMON_PATH)/configs/gps/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf \
+ $(COMMON_PATH)/configs/gps/izat.conf:$(TARGET_COPY_OUT_VENDOR)/etc/izat.conf \
+ $(COMMON_PATH)/configs/gps/lowi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/lowi.conf \
+ $(COMMON_PATH)/configs/gps/sap.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sap.conf \
+ $(COMMON_PATH)/configs/gps/xtwifi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/xtwifi.conf
+
+# Healthd
+PRODUCT_PACKAGES += \
+ android.hardware.health@2.0-service
+
+# HIDL
+PRODUCT_PACKAGES += \
+ android.hidl.base@1.0
+
+# IDC
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/idc/uinput-fpc.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/uinput-fpc.idc \
+ $(COMMON_PATH)/idc/uinput-goodix.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/uinput-goodix.idc
+
+# Init
+PRODUCT_PACKAGES += \
+ init.class_main.sh \
+ init.goodix.sh \
+ init.msm.usb.configfs.rc \
+ init.qcom.post_boot.sh \
+ init.qcom.sensors.sh \
+ init.qcom.rc \
+ init.qcom.sh \
+ init.qcom.usb.rc \
+ init.qcom.usb.sh \
+ init.qti.fm.sh \
+ init.target.rc \
+ ueventd.qcom.rc \
+ fstab.qcom
+
+# IPv6
+PRODUCT_PACKAGES += \
+ ebtables \
+ ethertypes \
+ libebtc
+
+# IRQ
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
+
+# IRSC
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config
+
+# Keylayout
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/keylayout/sdm660-snd-card_Button_Jack.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/sdm660-snd-card_Button_Jack.kl \
+ $(COMMON_PATH)/keylayout/uinput-fpc.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-fpc.kl \
+ $(COMMON_PATH)/keylayout/uinput-goodix.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-goodix.kl
+
+# Lights
+PRODUCT_PACKAGES += \
+ android.hardware.light@2.0-service.xiaomi_sdm660
+
+# LiveDisplay native
+PRODUCT_PACKAGES += \
+ vendor.lineage.livedisplay@2.0-service-sdm
+
+# Media
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+ $(COMMON_PATH)/configs/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
+ $(COMMON_PATH)/configs/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
+
+PRODUCT_COPY_FILES += \
+ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video_le.xml
+
+# Media Extensions
+PRODUCT_PACKAGES += \
+ libavmediaserviceextensions \
+ libmediametrics \
+ libregistermsext \
+ mediametrics
+
+# Netutils
+PRODUCT_PACKAGES += \
+ android.system.net.netd@1.0 \
+ libandroid_net \
+ netutils-wrapper-1.0
+
+# OMX
+PRODUCT_PACKAGES += \
+ libc2dcolorconvert \
+ libextmedia_jni \
+ libhypv_intercept \
+ libmm-omxcore \
+ libOmxCore \
+ libOmxAacEnc \
+ libOmxAmrEnc \
+ libOmxEvrcEnc \
+ libOmxQcelp13Enc \
+ libOmxVdec \
+ libOmxVenc \
+ libstagefrighthw
+
+# Power
+PRODUCT_PACKAGES += \
+ android.hardware.power@1.1-service-qti
+
+# Public Libraries
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
+
+# Low power Whitelist
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/configs/qti_whitelist.xml:system/etc/sysconfig/qti_whitelist.xml \
+ $(COMMON_PATH)/configs/whitelistedapps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/perf/whitelistedapps.xml \
+
+# QMI
+PRODUCT_PACKAGES += \
+ libjson
+
+# RCS
+PRODUCT_PACKAGES += \
+ rcs_service_aidl \
+ rcs_service_aidl.xml \
+ rcs_service_api \
+ rcs_service_api.xml
+
+# RenderScript HAL
+PRODUCT_PACKAGES += \
+ android.hardware.renderscript@1.0-impl
+
+# RIL
+PRODUCT_PACKAGES += \
+ android.hardware.radio@1.2 \
+ android.hardware.radio.config@1.0 \
+ android.hardware.secure_element@1.0 \
+ rild \
+ librmnetctl \
+ libxml2 \
+ libprotobuf-cpp-full
+
+PRODUCT_PACKAGES += \
+ ims-ext-common \
+ telephony-ext
+
+PRODUCT_BOOT_JARS += \
+ telephony-ext
+
+# Seccomp policy
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
+ $(COMMON_PATH)/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
+
+# Sensors
+PRODUCT_PACKAGES += \
+ android.hardware.sensors@1.0-impl:64 \
+ android.hardware.sensors@1.0-service
+
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf \
+ $(COMMON_PATH)/sensors/sensor_def_qcomdev.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/sensor_def_qcomdev.conf
+
+# Tetheroffload
+PRODUCT_PACKAGES += \
+ ipacm \
+ IPACM_cfg.xml \
+ libipanat \
+ liboffloadhal
+
+# TextClassifier smart selection model files
+PRODUCT_PACKAGES += \
+ textclassifier.bundle1
+
+# Thermal
+PRODUCT_PACKAGES += \
+ android.hardware.thermal@1.0-impl \
+ android.hardware.thermal@1.0-service \
+ thermal.sdm660
+
+# Trust
+PRODUCT_PACKAGES += \
+ vendor.lineage.trust@1.0-service
+
+# USB
+PRODUCT_PACKAGES += \
+ android.hardware.usb@1.0-service.basic
+
+# Vibrator
+PRODUCT_PACKAGES += \
+ android.hardware.vibrator@1.0-impl \
+ android.hardware.vibrator@1.0-service
+
+# VNDK-SP:
+PRODUCT_PACKAGES += \
+ vndk-sp
+
+# Wifi
+PRODUCT_PACKAGES += \
+ android.hardware.wifi@1.0-service \
+ hostapd \
+ libqsap_sdk \
+ libwifi-hal-qcom \
+ wcnss_service \
+ wpa_supplicant \
+ wpa_supplicant.conf
+
+PRODUCT_COPY_FILES += \
+ $(COMMON_PATH)/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
+ $(COMMON_PATH)/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
+ $(COMMON_PATH)/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini
diff --git a/seccomp/mediacodec-seccomp.policy b/seccomp/mediacodec-seccomp.policy
new file mode 100644
index 0000000..81d042b
--- /dev/null
+++ b/seccomp/mediacodec-seccomp.policy
@@ -0,0 +1,12 @@
+# device specific syscalls
+# extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
+pselect6: 1
+eventfd2: 1
+sendto: 1
+recvfrom: 1
+_llseek: 1
+sysinfo: 1
+getcwd: 1
+getdents64: 1
+inotify_init1: 1
+inotify_add_watch: 1
diff --git a/seccomp/mediaextractor-seccomp.policy b/seccomp/mediaextractor-seccomp.policy
new file mode 100644
index 0000000..0fcf604
--- /dev/null
+++ b/seccomp/mediaextractor-seccomp.policy
@@ -0,0 +1,5 @@
+# device specific syscalls.
+# extension of services/mediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
+readlinkat: 1
+pread64: 1
+mremap: 1
diff --git a/sensors/hals.conf b/sensors/hals.conf
new file mode 100644
index 0000000..5f3a14b
--- /dev/null
+++ b/sensors/hals.conf
@@ -0,0 +1 @@
+sensors.ssc.so
diff --git a/sensors/sensor_def_qcomdev.conf b/sensors/sensor_def_qcomdev.conf
new file mode 100644
index 0000000..9b7306a
--- /dev/null
+++ b/sensors/sensor_def_qcomdev.conf
@@ -0,0 +1,555 @@
+#
+# File: sensor_def_qcomdev.conf
+#
+# Tihs file contains default sensor registry values for Qualcomm development
+# test platforms.
+#
+# Copyright (c) 2013-2017 Qualcomm Technologies, Inc.
+# All Rights Reserved.
+# Confidential and Proprietary - Qualcomm Technologies, Inc.
+
+
+# File format:
+#
+# Lines starting with "#" are comments and ignored.
+#
+# File metadata uses this format:
+# :key value1 value2
+#
+# The following keys are defined:
+# - "version" : value1 is non-zero positive version number of the file. This
+# number will be stored in the sensors registry. It should be equal to the
+# largest version of any item. It will be saved in the sensors registry for
+# later use when initializing values. See the item format below.
+# This value should only be specified once in the file.
+#
+# - "hardware" : The value1 will be compared to the "Hardware" string from
+# the property of ro.board.platform.
+# Items will only be used as default values in the registry if the hardware
+# string value is a substring of the ro.board.platform string.
+# This metadata key can be used more than once, so that one file can support
+# more than one type of hardware.
+# The value may be NULL, indicating common item values for all hardware.
+# Common conf entries for multiple hardware can be mentioned as below.
+# configuration below this string is common for 8952,8956 and 8974
+# :hardware 8952 8956 8974
+# hardware list gets overwritten with the new one every time when "hardware"
+# tag appears while parsing conf file.
+#
+# - "platform" : Similar to the "hardware" key, but this string will need to
+# match the text of either /sys/devices/soc0/hw_platform or
+# /sys/devices/soc0/platform_subtype.
+# Common conf entries for multiple platform can be mentioned as below.
+# configuration below this string is common for MTP and QRD
+# :platfrom MTP QRD
+# platform list gets overwritten with the new one every time when "platfrom"
+# tag appears while parsing conf file.
+#
+#
+# - "soc_id" : Similar to the "hardware" key, but this string will need to
+# match the text of /sys/devices/soc0/soc_id.
+# Common conf entries for multiple soc_id can be mentioned as below.
+# configuration below this string is common for soc_id 264 and 278
+# :soc_id 264 278
+# soc_id list gets overwritten with the new one every time when "soc_id"
+# tag appears while parsing conf file.
+#
+# - "subtype" : Similar to the "hardware" key, but this string will need to
+# match the text of /sys/devices/soc0/platform_subtype.
+# Common conf entries for multiple subtype can be mentioned as below.
+# configuration below this string is common for subtype X and Y
+# :subtype X Y
+# subtype list gets overwritten with the new one every time when "subtype"
+# tag appears while parsing conf file.
+#
+# - "sub_id" : Similar to the "hardware" key, but this string will need to
+# match the text of /sys/devices/soc0/platform_subtype_id.
+# Common conf entries for multiple sub_id can be mentioned as below.
+# configuration below this string is common for sub_id
+# :sub_id 0 10
+# sub_id list gets overwritten with the new one every time when "sub_id"
+# tag appears while parsing conf file.
+#
+# - "soc_rev" : Similar to the "hardware" key, but this string will need to
+# match the text of /sys/devices/soc0/revision.
+# Common conf entries for multiple soc_rev can be mentioned as below.
+# configuration below this string is common for soc_rev 1.0,2.0 and 3.0
+# :soc_rev 1.0 2.0 3.0
+# soc_rev list gets overwritten with the new one every time when "soc_rev"
+# tag appears while parsing conf file.
+#
+# - "plat_ver" : Similar to the "hardware" key, but this string will need to
+# match the text of /sys/devices/soc0/platform_version.
+# Common conf entries for multiple plat_ver can be mentioned as below.
+# configuration below this string is common for plat_ver 131072 and 1179648
+# :plat_ver 131072 1179648
+# plat_ver list gets overwritten with the new one every time when "plat_ver"
+# tag appears while parsing conf file.
+#
+# - "property" : value1 is the Android system property key, and value2 is
+# the desired property value. If the system property value matches the
+# desired property value, then the following items will be applied.
+# This metadata key can be used more than once, in which case the new
+# property value overrides the old.
+# value1 and 2 may be NULL, indicating common item values for all properties.
+#
+# Registry items are in lines with the following format:
+# <itemID> <value> <version>
+# Where:
+# itemID is the numeric item ID defined in sns_reg_api_v02.h
+#
+# "value" is the numeric value of the item.
+#
+# "version" is a non-zero version of the item value.
+# The version field will be compared against the previous saved
+# value in the sensors registry. If this value is greater than the
+# saved value, the default will be applied. Otherwise, the default
+# will be skipped.
+#
+# Registry item values will only be applied if the hardware, platform, and
+# property values match for the current hardware configuration.
+#
+# The numeric fields are parsed with the strtoull function, base 0.
+#
+:version 0x00010002
+
+#######################################################################
+### sdm660 Chipsets
+#######################################################################
+:hardware sdm660
+:platform
+:property
+:soc_id
+:soc_rev
+:subtype
+# Orientation of sensors
+# accel x/y/z
+700 1 0x00010002 #accel-x-axis
+701 -2 0x00010002 #accel-y-axis
+702 -3 0x00010002 #accel-z-axis
+# accel x/y/z
+720 2 0x00010002 #accel-x-axis
+721 -1 0x00010002 #accel-y-axis
+722 -3 0x00010002 #accel-z-axis
+# gyro x/y/z
+800 1 0x00010002 #gyro-x-axis
+801 -2 0x00010002 #gyro-y-axis
+802 -3 0x00010002 #gyro-z-axis
+# mag x/y/z
+900 -2 0x00010002 #max-x-axis
+901 -1 0x00010002 #mag-y-axis
+902 -3 0x00010002 #mag-z-axis
+# SSI SMGR Version
+1900 1 0x00010002 #Maj Ver
+1901 2 0x00010002 #Min Ver
+
+# SAM config
+#
+203 65536 0x10001 # AMD
+225 983040 0x10001 # RMD
+501 0x40 0x10001 # Gyro_cal_num_samp
+504 65536 0x10001 # Gyro Cal
+1703 65536 0x10001 # Ped
+2800 983040 0x10001 # basic ges
+2900 983040 0x10001 # Facing
+3400 65536 0x10001 # CMC
+609 983040 0x10001 # FMV
+1005 983040 0x10001 # Grav
+1103 983040 0x10001 # orientation
+3000 983040 0x10001 # gyro quat
+3100 983040 0x10001 # rot vec
+3500 983040 0x10001 # game rv
+4112 65536 0x10001 # SMD
+4103 5 0x10001 # SMD_ACC_WIN_TIME
+
+#AMD parameters
+200 0x000a0000 0x00010002 #AMD_ACC_SAMP_RATE_HZ_Q16
+201 0x00000cd2 0x00010002 #AMD_INT_cfg_prm1
+202 0x00008000 0x00010002 #AMD_INT_cfg_prm2
+
+#RMD parameters
+220 0x001e0000 0x00010002 #RMD_ACC_SAMP_RATE_HZ_Q16
+221 0x0001b333 0x00010002 #RMD_INT_cfg_prm1
+222 0x00003333 0x00010002 #RMD_INT_cfg_prm2
+223 0x00001657 0x00010002 #RMD_INT_cfg_prm3
+224 0x00003333 0x00010002 #RMD_INT_cfg_prm4
+
+# SSI ACC SENSOR
+2000 2 0x00010002 #auto detect
+2001 3 0x00010002 #no. devices
+
+# SSI SMGR Cfg 0: ICM206xx [INVN ACCEL]
+2002 0xc14075963795c661 0x00010002 #UUID
+2003 0x0b25b8431bfd46bc 0x00010002 #UUID
+2004 100000 0x00010002 #off_to_idle
+2005 20000 0x00010002 #idle_to_ready
+2006 68 0x00010002 #gpio1 [0xFFFF:Polling; 42(0x2A):Acc Interrupt Pin]
+2007 1000 0x00010002 #reg_group_id
+2008 0 0x00010002 #cal_grp_id
+2009 3 0x00010002 #i2c_bus
+2010 0x68 0x00010002 #i2c_address
+2011 2 0x00010002 #sens_default
+2012 0xD0 0x00010002 #flags [0:Polling; 0x80:DRI]
+2068 0x83 0x00010002 #vdd [ LDO3B: 3V ]
+2069 0x8E 0x00010002 #vddio [ LDO14A: 1.8V]
+
+
+# SSI SMGR Cfg 1: BMI160 ACCEL
+2013 0xd646cb83ec0cd5a5 0x00010002 #UUID
+2014 0x0f4d0fd654c7eab5 0x00010002 #UUID
+2015 30000 0x00010002 #off_to_idle
+2016 0 0x00010002 #idle_to_ready
+2017 68 0x00010002 #gpio1
+2018 1000 0x00010002 #reg_group_id
+2019 0 0x00010002 #cal_grp_id
+2020 3 0x00010002 #i2c_bus
+2021 0x68 0x00010002 #i2c address
+2022 4 0x00010002 #sens_defatult
+2023 0xD0 0x00010002 #flag
+2070 0x83 0x00010002 #vdd [ LDO3B: 3V ]
+2071 0x8E 0x00010002 #vddio [ LDO14A: 1.8V]
+
+# SSI SMGR Cfg 1: lsm6dsm ACCEL
+2024 0xbe48af52e826fd3c 0x00010002 #UUID
+2025 0x68534cfc401dc2ac 0x00010002 #UUID
+2026 100000 0x00010002 #off_to_idle
+2027 250000 0x00010002 #idle_to_ready
+2028 68 0x00010002 #gpio1
+2029 1001 0x00010002 #reg_group_id
+2030 0 0x00010002 #cal_grp_id
+2031 3 0x00010002 #i2c_bus
+2032 0x6a 0x00010002 #i2c address
+2033 4 0x00010002 #sens_defatult
+2034 0xD0 0x00010002 #flag
+2072 0x83 0x00010002 #vdd [ LDO3B: 3V ]
+2073 0x8E 0x00010002 #vddio [ LDO14A: 1.8V]
+
+
+# SSI G SENSOR
+2100 2 0x00010002 #auto detect
+2101 3 0x00010002 #no. devices
+
+
+
+# SSI SMGR Cfg 0: ICM206xx [INVN GYRO]
+2102 0xc14075963795c661 0x00010002 #UUID
+2103 0x0b25b8431bfd46bc 0x00010002 #UUID
+2104 100000 0x00010002 #off_to_idle
+2105 80000 0x00010002 #idle_to_ready
+2106 69 0x00010002 #gpio1 [0xFFFF:Polling; 42(0x2A):Gyro Interrupt Pin]
+2107 1010 0x00010002 #reg_group_id
+2108 10 0x00010002 #cal_grp_id
+2109 3 0x00010002 #i2c_bus
+2110 0x68 0x00010002 #i2c_address
+2111 3 0x00010002 #sens_default
+2112 0xD0 0x00010002 #flags [0:Polling; 0x80:DRI]
+2168 0x83 0x00010002 #vdd
+2169 0x8E 0x00010002 #vddio
+
+# SSI SMGR Cfg 1: BMI160 GYRO
+2113 0xd646cb83ec0cd5a5 0x00010002 #UUID
+2114 0x0f4d0fd654c7eab5 0x00010002 #UUID
+2115 30000 0x00010002 #off_to_idle
+2116 0 0x00010002 #idle_to_ready
+2117 69 0x00010002 #gpio1
+2118 1010 0x00010002 #reg_group_id
+2119 10 0x00010002 #cal_grp_id
+2120 3 0x00010002 #i2c_bus
+2121 0x68 0x00010002 #i2c address
+2122 4 0x00010002 #sens_defatult
+2123 0xD0 0x00010002 #flag
+2170 0x83 0x00010002 #vdd
+2171 0x8E 0x00010002 #vddio
+
+# SSI SMGR Cfg 1: lsm6dsm GYRO
+2124 0xbe48af52e826fd3c 0x00010002 #UUID
+2125 0x68534cfc401dc2ac 0x00010002 #UUID
+2126 100000 0x00010002 #off_to_idle
+2127 250000 0x00010002 #idle_to_ready
+2128 69 0x00010002 #gpio1
+2129 1010 0x00010002 #reg_group_id
+2130 10 0x00010002 #cal_grp_id
+2131 3 0x00010002 #i2c_bus
+2132 0x6a 0x00010002 #i2c address
+2133 4 0x00010002 #sens_defatult
+2134 0xD0 0x00010002 #flag
+2172 0x83 0x00010002 #vdd
+2173 0x8E 0x00010002 #vddio
+
+
+# SSI M SENSOR
+2200 2 0x00010002 #auto detect
+2201 1 0x00010002 #no. devices
+
+# SSI SMGR Cfg 0: AKM099xx_FIFO mag FIFO/DRI
+2202 0x564d2b94fe80aef6 0x00010002 #UUID
+2203 0x90611b98d561168f 0x00010002 #UUID
+2204 3000 0x00010002 #off_to_idle
+2205 10000 0x00010002 #idle_to_ready
+2206 0xFFFF 0x00010002 #gpio1
+2207 1020 0x00010002 #reg_group_id
+2208 0xFFFF 0x00010002 #cal_grp_id
+2209 3 0x00010002 #i2c_bus
+2210 0x0c 0x00010002 #i2c address
+2211 0 0x00010002 #sens_defatult
+2212 0 0x00010002 #flag
+2268 0x83 0x00010002 #vdd
+2269 0x8E 0x00010002 #vddio
+
+# SSI ALS/PS SENSOR
+2300 2 0x00010002 #auto detect
+2301 1 0x00010002 #no. devices
+
+
+
+# SSI SMGR Cfg 4: LTR578 DRI
+2303 0x014101d151c1e1b1 0x00010002 #UUID should same to ADSP
+2302 0xd141c181e101d1a1 0x00010002 #UUID
+2304 3000 0x00010002 #off_to_idle
+2305 10000 0x00010002 #idle_to_ready
+2306 0xFFFF 0x00010002 #gpio1
+2307 1040 0x00010002 #reg_group_id
+2308 0xFFFF 0x00010002 #cal_grp_id
+2309 3 0x00010002 #i2c_bus
+2310 0x53 0x00010002 #i2c_address
+2311 0 0x00010002 #sens_default
+2312 0x00 0x00010002 #flags
+2368 0x83 0x00010002 #vdd
+2369 0x8E 0x00010002 #vddio
+
+#pressure sensor
+2400 2 0x00010002 #min ver
+2401 1 0x00010002 #uuid number
+
+# SSI SMGR Cfg 3: BMP285 pressure POLL
+2403 0x32c31ec17f1c0abd 0x00010002 #UUID
+2402 0x5c473990a806b072 0x00010002 #UUID
+2404 5000 0x00010002 #off_to_idle
+2405 50000 0x00010002 #idle_to_ready
+2406 0xFFFF 0x00010002 #gpio1
+2407 0xFFFF 0x00010002 #reg_group_id
+2408 0xFFFF 0x00010002 #cal_grp_id
+2409 3 0x00010002 #i2c_bus
+2410 0x76 0x00010002 #i2c_address
+2411 0 0x00010002 #sens_default
+2412 0 0x00010002 #flags
+2468 0x8E 0x00010002 #vdd
+2469 0x8E 0x00010002 #vddio
+
+# SSI SMGR Version
+3600 1 0x00010002 #Maj Ver
+3601 2 0x00010002 #Min Ver
+
+#
+# SSI GPIO configuration
+#-----------------------------
+2700 1 0x00010002 #maj ver
+2701 0 0x00010002 #min ver
+2706 0xFFFF 0x00010002 #RESET pin
+
+# Mag Cal config
+#-----------------------------
+3801 1 0x00010002
+3804 0x000a0000 0x10001 #Sample Rate
+
+#
+# IOD AUTOCAL configuration
+#-----------------------------
+6000 1 0x00010002 #version
+6001 1 0x00010002 #converge staus
+6002 0x3F86CBFB 0x00010002 #coefficient
+
+#
+# SSC GPIO CFG (Unused)
+#-----------------------------
+#
+6300 1 0x00010002 # version
+6301 0x0104 0x00010002 # gpio num
+6302 2 0x00010002 # active func sel
+6303 1 0x00010002 # active dir
+6304 0 0x00010002 # active pull
+6305 3 0x00010002 # active drive
+6306 2 0x00010002 # inactive func sel
+6307 0 0x00010002 # inactive dir
+6308 2 0x00010002 # inactive pull
+6309 3 0x00010002 # inactive drive
+
+6310 1 0x00010002 # version
+6311 0x0105 0x00010002 # gpio num
+6312 2 0x00010002 # active func sel
+6313 1 0x00010002 # active dir
+6314 0 0x00010002 # active pull
+6315 3 0x00010002 # active drive
+6316 2 0x00010002 # inactive func sel
+6317 0 0x00010002 # inactive dir
+6318 2 0x00010002 # inactive pull
+6319 3 0x00010002 # inactive drive
+
+6320 1 0x00010002 # version
+6321 0x0106 0x00010002 # gpio num
+6322 2 0x00010002 # active func sel
+6323 1 0x00010002 # active dir
+6324 0 0x00010002 # active pull
+6325 3 0x00010002 # active drive
+6326 2 0x00010002 # inactive func sel
+6327 0 0x00010002 # inactive dir
+6328 2 0x00010002 # inactive pull
+6329 3 0x00010002 # inactive drive
+
+6330 1 0x00010002 # version
+6331 0x0107 0x00010002 # gpio num
+6332 2 0x00010002 # active func sel
+6333 0 0x00010002 # active dir
+6334 0 0x00010002 # active pull
+6335 3 0x00010002 # active drive
+6336 2 0x00010002 # inactive func sel
+6337 0 0x00010002 # inactive dir
+6338 2 0x00010002 # inactive pull
+6339 3 0x00010002 # inactive drive
+
+6340 1 0x00010002 # version
+6341 0x010C 0x00010002 # gpio num
+6342 1 0x00010002 # active func sel
+6343 1 0x00010002 # active dir
+6344 0 0x00010002 # active pull
+6345 3 0x00010002 # active drive
+6346 1 0x00010002 # inactive func sel
+6347 0 0x00010002 # inactive dir
+6348 2 0x00010002 # inactive pull
+6349 3 0x00010002 # inactive drive
+
+6350 1 0x00010002 # version
+6351 0x010D 0x00010002 # gpio num
+6352 1 0x00010002 # active func sel
+6353 0 0x00010002 # active dir
+6354 0 0x00010002 # active pull
+6355 3 0x00010002 # active drive
+6356 1 0x00010002 # inactive func sel
+6357 0 0x00010002 # inactive dir
+6358 2 0x00010002 # inactive pull
+6359 3 0x00010002 # inactive drive
+
+6360 1 0x00010002 # version
+6361 0x010E 0x00010002 # gpio num
+6362 1 0x00010002 # active func sel
+6363 1 0x00010002 # active dir
+6364 0 0x00010002 # active pull
+6365 3 0x00010002 # active drive
+6366 1 0x00010002 # inactive func sel
+6367 0 0x00010002 # inactive dir
+6368 2 0x00010002 # inactive pull
+6369 3 0x00010002 # inactive drive
+
+6490 1 0x00010002 # version
+6491 0x010F 0x00010002 # gpio num
+6492 1 0x00010002 # active func sel
+6493 0 0x00010002 # active dir
+6494 0 0x00010002 # active pull
+6495 3 0x00010002 # active drive
+6496 1 0x00010002 # inactive func sel
+6497 0 0x00010002 # inactive dir
+6498 2 0x00010002 # inactive pull
+6499 3 0x00010002 # inactive drive
+
+6370 1 0x00010002 # version
+6371 0x0110 0x00010002 # gpio num
+6372 1 0x00010002 # active func sel
+6373 1 0x00010002 # active dir
+6374 0 0x00010002 # active pull
+6375 3 0x00010002 # active drive
+6376 1 0x00010002 # inactive func sel
+6377 0 0x00010002 # inactive dir
+6378 2 0x00010002 # inactive pull
+6379 3 0x00010002 # inactive drive
+
+6380 1 0x00010002 # version
+6381 0x0111 0x00010002 # gpio num
+6382 1 0x00010002 # active func sel
+6383 1 0x00010002 # active dir
+6384 0 0x00010002 # active pull
+6385 3 0x00010002 # active drive
+6386 1 0x00010002 # inactive func sel
+6387 0 0x00010002 # inactive dir
+6388 2 0x00010002 # inactive pull
+6389 3 0x00010002 # inactive drive
+
+#
+# SSC GPIO CFG (Used)
+#-----------------------------
+6420 1 0x00010002 # version
+6421 0x0100 0x00010002 # gpio num
+6422 1 0x00010002 # active func sel
+6423 1 0x00010002 # active dir
+6424 0 0x00010002 # active pull
+6425 0 0x00010002 # active drive
+6426 1 0x00010002 # inactive func sel
+6427 0 0x00010002 # inactive dir
+6428 2 0x00010002 # inactive pull
+6429 0 0x00010002 # inactive drive
+
+6430 1 0x00010002 # version
+6431 0x0102 0x00010002 # gpio num
+6432 1 0x00010002 # active func sel
+6433 1 0x00010002 # active dir
+6434 0 0x00010002 # active pull
+6435 0 0x00010002 # active drive
+6436 1 0x00010002 # inactive func sel
+6437 0 0x00010002 # inactive dir
+6438 2 0x00010002 # inactive pull
+6439 0 0x00010002 # inactive drive
+
+6440 1 0x00010002 # version
+6441 0x0103 0x00010002 # gpio num
+6442 1 0x00010002 # active func sel
+6443 1 0x00010002 # active dir
+6444 0 0x00010002 # active pull
+6445 0 0x00010002 # active drive
+6446 1 0x00010002 # inactive func sel
+6447 0 0x00010002 # inactive dir
+6448 2 0x00010002 # inactive pull
+6449 0 0x00010002 # inactive drive
+
+6450 1 0x00010002 # version
+6451 0x0108 0x00010002 # gpio num
+6452 1 0x00010002 # active func sel
+6453 1 0x00010002 # active dir
+6454 0 0x00010002 # active pull
+6455 3 0x00010002 # active drive
+6456 1 0x00010002 # inactive func sel
+6457 0 0x00010002 # inactive dir
+6458 2 0x00010002 # inactive pull
+6459 3 0x00010002 # inactive drive
+
+6460 1 0x00010002 # version
+6461 0x0109 0x00010002 # gpio num
+6462 1 0x00010002 # active func sel
+6463 1 0x00010002 # active dir
+6464 0 0x00010002 # active pull
+6465 3 0x00010002 # active drive
+6466 1 0x00010002 # inactive func sel
+6467 0 0x00010002 # inactive dir
+6468 2 0x00010002 # inactive pull
+6469 3 0x00010002 # inactive drive
+
+6470 1 0x00010002 # version
+6471 0x010A 0x00010002 # gpio num
+6472 1 0x00010002 # active func sel
+6473 1 0x00010002 # active dir
+6474 0 0x00010002 # active pull
+6475 3 0x00010002 # active drive
+6476 1 0x00010002 # inactive func sel
+6477 0 0x00010002 # inactive dir
+6478 2 0x00010002 # inactive pull
+6479 3 0x00010002 # inactive drive
+
+6480 1 0x00010002 # version
+6481 0x010B 0x00010002 # gpio num
+6482 1 0x00010002 # active func sel
+6483 0 0x00010002 # active dir
+6484 0 0x00010002 # active pull
+6485 3 0x00010002 # active drive
+6486 1 0x00010002 # inactive func sel
+6487 0 0x00010002 # inactive dir
+6488 2 0x00010002 # inactive pull
+6489 3 0x00010002 # inactive drive
+
diff --git a/sepolicy/vendor/app.te b/sepolicy/vendor/app.te
new file mode 100644
index 0000000..c61957b
--- /dev/null
+++ b/sepolicy/vendor/app.te
@@ -0,0 +1,6 @@
+# Allow appdomain to get vendor_camera_prop
+get_prop(appdomain, vendor_camera_prop)
+allow { appdomain -isolated_app } hal_mlipay_hwservice:hwservice_manager find;
+binder_call({ appdomain -isolated_app }, hal_mlipay_default)
+get_prop({ appdomain -isolated_app }, mlipay_prop)
+get_prop({ appdomain -isolated_app }, hal_fingerprint_prop)
diff --git a/sepolicy/vendor/atfwd.te b/sepolicy/vendor/atfwd.te
new file mode 100644
index 0000000..a60277a
--- /dev/null
+++ b/sepolicy/vendor/atfwd.te
@@ -0,0 +1 @@
+allow atfwd sysfs:file read;
diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te
new file mode 100644
index 0000000..b84e726
--- /dev/null
+++ b/sepolicy/vendor/device.te
@@ -0,0 +1,2 @@
+type fingerprint_device, dev_type;
+type spidev_device, dev_type;
diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te
new file mode 100644
index 0000000..2ca38b9
--- /dev/null
+++ b/sepolicy/vendor/file.te
@@ -0,0 +1,8 @@
+type debugfs_wlan, debugfs_type, fs_type;
+type ir_dev_file, file_type;
+type proc_dt2w, fs_type, proc_type;
+type fingerprint_data_file, file_type, data_file_type, core_data_file_type;
+type fingerprint_sysfs, fs_type, sysfs_type;
+type vendor_keylayout_file, file_type, vendor_file_type;
+type sysfs_light, fs_type, sysfs_type;
+type thermal_data_file, file_type, data_file_type;
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
new file mode 100644
index 0000000..81d9822
--- /dev/null
+++ b/sepolicy/vendor/file_contexts
@@ -0,0 +1,45 @@
+# Biometric
+/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sdm660 u:object_r:hal_fingerprint_sdm660_exec:s0
+
+# Fpc Fingerprint
+/sys/devices/soc/soc:fpc1020(/.*)? u:object_r:fingerprint_sysfs:s0
+
+# For Goodix fingerprint
+/dev/goodix_fp* u:object_r:fingerprint_device:s0
+
+# Goodix Fingerprint data
+/data/gf_data/frr_database.db u:object_r:fingerprint_data_file:s0
+/data/misc/gf_data(/.*)? u:object_r:fingerprint_data_file:s0
+/data/misc/goodix(/.*)? u:object_r:fingerprint_data_file:s0
+/persist/data/gf* u:object_r:fingerprint_data_file:s0
+
+# Fpc Fingerprint data
+/persist/fpc(/.*)? u:object_r:fingerprint_data_file:s0
+
+# HVDCP
+/sys/devices(/platform)?/soc/[a-z0-9]+\.i2c/i2c-[0-9]+/[0-9]+-[a-z0-9]+/[a-z0-9]+\.i2c:qcom,[a-z0-9]+@[a-z0-9]:qcom,smb[a-z0-9]+-parallel-slave@[0-9]+/power_supply/parallel(/.*)? u:object_r:sysfs_usb_supply:s0
+
+# IR
+/dev/spidev7.1 u:object_r:spidev_device:s0
+
+# Keylayout
+/vendor/usr/idc(/.*)? u:object_r:vendor_keylayout_file:s0
+/vendor/usr/keylayout(/.*)? u:object_r:vendor_keylayout_file:s0
+
+# Light HAL
+/(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sdm660 u:object_r:hal_light_default_exec:s0
+
+# Mlipay
+/(vendor|system/vendor)/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0
+
+# Persist
+/persist/PRSensorData\.txt u:object_r:sensors_persist_file:s0
+
+# RTC
+/sys/devices/soc/800f000.qcom,spmi/spmi-0/spmi0-00/800f000.qcom,spmi:qcom,pm660@0:qcom,pm660_rtc/rtc/rtc0(/.*)? u:object_r:sysfs_rtc:s0
+
+# Shell Script
+/(vendor|system/vendor)/bin/init\.goodix\.sh u:object_r:init_fingerprint_exec:s0
+
+# Thermal
+/data/vendor/thermal(/.*)? u:object_r:thermal_data_file:s0
diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts
new file mode 100644
index 0000000..638c917
--- /dev/null
+++ b/sepolicy/vendor/genfs_contexts
@@ -0,0 +1,2 @@
+genfscon proc /nvt_wake_gesture u:object_r:proc_dt2w:s0
+genfscon debugfs /wlan0 u:object_r:debugfs_wlan:s0
diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te
new file mode 100644
index 0000000..128920f
--- /dev/null
+++ b/sepolicy/vendor/hal_audio_default.te
@@ -0,0 +1,2 @@
+allow hal_audio_default vendor_data_file:dir { create write add_name };
+allow hal_audio_default vendor_data_file:file { append create getattr open read };
diff --git a/sepolicy/vendor/hal_camera_default.te b/sepolicy/vendor/hal_camera_default.te
new file mode 100644
index 0000000..0f40bbd
--- /dev/null
+++ b/sepolicy/vendor/hal_camera_default.te
@@ -0,0 +1,6 @@
+binder_call(hal_camera_default, hal_configstore_default)
+binder_call(hal_camera_default, hal_graphics_allocator_default)
+
+allow hal_camera_default { hal_configstore_ISurfaceFlingerConfigs hal_graphics_allocator_hwservice }:hwservice_manager find;
+allow hal_camera_default sysfs:file { getattr open read };
+allow hal_camera_default sysfs_kgsl:file { getattr open read };
diff --git a/sepolicy/vendor/hal_cas_default.te b/sepolicy/vendor/hal_cas_default.te
new file mode 100644
index 0000000..18b00de
--- /dev/null
+++ b/sepolicy/vendor/hal_cas_default.te
@@ -0,0 +1 @@
+vndbinder_use(hal_cas_default)
diff --git a/sepolicy/vendor/hal_fingerprint_sdm660.te b/sepolicy/vendor/hal_fingerprint_sdm660.te
new file mode 100644
index 0000000..57cc91e
--- /dev/null
+++ b/sepolicy/vendor/hal_fingerprint_sdm660.te
@@ -0,0 +1,39 @@
+type hal_fingerprint_sdm660, domain, binder_in_vendor_violators;
+hal_server_domain(hal_fingerprint_sdm660, hal_fingerprint)
+
+type hal_fingerprint_sdm660_exec, exec_type, vendor_file_type, file_type;
+typeattribute hal_fingerprint_sdm660 data_between_core_and_vendor_violators;
+binder_use(hal_fingerprint_sdm660)
+init_daemon_domain(hal_fingerprint_sdm660)
+
+allow hal_fingerprint_sdm660 fingerprint_device:chr_file { read write open ioctl };
+allow hal_fingerprint_sdm660 { tee_device uhid_device }:chr_file { read write open ioctl };
+allow hal_fingerprint_sdm660 fingerprint_data_file:file rw_file_perms;
+allow hal_fingerprint_sdm660 fingerprintd_data_file:dir rw_dir_perms;
+allow hal_fingerprint_sdm660 fingerprintd_data_file:file create_file_perms;
+allow hal_fingerprint_sdm660 { fuse mnt_user_file storage_file }:dir search;
+allow hal_fingerprint_sdm660 { mnt_user_file storage_file }:lnk_file read;
+allow hal_fingerprint_sdm660 fingerprint_sysfs:dir r_dir_perms;
+allow hal_fingerprint_sdm660 fingerprint_sysfs:file rw_file_perms;
+
+allow hal_fingerprint_sdm660 hal_fingerprint_sdm660:netlink_socket { create bind write read };
+
+binder_call(hal_fingerprint_sdm660, vndservicemanager)
+binder_call(hal_fingerprint_sdm660, hal_perf_default)
+
+binder_use(hal_fingerprint_sdm660)
+
+r_dir_file(hal_fingerprint_sdm660, firmware_file)
+
+add_service(hal_fingerprint_sdm660, goodixvnd_service)
+add_hwservice(hal_fingerprint_sdm660, goodixhw_service)
+
+allow hal_fingerprint_sdm660 vndbinder_device:chr_file ioctl;
+
+get_prop(hal_fingerprint_sdm660, hal_fingerprint_prop)
+set_prop(hal_fingerprint_sdm660, hal_fingerprint_prop)
+
+vndbinder_use(hal_fingerprint_sdm660)
+
+dontaudit hal_fingerprint_sdm660 { media_rw_data_file sdcardfs}:dir search;
+dontaudit hal_fingerprint_sdm660 media_rw_data_file:dir { read open };
diff --git a/sepolicy/vendor/hal_gnss_qti.te b/sepolicy/vendor/hal_gnss_qti.te
new file mode 100644
index 0000000..711c8bb
--- /dev/null
+++ b/sepolicy/vendor/hal_gnss_qti.te
@@ -0,0 +1 @@
+allow hal_gnss_qti sysfs:file { read open };
diff --git a/sepolicy/vendor/hal_graphics_composer_default.te b/sepolicy/vendor/hal_graphics_composer_default.te
new file mode 100644
index 0000000..39e8fb4
--- /dev/null
+++ b/sepolicy/vendor/hal_graphics_composer_default.te
@@ -0,0 +1,2 @@
+allow hal_graphics_composer_default sysfs_graphics:file r_file_perms;
+allow hal_graphics_composer_default sysfs_graphics:lnk_file read;
diff --git a/sepolicy/vendor/hal_ir_default.te b/sepolicy/vendor/hal_ir_default.te
new file mode 100644
index 0000000..2f9f2b6
--- /dev/null
+++ b/sepolicy/vendor/hal_ir_default.te
@@ -0,0 +1 @@
+allow hal_ir_default spidev_device:chr_file rw_file_perms;
diff --git a/sepolicy/vendor/hal_light_default.te b/sepolicy/vendor/hal_light_default.te
new file mode 100644
index 0000000..e0592d7
--- /dev/null
+++ b/sepolicy/vendor/hal_light_default.te
@@ -0,0 +1 @@
+allow hal_light_default sysfs_light:file rw_file_perms;
diff --git a/sepolicy/vendor/hal_mlipay_default.te b/sepolicy/vendor/hal_mlipay_default.te
new file mode 100644
index 0000000..c6f721c
--- /dev/null
+++ b/sepolicy/vendor/hal_mlipay_default.te
@@ -0,0 +1,16 @@
+type hal_mlipay_default, domain;
+
+type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_mlipay_default)
+
+hwbinder_use(hal_mlipay_default)
+get_prop(hal_mlipay_default, hwservicemanager_prop)
+add_hwservice(hal_mlipay_default, hal_mlipay_hwservice)
+
+allow hal_mlipay_default tee_device:chr_file rw_file_perms;
+allow hal_mlipay_default ion_device:chr_file r_file_perms;
+
+r_dir_file(hal_mlipay_default, firmware_file)
+set_prop(hal_mlipay_default, mlipay_prop);
+
+get_prop(hal_mlipay_default, hal_fingerprint_prop);
diff --git a/sepolicy/vendor/hal_power_default.te b/sepolicy/vendor/hal_power_default.te
new file mode 100644
index 0000000..2df04b0
--- /dev/null
+++ b/sepolicy/vendor/hal_power_default.te
@@ -0,0 +1,2 @@
+allow hal_power_default proc_dt2w:file rw_file_perms;
+r_dir_file(hal_power_default, debugfs_wlan)
diff --git a/sepolicy/vendor/hal_sensors_default.te b/sepolicy/vendor/hal_sensors_default.te
new file mode 100644
index 0000000..28414f9
--- /dev/null
+++ b/sepolicy/vendor/hal_sensors_default.te
@@ -0,0 +1 @@
+allow hal_sensors_default sysfs:file { read open };
diff --git a/sepolicy/vendor/hvdcp.te b/sepolicy/vendor/hvdcp.te
new file mode 100644
index 0000000..49a6b78
--- /dev/null
+++ b/sepolicy/vendor/hvdcp.te
@@ -0,0 +1 @@
+allow hvdcp sysfs:file { open read };
diff --git a/sepolicy/vendor/hwservice.te b/sepolicy/vendor/hwservice.te
new file mode 100644
index 0000000..32adecb
--- /dev/null
+++ b/sepolicy/vendor/hwservice.te
@@ -0,0 +1,2 @@
+type goodixhw_service, hwservice_manager_type;
+type hal_mlipay_hwservice, hwservice_manager_type, untrusted_app_visible_hwservice;
diff --git a/sepolicy/vendor/hwservice_contexts b/sepolicy/vendor/hwservice_contexts
new file mode 100644
index 0000000..8ff7ae7
--- /dev/null
+++ b/sepolicy/vendor/hwservice_contexts
@@ -0,0 +1,2 @@
+vendor.goodix.hardware.fingerprint::IGoodixBiometricsFingerprint u:object_r:goodixhw_service:s0
+vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0
diff --git a/sepolicy/vendor/hwservicemanager.te b/sepolicy/vendor/hwservicemanager.te
new file mode 100644
index 0000000..3262afb
--- /dev/null
+++ b/sepolicy/vendor/hwservicemanager.te
@@ -0,0 +1,4 @@
+#============= hwservicemanager ==============
+allow hwservicemanager init:dir search;
+allow hwservicemanager init:file { open read };
+allow hwservicemanager init:process getattr;
diff --git a/sepolicy/vendor/init.te b/sepolicy/vendor/init.te
new file mode 100644
index 0000000..734baea
--- /dev/null
+++ b/sepolicy/vendor/init.te
@@ -0,0 +1,6 @@
+allow init hwservicemanager:binder { call transfer };
+allow init ipa_dev:chr_file open;
+allow init ion_device:chr_file ioctl;
+allow init property_socket:sock_file write;
+allow init sysfs_dm:file { open write };
+allow init tee_device:chr_file { write ioctl };
diff --git a/sepolicy/vendor/init_fingerprint.te b/sepolicy/vendor/init_fingerprint.te
new file mode 100644
index 0000000..b45cdd6
--- /dev/null
+++ b/sepolicy/vendor/init_fingerprint.te
@@ -0,0 +1,14 @@
+type init_fingerprint, domain;
+type init_fingerprint_exec, exec_type, vendor_file_type, file_type;
+
+# Allow for transition from init domain to init_fingerprint
+init_daemon_domain(init_fingerprint)
+
+# Shell script needs to execute /vendor/bin/sh
+allow init_fingerprint vendor_shell_exec:file rx_file_perms;
+allow init_fingerprint vendor_toolbox_exec:file rx_file_perms;
+
+# Allow to delete file
+allow init_fingerprint persist_file:dir search;
+allow init_fingerprint persist_drm_file:dir { read search open write remove_name };
+allow init_fingerprint persist_drm_file:file { getattr unlink }; \ No newline at end of file
diff --git a/sepolicy/vendor/kernel.te b/sepolicy/vendor/kernel.te
new file mode 100644
index 0000000..9ba3537
--- /dev/null
+++ b/sepolicy/vendor/kernel.te
@@ -0,0 +1 @@
+allow kernel debugfs_wlan:dir search;
diff --git a/sepolicy/vendor/location.te b/sepolicy/vendor/location.te
new file mode 100644
index 0000000..4333581
--- /dev/null
+++ b/sepolicy/vendor/location.te
@@ -0,0 +1 @@
+allow location sysfs:file { read open };
diff --git a/sepolicy/vendor/netmgrd.te b/sepolicy/vendor/netmgrd.te
new file mode 100644
index 0000000..47ce266
--- /dev/null
+++ b/sepolicy/vendor/netmgrd.te
@@ -0,0 +1 @@
+allow netmgrd property_socket:sock_file write;
diff --git a/sepolicy/vendor/priv_app.te b/sepolicy/vendor/priv_app.te
new file mode 100644
index 0000000..7ae851d
--- /dev/null
+++ b/sepolicy/vendor/priv_app.te
@@ -0,0 +1 @@
+allow priv_app sysfs_graphics:file { getattr open read }; \ No newline at end of file
diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te
new file mode 100644
index 0000000..313445c
--- /dev/null
+++ b/sepolicy/vendor/property.te
@@ -0,0 +1,3 @@
+type hal_fingerprint_prop, property_type;
+type mlipay_prop, property_type;
+type thermal_engine_prop, property_type;
diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts
new file mode 100644
index 0000000..037565e
--- /dev/null
+++ b/sepolicy/vendor/property_contexts
@@ -0,0 +1,12 @@
+persist.camera. u:object_r:camera_prop:s0
+persist.vendor.camera. u:object_r:camera_prop:s0
+sys.fp.goodix u:object_r:hal_fingerprint_prop:s0
+sys.fp.vendor u:object_r:hal_fingerprint_prop:s0
+persist.sys.fp.info u:object_r:hal_fingerprint_prop:s0
+persist.vendor.sys.fp.vendor u:object_r:hal_fingerprint_prop:s0
+persist.vendor.sys.pay.fido u:object_r:mlipay_prop:s0
+persist.vendor.sys.pay.ifaa u:object_r:mlipay_prop:s0
+persist.vendor.sys.pay.soter u:object_r:mlipay_prop:s0
+persist.vendor.sys.provision.status u:object_r:mlipay_prop:s0
+persist.sys.thermal. u:object_r:thermal_engine_prop:s0
+sys.thermal. u:object_r:thermal_engine_prop:s0
diff --git a/sepolicy/vendor/qti_init_shell.te b/sepolicy/vendor/qti_init_shell.te
new file mode 100644
index 0000000..aa81398
--- /dev/null
+++ b/sepolicy/vendor/qti_init_shell.te
@@ -0,0 +1,4 @@
+allow qti_init_shell sysfs_cpu_boost:file write;
+allow qti_init_shell sysfs:file write;
+allow qti_init_shell vendor_radio_data_file:dir { getattr read search };
+allow qti_init_shell vendor_radio_data_file:file { getattr read setattr write };
diff --git a/sepolicy/vendor/rild.te b/sepolicy/vendor/rild.te
new file mode 100644
index 0000000..06625de
--- /dev/null
+++ b/sepolicy/vendor/rild.te
@@ -0,0 +1 @@
+allow rild vendor_file:file ioctl;
diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te
new file mode 100644
index 0000000..c7d0026
--- /dev/null
+++ b/sepolicy/vendor/system_app.te
@@ -0,0 +1,3 @@
+allow system_app vendor_default_prop:file { getattr open read };
+allow system_app wificond:binder call;
+add_service(system_app, goodixhw_service)
diff --git a/sepolicy/vendor/system_server.te b/sepolicy/vendor/system_server.te
new file mode 100644
index 0000000..c9135cf
--- /dev/null
+++ b/sepolicy/vendor/system_server.te
@@ -0,0 +1,4 @@
+allow system_server vendor_keylayout_file:dir search;
+allow system_server vendor_keylayout_file:file r_file_perms;
+allow system_server sysfs_vibrator:file rw_file_perms;
+allow system_server sysfs_rtc:file r_file_perms;
diff --git a/sepolicy/vendor/tee.te b/sepolicy/vendor/tee.te
new file mode 100644
index 0000000..0a124bc
--- /dev/null
+++ b/sepolicy/vendor/tee.te
@@ -0,0 +1,6 @@
+# TODO(b/36644492): Remove data_between_core_and_vendor_violators once
+# tee no longer directly accesses /data owned by the frameworks.
+typeattribute tee data_between_core_and_vendor_violators;
+allow tee system_data_file:dir r_dir_perms;
+allow tee fingerprintd_data_file:dir rw_dir_perms;
+allow tee fingerprintd_data_file:file create_file_perms;
diff --git a/sepolicy/vendor/thermal-engine.te b/sepolicy/vendor/thermal-engine.te
new file mode 100644
index 0000000..0e03308
--- /dev/null
+++ b/sepolicy/vendor/thermal-engine.te
@@ -0,0 +1,6 @@
+allow thermal-engine thermal_data_file:dir rw_dir_perms;
+allow thermal-engine thermal_data_file:file create_file_perms;
+allow thermal-engine self:capability { chown fowner };
+dontaudit thermal-engine self:capability dac_override;
+
+set_prop(thermal-engine, thermal_engine_prop);
diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te
new file mode 100644
index 0000000..9f602b1
--- /dev/null
+++ b/sepolicy/vendor/vendor_init.te
@@ -0,0 +1,13 @@
+typeattribute vendor_init data_between_core_and_vendor_violators;
+
+allow vendor_init {
+ system_data_file
+ tombstone_data_file
+}:dir { create search getattr open read setattr ioctl write add_name remove_name rmdir relabelfrom };
+
+set_prop(vendor_init, camera_prop)
+allow vendor_init rootfs:dir { add_name create setattr write };
+allow vendor_init persist_debug_prop:property_service set;
+allow vendor_init persist_dpm_prop:property_service set;
+allow vendor_init qcom_ims_prop:property_service set;
+allow vendor_init rootfs:lnk_file setattr;
diff --git a/sepolicy/vendor/vndservice.te b/sepolicy/vendor/vndservice.te
new file mode 100644
index 0000000..ebc594c
--- /dev/null
+++ b/sepolicy/vendor/vndservice.te
@@ -0,0 +1 @@
+type goodixvnd_service, vndservice_manager_type;
diff --git a/sepolicy/vendor/vndservice_contexts b/sepolicy/vendor/vndservice_contexts
new file mode 100644
index 0000000..92d3f21
--- /dev/null
+++ b/sepolicy/vendor/vndservice_contexts
@@ -0,0 +1 @@
+android.hardware.fingerprint.IGoodixFingerprintDaemon u:object_r:goodixvnd_service:s0
diff --git a/sepolicy/vendor/vndservicemanager.te b/sepolicy/vendor/vndservicemanager.te
new file mode 100644
index 0000000..8d04dea
--- /dev/null
+++ b/sepolicy/vendor/vndservicemanager.te
@@ -0,0 +1,3 @@
+allow vndservicemanager hal_fingerprint_default:dir { search read open };
+allow vndservicemanager hal_fingerprint_default:file { read open };
+allow vndservicemanager hal_fingerprint_default:process getattr;
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
new file mode 100755
index 0000000..a20658a
--- /dev/null
+++ b/setup-makefiles.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+DEVICE_COMMON=sdm660-common
+VENDOR=xiaomi
+
+INITIAL_COPYRIGHT_YEAR=2018
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
+
+LINEAGE_ROOT="$MY_DIR"/../../..
+
+HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
+if [ ! -f "$HELPER" ]; then
+ echo "Unable to find helper script at $HELPER"
+ exit 1
+fi
+. "$HELPER"
+
+# Initialize the common helper
+setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true
+
+# Copyright headers and guards
+write_headers "jasmine_sprout tulip wayne"
+
+write_makefiles "$MY_DIR"/proprietary-files.txt true
+
+# Finish
+write_footers
+
+if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then
+ # Reinitialize the helper for device
+ INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
+ setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false
+
+ # Copyright headers and guards
+ write_headers
+
+ # The standard device blobs
+ write_makefiles "$MY_DIR"/../$DEVICE/proprietary-files.txt true
+
+ # We are done!
+ write_footers
+fi
diff --git a/update-sha1sums.py b/update-sha1sums.py
new file mode 100755
index 0000000..200c2d8
--- /dev/null
+++ b/update-sha1sums.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2016 The CyanogenMod Project
+# Copyright (C) 2017-2018 The LineageOS 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.
+#
+
+from hashlib import sha1
+import sys
+
+device='sdm660-common'
+vendor='xiaomi'
+
+lines = [ line for line in open('proprietary-files.txt', 'r') ]
+vendorPath = '../../../vendor/' + vendor + '/' + device + '/proprietary'
+needSHA1 = False
+
+def cleanup():
+ for index, line in enumerate(lines):
+ # Remove '\n' character
+ line = line[:-1]
+
+ # Skip empty or commented lines
+ if len(line) == 0 or line[0] == '#':
+ continue
+
+ # Drop SHA1 hash, if existing
+ if '|' in line:
+ line = line.split('|')[0]
+ lines[index] = '%s\n' % (line)
+
+def update():
+ for index, line in enumerate(lines):
+ # Remove '\n' character
+ line = line[:-1]
+
+ # Skip empty lines
+ if len(line) == 0:
+ continue
+
+ # Check if we need to set SHA1 hash for the next files
+ if line[0] == '#':
+ needSHA1 = (' - from' in line)
+ continue
+
+ if needSHA1:
+ # Remove existing SHA1 hash
+ line = line.split('|')[0]
+ filePath = line.split(':')[1] if len(line.split(':')) == 2 else line
+
+ if filePath[0] == '-':
+ file = open('%s/%s' % (vendorPath, filePath[1:]), 'rb').read()
+ else:
+ file = open('%s/%s' % (vendorPath, filePath), 'rb').read()
+
+ hash = sha1(file).hexdigest()
+ lines[index] = '%s|%s\n' % (line, hash)
+
+if len(sys.argv) == 2 and sys.argv[1] == '-c':
+ cleanup()
+else:
+ update()
+
+with open('proprietary-files.txt', 'w') as file:
+ for line in lines:
+ file.write(line)
+
+ file.close()
diff --git a/vendor_framework_compatibility_matrix.xml b/vendor_framework_compatibility_matrix.xml
new file mode 100644
index 0000000..f0c5da8
--- /dev/null
+++ b/vendor_framework_compatibility_matrix.xml
@@ -0,0 +1,519 @@
+<!-- Copyright (c) 2018, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<compatibility-matrix version="1.0" type="framework">
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.perf</name>
+ <version>1.0</version>
+ <interface>
+ <name>IPerf</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.display.color</name>
+ <version>1.0-2</version>
+ <interface>
+ <name>IDisplayColor</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.display.postproc</name>
+ <version>1.0</version>
+ <interface>
+ <name>IDisplayPostproc</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.display.config</name>
+ <version>1.0-4</version>
+ <interface>
+ <name>IDisplayConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.factory</name>
+ <version>1.0</version>
+ <interface>
+ <name>IFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.qualcomm.qti.dpm.api</name>
+ <version>1.0</version>
+ <interface>
+ <name>IdpmQmi</name>
+ <instance>dpmQmiService</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.deprecated</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOemHook</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio</name>
+ <version>1.0-2</version>
+ <interface>
+ <name>IRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ <interface>
+ <name>ISap</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.qualcomm.qti.ant</name>
+ <version>1.0</version>
+ <interface>
+ <name>IAntHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.qualcomm.qti.bluetooth_audio</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBluetoothAudio</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.qualcomm.qti.imscmservice</name>
+ <version>1.0</version>
+ <version>2.0-1</version>
+ <interface>
+ <name>IImsCmService</name>
+ <instance>qti.ims.connectionmanagerservice</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.qualcomm.qti.uceservice</name>
+ <version>1.0</version>
+ <version>2.0</version>
+ <interface>
+ <name>IUceService</name>
+ <instance>com.qualcomm.qti.uceservice</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.qualcomm.qti.wifidisplayhal</name>
+ <version>1.0</version>
+ <interface>
+ <name>IHDCPSession</name>
+ <instance>wifidisplayhdcphal</instance>
+ </interface>
+ <interface>
+ <name>IDSManager</name>
+ <instance>wifidisplaydshal</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.quicinc.cne.server</name>
+ <version>1.0</version>
+ <version>2.0-2</version>
+ <interface>
+ <name>IServer</name>
+ <instance>cnd</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.quicinc.cne.api</name>
+ <version>1.0-1</version>
+ <interface>
+ <name>IApiService</name>
+ <instance>cnd</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.nxp.hardware.nfc</name>
+ <version>1.0</version>
+ <interface>
+ <name>INqNfc</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.esepowermanager</name>
+ <version>1.0</version>
+ <interface>
+ <name>IEsePowerManager</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.gnss</name>
+ <version>1.0-1</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.alarm</name>
+ <version>1.0</version>
+ <interface>
+ <name>IAlarm</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.data.latency</name>
+ <impl level="generic"></impl>
+ <version>1.0</version>
+ <interface>
+ <name>ILinkLatency</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.fm</name>
+ <version>1.0</version>
+ <interface>
+ <name>IFmHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.am</name>
+ <version>1.0</version>
+ <interface>
+ <name>IQcRilAudio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.ims</name>
+ <version>1.0-4</version>
+ <interface>
+ <name>IImsRadio</name>
+ <instance>imsradio0</instance>
+ <instance>imsradio1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.config</name>
+ <version>1.0</version>
+ <interface>
+ <name>IConfig</name>
+ <instance>radioconfig0</instance>
+ <instance>radioconfig1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.lpa</name>
+ <version>1.0</version>
+ <interface>
+ <name>IUimLpa</name>
+ <instance>UimLpa0</instance>
+ <instance>UimLpa1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.qcrilhook</name>
+ <version>1.0</version>
+ <interface>
+ <name>IQtiOemHook</name>
+ <instance>oemhook0</instance>
+ <instance>oemhook1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.qtiradio</name>
+ <version>1.0</version>
+ <version>2.0</version>
+ <interface>
+ <name>IQtiRadio</name>
+ <instance>slot1</instance>
+ <instance>slot2</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.uim_remote_client</name>
+ <version>1.0</version>
+ <interface>
+ <name>IUimRemoteServiceClient</name>
+ <instance>uimRemoteClient0</instance>
+ <instance>uimRemoteClient1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.uim_remote_server</name>
+ <version>1.0</version>
+ <interface>
+ <name>IUimRemoteServiceServer</name>
+ <instance>uimRemoteServer0</instance>
+ <instance>uimRemoteServer1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.radio.uim</name>
+ <version>1.1</version>
+ <interface>
+ <name>IUim</name>
+ <instance>Uim0</instance>
+ <instance>Uim1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.sensorscalibrate</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISensorsCalibrate</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.soter</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISoter</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.tui_comm</name>
+ <version>1.0</version>
+ <interface>
+ <name>ITuiComm</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.vpp</name>
+ <version>1.0-1</version>
+ <interface>
+ <name>IHidlVppService</name>
+ <instance>vppService</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.wifi.supplicant</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISupplicant</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.wigig.netperftuner</name>
+ <version>1.0</version>
+ <interface>
+ <name>INetPerfTuner</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.wigig.supptunnel</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISuppTunnelProvider</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.imsrtpservice</name>
+ <version>1.0</version>
+ <interface>
+ <name>IRTPService</name>
+ <instance>imsrtpservice</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.voiceprint</name>
+ <version>1.0</version>
+ <interface>
+ <name>IQtiVoicePrintService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.gnss</name>
+ <version>1.0</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>gnss_vendor</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.gnss</name>
+ <version>1.0-2</version>
+ <version>2.0</version>
+ <interface>
+ <name>ILocHidlGnss</name>
+ <instance>gnss_vendor</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.wifi.supplicant</name>
+ <version>2.0</version>
+ <interface>
+ <name>ISupplicantVendor</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.hardware.wifi.hostapd</name>
+ <version>1.0</version>
+ <interface>
+ <name>IHostapdVendor</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.ims.callinfo</name>
+ <version>1.0</version>
+ <interface>
+ <name>IService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.qti.data.factory</name>
+ <version>1.0</version>
+ <interface>
+ <name>IFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.ir</name>
+ <version>1.0</version>
+ <interface>
+ <name>IConsumerIr</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.biometrics.fingerprint</name>
+ <impl level="generic"></impl>
+ <version>2.1</version>
+ <interface>
+ <name>IBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>com.fingerprints.extension</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IFingerprintAuthenticator</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintCalibration</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintEngineering</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintNavigation</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintRecalibration</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintSenseTouch</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IFingerprintSensorTest</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.goodix.hardware.fingerprint</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IGoodixBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.goodix.hardware.fingerprintextension</name>
+ <version>1.0</version>
+ <interface>
+ <name>IGoodixBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.lineage.livedisplay</name>
+ <version>2.0</version>
+ <interface>
+ <name>IDisplayModes</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IPictureAdjustment</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.lineage.power</name>
+ <version>1.0</version>
+ <interface>
+ <name>ILineagePower</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.lineage.trust</name>
+ <version>1.0</version>
+ <interface>
+ <name>IUsbRestrict</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>vendor.xiaomi.hardware.mlipay</name>
+ <transport>hwbinder</transport>
+ <version>1.1</version>
+ <interface>
+ <name>IMlipayService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</compatibility-matrix>
diff --git a/vndk/Android.mk b/vndk/Android.mk
new file mode 100644
index 0000000..81d67f8
--- /dev/null
+++ b/vndk/Android.mk
@@ -0,0 +1,49 @@
+ifeq ($(BOARD_VNDK_VERSION),)
+$(warning ************* BOARD VNDK is not enabled - compiling vndk-sp ***************************)
+LOCAL_PATH := $(call my-dir)
+
+include $(LOCAL_PATH)/vndk-sp-libs.mk
+
+vndk_sp_dir := vndk-sp-$(PLATFORM_VNDK_VERSION)
+
+define define-vndk-sp-lib
+include $$(CLEAR_VARS)
+LOCAL_MODULE := $1.vndk-sp-gen
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so
+LOCAL_STRIP_MODULE := false
+LOCAL_MULTILIB := first
+LOCAL_MODULE_TAGS := optional
+LOCAL_INSTALLED_MODULE_STEM := $1.so
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir)
+include $$(BUILD_PREBUILT)
+
+ifneq ($$(TARGET_2ND_ARCH),)
+ifneq ($$(TARGET_TRANSLATE_2ND_ARCH),true)
+include $$(CLEAR_VARS)
+LOCAL_MODULE := $1.vndk-sp-gen
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PREBUILT_MODULE_FILE := $$($$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so
+LOCAL_STRIP_MODULE := false
+LOCAL_MULTILIB := 32
+LOCAL_MODULE_TAGS := optional
+LOCAL_INSTALLED_MODULE_STEM := $1.so
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir)
+include $$(BUILD_PREBUILT)
+endif # TARGET_TRANSLATE_2ND_ARCH is not true
+endif # TARGET_2ND_ARCH is not empty
+endef
+
+$(foreach lib,$(VNDK_SP_LIBRARIES),\
+ $(eval $(call define-vndk-sp-lib,$(lib))))
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vndk-sp
+LOCAL_MODULE_TAGS := optional
+LOCAL_REQUIRED_MODULES := $(addsuffix .vndk-sp-gen,$(VNDK_SP_LIBRARIES))
+include $(BUILD_PHONY_PACKAGE)
+
+vndk_sp_dir :=
+endif
diff --git a/vndk/vndk-sp-libs.mk b/vndk/vndk-sp-libs.mk
new file mode 100644
index 0000000..11dc236
--- /dev/null
+++ b/vndk/vndk-sp-libs.mk
@@ -0,0 +1,33 @@
+VNDK_SP_LIBRARIES := \
+ android.hardware.graphics.allocator@2.0 \
+ android.hardware.graphics.mapper@2.0 \
+ android.hardware.graphics.mapper@2.1 \
+ android.hardware.graphics.common@1.0 \
+ android.hardware.graphics.common@1.1 \
+ android.hardware.renderscript@1.0 \
+ android.hidl.base@1.0 \
+ android.hidl.memory@1.0 \
+ libRSCpuRef \
+ libRSDriver \
+ libRS_internal \
+ libbacktrace \
+ libbase \
+ libbcinfo \
+ libblas \
+ libc++ \
+ libcompiler_rt \
+ libcutils \
+ libft2 \
+ libhardware \
+ libhidlbase \
+ libhidlmemory \
+ libhidltransport \
+ libhwbinder \
+ libion \
+ liblzma \
+ libpng \
+ libunwind \
+ libunwindstack \
+ libutils \
+ libutilscallstack \
+ libdexfile
diff --git a/wifi/WCNSS_qcom_cfg.ini b/wifi/WCNSS_qcom_cfg.ini
new file mode 100644
index 0000000..65803cc
--- /dev/null
+++ b/wifi/WCNSS_qcom_cfg.ini
@@ -0,0 +1,462 @@
+# This file allows user to override the factory
+# defaults for the WLAN Driver
+
+# Enable IMPS or not
+gEnableImps=1
+
+# Enable BMPS or not
+gEnableBmps=1
+
+# Phy Mode (auto, b, g, n, etc)
+# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
+# 1 = 11abg, 2 = 11b, 3 = 11g, 5 = 11g only, 6 = 11n only
+# 7 = 11b only 8 = 11ac only.
+gDot11Mode=0
+
+# Assigned MAC Addresses - This will be used until NV items are in place
+# Each byte of MAC address is represented in Hex format as XX
+Intf0MacAddress=000AF58989FF
+Intf1MacAddress=000AF58989FE
+Intf2MacAddress=000AF58989FD
+Intf3MacAddress=000AF58989FC
+
+# UAPSD service interval for VO,VI, BE, BK traffic
+InfraUapsdVoSrvIntv=0
+InfraUapsdViSrvIntv=0
+InfraUapsdBeSrvIntv=0
+InfraUapsdBkSrvIntv=0
+
+# Flag to allow STA send AddTspec even when ACM is Off
+gAddTSWhenACMIsOff=1
+
+# Flags to filter Mcast and Bcast RX packets.
+# Value 0: No filtering, 1: Filter all Multicast.
+# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
+McastBcastFilter=3
+
+#Flag to enable HostARPOffload feature or not
+hostArpOffload=1
+
+#Flag to enable HostNSOffload feature or not
+hostNSOffload=1
+
+# 802.11n Protection flag
+gEnableApProt=1
+
+#Enable OBSS protection
+gEnableApOBSSProt=1
+
+#Enable/Disable UAPSD for SoftAP
+gEnableApUapsd=1
+
+# Fixed Rate
+gFixedRate=0
+
+# Maximum Tx power
+# gTxPowerCap=30
+
+# Fragmentation Threshold
+# gFragmentationThreshold=2346
+
+# RTS threshold
+RTSThreshold=1048576
+
+# Intra-BSS forward
+gDisableIntraBssFwd=0
+
+# WMM Enable/Disable
+WmmIsEnabled=0
+
+# 802.11d support
+g11dSupportEnabled=0
+
+# 802.11h support
+g11hSupportEnabled=1
+
+# DFS Master Capability
+gEnableDFSMasterCap=1
+
+# ESE Support and fast transition
+EseEnabled=1
+
+ImplicitQosIsEnabled=0
+
+gNeighborScanTimerPeriod=200
+gNeighborLookupThreshold=76
+gNeighborScanChannelMinTime=20
+gNeighborScanChannelMaxTime=30
+gMaxNeighborReqTries=3
+
+# Legacy (non-ESE, non-802.11r) Fast Roaming Support
+# To enable, set FastRoamEnabled=1
+# To disable, set FastRoamEnabled=0
+FastRoamEnabled=1
+
+# Check if the AP to which we are roaming is better than current AP in
+# terms of RSSI. Checking is disabled if set to Zero.Otherwise it will
+# use this value as to how better the RSSI of the new/roamable AP should
+# be for roaming
+RoamRssiDiff=3
+
+# To enable, set gRoamIntraBand=1 (Roaming within band)
+# To disable, set gRoamIntraBand=0 (Roaming across band)
+gRoamIntraBand=0
+
+#Short Guard Interval Enable/disable
+gShortGI20Mhz=1
+gShortGI40Mhz=1
+
+#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
+gAPAutoShutOff=0
+
+#Auto Shutdown wlan : Value in Seconds. 0 means disabled. Max 1 day = 86400 sec
+gWlanAutoShutdown = 0
+
+# Not used.
+gApAutoChannelSelection=0
+
+#Preferred band (both or 2.4 only or 5 only)
+BandCapability=0
+
+#Channel Bonding
+gChannelBondingMode5GHz=1
+gChannelBondingMode24GHz=1
+
+#Say gGoKeepAlivePeriod(5 seconds) and gGoLinkMonitorPeriod(10 seconds).
+#For every 10 seconds DUT send Qos Null frame(i.e., Keep Alive frame if link
+#is idle for last 10 seconds.) For both active and power save clients.
+
+#Power save clients: DUT set TIM bit from 10th second onwards and till client
+#honors TIM bit. If doesn't honor for 5 seconds then DUT remove client.
+
+#Active clients: DUT send Qos Null frame for 10th seconds onwards if it is not
+#success still we try on 11th second if not tries on 12th and so on till 15th
+#second. Hence before disconnection DUT will send 5 NULL frames. Hence in any
+#case DUT will detect client got removed in (10+5) seconds.
+#i.e., (gGoKeepAlivePeriod + gGoLinkMonitorPeriod)..
+
+#gGoLinkMonitorPeriod/ gApLinkMonitorPeriod is period where link is idle and
+#it is period where we send NULL frame.
+#gApLinkMonitorPeriod = 10
+#gGoLinkMonitorPeriod = 10
+
+#gGoKeepAlivePeriod/gApKeepAlivePeriod is time to spend to check whether frame
+#are succeed to send or not. Hence total effective detection time is
+# (gGoLinkMonitorPeriod + gGoKeepAlivePeriod) /
+# (gApLinkMonitorPeriod + gApKeepAlivePeriod)
+gGoKeepAlivePeriod = 20
+gApKeepAlivePeriod = 20
+
+#If set will start with active scan after driver load, otherwise will start with
+#passive scan to find out the domain
+gEnableBypass11d=1
+
+#If set to 0, will not scan DFS channels
+gEnableDFSChnlScan=1
+
+# Enable DFS channel roam
+# 0: DISABLE, 1: ENABLED_NORMAL, 2: ENABLED_ACTIVE
+gAllowDFSChannelRoam=1
+
+gVhtChannelWidth=2
+
+#Data Inactivity Timeout when in powersave (in ms)
+gDataInactivityTimeout=200
+
+# Set txchainmask and rxchainmask
+# These parameters are used only if gEnable2x2 is 0
+# Valid values are 1,2
+# Set gSetTxChainmask1x1=1 or gSetRxChainmask1x1=1 to select chain0.
+# Set gSetTxChainmask1x1=2 or gSetRxChainmask1x1=2 to select chain1.
+gSetTxChainmask1x1=1
+gSetRxChainmask1x1=1
+
+# Scan Timing Parameters
+# gPassiveMaxChannelTime=110
+# gPassiveMinChannelTime=60
+gActiveMaxChannelTime=40
+gActiveMinChannelTime=20
+
+#If set to 0, MCC is not allowed.
+gEnableMCCMode=1
+
+# MCC to SCC Switch mode:
+# 0-Disable
+# 1-Enable
+# 2-Force SCC if same band, with SAP restart
+# 3-Force SCC if same band, without SAP restart by sending (E)CSA
+# 4-Force SCC if same band (or) use SAP mandatory channel for DBS,
+# without SAP restart by sending (E)CSA
+gWlanMccToSccSwitchMode = 3
+
+# 1=enable STBC; 0=disable STBC
+gEnableRXSTBC=1
+
+# 1=enable tx STBC; 0=disable
+gEnableTXSTBC=1
+
+# 1=enable rx LDPC; 0=disable
+gEnableRXLDPC=1
+
+#Enable/Disable Tx beamforming
+gTxBFEnable=1
+
+#Enable/Disable Tx beamformee in SAP mode
+gEnableTxBFeeSAP=1
+
+# Enable Tx beamforming in VHT20MHz
+# Valid values are 0,1. If commented out, the default value is 0.
+# 0=disable, 1=enable
+gEnableTxBFin20MHz=1
+
+#Enable/Disable SU Tx beamformer support.
+gEnableTxSUBeamformer=1
+
+#Enable thermal mitigation
+gThermalMitigationEnable=0
+
+gEnableFastRoamInConcurrency=1
+
+#Maxium Channel time in msec
+gMaxMediumTime = 6000
+
+# 802.11K support
+gRrmEnable=1
+
+#Enable Power Save offload
+gEnablePowerSaveOffload=1
+
+#Enable firmware uart print
+gEnablefwprint=0
+
+# Firmware log mode
+# Valid values are 0,1,2
+# 0 - Disable
+# 1 - WMI
+# 2 - DIAG
+gEnablefwlog=1
+
+# Maximum Receive AMPDU size (VHT only. Valid values:
+# 0->8k 1->16k 2->32k 3->64k 4->128k)
+gVhtAmpduLenExponent=7
+
+# Maximum MPDU length (VHT only. Valid values:
+# 0->3895 octets, 1->7991 octets, 2->11454 octets)
+gVhtMpduLen=2
+
+# Maximum number of wow filters required
+#gMaxWoWFilters=22
+
+# WOW Enable/Disable.
+# 0 - Disable both magic pattern match and pattern byte match.
+# 1 - Enable magic pattern match on all interfaces.
+# 2 - Enable pattern byte match on all interfaces.
+# 3 - Enable both magic pattern and pattern byte match on all interfaces.
+# Default value of gEnableWoW is 3.
+# gEnableWoW=0
+
+# Enable or Disable MCC Adaptive Scheduler at the FW
+# 1=Enable (default), 0=Disable
+gEnableMCCAdaptiveScheduler=1
+
+#Enable or Disable p2p device address administered
+isP2pDeviceAddrAdministrated=0
+
+# Set Thermal Power limit
+TxPower2g=10
+TxPower5g=10
+
+# Remove Overlap channel restriction
+gEnableOverLapCh=0
+
+#Enable VHT on 2.4Ghz
+gEnableVhtFor24GHzBand=1
+
+#Maximum number of offload peers supported
+# gMaxOffloadPeers=2
+
+# controlling the following offload patterns
+# through ini parameter. Default value is 1
+# to disable set it to zero. ssdp = 0
+# Setup multicast pattern for mDNS 224.0.0.251,
+# SSDP 239.255.255.250 and LLMNR 224.0.0.252
+ssdp=0
+
+#Enable Memory Deep Sleep
+gEnableMemDeepSleep=1
+
+# Regulatory Setting; 0=STRICT; 1=CUSTOM
+gRegulatoryChangeCountry=1
+
+# RA filtering rate limit param, the current value would not
+# help if the lifetime in RA is less than 3*60=3min. Then
+# we need to change it, though it is uncommon.
+# gRAFilterEnable=0
+gRArateLimitInterval=600
+
+# Maximum number of concurrent connections
+gMaxConcurrentActiveSessions=3
+
+# Disable/Enable GreenAP
+# 0 to disable, 1 to enable, default: 1
+gEnableGreenAp=0
+
+# Radar PRI multiplier
+gDFSradarMappingPriMultiplier=4
+
+gPNOScanSupport=1
+
+#Enable/Disable LPASS support
+# 0 to disable, 1 to enable
+gEnableLpassSupport=1
+
+# Whether userspace country code setting shld have priority
+gCountryCodePriority=1
+
+# Enable(1)/Disable(0) SIFS burst
+gEnableSifsBurst=1
+
+# Enable or Disable Multi-user MIMO
+# 1=Enable (default), 0=Disable
+gEnableMuBformee=1
+
+# Enable/Disable channel avoidance for SAP in SCC scenario
+# 0 - disable
+# 1 - enable
+gSapSccChanAvoidance=0
+
+# Inactivity time (in ms) to end TX Service Period while in IBSS power save mode
+gIbssTxSpEndInactivityTime=10
+
+# Enable support for TDLS
+# 0 - disable
+# 1 - enable
+gEnableTDLSSupport=1
+
+# Enable support for Implicit Trigger of TDLS. That is, wlan driver shall
+# initiate TDLS Discovery towards a peer whenever setup criteria (throughput
+# and RSSI) is met and then will initiate teardown when teardown criteria
+# (idle packet count and RSSI) is met.
+# 0 - disable
+# 1 - enable
+gEnableTDLSImplicitTrigger=1
+
+# Enable TDLS External Control. That is, user space application has to
+# first configure a peer MAC in wlan driver towards which TDLS is desired.
+# Device will establish TDLS only towards those configured peers whenever
+# TDLS criteria (throughput and RSSI threshold) is met and teardown TDLS
+# when teardown criteria (idle packet count and RSSI) is met. However,
+# device will accept TDLS connection if it is initiated from any other peer,
+# even if that peer is not configured.
+# 0 - disable
+# 1 - enable
+# For TDLS External Control, Implicit Trigger must also be enabled.
+gTDLSExternalControl=1
+
+# Enable support for TDLS off-channel operation
+# 0 - disable
+# 1 - enable
+# TDLS off-channel operation will be invoked when there is only one
+# TDLS connection.
+gEnableTDLSOffChannel=1
+
+# Enable or Disable Random MAC (Spoofing)
+# 1=Enable, 0=Disable (default)
+gEnableMacAddrSpoof=1
+
+################ Datapath feature set Begin ################
+# Bus bandwidth threshold values in terms of number of packets
+gBusBandwidthHighThreshold=2000
+gBusBandwidthMediumThreshold=500
+gBusBandwidthLowThreshold=150
+
+# Bus bandwidth compute timeout value in ms
+gBusBandwidthComputeInterval=100
+
+# VHT Tx/Rx MCS values
+# Valid values are 0,1,2. If commented out, the default value is 0.
+# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
+gVhtRxMCS=2
+gVhtTxMCS=2
+
+# VHT Tx/Rx MCS values for 2x2
+# Valid values are 0,1,2. If commented out, the default value is 0.
+# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
+gEnable2x2=1
+gVhtRxMCS2x2=2
+gVhtTxMCS2x2=2
+
+#IPA config is a bit mask and following are the configurations.
+#bit0 IPA Enable
+#bit1 IPA PRE Filter enable
+#bit2 IPv6 enable
+#bit3 IPA Resource Manager (RM) enable
+#bit4 IPA Clock scaling enable
+#bit5 IPA uC ENABLE
+#bit6 IPA uC STA ENABLE
+#bit8 IPA Real Time Debugging
+gIPAConfig=0x7d
+gIPADescSize=800
+
+# Enable/Disable RX full reorder offload
+gReorderOffloadSupported=1
+
+# Enable CE classification
+# 1 - enable(default) 0 - disable
+gCEClassifyEnable=1
+
+# Enable Rx handling options
+# Rx_thread=1 RPS=2(default for ROME) NAPI=4(default for ihelium)
+rx_mode=4
+
+# Enable(Tx) fastpath for data traffic.
+# 1 - enable(default) 0 - disable
+gEnableFastPath=1
+
+# This flag enables IP, TCP and UDP checksum offload
+# 1 - enable(default) 0 - disable
+gEnableIpTcpUdpChecksumOffload=1
+
+# Enable TCP Segmentation Offload
+# 1 - enable 0 - disable
+TSOEnable=1
+
+# Enable Large Recieve Offload
+# 1 - enable(default) 0 - disable
+LROEnable=1
+
+# Enable HT MPDU Density
+# 4 for 2 micro sec
+ght_mpdu_density=4
+
+# Enable flow steering to enable multiple CEs for Rx flows.
+# Multiple Rx CEs<==>Multiple Rx IRQs<==>probably different CPUs.
+# Parallel Rx paths.
+# 1 - enable 0 - disable(default)
+gEnableFlowSteering=1
+
+#set get linklayer status support
+gEnableLLStats=1
+
+################ Datapath feature set End ################
+
+################ NAN feature set start ###################
+
+# Enable NAN discovery (NAN 1.0)
+# 1 - enable 0 - disable(default)
+gEnableNanSupport=1
+################ NAN feature set end #####################
+
+# Enable Packet filters before going into suspend
+# will clear those when resume
+# bit-0 : drop MAC multicast and IPv4 multicast
+# bit-1 : drop MAC unicast and IPv4 multicast
+# bit-2 : drop IPv4 broadcast
+# bit-3 : drop XID - Exchange station Identification packet
+# bit-4 : drop STP - Spanning Tree Protocol
+# bit-5 : drop DTP/LLC/CDP
+g_enable_packet_filter_bitmap=3
+END
+
+# Note: Configuration parser would not read anything past the END marker
+
diff --git a/wifi/p2p_supplicant_overlay.conf b/wifi/p2p_supplicant_overlay.conf
new file mode 100644
index 0000000..ba26ac9
--- /dev/null
+++ b/wifi/p2p_supplicant_overlay.conf
@@ -0,0 +1,4 @@
+disable_scan_offload=1
+p2p_no_group_iface=1
+persistent_reconnect=1
+p2p_go_intent=15
diff --git a/wifi/wpa_supplicant_overlay.conf b/wifi/wpa_supplicant_overlay.conf
new file mode 100644
index 0000000..e1f530d
--- /dev/null
+++ b/wifi/wpa_supplicant_overlay.conf
@@ -0,0 +1,3 @@
+disable_scan_offload=1
+p2p_disabled=1
+tdls_external_control=1