├── configs
├── sensors
│ └── hals.conf
├── msm_irqbalance.conf
├── gps
│ ├── gps.conf
│ └── lowi.conf
├── hotword-hiddenapi-package-whitelist.xml
├── permissions
│ ├── hotword-hiddenapi-package-whitelist.xml
│ ├── privapp-permissions-hotword.xml
│ └── com.android.hotwordenrollment.common.util.xml
├── privapp-permissions-hotword.xml
├── android.hardware.camera.ar.xml
└── component-overrides.xml
├── recovery
├── Android.mk
└── gpt-utils
│ └── Android.bp
├── sepolicy
├── vendor
│ ├── idmap.te
│ ├── atfwd.te
│ ├── su.te
│ ├── charger.te
│ ├── hal_cas_default.te
│ ├── proc_net.te
│ ├── usbd.te
│ ├── apexd.te
│ ├── dnsmasq.te
│ ├── lmkd.te
│ ├── hal_dpmQmiMgr.te
│ ├── hwservice.te
│ ├── mediaswcodec.te
│ ├── poweroffalarm_app.te
│ ├── irsc_util.te
│ ├── device.te
│ ├── hal_bluetooth_qti.te
│ ├── shared_relro.te
│ ├── traceur_app.te
│ ├── network_stack.te
│ ├── power_off_alarm.te
│ ├── secure_element.te
│ ├── timeservice_app.te
│ ├── blkid_untrusted.te
│ ├── energyawareness.te
│ ├── hal_health_default.te
│ ├── hostapd.te
│ ├── update_verifier.te
│ ├── vendor_qtelephony.te
│ ├── attributes
│ ├── vdc.te
│ ├── vendor_dataservice_ap.te
│ ├── hal_wifi_hostapd_default.te
│ ├── msm_irqbalanced.te
│ ├── vold_prepare_subdirs.te
│ ├── location.te
│ ├── toolbox.te
│ ├── hal_soter_qti.te
│ ├── hal_wifi_supplicant_default.te
│ ├── service.te
│ ├── vndservice_contexts
│ ├── hal_wifi_default.te
│ ├── mediadrmserver.te
│ ├── hal_gnss_qti.te
│ ├── hal_ir_default.te
│ ├── vndservice.te
│ ├── ims.te
│ ├── netutils_wrapper.te
│ ├── vndservicemanager.te
│ ├── hal_light_default.te
│ ├── ipacm-diag.te
│ ├── hal_imsrtp.te
│ ├── hal_wifi_defaul.te
│ ├── qtidataservices_app.te
│ ├── service_contexts
│ ├── hal_memtrack_default.te
│ ├── installd.te
│ ├── hal_drm_widevine.te
│ ├── sensors.te
│ ├── vendor_dpmd.te
│ ├── hal_dms.te
│ ├── vendor_per_mgr.te
│ ├── rfs_access.te
│ ├── app_zygote.te
│ ├── hal_bluetooth_default.te
│ ├── app.te
│ ├── hvdcp.te
│ ├── hwservice_contexts
│ ├── time_daemon.te
│ ├── cameraserver.te
│ ├── hal_vibrator_default.te
│ ├── hal_bootctl_default.te
│ ├── rild.te
│ ├── healthd.te
│ ├── kernel.te
│ ├── hal_sensors_default.te
│ ├── servicemanager.te
│ ├── hal_rcsservice.te
│ ├── netd.te
│ ├── rmt_storage.te
│ ├── dumpstate.te
│ ├── webview_zygote.te
│ ├── hal_graphics_allocator_default.te
│ ├── bootanim.te
│ ├── vold.te
│ ├── hal_graphics_composer_default.te
│ ├── hal_keymaster_qti.te
│ ├── hwservicemanager.te
│ ├── cnd.te
│ ├── hal_perf_default.te
│ ├── mediaprovider.te
│ ├── hal_power_default.te
│ ├── isolated_app.te
│ ├── netmgrd.te
│ ├── bluetooth.te
│ ├── property.te
│ ├── surfaceflinger.te
│ ├── shell.te
│ ├── hal_dms_default.te
│ ├── wcnss_service.te
│ ├── thermal_engine.te
│ ├── fsck.te
│ ├── property_contexts.save
│ ├── radio.te
│ ├── init_fingerprint.te
│ ├── zygote.te
│ ├── tee.te
│ ├── ueventd.te
│ ├── vendor_init.te
│ ├── hal_mlipay_default.te
│ ├── hal_audio_default.te
│ ├── mm-qcamerad.te
│ ├── genfs_contexts
│ ├── crash_dump.te
│ └── untrusted_app_25.te
└── private
│ ├── gsid.te
│ ├── adbroot.te
│ ├── system_suspend.te
│ ├── update_engine.te
│ ├── fsverity_init.te
│ ├── linkerconfig.te
│ ├── otapreopt.te
│ ├── boringssl_self_test.te
│ ├── art_apex_boot_integrity.te
│ ├── vendor_boringssl_self_test.te
│ ├── adbd.te
│ ├── storaged.te
│ ├── toolbox.te
│ ├── migrate_legacy_obb_data.te
│ ├── healthd.te
│ ├── logpersist.te
│ ├── permissioncontroller_app.te
│ ├── gmscore_app.te
│ └── vendor_init.te
├── Android.bp
├── wifi
├── WCNSS_cfg.dat
├── hostapd.deny
├── p2p_supplicant_overlay.conf
├── hostapd.accept
└── wpa_supplicant_overlay.conf
├── XiaomiParts
├── res
│ ├── drawable
│ │ ├── preview.jpg
│ │ ├── ic_haudio.xml
│ │ ├── ic_preset.xml
│ │ ├── ic_gpuboost_qs.xml
│ │ ├── action_reset.xml
│ │ ├── ic_gpuboost.xml
│ │ ├── ic_spectrum.xml
│ │ ├── ic_vddres.xml
│ │ ├── ic_doze.xml
│ │ ├── ic_lkm.xml
│ │ ├── ic_mic.xml
│ │ ├── ic_headphone.xml
│ │ ├── ic_flash.xml
│ │ ├── ic_power.xml
│ │ ├── ic_cpuboost_qs.xml
│ │ ├── ic_cpucore.xml
│ │ ├── ic_cam_qs.xml
│ │ ├── ic_mtherm.xml
│ │ ├── ic_vibrate_notif.xml
│ │ ├── ic_cam.xml
│ │ ├── ic_earpiece.xml
│ │ ├── ic_fastcharge.xml
│ │ ├── ic_tcp.xml
│ │ ├── ic_dirac.xml
│ │ ├── ic_mi.xml
│ │ ├── ic_led.xml
│ │ ├── ic_speaker.xml
│ │ ├── ic_vibrate_call.xml
│ │ ├── ic_qs_dirac.xml
│ │ ├── ic_pickup.xml
│ │ ├── ic_qs_log.xml
│ │ ├── action_presets.xml
│ │ ├── ic_vibrate.xml
│ │ ├── ic_hand.xml
│ │ ├── switchbar_background.xml
│ │ ├── ic_kcal.xml
│ │ ├── ic_torch.xml
│ │ ├── ic_boost.xml
│ │ ├── ic_pocket.xml
│ │ ├── ic_custom_seekbar_minus.xml
│ │ ├── ic_linux.xml
│ │ ├── ic_custom_seekbar_plus.xml
│ │ ├── ic_ccontrol.xml
│ │ └── ic_backlight.xml
│ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ └── styles.xml
│ ├── menu
│ │ └── menu_reset.xml
│ ├── layout
│ │ ├── activity_kcal.xml
│ │ ├── doze.xml
│ │ └── switch_bar.xml
│ └── values-night
│ │ └── styles.xml
├── src
│ └── com
│ │ └── xiaomi
│ │ └── parts
│ │ ├── DiracService.java
│ │ ├── XiaomiPartsTile.java
│ │ ├── preferences
│ │ ├── SecureSettingCustomSeekBarPreference.java
│ │ └── VibrationSeekBarPreference.java
│ │ ├── CpuboostTileService.java
│ │ ├── GpuboostTileService.java
│ │ ├── CameraTileService.java
│ │ ├── ambient
│ │ └── AmbientGesturePreferenceActivity.java
│ │ ├── SpectrumTileService.java
│ │ ├── SuTask.java
│ │ ├── DeviceSettingsActivity.java
│ │ └── DiracUtils.java
└── Android.mk
├── rootdir
├── etc
│ ├── init.cpuboost.rc.save
│ ├── init.camera.sh
│ ├── init.cpuboost.sh
│ ├── init.gpuboost.sh
│ ├── init.parallax.sh
│ ├── move_time_data.sh
│ └── init.camera.rc
├── init.recovery.qcom.rc
├── init.recovery.qcom.usb.rc
└── init.goodix.sh
├── AndroidBoard.mk
├── superior.dependencies
├── org.ifaa.android.manager
├── src
│ └── org
│ │ └── ifaa
│ │ └── android
│ │ └── manager
│ │ ├── IFAAManagerV4.java
│ │ ├── IFAAManagerV2.java
│ │ ├── IFAAManagerFactory.java
│ │ ├── IIFAAService.aidl
│ │ ├── IFAAManagerV3.java
│ │ └── IFAAManager.java
└── Android.bp
├── prebuilt
├── etc
│ └── init.spectrum.sh
└── Android.mk
├── keylayout
├── uinput-fpc.kl
├── uinput-goodix.kl
├── gf3208.kl
├── ft5435_ts.kl
├── msm8953-snd-card-mtp_Button_Jack.kl
├── gpio-keys.kl
├── ist30xx_ts_input.kl
└── goodix-ts.kl
├── overlay
├── frameworks
│ └── base
│ │ ├── packages
│ │ ├── SystemUI
│ │ │ ├── res-keyguard
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── config.xml
│ │ │ │ ├── values-en-rAU
│ │ │ │ │ └── strings.xml
│ │ │ │ ├── values-en-rCA
│ │ │ │ │ └── strings.xml
│ │ │ │ ├── values-en-rGB
│ │ │ │ │ └── strings.xml
│ │ │ │ └── values-en-rIN
│ │ │ │ │ └── strings.xml
│ │ │ └── res
│ │ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── dimens.xml
│ │ │ │ ├── values-en-rAU
│ │ │ │ └── strings.xml
│ │ │ │ ├── values-en-rCA
│ │ │ │ └── strings.xml
│ │ │ │ ├── values-en-rGB
│ │ │ │ └── strings.xml
│ │ │ │ └── values-en-rIN
│ │ │ │ └── strings.xml
│ │ ├── SettingsProvider
│ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── defaults.xml
│ │ └── SettingsLib
│ │ │ └── res
│ │ │ └── values
│ │ │ └── strings.xml
│ │ └── core
│ │ └── res
│ │ └── res
│ │ ├── xml
│ │ └── power_profile.xml
│ │ ├── values-mcc454-mnc03
│ │ └── config.xml
│ │ ├── values-mcc454-mnc04
│ │ └── config.xml
│ │ ├── values-mcc455-mnc02
│ │ └── config.xml
│ │ ├── values-mcc455-mnc07
│ │ └── config.xml
│ │ ├── values-mcc310-mnc004
│ │ └── config.xml
│ │ └── values-mcc310-mnc260
│ │ └── config.xml
└── packages
│ ├── apps
│ ├── Dialer
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── dialer
│ │ │ └── callrecord
│ │ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ ├── DocumentsUI
│ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ ├── Settings
│ │ └── res
│ │ │ └── values
│ │ │ ├── arrays.xml
│ │ │ └── config.xml
│ └── CustomDoze
│ │ └── res
│ │ └── values
│ │ └── config.xml
│ ├── providers
│ └── TelephonyProvider
│ │ └── res
│ │ └── values
│ │ └── config.xml
│ └── services
│ └── Telecomm
│ └── res
│ └── values
│ └── config.xml
├── libshims
├── Android.mk
└── jstring.h
├── seccomp_policy
└── mediacodec.policy
├── vintf
├── vendor.qti.esepowermanager@1.0-service.xml
├── vendor.qti.gnss@3.0-service.xml
└── android.hardware.gnss@2.0-service-qti.xml
├── bootctrl
└── Android.bp
├── AndroidProducts.mk
├── extract-files.sh
├── light
├── android.hardware.light@2.0-service.daisy.rc
├── Android.bp
└── service.cpp
├── init
└── Android.bp
├── libhidl
└── Android.mk
├── README.md
├── bluetooth
└── bdroid_buildcfg.h
├── permissions
└── telephony_product_privapp-permissions-qti.xml
└── setup-makefiles.sh
/configs/sensors/hals.conf:
--------------------------------------------------------------------------------
1 | sensors.ssc.so
2 |
--------------------------------------------------------------------------------
/recovery/Android.mk:
--------------------------------------------------------------------------------
1 | include $(all-subdir-makefiles)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/idmap.te:
--------------------------------------------------------------------------------
1 | allow idmap installd:file read;
2 |
--------------------------------------------------------------------------------
/sepolicy/private/gsid.te:
--------------------------------------------------------------------------------
1 | allow gsid device:file { open write };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/atfwd.te:
--------------------------------------------------------------------------------
1 | allow atfwd sysfs:file { open read };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/su.te:
--------------------------------------------------------------------------------
1 | allow su vendor_file:file { entrypoint };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/charger.te:
--------------------------------------------------------------------------------
1 | allow charger rootfs:file { entrypoint };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_cas_default.te:
--------------------------------------------------------------------------------
1 | vndbinder_use(hal_cas_default);
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/proc_net.te:
--------------------------------------------------------------------------------
1 | allow proc_net proc:filesystem associate;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/usbd.te:
--------------------------------------------------------------------------------
1 | allow usbd usbd:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/configs/msm_irqbalance.conf:
--------------------------------------------------------------------------------
1 | PRIO=0,0,0,0,1,1,1,1
2 | IGNORED_IRQ=20,39
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/apexd.te:
--------------------------------------------------------------------------------
1 | allow apexd sysfs_mmc_host:file { read write };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/dnsmasq.te:
--------------------------------------------------------------------------------
1 | allow dnsmasq dnsmasq:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/lmkd.te:
--------------------------------------------------------------------------------
1 | allow lmkd hwservicemanager:binder { transfer };
2 |
--------------------------------------------------------------------------------
/Android.bp:
--------------------------------------------------------------------------------
1 | soong_namespace {
2 | imports: ["hardware/qcom/bootctrl"],
3 | }
4 |
--------------------------------------------------------------------------------
/sepolicy/private/adbroot.te:
--------------------------------------------------------------------------------
1 | allow adbroot adbroot:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/private/system_suspend.te:
--------------------------------------------------------------------------------
1 | allow system_suspend dumpstate:fd { use };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_dpmQmiMgr.te:
--------------------------------------------------------------------------------
1 | allow hal_dpmQmiMgr sysfs:file { open read };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice.te:
--------------------------------------------------------------------------------
1 | type hal_dms_hwservice, hwservice_manager_type;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/mediaswcodec.te:
--------------------------------------------------------------------------------
1 | allow mediaswcodec servicemanager:binder call;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/poweroffalarm_app.te:
--------------------------------------------------------------------------------
1 | allow poweroffalarm_app cgroup:file write;
2 |
--------------------------------------------------------------------------------
/sepolicy/private/update_engine.te:
--------------------------------------------------------------------------------
1 | allow update_engine device:file { write open };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/irsc_util.te:
--------------------------------------------------------------------------------
1 | allow irsc_util irsc_util:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/device.te:
--------------------------------------------------------------------------------
1 | type lirc_device, dev_type;
2 | type gx_fpd_device, dev_type;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_bluetooth_qti.te:
--------------------------------------------------------------------------------
1 | allow hal_bluetooth_qti persist_file:lnk_file read;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/shared_relro.te:
--------------------------------------------------------------------------------
1 | allow shared_relro unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/traceur_app.te:
--------------------------------------------------------------------------------
1 | allow traceur_app unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/private/fsverity_init.te:
--------------------------------------------------------------------------------
1 | allow fsverity_init fsverity_init:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/private/linkerconfig.te:
--------------------------------------------------------------------------------
1 | allow linkerconfig linkerconfig:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/private/otapreopt.te:
--------------------------------------------------------------------------------
1 | allow otapreopt_slot otapreopt_slot:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/network_stack.te:
--------------------------------------------------------------------------------
1 | allow network_stack unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/power_off_alarm.te:
--------------------------------------------------------------------------------
1 | allow power_off_alarm kmsg_device:chr_file { getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/secure_element.te:
--------------------------------------------------------------------------------
1 | allow secure_element unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/timeservice_app.te:
--------------------------------------------------------------------------------
1 | allow timeservice_app unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/blkid_untrusted.te:
--------------------------------------------------------------------------------
1 | allow blkid_untrusted blkid_untrusted:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/energyawareness.te:
--------------------------------------------------------------------------------
1 | allow energyawareness energyawareness:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_health_default.te:
--------------------------------------------------------------------------------
1 | allow hal_health_default sysfs:file { getattr open read };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hostapd.te:
--------------------------------------------------------------------------------
1 | allow hostapd hal_wifi_hostapd_default:unix_dgram_socket { sendto };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/update_verifier.te:
--------------------------------------------------------------------------------
1 | allow update_verifier update_verifier:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_qtelephony.te:
--------------------------------------------------------------------------------
1 | allow vendor_qtelephony unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/attributes:
--------------------------------------------------------------------------------
1 | attribute hal_dms;
2 | attribute hal_dms_client;
3 | attribute hal_dms_server;
--------------------------------------------------------------------------------
/sepolicy/vendor/vdc.te:
--------------------------------------------------------------------------------
1 | allow vdc vdc:capability { sys_admin };
2 | allow vdc vdc:capability { kill };
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_dataservice_ap.te:
--------------------------------------------------------------------------------
1 | allow vendor_dataservice_app unlabeled:file { open read getattr };
2 |
--------------------------------------------------------------------------------
/wifi/WCNSS_cfg.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperiorOS-Devices/device_xiaomi_daisy/eleven/wifi/WCNSS_cfg.dat
--------------------------------------------------------------------------------
/configs/gps/gps.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperiorOS-Devices/device_xiaomi_daisy/eleven/configs/gps/gps.conf
--------------------------------------------------------------------------------
/sepolicy/private/boringssl_self_test.te:
--------------------------------------------------------------------------------
1 | allow boringssl_self_test boringssl_self_test:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_wifi_hostapd_default.te:
--------------------------------------------------------------------------------
1 | allow hal_wifi_hostapd_default hostapd:unix_dgram_socket { sendto };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/msm_irqbalanced.te:
--------------------------------------------------------------------------------
1 | allow vendor_msm_irqbalanced vendor_msm_irqbalanced:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vold_prepare_subdirs.te:
--------------------------------------------------------------------------------
1 | allow vold_prepare_subdirs vold_prepare_subdirs:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/wifi/hostapd.deny:
--------------------------------------------------------------------------------
1 | # List of MAC addresses that are not allowed to authenticate (IEEE 802.11)
2 | # with the AP.
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/location.te:
--------------------------------------------------------------------------------
1 | allow location kernel:system module_request;
2 | allow location sysfs:file { open read };
3 |
--------------------------------------------------------------------------------
/sepolicy/private/art_apex_boot_integrity.te:
--------------------------------------------------------------------------------
1 | allow art_apex_boot_integrity art_apex_boot_integrity:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/toolbox.te:
--------------------------------------------------------------------------------
1 | allow toolbox toolbox:capability { sys_admin };
2 | allow toolbox toolbox:capability { kill };
3 |
--------------------------------------------------------------------------------
/sepolicy/private/vendor_boringssl_self_test.te:
--------------------------------------------------------------------------------
1 | allow vendor_boringssl_self_test vendor_boringssl_self_test:capability { sys_admin };
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_soter_qti.te:
--------------------------------------------------------------------------------
1 | allow hal_soter_qti vfat:file { read open getattr };
2 | allow hal_soter_qti vfat:dir { search };
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_wifi_supplicant_default.te:
--------------------------------------------------------------------------------
1 | allow hal_wifi_supplicant_default hal_wifi_supplicant_default:capability { sys_admin };
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 |
--------------------------------------------------------------------------------
/sepolicy/vendor/service.te:
--------------------------------------------------------------------------------
1 | type goodixfingerprintd_service, service_manager_type;
2 | type goodix_fingerprint_service, service_manager_type;
--------------------------------------------------------------------------------
/sepolicy/vendor/vndservice_contexts:
--------------------------------------------------------------------------------
1 | android.hardware.fingerprint.IGoodixFingerprintDaemon u:object_r:goodix_fingerprint_vndservice:s0
2 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/preview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperiorOS-Devices/device_xiaomi_daisy/eleven/XiaomiParts/res/drawable/preview.jpg
--------------------------------------------------------------------------------
/sepolicy/private/adbd.te:
--------------------------------------------------------------------------------
1 | allow adbd vendor_file:file getattr;
2 | allow adbd oemfs:dir search;
3 | allow adbd adbd:capability { sys_admin };
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_wifi_default.te:
--------------------------------------------------------------------------------
1 | allow hal_wifi_default default_prop:property_service set;
2 | allow hal_wifi_default proc_net:file write;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/mediadrmserver.te:
--------------------------------------------------------------------------------
1 | allow mediadrmserver firmware_file:dir search;
2 | allow mediadrmserver firmware_file:file { open read getattr };
--------------------------------------------------------------------------------
/rootdir/etc/init.cpuboost.rc.save:
--------------------------------------------------------------------------------
1 | # cpuboost by ronax
2 | # depends on caf cpu boost driver
3 | # Initialization
4 | on property:sys.boot_completed=1
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_gnss_qti.te:
--------------------------------------------------------------------------------
1 | allow hal_gnss_qti sysfs:file { open read };
2 | allow hal_gnss_qti vendor_pd_locater_dbg_prop:file { open read getattr };
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_ir_default.te:
--------------------------------------------------------------------------------
1 | allow hal_ir_default lirc_device:chr_file rw_file_perms;
2 | allow hal_ir_default device:chr_file { ioctl open read write };
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vndservice.te:
--------------------------------------------------------------------------------
1 | type goodix_fingerprint_vndservice, vndservice_manager_type;
2 | type hal_power_stats_service, vndservice_manager_type;
--------------------------------------------------------------------------------
/sepolicy/vendor/ims.te:
--------------------------------------------------------------------------------
1 | allow ims sysfs:file { open read };
2 | allow ims diag_device:chr_file { read write open };
3 | allow ims diag_device:chr_file { ioctl };
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/netutils_wrapper.te:
--------------------------------------------------------------------------------
1 | allow netutils_wrapper netutils_wrapper:capability { sys_admin };
2 | allow netutils_wrapper netutils_wrapper:capability { kill };
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vndservicemanager.te:
--------------------------------------------------------------------------------
1 | allow vndservicemanager runtime_event_log_tags_file:file read;
2 | allow vndservicemanager runtime_event_log_tags_file:file open;
3 |
--------------------------------------------------------------------------------
/sepolicy/private/storaged.te:
--------------------------------------------------------------------------------
1 | allow shell storaged_exec:file { getattr };
2 | allow storaged debugfs_mmc:file { read };
3 | allow storaged sysfs:file { read open getattr };
4 |
--------------------------------------------------------------------------------
/sepolicy/private/toolbox.te:
--------------------------------------------------------------------------------
1 | allow toolbox init:fifo_file { getattr write };
2 | allow toolbox property_socket:sock_file write;
3 | allow toolbox init:unix_stream_socket connectto;
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_light_default.te:
--------------------------------------------------------------------------------
1 | allow hal_light_default sysfs:file { read write };
2 | allow hal_light_default sysfs:file open;
3 | allow hal_light_default sysfs:file getattr;
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/ipacm-diag.te:
--------------------------------------------------------------------------------
1 | allow ipacm-diag diag_device:chr_file { read write };
2 | allow ipacm ipacm-diag:unix_dgram_socket { sendto };
3 | allow ipacm ipacm_socket:sock_file { write };
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_imsrtp.te:
--------------------------------------------------------------------------------
1 | allow hal_imsrtp sysfs:file { open read };
2 | allow hal_imsrtp diag_device:chr_file { open read write getattr };
3 | allow hal_imsrtp diag_device:chr_file { ioctl };
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_wifi_defaul.te:
--------------------------------------------------------------------------------
1 | allow hal_wifi_default kernel:system module_request;
2 | allow hal_wifi_default proc_net:file write;
3 | allow hal_wifi_default default_prop:property_service { set };
--------------------------------------------------------------------------------
/sepolicy/vendor/qtidataservices_app.te:
--------------------------------------------------------------------------------
1 | allow qtidataservices_app hal_perf_hwservice:hwservice_manager { find };
2 | allow qtidataservices_app qtidataservices_app:socket { read write ioctl create};
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/service_contexts:
--------------------------------------------------------------------------------
1 | com.goodix.FingerprintService u:object_r:goodix_fingerprint_service:s0
2 | android.hardware.fingerprint.IGoodixFingerprintDaemon u:object_r:goodixfingerprintd_service:s0
--------------------------------------------------------------------------------
/rootdir/etc/init.camera.sh:
--------------------------------------------------------------------------------
1 | # Camera
2 | # If there is not a persist value, we need to set one
3 | if [ ! -f /data/property/persist.camera.profile ]; then
4 | setprop persist.camera.profile 0
5 | fi
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_memtrack_default.te:
--------------------------------------------------------------------------------
1 | allow hal_memtrack_default sysfs:file { getattr open read };
2 | allow hal_memtrack_default sysfs_kgsl:lnk_file read;
3 | r_dir_file(hal_memtrack_default, sysfs_kgsl)
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/installd.te:
--------------------------------------------------------------------------------
1 | allow installd adsprpcd_file:filesystem quotaget;
2 | allow installd idmap:process noatsecure;
3 | allow installd device:file { open write };
4 | allow installd installd:capability { kill };
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_drm_widevine.te:
--------------------------------------------------------------------------------
1 | allow hal_drm_widevine system_file:file rx_file_perms;
2 |
3 | allow hal_drm_widevine firmware_file:dir { getattr search };
4 | allow hal_drm_widevine firmware_file:file { getattr open read };
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/sensors.te:
--------------------------------------------------------------------------------
1 | allow sensors sysfs:dir { open read };
2 | allow sensors sysfs:file { open read };
3 | allow sensors diag_device:chr_file { open read write getattr };
4 | allow sensors diag_device:chr_file { ioctl };
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_dpmd.te:
--------------------------------------------------------------------------------
1 | allow vendor_dpmd diag_device:chr_file { read write open ioctl };
2 | allow vendor_dpmd vendor_file:file { read open getattr execute };
3 | allow vendor_dpmd vendor_dpmd:capability { sys_admin };
4 |
--------------------------------------------------------------------------------
/rootdir/etc/init.cpuboost.sh:
--------------------------------------------------------------------------------
1 | # cpuboost initialization script by ronax
2 | # If there is not a persist value, we need to set one
3 | if [ ! -f /data/property/persist.cpuboost.profile ]; then
4 | setprop persist.cpuboost.profile 1
5 | fi
6 |
--------------------------------------------------------------------------------
/rootdir/etc/init.gpuboost.sh:
--------------------------------------------------------------------------------
1 | # GPUBOOST initialization script by ronax
2 | # If there is not a persist value, we need to set one
3 | if [ ! -f /data/property/persist.gpuboost.profile ]; then
4 | setprop persist.gpuboost.profile 0
5 | fi
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_dms.te:
--------------------------------------------------------------------------------
1 | binder_call(hal_dms_client, hal_dms_server)
2 | binder_call(hal_dms_server, hal_dms_client)
3 |
4 | add_hwservice(hal_dms_server, hal_dms_hwservice)
5 | allow hal_dms_client hal_dms_hwservice:hwservice_manager find;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_per_mgr.te:
--------------------------------------------------------------------------------
1 | allow vendor_per_mgr sysfs:file { open read };
2 | allow vendor_per_mgr vfat:file { open read };
3 | allow vendor_per_mgr vendor_per_mgr:capability { net_raw };
4 | allow vendor_per_mgr vfat:dir { search };
5 |
--------------------------------------------------------------------------------
/wifi/hostapd.accept:
--------------------------------------------------------------------------------
1 | # List of MAC addresses that are allowed to authenticate (IEEE 802.11)
2 | # with the AP. Optional VLAN ID can be assigned for clients based on the
3 | # MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used.
4 |
--------------------------------------------------------------------------------
/AndroidBoard.mk:
--------------------------------------------------------------------------------
1 | DEVICE_PATH := device/xiaomi/daisy
2 |
3 | # copy kernel headers to the build tree
4 | $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr: $(wildcard $(DEVICE_PATH)/kernel-headers/*)
5 | rm -rf $@
6 | cp -a $(DEVICE_PATH)/kernel-headers/. $@
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/rfs_access.te:
--------------------------------------------------------------------------------
1 | allow rfs_access vfat:dir { search };
2 | allow rfs_access vfat:file { read };
3 | allow rfs_access vfat:file { open };
4 | allow rfs_access vfat:file { getattr };
5 | allow rfs_access rfs_access:capability { sys_admin };
6 |
--------------------------------------------------------------------------------
/superior.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "kernel_xiaomi_daisy",
4 | "target_path": "kernel/xiaomi/daisy"
5 | },
6 | {
7 | "repository": "vendor_xiaomi_daisy",
8 | "target_path": "vendor/xiaomi"
9 | }
10 | ]
--------------------------------------------------------------------------------
/sepolicy/vendor/app_zygote.te:
--------------------------------------------------------------------------------
1 | allow app_zygote app_data_file:dir { getattr };
2 | allow app_zygote zygote_exec:file { read execute };
3 | allow app_zygote same_process_hal_file:file { read execute };
4 | allow app_zygote system_data_file:sock_file { write };
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_bluetooth_default.te:
--------------------------------------------------------------------------------
1 | typeattribute hal_bluetooth_default data_between_core_and_vendor_violators;
2 |
3 | allow hal_bluetooth_default bluetooth_data_file:dir search;
4 | allow hal_bluetooth_default bluetooth_data_file:file r_file_perms;
5 |
--------------------------------------------------------------------------------
/sepolicy/private/migrate_legacy_obb_data.te:
--------------------------------------------------------------------------------
1 | allow migrate_legacy_obb_data apk_data_file:file { read };
2 | allow migrate_legacy_obb_data dalvikcache_data_file:file { read write };
3 | allow migrate_legacy_obb_data migrate_legacy_obb_data:capability { sys_admin };
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/app.te:
--------------------------------------------------------------------------------
1 | # Allow appdomain to get vendor_camera_prop
2 | #get_prop(appdomain, vendor_camera_prop)
3 |
4 | allow { appdomain -isolated_app } adsprpcd_file:dir r_dir_perms;
5 | allow { appdomain -isolated_app } public_adsprpcd_file:file r_file_perms;
6 |
--------------------------------------------------------------------------------
/wifi/wpa_supplicant_overlay.conf:
--------------------------------------------------------------------------------
1 | disable_scan_offload=1
2 | p2p_disabled=1
3 | tdls_external_control=1
4 | bss_max_count = 400
5 | wowlan_triggers=magic_pkt
6 | interworking=1
7 | hs20=1
8 | auto_interworking=0
9 | driver_param=use_p2p_group_interface=1
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hvdcp.te:
--------------------------------------------------------------------------------
1 | allow hvdcp sysfs:dir { open read };
2 | allow hvdcp sysfs:file { open read write };
3 | allow hvdcp hvdcp:capability { sys_admin };
4 | allow hvdcp sysfs_battery_supply:dir { add_name };
5 | allow hvdcp sysfs_battery_supply:file { create };
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice_contexts:
--------------------------------------------------------------------------------
1 | vendor.goodix.hardware.fingerprint::IGoodixBiometricsFingerprint u:object_r:hal_fingerprint_hwservice:s0
2 |
3 | # Dolby
4 | vendor.dolby.hardware.dms::IDms u:object_r:hal_dms_hwservice:s0
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/time_daemon.te:
--------------------------------------------------------------------------------
1 | allow time_daemon self:capability { setuid setgid sys_time dac_override };
2 | allow time_daemon sysfs:file { open read };
3 | allow time_daemon mnt_vendor_file:file { read write };
4 | allow time_daemon mnt_vendor_file:file { open };
5 |
--------------------------------------------------------------------------------
/sepolicy/private/healthd.te:
--------------------------------------------------------------------------------
1 | allow healthd sysfs:file { getattr open read };
2 | allow healthd charger_exec:file { entrypoint };
3 | allow healthd charger_exec:file { read };
4 | allow healthd charger_exec:file { execute };
5 | allow healthd charger_exec:file { getattr };
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/cameraserver.te:
--------------------------------------------------------------------------------
1 | allow cameraserver mediacodec:binder call;
2 | allow cameraserver vendor_persist_camera_prop:file { open read getattr };
3 | allow cameraserver vendor_file:file { execute getattr open read };
4 | allow cameraserver sysfs_kgsl:dir { search };
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_vibrator_default.te:
--------------------------------------------------------------------------------
1 | allow hal_vibrator_default sysfs:file { open write read getattr };
2 | allow hal_vibrator_default sysfs_leds:dir search;
3 | allow hal_vibrator_default dumpstate:fd { use };
4 | allow hal_vibrator_default dumpstate:fifo_file { write };
5 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV4.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | public abstract class IFAAManagerV4 extends IFAAManagerV3 {
4 | public abstract int getEnabled(int i);
5 |
6 | public abstract int[] getIDList(int i);
7 | }
8 |
--------------------------------------------------------------------------------
/rootdir/init.recovery.qcom.rc:
--------------------------------------------------------------------------------
1 | import /init.recovery.qcom.usb.rc
2 |
3 | on fs
4 | wait /dev/block/platform/soc/7824900.sdhci
5 | symlink /dev/block/platform/soc/7824900.sdhci /dev/block/bootdevice
6 |
7 | # Advertise system_as_root
8 | setprop ro.build.system_root_image true
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_bootctl_default.te:
--------------------------------------------------------------------------------
1 | allow hal_bootctl_default block_device:blk_file { getattr ioctl open read write };
2 | allow hal_bootctl_default persist_block_device:blk_file { getattr ioctl open read write };
3 | allow hal_bootctl_default hal_bootctl_default:capability { sys_admin };
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/rild.te:
--------------------------------------------------------------------------------
1 | allow rild rild_file:file r_file_perms;
2 | allow rild vendor_data_file:file { getattr lock };
3 | allow rild vendor_data_file:file { getattr lock open read };
4 | allow rild diag_device:chr_file { open read write getattr };
5 | allow rild diag_device:chr_file { ioctl };
6 |
--------------------------------------------------------------------------------
/prebuilt/etc/init.spectrum.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | # SPECTRUM KERNEL MANAGER
3 | # Profile initialization script by nathanchance
4 |
5 | # If there is not a persist value, we need to set one
6 | if [ ! -f /data/property/persist.spectrum.profile ]; then
7 | setprop persist.spectrum.profile 0
8 | fi
9 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV2.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.content.Context;
4 |
5 | public abstract class IFAAManagerV2 extends IFAAManager {
6 | public abstract byte[] processCmdV2(Context paramContext, byte[] paramArrayOfByte);
7 | }
8 |
--------------------------------------------------------------------------------
/keylayout/uinput-fpc.kl:
--------------------------------------------------------------------------------
1 | ##################################
2 | #
3 | #add for fpc fingerprints
4 | #
5 | ##################################
6 |
7 | key 195 SYSTEM_NAVIGATION_UP
8 | key 196 SYSTEM_NAVIGATION_DOWN
9 | key 197 SYSTEM_NAVIGATION_LEFT
10 | key 198 SYSTEM_NAVIGATION_RIGHT
11 | key 353 DPAD_CENTER
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/healthd.te:
--------------------------------------------------------------------------------
1 | allow healthd sysfs:file { getattr open read };
2 | allow healthd charger_exec:file { entrypoint };
3 | allow healthd charger_exec:file { read };
4 | allow healthd charger_exec:file { execute };
5 | allow healthd charger_exec:file { getattr };
6 | allow healthd healthd:capability { sys_admin };
7 |
--------------------------------------------------------------------------------
/keylayout/uinput-goodix.kl:
--------------------------------------------------------------------------------
1 | ##################################
2 | #
3 | #add for goodix fingerprints
4 | #
5 | ##################################
6 |
7 | key 195 SYSTEM_NAVIGATION_UP
8 | key 196 SYSTEM_NAVIGATION_DOWN
9 | key 197 SYSTEM_NAVIGATION_LEFT
10 | key 198 SYSTEM_NAVIGATION_RIGHT
11 | key 353 DPAD_CENTER
12 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %s • Turbo Charging
6 |
7 |
--------------------------------------------------------------------------------
/libshims/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_SRC_FILES := strdup8to16.cpp strdup16to8.cpp
5 | LOCAL_SHARED_LIBRARIES := liblog libbase
6 | LOCAL_MODULE := libdpmframework_shim
7 | LOCAL_MODULE_TAGS := optional
8 | LOCAL_PRODUCT_MODULE := true
9 | include $(BUILD_SHARED_LIBRARY)
10 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rAU/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %s • Turbo Charging
6 |
7 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rCA/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %s • Turbo Charging
6 |
7 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rGB/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %s • Turbo Charging
6 |
7 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rIN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %s • Turbo Charging
6 |
7 |
--------------------------------------------------------------------------------
/seccomp_policy/mediacodec.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 | inotify_init1: 1
12 | inotify_add_watch: 1
13 |
--------------------------------------------------------------------------------
/sepolicy/vendor/kernel.te:
--------------------------------------------------------------------------------
1 | dontaudit kernel self:capability kill;
2 | allow kernel init:process noatsecure;
3 | allow kernel self:security setenforce;
4 | allow kernel tmpfs:dir search;
5 | allow kernel vfat:file open;
6 | allow kernel self:capability { dac_override kill };
7 | allow kernel kernel:socket { create };
8 | allow kernel vfat:dir { search };
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_sensors_default.te:
--------------------------------------------------------------------------------
1 | allow hal_sensors_default self:socket read;
2 | #allow hal_sensors_default sensors_dbg_prop:file { getattr open read };
3 | allow hal_sensors_default sysfs:file { open read };
4 | allow hal_sensors_default diag_device:chr_file { open read write getattr };
5 | allow hal_sensors_default diag_device:chr_file { ioctl };
6 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerFactory.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.content.Context;
4 |
5 | public class IFAAManagerFactory {
6 | public static IFAAManager getIFAAManager(Context context, int authType) {
7 | return IFAAManagerImpl.getInstance(context);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/servicemanager.te:
--------------------------------------------------------------------------------
1 | allow servicemanager update_verifier:dir search;
2 | allow servicemanager update_verifier:file { open read };
3 | allow servicemanager update_verifier:process getattr;
4 | allow servicemanager mediaswcodec:dir search;
5 | allow servicemanager mediaswcodec:file { open read };
6 | allow servicemanager mediaswcodec:process getattr;
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_rcsservice.te:
--------------------------------------------------------------------------------
1 | allow hal_rcsservice sysfs:file { open read };
2 | allow hal_rcsservice default_android_hwservice:hwservice_manager { find };
3 | allow hal_rcsservice default_android_hwservice:hwservice_manager { add };
4 | allow hal_rcsservice diag_device:chr_file { open read write getattr };
5 | allow hal_rcsservice diag_device:chr_file { ioctl };
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/netd.te:
--------------------------------------------------------------------------------
1 | allow netd proc_net:dir write;
2 | allow netd proc_net:dir add_name;
3 | allow netd proc_net:file create;
4 | allow netd device:file { open write };
5 | allow netd netd:capability { sys_admin };
6 | allow netd untrusted_app:unix_stream_socket { read write };
7 | allow netd sysfs_net:dir { add_name };
8 | allow netd sysfs_net:file { create };
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/rmt_storage.te:
--------------------------------------------------------------------------------
1 | # debugfs access
2 | userdebug_or_eng(`
3 | allow rmt_storage debugfs_rmt:dir search;
4 | allow rmt_storage debugfs_rmt:file rw_file_perms;
5 | ')
6 |
7 | allow rmt_storage block_device:blk_file { open read write };
8 | allow rmt_storage sysfs:file { open read };
9 | allow rmt_storage rmt_storage:capability { sys_admin };
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/dumpstate.te:
--------------------------------------------------------------------------------
1 | allow dumpstate init:process { signal };
2 | allow dumpstate adbd_exec:file { getattr };
3 | allow dumpstate apexd_exec:file { getattr };
4 | allow dumpstate thermal-engine_exec:file { getattr };
5 | allow dumpstate rootfs:file { getattr };
6 | allow dumpstate app_zygote:process { signal };
7 | allow dumpstate dumpstate:capability { sys_admin };
8 |
--------------------------------------------------------------------------------
/configs/hotword-hiddenapi-package-whitelist.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/webview_zygote.te:
--------------------------------------------------------------------------------
1 | allow webview_zygote zygote:unix_dgram_socket write;
2 | allow webview_zygote mnt_expand_file:dir getattr;
3 | allow webview_zygote app_data_file:dir getattr;
4 | allow webview_zygote system_data_file:sock_file { write };
5 | allow webview_zygote system_server:unix_dgram_socket { sendto };
6 | allow webview_zygote unlabeled:file { open read getattr };
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_graphics_allocator_default.te:
--------------------------------------------------------------------------------
1 | allow hal_graphics_allocator_default sysfs_kgsl:file { getattr read open };
2 | allow hal_graphics_allocator_default sysfs_kgsl:lnk_file read;
3 | allow hal_graphics_allocator_default dumpstate:fd { use };
4 | allow hal_graphics_allocator_default dumpstate:fifo_file { write };
5 | allow hal_graphics_allocator_default sysfs_kgsl:dir { search };
6 |
--------------------------------------------------------------------------------
/sepolicy/private/logpersist.te:
--------------------------------------------------------------------------------
1 | allow logpersist cache_file:lnk_file { read };
2 | allow logpersist logpersist:capability { dac_override };
3 | allow logpersist cache_file:dir { read open write add_name };
4 | allow logpersist cache_file:file { create };
5 | allow logpersist cache_file:file { append open };
6 | allow logpersist cache_file:file { ioctl };
7 | allow logpersist cache_file:file { getattr };
8 |
--------------------------------------------------------------------------------
/sepolicy/private/permissioncontroller_app.te:
--------------------------------------------------------------------------------
1 | allow permissioncontroller_app adbd_prop:file { open read getattr };
2 | #allow permissioncontroller_app adsprpc_prop:file { open read getattr };
3 | allow permissioncontroller_app apexd_prop:file { open read getattr };
4 | allow permissioncontroller_app theme_prop:file { open read getattr };
5 | allow permissioncontroller_app unlabeled:file { open read getattr };
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/bootanim.te:
--------------------------------------------------------------------------------
1 | allow bootanim device:chr_file { ioctl read write };
2 | allow bootanim system_data_file:dir read;
3 | allow bootanim sysfs_kgsl:dir search;
4 | allow bootanim sysfs_kgsl:lnk_file read;
5 | allow bootanim vendor_file:file { execute getattr open read };
6 | allow bootanim vendor_system_prop:file { getattr read open };
7 | allow bootanim userspace_reboot_exported_prop:file { read open getattr };
8 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vold.te:
--------------------------------------------------------------------------------
1 | allow vold proc_touchpanel:dir r_dir_perms;
2 | allow vold blkid_untrusted:process noatsecure;
3 | allow vold fsck_untrusted:process noatsecure;
4 | allow vold sgdisk:process noatsecure;
5 | allow vold sdcardd:process noatsecure;
6 | allow vold vold_prepare_subdirs:process noatsecure;
7 | allow vold same_process_hal_file:file { execute getattr open read };
8 | allow vold sysfs_mmc_host:file { write };
9 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_haudio.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_graphics_composer_default.te:
--------------------------------------------------------------------------------
1 | allow hal_graphics_composer_default system_file:file { execute getattr open read };
2 | allow hal_graphics_composer_default sysfs_kgsl:file { getattr open read };
3 | allow hal_graphics_composer_default sysfs_kgsl:dir { search };
4 | allow hal_graphics_composer_default diag_device:chr_file { open read write getattr };
5 | allow hal_graphics_composer_default diag_device:chr_file { ioctl };
6 |
--------------------------------------------------------------------------------
/rootdir/etc/init.parallax.sh:
--------------------------------------------------------------------------------
1 | # parallax Initialization script by ronax
2 | # If there is not a persist value, we need to set one
3 | if [ ! -f /data/property/persist.cpucore.profile ]; then
4 | setprop persist.cpucore.profile 0
5 | fi
6 | if [ ! -f /data/property/persist.lkm.profile ]; then
7 | setprop persist.lkm.profile 0
8 | fi
9 | if [ ! -f /data/property/persist.tcp.profile ]; then
10 | setprop persist.tcp.profile 0
11 | fi
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_preset.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vintf/vendor.qti.esepowermanager@1.0-service.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | vendor.qti.esepowermanager
8 | hwbinder
9 | @1.0::IEsePowerManager/default
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_keymaster_qti.te:
--------------------------------------------------------------------------------
1 | allow hal_keymaster_qti system_file:file rx_file_perms;
2 | allow hal_keymaster_qti system_file:file { open read };
3 | allow hal_keymaster_qti theme_prop:file { read };
4 | allow hal_keymaster_qti system_file:file { getattr };
5 | allow hal_keymaster_qti theme_prop:file { read };
6 | allow hal_keymaster_qti system_file:file { execute };
7 | allow hal_keymaster_qti same_process_hal_file:file { execute getattr open read };
8 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservicemanager.te:
--------------------------------------------------------------------------------
1 | allow hwservicemanager init:binder transfer;
2 | allow hwservicemanager init:dir search;
3 | allow hwservicemanager init:file { open read };
4 | allow hwservicemanager init:process getattr;
5 | allow hwservicemanager runtime_event_log_tags_file:file read;
6 | allow hwservicemanager runtime_event_log_tags_file:file open;
7 | allow hwservicemanager hal_mlipay_default:binder { call };
8 | allow hwservicemanager dumpstate:fd { use };
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/cnd.te:
--------------------------------------------------------------------------------
1 | allow cnd hostapd:process { sigkill };
2 | allow cnd sysfs:file { open read };
3 | allow cnd default_android_hwservice:hwservice_manager { find };
4 | allow cnd wifi_prop:file { read };
5 | allow cnd wifi_prop:file { open };
6 | allow cnd wifi_prop:file { getattr };
7 | #allow cnd hal_slmadapter_hwservice:hwservice_manager find;
8 | allow cnd diag_device:chr_file { open read write getattr };
9 | allow cnd diag_device:chr_file { ioctl };
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_perf_default.te:
--------------------------------------------------------------------------------
1 | allow hal_perf_default sysfs:dir { open read };
2 | allow hal_perf_default self:capability { dac_override };
3 | allow hal_perf_default property_socket:sock_file { write };
4 | allow hal_perf_default init:unix_stream_socket { connectto };
5 | allow hal_perf_default vendor_default_prop:property_service { set };
6 | allow hal_perf_default hal_perf_default:capability { sys_admin };
7 | allow hal_perf_default hal_perf_default:capability { kill };
8 |
--------------------------------------------------------------------------------
/sepolicy/vendor/mediaprovider.te:
--------------------------------------------------------------------------------
1 | allow mediaprovider bootloader_boot_reason_prop:file read;
2 | allow mediaprovider runtime_event_log_tags_file:file read;
3 | allow mediaprovider bluetooth_prop:file read;
4 | allow mediaprovider boottime_prop:file read;
5 | allow mediaprovider shell_data_file:dir { getattr };
6 | allow mediaprovider app_data_file:dir { search };
7 | allow mediaprovider mnt_media_rw_file:dir { getattr };
8 | allow mediaprovider unlabeled:file { open read getattr };
9 |
--------------------------------------------------------------------------------
/configs/permissions/hotword-hiddenapi-package-whitelist.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_gpuboost_qs.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/configs/privapp-permissions-hotword.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/action_reset.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_gpuboost.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_power_default.te:
--------------------------------------------------------------------------------
1 | # Allow writing to files in /proc/touchpanel
2 | allow hal_power_default proc_touchpanel:dir search;
3 | allow hal_power_default proc_touchpanel:file rw_file_perms;
4 | allow hal_power_default init:binder call;
5 |
6 | #DT2W
7 | allow hal_power_default sysfs:file { open read write };
8 |
9 | allow hal_power_default proc:file { open write };
10 | allow hal_power_default input_device:chr_file { open read write };
11 |
12 | r_dir_file(hal_power_default, sysfs_graphics)
13 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_spectrum.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/keylayout/gf3208.kl:
--------------------------------------------------------------------------------
1 | #
2 | # Goodix fingerprint sensor driver
3 | #
4 | # Copyright (c) 2013,2014 Fingerprint Cards AB
5 | #
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License Version 2
8 | # as published by the Free Software Foundation.
9 | #
10 |
11 | key 195 SYSTEM_NAVIGATION_UP
12 | key 196 SYSTEM_NAVIGATION_DOWN
13 | key 197 SYSTEM_NAVIGATION_LEFT
14 | key 198 SYSTEM_NAVIGATION_RIGHT
15 | #key 353 CAMERA
16 |
--------------------------------------------------------------------------------
/XiaomiParts/res/menu/menu_reset.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_vddres.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/rootdir/etc/move_time_data.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # Copyright (c) 2018 Qualcomm Technologies, Inc.
4 | # All Rights Reserved.
5 | # Confidential and Proprietary - Qualcomm Technologies, Inc.
6 |
7 | DEST_PATH="/data/vendor/time"
8 | FILES_MOVED="/data/vendor/time/moved"
9 | SRC_PATH="/data/time"
10 |
11 | if [ ! -f "$FILES_MOVED" ]; then
12 | for i in "$SRC_PATH/ats"*; do
13 | dest_path=$DEST_PATH/"${i#$SRC_PATH/}"
14 | mv $i "$dest_path"
15 | done
16 | restorecon -R "$DEST_PATH"
17 | echo 1 > "$FILES_MOVED"
18 | fi
19 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_doze.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_lkm.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/src/org/ifaa/android/manager/IIFAAService.aidl:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | interface IIFAAService {
4 | byte[] processCmd_v2(in byte[] param);
5 | int[] getIDList(int bioType);
6 | int faceEnroll(String sessionId, int flags);
7 | int faceUpgrade(int action, String path, int offset, in byte[] data, int data_len);
8 | int faceAuthenticate_v2(String sessionId, int flags);
9 | int faceCancel_v2(String sessionId);
10 | byte[] faceInvokeCommand(in byte[] param);
11 | int faceGetCellinfo();
12 | }
13 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %2$s • Turbo Charging (%1$s until full)
7 |
8 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values-en-rAU/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %2$s • Turbo Charging (%1$s until full)
8 |
9 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values-en-rCA/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %2$s • Turbo Charging (%1$s until full)
8 |
9 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values-en-rGB/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %2$s • Turbo Charging (%1$s until full)
8 |
9 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values-en-rIN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %2$s • Turbo Charging (%1$s until full)
8 |
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/isolated_app.te:
--------------------------------------------------------------------------------
1 | allow isolated_app bluetooth_prop:file read;
2 | allow isolated_app boottime_prop:file read;
3 | allow isolated_app bootloader_boot_reason_prop:file { read };
4 | allow isolated_app cnd_vendor_prop:file { read };
5 | allow isolated_app app_data_file:dir { getattr };
6 | allow isolated_app app_data_file:file { setattr };
7 | allow isolated_app app_data_file:dir { search };
8 | allow isolated_app app_data_file:dir { setattr };
9 | allow isolated_app privapp_data_file:file { setattr };
10 | allow isolated_app unlabeled:file { open read getattr };
11 |
--------------------------------------------------------------------------------
/prebuilt/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := init.spectrum.rc
5 | LOCAL_MODULE_TAGS := optional
6 | LOCAL_MODULE_CLASS := ETC
7 | LOCAL_SRC_FILES := etc/init.spectrum.rc
8 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
9 | include $(BUILD_PREBUILT)
10 |
11 | include $(CLEAR_VARS)
12 | LOCAL_MODULE := init.spectrum.sh
13 | LOCAL_MODULE_TAGS := optional
14 | LOCAL_MODULE_CLASS := ETC
15 | LOCAL_SRC_FILES := etc/init.spectrum.sh
16 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
17 | include $(BUILD_PREBUILT)
18 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_mic.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/netmgrd.te:
--------------------------------------------------------------------------------
1 | set_prop(netmgrd, vendor_xlat_prop)
2 | allow netmgrd kernel:system module_request;
3 | allow netmgrd netutils_wrapper:process noatsecure;
4 | allow netmgrd sysfs:file { open read };
5 | allow netmgrd system_file:file { execute execute_no_trans getattr open read };
6 | allow netmgrd netmgrd:capability { sys_admin };
7 | allow netmgrd diag_device:chr_file { read write };
8 | allow netmgrd vendor_default_prop:property_service { set };
9 | allow netmgrd netmgrd:capability { kill };
10 | allow netmgrd diag_device:chr_file { open read getattr };
11 | allow netmgrd diag_device:chr_file { ioctl };
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_headphone.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_flash.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/bluetooth.te:
--------------------------------------------------------------------------------
1 | allow bluetooth bootloader_boot_reason_prop:file read;
2 | allow bluetooth cnd_vendor_prop:file read;
3 | allow bluetooth boottime_prop:file read;
4 | allow bluetooth hal_perf_hwservice:hwservice_manager find;
5 | allow bluetooth hal_perf_default:binder call;
6 | allow bluetooth vendor_file:file { read open };
7 | allow bluetooth gpuservice:binder { call };
8 | allow bluetooth theme_prop:file { read open getattr };
9 | allow bluetooth sysfs_kgsl:dir { search };
10 |
11 | # Binder call with gpuservice
12 | binder_call(bluetooth, gpuservice)
13 |
14 | allow bluetooth unlabeled:file { open read getattr };
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_power.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_cpuboost_qs.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_cpucore.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/configs/permissions/privapp-permissions-hotword.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property.te:
--------------------------------------------------------------------------------
1 | # Fingerprint
2 | type fingerprint_status_prop, property_type;
3 |
4 | # Post Boot
5 | type sys_post_boot_prop, property_type;
6 |
7 | # Mlipay
8 | type ifaa_prop, property_type;
9 |
10 | # Sensors
11 | type sensors_panel_prop, property_type;
12 |
13 | # Thermal engine
14 | type thermal_prop, property_type;
15 |
16 | # Dirac
17 | type dirac_prop, property_type;
18 |
19 | # GPUboost
20 | type gpuboost_prop, property_type;
21 |
22 | # CPUboost
23 | type cpuboost_prop, property_type;
24 |
25 | type cpucore_prop, property_type;
26 | type lkm_prop, property_type;
27 | type tcp_prop, property_type;
28 |
29 | # Dolby
30 | type vendor_dolby_loglevel_prop, property_type;
--------------------------------------------------------------------------------
/sepolicy/vendor/surfaceflinger.te:
--------------------------------------------------------------------------------
1 | allow surfaceflinger device:chr_file ioctl;
2 | allow surfaceflinger sysfs_kgsl:lnk_file read;
3 | allow surfaceflinger vendor_file:file { execute getattr open read };
4 | allow surfaceflinger sysfs_kgsl:file { getattr read open };
5 | allow surfaceflinger firmware_file:dir search;
6 | r_dir_file(surfaceflinger, sysfs_kgsl)
7 |
8 | allow surfaceflinger vendor_system_prop:file { getattr };
9 | allow surfaceflinger vendor_system_prop:file { read };
10 | allow surfaceflinger vendor_system_prop:file { open };
11 | allow surfaceflinger hal_graphics_composer_default:dir { search };
12 | allow surfaceflinger hal_graphics_composer_default:file { read open getattr };
13 |
--------------------------------------------------------------------------------
/sepolicy/vendor/shell.te:
--------------------------------------------------------------------------------
1 | allow shell vendor_file:file getattr;
2 | allow shell vendor_firmware_file:dir getattr;
3 | allow shell adb_data_file:file { execute getattr open read };
4 | allow shell cache_file:lnk_file { getattr read };
5 | allow shell kernel:system syslog_read;
6 | allow shell init_exec:lnk_file { getattr read };
7 | allow shell mnt_vendor_file:lnk_file { getattr read };
8 | allow shell postinstall_mnt_dir:dir getattr;
9 | allow shell rootfs:file getattr;
10 | allow shell adsprpcd_file:dir getattr;
11 | allow shell firmware_file:dir getattr;
12 | allow shell devpts:chr_file { ioctl };
13 | allow shell sysfs_graphics:file getattr;
14 | allow shell unlabeled:file { open read getattr };
15 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV3.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 |
4 | public abstract class IFAAManagerV3 extends IFAAManagerV2 {
5 | public static final String KEY_FINGERPRINT_FULLVIEW = "org.ifaa.ext.key.CUSTOM_VIEW";
6 | public static final String KEY_GET_SENSOR_LOCATION = "org.ifaa.ext.key.GET_SENSOR_LOCATION";
7 | public static final String VALUE_FINGERPRINT_DISABLE = "disable";
8 | public static final String VLAUE_FINGERPRINT_ENABLE = "enable";
9 |
10 | public abstract String getExtInfo(int authType, String keyExtInfo);
11 |
12 | public abstract void setExtInfo(int authType, String keyExtInfo, String valExtInfo);
13 | }
14 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_dms_default.te:
--------------------------------------------------------------------------------
1 | type hal_dms_default, domain;
2 | hal_server_domain(hal_dms_default, hal_dms)
3 |
4 | type hal_dms_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_dms_default)
6 |
7 | allow hal_dms_default hal_audio_default:binder call;
8 | allow hal_dms_default platform_app:binder call;
9 | allow hal_dms_default vendor_data_file:file { rw_file_perms create };
10 | allow hal_dms_default vendor_data_file:dir { rw_file_perms add_name };
11 |
12 | allow hal_dms_default vendor_media_data_file:dir { add_name remove_name read write search open };
13 | allow hal_dms_default vendor_media_data_file:file { read write open create ioctl getattr lock unlink };
14 |
--------------------------------------------------------------------------------
/XiaomiParts/res/layout/activity_kcal.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_cam_qs.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_mtherm.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_vibrate_notif.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/wcnss_service.te:
--------------------------------------------------------------------------------
1 | set_prop(wcnss_service, wifi_prop);
2 | set_prop(wcnss_service, serialno_prop);
3 |
4 | allow wcnss_service wifi_data_file:dir search;
5 |
6 | allow wcnss_service init:unix_stream_socket connectto;
7 | allow wcnss_service property_socket:sock_file write;
8 |
9 | allow wcnss_service sysfs:file { open read };
10 | allow wcnss_service serialno_prop:file { read };
11 | allow wcnss_service serialno_prop:file open;
12 | allow wcnss_service serialno_prop:file getattr;
13 | allow wcnss_service vendor_default_prop:property_service { set };
14 | dontaudit wcnss_service serialno_prop:file read;
15 | allow wcnss_service property_socket:sock_file { write };
16 | allow wcnss_service vfat:file { open read getattr };
17 |
--------------------------------------------------------------------------------
/vintf/vendor.qti.gnss@3.0-service.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | vendor.qti.gnss
8 | hwbinder
9 | @1.2::ILocHidlGnss/gnss_vendor
10 | @2.1::ILocHidlGnss/gnss_vendor
11 | @3.0::ILocHidlGnss/gnss_vendor
12 |
13 |
14 | android.hardware.gnss
15 | hwbinder
16 | @1.0::IGnss/gnss_vendor
17 |
18 |
19 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_cam.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_earpiece.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_fastcharge.xml:
--------------------------------------------------------------------------------
1 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_tcp.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_dirac.xml:
--------------------------------------------------------------------------------
1 |
6 |
14 |
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/sepolicy/vendor/thermal_engine.te:
--------------------------------------------------------------------------------
1 | allow thermal-engine sysfs:dir { open read };
2 | # allow thermal-engine thermal_data_file:dir rw_dir_perms;
3 | allow thermal-engine sysfs:file { open read write };
4 | allow thermal-engine property_socket:sock_file { write };
5 | allow thermal-engine init:unix_stream_socket { connectto };
6 | allow thermal-engine system_file:file { read open };
7 | allow thermal-engine thermal_prop:property_service { set };
8 | allow thermal-engine thermal-engine:capability { kill };
9 | allow thermal-engine thermal-engine:capability { sys_admin };
10 | r_dir_file(thermal-engine, sysfs)
11 | allow thermal-engine thermal_prop:file { read };
12 | allow thermal-engine thermal_prop:file { open };
13 | allow thermal-engine thermal_prop:file { getattr };
14 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_led.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_speaker.xml:
--------------------------------------------------------------------------------
1 |
6 |
14 |
15 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_vibrate_call.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/fsck.te:
--------------------------------------------------------------------------------
1 | allow fsck block_device:blk_file { ioctl open read write };
2 | allow fsck self:capability dac_override;
3 | allow fsck tmpfs:blk_file getattr;
4 | allow fsck mnt_vendor_file:dir getattr;
5 | allow fsck mnt_vendor_file:dir { search };
6 | # allow fsck fsck:capability { dac_override };
7 | # allow fsck fsck:capability { dac_read_search };
8 | allow fsck fsck:capability { sys_admin };
9 | allow fsck fsck:capability { kill };
10 | allow fsck tmpfs:blk_file { getattr };
11 | allow fsck cache_block_device:blk_file { getattr read write };
12 | allow fsck userdata_block_device:blk_file { getattr read write };
13 | allow fsck custom_ab_block_device:blk_file { read write open };
14 | allow fsck custom_ab_block_device:blk_file { ioctl };
15 | allow fsck_untrusted vold_device:blk_file { ioctl };
16 |
--------------------------------------------------------------------------------
/sepolicy/private/gmscore_app.te:
--------------------------------------------------------------------------------
1 | allow gmscore_app adbd_prop:file { open read getattr };
2 | #allow gmscore_app adsprpc_prop:file { open read getattr };
3 | #allow gmscore_app bg_boot_complete_prop:file { open read getattr };
4 | #allow gmscore_app vendor_system_prop:file { open read getattr };
5 | #allow gmscore_app bg_daemon_prop:file { open read getattr };
6 | allow gmscore_app apexd_prop:file { open getattr };
7 | allow gmscore_app apk_verity_prop:file { open read getattr };
8 | allow gmscore_app vendor_file:file { open read getattr };
9 | allow gmscore_app bluetooth_a2dp_offload_prop:file { open read getattr };
10 | allow gmscore_app theme_prop:file { open read getattr };
11 | allow gmscore_app unlabeled:file { open read getattr };
12 | allow gmscore_app bluetooth_audio_hal_prop:file { open read getattr };
13 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_qs_dirac.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/rootdir/etc/init.camera.rc:
--------------------------------------------------------------------------------
1 | # Initialization
2 | on property:sys.boot_completed=1
3 |
4 | # Set default profile on first boot
5 | exec u:r:init:s0 root root -- /vendor/bin/init.camera.sh
6 | exec u:r:magisk:s0 root root -- /vendor/bin/init.camera.sh
7 |
8 | # Enable CameraHal support
9 | setprop camera.support 1
10 |
11 | # 0 - Enable Hal1
12 | on property:persist.camera.profile=0
13 | setprop persist.vendor.camera.HAL3.enabled 0
14 | stop vendor.camera-provider-2-4
15 | stop cameraserver
16 | start vendor.camera-provider-2-4
17 | start cameraserver
18 |
19 | # 1 - Enable Hal3
20 | on property:persist.camera.profile=1
21 | setprop persist.vendor.camera.HAL3.enabled 1
22 | stop vendor.camera-provider-2-4
23 | stop cameraserver
24 | start vendor.camera-provider-2-4
25 | start cameraserver
26 |
--------------------------------------------------------------------------------
/bootctrl/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 |
17 | cc_library {
18 | name: "bootctrl.msm8953",
19 | defaults: ["bootctrl_hal_defaults"],
20 | static_libs: ["libgptutils.daisy"],
21 | }
22 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property_contexts.save:
--------------------------------------------------------------------------------
1 | hw.aov.disable_hotword u:object_r:adspd_prop:s0
2 | hw.aov.hotword_dsp_path u:object_r:adspd_prop:s0
3 | hw.motosh.booted u:object_r:motosh_prop:s0
4 | ro.boot.hardware.revision u:object_r:hw_rev_prop:s0
5 | hw.touch.status u:object_r:touch_prop:s0
6 | sys.listeners.registered u:object_r:tee_listener_prop:s0
7 | persist.audio.dirac. u:object_r:dirac_prop:s0
8 | persist.vendor.dolby.loglevel u:object_r:vendor_dolby_loglevel_prop:s0
9 | # GPUboost
10 | persist.gpuboost.profile u:object_r:gpuboost_prop:s0
11 | # cpuboost
12 | persist.cpuboost.profile u:object_r:cpuboost_prop:s0
13 | persist.cpucore.profile u:object_r:cpucore_prop:s0
14 | persist.lkm.profile u:object_r:lkm_prop:s0
15 |
--------------------------------------------------------------------------------
/sepolicy/vendor/radio.te:
--------------------------------------------------------------------------------
1 | allow radio system_app_data_file:dir getattr;
2 | allow radio vendor_file:file { execute getattr open read };
3 | allow radio adb_data_file:file { getattr open read };
4 | allow radio gpuservice:binder { call };
5 | allow radio theme_prop:file { read };
6 | allow radio theme_prop:file { open };
7 | allow radio theme_prop:file { getattr };
8 | allow radio sysfs_kgsl:dir { search };
9 | allow radio system_app_data_file:dir { getattr };
10 | allow radio vendor_system_prop:file { read };
11 | allow radio adbd_prop:file { open getattr };
12 | allow radio adsprpc_prop:file { open getattr };
13 | allow radio apexd_prop:file { open getattr };
14 | allow radio cnd:binder { call };
15 | allow radio unlabeled:file { open read getattr };
16 | allow radio qcom_ims_prop:file { open read getattr };
17 | allow radio cnd:binder { transfer };
18 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_pickup.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/AndroidProducts.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2017-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 | PRODUCT_MAKEFILES := \
17 | $(LOCAL_DIR)/superior_daisy.mk
18 |
19 | COMMON_LUNCH_CHOICES := \
20 | superior_daisy-user \
21 | superior_daisy-userdebug \
22 | superior_daisy-eng
23 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_qs_log.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/sepolicy/vendor/init_fingerprint.te:
--------------------------------------------------------------------------------
1 | type init_fingerprint, domain;
2 | type init_fingerprint_exec, exec_type, vendor_file_type, file_type;
3 |
4 | # Allow for transition from init domain to init_fingerprint
5 | init_daemon_domain(init_fingerprint)
6 |
7 | # Shell script needs to execute /vendor/bin/sh
8 | allow init_fingerprint vendor_shell_exec:file rx_file_perms;
9 | allow init_fingerprint vendor_toolbox_exec:file rx_file_perms;
10 |
11 | # Allow to delete file
12 | allow init_fingerprint mnt_vendor_file:dir search;
13 | allow init_fingerprint persist_drm_file:dir { read search open write remove_name };
14 | allow init_fingerprint persist_drm_file:file { getattr unlink };
15 | allow init_fingerprint system_data_file:file r_file_perms;
16 |
17 | allow init_fingerprint self:capability dac_override;
18 | allow init_fingerprint init_fingerprint:capability { sys_admin };
19 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/action_presets.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/XiaomiParts/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 |
--------------------------------------------------------------------------------
/configs/android.hardware.camera.ar.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_vibrate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 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 | set -e
19 |
20 | # Required!
21 | export DEVICE=daisy
22 | export DEVICE_COMMON=msm8953-common
23 | export VENDOR=xiaomi
24 |
25 | export DEVICE_BRINGUP_YEAR=2019
26 |
27 | ./../../$VENDOR/$DEVICE_COMMON/extract-files.sh $@
28 |
--------------------------------------------------------------------------------
/sepolicy/private/vendor_init.te:
--------------------------------------------------------------------------------
1 | allow vendor_init rootfs:dir { add_name write };
2 | allow vendor_init cgroup:file create;
3 | allow vendor_init sysfs:dir write;
4 | allow vendor_init sysfs_zram:dir write;
5 | allow vendor_init bluetooth_data_file:dir setattr;
6 | allow vendor_init system_data_file:dir write;
7 | allow vendor_init sysfs:dir add_name;
8 | allow vendor_init sysfs_zram:dir add_name;
9 | allow vendor_init device:file { create write };
10 | allow vendor_init system_data_file:dir { add_name };
11 | allow vendor_init camera_data_file:dir create;
12 | allow vendor_init system_data_file:dir create;
13 | allow vendor_init tombstone_data_file:dir { search setattr };
14 | allow vendor_init camera_data_file:dir setattr;
15 | allow vendor_init system_data_file:dir setattr;
16 | allow vendor_init tombstone_data_file:dir write;
17 | allow vendor_init tombstone_data_file:dir add_name;
18 | allow vendor_init tombstone_data_file:dir create;
19 |
--------------------------------------------------------------------------------
/sepolicy/vendor/zygote.te:
--------------------------------------------------------------------------------
1 | allow zygote cgroup:file create;
2 | allow zygote self:capability kill;
3 | allow zygote vendor_file:file { execute getattr open read };
4 | allow zygote theme_prop:file { read };
5 | allow zygote theme_prop:file { open };
6 | allow zygote theme_prop:file { getattr };
7 | allow zygote shell_data_file:file { read };
8 | allow zygote zygote:capability { kill };
9 | allow app_zygote zygote_exec:file { read execute };
10 | allow zygote same_process_hal_file:file { execute read open getattr map };
11 | allow zygote vendor_system_prop:file { read };
12 | allow zygote vendor_system_prop:file { open };
13 | allow zygote vendor_system_prop:file { getattr };
14 | allow zygote system_file:dir { write };
15 | allow zygote system_data_file:sock_file { write };
16 | allow zygote system_server:unix_dgram_socket { sendto };
17 | allow zygote exported_camera_prop:file { read open getattr };
18 | allow zygote device:file { write };
19 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 | #66000000
17 |
18 | #FF6700
19 |
20 |
--------------------------------------------------------------------------------
/light/android.hardware.light@2.0-service.daisy.rc:
--------------------------------------------------------------------------------
1 | on boot
2 | # leds light
3 | chown system system /sys/class/leds/red/brightness
4 | chown system system /sys/class/leds/red/blink
5 | chown system system /sys/class/leds/red/duty_pcts
6 | chown system system /sys/class/leds/red/pause_hi
7 | chown system system /sys/class/leds/red/pause_lo
8 | chown system system /sys/class/leds/red/ramp_step_ms
9 | chown system system /sys/class/leds/red/start_idx
10 |
11 | chmod 660 /sys/class/leds/red/blink
12 | chmod 660 /sys/class/leds/red/duty_pcts
13 | chmod 660 /sys/class/leds/red/pause_hi
14 | chmod 660 /sys/class/leds/red/pause_lo
15 | chmod 660 /sys/class/leds/red/ramp_step_ms
16 | chmod 660 /sys/class/leds/red/start_idx
17 |
18 | service light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.daisy
19 | class hal
20 | user system
21 | group system
22 | shutdown critical
23 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 | true
16 | 4
17 |
18 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/Android.bp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017-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 | java_library {
18 | name: "org.ifaa.android.manager",
19 | installable: true,
20 | srcs: [
21 | "src/**/*.java",
22 | "src/**/I*.aidl",
23 | ],
24 | aidl: {
25 | local_include_dirs: ["src"],
26 | },
27 | }
28 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_hand.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/XiaomiPartsTile.java:
--------------------------------------------------------------------------------
1 | package com.xiaomi.parts;
2 |
3 | import android.content.ActivityNotFoundException;
4 | import android.content.Intent;
5 | import android.service.quicksettings.TileService;
6 |
7 | import com.xiaomi.parts.DeviceSettings;
8 | import com.xiaomi.parts.DeviceSettingsActivity;
9 |
10 | public class XiaomiPartsTile extends TileService {
11 |
12 | @Override
13 | public void onClick() {
14 | try {
15 | Intent intent = new Intent(this, DeviceSettingsActivity.class);
16 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
17 | startActivityAndCollapse(intent);
18 | } catch (ActivityNotFoundException ignored) {
19 | // At this point, the app is most likely hidden and set to only open from Settings
20 | Intent intent = new Intent(this, DeviceSettings.class);
21 | startActivityAndCollapse(intent);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/configs/permissions/com.android.hotwordenrollment.common.util.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/switchbar_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | true
21 |
22 | false
23 |
24 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_kcal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_torch.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/init/Android.bp:
--------------------------------------------------------------------------------
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 | cc_library_static {
18 | name: "libinit_daisy",
19 | recovery_available: true,
20 | srcs: ["init_daisy.cpp"],
21 | include_dirs: [
22 | "system/core/base/include",
23 | "system/core/init"
24 | ],
25 | shared_libs: [
26 | "libbase",
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_boost.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/configs/gps/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 = 1
26 | LOWI_USE_LOWI_LP = 0
27 |
--------------------------------------------------------------------------------
/sepolicy/vendor/tee.te:
--------------------------------------------------------------------------------
1 | # /data/goodix labeling
2 | type_transition tee system_data_file:{ dir file } gx_fpd_data_file;
3 |
4 | allow tee gx_fpd_data_file:dir create_dir_perms;
5 | allow tee gx_fpd_data_file:file create_file_perms;
6 | allow tee system_data_file:dir create_dir_perms;
7 | allow tee fingerprintd_data_file:dir create_dir_perms;
8 | allow tee fingerprintd_data_file:file create_file_perms;
9 |
10 | # Set the sys.listeners.registered property
11 | set_prop(tee, system_prop)
12 |
13 | allow tee block_device:blk_file { getattr open read write };
14 | allow tee system_file:file { execute getattr open read };
15 | allow tee unlabeled:file { read write open };
16 | typeattribute tee data_between_core_and_vendor_violators;
17 | allow tee vendor_data_file:dir { read };
18 | allow tee vendor_data_file:dir { open };
19 | allow tee vendor_data_file:dir { write };
20 | allow tee vendor_data_file:dir { add_name };
21 | allow tee vendor_data_file:file { create };
22 | allow tee vendor_data_file:file { read write open };
23 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/sepolicy/vendor/ueventd.te:
--------------------------------------------------------------------------------
1 | allow ueventd fpc_sysfs:file rw_file_perms;
2 |
3 | allow ueventd wifi_vendor_data_file:dir search;
4 | allow ueventd wifi_vendor_data_file:file { getattr open read };
5 | allow ueventd debugfs:dir { open read relabelfrom };
6 | allow ueventd debugfs:file getattr;
7 | allow ueventd debugfs_wakeup_sources:file getattr;
8 | allow ueventd qti_debugfs:dir relabelto;
9 | allow ueventd vfat:file { getattr open read };
10 | allow ueventd ueventd:capability { kill };
11 | allow ueventd kcal_dev:dir r_dir_perms;
12 | allow ueventd kcal_dev:file rw_file_perms;
13 | allow ueventd kcal_dev:lnk_file r_file_perms;
14 |
15 | r_dir_file(ueventd, wifi_vendor_data_file)
16 | r_dir_file(ueventd, vfat)
17 | allow ueventd vfat:dir { search };
18 | allow ueventd vfat:file { read };
19 | allow ueventd vfat:file { open };
20 | allow ueventd vfat:file { getattr };
21 | allow ueventd ueventd:capability { sys_admin };
22 |
23 | typeattribute ueventd data_between_core_and_vendor_violators;
24 |
25 | allow ueventd ueventd:capability { sys_nice };
26 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 3dp
21 | 9dp
22 | 5dp
23 |
24 |
--------------------------------------------------------------------------------
/XiaomiParts/res/layout/doze.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/overlay/packages/apps/DocumentsUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 | true
20 | content://com.android.externalstorage.documents/root/primary
21 |
22 |
--------------------------------------------------------------------------------
/configs/component-overrides.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XiaomiParts/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 := XiaomiParts
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/XiaomiParts/res))) \
19 | $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
20 | $(addprefix $(dir)/, packages/apps/XiaomiParts/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 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_init.te:
--------------------------------------------------------------------------------
1 | typeattribute vendor_init data_between_core_and_vendor_violators;
2 |
3 | allow vendor_init {
4 | system_data_file
5 | tombstone_data_file
6 | camera_data_file
7 | bluetooth_data_file
8 | }:dir { create search getattr open read setattr ioctl write add_name remove_name rmdir relabelfrom };
9 |
10 | allow vendor_init rootfs:dir { add_name write };
11 | allow vendor_init cgroup:file create;
12 | allow vendor_init sysfs:dir write;
13 | allow vendor_init sysfs_zram:dir { add_name write };
14 | allow vendor_init sysfs:dir add_name;
15 | allow vendor_init device:file { create write };
16 | allow vendor_init camera_data_file:dir setattr;
17 | allow vendor_init tombstone_data_file:dir write;
18 | allow vendor_init sysfs_zram:file { create };
19 | allow vendor_init device_config_runtime_native_prop:property_service { set };
20 | allow vendor_init sysfs:file { create };
21 | allow vendor_init cache_file:lnk_file { read };
22 |
23 | allow init adsprpcd_file:file mounton;
24 | allow vendor_init sysfs_cpu_boost:dir { add_name };
25 | allow vendor_init sysfs_cpu_boost:file { create };
26 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SettingsLib/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 | 1.0.0.1
24 |
25 | 1.1.1.1
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/libhidl/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2017 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 | include $(CLEAR_VARS)
17 | LOCAL_SHARED_LIBRARIES := libhidltransport
18 | LOCAL_MODULE := android.hidl.base@1.0
19 | LOCAL_MODULE_TAGS := optional
20 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES
21 | include $(BUILD_SHARED_LIBRARY)
22 |
23 | include $(CLEAR_VARS)
24 | LOCAL_SHARED_LIBRARIES := libhidltransport
25 | LOCAL_MODULE := android.hidl.manager@1.0
26 | LOCAL_MODULE_TAGS := optional
27 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES
28 | include $(BUILD_SHARED_LIBRARY)
29 |
30 |
--------------------------------------------------------------------------------
/light/Android.bp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2018 The LineageOS 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 | cc_binary {
16 | relative_install_path: "hw",
17 | defaults: ["hidl_defaults"],
18 | name: "android.hardware.light@2.0-service.daisy",
19 | proprietary: true,
20 | init_rc: ["android.hardware.light@2.0-service.daisy.rc"],
21 | srcs: ["service.cpp", "Light.cpp"],
22 | shared_libs: [
23 | "libhardware",
24 | "libhidlbase",
25 | "liblog",
26 | "libutils",
27 | "android.hardware.light@2.0",
28 | ],
29 | }
30 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_pocket.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
24 |
25 | - 0
26 | - -1
27 | - -1
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_custom_seekbar_minus.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/xml/power_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - 63
4 | - 261
5 |
6 | 10
7 | 15
8 | 20
9 | 30
10 | 35
11 | 45
12 | 52
13 |
14 |
15 | 200000
16 | 499200
17 | 533333
18 | 800000
19 | 998400
20 | 1094400
21 | 1209600
22 |
23 |
24 | 151
25 | 169
26 | 177
27 | 195
28 | 259
29 | 307
30 | 353
31 |
32 | - 1.6
33 | - 1.6
34 | - 4000
35 |
36 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_linux.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_custom_seekbar_plus.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/overlay/packages/providers/TelephonyProvider/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
23 | com.google.android.carrier/.ApnSourceService
24 |
25 |
--------------------------------------------------------------------------------
/recovery/gpt-utils/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 |
17 |
18 | cc_library {
19 | name: "libgptutils.daisy",
20 | vendor: true,
21 | recovery_available: true,
22 | shared_libs: [
23 | "libcutils",
24 | "liblog",
25 | "libz",
26 | ],
27 | cflags: [
28 | "-Wall",
29 | "-Werror",
30 | "-Wno-macro-redefined",
31 | ],
32 | srcs: [
33 | "gpt-utils.cpp",
34 | ],
35 | owner: "qti",
36 | header_libs: [
37 | "device_kernel_headers",
38 | ],
39 | export_include_dirs: ["."],
40 | }
41 |
--------------------------------------------------------------------------------
/overlay/packages/apps/CustomDoze/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | true
21 | true
22 |
23 |
24 | xiaomi.sensor.pickup
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/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 ion_device:chr_file rw_file_perms;
9 | allow hal_mlipay_default tee_device:chr_file rw_file_perms;
10 | r_dir_file(hal_mlipay_default, firmware_file)
11 |
12 | # get_prop(hal_mlipay_default, vendor_fp_prop)
13 | # set_prop(hal_mlipay_default, vendor_fp_prop)
14 | set_prop(hal_mlipay_default, vendor_tee_listener_prop)
15 |
16 | allow hal_mlipay_default hwservicemanager_prop:file { read };
17 | allow hal_mlipay_default hwservicemanager_prop:file { open };
18 | allow hal_mlipay_default hwservicemanager_prop:file { getattr };
19 | allow hal_mlipay_default hwservicemanager:binder { call };
20 | allow hal_mlipay_default hwservicemanager:binder { transfer };
21 | allow hal_mlipay_default ifaa_prop:property_service { set };
22 | allow hal_mlipay_default default_android_hwservice:hwservice_manager { add };
23 | allow hal_mlipay_default hidl_base_hwservice:hwservice_manager { add };
24 | allow hal_mlipay_default vfat:file { read open getattr };
25 | allow hal_mlipay_default vfat:dir { search };
26 |
--------------------------------------------------------------------------------
/XiaomiParts/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 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_ccontrol.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/CpuboostTileService.java:
--------------------------------------------------------------------------------
1 | package com.xiaomi.parts;
2 |
3 | import android.service.quicksettings.Tile;
4 | import android.service.quicksettings.TileService;
5 |
6 | public class CpuboostTileService extends TileService {
7 |
8 | @Override
9 | public void onStartListening() {
10 | int currentState = FileUtils.getintProp(DeviceSettings.CPUBOOST_SYSTEM_PROPERTY, 0);
11 |
12 | Tile tile = getQsTile();
13 | tile.setState(Tile.STATE_ACTIVE);
14 | tile.setLabel(getResources().getStringArray(R.array.cpuboost_profiles)[currentState]);
15 |
16 | tile.updateTile();
17 | super.onStartListening();
18 | }
19 |
20 | @Override
21 | public void onClick() {
22 | int currentState = FileUtils.getintProp(DeviceSettings.CPUBOOST_SYSTEM_PROPERTY, 0);
23 |
24 | int nextState;
25 | if (currentState == 3) {
26 | nextState = 0;
27 | } else {
28 | nextState = currentState + 1;
29 | }
30 |
31 | Tile tile = getQsTile();
32 | FileUtils.setintProp(DeviceSettings.CPUBOOST_SYSTEM_PROPERTY, nextState);
33 | tile.setLabel(getResources().getStringArray(R.array.cpuboost_profiles)[nextState]);
34 |
35 | tile.updateTile();
36 | super.onClick();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/GpuboostTileService.java:
--------------------------------------------------------------------------------
1 | package com.xiaomi.parts;
2 |
3 | import android.service.quicksettings.Tile;
4 | import android.service.quicksettings.TileService;
5 |
6 | public class GpuboostTileService extends TileService {
7 |
8 | @Override
9 | public void onStartListening() {
10 | int currentState = FileUtils.getintProp(DeviceSettings.GPUBOOST_SYSTEM_PROPERTY, 0);
11 |
12 | Tile tile = getQsTile();
13 | tile.setState(Tile.STATE_ACTIVE);
14 | tile.setLabel(getResources().getStringArray(R.array.gpuboost_profiles)[currentState]);
15 |
16 | tile.updateTile();
17 | super.onStartListening();
18 | }
19 |
20 | @Override
21 | public void onClick() {
22 | int currentState = FileUtils.getintProp(DeviceSettings.GPUBOOST_SYSTEM_PROPERTY, 0);
23 |
24 | int nextState;
25 | if (currentState == 3) {
26 | nextState = 0;
27 | } else {
28 | nextState = currentState + 1;
29 | }
30 |
31 | Tile tile = getQsTile();
32 | FileUtils.setintProp(DeviceSettings.GPUBOOST_SYSTEM_PROPERTY, nextState);
33 | tile.setLabel(getResources().getStringArray(R.array.gpuboost_profiles)[nextState]);
34 |
35 | tile.updateTile();
36 | super.onClick();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 | 2000000
25 |
26 |
27 | 5500000
28 |
29 |
--------------------------------------------------------------------------------
/XiaomiParts/res/drawable/ic_backlight.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
19 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/CameraTileService.java:
--------------------------------------------------------------------------------
1 | package com.xiaomi.parts;
2 |
3 | import android.service.quicksettings.Tile;
4 | import android.service.quicksettings.TileService;
5 | import androidx.preference.PreferenceManager;
6 |
7 | public class CameraTileService extends TileService {
8 |
9 | @Override
10 | public void onStartListening() {
11 | int currentState = FileUtils.getintProp(DeviceSettings.CAMERA_SYSTEM_PROPERTY, 0);
12 |
13 | Tile tile = getQsTile();
14 | tile.setState(Tile.STATE_ACTIVE);
15 | tile.setLabel(getResources().getStringArray(R.array.camera_profiles)[currentState]);
16 |
17 | tile.updateTile();
18 | super.onStartListening();
19 | }
20 |
21 | @Override
22 | public void onClick() {
23 | int currentState = FileUtils.getintProp(DeviceSettings.CAMERA_SYSTEM_PROPERTY, 0);
24 |
25 | int nextState;
26 | if (currentState == 1) {
27 | nextState = 0;
28 | } else {
29 | nextState = currentState + 1;
30 | }
31 |
32 | Tile tile = getQsTile();
33 | FileUtils.setintProp(DeviceSettings.CAMERA_SYSTEM_PROPERTY, nextState);
34 | tile.setLabel(getResources().getStringArray(R.array.camera_profiles)[nextState]);
35 |
36 | tile.updateTile();
37 | super.onClick();
38 | }
39 | }
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/ambient/AmbientGesturePreferenceActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 The CyanogenMod Project
3 | * (C) 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 com.xiaomi.parts.ambient;
19 |
20 | import android.os.Bundle;
21 | import com.xiaomi.parts.R;
22 | import android.preference.PreferenceActivity;
23 |
24 | public class AmbientGesturePreferenceActivity extends PreferenceActivity {
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | getFragmentManager().beginTransaction()
30 | .replace(android.R.id.content, new AmbientGesturePreferenceFragment())
31 | .commit();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/SpectrumTileService.java:
--------------------------------------------------------------------------------
1 | package com.xiaomi.parts;
2 |
3 | import android.service.quicksettings.Tile;
4 | import android.service.quicksettings.TileService;
5 |
6 | public class SpectrumTileService extends TileService {
7 |
8 | @Override
9 | public void onStartListening() {
10 | int currentState = FileUtils.getintProp(DeviceSettings.SPECTRUM_SYSTEM_PROPERTY, 0);
11 |
12 | Tile tile = getQsTile();
13 | tile.setState(Tile.STATE_ACTIVE);
14 | tile.setLabel(getResources().getStringArray(R.array.spectrum_profiles)[currentState]);
15 |
16 | tile.updateTile();
17 | super.onStartListening();
18 | }
19 |
20 | @Override
21 | public void onClick() {
22 | int currentState = FileUtils.getintProp(DeviceSettings.SPECTRUM_SYSTEM_PROPERTY, 0);
23 |
24 | int nextState;
25 | if (currentState == 4) {
26 | nextState = 0;
27 | } else {
28 | nextState = currentState + 1;
29 | }
30 |
31 | Tile tile = getQsTile();
32 | FileUtils.setintProp(DeviceSettings.SPECTRUM_SYSTEM_PROPERTY, nextState);
33 | tile.setLabel(getResources().getStringArray(R.array.spectrum_profiles)[nextState]);
34 |
35 | tile.updateTile();
36 | super.onClick();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Copyright (C) 2020 The The LineageOS Project
2 |
3 | The Mi A2 Lite (codenamed _"daisy"_) smartphone from Xiaomi.
4 |
5 | Xiaomi Mi A2 Lite was announced and released in July 2018.
6 |
7 | ## Device specifications
8 |
9 | | Device | Xiaomi Mi A2 Lite |
10 | | -----------: | :---------------------------------------------- |
11 | | SoC | Qualcomm MSM8953 Snapdragon 625 |
12 | | CPU | Octa-core 2.0 GHz Cortex-A53 |
13 | | GPU | Adreno 506 |
14 | | Memory | 3/4 GB |
15 | | Shipped Android version | 8.1.0 |
16 | | Storage | 32/64 GB |
17 | | Battery | Non-removable Li-Po 4000 mAh |
18 | | Dimensions | 149.3 x 71.7 x 8.8 mm |
19 | | Display | 1080 x 2280 pixels (~432 ppi) |
20 | | Rear camera 1 | 12 MP, f/2.2, 1.25 μm, PDAF |
21 | | Rear camera 2 | 5 MP, f/2.2, 1.12 μm, depth sensor |
22 | | Front camera | 5 MP, f/2.0 |
23 |
24 | ## Device picture
25 |
26 | 
27 |
--------------------------------------------------------------------------------
/bluetooth/bdroid_buildcfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 The CyanogenMod 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 _BDROID_BUILDCFG_H
18 | #define _BDROID_BUILDCFG_H
19 | #define BTM_DEF_LOCAL_NAME "Mi A2 Lite"
20 | // Disables read remote device feature
21 | #define MAX_ACL_CONNECTIONS 16
22 | #define MAX_L2CAP_CHANNELS 32
23 | #define BLE_VND_INCLUDED TRUE
24 | #define GATT_MAX_PHY_CHANNEL 10
25 |
26 | // Wide-band speech support
27 | #define BTIF_HF_WBS_PREFERRED TRUE
28 |
29 | // skips conn update at conn completion
30 | #define BT_CLEAN_TURN_ON_DISABLED TRUE
31 | #define BTM_SCO_ENHANCED_SYNC_ENABLED FALSE
32 |
33 | #define BTM_WBS_INCLUDED TRUE
34 | #define BTIF_HF_WBS_PREFERRED TRUE
35 |
36 | /* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */
37 | #define AVDT_NUM_SEPS 35
38 |
39 | #endif /* _BDROID_BUILDCFG_H */
40 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_audio_default.te:
--------------------------------------------------------------------------------
1 | dontaudit hal_audio_default sysfs:dir { open read };
2 | allow hal_audio_default property_socket:sock_file { rw_file_perms };
3 | allow hal_audio_default audio_prop:property_service set;
4 | allow hal_audio_default init:unix_stream_socket connectto;
5 | allow hal_audio_default init:binder { call };
6 | allow hal_audio_default audio_prop:file { getattr open read };
7 | allow hal_audio_default vendor_data_file:dir { create write add_name };
8 | allow hal_audio_default vendor_data_file:file { create rw_file_perms };
9 | #allow hal_audio_default vendor_data_file:file { append read }
10 | allow hal_audio_default sysfs:dir { open read };
11 | allow hal_audio_default sysfs:file { getattr open read };
12 | get_prop(hal_audio_default, dirac_prop)
13 | set_prop(hal_audio_default, dirac_prop)
14 | allow hal_audio_default hal_audio_default:process { execmem };
15 | allow hal_audio_default default_android_hwservice:hwservice_manager { find };
16 | allow hal_audio_default diag_device:chr_file { read write open };
17 | allow hal_audio_default diag_device:chr_file { ioctl };
18 |
19 | # Dolby
20 | allow hal_audio_default hal_dms_default:binder { transfer call };
21 | allow hal_audio_default hal_dms_hwservice:hwservice_manager find;
22 |
23 | # MotoDolby
24 | allow hal_audio_default vendor_dolby_loglevel_prop:file { read open getattr };
25 |
26 | allow hal_audio_default property_socket:sock_file { write };
27 | allow hal_audio_default default_prop:file { read open getattr };
28 |
--------------------------------------------------------------------------------
/libshims/jstring.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006 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 | #pragma once
18 |
19 | #include
20 | #include
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | #if __STDC_VERSION__ < 201112L && __cplusplus < 201103L
27 | typedef uint16_t char16_t;
28 | #endif
29 |
30 | extern char * strndup16to8 (const char16_t* s, size_t n);
31 | extern size_t strnlen16to8 (const char16_t* s, size_t n);
32 | extern char * strncpy16to8 (char *dest, const char16_t*s, size_t n);
33 |
34 | extern char16_t * strdup8to16 (const char* s, size_t *out_len);
35 | extern size_t strlen8to16 (const char* utf8Str);
36 | extern char16_t * strcpy8to16 (char16_t *dest, const char*s, size_t *out_len);
37 | extern char16_t * strcpylen8to16 (char16_t *dest, const char*s, int length,
38 | size_t *out_len);
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif
43 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telecomm/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
27 | true
28 |
29 |
30 | true
31 |
32 |
--------------------------------------------------------------------------------
/rootdir/init.recovery.qcom.usb.rc:
--------------------------------------------------------------------------------
1 | on init
2 | write /sys/class/backlight/panel0-backlight/brightness 200
3 |
4 | mkdir /config
5 | mount configfs none /config
6 | mkdir /config/usb_gadget/g1 0770 shell shell
7 | write /config/usb_gadget/g1/bcdUSB 0x0200
8 | write /config/usb_gadget/g1/idVendor 0x18d1
9 | write /config/usb_gadget/g1/idProduct 0xd001
10 | mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
11 | write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
12 | write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
13 | write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
14 | mkdir /config/usb_gadget/g1/functions/ffs.adb
15 | write /config/usb_gadget/g1/os_desc/use 1
16 | write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
17 | write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
18 | setprop sys.usb.configfs 1
19 |
20 | on property:ro.boot.usbcontroller=*
21 | setprop sys.usb.controller ${ro.boot.usbcontroller}
22 |
23 | on property:sys.usb.ffs.ready=1
24 | mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
25 | symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
26 | mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
27 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
28 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
29 | write /config/usb_gadget/g1/UDC ${sys.usb.controller}
30 |
--------------------------------------------------------------------------------
/light/service.cpp:
--------------------------------------------------------------------------------
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 | #define LOG_TAG "android.hardware.light@2.0-service.daisy"
18 |
19 | #include
20 |
21 | #include "Light.h"
22 |
23 | using android::hardware::configureRpcThreadpool;
24 | using android::hardware::joinRpcThreadpool;
25 |
26 | using android::hardware::light::V2_0::ILight;
27 | using android::hardware::light::V2_0::implementation::Light;
28 |
29 | using android::OK;
30 | using android::sp;
31 | using android::status_t;
32 |
33 | int main() {
34 | sp service = new Light();
35 |
36 | configureRpcThreadpool(1, true);
37 |
38 | status_t status = service->registerAsService();
39 | if (status != OK) {
40 | ALOGE("Cannot register Light HAL service.");
41 | return 1;
42 | }
43 |
44 | ALOGI("Light HAL service ready.");
45 |
46 | joinRpcThreadpool();
47 |
48 | ALOGI("Light HAL service failed to join thread pool.");
49 | return 1;
50 | }
51 |
--------------------------------------------------------------------------------
/XiaomiParts/src/com/xiaomi/parts/preferences/VibrationSeekBarPreference.java:
--------------------------------------------------------------------------------
1 | package com.xiaomi.parts.preferences;
2 |
3 | import android.content.Context;
4 | import android.os.VibrationEffect;
5 | import android.os.Vibrator;
6 | import android.util.AttributeSet;
7 | import android.widget.SeekBar;
8 |
9 | public class VibrationSeekBarPreference extends SecureSettingCustomSeekBarPreference {
10 |
11 | private final Vibrator mVibrator;
12 |
13 | public VibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
14 | super(context, attrs, defStyleAttr, defStyleRes);
15 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
16 | }
17 |
18 | public VibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) {
19 | super(context, attrs, defStyleAttr);
20 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
21 | }
22 |
23 | public VibrationSeekBarPreference(Context context, AttributeSet attrs) {
24 | super(context, attrs);
25 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
26 | }
27 |
28 | public VibrationSeekBarPreference(Context context) {
29 | super(context);
30 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
31 | }
32 |
33 | @Override
34 | public void onStopTrackingTouch(SeekBar seekBar) {
35 | notifyChanged();
36 | if (mVibrator.hasVibrator()) {
37 | mVibrator.vibrate(VibrationEffect.createOneShot(15, VibrationEffect.DEFAULT_AMPLITUDE));
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/permissions/telephony_product_privapp-permissions-qti.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 | /sys/class/power_supply/bms/charge_full_design
21 | /sys/class/power_supply/bms/charge_now_raw
22 | /sys/class/power_supply/bms/cycle_count
23 |
24 |
28 | true
29 |
30 |
31 | com.custom.ambient.display/com.custom.ambient.display.DozeSettings
32 |
33 |
34 |
--------------------------------------------------------------------------------
/keylayout/ft5435_ts.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2012, 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 |
27 | key 139 MENU VIRTUAL
28 | key 172 HOME VIRTUAL
29 | key 158 BACK VIRTUAL
30 | key 143 WAKEUP
31 |
--------------------------------------------------------------------------------
/sepolicy/vendor/mm-qcamerad.te:
--------------------------------------------------------------------------------
1 | allow mm-qcamerad camera_data_file:dir { add_name write search };
2 | allow mm-qcamerad camera_data_file:file { create getattr open write };
3 | allow mm-qcamerad vendor_persist_camera_prop:file { getattr open read };
4 | allow mm-qcamerad vendor_persist_camera_prop:property_service set;
5 | allow mm-qcamerad sysfs_kgsl:lnk_file read;
6 | type_transition mm-qcamerad camera_data_file:sock_file camera_socket "cam_socket1";
7 | type_transition mm-qcamerad camera_data_file:sock_file camera_socket "cam_socket2";
8 | allow mm-qcamerad camera_socket:dir w_dir_perms;
9 | allow mm-qcamerad camera_socket:sock_file { create unlink write };
10 | allow mm-qcamerad sysfs_graphics:file r_file_perms;
11 | allow mm-qcamerad camera_data_file:file create_file_perms;
12 | allow mm-qcamerad camera_data_file:dir w_dir_perms;
13 | allow mm-qcamerad sysfs_kgsl:file { getattr open read };
14 | allow mm-qcamerad fwk_sensor_hwservice:hwservice_manager find;
15 | allow mm-qcamerad sysfs:file { getattr open read };
16 | allow mm-qcamerad debugfs:dir { read open };
17 | allow mm-qcamerad diag_device:chr_file { ioctl open read write };
18 | allow mm-qcamerad camera_data_file:dir { add_name write };
19 | allow mm-qcamerad camera_data_file:dir { search };
20 | allow mm-qcamerad debugfs:file { read };
21 | allow mm-qcamerad debugfs:file { open };
22 | allow mm-qcamerad init:unix_stream_socket connectto;
23 | allow mm-qcamerad vendor_camera_data_file:file { create write open getattr };
24 | allow mm-qcamerad camera_prop:file { open read getattr };
25 | allow mm-qcamerad property_socket:sock_file { write };
26 | allow mm-qcamerad sysfs_kgsl:dir { search };
27 | allow mm-qcamerad vfat:dir { search };
28 | allow mm-qcamerad camera_prop:property_service { set };
29 |
--------------------------------------------------------------------------------
/keylayout/msm8953-snd-card-mtp_Button_Jack.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2014, 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 | key 226 HEADSETHOOK
29 | key 257 VOLUME_UP
30 | key 258 VOLUME_DOWN
31 |
--------------------------------------------------------------------------------
/keylayout/gpio-keys.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2014, 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 | key 115 VOLUME_UP
29 | key 114 VOLUME_DOWN
30 | key 102 HOME
31 | key 528 FOCUS
32 | key 766 CAMERA
33 |
--------------------------------------------------------------------------------
/keylayout/ist30xx_ts_input.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2014, 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 | key 158 BACK VIRTUAL
29 | key 139 APP_SWITCH VIRTUAL
30 | key 172 HOME VIRTUAL
31 | key 143 WAKEUP
32 |
--------------------------------------------------------------------------------
/XiaomiParts/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 |
--------------------------------------------------------------------------------
/keylayout/goodix-ts.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2014, 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 | key 158 BACK VIRTUAL
29 | key 139 APP_SWITCH VIRTUAL
30 | key 172 HOME VIRTUAL
31 | key 217 SEARCH VIRTUAL
32 | key 143 WAKEUP
33 |
--------------------------------------------------------------------------------
/XiaomiParts/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
11 |
12 |
13 |
14 |
21 |
22 |
26 |
27 |
30 |
31 |
34 |
35 |
37 |
38 |
--------------------------------------------------------------------------------
/rootdir/init.goodix.sh:
--------------------------------------------------------------------------------
1 | #! /vendor/bin/sh
2 |
3 | # Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
4 | #
5 | # Redistribution and use in source and binary forms, with or without
6 | # modification, are permitted provided that the following conditions are 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 copyright
10 | # notice, this list of conditions and the following disclaimer in the
11 | # documentation and/or other materials provided with the distribution.
12 | # * Neither the name of The Linux Foundation nor
13 | # the names of its contributors may be used to endorse or promote
14 | # products derived from this software without specific prior written
15 | # permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | #
29 |
30 | if [ ! -f /data/system/users/0/settings_fingerprint.xml ]; then
31 | rm -rf /mnt/vendor/persist/data/finger_*
32 | fi
33 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc454-mnc03/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
32 |
33 | true
34 |
35 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc454-mnc04/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
32 |
33 | true
34 |
35 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc455-mnc02/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
32 |
33 | true
34 |
35 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc455-mnc07/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
32 |
33 | true
34 |
35 |
--------------------------------------------------------------------------------
/sepolicy/vendor/genfs_contexts:
--------------------------------------------------------------------------------
1 | # Boot reason
2 | genfscon proc /sys/kernel/boot_reason u:object_r:proc_boot_reason:s0
3 |
4 | # Leds
5 | genfscon sysfs /devices/platform/soc/200f000.qcom,spmi/spmi-0/spmi0-00/200f000.qcom,spmi:qcom,pm8953@0:qcom,leds@a100 u:object_r:sysfs_leds:s0
6 | genfscon sysfs /devices/platform/soc/78b6000.i2c/i2c-2/2-0045/leds/ u:object_r:sysfs_leds:s0
7 |
8 | # Power
9 | genfscon sysfs /devices/soc/soc:qcom,bcl/power_supply u:object_r:sysfs_batteryinfo:s0
10 | genfscon sysfs /devices/soc/msm-bcl-21/power_supply u:object_r:sysfs_batteryinfo:s0
11 | genfscon sysfs /devices/soc/qpnp-typec-9/power_supply u:object_r:sysfs_batteryinfo:s0
12 | genfscon sysfs /devices/platform/soc/200f000.qcom,spmi/spmi-0/spmi0-02/200f000.qcom,spmi:qcom,pmi8950@2:vadc@3100 u:object_r:sysfs_battery_supply:s0
13 |
14 | # Rmt
15 | genfscon debugfs /rmt_storage u:object_r:debugfs_rmt:s0
16 |
17 | # Touchscreen
18 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0
19 |
20 | # Healthd
21 | #genfscon sysfs /devices/soc/soc:qcom,bcl/power_supply u:object_r:sysfs_batteryinfo:s0
22 | #genfscon sysfs /devices/soc/msm-bcl-20/power_supply u:object_r:sysfs_batteryinfo:s0
23 |
24 | # Earpiece gain
25 | genfscon sysfs /sys/kernel/sound_control/earpiece_gain u:object_r:sysfs_egain:s0
26 |
27 | # Headphone gain
28 | genfscon sysfs /sys/kernel/sound_control/headphone_gain u:object_r:sysfs_headgain:s0
29 |
30 | # Microphone gain
31 | genfscon sysfs /sys/kernel/sound_control/mic_gain u:object_r:sysfs_micgain:s0
32 |
33 | # Speaker gain
34 | genfscon sysfs /sys/kernel/sound_control/speaker_gain u:object_r:sysfs_sgain:s0
35 |
36 | # USB force fastcharge
37 | genfscon sysfs /sys/kernel/fast_charge/force_fast_charge u:object_r:sysfs_fcharge:s0
38 |
--------------------------------------------------------------------------------
/sepolicy/vendor/crash_dump.te:
--------------------------------------------------------------------------------
1 | allow crash_dump theme_prop:file { open };
2 | allow crash_dump theme_prop:file { getattr };
3 | allow crash_dump device_config_runtime_native_prop:file { open };
4 | allow crash_dump device_config_runtime_native_prop:file { getattr };
5 | allow crash_dump vendor_overlay_file:file { read };
6 | allow crash_dump vendor_overlay_file:file { open };
7 | allow crash_dump vendor_overlay_file:file { getattr };
8 | allow crash_dump resourcecache_data_file:file { read };
9 | allow crash_dump resourcecache_data_file:file { open };
10 | allow crash_dump resourcecache_data_file:file { getattr };
11 | allow crash_dump vendor_mpctl_prop:file { open };
12 | allow crash_dump vendor_mpctl_prop:file { getattr };
13 | allow crash_dump device_config_runtime_native_boot_prop:file { open };
14 | allow crash_dump device_config_runtime_native_boot_prop:file { getattr };
15 | allow crash_dump runtime_event_log_tags_file:file { getattr };
16 | allow crash_dump vendor_tee_listener_prop:file { open getattr };
17 | allow crash_dump hwservicemanager_prop:file { open getattr };
18 | allow crash_dump crash_dump:capability { sys_admin };
19 | allow crash_dump qcom_ims_prop:file { open };
20 | allow crash_dump qcom_ims_prop:file { getattr };
21 | allow crash_dump gpu_device:chr_file { open getattr };
22 | allow crash_dump vendor_audio_prop:file { open getattr };
23 | allow crash_dump privapp_data_file:file { open read getattr };
24 | #allow crash_dump wigig_core_prop:file { open read getattr };
25 | allow crash_dump wifi_prop:file { open read getattr };
26 | allow crash_dump vendor_system_prop:file { open read getattr };
27 | allow crash_dump media_variant_prop:file { open read getattr };
28 | #allow crash_dump wfd_service_prop:file { open read getattr };
29 | #allow crash_dump wfd_debug_prop:file { open read getattr };
30 | allow crash_dump virtual_ab_prop:file { open read getattr };
31 | allow crash_dump exported_camera_prop:file { open read getattr };
32 |
--------------------------------------------------------------------------------
/XiaomiParts/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 |
--------------------------------------------------------------------------------
/vintf/android.hardware.gnss@2.0-service-qti.xml:
--------------------------------------------------------------------------------
1 |
26 |
27 |
28 | android.hardware.gnss
29 | hwbinder
30 | @1.0::IGnss/gnss_vendor
31 | @1.1::IGnss/default
32 | @2.0::IGnss/default
33 |
34 |
35 |
--------------------------------------------------------------------------------
/sepolicy/vendor/untrusted_app_25.te:
--------------------------------------------------------------------------------
1 | allow untrusted_app_25 bluetooth_prop:file { open read getattr };
2 | allow untrusted_app_25 bootloader_boot_reason_prop:file { read open getattr };
3 | allow untrusted_app_25 boottime_prop:file { open read getattr };
4 | allow untrusted_app_25 ctl_bootanim_prop:file { read open getattr };
5 | allow untrusted_app_25 ctl_bugreport_prop:file { read open getattr };
6 | allow untrusted_app_25 cnd_vendor_prop:file { open read getattr };
7 | allow untrusted_app_25 postinstall_mnt_dir:dir { getattr };
8 | allow untrusted_app_25 net_dns_prop:file { read };
9 | allow untrusted_app_25 theme_prop:file { read open };
10 | allow untrusted_app_25 property_socket:sock_file { write };
11 | allow untrusted_app_25 init:unix_stream_socket { connectto };
12 | allow untrusted_app_25 default_prop:property_service { set };
13 | allow untrusted_app_25 proc_vmstat:file { open read getattr };
14 | allow untrusted_app_25 vendor_persist_camera_prop:file { open read getattr };
15 | allow untrusted_app_25 proc_qtaguid_stat:file { read };
16 | allow untrusted_app_25 radio_data_file:dir { getattr };
17 | allow untrusted_app_25 serialno_prop:file { read open getattr };
18 | allow untrusted_app_25 rootfs:dir { open read getattr };
19 | allow untrusted_app_25 adsprpc_prop:file { open read getattr };
20 | allow untrusted_app_25 apexd_prop:file { open read getattr };
21 | allow untrusted_app_25 vendor_system_prop:file { read open getattr };
22 | allow untrusted_app_25 anr_data_file:dir { open read getattr };
23 | allow untrusted_app_25 sysfs:file { open read getattr };
24 | allow untrusted_app_25 system_file:file { lock };
25 | allow untrusted_app_25 vendor_file:file { open read getattr };
26 | allow untrusted_app_25 adbd_prop:file { open read getattr };
27 | allow untrusted_app_25 apk_verity_prop:file { open read getattr };
28 | allow untrusted_app_25 unlabeled:file { open read getattr };
29 | allow untrusted_app_25 bg_boot_complete_prop:file { open read getattr };
30 | allow untrusted_app_25 bg_daemon_prop:file { open read getattr };
31 |
--------------------------------------------------------------------------------
/org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManager.java:
--------------------------------------------------------------------------------
1 | package org.ifaa.android.manager;
2 |
3 | import android.content.Context;
4 | import android.os.Build.VERSION;
5 | import android.os.SystemProperties;
6 |
7 | public abstract class IFAAManager {
8 | private static final int IFAA_VERSION_V2 = 2;
9 | private static final int IFAA_VERSION_V3 = 3;
10 | private static final int IFAA_VERSION_V4 = 4;
11 |
12 | static int sIfaaVer;
13 | static boolean sIsFod = SystemProperties.getBoolean("ro.hardware.fp.fod", false);
14 |
15 | /**
16 | * 返回手机系统上支持的校验方式,目前IFAF协议1.0版本指纹为0x01、虹膜为0x02
17 | */
18 | public abstract int getSupportBIOTypes(Context context);
19 |
20 | /**
21 | * 启动系统的指纹/虹膜管理应用界面,让用户进行指纹录入。指纹录入是在系统的指纹管理应用中实现的,
22 | * 本函数的作用只是将指纹管理应用运行起来,直接进行页面跳转,方便用户录入。
23 | * @param context
24 | * @param authType 生物特征识别类型,指纹为1,虹膜为2
25 | * @return 0,成功启动指纹管理应用;-1,启动指纹管理应用失败。
26 | */
27 | public abstract int startBIOManager(Context context, int authType);
28 |
29 | /**
30 | * 通过ifaateeclient的so文件实现REE到TA的通道
31 | * @param context
32 | * @param param 用于传输到IFAA TA的数据buffer
33 | * @return IFAA TA返回给REE数据buffer
34 | */
35 | public native byte[] processCmd(Context context, byte[] param);
36 |
37 | /**
38 | * 获取设备型号,同一款机型型号需要保持一致
39 | */
40 | public abstract String getDeviceModel();
41 |
42 | /**
43 | * 获取IFAAManager接口定义版本,目前为1
44 | */
45 | public abstract int getVersion();
46 |
47 | /**
48 | * load so to communicate from REE to TEE
49 | */
50 | static {
51 | sIfaaVer = 1;
52 |
53 | if (VERSION.SDK_INT >= 28) {
54 | sIfaaVer = IFAA_VERSION_V4;
55 | } else if (sIsFod) {
56 | sIfaaVer = IFAA_VERSION_V3;
57 | } else if (VERSION.SDK_INT >= 24) {
58 | sIfaaVer = IFAA_VERSION_V2;
59 | } else {
60 | System.loadLibrary("teeclientjni"); //teeclientjni for TA test binary //ifaateeclient
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017 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 | set -e
20 |
21 | # Required!
22 | export DEVICE=daisy
23 | export DEVICE_COMMON=msm8953-common
24 | export VENDOR=xiaomi
25 |
26 | INITIAL_COPYRIGHT_YEAR=2017
27 |
28 | # Load extract_utils and do some sanity checks
29 | MY_DIR="${BASH_SOURCE%/*}"
30 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
31 |
32 | LINEAGE_ROOT="$MY_DIR"/../../..
33 |
34 | HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
35 | if [ ! -f "$HELPER" ]; then
36 | echo "Unable to find helper script at $HELPER"
37 | exit 1
38 | fi
39 | . "$HELPER"
40 |
41 | # Initialize the helper
42 | setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true
43 |
44 | # Copyright headers and guards
45 | write_headers "mido tissot"
46 |
47 | # The standard common blobs
48 | write_makefiles "$MY_DIR"/proprietary-files-qc.txt true
49 |
50 | # We are done!
51 | write_footers
52 |
53 | if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then
54 | # Reinitialize the helper for device
55 | INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
56 | setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false
57 |
58 | # Copyright headers and guards
59 | write_headers
60 |
61 | # The standard device blobs
62 | write_makefiles "$MY_DIR"/../$DEVICE/proprietary-files.txt true
63 |
64 | # We are done!
65 | write_footers
66 | fi
67 |
--------------------------------------------------------------------------------
/XiaomiParts/res/layout/switch_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
23 |
24 |
36 |
37 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/XiaomiParts/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 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
32 |
35 | 6
36 |
37 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
32 |
35 | 3
36 |
37 |
--------------------------------------------------------------------------------