├── sepolicy ├── vendor │ ├── rild.te │ ├── adsprpcd.te │ ├── vndservice.te │ ├── hal_ir_default.te │ ├── vndservice_contexts │ ├── app.te │ ├── hal_bluetooth_default.te │ ├── hal_nfc_default.te │ ├── hwservice.te │ ├── hal_light_default.te │ ├── tee.te │ ├── hal_sensors_defalut.te │ ├── hal_mlipay.te │ ├── seapp_contexts │ ├── device.te │ ├── vendor_init.te │ ├── remosaic_daemon.te │ ├── dontaudit.te │ ├── thermal-engine.te │ ├── property.te │ ├── hal_audio_default.te │ ├── hal_mlipay_default.te │ ├── file.te │ ├── hal_camera_default.te │ ├── init-insmod-sh.te │ ├── system_app.te │ ├── hal_touchfeature_default.te │ ├── hal_fingerprint_default.te │ ├── hal_power_default.te │ ├── hal_lineage_fod_sm6150.te │ ├── mi_thermald.te │ ├── hal_motor_default.te │ ├── settings.te │ ├── hwservice_contexts │ └── devicesettings_app.te ├── private │ ├── system_app.te │ ├── file_contexts │ └── property_contexts └── public │ ├── property.te │ └── attributes ├── .clang-format ├── odm.prop ├── parts ├── proguard.flags ├── Android.mk ├── res │ ├── drawable │ │ ├── switchbar_background.xml │ │ ├── ic_thermal_dialer.xml │ │ ├── ic_thermal_camera.xml │ │ ├── ic_thermal_benchmark.xml │ │ ├── ic_thermal_browser.xml │ │ ├── ic_thermal_gaming.xml │ │ └── ic_thermal_default.xml │ ├── values-night │ │ └── colors.xml │ ├── values │ │ ├── colors.xml │ │ └── strings.xml │ ├── color │ │ └── switch_bar_bg.xml │ ├── layout │ │ ├── doze.xml │ │ ├── thermal_layout.xml │ │ └── switch_bar.xml │ └── xml │ │ └── doze_settings.xml └── src │ └── org │ └── lineageos │ └── settings │ ├── thermal │ └── ThermalActivity.java │ ├── doze │ └── DozeSettingsActivity.java │ └── BootCompletedReceiver.java ├── Android.bp ├── configs ├── perf │ └── perf-profile0.conf ├── init.insmod.cfg └── public.libraries.txt ├── rootdir └── etc │ ├── init.violetparts.sh │ ├── init.violetparts.rc │ ├── fstab.persist │ ├── init.insmod.sh │ └── init.recovery.qcom.rc ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── VioletParts ├── res │ ├── drawable │ │ ├── preview.jpg │ │ ├── action_reset.xml │ │ ├── ic_preset.xml │ │ ├── ic_warning.xml │ │ ├── ic_headphone.xml │ │ ├── ic_linux.xml │ │ ├── ic_usb_fastcharge.xml │ │ ├── ic_mi.xml │ │ ├── ic_power.xml │ │ ├── ic_dirac.xml │ │ ├── action_presets.xml │ │ ├── ic_qs_log.xml │ │ ├── ic_kcal.xml │ │ ├── ic_custom_seekbar_minus.xml │ │ ├── ic_custom_seekbar_plus.xml │ │ └── ic_custom_seekbar_reset.xml │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ └── styles.xml │ ├── menu │ │ └── menu_reset.xml │ ├── layout │ │ └── activity_kcal.xml │ └── values-night │ │ └── styles.xml ├── src │ └── com │ │ └── xiaomi │ │ └── parts │ │ ├── DiracService.java │ │ ├── preferences │ │ └── SecureSettingCustomSeekBarPreference.java │ │ ├── SuTask.java │ │ ├── DeviceSettingsActivity.java │ │ ├── DiracUtils.java │ │ ├── kcal │ │ └── Utils.java │ │ └── Fastcharge.java └── Android.mk ├── gps ├── android │ ├── 1.0 │ │ ├── android.hardware.gnss@1.0-service-qti.rc │ │ ├── android.hardware.gnss@1.0-service-qti.xml │ │ ├── GnssDebug.h │ │ └── GnssConfiguration.h │ ├── 1.1 │ │ ├── android.hardware.gnss@1.1-service-qti.rc │ │ ├── android.hardware.gnss@1.1-service-qti.xml │ │ └── GnssDebug.h │ ├── 2.0 │ │ ├── android.hardware.gnss@2.0-service-qti.rc │ │ ├── android.hardware.gnss@2.0-service-qti.xml │ │ └── GnssDebug.h │ ├── Android.mk │ └── utils │ │ ├── Android.mk │ │ └── battery_listener.h ├── Android.mk ├── Makefile.am ├── gps_vendor_board.mk ├── core │ ├── loc-core.pc.in │ ├── Android.mk │ ├── data-items │ │ └── DataItemsFactoryProxy.h │ └── Makefile.am ├── utils │ ├── gps-utils.pc.in │ ├── Android.mk │ └── Makefile.am ├── location │ ├── location-api.pc.in │ ├── Android.mk │ └── Makefile.am ├── batching │ ├── location-batching.pc.in │ ├── Android.mk │ └── Makefile.am ├── geofence │ ├── location-geofence.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── loc-hal.pc.in ├── gps_vendor_product.mk ├── pla │ └── Android.mk ├── etc │ ├── lowi.conf │ └── flp.conf ├── gnss │ ├── Makefile.am │ └── Android.mk └── CleanSpec.mk ├── lineage.dependencies ├── README.md ├── overlay ├── frameworks │ └── base │ │ ├── packages │ │ ├── SystemUI │ │ │ └── res │ │ │ │ ├── values-440dpi │ │ │ │ └── dimens.xml │ │ │ │ ├── values-xxhdpi │ │ │ │ └── dimens.xml │ │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ └── config.xml │ │ │ │ └── drawable │ │ │ │ └── rounded.xml │ │ └── SettingsProvider │ │ │ └── res │ │ │ └── values │ │ │ └── defaults.xml │ │ └── core │ │ └── res │ │ └── res │ │ ├── values-mcc302-mnc370 │ │ └── config.xml │ │ ├── values-mcc302-mnc720 │ │ └── config.xml │ │ └── values │ │ └── dimens.xml ├── packages │ ├── apps │ │ ├── Settings │ │ │ └── res │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ ├── arrays.xml │ │ │ │ └── config.xml │ │ ├── Snap │ │ │ └── res │ │ │ │ └── values │ │ │ │ ├── config.xml │ │ │ │ └── camera2arrays.xml │ │ └── Bluetooth │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── services │ │ └── Telephony │ │ └── res │ │ └── values │ │ └── config.xml └── vendor │ └── qcom │ └── opensource │ └── commonsys │ └── packages │ └── apps │ └── Bluetooth │ └── res │ └── values │ └── config.xml ├── recovery └── Android.mk ├── power-libperfmgr ├── android.hardware.power@1.3-service.sm6150.xml ├── AudioStreaming.h ├── CameraMode.h ├── android.hardware.power@1.3-service.sm6150-libperfmgr.rc ├── Android.bp ├── service.cpp └── InteractionHandler.h ├── seccomp └── mediacodec-seccomp.policy ├── fod ├── vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150.rc ├── FodExtension.cpp ├── vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150.xml ├── service.cpp └── Android.bp ├── update-sha1sums.py ├── overlay-lineage ├── packages │ └── apps │ │ └── Dialer │ │ └── java │ │ └── com │ │ └── android │ │ └── dialer │ │ └── callrecord │ │ └── res │ │ └── values │ │ └── config.xml ├── lineage-sdk │ └── packages │ │ └── LineageSettingsProvider │ │ └── res │ │ └── values │ │ └── defaults.xml └── frameworks │ └── base │ └── packages │ └── SystemUI │ └── res │ └── values │ └── config.xml ├── light ├── Android.bp ├── service.cpp ├── android.hardware.light@2.0-service.xiaomi_sm6150.rc └── Light.h ├── setup-makefiles.sh ├── fingerprint ├── Android.bp └── service.cpp ├── config.fs ├── manifest_sdmmagpie.xml ├── audio └── bluetooth_qti_audio_policy_configuration.xml ├── media └── system_properties.xml ├── overlay-system └── vendor │ └── qcom │ └── opensource │ └── commonsys │ └── packages │ └── apps │ └── Bluetooth │ └── res │ └── values │ └── config.xml ├── system.prop └── releasetools.py /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | set_prop(rild, deviceid_prop) 2 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | ../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # Fwk detect 2 | ro.vendor.qti.va_odm.support=1 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/adsprpcd.te: -------------------------------------------------------------------------------- 1 | r_dir_file(adsprpcd sysfs_graphics) 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_app.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(system_app, hal_mlipay) 2 | -------------------------------------------------------------------------------- /sepolicy/public/property.te: -------------------------------------------------------------------------------- 1 | # IMEI 2 | type deviceid_prop, property_type; 3 | -------------------------------------------------------------------------------- /parts/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.doze.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/vndservice.te: -------------------------------------------------------------------------------- 1 | type remosaic_daemon_service, vndservice_manager_type; 2 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | imports: [ 3 | "hardware/xiaomi", 4 | ], 5 | } 6 | -------------------------------------------------------------------------------- /configs/perf/perf-profile0.conf: -------------------------------------------------------------------------------- 1 | [priority] # This profile is reserved for perflock requests 2 | 99 3 | -------------------------------------------------------------------------------- /rootdir/etc/init.violetparts.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | 3 | # Dummy executable, will be used later 4 | -------------------------------------------------------------------------------- /sepolicy/public/attributes: -------------------------------------------------------------------------------- 1 | hal_attribute(mlipay) 2 | 3 | hal_attribute(motor) 4 | 5 | hal_attribute(touchfeature) 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ir_default.te: -------------------------------------------------------------------------------- 1 | allow hal_ir_default lirc_device:{ 2 | chr_file 3 | file 4 | } rw_file_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/private/file_contexts: -------------------------------------------------------------------------------- 1 | # Executables 2 | /system/bin/chargeonlymode u:object_r:charger_exec:s0 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vndservice_contexts: -------------------------------------------------------------------------------- 1 | android.IRemosaicDaemon u:object_r:remosaic_daemon_service:s0 2 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | bss_max_count=400 5 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karthik558/Q_device_xiaomi_6150-common/HEAD/VioletParts/res/drawable/preview.jpg -------------------------------------------------------------------------------- /sepolicy/vendor/app.te: -------------------------------------------------------------------------------- 1 | get_prop({ appdomain -isolated_app }, vendor_fp_prop) 2 | get_prop({ appdomain -isolated_app }, vendor_tee_listener_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bluetooth_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_bluetooth_default to read files in wifi_vendor_data_file 2 | r_dir_file(hal_bluetooth_default, wifi_vendor_data_file) 3 | -------------------------------------------------------------------------------- /configs/init.insmod.cfg: -------------------------------------------------------------------------------- 1 | # Boot devices 2 | enable|/sys/kernel/boot_adsp/boot 3 | enable|/sys/kernel/boot_cdsp/boot 4 | 5 | # All devices enabled 6 | setprop|vendor.all.devices.ready 7 | -------------------------------------------------------------------------------- /rootdir/etc/init.violetparts.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | 3 | # USB Fastcharge 4 | chown system system /sys/kernel/fast_charge/force_fast_charge 5 | chmod 0660 /sys/kernel/fast_charge/force_fast_charge 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | # Data file accesses. 2 | allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms; 3 | allow hal_nfc_default nfc_vendor_data_file:file create_file_perms; 4 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libadsprpc.so 2 | libcdsprpc.so 3 | libsdsprpc.so 4 | libtzcom.so 5 | libfastcvopt.so 6 | liblistenjni.so 7 | liblistensoundmodel2.so 8 | libOpenCL.so 9 | libnpu.so 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_mlipay_hwservice, hwservice_manager_type; 2 | 3 | type hal_motor_hwservice, hwservice_manager_type; 4 | 5 | type hal_touchfeature_hwservice, hwservice_manager_type; 6 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | wowlan_triggers=magic_pkt 5 | bss_max_count=400 6 | interworking=1 7 | hs20=1 8 | auto_interworking=0 9 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | LOCAL_PATH := $(call my-dir) 3 | include $(LOCAL_PATH)/build/target_specific_features.mk 4 | include $(call all-makefiles-under,$(LOCAL_PATH)) 5 | endif 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_light_default.te: -------------------------------------------------------------------------------- 1 | allow hal_light_default { 2 | sysfs_graphics 3 | sysfs_leds 4 | }:file rw_file_perms; 5 | 6 | r_dir_file(hal_light_default, sysfs_graphics) 7 | r_dir_file(hal_light_default, sysfs_leds) 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | allow tee fingerprint_data_file:dir create_dir_perms; 2 | allow tee { 3 | fingerprint_data_file 4 | mnt_vendor_file 5 | }:file create_file_perms; 6 | 7 | allow tee mnt_vendor_file:dir rw_dir_perms; 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_sensors_defalut.te: -------------------------------------------------------------------------------- 1 | get_prop(hal_sensors_default, vendor_adsprpc_prop) 2 | 3 | allow hal_sensors_default audio_socket:sock_file rw_file_perms; 4 | unix_socket_connect(hal_sensors_default, audio, hal_audio_default) 5 | -------------------------------------------------------------------------------- /gps/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Automake script for gps loc_api 2 | # 3 | 4 | ACLOCAL_AMFLAGS = -I m4 5 | 6 | SUBDIRS = gnss 7 | 8 | pkgconfigdir = $(libdir)/pkgconfig 9 | pkgconfig_DATA = loc-hal.pc 10 | EXTRA_DIST = $(pkgconfig_DATA) 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_mlipay.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server 2 | binder_call(hal_mlipay_client, hal_mlipay_server) 3 | 4 | add_hwservice(hal_mlipay_server, hal_mlipay_hwservice) 5 | allow hal_mlipay_client hal_mlipay_hwservice:hwservice_manager find; 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=system seinfo=platform name=org.lineageos.devicesettings domain=devicesettings_app type=system_app_data_file 2 | user=system seinfo=platform name=org.lineageos.settings domain=devicesettings_app type=system_app_data_file 3 | -------------------------------------------------------------------------------- /lineage.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_hardware_xiaomi", 4 | "target_path": "hardware/xiaomi" 5 | }, 6 | { 7 | "repository": "android_kernel_xiaomi_sm6150", 8 | "target_path": "kernel/xiaomi/sm6150" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | type fingerprint_device, dev_type; 2 | 3 | type hall_device, dev_type; 4 | 5 | type lirc_device, dev_type; 6 | 7 | type motor_device, dev_type; 8 | 9 | type sound_device, dev_type; 10 | 11 | type touchfeature_device, dev_type; 12 | -------------------------------------------------------------------------------- /gps/gps_vendor_board.mk: -------------------------------------------------------------------------------- 1 | # Flags from BoardConfigVendor.mk 2 | ifneq ($(TARGET_USES_QMAA),true) 3 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 4 | else ifneq ($(TARGET_USES_QMAA_OVERRIDE_GPS),false) 5 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 6 | endif 7 | 8 | -------------------------------------------------------------------------------- /gps/core/loc-core.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-core 7 | Description: QTI GPS Loc Core 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lloc_core 10 | Cflags: -I${includedir}/loc-core 11 | -------------------------------------------------------------------------------- /gps/utils/gps-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gps-utils 7 | Description: QTI GPS Location utils 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgps_utils 10 | Cflags: -I${includedir}/gps-utils 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | set_prop(vendor_init, power_prop) 2 | set_prop(vendor_init, vendor_alarm_boot_prop) 3 | set_prop(vendor_init, vendor_video_prop) 4 | 5 | allow vendor_init { 6 | debugfs_clk 7 | proc_dirty 8 | proc_sched_energy_aware 9 | }:file w_file_perms; 10 | -------------------------------------------------------------------------------- /gps/location/location-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-api 7 | Description: Location API 8 | Version: @VERSION 9 | Libs: -L${libdir} -llocation_api 10 | Cflags: -I${includedir}/location-api 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/remosaic_daemon.te: -------------------------------------------------------------------------------- 1 | type remosaic_daemon, domain; 2 | type remosaic_daemon_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(remosaic_daemon) 5 | 6 | vndbinder_use(remosaic_daemon) 7 | 8 | allow remosaic_daemon remosaic_daemon_service:service_manager add; 9 | -------------------------------------------------------------------------------- /gps/batching/location-batching.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-batching 7 | Description: QTI GPS Batching 8 | Version: @VERSION 9 | Libs: -L${libdir} -lbatching 10 | Cflags: -I${includedir}/location-batching 11 | -------------------------------------------------------------------------------- /gps/geofence/location-geofence.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-geofence 7 | Description: QTI GPS Geofence 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgeofencing 10 | Cflags: -I${includedir}/location-geofence 11 | -------------------------------------------------------------------------------- /gps/loc-hal.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-hal 7 | Description: QTI GPS Loc HAL 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgnss 10 | Cflags: -I${includedir} -I${includedir}/utils -I${includedir}/core -I${includedir}/loc-hal 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2019-2020 - The LineageOS Project 2 | 3 | Common device tree for Xiaomi SM6150 based devices 4 | ============== 5 | 6 | #### Proprietary-files.txt 7 | All unpinned blobs are extracted from [miui_DAVINCI_20.7.1_b504f2227d_10.0.zip](https://bigota.d.miui.com/20.7.1/miui_DAVINCI_20.7.1_b504f2227d_10.0.zip). 8 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-440dpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 85dp 6 | 7 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-xxhdpi/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 85dp 6 | 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/dontaudit.te: -------------------------------------------------------------------------------- 1 | # Ignore all logging requests 2 | dontaudit hal_fingerprint storage_file:dir search; 3 | 4 | # Ignore harmless QCOM denials 5 | dontaudit { 6 | init 7 | priv_app 8 | } { 9 | bt_firmware_file 10 | firmware_file 11 | }:filesystem getattr; 12 | 13 | dontaudit priv_app mnt_vendor_file:dir search; 14 | -------------------------------------------------------------------------------- /recovery/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_C_INCLUDES := \ 5 | bootable/recovery \ 6 | bootable/recovery/edify/include \ 7 | bootable/recovery/otautil/include 8 | LOCAL_SRC_FILES := recovery_updater.cpp 9 | LOCAL_MODULE := librecovery_updater_xiaomi 10 | include $(BUILD_STATIC_LIBRARY) 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow thermal-engine { 2 | sysfs_devfreq 3 | thermal_data_file 4 | }:dir search; 5 | 6 | allow thermal-engine sysfs_devfreq:file rw_file_perms; 7 | 8 | # Rule for thermal-engine to access init process 9 | unix_socket_connect(thermal-engine, property, init); 10 | 11 | set_prop(thermal-engine, thermal_normal_prop) 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | # Dirac 2 | type dirac_prop, property_type; 3 | 4 | # Fingerprint 5 | type vendor_fp_prop, property_type; 6 | 7 | # Init 8 | type vendor_device_prop, property_type; 9 | 10 | # Power 11 | type power_prop, property_type; 12 | 13 | # Thermal 14 | type thermal_normal_prop, property_type; 15 | 16 | # Touchfeature 17 | type vendor_touchfeature_prop, property_type; 18 | -------------------------------------------------------------------------------- /VioletParts/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /power-libperfmgr/android.hardware.power@1.3-service.sm6150.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.power 4 | hwbinder 5 | 1.3 6 | 7 | IPower 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /seccomp/mediacodec-seccomp.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | ARM_cacheflush: 1 12 | inotify_init1: 1 13 | inotify_add_watch: 1 14 | inotify_rm_watch: 1 15 | uname: 1 16 | ueventd: 1 17 | timer_create: 1 18 | timer_settime: 1 19 | rt_sigtimedwait: 1 20 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.persist: -------------------------------------------------------------------------------- 1 | # Keep persist in an fstab file, since we need to run fsck on it after abnormal shutdown. 2 | 3 | # 4 | /dev/block/platform/soc/7c4000.sdhci/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,noatime,barrier=1 wait 5 | /dev/block/platform/soc/1d84000.ufshc/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,noatime,barrier=1 wait 6 | -------------------------------------------------------------------------------- /fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | chown system system /sys/devices/platform/soc/soc:qcom,dsi-display/fod_ui 3 | 4 | service fingerprint-inscreen-1-0 /vendor/bin/hw/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150 5 | interface vendor.lineage.biometrics.fingerprint.inscreen@1.0::IFingerprintInscreen default 6 | class hal 7 | user system 8 | group system wakelock 9 | shutdown critical 10 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/action_reset.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_preset.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_warning.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 3 | include $(CLEAR_VARS) 4 | DIR_LIST := $(LOCAL_PATH) 5 | include $(DIR_LIST)/utils/Android.mk 6 | ifeq ($(GNSS_HIDL_VERSION),2.0) 7 | include $(DIR_LIST)/2.0/Android.mk 8 | else 9 | ifeq ($(GNSS_HIDL_VERSION),1.1) 10 | include $(DIR_LIST)/1.1/Android.mk 11 | else 12 | include $(DIR_LIST)/1.0/Android.mk 13 | endif #GNSS HIDL 1.1 14 | endif #GNSS HIDL 2.0 15 | endif #BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | # Dirac 2 | get_prop(hal_audio_default, dirac_prop) 3 | set_prop(hal_audio_default, dirac_prop) 4 | 5 | # For interfacing with PowerHAL 6 | hal_client_domain(hal_audio_default, hal_power) 7 | 8 | # Allow hal_audio_default to read persist_audio_file 9 | r_dir_file(hal_audio_default, persist_audio_file) 10 | 11 | r_dir_file(hal_audio_default, sysfs) 12 | 13 | set_prop(hal_audio_default, vendor_audio_prop) 14 | 15 | allow hal_audio_default audio_socket:sock_file rw_file_perms; 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_mlipay_default.te: -------------------------------------------------------------------------------- 1 | type hal_mlipay_default, domain; 2 | hal_server_domain(hal_mlipay_default, hal_mlipay) 3 | 4 | type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type; 5 | 6 | init_daemon_domain(hal_mlipay_default) 7 | 8 | allow hal_mlipay_default { 9 | ion_device 10 | tee_device 11 | }:chr_file rw_file_perms; 12 | 13 | r_dir_file(hal_mlipay_default, firmware_file) 14 | 15 | get_prop(hal_mlipay_default, vendor_fp_prop) 16 | set_prop(hal_mlipay_default, vendor_tee_listener_prop) 17 | -------------------------------------------------------------------------------- /VioletParts/res/menu/menu_reset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | type proc_sched_energy_aware, proc_type, fs_type; 2 | type sysfs_msm_boot, fs_type, sysfs_type; 3 | type sysfs_msm_subsys, sysfs_type, fs_type; 4 | 5 | type fingerprint_data_file, data_file_type, file_type, vendor_persist_type; 6 | type thermal_data_file, file_type, data_file_type; 7 | 8 | type camera_persist_file, file_type, vendor_persist_type; 9 | 10 | type audio_socket, file_type; 11 | 12 | # VioletParts 13 | type sysfs_fcharge, sysfs_type, fs_type; 14 | type sysfs_fastcharge, sysfs_type, fs_type; 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | # For interfacing with PowerHAL 2 | hal_client_domain(hal_camera_default, hal_power) 3 | 4 | # Allow hal_camera_default to read to sysfs_kgsl 5 | r_dir_file(hal_camera_default, sysfs_kgsl) 6 | 7 | # Allow hal_camera_default to read to mnt/vendor/persist/camera 8 | r_dir_file(hal_camera_default, camera_persist_file) 9 | r_dir_file(hal_camera_default, mnt_vendor_file) 10 | r_dir_file(hal_camera_default, persist_sensors_file) 11 | 12 | allow hal_camera_default remosaic_daemon_service:service_manager find; 13 | 14 | set_prop(hal_camera_default, vendor_camera_prop) 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/init-insmod-sh.te: -------------------------------------------------------------------------------- 1 | type init-insmod-sh, domain; 2 | type init-insmod-sh_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(init-insmod-sh) 5 | 6 | allow init-insmod-sh vendor_toolbox_exec:file rx_file_perms; 7 | 8 | # Set the vendor.all.modules.ready property 9 | set_prop(init-insmod-sh, vendor_device_prop) 10 | 11 | # Allow insmod 12 | allow init-insmod-sh self:capability sys_module; 13 | 14 | allow init-insmod-sh kernel:key search; 15 | 16 | allow init-insmod-sh { 17 | sysfs_msm_boot 18 | sysfs_boot_adsp 19 | }:file w_file_perms; 20 | 21 | r_dir_file(init-insmod-sh debugfs_ipc) 22 | -------------------------------------------------------------------------------- /gps/gps_vendor_product.mk: -------------------------------------------------------------------------------- 1 | # HAL packages 2 | PRODUCT_PACKAGES += android.hardware.gnss@1.0-impl-qti 3 | PRODUCT_PACKAGES += android.hardware.gnss@1.0-service-qti 4 | PRODUCT_PACKAGES += android.hardware.gnss@1.1-impl-qti 5 | PRODUCT_PACKAGES += android.hardware.gnss@1.1-service-qti 6 | PRODUCT_PACKAGES += android.hardware.gnss@2.0-impl-qti 7 | PRODUCT_PACKAGES += android.hardware.gnss@2.0-service-qti 8 | PRODUCT_PACKAGES += gps.conf 9 | PRODUCT_PACKAGES += libloc_core 10 | PRODUCT_PACKAGES += libgnss 11 | PRODUCT_PACKAGES += liblocation_api 12 | PRODUCT_PACKAGES += libgps.utils 13 | PRODUCT_PACKAGES += libbatching 14 | PRODUCT_PACKAGES += libgeofencing 15 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_headphone.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_linux.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /VioletParts/res/layout/activity_kcal.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_app.te: -------------------------------------------------------------------------------- 1 | # VioletParts 2 | allow system_app sysfs_fcharge:file { open read getattr write }; 3 | allow system_app sysfs_fastcharge:file { open read getattr write }; 4 | allow system_app vendor_default_prop:file { getattr open read }; 5 | allow system_app wificond:binder call; 6 | allow system_app hal_mlipay_default:binder call; 7 | allow system_app sysfs_vibrator:file rw_file_perms; 8 | allow system_app sysfs_vibrator:dir search; 9 | set_prop(system_app, system_prop); 10 | allow system_app sysfs_battery_supply:dir { search }; 11 | allow system_app sysfs_battery_supply:file { read }; 12 | allow system_app sysfs_battery_supply:file { open }; 13 | allow system_app sysfs_battery_supply:file { getattr }; 14 | 15 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_usb_fastcharge.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_mi.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_power.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /sepolicy/private/property_contexts: -------------------------------------------------------------------------------- 1 | # Global 2 | ro.boot.hwc u:object_r:exported_default_prop:s0 3 | ro.build.flavor u:object_r:exported_default_prop:s0 4 | ro.product.mod_device u:object_r:exported2_default_prop:s0 5 | ro.product.system.manufacturer u:object_r:exported2_default_prop:s0 exact string 6 | 7 | # IMEI 8 | persist.radio.imei u:object_r:deviceid_prop:s0 9 | persist.radio.meid u:object_r:deviceid_prop:s0 10 | ro.ril.miui.imei u:object_r:deviceid_prop:s0 11 | ro.ril.oem.imei u:object_r:deviceid_prop:s0 12 | ro.ril.oem.meid u:object_r:deviceid_prop:s0 13 | 14 | # MIUI 15 | ro.cust.test u:object_r:exported_system_prop:s0 16 | ro.miui. u:object_r:exported_system_prop:s0 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_touchfeature_default.te: -------------------------------------------------------------------------------- 1 | type hal_touchfeature_default, domain; 2 | hal_server_domain(hal_touchfeature_default, hal_touchfeature) 3 | 4 | type hal_touchfeature_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_touchfeature_default) 6 | 7 | binder_call(hal_touchfeature_client, hal_touchfeature_server) 8 | 9 | add_hwservice(hal_touchfeature_server, hal_touchfeature_hwservice) 10 | allow hal_touchfeature_client hal_touchfeature_hwservice:hwservice_manager find; 11 | 12 | # Allow hal_touchfeature_default to read and write to touchfeature_device 13 | allow hal_touchfeature_default touchfeature_device:chr_file rw_file_perms; 14 | 15 | set_prop(hal_touchfeature_default, vendor_touchfeature_prop) 16 | 17 | vndbinder_use(hal_touchfeature_default) 18 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_dirac.xml: -------------------------------------------------------------------------------- 1 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | allow hal_fingerprint_default fingerprint_data_file:dir rw_dir_perms; 2 | allow hal_fingerprint_default fingerprint_data_file:file create_file_perms; 3 | 4 | allow hal_fingerprint_default { 5 | fingerprint_device 6 | input_device 7 | tee_device 8 | uhid_device 9 | }: chr_file rw_file_perms; 10 | 11 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 12 | 13 | allow hal_fingerprint_default { 14 | input_device 15 | sysfs_graphics 16 | }: dir r_dir_perms; 17 | 18 | allow hal_fingerprint_default { 19 | sysfs_fingerprint 20 | sysfs_graphics 21 | sysfs_msm_subsys 22 | }: file rw_file_perms; 23 | 24 | r_dir_file(hal_fingerprint_default, firmware_file) 25 | 26 | set_prop(hal_fingerprint_default, vendor_fp_prop) 27 | 28 | get_prop(system_server, vendor_fp_prop); 29 | -------------------------------------------------------------------------------- /parts/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2020 The LineageOS Project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | LOCAL_PATH := $(call my-dir) 8 | 9 | include $(CLEAR_VARS) 10 | 11 | LOCAL_MODULE_TAGS := optional 12 | 13 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 14 | 15 | LOCAL_PACKAGE_NAME := XiaomiParts 16 | LOCAL_CERTIFICATE := platform 17 | LOCAL_PRIVATE_PLATFORM_APIS := true 18 | LOCAL_PRIVILEGED_MODULE := true 19 | 20 | LOCAL_USE_AAPT2 := true 21 | 22 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 23 | androidx.core_core \ 24 | androidx.preference_preference 25 | 26 | LOCAL_RESOURCE_DIR := \ 27 | $(LOCAL_PATH)/res \ 28 | $(TOP)/packages/resources/devicesettings/res 29 | 30 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 31 | 32 | include frameworks/base/packages/SettingsLib/common.mk 33 | 34 | include $(BUILD_PACKAGE) 35 | -------------------------------------------------------------------------------- /rootdir/etc/init.insmod.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | 3 | ######################################################## 4 | ### init.insmod.cfg format: ### 5 | ### ----------------------------------------------- ### 6 | ### [setprop|enable] [path|prop name] ### 7 | ### ... ### 8 | ######################################################## 9 | 10 | if [ $# -eq 1 ]; then 11 | cfg_file=$1 12 | else 13 | exit 1 14 | fi 15 | 16 | if [ -f $cfg_file ]; then 17 | while IFS="|" read -r action arg 18 | do 19 | case $action in 20 | "setprop") setprop $arg 1 ;; 21 | "enable") echo 1 > $arg ;; 22 | esac 23 | done < $cfg_file 24 | fi 25 | 26 | # Set property even if there is no insmod config 27 | # as property value "1" is expected in early-boot trigger 28 | setprop vendor.all.devices.ready 1 29 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/action_presets.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_power_default to write to dt2w nodes 2 | allow hal_power_default input_device:dir r_dir_perms; 3 | allow hal_power_default input_device:chr_file rw_file_perms; 4 | 5 | allow hal_power_default { 6 | sysfs_devfreq 7 | sysfs_msm_subsys 8 | }:dir search; 9 | 10 | allow hal_power_default { 11 | cgroup 12 | proc_sched_energy_aware 13 | sysfs_devfreq 14 | sysfs_devices_system_cpu 15 | sysfs_graphics 16 | sysfs_kgsl 17 | sysfs_msm_subsys 18 | sysfs_scsi_host 19 | }:{ 20 | file 21 | lnk_file 22 | } rw_file_perms; 23 | 24 | allow hal_power_default latency_device:chr_file rw_file_perms; 25 | 26 | # Rule for hal_power_default to access graphics composer process 27 | unix_socket_connect(hal_power_default, pps, hal_graphics_composer_default); 28 | 29 | # To get/set powerhal state property 30 | set_prop(hal_power_default, power_prop) 31 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/DiracService.java: -------------------------------------------------------------------------------- 1 | package com.xiaomi.parts; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.util.Log; 7 | 8 | public class DiracService extends Service { 9 | 10 | private final String TAG = this.getClass().getName(); 11 | 12 | static DiracUtils sDiracUtils; 13 | 14 | @Override 15 | public IBinder onBind(Intent arg0) { 16 | return null; 17 | } 18 | 19 | @Override 20 | public int onStartCommand(Intent intent, int flags, int startId) { 21 | sDiracUtils = new DiracUtils(); 22 | sDiracUtils.onBootCompleted(); 23 | Log.d(TAG, "Service started"); 24 | return START_STICKY; 25 | } 26 | 27 | @Override 28 | public void onDestroy() { 29 | super.onDestroy(); 30 | Log.d(TAG, "Service destroyed"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | Karthik Lal 16 | 17 | -------------------------------------------------------------------------------- /parts/res/drawable/switchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /parts/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | #82000000 19 | @android:color/black 20 | 21 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_lineage_fod_sm6150.te: -------------------------------------------------------------------------------- 1 | type hal_lineage_fod_sm6150, domain; 2 | hal_server_domain(hal_lineage_fod_sm6150, hal_lineage_fod) 3 | 4 | type hal_lineage_fod_sm6150_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_lineage_fod_sm6150) 6 | 7 | wakelock_use(hal_lineage_fod_sm6150) 8 | 9 | # Allow access to the HALs 10 | hal_client_domain(hal_lineage_fod_sm6150, hal_fingerprint) 11 | hal_client_domain(hal_lineage_fod_sm6150, hal_touchfeature) 12 | 13 | # Allow binder communication with hal_fingerprint_sm6150 14 | binder_call(hal_lineage_fod_sm6150, hal_fingerprint_default) 15 | 16 | # Allow binder communication with hal_touchfeature_default 17 | binder_call(hal_lineage_fod_sm6150, hal_touchfeature_default) 18 | 19 | allow hal_lineage_fod_sm6150 sysfs_graphics:dir r_dir_perms; 20 | allow hal_lineage_fod_sm6150 sysfs_graphics:file r_file_perms; 21 | 22 | get_prop(hal_lineage_fod_sm6150, vendor_fp_prop) 23 | -------------------------------------------------------------------------------- /update-sha1sums.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | import sys 20 | sys.path.append("../../../vendor/lineage/build/tools/") 21 | from update_sha1sums import Updater 22 | 23 | Updater.setup("sm6150-common", "xiaomi") 24 | Updater.finish() 25 | -------------------------------------------------------------------------------- /VioletParts/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | #66000000 17 | 18 | #FF6700 19 | 20 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_qs_log.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /gps/pla/Android.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=macro-redefined \ 5 | -Wno-error=reorder \ 6 | -Wno-error=missing-braces \ 7 | -Wno-error=self-assign \ 8 | -Wno-error=enum-conversion \ 9 | -Wno-error=logical-op-parentheses \ 10 | -Wno-error=null-arithmetic \ 11 | -Wno-error=null-conversion \ 12 | -Wno-error=parentheses-equality \ 13 | -Wno-error=undefined-bool-conversion \ 14 | -Wno-error=tautological-compare \ 15 | -Wno-error=switch \ 16 | -Wno-error=date-time 17 | 18 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 19 | ifneq ($(BUILD_TINY_ANDROID),true) 20 | 21 | LOCAL_PATH := $(call my-dir) 22 | 23 | include $(CLEAR_VARS) 24 | LOCAL_MODULE := libloc_pla_headers 25 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/android 26 | include $(BUILD_HEADER_LIBRARY) 27 | 28 | endif # not BUILD_TINY_ANDROID 29 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 30 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | true 19 | 4 20 | 21 | -------------------------------------------------------------------------------- /power-libperfmgr/AudioStreaming.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef POWER_LIBPERFMGR_AUDIOSTREAMING_H_ 18 | #define POWER_LIBPERFMGR_AUDIOSTREAMING_H_ 19 | 20 | enum AUDIO_STREAMING_HINT { 21 | AUDIO_STREAMING_OFF = 0, 22 | AUDIO_STREAMING_ON = 1, 23 | }; 24 | 25 | #endif // POWER_LIBPERFMGR_AUDIOSTREAMING_H_ 26 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_kcal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | true 22 | 23 | -------------------------------------------------------------------------------- /gps/etc/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 3 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/vendor/mi_thermald.te: -------------------------------------------------------------------------------- 1 | type mi_thermald, domain; 2 | type mi_thermald_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(mi_thermald) 5 | 6 | allow mi_thermald self:capability { chown fowner fsetid }; 7 | 8 | # Allow mi_thermald to read thermal_data_file 9 | allow mi_thermald thermal_data_file:dir rw_dir_perms; 10 | allow mi_thermald thermal_data_file:file create_file_perms; 11 | 12 | r_dir_file(mi_thermald, sysfs) 13 | r_dir_file(mi_thermald, sysfs_battery_supply) 14 | r_dir_file(mi_thermald, sysfs_devices_system_cpu) 15 | r_dir_file(mi_thermald, sysfs_graphics) 16 | r_dir_file(mi_thermald, sysfs_kgsl) 17 | r_dir_file(mi_thermald, sysfs_leds) 18 | r_dir_file(mi_thermald, sysfs_thermal) 19 | 20 | # Allow mi_thermald to read and write to sysfs_* 21 | allow mi_thermald { 22 | sysfs_battery_supply 23 | sysfs_devices_system_cpu 24 | sysfs_kgsl 25 | sysfs_thermal 26 | }:{ 27 | file 28 | lnk_file 29 | } rw_file_perms; 30 | 31 | set_prop(mi_thermald, thermal_normal_prop) 32 | -------------------------------------------------------------------------------- /fod/FodExtension.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | uint32_t getFodZOrder(uint32_t z, bool touched) { 20 | if (touched) { 21 | z |= 0x20000000u; 22 | } 23 | return z; 24 | } 25 | 26 | uint64_t getFodUsageBits(uint64_t usageBits, bool touched) { 27 | (void) touched; 28 | return usageBits; 29 | } 30 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 85dp 22 | 23 | -------------------------------------------------------------------------------- /parts/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | @*android:color/material_grey_600 19 | #BFFFFFFF 20 | @android:color/white 21 | 22 | -------------------------------------------------------------------------------- /gps/gnss/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(LOCHAL_CFLAGS) \ 4 | $(GPSUTILS_CFLAGS) \ 5 | $(LOCCORE_CFLAGS) \ 6 | -I./ \ 7 | -I../utils \ 8 | -I$(WORKSPACE)/hardware/qcom/gps/core/data-items \ 9 | -I../location \ 10 | -std=c++1y 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp 17 | 18 | if USE_GLIB 19 | libgnss_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | libgnss_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -avoid-version 21 | libgnss_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | libgnss_la_CFLAGS = $(AM_CFLAGS) 24 | libgnss_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | libgnss_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | libgnss_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 29 | 30 | #Create and Install libraries 31 | lib_LTLIBRARIES = libgnss.la 32 | -------------------------------------------------------------------------------- /parts/res/color/switch_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /VioletParts/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 11 | 12 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc370/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | %s 24 | %s Wi-Fi 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | %s 24 | %s Wi-Fi 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_motor_default.te: -------------------------------------------------------------------------------- 1 | type hal_motor_default, domain; 2 | hal_server_domain(hal_motor_default, hal_motor) 3 | 4 | type hal_motor_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_motor_default) 6 | 7 | binder_call(hal_motor_client, hal_motor_server) 8 | 9 | binder_call(hal_motor_default, devicesettings_app) 10 | 11 | hal_client_domain(cameraserver, hal_motor) 12 | 13 | add_hwservice(hal_motor_server, hal_motor_hwservice) 14 | allow hal_motor_client hal_motor_hwservice:hwservice_manager find; 15 | 16 | # Allow hal_motor_default to read and write to { motor_device hall_device } 17 | allow hal_motor_default { 18 | hall_device 19 | motor_device 20 | }:chr_file rw_file_perms; 21 | 22 | # Allow hal_motor_default to read and write to { mnt_vendor_file persist_sensors_file } 23 | allow hal_motor_default { 24 | mnt_vendor_file 25 | persist_sensors_file 26 | }:dir rw_dir_perms; 27 | 28 | allow hal_motor_default { 29 | mnt_vendor_file 30 | persist_sensors_file 31 | }:file rw_file_perms; 32 | 33 | -------------------------------------------------------------------------------- /gps/batching/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libbatching 9 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | libutils \ 17 | libcutils \ 18 | liblog \ 19 | libloc_core \ 20 | libgps.utils \ 21 | libdl 22 | 23 | LOCAL_SRC_FILES += \ 24 | location_batching.cpp \ 25 | BatchingAdapter.cpp 26 | 27 | LOCAL_HEADER_LIBRARIES := \ 28 | libgps.utils_headers \ 29 | libloc_core_headers \ 30 | libloc_pla_headers \ 31 | liblocation_api_headers 32 | 33 | LOCAL_PRELINK_MODULE := false 34 | 35 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 36 | include $(BUILD_SHARED_LIBRARY) 37 | 38 | endif # not BUILD_TINY_ANDROID 39 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 40 | -------------------------------------------------------------------------------- /parts/res/layout/doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /gps/geofence/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libgeofencing 9 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SRC_FILES:= \ 16 | GeofenceAdapter.cpp \ 17 | location_geofence.cpp 18 | 19 | LOCAL_SHARED_LIBRARIES := \ 20 | libutils \ 21 | libcutils \ 22 | libgps.utils \ 23 | liblog \ 24 | libloc_core 25 | 26 | LOCAL_HEADER_LIBRARIES := \ 27 | libgps.utils_headers \ 28 | libloc_core_headers \ 29 | libloc_pla_headers \ 30 | liblocation_api_headers 31 | 32 | LOCAL_PRELINK_MODULE := false 33 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 34 | include $(BUILD_SHARED_LIBRARY) 35 | 36 | endif # not BUILD_TINY_ANDROID 37 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 38 | 39 | -------------------------------------------------------------------------------- /VioletParts/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := optional 5 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 6 | androidx.preference_preference 7 | 8 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 9 | LOCAL_PACKAGE_NAME := VioletParts 10 | LOCAL_CERTIFICATE := platform 11 | LOCAL_PRIVILEGED_MODULE := true 12 | LOCAL_PRIVATE_PLATFORM_APIS := true 13 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 14 | LOCAL_USE_AAPT2 := true 15 | 16 | package_resource_overlays := $(strip \ 17 | $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \ 18 | $(addprefix $(dir)/, packages/apps/VioletParts/res))) \ 19 | $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \ 20 | $(addprefix $(dir)/, packages/apps/VioletParts/res)))) 21 | 22 | LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR) 23 | 24 | LOCAL_PROGUARD_ENABLED := disabled 25 | LOCAL_DEX_PREOPT := false 26 | 27 | include frameworks/base/packages/SettingsLib/common.mk 28 | 29 | include $(BUILD_PACKAGE) 30 | 31 | include $(call all-makefiles-under,$(LOCAL_PATH)) 32 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | 24 | 0 25 | -1 26 | -1 27 | 28 | 29 | -------------------------------------------------------------------------------- /power-libperfmgr/CameraMode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef POWER_LIBPERFMGR_CAMERAMODE_H_ 18 | #define POWER_LIBPERFMGR_CAMERAMODE_H_ 19 | 20 | enum CameraStreamingMode { 21 | CAMERA_STREAMING_OFF = 0, 22 | CAMERA_STREAMING, 23 | CAMERA_STREAMING_1080P, 24 | CAMERA_STREAMING_60FPS, 25 | CAMERA_STREAMING_4K, 26 | CAMERA_STREAMING_SECURE, 27 | CAMERA_STREAMING_MAX 28 | }; 29 | 30 | #endif // POWER_LIBPERFMGR_CAMERAMODE_H_ 31 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 2 24 | 25 | -------------------------------------------------------------------------------- /sepolicy/vendor/settings.te: -------------------------------------------------------------------------------- 1 | type settings, domain; 2 | 3 | app_domain(settings) 4 | 5 | # Allow settings to find *_service 6 | allow settings { app_api_service audioserver_service drmserver_service mediaextractor_service mediametrics_service mediaserver_service }:service_manager find; 7 | 8 | # Allow settings to find hal_motor_hwservice 9 | allow settings hal_motor_hwservice:hwservice_manager find; 10 | 11 | # Allow settings read and write /data/data subdirectory 12 | allow settings system_app_data_file:dir create_dir_perms; 13 | allow settings system_app_data_file:{ file lnk_file } create_file_perms; 14 | 15 | # Allow binder communication with hal_motor 16 | binder_call(settings, hal_motor) 17 | 18 | # Allow binder communication with gpuservice 19 | binder_call(settings, gpuservice) 20 | 21 | # Allow settings to read and write to cgroup/{hall,motor}_device/sysfs_graphics/sysfs_leds 22 | allow settings { motor_device sysfs_graphics sysfs_leds }:dir search; 23 | allow settings { cgroup sysfs_graphics sysfs_leds }:file rw_file_perms; 24 | allow settings { motor_device sysfs_graphics hall_device }:chr_file rw_file_perms; 25 | -------------------------------------------------------------------------------- /fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.biometrics.fingerprint.inscreen 4 | hwbinder 5 | 1.0 6 | 7 | IFingerprintInscreen 8 | default 9 | 10 | 11 | 12 | vendor.xiaomi.hardware.fingerprintextension 13 | hwbinder 14 | 1.0 15 | 16 | IXiaomiFingerprint 17 | default 18 | 19 | 20 | 21 | vendor.xiaomi.hardware.touchfeature 22 | hwbinder 23 | 1.0 24 | 25 | ITouchFeature 26 | default 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 6 19 | 7 20 | 21 | 22 | false 23 | 24 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | vendor.goodix.hardware.cap.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0 2 | vendor.goodix.hardware.cap.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:object_r:hal_fingerprint_hwservice:s0 3 | vendor.goodix.hardware.interfaces.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0 4 | vendor.goodix.hardware.interfaces.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:object_r:hal_fingerprint_hwservice:s0 5 | vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0 6 | vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:hal_fingerprint_hwservice:s0 7 | vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0 8 | vendor.xiaomi.hardware.motor::IMotor u:object_r:hal_motor_hwservice:s0 9 | vendor.xiaomi.hardware.touchfeature::ITouchFeature u:object_r:hal_touchfeature_hwservice:s0 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_dialer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 103px 23 | 24 | 25 | 22px 26 | 27 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_custom_seekbar_minus.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /gps/android/utils/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := liblocbatterylistener 5 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 6 | # activate the following line for debug purposes only, comment out for production 7 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 8 | LOCAL_VENDOR_MODULE := true 9 | 10 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 11 | 12 | LOCAL_C_INCLUDES += \ 13 | $(LOCAL_PATH) \ 14 | 15 | LOCAL_SRC_FILES:= \ 16 | battery_listener.cpp 17 | LOCAL_SHARED_LIBRARIES := \ 18 | liblog \ 19 | libhidlbase \ 20 | libhidltransport \ 21 | libhwbinder \ 22 | libcutils \ 23 | libutils \ 24 | android.hardware.health@1.0 \ 25 | android.hardware.health@2.0 \ 26 | android.hardware.power@1.2 \ 27 | libbase 28 | 29 | LOCAL_HEADER_LIBRARIES := \ 30 | libgps.utils_headers \ 31 | 32 | LOCAL_STATIC_LIBRARIES := libhealthhalutils 33 | LOCAL_CFLAGS += -DBATTERY_LISTENER_ENABLED 34 | 35 | include $(BUILD_STATIC_LIBRARY) 36 | 37 | include $(CLEAR_VARS) 38 | LOCAL_MODULE := liblocbatterylistener_headers 39 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 40 | 41 | include $(BUILD_HEADER_LIBRARY) 42 | 43 | 44 | -------------------------------------------------------------------------------- /light/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | defaults: ["hidl_defaults"], 18 | name: "android.hardware.light@2.0-service.xiaomi_sm6150", 19 | init_rc: ["android.hardware.light@2.0-service.xiaomi_sm6150.rc"], 20 | srcs: [ 21 | "service.cpp", 22 | "Light.cpp", 23 | ], 24 | shared_libs: [ 25 | "libbase", 26 | "libhidlbase", 27 | "libhidltransport", 28 | "libutils", 29 | "android.hardware.light@2.0", 30 | ], 31 | relative_install_path: "hw", 32 | vendor: true, 33 | } 34 | -------------------------------------------------------------------------------- /gps/location/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := liblocation_api 9 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | libutils \ 17 | libcutils \ 18 | libgps.utils \ 19 | libdl \ 20 | liblog 21 | 22 | LOCAL_SRC_FILES += \ 23 | LocationAPI.cpp \ 24 | LocationAPIClientBase.cpp 25 | 26 | LOCAL_CFLAGS += \ 27 | -fno-short-enums 28 | 29 | LOCAL_HEADER_LIBRARIES := \ 30 | libloc_pla_headers \ 31 | libgps.utils_headers 32 | 33 | LOCAL_PRELINK_MODULE := false 34 | 35 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 36 | include $(BUILD_SHARED_LIBRARY) 37 | 38 | include $(CLEAR_VARS) 39 | LOCAL_MODULE := liblocation_api_headers 40 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 41 | include $(BUILD_HEADER_LIBRARY) 42 | 43 | endif # not BUILD_TINY_ANDROID 44 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 45 | -------------------------------------------------------------------------------- /sepolicy/vendor/devicesettings_app.te: -------------------------------------------------------------------------------- 1 | type devicesettings_app, domain; 2 | 3 | app_domain(devicesettings_app) 4 | 5 | # Allow devicesettings_app to find *_service 6 | allow devicesettings_app { 7 | app_api_service 8 | audioserver_service 9 | cameraserver_service 10 | drmserver_service 11 | mediaextractor_service 12 | mediametrics_service 13 | mediaserver_service 14 | }:service_manager find; 15 | 16 | # Allow devicesettings_app to find hal_motor_hwservice 17 | allow devicesettings_app hal_motor_hwservice:hwservice_manager find; 18 | 19 | # Allow devicesettings_app read and write /data/data subdirectory 20 | allow devicesettings_app system_app_data_file:dir create_dir_perms; 21 | allow devicesettings_app system_app_data_file:{ file lnk_file } create_file_perms; 22 | 23 | # Allow binder communication with gpuservice/hal_motor 24 | binder_call(devicesettings_app, gpuservice) 25 | binder_call(devicesettings_app, hal_motor) 26 | 27 | # Allow devicesettings_app to read and write to cgroup/{hall,motor}_device/sysfs_graphics/sysfs_leds/sysfs_thermal 28 | allow devicesettings_app sysfs_leds:dir search; 29 | allow devicesettings_app { 30 | cgroup 31 | sysfs_leds 32 | sysfs_thermal 33 | }:file rw_file_perms; 34 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_custom_seekbar_plus.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /power-libperfmgr/android.hardware.power@1.3-service.sm6150-libperfmgr.rc: -------------------------------------------------------------------------------- 1 | service vendor.power-hal-1-3 /vendor/bin/hw/android.hardware.power@1.3-service.sm6150-libperfmgr 2 | class hal 3 | user root 4 | group system input 5 | priority -20 6 | interface android.hardware.power@1.0::IPower default 7 | interface android.hardware.power@1.1::IPower default 8 | interface android.hardware.power@1.2::IPower default 9 | interface android.hardware.power@1.3::IPower default 10 | 11 | # restart powerHAL when framework died 12 | on property:init.svc.zygote=restarting && property:vendor.powerhal.state=* 13 | setprop vendor.powerhal.state "" 14 | setprop vendor.powerhal.audio "" 15 | setprop vendor.powerhal.rendering "" 16 | restart vendor.power-hal-1-3 17 | 18 | # restart powerHAL when cameraHAL died 19 | on property:init.svc.vendor.camera-provider-2-4=restarting && property:vendor.powerhal.state=CAMERA_STREAMING 20 | setprop vendor.powerhal.state "" 21 | restart vendor.power-hal-1-3 22 | 23 | # restart powerHAL when audioHAL died 24 | on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=AUDIO_LOW_LATENCY 25 | setprop vendor.powerhal.audio "" 26 | restart vendor.power-hal-1-3 27 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml: -------------------------------------------------------------------------------- 1 | 11 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/preferences/SecureSettingCustomSeekBarPreference.java: -------------------------------------------------------------------------------- 1 | package com.xiaomi.parts.preferences; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | public class SecureSettingCustomSeekBarPreference extends CustomSeekBarPreference { 7 | 8 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 9 | super(context, attrs, defStyleAttr, defStyleRes); 10 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 11 | } 12 | 13 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) { 14 | super(context, attrs, defStyleAttr); 15 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 16 | } 17 | 18 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 21 | } 22 | 23 | public SecureSettingCustomSeekBarPreference(Context context) { 24 | super(context); 25 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /gps/gnss/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libgnss 9 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | libutils \ 17 | libcutils \ 18 | libdl \ 19 | liblog \ 20 | libloc_core \ 21 | libgps.utils 22 | 23 | LOCAL_SRC_FILES += \ 24 | location_gnss.cpp \ 25 | GnssAdapter.cpp \ 26 | Agps.cpp \ 27 | XtraSystemStatusObserver.cpp 28 | 29 | LOCAL_CFLAGS += \ 30 | -fno-short-enums \ 31 | 32 | ifeq ($(TARGET_BUILD_VARIANT),user) 33 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 34 | endif 35 | 36 | LOCAL_HEADER_LIBRARIES := \ 37 | libgps.utils_headers \ 38 | libloc_core_headers \ 39 | libloc_pla_headers \ 40 | liblocation_api_headers 41 | 42 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 43 | 44 | LOCAL_PRELINK_MODULE := false 45 | 46 | include $(BUILD_SHARED_LIBRARY) 47 | 48 | endif # not BUILD_TINY_ANDROID 49 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 50 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/thermal/ThermalActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.thermal; 18 | 19 | import android.os.Bundle; 20 | import android.preference.PreferenceActivity; 21 | 22 | public class ThermalActivity extends PreferenceActivity { 23 | 24 | private static final String TAG_THERMAL = "thermal"; 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | getFragmentManager().beginTransaction().replace(android.R.id.content, 31 | new ThermalSettingsFragment(), TAG_THERMAL).commit(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 18 | 19 | 21 | 22 | 23 | true 24 | 25 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/doze/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 The CyanogenMod Project 3 | * 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.os.Bundle; 21 | import android.preference.PreferenceActivity; 22 | 23 | public class DozeSettingsActivity extends PreferenceActivity { 24 | 25 | private static final String TAG_DOZE = "doze"; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | 31 | getFragmentManager().beginTransaction().replace(android.R.id.content, 32 | new DozeSettingsFragment(), TAG_DOZE).commit(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gps/location/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = \ 4 | -I./ \ 5 | -I../utils \ 6 | $(LOCPLA_CFLAGS) \ 7 | $(GPSUTILS_CFLAGS) \ 8 | -std=c++11 9 | 10 | liblocation_api_la_SOURCES = \ 11 | LocationAPI.cpp \ 12 | LocationAPIClientBase.cpp 13 | 14 | if USE_EXTERNAL_AP 15 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 16 | endif 17 | 18 | if USE_GLIB 19 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 24 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 29 | 30 | library_include_HEADERS = \ 31 | LocationAPI.h \ 32 | LocationAPIClientBase.h \ 33 | location_interface.h \ 34 | LocationDataTypes.h \ 35 | ILocationAPI.h 36 | 37 | #Create and Install libraries 38 | lib_LTLIBRARIES = liblocation_api.la 39 | 40 | library_includedir = $(pkgincludedir) 41 | 42 | pkgconfigdir = $(libdir)/pkgconfig 43 | pkgconfig_DATA = location-api.pc 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | -------------------------------------------------------------------------------- /parts/res/layout/thermal_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 17 | 18 | 22 | 23 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /overlay/packages/apps/Snap/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 16 | 17 | 18 | true 19 | 20 | 21 | false 22 | 23 | 24 | false 25 | 26 | 27 | true 28 | 29 | -------------------------------------------------------------------------------- /parts/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Thermal Profiles 20 | Adjust per-app thermal profiles for optimum performance 21 | Default 22 | Benchmark 23 | Browser 24 | Camera 25 | Dialer 26 | Gaming 27 | Streaming 28 | 29 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2018-2020 The LineageOS Project 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | set -e 9 | 10 | INITIAL_COPYRIGHT_YEAR=2019 11 | 12 | # Load extract_utils and do some sanity checks 13 | MY_DIR="${BASH_SOURCE%/*}" 14 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 15 | 16 | LINEAGE_ROOT="${MY_DIR}/../../.." 17 | 18 | HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh" 19 | if [ ! -f "${HELPER}" ]; then 20 | echo "Unable to find helper script at ${HELPER}" 21 | exit 1 22 | fi 23 | source "${HELPER}" 24 | 25 | # Initialize the helper for common 26 | setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true 27 | 28 | # Copyright headers and guards 29 | write_headers "davinci phoenix violet" 30 | 31 | # The standard common blobs 32 | write_makefiles "${MY_DIR}/proprietary-files.txt" true 33 | 34 | # Finish 35 | write_footers 36 | 37 | if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then 38 | # Reinitialize the helper for device 39 | INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR" 40 | setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false 41 | 42 | # Copyright headers and guards 43 | write_headers 44 | 45 | # The standard device blobs 46 | write_makefiles "${MY_DIR}/../${DEVICE}/proprietary-files.txt" true 47 | 48 | # Finish 49 | write_footers 50 | fi 51 | -------------------------------------------------------------------------------- /fingerprint/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017-2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150", 18 | relative_install_path: "hw", 19 | defaults: ["hidl_defaults"], 20 | init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sm6150.rc"], 21 | srcs: [ 22 | "service.cpp", 23 | "BiometricsFingerprint.cpp", 24 | ], 25 | shared_libs: [ 26 | "libbase", 27 | "libhardware", 28 | "libhidlbase", 29 | "libhidltransport", 30 | "libhwbinder", 31 | "liblog", 32 | "libutils", 33 | "libcutils", 34 | "android.hardware.biometrics.fingerprint@2.1", 35 | "vendor.xiaomi.hardware.fingerprintextension@1.0", 36 | ], 37 | proprietary: true, 38 | } 39 | -------------------------------------------------------------------------------- /gps/batching/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(GPSUTILS_CFLAGS) \ 3 | $(LOCCORE_CFLAGS) \ 4 | -I./ \ 5 | -std=c++1y \ 6 | -D__func__=__PRETTY_FUNCTION__ \ 7 | -fno-short-enums 8 | 9 | ACLOCAL_AMFLAGS = -I m4 10 | 11 | requiredlibs = \ 12 | $(GPSUTILS_LIBS) \ 13 | $(LOCCORE_LIBS) \ 14 | -llog 15 | 16 | h_sources = \ 17 | BatchingAdapter.h 18 | 19 | libbatching_la_SOURCES = \ 20 | location_batching.cpp \ 21 | BatchingAdapter.cpp 22 | 23 | if USE_GLIB 24 | libbatching_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 25 | #libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -shared -avoid-version 26 | libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -avoid-version 27 | libbatching_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 28 | else 29 | libbatching_la_CFLAGS = $(AM_CFLAGS) 30 | libbatching_la_LDFLAGS = -Wl,-z,defs -lpthread $(requiredlibs) -shared -version-info 1:0:0 31 | libbatching_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 32 | endif 33 | 34 | library_include_HEADERS = $(h_sources) 35 | 36 | library_includedir = $(pkgincludedir) 37 | 38 | #Create and Install libraries 39 | lib_LTLIBRARIES = libbatching.la 40 | 41 | pkgconfigdir = $(libdir)/pkgconfig 42 | pkgconfig_DATA = location-batching.pc 43 | sysconf_DATA = $(WORKSPACE)/hardware/qcom/gps/etc/flp.conf 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | 46 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_benchmark.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | true 25 | 26 | M22,0C19.94,0.01 18.83,0.04 17.73,0.11C16.91,0.17 16.09,0.25 15.3,0.36C14.5,0.48 13.72,0.62 12.95,0.81C11.42,1.19 9.97,1.72 8.65,2.43C7.32,3.14 6.12,4.02 5.08,5.07C4.04,6.11 3.15,7.31 2.44,8.64C1.73,9.97 1.19,11.42 0.82,12.94C0.63,13.7 0.48,14.49 0.37,15.29C0.25,16.09 0.17,16.9 0.12,17.72C0.05,18.82 0.02,19.93 0.01,21.55 27 | 28 | 29 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 2017-2019 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | 25 | import org.lineageos.settings.doze.DozeUtils; 26 | import org.lineageos.settings.thermal.ThermalUtils; 27 | 28 | public class BootCompletedReceiver extends BroadcastReceiver { 29 | 30 | private static final boolean DEBUG = false; 31 | private static final String TAG = "XiaomiParts"; 32 | 33 | @Override 34 | public void onReceive(final Context context, Intent intent) { 35 | if (DEBUG) Log.d(TAG, "Received boot completed intent"); 36 | DozeUtils.checkDozeService(context); 37 | ThermalUtils.startService(context); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 17 | true 18 | 19 | 20 | org.lineageos.settings.doze/org.lineageos.settings.doze.DozeSettingsActivity 21 | 22 | 23 | /sys/class/power_supply/bms/charge_full_design 24 | /sys/class/power_supply/bms/charge_full 25 | /sys/class/power_supply/bms/cycle_count 26 | 27 | 28 | -------------------------------------------------------------------------------- /gps/geofence/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wundef \ 2 | -Wno-trigraphs \ 3 | -g -O0 \ 4 | -fno-inline \ 5 | -fno-short-enums \ 6 | -fpic \ 7 | ${GPSUTILS_CFLAGS} \ 8 | ${LOCCORE_CFLAGS} \ 9 | $(LOCPLA_CFLAGS) \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -std=c++1y 12 | 13 | AM_CPPFLAGS = $(AM_CFLAGS) 14 | 15 | ACLOCAL_AMFLAGS = -I m4 16 | 17 | requiredlibs = \ 18 | ${LOCCORE_LIBS} \ 19 | $(GPSUTILS_LIBS) \ 20 | -llog 21 | 22 | h_sources = \ 23 | GeofenceAdapter.h 24 | 25 | c_sources = \ 26 | GeofenceAdapter.cpp \ 27 | location_geofence.cpp 28 | 29 | libgeofencing_la_SOURCES = $(c_sources) 30 | if USE_GLIB 31 | libgeofencing_la_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) 32 | libgeofencing_la_CPPFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) $(AM_CPPFLAGS) 33 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs @GLIB_LIBS@ $(requiredlibs) -shared -version-info 1:0:0 34 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ @GLIB_LIBS@ 35 | else 36 | libgeofencing_la_CFLAGS = $(AM_CFLAGS) 37 | libgeofencing_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 38 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs $(requiredlibs) -shared -version-info 1:0:0 39 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ 40 | endif 41 | 42 | library_include_HEADERS = $(h_sources) 43 | 44 | library_includedir = $(pkgincludedir) 45 | 46 | lib_LTLIBRARIES = libgeofencing.la 47 | 48 | pkgconfigdir = $(libdir)/pkgconfig 49 | pkgconfig_DATA = location-geofence.pc 50 | EXTRA_DIST = $(pkgconfig_DATA) 51 | -------------------------------------------------------------------------------- /light/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "android.hardware.light@2.0-service.xiaomi_sm6150" 18 | 19 | #include 20 | #include 21 | 22 | #include "Light.h" 23 | 24 | using android::hardware::configureRpcThreadpool; 25 | using android::hardware::joinRpcThreadpool; 26 | 27 | using android::hardware::light::V2_0::implementation::Light; 28 | 29 | using android::OK; 30 | using android::status_t; 31 | 32 | int main() { 33 | android::sp service = new Light(); 34 | 35 | configureRpcThreadpool(1, true); 36 | 37 | status_t status = service->registerAsService(); 38 | if (status != OK) { 39 | LOG(ERROR) << "Cannot register Light HAL service."; 40 | return 1; 41 | } 42 | 43 | LOG(DEBUG) << "Light HAL service ready."; 44 | 45 | joinRpcThreadpool(); 46 | 47 | LOG(ERROR) << "Light HAL service failed to join thread pool."; 48 | return 1; 49 | } 50 | -------------------------------------------------------------------------------- /gps/core/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_core 9 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | liblog \ 17 | libutils \ 18 | libcutils \ 19 | libgps.utils \ 20 | libdl \ 21 | liblog 22 | 23 | LOCAL_SRC_FILES += \ 24 | LocApiBase.cpp \ 25 | LocAdapterBase.cpp \ 26 | ContextBase.cpp \ 27 | LocContext.cpp \ 28 | loc_core_log.cpp \ 29 | data-items/DataItemsFactoryProxy.cpp \ 30 | SystemStatusOsObserver.cpp \ 31 | SystemStatus.cpp 32 | 33 | LOCAL_CFLAGS += \ 34 | -fno-short-enums \ 35 | -D_ANDROID_ 36 | 37 | LOCAL_C_INCLUDES:= \ 38 | $(LOCAL_PATH)/data-items \ 39 | $(LOCAL_PATH)/data-items/common \ 40 | $(LOCAL_PATH)/observer \ 41 | 42 | LOCAL_HEADER_LIBRARIES := \ 43 | libutils_headers \ 44 | libgps.utils_headers \ 45 | libloc_pla_headers \ 46 | liblocation_api_headers 47 | 48 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 49 | 50 | include $(BUILD_SHARED_LIBRARY) 51 | 52 | include $(CLEAR_VARS) 53 | LOCAL_MODULE := libloc_core_headers 54 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ 55 | $(LOCAL_PATH) \ 56 | $(LOCAL_PATH)/data-items \ 57 | $(LOCAL_PATH)/data-items/common \ 58 | $(LOCAL_PATH)/observer 59 | include $(BUILD_HEADER_LIBRARY) 60 | 61 | endif # not BUILD_TINY_ANDROID 62 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 63 | -------------------------------------------------------------------------------- /power-libperfmgr/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 The Android Open Source Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "android.hardware.power@1.3-service.sm6150-libperfmgr", 18 | relative_install_path: "hw", 19 | vintf_fragments: ["android.hardware.power@1.3-service.sm6150.xml"], 20 | init_rc: ["android.hardware.power@1.3-service.sm6150-libperfmgr.rc"], 21 | srcs: [ 22 | "service.cpp", 23 | "Power.cpp", 24 | "InteractionHandler.cpp", 25 | ], 26 | cflags: [ 27 | "-Wall", 28 | "-Werror", 29 | ], 30 | shared_libs: [ 31 | "libbase", 32 | "libhidlbase", 33 | "libhidltransport", 34 | "liblog", 35 | "libutils", 36 | "libcutils", 37 | "android.hardware.power@1.0", 38 | "android.hardware.power@1.1", 39 | "android.hardware.power@1.2", 40 | "android.hardware.power@1.3", 41 | "libperfmgr", 42 | ], 43 | header_libs: [ 44 | "libhardware_headers", 45 | "generated_kernel_headers", 46 | ], 47 | required: ["powerhint.json"], 48 | proprietary: true, 49 | } 50 | -------------------------------------------------------------------------------- /fod/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150" 18 | 19 | #include 20 | #include 21 | 22 | #include "FingerprintInscreen.h" 23 | 24 | using android::hardware::configureRpcThreadpool; 25 | using android::hardware::joinRpcThreadpool; 26 | 27 | using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreen; 28 | using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::implementation::FingerprintInscreen; 29 | 30 | using android::OK; 31 | using android::status_t; 32 | 33 | int main() { 34 | android::sp service = new FingerprintInscreen(); 35 | 36 | configureRpcThreadpool(1, true); 37 | 38 | status_t status = service->registerAsService(); 39 | if (status != OK) { 40 | LOG(ERROR) << "Cannot register FOD HAL service."; 41 | return 1; 42 | } 43 | 44 | LOG(INFO) << "FOD HAL service ready."; 45 | 46 | joinRpcThreadpool(); 47 | 48 | LOG(ERROR) << "FOD HAL service failed to join thread pool."; 49 | return 1; 50 | } 51 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/SuTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 AICP 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.xiaomi.parts; 18 | 19 | import android.content.Context; 20 | import android.os.AsyncTask; 21 | import android.widget.Toast; 22 | 23 | import com.xiaomi.parts.R; 24 | 25 | public abstract class SuTask extends AsyncTask { 26 | private Context mContext; 27 | 28 | public SuTask(Context context) { 29 | super(); 30 | mContext = context; 31 | } 32 | 33 | abstract protected void sudoInBackground(Params... params) 34 | throws SuShell.SuDeniedException; 35 | 36 | @Override 37 | protected Boolean doInBackground(Params... params) { 38 | try { 39 | sudoInBackground(params); 40 | return true; 41 | } catch (SuShell.SuDeniedException e) { 42 | return false; 43 | } 44 | } 45 | 46 | @Override 47 | protected void onPostExecute(Boolean result) { 48 | super.onPostExecute(result); 49 | if (!result) { 50 | Toast.makeText(mContext, R.string.cannot_get_su, 51 | Toast.LENGTH_LONG).show(); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /VioletParts/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 11 | 12 | 21 | 22 | 26 | 27 | 30 | 31 | 34 | 35 | 37 | 38 | -------------------------------------------------------------------------------- /gps/utils/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | #Compile this library only for builds with the latest modem image 4 | 5 | LOCAL_PATH := $(call my-dir) 6 | 7 | include $(CLEAR_VARS) 8 | 9 | 10 | ## Libs 11 | LOCAL_SHARED_LIBRARIES := \ 12 | libdl \ 13 | libutils \ 14 | libcutils \ 15 | liblog \ 16 | libprocessgroup 17 | 18 | LOCAL_SRC_FILES += \ 19 | loc_log.cpp \ 20 | loc_cfg.cpp \ 21 | msg_q.c \ 22 | linked_list.c \ 23 | loc_target.cpp \ 24 | LocHeap.cpp \ 25 | LocTimer.cpp \ 26 | LocThread.cpp \ 27 | MsgTask.cpp \ 28 | loc_misc_utils.cpp \ 29 | loc_nmea.cpp \ 30 | LocIpc.cpp \ 31 | LogBuffer.cpp 32 | 33 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 34 | LOCAL_CFLAGS += \ 35 | -fno-short-enums \ 36 | -D_ANDROID_ 37 | 38 | ifeq ($(TARGET_BUILD_VARIANT),user) 39 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 40 | endif 41 | 42 | LOCAL_LDFLAGS += -Wl,--export-dynamic 43 | 44 | ## Includes 45 | LOCAL_HEADER_LIBRARIES := \ 46 | libutils_headers \ 47 | libloc_pla_headers \ 48 | liblocation_api_headers 49 | 50 | LOCAL_MODULE := libgps.utils 51 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 52 | # activate the following line for debug purposes only, comment out for production 53 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 54 | LOCAL_VENDOR_MODULE := true 55 | LOCAL_MODULE_TAGS := optional 56 | 57 | LOCAL_PRELINK_MODULE := false 58 | 59 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 60 | 61 | include $(BUILD_SHARED_LIBRARY) 62 | 63 | include $(CLEAR_VARS) 64 | LOCAL_MODULE := libgps.utils_headers 65 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 66 | include $(BUILD_HEADER_LIBRARY) 67 | 68 | endif # not BUILD_TINY_ANDROID 69 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 70 | -------------------------------------------------------------------------------- /fod/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150", 18 | relative_install_path: "hw", 19 | vintf_fragments: ["vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150.xml"], 20 | init_rc: ["vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sm6150.rc"], 21 | defaults: ["hidl_defaults"], 22 | srcs: [ 23 | "service.cpp", 24 | "FingerprintInscreen.cpp", 25 | ], 26 | shared_libs: [ 27 | "libbase", 28 | "libhardware", 29 | "libhardware_legacy", 30 | "libhidlbase", 31 | "libhidltransport", 32 | "liblog", 33 | "libhwbinder", 34 | "libutils", 35 | "vendor.lineage.biometrics.fingerprint.inscreen@1.0", 36 | "vendor.goodix.hardware.biometrics.fingerprint@2.1", 37 | "vendor.xiaomi.hardware.fingerprintextension@1.0", 38 | "vendor.xiaomi.hardware.touchfeature@1.0", 39 | ], 40 | proprietary: true, 41 | } 42 | 43 | cc_library_static { 44 | name: "libfod_extension", 45 | srcs: ["FodExtension.cpp"], 46 | include_dirs: [ 47 | "frameworks/native/services/surfaceflinger/CompositionEngine/include" 48 | ], 49 | } 50 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.0::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/utils/battery_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, The Linux Foundation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer in the documentation and/or other materials provided 12 | * with the distribution. 13 | * * Neither the name of The Linux Foundation nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | typedef void (* battery_status_change_fn_t)(bool); 30 | void loc_extn_battery_properties_listener_init(battery_status_change_fn_t fn); 31 | void loc_extn_battery_properties_listener_deinit(); 32 | bool loc_extn_battery_properties_is_charging(); 33 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_0 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_1 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_1 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/DeviceSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Asus-SDM660 Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License 15 | */ 16 | 17 | package com.xiaomi.parts; 18 | 19 | import android.app.Activity; 20 | import android.app.Fragment; 21 | import android.os.Bundle; 22 | import android.view.MenuItem; 23 | 24 | public class DeviceSettingsActivity extends Activity { 25 | 26 | private DeviceSettings mDeviceSettingsFragment; 27 | 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | 32 | getActionBar().setDisplayHomeAsUpEnabled(true); 33 | 34 | Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content); 35 | if (fragment == null) { 36 | mDeviceSettingsFragment = new DeviceSettings(); 37 | getFragmentManager().beginTransaction() 38 | .add(android.R.id.content, mDeviceSettingsFragment) 39 | .commit(); 40 | } else { 41 | mDeviceSettingsFragment = (DeviceSettings) fragment; 42 | } 43 | } 44 | 45 | @Override 46 | public boolean onOptionsItemSelected(MenuItem item) { 47 | if (item.getItemId() == android.R.id.home) { 48 | finish(); 49 | return true; 50 | } 51 | return super.onOptionsItemSelected(item); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /config.fs: -------------------------------------------------------------------------------- 1 | [AID_VENDOR_QTI_DIAG] 2 | value:2901 3 | 4 | [AID_VENDOR_QDSS] 5 | value:2902 6 | 7 | [AID_VENDOR_RFS] 8 | value:2903 9 | 10 | [AID_VENDOR_RFS_SHARED] 11 | value:2904 12 | 13 | [AID_VENDOR_ADPL_ODL] 14 | value:2905 15 | 16 | [AID_VENDOR_QRTR] 17 | value:2906 18 | 19 | [vendor/bin/cnd] 20 | mode: 0755 21 | user: AID_SYSTEM 22 | group: AID_SYSTEM 23 | caps: NET_BIND_SERVICE NET_ADMIN BLOCK_SUSPEND 24 | 25 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 26 | mode: 0755 27 | user: AID_BLUETOOTH 28 | group: AID_BLUETOOTH 29 | caps: NET_ADMIN BLOCK_SUSPEND 30 | 31 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 32 | mode: 0755 33 | user: AID_BLUETOOTH 34 | group: AID_BLUETOOTH 35 | caps: NET_ADMIN BLOCK_SUSPEND 36 | 37 | [vendor/bin/ims_rtp_daemon] 38 | mode: 0755 39 | user: AID_RADIO 40 | group: AID_RADIO 41 | caps: NET_BIND_SERVICE 42 | 43 | [vendor/bin/imsdatadaemon] 44 | mode: 0755 45 | user: AID_RADIO 46 | group: AID_RADIO 47 | caps: NET_BIND_SERVICE 48 | 49 | [vendor/bin/imsrcsd] 50 | mode: 0755 51 | user: AID_RADIO 52 | group: AID_RADIO 53 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 54 | 55 | [vendor/bin/loc_launcher] 56 | mode: 0755 57 | user: AID_GPS 58 | group: AID_GPS 59 | caps: SETGID SETUID 60 | 61 | [vendor/bin/pd-mapper] 62 | mode: 0755 63 | user: AID_SYSTEM 64 | group: AID_SYSTEM 65 | caps: NET_BIND_SERVICE 66 | 67 | [vendor/bin/pm-service] 68 | mode: 0755 69 | user: AID_SYSTEM 70 | group: AID_SYSTEM 71 | caps: NET_BIND_SERVICE SYS_BOOT 72 | 73 | [vendor/bin/sensors.qti] 74 | mode: 0755 75 | user: AID_SYSTEM 76 | group: AID_SYSTEM 77 | caps: NET_BIND_SERVICE 78 | 79 | [vendor/bin/slim_daemon] 80 | mode: 0755 81 | user: AID_GPS 82 | group: AID_GPS 83 | caps: NET_BIND_SERVICE 84 | 85 | [vendor/bin/xtwifi-client] 86 | mode: 0755 87 | user: AID_GPS 88 | group: AID_GPS 89 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 90 | 91 | [vendor/firmware_mnt/image/*] 92 | mode: 0771 93 | user: AID_SYSTEM 94 | group: AID_SYSTEM 95 | caps: 0 96 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.0::IGnss/gnss_vendor 33 | @1.1::IGnss/default 34 | @2.0::IGnss/default 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /manifest_sdmmagpie.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | android.hardware.contexthub 32 | hwbinder 33 | 1.0 34 | 35 | IContexthub 36 | default 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /light/android.hardware.light@2.0-service.xiaomi_sm6150.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | # Backlight 3 | chown system system /sys/class/backlight/panel0-backlight/brightness 4 | chown system system /sys/class/backlight/panel0-backlight/max_brightness 5 | chmod 0644 /sys/class/backlight/panel0-backlight/brightness 6 | chmod 0644 /sys/class/backlight/panel0-backlight/max_brightness 7 | 8 | # Real notification light 9 | chown system system /sys/class/leds/green/brightness 10 | 11 | chown system system /sys/class/leds/green/breath 12 | chown system system /sys/class/leds/green/delay_off 13 | chown system system /sys/class/leds/green/delay_on 14 | 15 | chmod 660 /sys/class/leds/green/breath 16 | chmod 660 /sys/class/leds/green/delay_off 17 | chmod 660 /sys/class/leds/green/delay_on 18 | 19 | # Camera motor light 20 | chown system system /sys/class/leds/blue/brightness 21 | 22 | chown system system /sys/class/leds/blue/breath 23 | chown system system /sys/class/leds/blue/delay_off 24 | chown system system /sys/class/leds/blue/delay_on 25 | 26 | chmod 660 /sys/class/leds/blue/breath 27 | chmod 660 /sys/class/leds/blue/delay_off 28 | chmod 660 /sys/class/leds/blue/delay_on 29 | 30 | chown system system /sys/class/leds/green/step_ms 31 | chown system system /sys/class/leds/green/pause_lo_count 32 | chown system system /sys/class/leds/green/lut_pattern 33 | chown system system /sys/class/leds/green/lo_idx 34 | chown system system /sys/class/leds/blue/step_ms 35 | chown system system /sys/class/leds/blue/pause_lo_count 36 | chown system system /sys/class/leds/blue/lut_pattern 37 | chown system system /sys/class/leds/blue/lo_idx 38 | 39 | start vendor.light-hal-2-0 40 | 41 | service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_sm6150 42 | interface android.hardware.light@2.0::ILight default 43 | class hal 44 | user system 45 | group system 46 | # shutting off lights while powering-off 47 | shutdown critical 48 | disabled 49 | -------------------------------------------------------------------------------- /overlay/packages/apps/Snap/res/values/camera2arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 34 | 35 | 0 36 | 37 | 38 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/DiracUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.xiaomi.parts; 18 | 19 | final class DiracUtils { 20 | 21 | private final DiracSound mDiracSound; 22 | 23 | DiracUtils() { 24 | mDiracSound = new DiracSound(0, 0); 25 | } 26 | 27 | void onBootCompleted() { 28 | setEnabled(mDiracSound.getMusic() == 1); 29 | mDiracSound.setHeadsetType(mDiracSound.getHeadsetType()); 30 | setLevel(getLevel()); 31 | } 32 | 33 | void setEnabled(boolean enable) { 34 | mDiracSound.setEnabled(enable); 35 | mDiracSound.setMusic(enable ? 1 : 0); 36 | } 37 | 38 | boolean isDiracEnabled() { 39 | return mDiracSound.getMusic() == 1; 40 | } 41 | 42 | private String getLevel() { 43 | StringBuilder selected = new StringBuilder(); 44 | for (int band = 0; band <= 6; band++) { 45 | int temp = (int) mDiracSound.getLevel(band); 46 | selected.append(temp); 47 | if (band != 6) selected.append(","); 48 | } 49 | return selected.toString(); 50 | } 51 | 52 | void setLevel(String preset) { 53 | String[] level = preset.split("\\s*,\\s*"); 54 | for (int band = 0; band <= level.length - 1; band++) { 55 | mDiracSound.setLevel(band, Float.valueOf(level[band])); 56 | } 57 | } 58 | 59 | void setHeadsetType(int paramInt) { 60 | mDiracSound.setHeadsetType(paramInt); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 23 | 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V2_0::IGnssDebug; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* Interface for GNSS Debug support. */ 42 | struct Gnss; 43 | struct GnssDebug : public IGnssDebug { 44 | GnssDebug(Gnss* gnss); 45 | ~GnssDebug() {}; 46 | 47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow 48 | Return getDebugData(getDebugData_cb _hidl_cb) override; 49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow. 50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override; 51 | 52 | private: 53 | Gnss* mGnss = nullptr; 54 | }; 55 | 56 | } // namespace implementation 57 | } // namespace V2_0 58 | } // namespace gnss 59 | } // namespace hardware 60 | } // namespace android 61 | 62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 63 | -------------------------------------------------------------------------------- /power-libperfmgr/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "android.hardware.power@1.3-service.sm6150-libperfmgr" 18 | 19 | #include 20 | #include 21 | 22 | #include "Power.h" 23 | 24 | using android::sp; 25 | using android::status_t; 26 | using android::OK; 27 | 28 | // libhwbinder: 29 | using android::hardware::configureRpcThreadpool; 30 | using android::hardware::joinRpcThreadpool; 31 | 32 | // Generated HIDL files 33 | using android::hardware::power::V1_3::IPower; 34 | using android::hardware::power::V1_3::implementation::Power; 35 | 36 | int main(int /* argc */, char** /* argv */) { 37 | ALOGI("Power HAL Service 1.3 for Coral is starting."); 38 | 39 | android::sp service = new Power(); 40 | if (service == nullptr) { 41 | ALOGE("Can not create an instance of Power HAL Iface, exiting."); 42 | return 1; 43 | } 44 | android::hardware::setMinSchedulerPolicy(service, SCHED_NORMAL, -20); 45 | configureRpcThreadpool(1, true /*callerWillJoin*/); 46 | 47 | status_t status = service->registerAsService(); 48 | if (status != OK) { 49 | ALOGE("Could not register service for Power HAL Iface (%d), exiting.", status); 50 | return 1; 51 | } 52 | 53 | ALOGI("Power Service is ready"); 54 | joinRpcThreadpool(); 55 | 56 | // In normal operation, we don't expect the thread pool to exit 57 | ALOGE("Power Service is shutting down"); 58 | return 1; 59 | } 60 | -------------------------------------------------------------------------------- /gps/geofence/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.61) 2 | AC_INIT([location-geofence], 1.0.0) 3 | AM_INIT_AUTOMAKE([foreign subdir-objects]) 4 | AC_CONFIG_SRCDIR([Makefile.am]) 5 | AC_CONFIG_HEADERS([config.h]) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | 8 | # Check for programs 9 | AC_PROG_LIBTOOL 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | AM_PROG_CC_C_O 13 | AC_PROG_AWK 14 | AC_PROG_CPP 15 | AC_PROG_INSTALL 16 | AC_PROG_LN_S 17 | AC_PROG_MAKE_SET 18 | PKG_PROG_PKG_CONFIG 19 | 20 | # Check for libraries 21 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 22 | AC_SUBST([GPSUTILS_CFLAGS]) 23 | AC_SUBST([GPSUTILS_LIBS]) 24 | 25 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 26 | AC_SUBST([LOCCORE_CFLAGS]) 27 | AC_SUBST([LOCCORE_LIBS]) 28 | 29 | AS_CASE([$host], 30 | [arm*], [ARM=yes], 31 | [ARM=no] 32 | ) 33 | 34 | AC_ARG_WITH([locpla_includes], 35 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 36 | [specify the path to locpla-includes in loc-pla_git.bb]), 37 | [locpla_incdir=$withval], 38 | with_locpla_includes=no) 39 | 40 | if test "x$with_locpla_includes" != "xno"; then 41 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 42 | fi 43 | 44 | AC_ARG_WITH([glib], 45 | AC_HELP_STRING([--with-glib], 46 | [enable glib, building HLOS systems which use glib])) 47 | 48 | if (test "x${with_glib}" = "xyes"); then 49 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 50 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 51 | AC_MSG_ERROR(GThread >= 2.16 is required)) 52 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GLib >= 2.16 is required)) 54 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 55 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 56 | 57 | AC_SUBST(GLIB_CFLAGS) 58 | AC_SUBST(GLIB_LIBS) 59 | fi 60 | 61 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 62 | 63 | AC_SUBST([CFLAGS]) 64 | AC_SUBST([CPPFLAGS]) 65 | AC_SUBST([LIBS]) 66 | 67 | AC_CONFIG_FILES([ \ 68 | Makefile \ 69 | location-geofence.pc 70 | ]) 71 | 72 | AC_OUTPUT 73 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -Wundef \ 4 | -MD \ 5 | -Wno-trigraphs \ 6 | -g -O0 \ 7 | -fno-inline \ 8 | -fno-short-enums \ 9 | -fpic \ 10 | -I./ \ 11 | -std=c++14 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | SkipList.h\ 27 | loc_misc_utils.h \ 28 | loc_nmea.h \ 29 | gps_extended_c.h \ 30 | gps_extended.h \ 31 | loc_gps.h \ 32 | log_util.h \ 33 | LocSharedLock.h \ 34 | LocUnorderedSetMap.h 35 | 36 | libgps_utils_la_c_sources = \ 37 | linked_list.c \ 38 | msg_q.c \ 39 | loc_cfg.cpp \ 40 | loc_log.cpp \ 41 | loc_target.cpp \ 42 | LocHeap.cpp \ 43 | LocTimer.cpp \ 44 | LocThread.cpp \ 45 | LocIpc.cpp \ 46 | LogBuffer.cpp \ 47 | MsgTask.cpp \ 48 | loc_misc_utils.cpp \ 49 | loc_nmea.cpp 50 | 51 | library_includedir = $(pkgincludedir) 52 | 53 | library_include_HEADERS = $(libgps_utils_la_h_sources) 54 | 55 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 56 | 57 | if USE_GLIB 58 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 59 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 60 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 61 | else 62 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 63 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 64 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 65 | endif 66 | 67 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) -ldl 68 | 69 | #Create and Install libraries 70 | lib_LTLIBRARIES = libgps_utils.la 71 | 72 | pkgconfigdir = $(libdir)/pkgconfig 73 | pkgconfig_DATA = gps-utils.pc 74 | EXTRA_DIST = $(pkgconfig_DATA) 75 | -------------------------------------------------------------------------------- /power-libperfmgr/InteractionHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef INTERACTIONHANDLER_H 18 | #define INTERACTIONHANDLER_H 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | using ::android::perfmgr::HintManager; 27 | 28 | enum interaction_state { 29 | INTERACTION_STATE_UNINITIALIZED, 30 | INTERACTION_STATE_IDLE, 31 | INTERACTION_STATE_INTERACTION, 32 | INTERACTION_STATE_WAITING, 33 | }; 34 | 35 | struct InteractionHandler { 36 | InteractionHandler(std::shared_ptr const & hint_manager); 37 | ~InteractionHandler(); 38 | bool Init(); 39 | void Exit(); 40 | void Acquire(int32_t duration); 41 | 42 | private: 43 | void Release(); 44 | void WaitForIdle(int32_t wait_ms, int32_t timeout_ms); 45 | void AbortWaitLocked(); 46 | void Routine(); 47 | 48 | void PerfLock(); 49 | void PerfRel(); 50 | 51 | long long CalcTimespecDiffMs(struct timespec start, struct timespec end); 52 | 53 | enum interaction_state mState; 54 | 55 | int mIdleFd; 56 | int mEventFd; 57 | 58 | int32_t mWaitMs; 59 | int32_t mMinDurationMs; 60 | int32_t mMaxDurationMs; 61 | int32_t mDurationMs; 62 | 63 | struct timespec mLastTimespec; 64 | 65 | std::unique_ptr mThread; 66 | std::mutex mLock; 67 | std::condition_variable mCond; 68 | std::shared_ptr mHintManager; 69 | }; 70 | 71 | #endif //INTERACTIONHANDLER_H 72 | -------------------------------------------------------------------------------- /parts/res/layout/switch_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 27 | 28 | 40 | 41 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /gps/etc/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /rootdir/etc/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | on init 29 | write /sys/class/backlight/panel0-backlight/brightness 200 30 | 31 | setprop sys.usb.configfs 1 32 | 33 | on property:ro.boot.usbconfigfs=false 34 | setprop sys.usb.configfs 0 35 | 36 | on property:ro.boot.usbcontroller=* 37 | setprop sys.usb.controller ${ro.boot.usbcontroller} 38 | 39 | on fs 40 | wait /dev/block/platform/soc/${ro.boot.bootdevice} 41 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 42 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/kcal/Utils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Asus-SDM660 Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License 15 | */ 16 | 17 | package com.xiaomi.parts.kcal; 18 | 19 | public interface Utils { 20 | String PREF_ENABLED = "kcal_enabled"; 21 | String PREF_SETONBOOT = "set_on_boot"; 22 | String PREF_MINIMUM = "color_minimum"; 23 | String PREF_RED = "color_red"; 24 | String PREF_GREEN = "color_green"; 25 | String PREF_BLUE = "color_blue"; 26 | String PREF_SATURATION = "saturation"; 27 | String PREF_VALUE = "value"; 28 | String PREF_CONTRAST = "contrast"; 29 | String PREF_HUE = "hue"; 30 | String PREF_GRAYSCALE = "grayscale"; 31 | 32 | boolean SETONBOOT_DEFAULT = false; 33 | int MINIMUM_DEFAULT = 35; 34 | int RED_DEFAULT = 255; 35 | int GREEN_DEFAULT = 255; 36 | int BLUE_DEFAULT = 255; 37 | int SATURATION_DEFAULT = 35; 38 | int SATURATION_OFFSET = 225; 39 | int VALUE_DEFAULT = 127; 40 | int VALUE_OFFSET = 128; 41 | int CONTRAST_DEFAULT = 127; 42 | int CONTRAST_OFFSET = 128; 43 | int HUE_DEFAULT = 0; 44 | boolean GRAYSCALE_DEFAULT = false; 45 | 46 | String KCAL_ENABLE = "/sys/devices/platform/kcal_ctrl.0/kcal_enable"; 47 | String KCAL_CONT = "/sys/devices/platform/kcal_ctrl.0/kcal_cont"; 48 | String KCAL_HUE = "/sys/devices/platform/kcal_ctrl.0/kcal_hue"; 49 | String KCAL_MIN = "/sys/evices/platform/kcal_ctrl.0/kcal_min"; 50 | String KCAL_RGB = "/sys/devices/platform/kcal_ctrl.0/kcal_red"; 51 | String KCAL_SAT = "/sys/devices/platform/kcal_ctrl.0/kcal_sat"; 52 | String KCAL_VAL = "/sys/devices/platform/kcal_ctrl.0/kcal_val"; 53 | } 54 | -------------------------------------------------------------------------------- /audio/bluetooth_qti_audio_policy_configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 39 | 41 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /parts/res/xml/doze_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 26 | 27 | 30 | 31 | 36 | 37 | 38 | 39 | 42 | 43 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /VioletParts/src/com/xiaomi/parts/Fastcharge.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 ronaxdevil 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | package com.xiaomi.parts; 19 | 20 | import android.content.Context; 21 | import android.content.SharedPreferences; 22 | import android.provider.Settings; 23 | import androidx.preference.Preference; 24 | import androidx.preference.Preference.OnPreferenceChangeListener; 25 | import androidx.preference.PreferenceManager; 26 | 27 | import com.xiaomi.parts.DeviceSettings; 28 | 29 | public class Fastcharge implements OnPreferenceChangeListener { 30 | 31 | private Context mContext; 32 | 33 | public Fastcharge(Context context) { 34 | mContext = context; 35 | } 36 | 37 | public static String getFile() { 38 | if (FileUtils.fileWritable(DeviceSettings.USB_FASTCHARGE_PATH)) { 39 | return DeviceSettings.USB_FASTCHARGE_PATH; 40 | } 41 | return null; 42 | } 43 | 44 | public static boolean isSupported() { 45 | return FileUtils.fileWritable(getFile()); 46 | } 47 | 48 | public static boolean isCurrentlyEnabled(Context context) { 49 | return FileUtils.getFileValueAsBoolean(getFile(), false); 50 | } 51 | 52 | @Override 53 | public boolean onPreferenceChange(Preference preference, Object value) { 54 | final String key = preference.getKey(); 55 | switch (key) { 56 | case DeviceSettings.PREF_USB_FASTCHARGE: 57 | FileUtils.setValue(DeviceSettings.USB_FASTCHARGE_PATH, (boolean) value); 58 | break; 59 | 60 | default: 61 | break; 62 | } 63 | return true; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /overlay/packages/apps/Bluetooth/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | true 31 | true 32 | true 33 | true 34 | false 35 | true 36 | 37 | -------------------------------------------------------------------------------- /VioletParts/res/drawable/ic_custom_seekbar_reset.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 19 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /media/system_properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /overlay/vendor/qcom/opensource/commonsys/packages/apps/Bluetooth/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | true 31 | true 32 | true 33 | true 34 | false 35 | true 36 | 37 | -------------------------------------------------------------------------------- /overlay-system/vendor/qcom/opensource/commonsys/packages/apps/Bluetooth/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | true 31 | true 32 | true 33 | true 34 | false 35 | true 36 | 37 | -------------------------------------------------------------------------------- /fingerprint/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * Copyright (C) 2020 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #include "BiometricsFingerprint.h" 19 | 20 | // libhwbinder: 21 | using android::hardware::configureRpcThreadpool; 22 | using android::hardware::joinRpcThreadpool; 23 | 24 | // Generated HIDL files 25 | using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint; 26 | 27 | using android::status_t; 28 | 29 | status_t BiometricsFingerprint::registerAsSystemService() { 30 | status_t ret = 0; 31 | 32 | ret = IBiometricsFingerprint::registerAsService(); 33 | if (ret != 0) { 34 | ALOGE("Failed to register IBiometricsFingerprint (%d)", ret); 35 | goto fail; 36 | } else { 37 | ALOGI("Successfully registered IBiometricsFingerprint"); 38 | } 39 | 40 | ret = IXiaomiFingerprint::registerAsService(); 41 | if (ret != 0) { 42 | ALOGE("Failed to register IXiaomiFingerprint (%d)", ret); 43 | goto fail; 44 | } else { 45 | ALOGI("Successfully registered IXiaomiFingerprint"); 46 | } 47 | 48 | fail: 49 | return ret; 50 | } 51 | 52 | int main() { 53 | android::sp service = nullptr; 54 | 55 | service = new BiometricsFingerprint(); 56 | if (service == nullptr) { 57 | ALOGE("Instance of BiometricsFingerprint is null"); 58 | return 1; 59 | } 60 | 61 | configureRpcThreadpool(1, true /*callerWillJoin*/); 62 | 63 | status_t status = service->registerAsSystemService(); 64 | if (status != android::OK) { 65 | ALOGE("Cannot register service for Fingerprint HAL(%d).", status); 66 | return 1; 67 | } 68 | 69 | joinRpcThreadpool(); 70 | 71 | return 0; // should never get here 72 | } 73 | -------------------------------------------------------------------------------- /gps/core/data-items/DataItemsFactoryProxy.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2017, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __DATAITEMFACTORYBASE__ 31 | #define __DATAITEMFACTORYBASE__ 32 | 33 | #include 34 | #include 35 | 36 | namespace loc_core 37 | { 38 | 39 | #define DATA_ITEMS_LIB_NAME "libdataitems.so" 40 | #define DATA_ITEMS_GET_CONCRETE_DI "getConcreteDataItem" 41 | 42 | typedef IDataItemCore * (get_concrete_data_item_fn)(DataItemId); 43 | 44 | class DataItemsFactoryProxy { 45 | public: 46 | static IDataItemCore* createNewDataItem(DataItemId id); 47 | static void closeDataItemLibraryHandle(); 48 | static void *dataItemLibHandle; 49 | static get_concrete_data_item_fn *getConcreteDIFunc; 50 | }; 51 | 52 | } // namespace loc_core 53 | 54 | #endif //__DATAITEMFACTORYBASE__ 55 | 56 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | persist.bluetooth.bqr.event_mask=14 3 | persist.bluetooth.bqr.min_interval_ms=500 4 | persist.vendor.bt.a2dp.aac_whitelist=false 5 | ro.bluetooth.library_name=libbluetooth_qti.so 6 | vendor.bluetooth.soc=cherokee 7 | vendor.qcom.bluetooth.soc=cherokee 8 | 9 | # Camera 10 | vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,org.lineageos.snap 11 | 12 | # CNE 13 | persist.vendor.cne.feature=1 14 | 15 | # Data 16 | persist.data.df.dev_name=rmnet_usb0 17 | persist.vendor.data.profile_update=true 18 | 19 | # DPM 20 | persist.vendor.dpm.feature=1 21 | persist.vendor.dpm.loglevel=0 22 | persist.vendor.dpm.nsrm.bkg.evt=3955 23 | 24 | 25 | # Graphics 26 | persist.demo.hdmirotationlock=false 27 | persist.hwc.enable_vds=1 28 | 29 | ro.surface_flinger.force_hwc_copy_for_virtual_displays=true 30 | ro.surface_flinger.has_HDR_display=true 31 | ro.surface_flinger.has_wide_color_display=true 32 | ro.surface_flinger.max_frame_buffer_acquired_buffers=3 33 | ro.surface_flinger.max_virtual_display_dimension=4096 34 | 35 | # Disable vsync for cpu rendered apps 36 | debug.cpurend.vsync=false 37 | 38 | ro.surface_flinger.protected_contents=true 39 | ro.surface_flinger.use_color_management=true 40 | ro.surface_flinger.vsync_event_phase_offset_ns=2000000 41 | ro.surface_flinger.vsync_sf_event_phase_offset_ns=6000000 42 | ro.surface_flinger.wcg_composition_dataspace=143261696 43 | debug.hwui.renderer=skiagl 44 | 45 | # LMKD 46 | ro.config.low_ram = false 47 | ro.lmk.kill_heaviest_task = true 48 | ro.lmk.kill_timeout_ms = 100 49 | ro.lmk.use_minfree_levels = true 50 | 51 | # Media 52 | media.stagefright.thumbnail.prefer_hw_codecs=true 53 | 54 | # Media 55 | media.stagefright.thumbnail.prefer_hw_codecs=true 56 | 57 | # Netflix 58 | ro.netflix.bsp_rev=Q6150-17263-1 59 | 60 | # Radio 61 | DEVICE_PROVISIONED=1 62 | persist.sys.fflag.override.settings_network_and_internet_v2=true 63 | persist.vendor.ims.disableADBLogs=1 64 | persist.vendor.ims.disableIMSLogs=1 65 | persist.vendor.radio.enable_temp_dds=true 66 | persist.vendor.radio.force_on_dc=true 67 | ril.subscription.types=RUIM 68 | 69 | # Time 70 | persist.vendor.delta_time.enable=true 71 | 72 | # Wireless display 73 | debug.sf.latch_unsignaled=1 74 | persist.debug.wfd.enable=1 75 | persist.sys.wfd.virtual=0 76 | 77 | # Zygote 78 | persist.device_config.runtime_native.usap_pool_enabled=true 79 | 80 | #Build Fingerprint 81 | ro.build.fingerprint=google/redfin/redfin:11/RD1A.201105.003.C1/6886399:user/release-keys 82 | -------------------------------------------------------------------------------- /gps/core/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -I./ \ 4 | $(LOCPLA_CFLAGS) \ 5 | $(GPSUTILS_CFLAGS) \ 6 | -I./data-items/ \ 7 | -I./data-items/common \ 8 | -I./observer \ 9 | -I$(WORKSPACE)/gps-noship/flp \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -fno-short-enums \ 12 | -std=c++11 13 | 14 | libloc_core_la_h_sources = \ 15 | LocApiBase.h \ 16 | LocAdapterBase.h \ 17 | ContextBase.h \ 18 | LocContext.h \ 19 | LBSProxyBase.h \ 20 | loc_core_log.h \ 21 | LocAdapterProxyBase.h \ 22 | EngineHubProxyBase.h \ 23 | data-items/DataItemId.h \ 24 | data-items/IDataItemCore.h \ 25 | data-items/DataItemConcreteTypesBase.h \ 26 | observer/IDataItemObserver.h \ 27 | observer/IDataItemSubscription.h \ 28 | observer/IFrameworkActionReq.h \ 29 | observer/IOsObserver.h \ 30 | SystemStatusOsObserver.h \ 31 | SystemStatus.h 32 | 33 | libloc_core_la_c_sources = \ 34 | LocApiBase.cpp \ 35 | LocAdapterBase.cpp \ 36 | ContextBase.cpp \ 37 | LocContext.cpp \ 38 | loc_core_log.cpp \ 39 | data-items/DataItemsFactoryProxy.cpp \ 40 | SystemStatusOsObserver.cpp \ 41 | SystemStatus.cpp 42 | 43 | if USE_EXTERNAL_AP 44 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 45 | endif 46 | 47 | library_includedir = $(pkgincludedir) 48 | 49 | library_include_HEADERS = $(libloc_core_la_h_sources) 50 | 51 | libloc_core_la_SOURCES = $(libloc_core_la_c_sources) 52 | 53 | if USE_GLIB 54 | libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 55 | libloc_core_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 56 | libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 57 | else 58 | libloc_core_la_CFLAGS = $(AM_CFLAGS) 59 | libloc_core_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 60 | libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 61 | endif 62 | 63 | if USE_FEATURE_AUTOMOTIVE 64 | AM_CFLAGS += -DFEATURE_AUTOMOTIVE 65 | endif 66 | 67 | libloc_core_la_LIBADD = -ldl $(GPSUTILS_LIBS) 68 | 69 | #Create and Install libraries 70 | lib_LTLIBRARIES = libloc_core.la 71 | 72 | pkgconfigdir = $(libdir)/pkgconfig 73 | pkgconfig_DATA = loc-core.pc 74 | EXTRA_DIST = $(pkgconfig_DATA) 75 | -------------------------------------------------------------------------------- /releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 3 | # Copyright (C) 2017-2018 The LineageOS Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import common 18 | import re 19 | 20 | def FullOTA_Assertions(info): 21 | AddBasebandAssertion(info, info.input_zip) 22 | return 23 | 24 | def IncrementalOTA_Assertions(info): 25 | AddBasebandAssertion(info, info.target_zip) 26 | return 27 | 28 | def FullOTA_InstallEnd(info): 29 | OTA_InstallEnd(info) 30 | return 31 | 32 | def IncrementalOTA_InstallEnd(info): 33 | OTA_InstallEnd(info) 34 | return 35 | 36 | def AddBasebandAssertion(info, input_zip): 37 | android_info = input_zip.read("OTA/android-info.txt") 38 | m = re.search(r'require\s+version-baseband\s*=\s*(.+)', android_info) 39 | if m: 40 | timestamp, firmware_version = m.group(1).rstrip().split(',') 41 | timestamps = timestamp.split('|') 42 | if ((len(timestamps) and '*' not in timestamps) and \ 43 | (len(firmware_version) and '*' not in firmware_version)): 44 | cmd = 'assert(xiaomi.verify_baseband(' + ','.join(['"%s"' % baseband for baseband in timestamps]) + ') == "1" || abort("ERROR: This package requires firmware from MIUI {1} or newer. Please upgrade firmware and retry!"););' 45 | info.script.AppendExtra(cmd.format(timestamps, firmware_version)) 46 | return 47 | 48 | def AddImage(info, basename, dest): 49 | name = basename 50 | data = info.input_zip.read("IMAGES/" + basename) 51 | common.ZipWriteStr(info.output_zip, name, data) 52 | info.script.Print("Patching {} image unconditionally...".format(dest.split('/')[-1])) 53 | info.script.AppendExtra('package_extract_file("%s", "%s");' % (name, dest)) 54 | 55 | def OTA_InstallEnd(info): 56 | AddImage(info, "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta") 57 | AddImage(info, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo") 58 | return 59 | -------------------------------------------------------------------------------- /gps/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | # ************************************************ 48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 49 | # ************************************************ 50 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libloc_api*) 51 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_gaming.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | 6 | /* Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | 22 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 23 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IGnssConfiguration; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* 42 | * Interface for passing GNSS configuration info from platform to HAL. 43 | */ 44 | struct Gnss; 45 | struct GnssConfiguration : public IGnssConfiguration { 46 | GnssConfiguration(Gnss* gnss); 47 | ~GnssConfiguration() = default; 48 | 49 | /* 50 | * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow. 51 | * These declarations were generated from IGnssConfiguration.hal. 52 | */ 53 | Return setSuplVersion(uint32_t version) override; 54 | Return setSuplMode(uint8_t mode) override; 55 | Return setSuplEs(bool enabled) override; 56 | Return setLppProfile(uint8_t lppProfile) override; 57 | Return setGlonassPositioningProtocol(uint8_t protocol) override; 58 | Return setEmergencySuplPdn(bool enable) override; 59 | Return setGpsLock(uint8_t lock) override; 60 | 61 | private: 62 | Gnss* mGnss = nullptr; 63 | }; 64 | 65 | } // namespace implementation 66 | } // namespace V1_0 67 | } // namespace gnss 68 | } // namespace hardware 69 | } // namespace android 70 | 71 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 72 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /light/Light.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | #include 22 | 23 | namespace android { 24 | namespace hardware { 25 | namespace light { 26 | namespace V2_0 { 27 | namespace implementation { 28 | 29 | using ::android::hardware::Return; 30 | using ::android::hardware::light::V2_0::ILight; 31 | using ::android::hardware::light::V2_0::LightState; 32 | using ::android::hardware::light::V2_0::Status; 33 | using ::android::hardware::light::V2_0::Type; 34 | 35 | class Light : public ILight { 36 | public: 37 | Light(); 38 | 39 | Return setLight(Type type, const LightState& state) override; 40 | Return getSupportedTypes(getSupportedTypes_cb _hidl_cb) override; 41 | 42 | private: 43 | void setLightBacklight(Type type, const LightState& state); 44 | void setLightNotification(Type type, const LightState& state); 45 | void applyNotificationState(const LightState& state); 46 | 47 | uint32_t max_led_brightness_; 48 | uint32_t max_screen_brightness_; 49 | 50 | std::unordered_map> lights_{ 51 | {Type::ATTENTION, [this](auto&&... args) { setLightNotification(args...); }}, 52 | {Type::BACKLIGHT, [this](auto&&... args) { setLightBacklight(args...); }}, 53 | {Type::BATTERY, [this](auto&&... args) { setLightNotification(args...); }}, 54 | {Type::NOTIFICATIONS, [this](auto&&... args) { setLightNotification(args...); }}}; 55 | 56 | // Keep sorted in the order of importance. 57 | std::array, 3> notif_states_ = {{ 58 | {Type::ATTENTION, {}}, 59 | {Type::NOTIFICATIONS, {}}, 60 | {Type::BATTERY, {}}, 61 | }}; 62 | }; 63 | 64 | } // namespace implementation 65 | } // namespace V2_0 66 | } // namespace light 67 | } // namespace hardware 68 | } // namespace android 69 | --------------------------------------------------------------------------------