├── remove_packages ├── RemovePackages └── Android.bp ├── README.md ├── sepolicy ├── vendor │ ├── vdc.te │ ├── adbd.te │ ├── tee.te │ ├── usbd.te │ ├── zygote.te │ ├── qti.te │ ├── adpl.te │ ├── hal_usb_qti.te │ ├── irsc_util.te │ ├── mediacodec.te │ ├── rfs_access.te │ ├── cdsprpcd.te │ ├── gpuservice.te │ ├── hal_imsrtp.te │ ├── isolated_app.te │ ├── location.te │ ├── proc_touchpanel.te │ ├── vendor_modprobe.te │ ├── ims.te │ ├── netutils_wrapper.te │ ├── hal_rcsservice.te │ ├── vold_prepare_subdirs.te │ ├── hal_neuralnetworks_default.te │ ├── cnd.te │ ├── hal_light_default.te │ ├── hal_secure_element_default.te │ ├── kernel.te │ ├── turbo_adapter.te │ ├── app.te │ ├── hal_gnss_qti.te │ ├── hal_nfc_default.te │ ├── hal_wifi_supplicant_default.te │ ├── vendor_vppservice.te │ ├── lkmd.te │ ├── vendor_msm_irqbalanced.te │ ├── vold.te │ ├── seapp_contexts │ ├── hal_wifi_hostapd_default.te │ ├── mediaprovider.te │ ├── device.te │ ├── oppo_display_default.te │ ├── ueventd.te │ ├── hal_capabilityconfigstore_qti_default.te │ ├── hal_bluetooth_qti.te │ ├── vendor_pd_mapper.te │ ├── surfaceflinger.te │ ├── sensors.te │ ├── thermal-engine.te │ ├── vendor_dpmd.te │ ├── vendor_ssr_setup.te │ ├── hal_wifi_default.te │ ├── hal_graphics_composer_default.te │ ├── vendor_dataservice_app.te │ ├── netmgrd.te │ ├── gmscore_app.te │ ├── fsck.te │ ├── qtidataservices_app.te │ ├── hal_power_stats_default.te │ ├── adsprpcd.te │ ├── property.te │ ├── hwservice.te │ ├── priv_app.te │ ├── wcnss_service.te │ ├── hal_thermal_default.te │ ├── radio.te │ ├── rmt_storage.te │ ├── platform_app.te │ ├── hal_power_default.te │ ├── rild.te │ ├── hal_audio_default.te │ ├── system_server.te │ ├── hal_sensors_default.te │ ├── qti_init_shell.te │ ├── hal_camera_default.te │ ├── vendor_init.te │ ├── file.te │ ├── init.te │ ├── hwservice_contexts │ ├── system_app.te │ ├── hal_fingerprint_default.te │ └── genfs_contexts └── private │ ├── art_boot.te │ ├── gmscore_app.te │ ├── radio.te │ ├── linkerconfig.te │ ├── odrefresh.te │ ├── misctrl.te │ ├── system_app.te │ ├── kcmdlinectrl.te │ ├── vendor_boringssl_self_test.te │ ├── permissioncontroller_app.te │ ├── platform_app.te │ └── dontaudit.te ├── setup-makefiles.py ├── odm.prop ├── RealmeParts ├── proguard.flags ├── res │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_background.png │ │ ├── ic_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_background.png │ │ ├── ic_foreground.png │ │ └── ic_launcher_round.png │ ├── raw │ │ └── clear_speaker_sound.mp3 │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_background.png │ │ ├── ic_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_background.png │ │ ├── ic_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ │ ├── ic_background.png │ │ ├── ic_foreground.png │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ ├── drawable-xxhdpi │ │ └── calibration_png.png │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ ├── values │ │ ├── attrs.xml │ │ ├── proper_seekbar_attrs.xml │ │ ├── proper_seekbar_strings.xml │ │ └── colors.xml │ ├── menu │ │ └── kcal_menu.xml │ ├── values-it │ │ └── proper_seekbar_strings.xml │ ├── drawable │ │ ├── ic_restore.xml │ │ ├── ic_settings_reset.xml │ │ ├── ic_otg_tile.xml │ │ ├── switchbar_background.xml │ │ ├── ic_proper_seekbar_minus.xml │ │ ├── ic_proper_seekbar_plus.xml │ │ ├── ic_game_tile.xml │ │ ├── ic_realmeparts.xml │ │ └── ic_proper_seekbar_reset.xml │ ├── xml │ │ ├── clear_speaker_settings.xml │ │ ├── soundcontrol_settings.xml │ │ └── vibration_setting.xml │ ├── color-night │ │ ├── switchbar_switch_thumb_tint.xml │ │ └── switchbar_switch_track_tint.xml │ ├── color │ │ ├── switchbar_switch_thumb_tint.xml │ │ ├── switchbar_switch_track_tint.xml │ │ └── switch_bar_bg.xml │ ├── mipmap-anydpi │ │ └── ic_launcher.xml │ ├── layout │ │ ├── display_cal.xml │ │ └── switch_bar.xml │ └── drawable-v24 │ │ └── ic_launcher_foreground.xml ├── Android.bp └── src │ └── org │ └── device │ └── RealmeParts │ ├── kcal │ ├── KcalService.java │ └── utils │ │ └── NonScrollListView.java │ ├── vibrator │ ├── VibratorSettingsActivity.java │ └── utils │ │ ├── SecureSettingVibrationSeekBarPreference.java │ │ ├── SecureSettingsStore.java │ │ └── VibrateFileUtils.java │ ├── audio │ ├── utils │ │ ├── SecureSettingCustomSeekBarPreference.java │ │ └── SecureSettingsStore.java │ ├── SoundControlSettingsActivity.java │ ├── SoundControlSettings.java │ └── SoundControlFileUtils.java │ ├── speaker │ └── ClearSpeakerActivity.java │ ├── Touch │ ├── ScreenOffGestureSettings.java │ └── util │ │ └── ActionConstants.java │ ├── ModeSwitch │ ├── OTGModeSwitch.java │ └── GameModeSwitch.java │ ├── KernelControl.java │ ├── RealmePartsActivity.java │ ├── OtgToggleService.java │ └── GameModeTileService.java ├── gps ├── gps.conf ├── lowi.conf └── flp.conf ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── doze ├── proguard.flags ├── Android.bp ├── src │ └── org │ │ └── lineageos │ │ └── settings │ │ ├── BootCompletedReceiver.java │ │ └── doze │ │ └── DozeSettingsActivity.java └── AndroidManifest.xml ├── interfaces └── vendor │ ├── Android.bp │ ├── update-makefiles.sh │ └── hardware │ └── biometrics │ └── fingerprint │ └── 2.1 │ ├── Android.bp │ ├── IBiometricsFingerprintClientCallback.hal │ ├── IBiometricsFingerprint.hal │ └── types.hal ├── rro_overlays ├── WifiOverlay │ ├── Android.bp │ └── AndroidManifest.xml └── TetheringOverlay │ ├── AndroidManifest.xml │ └── Android.bp ├── product.prop ├── seccomp ├── mediaswcodec.policy ├── mediaextractor.policy └── mediacodec-seccomp.policy ├── overlay ├── packages │ ├── apps │ │ ├── FaceUnlockService │ │ │ └── app │ │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ ├── DocumentsUI │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ ├── Settings │ │ │ └── res │ │ │ │ └── values │ │ │ │ ├── derp_strings.xml │ │ │ │ ├── arrays.xml │ │ │ │ └── config.xml │ │ └── SimpleDeviceConfig │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── services │ │ ├── DeviceAsWebcam │ │ ├── interface │ │ │ └── res │ │ │ │ └── raw │ │ │ │ └── ignored_v4l2_nodes.json │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── Telephony │ │ └── res │ │ └── values │ │ └── config.xml └── frameworks │ └── base │ ├── packages │ ├── SystemUI │ │ └── res │ │ │ ├── drawable │ │ │ ├── rounded.xml │ │ │ ├── rounded_corner_bottom.xml │ │ │ └── rounded_corner_top.xml │ │ │ └── values │ │ │ ├── dimens.xml │ │ │ └── integers.xml │ └── SettingsProvider │ │ └── res │ │ └── values │ │ └── defaults.xml │ └── core │ └── res │ └── res │ └── values │ └── dimens.xml ├── system_ext.prop ├── configs ├── public.libraries.txt ├── component-overrides.xml ├── permissions │ └── privapp_whitelist_org.device.Realmeparts.xml ├── media │ └── system_properties.xml └── qti_whitelist_system_ext.xml ├── AndroidProducts.mk ├── fingerprint ├── android.hardware.biometrics.fingerprint@2.1-service.RMX1971.xml ├── android.hardware.biometrics.fingerprint@2.1-service.RMX1971.rc ├── Android.bp └── service.cpp ├── sensors ├── android.hardware.sensors@2.0-service-multihal.rc ├── android.hardware.sensors@2.0-multihal.xml ├── service.cpp └── Android.bp ├── overlay-lineage ├── lineage-sdk │ └── packages │ │ └── LineageSettingsProvider │ │ └── res │ │ └── values │ │ └── defaults.xml └── packages │ └── apps │ ├── Dialer │ └── java │ │ └── com │ │ └── android │ │ └── dialer │ │ └── callrecord │ │ └── res │ │ └── values │ │ └── config.xml │ └── Aperture │ └── app │ └── src │ └── main │ └── res │ └── values │ └── config.xml ├── Android.bp ├── init ├── Android.bp └── init_RMX1971.cpp ├── lineage_RMX1971.mk ├── keylayout └── gpio-keys.kl ├── rootdir ├── etc │ ├── init.oppo.rc │ ├── init.recovery.qcom.rc │ └── init.RealmeParts.rc ├── bin │ ├── init.qcom.early_boot.sh │ ├── init.qti.chg_policy.sh │ └── init.qcom.sh └── Android.bp ├── releasetools.py ├── reorder-libs.py ├── update-sha1sums.py └── audio └── usbv2_audio_policy_configuration.xml /remove_packages/RemovePackages: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Device tree for Realme XT 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vdc.te: -------------------------------------------------------------------------------- 1 | allow vdc self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/adbd.te: -------------------------------------------------------------------------------- 1 | allow adbd self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | allow tee persist_file:lnk_file read; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/usbd.te: -------------------------------------------------------------------------------- 1 | allow usbd self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/zygote.te: -------------------------------------------------------------------------------- 1 | allow zygote zygote:capability kill; 2 | -------------------------------------------------------------------------------- /setup-makefiles.py: -------------------------------------------------------------------------------- 1 | #!./extract-files.py --regenerate_makefiles 2 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # QC framework value-adds 2 | ro.vendor.qti.va_odm.support=1 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/qti.te: -------------------------------------------------------------------------------- 1 | allow qti diag_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/private/art_boot.te: -------------------------------------------------------------------------------- 1 | allow art_boot self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/private/gmscore_app.te: -------------------------------------------------------------------------------- 1 | get_prop(gmscore_app, system_adbd_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/private/radio.te: -------------------------------------------------------------------------------- 1 | allow radio vendor_dpmd_socket:sock_file write; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/adpl.te: -------------------------------------------------------------------------------- 1 | allow adpl diag_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_usb_qti.te: -------------------------------------------------------------------------------- 1 | allow hal_usb_qti sysfs_udc:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/irsc_util.te: -------------------------------------------------------------------------------- 1 | allow irsc_util self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/mediacodec.te: -------------------------------------------------------------------------------- 1 | get_prop(mediacodec, vendor_mpctl_prop); 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/rfs_access.te: -------------------------------------------------------------------------------- 1 | allow rfs_access self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/private/linkerconfig.te: -------------------------------------------------------------------------------- 1 | allow linkerconfig self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/cdsprpcd.te: -------------------------------------------------------------------------------- 1 | allow cdsprpcd xdsp_device:chr_file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/gpuservice.te: -------------------------------------------------------------------------------- 1 | allow gpuservice graphics_config_prop:file read; 2 | -------------------------------------------------------------------------------- /RealmeParts/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.device.RealmeParts.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/private/odrefresh.te: -------------------------------------------------------------------------------- 1 | allow odrefresh self:capability { kill sys_admin }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_imsrtp.te: -------------------------------------------------------------------------------- 1 | allow hal_imsrtp diag_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/isolated_app.te: -------------------------------------------------------------------------------- 1 | allow isolated_app_all app_data_file:file setattr; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/location.te: -------------------------------------------------------------------------------- 1 | allow location fwk_sensor_service:service_manager find; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/proc_touchpanel.te: -------------------------------------------------------------------------------- 1 | allow proc_touchpanel proc:filesystem associate; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_modprobe.te: -------------------------------------------------------------------------------- 1 | allow vendor_modprobe self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /gps/gps.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/gps/gps.conf -------------------------------------------------------------------------------- /sepolicy/vendor/ims.te: -------------------------------------------------------------------------------- 1 | allow ims diag_device:chr_file { read write open getattr ioctl }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/netutils_wrapper.te: -------------------------------------------------------------------------------- 1 | dontaudit netutils_wrapper self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/private/misctrl.te: -------------------------------------------------------------------------------- 1 | dontaudit misctrl sysfs_dt_firmware_android:file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_rcsservice.te: -------------------------------------------------------------------------------- 1 | allow hal_rcsservice diag_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vold_prepare_subdirs.te: -------------------------------------------------------------------------------- 1 | allow vold_prepare_subdirs self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_app.te: -------------------------------------------------------------------------------- 1 | allow system_app vendor_wfd_service_prop:property_service {set}; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_neuralnetworks_default.te: -------------------------------------------------------------------------------- 1 | get_prop(hal_neuralnetworks_default, oppo_debug_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/private/kcmdlinectrl.te: -------------------------------------------------------------------------------- 1 | dontaudit kcmdlinectrl sysfs_dt_firmware_android:file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/cnd.te: -------------------------------------------------------------------------------- 1 | allow cnd diag_device:chr_file rw_file_perms; 2 | get_prop(cnd, wifi_hal_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_light_default.te: -------------------------------------------------------------------------------- 1 | allow hal_light_default sysfs:file { getattr open read write }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_secure_element_default.te: -------------------------------------------------------------------------------- 1 | add_hwservice(hal_secure_element_default, nfc_hwservice); 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/kernel.te: -------------------------------------------------------------------------------- 1 | allow kernel self:socket create; 2 | allow kernel kernel:capability { kill }; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/turbo_adapter.te: -------------------------------------------------------------------------------- 1 | allow turbo_adapter hal_turbo_adapter_hwservice:hwservice_manager find; 2 | -------------------------------------------------------------------------------- /sepolicy/private/vendor_boringssl_self_test.te: -------------------------------------------------------------------------------- 1 | allow vendor_boringssl_self_test self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/app.te: -------------------------------------------------------------------------------- 1 | get_prop(appdomain, vendor_camera_prop) 2 | get_prop(appdomain, persist_camera_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_gnss_qti.te: -------------------------------------------------------------------------------- 1 | allow hal_gnss_qti vendor_pd_locater_dbg_prop:file { read open getattr }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | dontaudit hal_nfc_default nfc_hwservice:hwservice_manager { find add }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_wifi_supplicant_default.te: -------------------------------------------------------------------------------- 1 | allow hal_wifi_supplicant_default self:capability sys_admin; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_vppservice.te: -------------------------------------------------------------------------------- 1 | allow vendor_vppservice hal_vpp_hwservice:hwservice_manager { add }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/lkmd.te: -------------------------------------------------------------------------------- 1 | allow lmkd self:capability2 block_suspend; 2 | allow lmkd self:capability { sys_admin }; 3 | -------------------------------------------------------------------------------- /sepolicy/private/permissioncontroller_app.te: -------------------------------------------------------------------------------- 1 | allow permissioncontroller_app tethering_service:service_manager find; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_msm_irqbalanced.te: -------------------------------------------------------------------------------- 1 | allow vendor_msm_irqbalanced vendor_msm_irqbalanced:capability { sys_admin }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vold.te: -------------------------------------------------------------------------------- 1 | allow vold mnt_vendor_file:dir { open read ioctl }; 2 | allow vold sysfs_mmc_host:file w_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=radio seinfo=platform name=.qtidataservices domain=qtidataservices_app type=radio_data_file 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/hal_wifi_hostapd_default.te: -------------------------------------------------------------------------------- 1 | allow hal_wifi_hostapd_default wifi_vendor_data_file:dir { rw_dir_perms remove_name }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/mediaprovider.te: -------------------------------------------------------------------------------- 1 | allow mediaprovider sdcardfs:lnk_file getattr; 2 | allow mediaprovider mnt_media_rw_file:dir getattr; 3 | -------------------------------------------------------------------------------- /doze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class ** extends androidx.preference.PreferenceFragment 2 | -keep class org.lineageos.settings.doze.* { 3 | *; 4 | } 5 | -------------------------------------------------------------------------------- /interfaces/vendor/Android.bp: -------------------------------------------------------------------------------- 1 | hidl_package_root { 2 | name: "vendor.oplus", 3 | path: "device/realme/RMX1971/interfaces/vendor", 4 | } 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | # Goodix device 2 | type goodix_device, dev_type; 3 | 4 | # Mdmreason device 5 | type mdmreason_device, dev_type; 6 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /RealmeParts/res/raw/clear_speaker_sound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/raw/clear_speaker_sound.mp3 -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiOverlay", 3 | theme: "WifiOverlay", 4 | vendor: true 5 | } 6 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-hdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-hdpi/ic_background.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-hdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-hdpi/ic_foreground.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-mdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-mdpi/ic_background.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-mdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-mdpi/ic_foreground.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sepolicy/vendor/oppo_display_default.te: -------------------------------------------------------------------------------- 1 | type oppo_display_default, domain; 2 | type oppo_display_default_exec, exec_type, file_type, vendor_file_type; 3 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xhdpi/ic_background.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xhdpi/ic_foreground.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxhdpi/ic_background.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxhdpi/ic_foreground.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxxhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxxhdpi/ic_background.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxxhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxxhdpi/ic_foreground.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sepolicy/vendor/ueventd.te: -------------------------------------------------------------------------------- 1 | allow ueventd debugfs:dir read; 2 | allow ueventd self:capability sys_admin; 3 | allow ueventd metadata_file:dir { read search }; 4 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /product.prop: -------------------------------------------------------------------------------- 1 | # IMS 2 | ro.telephony.block_binder_thread_on_incoming_calls=false 3 | 4 | # Seamless transfer 5 | sys.fflag.override.settings_seamless_transfer=true 6 | -------------------------------------------------------------------------------- /seccomp/mediaswcodec.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of frameworks/av/services/mediacodec/seccomp_policy/mediaswcodec-arm.policy 3 | sysinfo: 1 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_capabilityconfigstore_qti_default.te: -------------------------------------------------------------------------------- 1 | allow hal_capabilityconfigstore_qti_default vendor_cap_configstore_dbg_prop:file { read open getattr }; 2 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable-xxhdpi/calibration_png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/drawable-xxhdpi/calibration_png.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaderbava/device_realme_RMX1971/HEAD/RealmeParts/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bluetooth_qti.te: -------------------------------------------------------------------------------- 1 | allow hal_bluetooth_qti diag_device:chr_file rw_file_perms; 2 | allow hal_bluetooth_qti ramdump_vendor_data_file:dir rw_dir_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_pd_mapper.te: -------------------------------------------------------------------------------- 1 | # Wlan 2 | allow vendor_pd_mapper property_socket:sock_file { write }; 3 | allow vendor_pd_mapper init:unix_stream_socket { connectto }; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/surfaceflinger.te: -------------------------------------------------------------------------------- 1 | allow surfaceflinger hal_graphics_composer_default:dir search; 2 | allow surfaceflinger hal_graphics_composer_default:file { read open getattr }; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/sensors.te: -------------------------------------------------------------------------------- 1 | get_prop(sensors, sensors_prop) 2 | allow sensors diag_device:chr_file rw_file_perms; 3 | allow sensors sensors_persist_file:fifo_file { read open getattr }; 4 | -------------------------------------------------------------------------------- /seccomp/mediaextractor.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls. 2 | # extension of services/mediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy 3 | readlinkat: 1 4 | pread64: 1 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow thermal-engine sysfs:dir { open read }; 2 | allow thermal-engine sysfs_devfreq:dir { search read }; 3 | allow thermal-engine self:capability sys_admin; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_dpmd.te: -------------------------------------------------------------------------------- 1 | allow vendor_dpmd diag_device:chr_file rw_file_perms; 2 | allow vendor_dpmd self:capability sys_admin; 3 | allow vendor_dpmd hal_diag_hwservice:hwservice_manager find; 4 | -------------------------------------------------------------------------------- /overlay/packages/apps/FaceUnlockService/app/src/main/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_ssr_setup.te: -------------------------------------------------------------------------------- 1 | allow vendor_ssr_setup sysfs_restart:file { write open }; 2 | allow vendor_ssr_setup sysfs:file { write open }; 3 | allow vendor_ssr_setup self:capability sys_admin; 4 | -------------------------------------------------------------------------------- /overlay/packages/services/DeviceAsWebcam/interface/res/raw/ignored_v4l2_nodes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "/dev/video0", 3 | "/dev/video1", 4 | "/dev/video2", 5 | "/dev/video32", 6 | "/dev/video33" 7 | ] 8 | -------------------------------------------------------------------------------- /interfaces/vendor/update-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh 4 | 5 | do_makefiles_update \ 6 | "vendor.oplus:device/realme/RMX1971/interfaces/vendor" 7 | -------------------------------------------------------------------------------- /sepolicy/private/platform_app.te: -------------------------------------------------------------------------------- 1 | r_dir_file(platform_app, sysfs_zram) 2 | allow platform_app config_gz:file r_file_perms; 3 | 4 | # allow systemui to set boot animation colors 5 | set_prop(platform_app, bootanim_system_prop) 6 | -------------------------------------------------------------------------------- /system_ext.prop: -------------------------------------------------------------------------------- 1 | # DPM 2 | persist.vendor.dpm.feature=11 3 | persist.vendor.dpm.loglevel=0 4 | persist.vendor.dpm.nsrm.bkg.evt=3955 5 | 6 | # Telephony 7 | ro.telephony.sim_slots.count=2 8 | telephony.active_modems.max_count=2 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_wifi_default.te: -------------------------------------------------------------------------------- 1 | set_prop(hal_wifi_default, vendor_wifi_prop) 2 | allow hal_wifi_default vendor_tombstone_data_file:dir { open search read }; 3 | allow hal_wifi_default persist_vendor_debug_wifi_prop:file { open read getattr }; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_graphics_composer_default.te: -------------------------------------------------------------------------------- 1 | allow hal_graphics_composer_default diag_device:chr_file rw_file_perms; 2 | allow hal_graphics_composer_default bootanim_system_prop:file read; 3 | get_prop(hal_graphics_composer_default, bootanim_system_prop) 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_dataservice_app.te: -------------------------------------------------------------------------------- 1 | allow vendor_dataservice_app user_profile_root_file:dir search; 2 | allow vendor_dataservice_app system_data_file:dir search; 3 | allow vendor_dataservice_app vendor_hal_imsfactory_hwservice:hwservice_manager find; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/netmgrd.te: -------------------------------------------------------------------------------- 1 | allow netmgrd diag_device:chr_file rw_file_perms; 2 | allow netmgrd self:capability sys_admin; 3 | allow netmgrd property_socket:sock_file write; 4 | allow netmgrd init:unix_stream_socket connectto; 5 | set_prop(netmgrd, oppo_debug_prop) 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/gmscore_app.te: -------------------------------------------------------------------------------- 1 | allow gmscore_app vendor_default_prop:file { getattr map }; 2 | binder_call(gmscore_app, hal_memtrack_default); 3 | dontaudit gmscore_app hal_memtrack_hwservice:hwservice_manager find; 4 | dontaudit gmscore_app hal_memtrack_hwservice:binder call; 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/fsck.te: -------------------------------------------------------------------------------- 1 | dontaudit fsck self:capability { dac_override dac_read_search }; 2 | allow fsck tmpfs:blk_file getattr; 3 | allow fsck modem_efs_partition_device:blk_file { ioctl open read write }; 4 | allow fsck self:capability { sys_admin }; 5 | allow fsck sysfs:file getattr; 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/qtidataservices_app.te: -------------------------------------------------------------------------------- 1 | allow qtidataservices_app self:socket create_socket_perms; 2 | allowxperm qtidataservices_app self:socket ioctl msm_sock_ipc_ioctls; 3 | 4 | allow qtidataservices_app system_data_file:dir search; 5 | allow qtidataservices_app user_profile_root_file:dir search; 6 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libadsprpc.so 2 | libcdsprpc.so 3 | libsdsprpc.so 4 | libfastcvopt.so 5 | liblistensoundmodel2.so 6 | libOpenCL.so 7 | libOppoAlgoClient.so 8 | vendor.oppo.hardware.camera.oppoAlgoProcessService@1.0.so 9 | libOppoAPSMemMgr.so 10 | libstdc++.so 11 | libmidasserviceintf.so 12 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | wowlan_triggers=magic_pkt 5 | hs20=1 6 | auto_interworking=0 7 | bss_max_count=512 8 | config_methods=virtual_display virtual_push_button keypad 9 | driver_param="use_p2p_group_interface=1 no_rrm=1" 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_stats_default.te: -------------------------------------------------------------------------------- 1 | allow hal_power_stats_default sysfs_iio:dir { open read getattr search }; 2 | allow hal_power_stats_default sysfs_iio:file { open read getattr write }; 3 | allow hal_power_stats_default sysfs_iio:lnk_file { open read getattr write }; 4 | get_prop(hal_power_stats_default, wifi_hal_prop) 5 | -------------------------------------------------------------------------------- /AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2025 The LineageOS Project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | PRODUCT_MAKEFILES := \ 8 | $(LOCAL_DIR)/lineage_RMX1971.mk 9 | 10 | COMMON_LUNCH_CHOICES := \ 11 | lineage_RMX1971-user \ 12 | lineage_RMX1971-userdebug \ 13 | lineage_RMX1971-eng 14 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /fingerprint/android.hardware.biometrics.fingerprint@2.1-service.RMX1971.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.biometrics.fingerprint 4 | hwbinder 5 | @2.1::IBiometricsFingerprint/default 6 | 7 | 8 | -------------------------------------------------------------------------------- /RealmeParts/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /sensors/android.hardware.sensors@2.0-service-multihal.rc: -------------------------------------------------------------------------------- 1 | service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal 2 | class hal 3 | user system 4 | group system wakelock context_hub input 5 | writepid /dev/cpuset/system-background/tasks 6 | capabilities BLOCK_SUSPEND 7 | rlimit rtprio 10 10 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/adsprpcd.te: -------------------------------------------------------------------------------- 1 | allow adsprpcd sensors_persist_file:file create_file_perms; 2 | 3 | r_dir_file(adsprpcd, proc_oppoversion); 4 | 5 | allow adsprpcd persist_file:lnk_file read; 6 | allow adsprpcd sysfs_oppo_display:dir search; 7 | allow adsprpcd sysfs_oppo_display:file { getattr open read }; 8 | allow adsprpcd sysfs:file { getattr open read }; 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | # Wifi 2 | type vendor_wifi_prop, property_type; 3 | 4 | # Oppo props 5 | type oppo_debug_prop, property_type; 6 | type oppo_fingerprint_prop, property_type; 7 | type oppo_wlan_prop, property_type; 8 | 9 | # Camera 10 | type vendor_camera_prop, property_type; 11 | 12 | # Thermal 13 | type vendor_thermal_prop, property_type; 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type nfc_hwservice, hwservice_manager_type; 2 | type dcs_hwservice, hwservice_manager_type; 3 | type opporadio_hwservice, hwservice_manager_type; 4 | type hal_diag_hwservice, hwservice_manager_type; 5 | type hal_turbo_adapter_hwservice, hwservice_manager_type; 6 | type vendor_hal_orms_hwservice, hwservice_manager_type, protected_hwservice; 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/priv_app.te: -------------------------------------------------------------------------------- 1 | get_prop(priv_app, oppo_debug_prop); 2 | get_prop(priv_app, vendor_camera_prop); 3 | get_prop(priv_app, vendor_mpctl_prop); 4 | get_prop(priv_app, persist_camera_prop); 5 | 6 | dontaudit priv_app bt_firmware_file:filesystem getattr; 7 | dontaudit priv_app firmware_file:filesystem getattr; 8 | dontaudit priv_app adsprpcd_file:filesystem getattr; 9 | -------------------------------------------------------------------------------- /sepolicy/private/dontaudit.te: -------------------------------------------------------------------------------- 1 | # b/148033913 2 | dontaudit fsck self:capability kill; 3 | 4 | # b/151195350 5 | dontaudit linkerconfig self:capability kill; 6 | 7 | # b/152468658 8 | dontaudit vdc self:capability kill; 9 | 10 | # Apps are no longer allowed open access to /dev/ashmem, unless they 11 | # target API level < Q. 12 | dontaudit untrusted_app ashmem_device:chr_file open; 13 | -------------------------------------------------------------------------------- /RealmeParts/res/menu/kcal_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /sensors/android.hardware.sensors@2.0-multihal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.sensors 4 | hwbinder 5 | 2.0 6 | 7 | ISensors 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/wcnss_service.te: -------------------------------------------------------------------------------- 1 | set_prop(wcnss_service, oppo_wlan_prop); 2 | set_prop(wcnss_service, oppo_debug_prop); 3 | allow wcnss_service mnt_vendor_file:file read; 4 | allow wcnss_service mnt_vendor_file:file { open getattr }; 5 | allow wcnss_service vendor_shell_exec:file rx_file_perms; 6 | allow wcnss_service vendor_toolbox_exec:file rx_file_perms; 7 | allow wcnss_service kmsg_device:chr_file { read open write }; 8 | -------------------------------------------------------------------------------- /RealmeParts/res/values/proper_seekbar_attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | true 10 | 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_thermal_default.te: -------------------------------------------------------------------------------- 1 | allow hal_thermal_default sysfs_thermal:dir r_dir_perms; 2 | allow hal_thermal_default sysfs_thermal:file rw_file_perms; 3 | allow hal_thermal_default proc_stat:file r_file_perms; 4 | 5 | allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; 6 | 7 | # read thermal config 8 | get_prop(hal_thermal_default, vendor_thermal_prop) 9 | allow hal_thermal_default self:capability sys_admin; 10 | -------------------------------------------------------------------------------- /seccomp/mediacodec-seccomp.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | ARM_cacheflush: 1 12 | inotify_init1: 1 13 | inotify_add_watch: 1 14 | inotify_rm_watch: 1 15 | uname: 1 16 | ueventd: 1 17 | timer_create: 1 18 | timer_settime: 1 19 | rt_sigtimedwait: 1 20 | -------------------------------------------------------------------------------- /sepolicy/vendor/radio.te: -------------------------------------------------------------------------------- 1 | allow radio { hal_datafactory_hwservice hal_iwlan_hwservice hal_imsrcsd_hwservice }:hwservice_manager find; 2 | allow radio { cameraserver_service mediaextractor_service mediaserver_service mediametrics_service drmserver_service audioserver_service }:service_manager find; 3 | 4 | binder_call(radio, cnd) 5 | binder_call(radio, hal_rcsservice) 6 | allow radio hal_cacert_hwservice:hwservice_manager find; 7 | allow radio qcom_ims_prop:file { read open getattr }; 8 | -------------------------------------------------------------------------------- /fingerprint/android.hardware.biometrics.fingerprint@2.1-service.RMX1971.rc: -------------------------------------------------------------------------------- 1 | service vendor.fps_hal.RMX1971 /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.RMX1971 2 | # "class hal" causes a race condition on some devices due to files created 3 | # in /data. As a workaround, postpone startup until later in boot once 4 | # /data is mounted. 5 | class late_start 6 | user system 7 | group system input uhid 8 | writepid /dev/cpuset/system-background/tasks 9 | -------------------------------------------------------------------------------- /interfaces/vendor/hardware/biometrics/fingerprint/2.1/Android.bp: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by hidl-gen -Landroidbp. 2 | 3 | hidl_interface { 4 | name: "vendor.oplus.hardware.biometrics.fingerprint@2.1", 5 | root: "vendor.oplus", 6 | srcs: [ 7 | "IBiometricsFingerprint.hal", 8 | "IBiometricsFingerprintClientCallback.hal", 9 | "types.hal", 10 | ], 11 | interfaces: [ 12 | "android.hidl.base@1.0", 13 | ], 14 | gen_java: true, 15 | } 16 | -------------------------------------------------------------------------------- /RealmeParts/res/values/proper_seekbar_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Value: %s 4 | Default 5 | Default value: %s\nLong press to set 6 | Default value is set 7 | 8 | -------------------------------------------------------------------------------- /doze/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2025 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | android_app { 8 | name: "RealmeDoze", 9 | 10 | srcs: ["src/**/*.java"], 11 | 12 | resource_dirs: ["res"], 13 | certificate: "platform", 14 | platform_apis: true, 15 | privileged: true, 16 | 17 | static_libs: [ 18 | "org.lineageos.settings.resources", 19 | ], 20 | 21 | optimize: { 22 | proguard_flags_files: ["proguard.flags"], 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /RealmeParts/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2025 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | android_app { 8 | name: "RealmeParts", 9 | 10 | srcs: ["src/**/*.java"], 11 | 12 | resource_dirs: ["res"], 13 | certificate: "platform", 14 | platform_apis: true, 15 | privileged: true, 16 | 17 | static_libs: [ 18 | "org.lineageos.settings.resources", 19 | ], 20 | 21 | optimize: { 22 | proguard_flags_files: ["proguard.flags"], 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /sepolicy/vendor/rmt_storage.te: -------------------------------------------------------------------------------- 1 | allow rmt_storage mdmreason_device:chr_file rw_file_perms; 2 | allow rmt_storage proc_oppoversion:dir search; 3 | allow rmt_storage proc_oppoversion:file { open read write }; 4 | get_prop(rmt_storage, oppo_debug_prop); 5 | dontaudit rmt_storage default_prop:file { read open getattr }; 6 | dontaudit rmt_storage self:capability { dac_override dac_read_search }; 7 | allow rmt_storage self:capability sys_admin; 8 | allow rmt_storage proc:file { read open }; 9 | allow rmt_storage sysfs_socinfo_sensitive:file r_file_perms; 10 | -------------------------------------------------------------------------------- /RealmeParts/res/values-it/proper_seekbar_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Valore: %s 4 | di default 5 | Il valore di default: %s\nPremi a lungo per impostare 6 | Il valore di default è stato ripristinato 7 | 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/platform_app.te: -------------------------------------------------------------------------------- 1 | allow platform_app sysfs_fps:file { getattr open read }; 2 | allow platform_app sysfs_graphics:dir search; 3 | allow platform_app sysfs_graphics:file { getattr open read }; 4 | 5 | get_prop(platform_app, oppo_debug_prop); 6 | get_prop(platform_app, boottime_prop); 7 | get_prop(platform_app, audio_config_prop) 8 | get_prop(platform_app, camera_prop) 9 | 10 | allow platform_app sysfs_battery_supply:dir search; 11 | allow platform_app sysfs_battery_supply:file { getattr open read }; 12 | allow platform_app sysfs_kgsl:file { getattr open read }; 13 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_restore.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /remove_packages/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2025 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | cc_prebuilt_binary { 8 | name: "RemovePackages", 9 | overrides: [ 10 | "GoogleCamera", 11 | "CalendarGoogle", 12 | "Photos", 13 | "FilesGoogle", 14 | "Maps", 15 | "Gmail2", 16 | "Drive", 17 | "PersonalSafety", 18 | "YouTube", 19 | "talkback", 20 | "UdfpsAnimations", 21 | ], 22 | strip: { 23 | none: true, 24 | }, 25 | srcs: ["RemovePackages"], 26 | } 27 | -------------------------------------------------------------------------------- /RealmeParts/res/xml/clear_speaker_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | typeattribute hal_power_default mlstrustedsubject; 2 | 3 | allow hal_power_default proc_touchpanel:dir search; 4 | allow hal_power_default proc_touchpanel:file rw_file_perms; 5 | 6 | get_prop(hal_power_default, vendor_mpctl_prop); 7 | allow hal_power_default appdomain:process { getsched setsched }; 8 | allow hal_power_default self:capability sys_nice; 9 | allow hal_power_default system_server:process setsched; 10 | allow hal_power_default proc:{ file lnk_file } rw_file_perms; 11 | allow hal_power_default device_latency:chr_file rw_file_perms; 12 | allow hal_power_default sysfs_devices_system_cpu:{ file lnk_file } rw_file_perms; 13 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_settings_reset.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_otg_tile.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | get_prop(rild, oppo_debug_prop) 2 | set_prop(rild, oppo_debug_prop) 3 | r_dir_file(rild, proc_devinfo) 4 | 5 | allow rild block_device:dir search; 6 | allow rild opporadio_hwservice:hwservice_manager { add find }; 7 | allow rild vendor_pd_locater_dbg_prop:file { read open getattr }; 8 | allow rild diag_device:chr_file rw_file_perms; 9 | dontaudit rild system_data_file:dir { search getattr write add_name }; 10 | dontaudit rild system_data_file:file { create write open }; 11 | dontaudit rild cache_file:dir { create search getattr write add_name }; 12 | dontaudit rild cache_file:file { create write open }; 13 | allow rild mnt_vendor_file:dir search; 14 | allow rild mnt_vendor_file:file { read write open }; 15 | binder_call(rild, qtidataservices_app) 16 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | imports: [ 3 | "bootable/deprecated-ota", 4 | "hardware/google/interfaces", 5 | "hardware/google/pixel", 6 | "hardware/lineage/interfaces/power-libperfmgr", 7 | "hardware/qcom-caf/common/libqti-perfd-client", 8 | ], 9 | } 10 | 11 | install_symlink { 12 | name: "firmware_WCNSS_qcom_cfg.ini_symlink", 13 | vendor: true, 14 | installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini", 15 | symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini", 16 | } 17 | 18 | install_symlink { 19 | name: "firmware_wlan_mac.bin_symlink", 20 | vendor: true, 21 | installed_location: "firmware/wlan/qca_cld/wlan_mac.bin", 22 | symlink_target: "/mnt/vendor/persist/wlan_mac.bin", 23 | } 24 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | r_dir_file(hal_audio_default, proc_oppoversion); 2 | get_prop(hal_audio_default, vendor_mpctl_prop); 3 | get_prop(hal_audio_default, oppo_debug_prop); 4 | get_prop(hal_audio_default, vendor_audio_prop); 5 | 6 | allow hal_audio_default sysfs:dir read; 7 | hal_client_domain(hal_audio_default, hal_power); 8 | allow hal_audio diag_device:chr_file rw_file_perms; 9 | allow hal_audio_default mnt_vendor_file:dir search; 10 | allow hal_audio_default persist_audio_file:dir search; 11 | allow hal_audio_default persist_audio_file:lnk_file read; 12 | r_dir_file(hal_audio_default, persist_audio_file); 13 | allow hal_audio_default sysfs:dir { read open }; 14 | allow hal_audio_default proc_audio_file:file { read }; 15 | 16 | dontaudit hal_audio_default default_prop:file { read open getattr }; 17 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 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 | runtime_resource_overlay { 18 | name: "TetheringConfigOverlay", 19 | theme: "TetheringConfigOverlay", 20 | vendor: true 21 | } 22 | -------------------------------------------------------------------------------- /fingerprint/Android.bp: -------------------------------------------------------------------------------- 1 | cc_binary { 2 | name: "android.hardware.biometrics.fingerprint@2.1-service.RMX1971", 3 | defaults: ["hidl_defaults"], 4 | init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.RMX1971.rc"], 5 | vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.RMX1971.xml"], 6 | relative_install_path: "hw", 7 | srcs: [ 8 | "BiometricsFingerprint.cpp", 9 | "service.cpp", 10 | ], 11 | cflags: [ 12 | "-Wno-unused-parameter", 13 | ], 14 | shared_libs: [ 15 | "libcutils", 16 | "liblog", 17 | "libhidlbase", 18 | "libhardware", 19 | "libutils", 20 | "libbase", 21 | "android.hardware.biometrics.fingerprint@2.1", 22 | "vendor.oplus.hardware.biometrics.fingerprint@2.1", 23 | ], 24 | proprietary: true, 25 | } 26 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 16dp 20 | 21 | -------------------------------------------------------------------------------- /RealmeParts/res/color-night/switchbar_switch_thumb_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /RealmeParts/res/color-night/switchbar_switch_track_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RealmeParts/res/color/switchbar_switch_thumb_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /RealmeParts/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | #66000000 20 | 21 | 22 | -------------------------------------------------------------------------------- /RealmeParts/res/color/switchbar_switch_track_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /RealmeParts/res/xml/soundcontrol_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /configs/component-overrides.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/kcal/KcalService.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.kcal; 2 | 3 | import android.app.Service; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.SharedPreferences; 7 | import android.os.IBinder; 8 | import androidx.preference.PreferenceManager; 9 | 10 | import org.device.RealmeParts.kcal.DisplayCalibration; 11 | 12 | public class KcalService extends Service { 13 | 14 | @Override 15 | public void onCreate() { 16 | // Code to execute when the service is first created 17 | } 18 | 19 | @Override 20 | public int onStartCommand(Intent intent, int flags, int startId) { 21 | Context context = getApplicationContext(); 22 | DisplayCalibration.restore(context); 23 | return START_NOT_STICKY; 24 | } 25 | 26 | @Override 27 | public IBinder onBind(Intent intent) { 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_server.te: -------------------------------------------------------------------------------- 1 | get_prop(system_server, persist_camera_prop); 2 | get_prop(system_server, vendor_camera_prop); 3 | get_prop(system_server, vendor_display_notch_prop); 4 | 5 | allow system_server sysfs_battery_supply:file { getattr open read write }; 6 | allow system_server dcs_hwservice:hwservice_manager { add find }; 7 | allow system_server media_rw_data_file:dir { write remove_name }; 8 | allow system_server media_rw_data_file:file { unlink }; 9 | allow system_server sysfs_rtc:file { open read }; 10 | dontaudit system_server default_android_hwservice:hwservice_manager find; 11 | allow system_server app_zygote:process { getpgid }; 12 | allow system_server proc_devinfo:dir { search }; 13 | allow system_server proc_touchpanel:dir { search }; 14 | allow system_server proc_oppoversion:dir { search }; 15 | allow system_server proc_oppo_fp:file r_file_perms; 16 | allow system_server proc_touchpanel:file rw_file_perms; 17 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/switchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/packages/services/DeviceAsWebcam/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | true 19 | 20 | -------------------------------------------------------------------------------- /overlay/packages/apps/DocumentsUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | true 20 | 21 | -------------------------------------------------------------------------------- /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_RMX1971", 19 | recovery_available: true, 20 | srcs: ["init_RMX1971.cpp"], 21 | whole_static_libs: ["libbase"], 22 | include_dirs: [ 23 | "system/libbase/include", 24 | "system/core/init" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | true 19 | 4 20 | 21 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/derp_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Kader Bava (@Bava7325) 20 | 21 | -------------------------------------------------------------------------------- /RealmeParts/res/mipmap-anydpi/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gps/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file - default 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 3 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_sensors_default.te: -------------------------------------------------------------------------------- 1 | get_prop(hal_sensors_default, oppo_debug_prop) 2 | r_dir_file(hal_sensors_default, proc_touchpanel) 3 | get_prop(hal_sensors_default, sensors_prop) 4 | allow hal_sensors_default proc_touchpanel:file write; 5 | allow hal_sensors_default diag_device:chr_file rw_file_perms; 6 | 7 | # Read and write factory calibration and sensor configuration data 8 | allow hal_sensors_default persist_file:dir search; 9 | allow hal_sensors_default persist_file:lnk_file read; 10 | allow hal_sensors_default mnt_vendor_file:dir search; 11 | r_dir_file(hal_sensors_default, sensors_persist_file) 12 | allow hal_sensors_default sensors_vendor_data_file:dir create_dir_perms; 13 | allow hal_sensors_default sensors_vendor_data_file:file create_file_perms; 14 | 15 | # Interact with the sensors low power island (SLPI/ADSP) CPU 16 | allow hal_sensors_default self:qipcrtr_socket create_socket_perms_no_ioctl; 17 | 18 | vndbinder_use(hal_sensors_default); 19 | allow hal_sensors_default sysfs_ssr:file r_file_perms; 20 | -------------------------------------------------------------------------------- /RealmeParts/res/color/switch_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /sepolicy/vendor/qti_init_shell.te: -------------------------------------------------------------------------------- 1 | dontaudit qti_init_shell self:capability { dac_override dac_read_search }; 2 | allow qti_init_shell configfs:dir { add_name create write }; 3 | allow qti_init_shell configfs:file create; 4 | allow qti_init_shell configfs:lnk_file create; 5 | allow qti_init_shell persist_file:lnk_file read; 6 | allow qti_init_shell sensors_persist_file:fifo_file { getattr setattr }; 7 | allow qti_init_shell proc_devinfo:dir search; 8 | allow qti_init_shell proc_devinfo:file { getattr open read }; 9 | 10 | get_prop(qti_init_shell, oppo_debug_prop); 11 | 12 | allow qti_init_shell sysfs_led_file:file { getattr setattr }; 13 | allow qti_init_shell sysfs_lcd_file:file { getattr setattr }; 14 | allow qti_init_shell ctl_start_prop:property_service set; 15 | allow qti_init_shell ctl_stop_prop:property_service set; 16 | allow qti_init_shell { sysfs sysfs_dm }:file write; 17 | allow qti_init_shell proc_page_cluster:file rw_file_perms; 18 | allow qti_init_shell proc_watermark_scale_factor:file w_file_perms; 19 | allow qti_init_shell sysfs_leds:file setattr; 20 | -------------------------------------------------------------------------------- /lineage_RMX1971.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021-2025 The LineageOS Project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | # Inherit some common DerpFest stuff 8 | TARGET_BOOT_ANIMATION_RES := 1080 9 | $(call inherit-product, vendor/lineage/config/common_full_phone.mk) 10 | 11 | # Inherit from RMX1971 device 12 | $(call inherit-product, $(LOCAL_PATH)/device.mk) 13 | 14 | # Official-ify 15 | DERPFEST_BUILD_TYPE := Official 16 | DERPFEST_BUILD_VARIANT := Stable 17 | TARGET_DISABLE_EPPE := true 18 | 19 | PRODUCT_BRAND := realme 20 | PRODUCT_DEVICE := RMX1971 21 | PRODUCT_MANUFACTURER := realme 22 | PRODUCT_NAME := lineage_RMX1971 23 | PRODUCT_MODEL := RMX1971 24 | 25 | PRODUCT_GMS_CLIENTID_BASE := android-oppo 26 | 27 | PRODUCT_BUILD_PROP_OVERRIDES += \ 28 | BuildDesc="RMX1971-user 11 RKQ1.201217.002 1623376276806 release-keys" \ 29 | BuildFingerprint=realme/RMX1971/RMX1971:11/RKQ1.201217.002/1623376276806:user/release-keys \ 30 | DeviceName=RMX1971 \ 31 | DeviceProduct=RMX1971 \ 32 | SystemDevice=RMX1971 \ 33 | SystemName=RMX1971 34 | -------------------------------------------------------------------------------- /RealmeParts/res/layout/display_cal.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 19 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | 24 | 0 25 | -1 26 | -1 27 | 28 | 29 | -------------------------------------------------------------------------------- /overlay/packages/apps/SimpleDeviceConfig/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | activity_manager/use_compaction=true 18 | 19 | 20 | activity_manager/max_cached_processes=64 21 | 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | true 22 | 23 | 24 | realme 5 Pro 25 | 26 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | allow hal_camera_default persist_camera_file:file rw_file_perms; 2 | allow hal_camera_default persist_camera_file:dir { add_name search write open getattr }; 3 | allow hal_camera_default persist_camera_file:file { setattr create open getattr }; 4 | allow hal_camera_default proc:file rw_file_perms; 5 | allow hal_camera_default diag_device:chr_file rw_file_perms; 6 | 7 | get_prop(hal_camera_default, vendor_camera_prop); 8 | set_prop(hal_camera_default, vendor_camera_prop); 9 | r_dir_file(hal_camera_default, sysfs_net); 10 | 11 | allow hal_camera_default proc_oppoversion:dir search; 12 | allow hal_camera_default proc_meminfo:file { getattr open read }; 13 | allow hal_camera_default proc_oppoversion:file { open read getattr }; 14 | allow hal_camera_default unlabeled:dir { search }; 15 | allow hal_camera_default oppo_debug_prop:file { read open getattr }; 16 | allow hal_camera_default oppo_fingerprint_prop:file { read open getattr }; 17 | allow hal_camera_default default_prop:file { map getattr }; 18 | allow hal_camera_default radio_prop:file { getattr }; 19 | dontaudit hal_camera_default radio_prop:file read; 20 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/kcal/utils/NonScrollListView.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.kcal.utils; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ListView; 8 | 9 | public class NonScrollListView extends ListView { 10 | 11 | public NonScrollListView(Context context) { 12 | super(context); 13 | } 14 | public NonScrollListView(Context context, AttributeSet attrs) { 15 | super(context, attrs); 16 | } 17 | public NonScrollListView(Context context, AttributeSet attrs, int defStyle) { 18 | super(context, attrs, defStyle); 19 | } 20 | @Override 21 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 22 | int heightMeasureSpec_custom = View.MeasureSpec.makeMeasureSpec( 23 | Integer.MAX_VALUE >> 2, View.MeasureSpec.AT_MOST); 24 | super.onMeasure(widthMeasureSpec, heightMeasureSpec_custom); 25 | ViewGroup.LayoutParams params = getLayoutParams(); 26 | params.height = getMeasuredHeight(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/vibrator/VibratorSettingsActivity.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.vibrator; 2 | 3 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 4 | import android.app.Fragment; 5 | import android.os.Bundle; 6 | import android.view.MenuItem; 7 | 8 | public class VibratorSettingsActivity extends CollapsingToolbarBaseActivity { 9 | 10 | private VibratorSettings mVibrateSettingsFragment; 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | 16 | Fragment fragment = getFragmentManager().findFragmentById(com.android.settingslib.collapsingtoolbar.R.id.content_frame); 17 | if (fragment == null) { 18 | mVibrateSettingsFragment = new VibratorSettings(); 19 | getFragmentManager().beginTransaction() 20 | .add(com.android.settingslib.collapsingtoolbar.R.id.content_frame, mVibrateSettingsFragment) 21 | .commit(); 22 | } else { 23 | mVibrateSettingsFragment = (VibratorSettings) fragment; 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 13dp 22 | 23 | 50.0px 24 | 25 | 26 | 860px 27 | 28 | 29 | -------------------------------------------------------------------------------- /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 | camera_data_file 6 | media_rw_data_file 7 | wifi_data_file 8 | dhcp_data_file 9 | tombstone_data_file 10 | nfc_data_file 11 | }:dir { create_dir_perms relabelfrom }; 12 | 13 | allow vendor_init persist_file:lnk_file read; 14 | allow vendor_init freq_prop:property_service set; 15 | allow vendor_init block_device:lnk_file setattr; 16 | allow vendor_init media_rw_data_file:file getattr; 17 | allow vendor_init proc_touchpanel:file write; 18 | set_prop(vendor_init, oppo_debug_prop) 19 | set_prop(vendor_init, vendor_camera_prop) 20 | set_prop(vendor_init, vendor_video_prop) 21 | allow vendor_init oppo_wlan_prop:file { open read getattr }; 22 | get_prop(vendor_init, persist_debug_prop) 23 | allow vendor_init proc:file w_file_perms; 24 | get_prop(vendor_init, oppo_debug_prop) 25 | allow vendor_init system_data_file:lnk_file create; 26 | allow vendor_init proc_security:file write; 27 | allow vendor_init proc_sched:file w_file_perms; 28 | 29 | # Allow vendor_init to change watermark_scale_factor 30 | allow vendor_init proc_watermark_scale_factor:file w_file_perms; 31 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_proper_seekbar_minus.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_proper_seekbar_plus.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/audio/utils/SecureSettingCustomSeekBarPreference.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.audio.utils; 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 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | # Oppo display 2 | type sysfs_oppo_display, fs_type, sysfs_type; 3 | 4 | # Touchpanel 5 | type proc_touchpanel, fs_type, proc_type; 6 | 7 | # Oppo Project version 8 | type proc_oppoversion, fs_type, proc_type; 9 | 10 | # Oppo FP 11 | type proc_oppo_fp, fs_type, proc_type; 12 | type sysfs_hal_fingerprint_default, fs_type, sysfs_type; 13 | 14 | # Camera 15 | type persist_camera_file, file_type; 16 | 17 | # Devinfo 18 | type proc_devinfo, fs_type, proc_type; 19 | 20 | # Audio 21 | type persist_audio_file, file_type , vendor_persist_type; 22 | type proc_audio_file, file_type, data_file_type, core_data_file_type; 23 | 24 | # FPS Info 25 | type sysfs_fps, sysfs_type, fs_type; 26 | 27 | # LED/LCD 28 | type sysfs_led_file, sysfs_type, fs_type; 29 | type sysfs_lcd_file, sysfs_type, fs_type; 30 | 31 | # Power stats 32 | type sysfs_iio, sysfs_type, fs_type; 33 | type sysfs_restart, sysfs_type, fs_type; 34 | 35 | # Smart Charging 36 | type sysfs_scharge, sysfs_type, fs_type; 37 | 38 | # Kcal 39 | type proc_kcal_file, sysfs_type, fs_type; 40 | 41 | # Audio control 42 | type sysfs_hgain, sysfs_type, fs_type; 43 | type sysfs_mgain, sysfs_type, fs_type; 44 | 45 | # Vibrator 46 | type proc_vibration_file, sysfs_type, fs_type; 47 | 48 | # I/O Scheduler 49 | type sysfs_io_sched_tuneable, fs_type, sysfs_type; 50 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | allow init persist_file:lnk_file read; 2 | allow init socket_device:sock_file { create setattr unlink }; 3 | allow init sysfs_battery_supply:file setattr; 4 | allow init sysfs_oppo_display:file rw_file_perms; 5 | allow init sysfs_oppo_display:file setattr; 6 | allow init hidl_base_hwservice:hwservice_manager add; 7 | allow init ion_device:chr_file { ioctl open read }; 8 | allow init same_process_hal_file:file execute; 9 | allow init proc_touchpanel:file { setattr getattr open read write }; 10 | allow init sysfs:file setattr; 11 | allow init bt_firmware_file:filesystem getattr; 12 | allow init firmware_file:filesystem getattr; 13 | allow init self:socket create; 14 | allow init oppo_debug_prop:file { read open getattr setattr }; 15 | allow init sysfs_usb_supply:file setattr; 16 | allow init sysfs_usb_supply:file rw_file_perms; 17 | set_prop(init, oppo_debug_prop) 18 | 19 | allow init netutils_wrapper_exec:file { execute read open getattr }; 20 | allow init init:netlink_route_socket { read getattr }; 21 | allow init apex_metadata_file:lnk_file read; 22 | allow init hwservicemanager:binder { call transfer }; 23 | allow init proc:file { write }; 24 | 25 | allow init sysfs_dm:dir relabelfrom; 26 | allow init sysfs_dm:file relabelfrom; 27 | allow init sysfs_io_sched_tuneable:file { setattr w_file_perms }; 28 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/vibrator/utils/SecureSettingVibrationSeekBarPreference.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.vibrator.utils; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | public class SecureSettingVibrationSeekBarPreference extends VibrationSeekBarPreference { 7 | 8 | public SecureSettingVibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 9 | super(context, attrs, defStyleAttr, defStyleRes); 10 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 11 | } 12 | 13 | public SecureSettingVibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) { 14 | super(context, attrs, defStyleAttr); 15 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 16 | } 17 | 18 | public SecureSettingVibrationSeekBarPreference(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 21 | } 22 | 23 | public SecureSettingVibrationSeekBarPreference(Context context) { 24 | super(context); 25 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /configs/permissions/privapp_whitelist_org.device.Realmeparts.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 22 | 23 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | # Camera 2 | vendor.oppo.hardware.camera.oppoAlgoProcessService::IOppoAlgoProcessService u:object_r:hal_camera_hwservice:s0 3 | vendor.oppo.hardware.camera.oppopostproc::ICameraPostProc u:object_r:hal_camera_hwservice:s0 4 | 5 | # Fingerprint 6 | vendor.oplus.hardware.biometrics.fingerprint::IBiometricsFingerprint u:object_r:hal_fingerprint_hwservice:s0 7 | 8 | # NFC 9 | vendor.nxp.nxpnfc::INxpNfc u:object_r:nfc_hwservice:s0 10 | vendor.nxp.nxpese::INxpEse u:object_r:nfc_hwservice:s0 11 | 12 | # Dcs 13 | vendor.oplus.hardware.commondcs::ICommonDcsHalService u:object_r:dcs_hwservice:s0 14 | 15 | # ORMS 16 | vendor.oplus.hardware.orms::IOrmsHalProxy u:object_r:vendor_hal_orms_hwservice:s0 17 | 18 | # Radio 19 | vendor.oplus.hardware.appradio::IOplusAppRadio u:object_r:opporadio_hwservice:s0 20 | vendor.oplus.hardware.radio::IOplusRadio u:object_r:opporadio_hwservice:s0 21 | vendor.oplus.hardware.ims::IOplusImsRadio u:object_r:opporadio_hwservice:s0 22 | 23 | # Diaghal 24 | vendor.qti.diaghal::Idiag u:object_r:hal_diag_hwservice:s0 25 | 26 | # Turbo adapter 27 | vendor.google.google_battery::IGoogleBattery u:object_r:hal_turbo_adapter_hwservice:s0 28 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_game_tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 2017-2019 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | 25 | import org.lineageos.settings.doze.DozeUtils; 26 | 27 | public class BootCompletedReceiver extends BroadcastReceiver { 28 | 29 | private static final boolean DEBUG = false; 30 | private static final String TAG = "RealmeDoze"; 31 | 32 | @Override 33 | public void onReceive(final Context context, Intent intent) { 34 | if (DEBUG) Log.d(TAG, "Received boot completed intent"); 35 | DozeUtils.checkDozeService(context); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 The CyanogenMod Project 3 | * 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.os.Bundle; 21 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 22 | 23 | public class DozeSettingsActivity extends CollapsingToolbarBaseActivity { 24 | 25 | private static final String TAG_DOZE = "doze"; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | 31 | getFragmentManager().beginTransaction().replace( 32 | com.android.settingslib.collapsingtoolbar.R.id.content_frame, 33 | new DozeSettingsFragment(), TAG_DOZE).commit(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_app.te: -------------------------------------------------------------------------------- 1 | allow system_app proc_touchpanel:dir search; 2 | allow system_app sysfs_usb_supply:dir search; 3 | allow system_app sysfs_battery_supply:dir search; 4 | allow system_app sysfs_battery_supply:file { getattr open read }; 5 | allow system_app proc_touchpanel:file { read write open getattr setattr }; 6 | allow system_app vendor_default_prop:file { map getattr }; 7 | get_prop(system_app,oppo_debug_prop) 8 | 9 | # FPS Info 10 | allow system_app sysfs_fps:file rw_file_perms; 11 | 12 | # Battery Health 13 | r_dir_file(system_app, sysfs_battery_supply); 14 | 15 | # Realme Parts 16 | allow system_app sysfs_scharge:file { getattr open read write }; 17 | allow system_app sysfs_usb_supply:file { getattr open read write }; 18 | allow system_app sysfs_oppo_display:dir search; 19 | allow system_app sysfs_oppo_display:file { getattr open read write }; 20 | allow system_app proc_vmallocinfo:file r_file_perms; 21 | allow system_app proc_pagetypeinfo:file r_file_perms; 22 | allow system_app sysfs_zram:dir search; 23 | allow system_app sysfs_zram:file r_file_perms; 24 | allow system_app proc_kcal_file:file { getattr open read write }; 25 | allow system_app proc_kcal_file:dir search; 26 | allow system_app { 27 | sysfs_hgain 28 | sysfs_mgain 29 | proc_vibration_file 30 | }:file rw_file_perms; 31 | allow system_app sysfs_leds:dir search; 32 | allow system_app proc_vibration_file:dir search; 33 | allow system_app sysfs_leds:lnk_file { getattr open read write }; 34 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 6 24 | 25 | 6 26 | 27 | 6 28 | 29 | -------------------------------------------------------------------------------- /sensors/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include "HalProxy.h" 22 | 23 | using android::hardware::configureRpcThreadpool; 24 | using android::hardware::joinRpcThreadpool; 25 | using android::hardware::sensors::V2_0::ISensors; 26 | using android::hardware::sensors::V2_1::implementation::HalProxyV2_0; 27 | 28 | int main(int /* argc */, char** /* argv */) { 29 | configureRpcThreadpool(1, true); 30 | 31 | android::sp halProxy = new HalProxyV2_0(); 32 | if (halProxy->registerAsService() != ::android::OK) { 33 | ALOGE("Failed to register Sensors HAL instance"); 34 | return -1; 35 | } 36 | 37 | joinRpcThreadpool(); 38 | return 1; // joinRpcThreadpool shouldn't exit 39 | } 40 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/speaker/ClearSpeakerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 Paranoid Android 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.device.RealmeParts.speaker; 18 | 19 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 20 | import android.app.Fragment; 21 | import android.os.Bundle; 22 | import android.view.MenuItem; 23 | 24 | public class ClearSpeakerActivity extends CollapsingToolbarBaseActivity { 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | Fragment fragment = getFragmentManager().findFragmentById(com.android.settingslib.collapsingtoolbar.R.id.content_frame); 31 | ClearSpeakerFragment clearSpeakerFragment; 32 | if (fragment == null) { 33 | clearSpeakerFragment = new ClearSpeakerFragment(); 34 | getFragmentManager().beginTransaction() 35 | .add(com.android.settingslib.collapsingtoolbar.R.id.content_frame, clearSpeakerFragment) 36 | .commit(); 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/Touch/ScreenOffGestureSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Slimroms 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.device.RealmeParts.Touch; 18 | 19 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 20 | import android.os.Bundle; 21 | import android.view.MenuItem; 22 | 23 | public class ScreenOffGestureSettings extends CollapsingToolbarBaseActivity { 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | 29 | getFragmentManager().beginTransaction().replace( 30 | com.android.settingslib.collapsingtoolbar.R.id.content_frame, 31 | new ScreenOffGesture()).commit(); 32 | getActionBar().setDisplayHomeAsUpEnabled(true); 33 | } 34 | 35 | @Override 36 | public boolean onOptionsItemSelected(MenuItem item) { 37 | switch (item.getItemId()) { 38 | case android.R.id.home: 39 | finish(); 40 | return true; 41 | default: 42 | return super.onOptionsItemSelected(item); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /sensors/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019 The Android Open Source Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "android.hardware.sensors@2.0-service.multihal.RMX1971", 18 | stem: "android.hardware.sensors@2.0-service.multihal", 19 | defaults: [ 20 | "hidl_defaults", 21 | ], 22 | vendor: true, 23 | relative_install_path: "hw", 24 | srcs: [ 25 | "HalProxy.cpp", 26 | "HalProxyCallback.cpp", 27 | "service.cpp", 28 | ], 29 | init_rc: ["android.hardware.sensors@2.0-service-multihal.rc"], 30 | vintf_fragments: ["android.hardware.sensors@2.0-multihal.xml"], 31 | header_libs: [ 32 | "android.hardware.sensors@2.X-multihal.header", 33 | "android.hardware.sensors@2.X-shared-utils", 34 | ], 35 | shared_libs: [ 36 | "android.hardware.sensors@2.0", 37 | "android.hardware.sensors@2.0-ScopedWakelock", 38 | "android.hardware.sensors@2.1", 39 | "libbase", 40 | "libcutils", 41 | "libfmq", 42 | "libhidlbase", 43 | "liblog", 44 | "libpower", 45 | "libutils", 46 | ], 47 | static_libs: [ 48 | "android.hardware.sensors@1.0-convert", 49 | ], 50 | } 51 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013, 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 115 VOLUME_UP WAKE_DROPPED 28 | key 114 VOLUME_DOWN WAKE_DROPPED 29 | key 102 HOME WAKE_DROPPED 30 | key 528 FOCUS WAKE_DROPPED 31 | key 766 CAMERA WAKE_DROPPED 32 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /rootdir/etc/init.oppo.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | # Disable edge limit control interface 3 | chmod 0660 /proc/touchpanel/oplus_tp_limit_enable 4 | chmod 0660 /proc/touchpanel/oplus_tp_direction 5 | chmod 0660 /proc/touchpanel/game_switch_enable 6 | chown system system /proc/touchpanel/oplus_tp_limit_enable 7 | chown system system /proc/touchpanel/oplus_tp_direction 8 | chown system system /proc/touchpanel/game_switch_enable 9 | write /proc/touchpanel/oplus_tp_limit_enable 0 10 | write /proc/touchpanel/oplus_tp_direction 1 11 | write /proc/touchpanel/game_switch_enable 1 12 | 13 | # Enable OTG by default 14 | write /sys/class/power_supply/usb/otg_switch 1 15 | 16 | # TP FW Update 17 | write /proc/touchpanel/tp_fw_update 0 18 | 19 | # Charger 20 | chown system system /sys/class/power_supply/battery/mmi_charging_enable 21 | 22 | # FPC Fingerprint 16051 config 23 | chown system system /sys/bus/platform/devices/soc:fpc_fpc1020*/irq 24 | chown system system /sys/bus/platform/devices/soc:fpc_fpc1020*/irq_enable 25 | chown system system /sys/bus/platform/devices/soc:fpc_fpc1020*/wakelock_enable 26 | 27 | # FPC Fingerprint 16037 config 28 | chown system system /sys/bus/platform/devices/fpc_fpc1020*/irq 29 | chown system system /sys/bus/platform/devices/fpc_fpc1020*/irq_enable 30 | chown system system /sys/bus/platform/devices/fpc_fpc1020*/wakelock_enable 31 | 32 | # Silead Fingerprint 33 | chown system system /dev/silead_fp 34 | chmod 0666 /dev/silead_fp 35 | 36 | service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal 37 | override 38 | class hal 39 | user system 40 | group system wakelock context_hub input 41 | writepid /dev/cpuset/system-background/tasks 42 | capabilities BLOCK_SUSPEND 43 | rlimit rtprio 10 10 44 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | binder_call(hal_fingerprint_default, hal_fingerprint_default) 2 | 3 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 4 | allow hal_fingerprint_default goodix_device:chr_file rw_file_perms; 5 | allow hal_fingerprint_default qdsp_device:chr_file rw_file_perms; 6 | allow hal_fingerprint_default xdsp_device:chr_file r_file_perms; 7 | allow hal_fingerprint_default uhid_device:chr_file rw_file_perms; 8 | 9 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 10 | allow hal_fingerprint_default proc_oppo_fp:file r_file_perms; 11 | allow hal_fingerprint_default sysfs_hal_fingerprint_default:file rw_file_perms; 12 | 13 | allow hal_fingerprint_default proc_touchpanel:dir search; 14 | allow hal_fingerprint_default proc_touchpanel:file rw_file_perms; 15 | 16 | allow hal_fingerprint_default sysfs_graphics:dir search; 17 | allow hal_fingerprint_default sysfs_graphics:file rw_file_perms; 18 | 19 | get_prop(hal_fingerprint_default, oppo_debug_prop); 20 | get_prop(hal_fingerprint_default, adsprpc_prop); 21 | 22 | set_prop(hal_fingerprint_default, oppo_fingerprint_prop); 23 | set_prop(hal_fingerprint_default, oppo_debug_prop); 24 | 25 | allow hal_fingerprint_default dcs_hwservice:hwservice_manager find; 26 | allow hal_fingerprint_default vendor_hal_orms_hwservice:hwservice_manager find; 27 | allow hal_fingerprint_default sysfs_oppo_display:dir search; 28 | dontaudit hal_fingerprint_default default_android_hwservice:hwservice_manager find; 29 | dontaudit hal_fingerprint_default default_prop:file read; 30 | allow hal_fingerprint_default oppo_debug_prop:property_service set; 31 | allow hal_fingerprint_default sysfs_oppo_display:file { read open getattr write }; 32 | allow hal_fingerprint_default system_suspend_hwservice:hwservice_manager find; 33 | allow hal_fingerprint_default system_suspend_hwservice:binder { call transfer }; 34 | wakelock_use(hal_fingerprint_default) 35 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 5 13 | 6 14 | 7 15 | 16 | 17 | 40 | 41 | 0 sd|hd|fhd|uhd 60 42 | 1 sd|hd|fhd 30 43 | 2 sd|hd|fhd 30 44 | 45 | 46 | -------------------------------------------------------------------------------- /releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 3 | # Copyright (C) 2017-2020 The LineageOS Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import common 18 | import re 19 | 20 | def FullOTA_Assertions(info): 21 | OTA_Assertions(info) 22 | return 23 | 24 | def IncrementalOTA_Assertions(info): 25 | OTA_Assertions(info) 26 | return 27 | 28 | def FullOTA_InstallEnd(info): 29 | OTA_InstallEnd(info) 30 | return 31 | 32 | def IncrementalOTA_InstallEnd(info): 33 | OTA_InstallEnd(info) 34 | return 35 | 36 | def AddImage(info, basename, dest): 37 | path = "IMAGES/" + basename 38 | if path not in info.input_zip.namelist(): 39 | return 40 | 41 | data = info.input_zip.read(path) 42 | common.ZipWriteStr(info.output_zip, basename, data) 43 | info.script.Print("Patching {} image unconditionally...".format(dest.split('/')[-1])) 44 | info.script.AppendExtra('package_extract_file("%s", "%s");' % (basename, dest)) 45 | 46 | def OTA_Assertions(info): 47 | info.script.AppendExtra('assert(getprop("ro.device.latest_fw") == "true" || abort("Older firmware detected. Kindly update firmware to realme UI 2 and retry flashing."););'); 48 | return 49 | 50 | def OTA_InstallEnd(info): 51 | AddImage(info, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo") 52 | AddImage(info, "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta") 53 | return 54 | -------------------------------------------------------------------------------- /RealmeParts/res/xml/vibration_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 16 | 17 | 23 | 24 | 30 | 31 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/ModeSwitch/OTGModeSwitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | package org.device.RealmeParts; 19 | 20 | import android.content.Context; 21 | import android.content.SharedPreferences; 22 | import androidx.preference.Preference; 23 | import androidx.preference.Preference.OnPreferenceChangeListener; 24 | import androidx.preference.PreferenceManager; 25 | 26 | import org.device.RealmeParts.RealmeParts; 27 | 28 | public class OTGModeSwitch implements OnPreferenceChangeListener { 29 | 30 | private static final String FILE = "/sys/class/power_supply/usb/otg_switch"; 31 | 32 | public static String getFile() { 33 | if (Utils.fileWritable(FILE)) { 34 | return FILE; 35 | } 36 | return null; 37 | } 38 | 39 | public static boolean isSupported() { 40 | return Utils.fileWritable(getFile()); 41 | } 42 | 43 | public static boolean isCurrentlyEnabled(Context context) { 44 | return Utils.getFileValueAsBoolean(getFile(), false); 45 | } 46 | 47 | @Override 48 | public boolean onPreferenceChange(Preference preference, Object newValue) { 49 | Boolean enabled = (Boolean) newValue; 50 | Utils.writeValue(getFile(), enabled ? "1" : "0"); 51 | return true; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.early_boot.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2012-2013,2016,2018-2020 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 | boot_reason=`cat /proc/sys/kernel/boot_reason` 31 | reboot_reason=`getprop ro.boot.alarmboot` 32 | if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then 33 | setprop ro.vendor.alarm_boot true 34 | else 35 | setprop ro.vendor.alarm_boot false 36 | fi 37 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/vibrator/utils/SecureSettingsStore.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.vibrator.utils; 2 | 3 | import android.content.ContentResolver; 4 | import android.preference.PreferenceDataStore; 5 | import android.provider.Settings; 6 | 7 | public class SecureSettingsStore extends androidx.preference.PreferenceDataStore 8 | implements PreferenceDataStore { 9 | 10 | private final ContentResolver mContentResolver; 11 | 12 | public SecureSettingsStore(ContentResolver contentResolver) { 13 | mContentResolver = contentResolver; 14 | } 15 | 16 | public boolean getBoolean(String key, boolean defValue) { 17 | return getInt(key, defValue ? 1 : 0) != 0; 18 | } 19 | 20 | public float getFloat(String key, float defValue) { 21 | return Settings.Secure.getFloat(mContentResolver, key, defValue); 22 | } 23 | 24 | public int getInt(String key, int defValue) { 25 | return Settings.Secure.getInt(mContentResolver, key, defValue); 26 | } 27 | 28 | public long getLong(String key, long defValue) { 29 | return Settings.Secure.getLong(mContentResolver, key, defValue); 30 | } 31 | 32 | public String getString(String key, String defValue) { 33 | String result = Settings.Secure.getString(mContentResolver, key); 34 | return result == null ? defValue : result; 35 | } 36 | 37 | public void putBoolean(String key, boolean value) { 38 | putInt(key, value ? 1 : 0); 39 | } 40 | 41 | public void putFloat(String key, float value) { 42 | Settings.Secure.putFloat(mContentResolver, key, value); 43 | } 44 | 45 | public void putInt(String key, int value) { 46 | Settings.Secure.putInt(mContentResolver, key, value); 47 | } 48 | 49 | public void putLong(String key, long value) { 50 | Settings.Secure.putLong(mContentResolver, key, value); 51 | } 52 | 53 | public void putString(String key, String value) { 54 | Settings.Secure.putString(mContentResolver, key, value); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /rootdir/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // SPDX-FileCopyrightText: 2025 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | // Init configuration files 7 | 8 | prebuilt_etc { 9 | name: "init.oppo.rc", 10 | src: "etc/init.oppo.rc", 11 | sub_dir: "init/hw", 12 | soc_specific: true, 13 | } 14 | 15 | prebuilt_etc { 16 | name: "init.oppo.display.rc", 17 | src: "etc/init.oppo.display.rc", 18 | sub_dir: "init/hw", 19 | device_specific: true, 20 | } 21 | 22 | prebuilt_etc { 23 | name: "init.qcom.power.rc", 24 | src: "etc/init.qcom.power.rc", 25 | sub_dir: "init/hw", 26 | soc_specific: true, 27 | } 28 | 29 | prebuilt_etc { 30 | name: "init.qcom.rc", 31 | src: "etc/init.qcom.rc", 32 | sub_dir: "init/hw", 33 | soc_specific: true, 34 | } 35 | 36 | prebuilt_etc { 37 | name: "init.recovery.qcom.rc", 38 | src: "etc/init.recovery.qcom.rc", 39 | sub_dir: "init", 40 | recovery: true, 41 | } 42 | 43 | prebuilt_etc { 44 | name: "init.target.rc", 45 | src: "etc/init.target.rc", 46 | sub_dir: "init/hw", 47 | soc_specific: true, 48 | } 49 | 50 | prebuilt_etc { 51 | name: "ueventd.qcom.rc", 52 | filename: "ueventd.rc", 53 | src: "ueventd.qcom.rc", 54 | soc_specific: true, 55 | } 56 | 57 | prebuilt_etc { 58 | name: "fstab.qcom", 59 | src: "etc/fstab.qcom", 60 | soc_specific: true, 61 | } 62 | 63 | prebuilt_etc { 64 | name: "init.RealmeParts.rc", 65 | src: "etc/init.RealmeParts.rc", 66 | sub_dir: "init/hw", 67 | soc_specific: true, 68 | } 69 | 70 | // Init scripts 71 | 72 | sh_binary { 73 | name: "init.qcom.early_boot.sh", 74 | src: "bin/init.qcom.early_boot.sh", 75 | soc_specific: true, 76 | } 77 | 78 | sh_binary { 79 | name: "init.qcom.post_boot.sh", 80 | src: "bin/init.qcom.post_boot.sh", 81 | soc_specific: true, 82 | } 83 | 84 | sh_binary { 85 | name: "init.qcom.sh", 86 | src: "bin/init.qcom.sh", 87 | soc_specific: true, 88 | } 89 | 90 | sh_binary { 91 | name: "init.qti.chg_policy.sh", 92 | src: "bin/init.qti.chg_policy.sh", 93 | soc_specific: true, 94 | } 95 | -------------------------------------------------------------------------------- /configs/media/system_properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /RealmeParts/res/layout/switch_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 27 | 28 | 40 | 41 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/audio/SoundControlSettingsActivity.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 org.device.RealmeParts.audio; 18 | 19 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 20 | import android.app.Fragment; 21 | import android.os.Bundle; 22 | import android.view.MenuItem; 23 | 24 | public class SoundControlSettingsActivity extends CollapsingToolbarBaseActivity { 25 | 26 | private SoundControlSettings mSoundControlSettingsFragment; 27 | 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | 32 | getActionBar().setDisplayHomeAsUpEnabled(true); 33 | 34 | Fragment fragment = getFragmentManager().findFragmentById(com.android.settingslib.collapsingtoolbar.R.id.content_frame); 35 | if (fragment == null) { 36 | mSoundControlSettingsFragment = new SoundControlSettings(); 37 | getFragmentManager().beginTransaction() 38 | .add(com.android.settingslib.collapsingtoolbar.R.id.content_frame, mSoundControlSettingsFragment) 39 | .commit(); 40 | } else { 41 | mSoundControlSettingsFragment = (SoundControlSettings) 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 | -------------------------------------------------------------------------------- /reorder-libs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2021 The LineageOS Project 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | from functools import cmp_to_key 9 | from locale import LC_ALL, setlocale, strcoll 10 | from pathlib import Path 11 | 12 | FILES = [Path(file) for file in [ 13 | "proprietary-files.txt", 14 | ]] 15 | 16 | setlocale(LC_ALL, "C") 17 | 18 | def strcoll_extract_utils(string1: str, string2: str) -> int: 19 | # Skip logic if one of the string if empty 20 | if not string1 or not string2: 21 | return strcoll(string1, string2) 22 | 23 | # Remove '-' from strings if there, 24 | # it is used to indicate a build target 25 | string1 = string1.removeprefix('-') 26 | string2 = string2.removeprefix('-') 27 | 28 | # If no directories, compare normally 29 | if not "/" in string1 and not "/" in string2: 30 | return strcoll(string1, string2) 31 | 32 | string1_dir = string1.rsplit("/", 1)[0] + "/" 33 | string2_dir = string2.rsplit("/", 1)[0] + "/" 34 | if string1_dir == string2_dir: 35 | # Same directory, compare normally 36 | return strcoll(string1, string2) 37 | 38 | if string1_dir.startswith(string2_dir): 39 | # First string dir is a subdirectory of the second one, 40 | # return string1 > string2 41 | return -1 42 | 43 | if string2_dir.startswith(string1_dir): 44 | # Second string dir is a subdirectory of the first one, 45 | # return string2 > string1 46 | return 1 47 | 48 | # Compare normally 49 | return strcoll(string1, string2) 50 | 51 | for file in FILES: 52 | if not file.is_file(): 53 | print(f"File {str(file)} not found") 54 | continue 55 | 56 | with open(file, 'r') as f: 57 | sections = f.read().split("\n\n") 58 | 59 | ordered_sections = [] 60 | for section in sections: 61 | section_list = [line.strip() for line in section.splitlines()] 62 | section_list.sort(key=cmp_to_key(strcoll_extract_utils)) 63 | ordered_sections.append("\n".join(section_list)) 64 | 65 | with open(file, 'w') as f: 66 | f.write("\n\n".join(ordered_sections).strip() + "\n") 67 | -------------------------------------------------------------------------------- /interfaces/vendor/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.hal: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package vendor.oplus.hardware.biometrics.fingerprint@2.1; 18 | 19 | /* This HAL interface communicates asynchronous results from the 20 | fingerprint driver in response to user actions on the fingerprint sensor 21 | */ 22 | interface IBiometricsFingerprintClientCallback { 23 | 24 | oneway onEnrollResult(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); 25 | 26 | oneway onAcquired(uint64_t deviceId, FingerprintAcquiredInfo acquiredInfo, int32_t vendorCode); 27 | 28 | oneway onAuthenticated(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, vec token); 29 | 30 | oneway onError(uint64_t deviceId, FingerprintError error, int32_t vendorCode); 31 | 32 | oneway onRemoved(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); 33 | 34 | oneway onEnumerate(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); 35 | 36 | oneway onTouchDown(uint64_t deviceId); 37 | oneway onTouchUp(uint64_t deviceId); 38 | oneway onMonitorEventTriggered(uint32_t type, string data); 39 | oneway onImageInfoAcquired(uint32_t type, uint32_t quality, uint32_t match_score); 40 | oneway onSyncTemplates(uint64_t deviceId, vec fingerId, uint32_t remaining); 41 | oneway onEngineeringInfoUpdated(uint32_t length, vec keys, vec values); 42 | oneway onFingerprintCmd(int32_t deviceId, vec groupId, uint32_t remaining); 43 | }; 44 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/KernelControl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 SlimRoms Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.device.RealmeParts; 18 | 19 | import org.device.RealmeParts.Touch.util.Utils; 20 | import java.io.File; 21 | 22 | /* 23 | * Very ugly class which enables or disables for now 24 | * all gesture controls on kernel level. 25 | * We need to do it this way for now to do not break 3rd party kernel. 26 | * Kernel should have a better per gesture control but as long 27 | * this is not changed by the manufacture we would break gesture control on every 28 | * 3rd party kernel. Hence we do it this way for now. 29 | */ 30 | 31 | public final class KernelControl { 32 | 33 | private static String GESTURE_PATH = "/proc/touchpanel/gesture_enable"; 34 | private static String DT2W_PATH = "/proc/touchpanel/double_tap_enable"; 35 | 36 | private KernelControl() { 37 | // this class is not supposed to be instantiated 38 | } 39 | 40 | /** 41 | * Enable or disable gesture control. 42 | */ 43 | public static void enableGestures(boolean enable) { 44 | if (new File(GESTURE_PATH).exists()) { 45 | Utils.writeLine(GESTURE_PATH, enable ? "1" : "0"); 46 | } 47 | } 48 | 49 | public static void enableDt2w(boolean enable) { 50 | if (new File(GESTURE_PATH).exists()) { 51 | Utils.writeLine(DT2W_PATH, enable ? "1" : "0"); 52 | } 53 | } 54 | 55 | /** 56 | * Do we have touch control at all? 57 | */ 58 | public static boolean hasTouchscreenGestures() { 59 | return new File(GESTURE_PATH).exists(); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/vibrator/utils/VibrateFileUtils.java: -------------------------------------------------------------------------------- 1 | package org.device.RealmeParts.vibrator.utils; 2 | 3 | import java.io.File; 4 | import java.io.FileOutputStream; 5 | import java.io.IOException; 6 | 7 | public final class VibrateFileUtils { 8 | 9 | public static boolean fileWritable(String filename) { 10 | return fileExists(filename) && new File(filename).canWrite(); 11 | } 12 | 13 | public static boolean fileExists(String filename) { 14 | if (filename == null) { 15 | return false; 16 | } 17 | return new File(filename).exists(); 18 | } 19 | 20 | public static void setValue(String path, int value) { 21 | if (fileWritable(path)) { 22 | if (path == null) { 23 | return; 24 | } 25 | try { 26 | FileOutputStream fos = new FileOutputStream(new File(path)); 27 | fos.write(Integer.toString(value).getBytes()); 28 | fos.flush(); 29 | fos.close(); 30 | } catch (IOException e) { 31 | e.printStackTrace(); 32 | } 33 | } 34 | } 35 | 36 | public static void setValue(String path, double value) { 37 | if (fileWritable(path)) { 38 | if (path == null) { 39 | return; 40 | } 41 | try { 42 | FileOutputStream fos = new FileOutputStream(new File(path)); 43 | fos.write(Long.toString(Math.round(value)).getBytes()); 44 | fos.flush(); 45 | fos.close(); 46 | } catch (IOException e) { 47 | e.printStackTrace(); 48 | } 49 | } 50 | } 51 | 52 | public static void setValue(String path, String value) { 53 | if (fileWritable(path)) { 54 | if (path == null) { 55 | return; 56 | } 57 | try { 58 | FileOutputStream fos = new FileOutputStream(new File(path)); 59 | fos.write(value.getBytes()); 60 | fos.flush(); 61 | fos.close(); 62 | } catch (IOException e) { 63 | e.printStackTrace(); 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /configs/qti_whitelist_system_ext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_realmeparts.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 36 | 37 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/ModeSwitch/GameModeSwitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | 19 | package org.device.RealmeParts.ModeSwitch; 20 | 21 | import androidx.preference.Preference; 22 | import android.util.Log; 23 | import android.content.Context; 24 | 25 | import androidx.preference.Preference.OnPreferenceChangeListener; 26 | import androidx.preference.PreferenceManager; 27 | 28 | import org.device.RealmeParts.Utils; 29 | 30 | public class GameModeSwitch implements Preference.OnPreferenceChangeListener { 31 | 32 | private static final String FILE = "/proc/touchpanel/game_switch_enable"; 33 | private static final String TAG = Utils.class.getSimpleName(); 34 | 35 | public static String getFile() { 36 | if (Utils.fileWritable(FILE)) { 37 | return FILE; 38 | } 39 | return null; 40 | } 41 | 42 | public static boolean isSupported() { 43 | return Utils.fileWritable(getFile()); 44 | } 45 | 46 | public static boolean isCurrentlyEnabled(Context context) { 47 | return Utils.getFileValueAsBoolean(getFile(), false); 48 | } 49 | 50 | @Override 51 | public boolean onPreferenceChange(Preference preference, Object newValue) { 52 | Boolean enabled = (Boolean) newValue; 53 | Utils.writeValue(getFile(), enabled ? "1" : "0"); 54 | Utils.writeValue(org.device.RealmeParts.RealmeParts.TP_LIMIT_ENABLE, enabled ? "0" : "1" ); 55 | Utils.writeValue(org.device.RealmeParts.RealmeParts.TP_DIRECTION, enabled ? "1" : "0" ); 56 | Log.e(TAG, "game mode set to " + enabled); 57 | return true; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /update-sha1sums.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | import os 20 | import sys 21 | from hashlib import sha1 22 | 23 | device='RMX1971' 24 | vendor='realme' 25 | 26 | with open('proprietary-files.txt', 'r') as f: 27 | lines = f.read().splitlines() 28 | vendorPath = '../../../vendor/' + vendor + '/' + device + '/proprietary' 29 | needSHA1 = False 30 | 31 | 32 | def cleanup(): 33 | for index, line in enumerate(lines): 34 | # Skip empty or commented lines 35 | if len(line) == 0 or line[0] == '#' or '|' not in line: 36 | continue 37 | 38 | # Drop SHA1 hash, if existing 39 | lines[index] = line.split('|')[0] 40 | 41 | 42 | def update(): 43 | for index, line in enumerate(lines): 44 | # Skip empty lines 45 | if len(line) == 0: 46 | continue 47 | 48 | # Check if we need to set SHA1 hash for the next files 49 | if line[0] == '#': 50 | needSHA1 = (' - from' in line) 51 | continue 52 | 53 | if needSHA1: 54 | # Remove existing SHA1 hash 55 | line = line.split('|')[0] 56 | 57 | filePath = line.split(';')[0].split(':')[-1] 58 | if filePath[0] == '-': 59 | filePath = filePath[1:] 60 | 61 | with open(os.path.join(vendorPath, filePath), 'rb') as f: 62 | hash = sha1(f.read()).hexdigest() 63 | 64 | lines[index] = '%s|%s' % (line, hash) 65 | 66 | 67 | if len(sys.argv) == 2 and sys.argv[1] == '-c': 68 | cleanup() 69 | else: 70 | update() 71 | 72 | with open('proprietary-files.txt', 'w') as file: 73 | file.write('\n'.join(lines) + '\n') 74 | -------------------------------------------------------------------------------- /fingerprint/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.RMX1971" 18 | 19 | #include 20 | #include 21 | 22 | #include "BiometricsFingerprint.h" 23 | 24 | using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint; 25 | using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint; 26 | using android::hardware::configureRpcThreadpool; 27 | using android::hardware::joinRpcThreadpool; 28 | using android::OK; 29 | using android::sp; 30 | using android::status_t; 31 | 32 | int main() { 33 | sp biometricsFingerprint; 34 | status_t status; 35 | 36 | LOG(INFO) << "Fingerprint HAL Adapter service is starting."; 37 | 38 | biometricsFingerprint = new BiometricsFingerprint(); 39 | if (biometricsFingerprint == nullptr) { 40 | LOG(ERROR) << "Can not create an instance of Fingerprint HAL Adapter BiometricsFingerprint Iface, exiting."; 41 | goto shutdown; 42 | } 43 | 44 | configureRpcThreadpool(1, true /*callerWillJoin*/); 45 | 46 | status = biometricsFingerprint->registerAsService(); 47 | if (status != OK) { 48 | LOG(ERROR) << "Could not register service for Fingerprint HAL Adapter BiometricsFingerprint Iface (" 49 | << status << ")"; 50 | goto shutdown; 51 | } 52 | 53 | LOG(INFO) << "Fingerprint HAL Adapter service is ready."; 54 | joinRpcThreadpool(); 55 | // Should not pass this line 56 | 57 | shutdown: 58 | // In normal operation, we don't expect the thread pool to shutdown 59 | LOG(ERROR) << "Fingerprint HAL Adapter service is shutting down."; 60 | return 1; 61 | } 62 | -------------------------------------------------------------------------------- /audio/usbv2_audio_policy_configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 42 | 44 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /rootdir/bin/init.qti.chg_policy.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # 4 | # Copyright (c) 2019-2020 Qualcomm Technologies, Inc. 5 | # All Rights Reserved. 6 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 7 | # 8 | # Copyright (c) 2019 The Linux Foundation. All rights reserved. 9 | # 10 | 11 | export PATH=/vendor/bin 12 | 13 | soc_id=`getprop ro.vendor.qti.soc_id` 14 | if [ "$soc_id" -eq 415 ] || [ "$soc_id" -eq 439 ] || [ "$soc_id" -eq 450 ] || [ "$soc_id" -eq 475 ]; then 15 | setprop persist.vendor.hvdcp_opti.start 2 16 | exit 0 17 | fi 18 | 19 | if [ "$soc_id" -eq 441 ] || [ "$soc_id" -eq 471 ]; then 20 | #Scuba does not support usb-pd or charge pumps 21 | find /sys/class/power_supply/battery/ -type f -maxdepth 1 | xargs chown system.system 22 | find /sys/class/power_supply/bms/ -type f -maxdepth 1 | xargs chown system.system 23 | find /sys/class/power_supply/main/ -type f -maxdepth 1 | xargs chown system.system 24 | find /sys/class/power_supply/usb/ -type f -maxdepth 1 | xargs chown system.system 25 | else 26 | find /sys/class/power_supply/battery/ -type f -maxdepth 1 | xargs chown system.system 27 | find /sys/class/power_supply/bms/ -type f -maxdepth 1 | xargs chown system.system 28 | find /sys/class/power_supply/main/ -type f -maxdepth 1 | xargs chown system.system 29 | find /sys/class/power_supply/usb/ -type f -maxdepth 1 | xargs chown system.system 30 | find /sys/class/power_supply/charge_pump_master/ -type f -maxdepth 1 | xargs chown system.system 31 | find /sys/class/power_supply/pc_port/ -type f -maxdepth 1 | xargs chown system.system 32 | find /sys/class/power_supply/dc/ -type f -maxdepth 1 | xargs chown system.system 33 | find /sys/class/power_supply/parallel/ -type f -maxdepth 1 | xargs chown system.system 34 | find /sys/class/usbpd/usbpd0/ -type f -maxdepth 1 | xargs chown system.system 35 | find /sys/class/qc-vdm/ -type f -maxdepth 1 | xargs chown system.system 36 | find /sys/class/charge_pump/ -type f -maxdepth 1 | xargs chown system.system 37 | find /sys/class/qcom-battery/ -type f -maxdepth 1 | xargs chown system.system 38 | 39 | for i in 0 1 2 3 4 5 6 7 8 9 40 | do 41 | devname=`cat /sys/bus/iio/devices/iio:device$i/name` 42 | if [[ "$devname" == *smb* ]] || [[ "$devname" == *qg* ]] || [[ "$devname" == *div2_cp* ]]; then 43 | find /sys/bus/iio/devices/iio:device$i/ -type f -maxdepth 1 | xargs chown system.system 44 | fi 45 | done 46 | fi 47 | 48 | setprop persist.vendor.hvdcp_opti.start 1 49 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | false 26 | 27 | 41 | 3 42 | 43 | 44 | false 45 | 46 | 47 | -------------------------------------------------------------------------------- /rootdir/etc/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-2018,2020-2021 The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | on init 29 | write /sys/class/backlight/panel0-backlight/brightness 200 30 | setprop sys.usb.configfs 1 31 | 32 | on property:ro.boot.prjname=* 33 | # Asserts for stock ROM flash 34 | setprop ro.separate.soft ${ro.boot.prjname} 35 | 36 | on property:ro.boot.usbcontroller=* 37 | setprop sys.usb.controller ${ro.boot.usbcontroller} 38 | wait /sys/bus/platform/devices/${ro.boot.usb.dwc3_msm:-a600000.ssusb}/mode 39 | write /sys/bus/platform/devices/${ro.boot.usb.dwc3_msm:-a600000.ssusb}/mode peripheral 40 | wait /sys/class/udc/${ro.boot.usbcontroller} 1 41 | 42 | on fs 43 | wait /dev/block/platform/soc/${ro.boot.bootdevice} 44 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 45 | -------------------------------------------------------------------------------- /RealmeParts/res/drawable/ic_proper_seekbar_reset.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 24 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/Touch/util/ActionConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 SlimRoms Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.device.RealmeParts.Touch.util; 18 | 19 | public class ActionConstants { 20 | 21 | // key must fit with the values arrays from Settings to use 22 | // SlimActions.java actions 23 | public static final String ACTION_CAMERA = "**camera**"; 24 | public static final String ACTION_ASSIST = "**assist**"; 25 | public static final String ACTION_VIB = "**ring_vib**"; 26 | public static final String ACTION_SILENT = "**ring_silent**"; 27 | public static final String ACTION_VIB_SILENT = "**ring_vib_silent**"; 28 | public static final String ACTION_TORCH = "**torch**"; 29 | public static final String ACTION_MEDIA_PREVIOUS = "**media_previous**"; 30 | public static final String ACTION_MEDIA_NEXT = "**media_next**"; 31 | public static final String ACTION_MEDIA_PLAY_PAUSE = "**media_play_pause**"; 32 | public static final String ACTION_WAKE_DEVICE = "**wake_device**"; 33 | public static final String ACTION_AMBIENT_DISPLAY = "**ambient**"; 34 | public static final String ACTION_VOLUME_DOWN = "**vol_down**"; 35 | public static final String ACTION_VOLUME_UP = "**vol_up**"; 36 | 37 | // no action 38 | public static final String ACTION_NULL = "**null**"; 39 | 40 | // this shorcut constant is only used to identify if the user 41 | // selected in settings a custom app...after it is choosed intent uri 42 | // is saved in the ButtonConfig object 43 | public static final String ACTION_APP = "**app**"; 44 | 45 | public static final String ICON_EMPTY = "empty"; 46 | public static final String SYSTEM_ICON_IDENTIFIER = "system_shortcut="; 47 | public static final String ACTION_DELIMITER = "|"; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/RealmePartsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The OmniROM Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | package org.device.RealmeParts; 19 | 20 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 21 | import android.app.AlertDialog; 22 | import android.app.Dialog; 23 | import android.app.DialogFragment; 24 | import android.app.Fragment; 25 | import android.content.DialogInterface; 26 | import android.os.Bundle; 27 | import android.view.Menu; 28 | import android.view.MenuInflater; 29 | import android.view.MenuItem; 30 | import androidx.preference.PreferenceFragment; 31 | import androidx.preference.PreferenceManager; 32 | 33 | public class RealmePartsActivity extends CollapsingToolbarBaseActivity { 34 | 35 | private RealmeParts mRealmePartsFragment; 36 | 37 | @Override 38 | protected void onCreate(Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | 41 | getActionBar().setDisplayHomeAsUpEnabled(true); 42 | 43 | Fragment fragment = getFragmentManager().findFragmentById(com.android.settingslib.collapsingtoolbar.R.id.content_frame); 44 | if (fragment == null) { 45 | mRealmePartsFragment = new RealmeParts(); 46 | getFragmentManager().beginTransaction() 47 | .add(com.android.settingslib.collapsingtoolbar.R.id.content_frame, mRealmePartsFragment) 48 | .commit(); 49 | } else { 50 | mRealmePartsFragment = (RealmeParts) fragment; 51 | } 52 | } 53 | 54 | @Override 55 | public boolean onOptionsItemSelected(MenuItem item) { 56 | switch (item.getItemId()) { 57 | case android.R.id.home: 58 | finish(); 59 | return true; 60 | default: 61 | break; 62 | } 63 | return super.onOptionsItemSelected(item); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /doze/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 46 | 47 | 48 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /sepolicy/vendor/genfs_contexts: -------------------------------------------------------------------------------- 1 | # Oppo display 2 | genfscon sysfs /kernel/oppo_display u:object_r:sysfs_oppo_display:s0 3 | genfscon sysfs /devices/pnp0/00:00/rtc u:object_r:sysfs_rtc:s0 4 | genfscon sysfs /devices/platform/GFSH0007:00/rtc u:object_r:sysfs_rtc:s0 5 | 6 | # Touchpanel 7 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0 8 | 9 | # Oppo Project Version 10 | genfscon proc /oppoVersion u:object_r:proc_oppoversion:s0 11 | 12 | # Oppo FP 13 | genfscon proc /fp_id u:object_r:proc_oppo_fp:s0 14 | 15 | # RTC 16 | genfscon sysfs /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qcom,pm660_rtc/rtc/rtc0/hctosys u:object_r:sysfs_rtc:s0 17 | genfscon sysfs /sys/class/rtc/rtc0/hctosys u:object_r:sysfs_rtc:s0 18 | 19 | # Power supply 20 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qcom,qpnp-smb2/power_supply/ac u:object_r:sysfs_batteryinfo:s0 21 | 22 | # Devinfo 23 | genfscon proc /devinfo u:object_r:proc_devinfo:s0 24 | 25 | # FPS info 26 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/measured_fps u:object_r:sysfs_graphics:s0 27 | 28 | # Power Hal 29 | genfscon proc /sys/kernel/sched_autogroup_enabled u:object_r:proc_sched:s0 30 | genfscon proc /sys/kernel/sched_boost u:object_r:proc_sched:s0 31 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/idle_encoder_mask u:object_r:sysfs_graphics:s0 32 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/idle_state u:object_r:sysfs_graphics:s0 33 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/idle_timeout_ms u:object_r:sysfs_graphics:s0 34 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display u:object_r:sysfs_graphics:s0 35 | genfscon sysfs /devices/platform/soc/62400000.qcom,lpass/subsys[0-9]/restart_level u:object_r:sysfs_restart:s0 36 | genfscon sysfs /bus/msm_subsys/devices/subsys[0-9]/restart_level u:object_r:sysfs_restart:s0 37 | 38 | # Realmeparts 39 | genfscon sysfs /kernel/sound_control/headphone_gain u:object_r:sysfs_hgain:s0 40 | genfscon sysfs /kernel/sound_control/mic_gain u:object_r:sysfs_mgain:s0 41 | 42 | # Extcon 43 | genfscon sysfs /devices/platform/vendor/vendor:extcon_usb1/extcon/extcon3/cable.0/ u:object_r:sysfs_extcon:s0 44 | genfscon sysfs /devices/platform/vendor/vendor:extcon_usb1/extcon/extcon3/cable.1/ u:object_r:sysfs_extcon:s0 45 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 22 | 1 23 | 24 | 25 | true 26 | 27 | 28 | true 29 | 30 | 33 | true 34 | 35 | 39 | 40 | true 41 | 42 | 43 | org.codeaurora.ims 44 | 45 | 46 | vendor.qti.imsrcs 47 | 48 | 49 | false 50 | 51 | -------------------------------------------------------------------------------- /init/init_RMX1971.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 LineageOS Project 3 | * 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ 15 | #include 16 | #include 17 | 18 | #include 19 | #include "property_service.h" 20 | #include "vendor_init.h" 21 | 22 | using android::base::GetProperty; 23 | using std::string; 24 | 25 | std::vector ro_props_default_source_order = { 26 | "", 27 | "bootimage.", 28 | "odm.", 29 | "product.", 30 | "system.", 31 | "system_ext.", 32 | "vendor." 33 | }; 34 | 35 | void property_override(char const prop[], char const value[], bool add = true) { 36 | prop_info *pi; 37 | 38 | pi = (prop_info *)__system_property_find(prop); 39 | 40 | if (pi) 41 | __system_property_update(pi, value, strlen(value)); 42 | else if (add) 43 | __system_property_add(prop, strlen(prop), value, strlen(value)); 44 | } 45 | 46 | void load_dalvikvm_properties() { 47 | struct sysinfo sys; 48 | sysinfo(&sys); 49 | if (sys.totalram > 6144ull * 1024 * 1024) { 50 | // from - phone-xhdpi-8192-dalvik-heap.mk 51 | property_override("dalvik.vm.heapstartsize", "16m"); 52 | property_override("dalvik.vm.heapgrowthlimit", "384m"); 53 | property_override("dalvik.vm.heapmaxfree", "8m"); 54 | } 55 | else if (sys.totalram > 4096ull * 1024 * 1024) { 56 | // from - phone-xhdpi-6144-dalvik-heap.mk 57 | property_override("dalvik.vm.heapstartsize", "16m"); 58 | property_override("dalvik.vm.heapgrowthlimit", "384m"); 59 | property_override("dalvik.vm.heapmaxfree", "8m"); 60 | } 61 | else { 62 | // from - phone-xhdpi-4096-dalvik-heap.mk 63 | property_override("dalvik.vm.heapstartsize", "8m"); 64 | property_override("dalvik.vm.heapgrowthlimit", "256m"); 65 | property_override("dalvik.vm.heapmaxfree", "16m"); 66 | property_override("ro.lmk.psi_complete_stall_ms", "600"); 67 | property_override("ro.lmk.psi_partial_stall_ms", "130"); 68 | property_override("ro.lmk.swap_free_low_percentage", "20"); 69 | property_override("ro.lmk.thrashing_limit", "55"); 70 | property_override("ro.lmk.thrashing_limit_decay", "37"); 71 | } 72 | property_override("dalvik.vm.heaptargetutilization", "0.75"); 73 | property_override("dalvik.vm.heapsize", "512m"); 74 | property_override("dalvik.vm.heapminfree", "512k"); 75 | } 76 | 77 | void vendor_load_properties() { 78 | // dalvikvm props 79 | load_dalvikvm_properties(); 80 | } 81 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/OtgToggleService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The OmniROM Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | 19 | package org.device.RealmeParts; 20 | 21 | import android.annotation.TargetApi; 22 | import android.content.Intent; 23 | import android.content.SharedPreferences; 24 | import android.service.quicksettings.Tile; 25 | import android.service.quicksettings.TileService; 26 | import androidx.preference.PreferenceManager; 27 | 28 | import org.device.RealmeParts.RealmeParts; 29 | 30 | @TargetApi(24) 31 | public class OtgToggleService extends TileService { 32 | private boolean enabled = false; 33 | 34 | @Override 35 | public void onDestroy() { 36 | super.onDestroy(); 37 | } 38 | 39 | @Override 40 | public void onTileAdded() { 41 | super.onTileAdded(); 42 | } 43 | 44 | @Override 45 | public void onTileRemoved() { 46 | super.onTileRemoved(); 47 | } 48 | 49 | @Override 50 | public void onStartListening() { 51 | super.onStartListening(); 52 | SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); 53 | enabled = OTGModeSwitch.isCurrentlyEnabled(this); 54 | getQsTile().setState(enabled ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE); 55 | getQsTile().updateTile(); 56 | 57 | } 58 | 59 | @Override 60 | public void onStopListening() { 61 | super.onStopListening(); 62 | } 63 | 64 | @Override 65 | public void onClick() { 66 | super.onClick(); 67 | SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); 68 | enabled = OTGModeSwitch.isCurrentlyEnabled(this); 69 | Utils.writeValue(OTGModeSwitch.getFile(), enabled ? "0" : "1"); 70 | sharedPrefs.edit().putBoolean(RealmeParts.KEY_OTG_SWITCH, enabled ? false : true).commit(); 71 | getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE); 72 | getQsTile().updateTile(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/audio/utils/SecureSettingsStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 AICP 3 | * Copyright (C) 2018 CarbonROM 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.device.RealmeParts.audio.utils; 19 | 20 | import android.content.ContentResolver; 21 | import android.preference.PreferenceDataStore; 22 | import android.provider.Settings; 23 | 24 | public class SecureSettingsStore extends androidx.preference.PreferenceDataStore 25 | implements PreferenceDataStore { 26 | 27 | private final ContentResolver mContentResolver; 28 | 29 | public SecureSettingsStore(ContentResolver contentResolver) { 30 | mContentResolver = contentResolver; 31 | } 32 | 33 | public boolean getBoolean(String key, boolean defValue) { 34 | return getInt(key, defValue ? 1 : 0) != 0; 35 | } 36 | 37 | public float getFloat(String key, float defValue) { 38 | return Settings.Secure.getFloat(mContentResolver, key, defValue); 39 | } 40 | 41 | public int getInt(String key, int defValue) { 42 | return Settings.Secure.getInt(mContentResolver, key, defValue); 43 | } 44 | 45 | public long getLong(String key, long defValue) { 46 | return Settings.Secure.getLong(mContentResolver, key, defValue); 47 | } 48 | 49 | public String getString(String key, String defValue) { 50 | String result = Settings.Secure.getString(mContentResolver, key); 51 | return result == null ? defValue : result; 52 | } 53 | 54 | public void putBoolean(String key, boolean value) { 55 | putInt(key, value ? 1 : 0); 56 | } 57 | 58 | public void putFloat(String key, float value) { 59 | Settings.Secure.putFloat(mContentResolver, key, value); 60 | } 61 | 62 | public void putInt(String key, int value) { 63 | Settings.Secure.putInt(mContentResolver, key, value); 64 | } 65 | 66 | public void putLong(String key, long value) { 67 | Settings.Secure.putLong(mContentResolver, key, value); 68 | } 69 | 70 | public void putString(String key, String value) { 71 | Settings.Secure.putString(mContentResolver, key, value); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /interfaces/vendor/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package vendor.oplus.hardware.biometrics.fingerprint@2.1; 18 | 19 | import IBiometricsFingerprintClientCallback; 20 | 21 | interface IBiometricsFingerprint { 22 | 23 | setNotify(IBiometricsFingerprintClientCallback clientCallback) generates (uint64_t deviceId); 24 | 25 | preEnroll() generates (uint64_t authChallenge); 26 | 27 | enroll(uint8_t[69] hat, uint32_t gid, uint32_t timeoutSec) generates (RequestStatus debugErrno); 28 | 29 | postEnroll() generates (RequestStatus debugErrno); 30 | 31 | getAuthenticatorId() generates (uint64_t AuthenticatorId); 32 | 33 | cancel() generates (RequestStatus debugErrno); 34 | 35 | enumerate() generates (RequestStatus debugErrno); 36 | 37 | remove(uint32_t gid, uint32_t fid) generates (RequestStatus debugErrno); 38 | 39 | setActiveGroup(uint32_t gid, string storePath) generates (RequestStatus debugErrno); 40 | 41 | authenticate(uint64_t operationId, uint32_t gid) generates (RequestStatus debugErrno); 42 | authenticateAsType(uint64_t auth, uint32_t type, FingerprintAuthType AuthType) generates (RequestStatus debugErrno); 43 | cleanUp() generates (RequestStatus debugErrno); 44 | pauseEnroll() generates (RequestStatus debugErrno); 45 | continueEnroll() generates (RequestStatus debugErrno); 46 | setTouchEventListener() generates (RequestStatus debugErrno); 47 | dynamicallyConfigLog(uint32_t log) generates (RequestStatus debugErrno); 48 | pauseIdentify() generates (RequestStatus debugErrno); 49 | continueIdentify() generates (RequestStatus debugErrno); 50 | getAlikeyStatus() generates (RequestStatus debugErrno); 51 | getEnrollmentTotalTimes() generates (RequestStatus debugErrno); 52 | setScreenState(FingerprintScreenState ScreenState); 53 | getEngineeringInfo(uint32_t info) generates (RequestStatus debugErrno); 54 | touchDown() generates (RequestStatus debugErrno); 55 | touchUp() generates (RequestStatus debugErrno); 56 | sendFingerprintCmd(int32_t cmd, vec CmdId) generates (RequestStatus debugErrno); 57 | }; 58 | -------------------------------------------------------------------------------- /rootdir/etc/init.RealmeParts.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | chown system system /proc/touchpanel/game_switch_enable 3 | chown system system /proc/touchpanel/oplus_tp_direction 4 | chown system system /proc/touchpanel/oplus_tp_limit_enable 5 | 6 | chmod 0666 /proc/touchpanel/game_switch_enable 7 | chmod 0666 /proc/touchpanel/oplus_tp_direction 8 | chmod 0666 /proc/touchpanel/oplus_tp_limit_enable 9 | chown system system /sys/kernel/oppo_display/dimlayer_bl_en 10 | chown system system /sys/kernel/oppo_display/hbm 11 | chown system system /sys/kernel/oppo_display/seed 12 | chown system system /sys/class/power_supply/usb/otg_switch 13 | chmod 0666 /sys/kernel/oppo_display/dimlayer_bl_en 14 | chmod 0666 /sys/kernel/oppo_display/hbm 15 | chmod 0666 /sys/kernel/oppo_display/seed 16 | chmod 0666 /sys/class/power_supply/usb/otg_switch 17 | 18 | # KCAL permissions 19 | chown system system /sys/module/msm_drm/parameters/kcal_blue 20 | chown system system /sys/module/msm_drm/parameters/kcal_green 21 | chown system system /sys/module/msm_drm/parameters/kcal_red 22 | chown system system /sys/module/msm_drm/parameters/kcal_cont 23 | chown system system /sys/module/msm_drm/parameters/kcal_hue 24 | chown system system /sys/module/msm_drm/parameters/kcal_sat 25 | chown system system /sys/module/msm_drm/parameters/kcal_val 26 | chmod 0660 /sys/module/msm_drm/parameters/kcal_blue 27 | chmod 0660 /sys/module/msm_drm/parameters/kcal_green 28 | chmod 0660 /sys/module/msm_drm/parameters/kcal_red 29 | chmod 0660 /sys/module/msm_drm/parameters/kcal_cont 30 | chmod 0660 /sys/module/msm_drm/parameters/kcal_hue 31 | chmod 0660 /sys/module/msm_drm/parameters/kcal_sat 32 | chmod 0660 /sys/module/msm_drm/parameters/kcal_val 33 | 34 | # FPS Info permissions 35 | chown system graphics /sys/class/drm/sde-crtc-0/measured_fps 36 | chmod 0666 /sys/class/drm/sde-crtc-0/measured_fps 37 | 38 | on property:sys.boot_completed=1 39 | # Audio gain permissions 40 | chown system system /sys/kernel/sound_control/headphone_gain 41 | chown system system /sys/kernel/sound_control/mic_gain 42 | restorecon_recursive /sys/kernel/sound_control 43 | chmod 0660 /sys/kernel/sound_control/headphone_gain 44 | chmod 0660 /sys/kernel/sound_control/mic_gain 45 | 46 | # Vibrate 47 | chown system system /sys/class/leds/vibrator/vmax_mv_call 48 | chown system system /sys/class/leds/vibrator/vmax_mv_strong 49 | chown system system /sys/class/leds/vibrator/vmax_mv_user 50 | chown system system /sys/class/leds/vibrator/vmax_override 51 | chmod 0660 /sys/class/leds/vibrator/vmax_mv_call 52 | chmod 0660 /sys/class/leds/vibrator/vmax_mv_strong 53 | chmod 0660 /sys/class/leds/vibrator/vmax_mv_user 54 | chmod 0660 /sys/class/leds/vibrator/vmax_override 55 | write /sys/class/leds/vibrator/vmax_override 1 56 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/GameModeTileService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | package org.device.RealmeParts; 19 | 20 | import android.annotation.TargetApi; 21 | import android.content.Intent; 22 | import android.content.SharedPreferences; 23 | import androidx.preference.PreferenceManager; 24 | import android.service.quicksettings.Tile; 25 | import android.service.quicksettings.TileService; 26 | 27 | import org.device.RealmeParts.ModeSwitch.GameModeSwitch; 28 | 29 | @TargetApi(24) 30 | public class GameModeTileService extends TileService { 31 | private boolean enabled = false; 32 | 33 | @Override 34 | public void onDestroy() { 35 | super.onDestroy(); 36 | } 37 | 38 | @Override 39 | public void onTileAdded() { 40 | super.onTileAdded(); 41 | } 42 | 43 | @Override 44 | public void onTileRemoved() { 45 | super.onTileRemoved(); 46 | } 47 | 48 | @Override 49 | public void onStartListening() { 50 | super.onStartListening(); 51 | SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); 52 | enabled = GameModeSwitch.isCurrentlyEnabled(this); 53 | getQsTile().setState(enabled ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE); 54 | getQsTile().updateTile(); 55 | 56 | } 57 | 58 | @Override 59 | public void onStopListening() { 60 | super.onStopListening(); 61 | } 62 | 63 | @Override 64 | public void onClick() { 65 | super.onClick(); 66 | SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); 67 | enabled = GameModeSwitch.isCurrentlyEnabled(this); 68 | Utils.writeValue(GameModeSwitch.getFile(), enabled ? "0" : "1"); 69 | Utils.writeValue(RealmeParts.TP_LIMIT_ENABLE, enabled ? "1" : "0" ); 70 | Utils.writeValue(RealmeParts.TP_DIRECTION, enabled ? "0" : "1" ); 71 | sharedPrefs.edit().putBoolean(RealmeParts.KEY_GAME_SWITCH, enabled ? false : true).commit(); 72 | getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE); 73 | getQsTile().updateTile(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/audio/SoundControlSettings.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 org.device.RealmeParts.audio; 18 | 19 | import android.content.Intent; 20 | import android.os.Bundle; 21 | import android.os.Handler; 22 | import androidx.preference.PreferenceFragment; 23 | import androidx.preference.Preference; 24 | import androidx.preference.PreferenceCategory; 25 | 26 | import org.device.RealmeParts.audio.utils.CustomSeekBarPreference; 27 | 28 | import org.device.RealmeParts.R; 29 | 30 | public class SoundControlSettings extends PreferenceFragment implements 31 | Preference.OnPreferenceChangeListener { 32 | 33 | public static final String PREF_HEADPHONE_GAIN = "headphone_gain"; 34 | public static final String HEADPHONE_GAIN_PATH = "/sys/kernel/sound_control/headphone_gain"; 35 | public static final String PREF_MICROPHONE_GAIN = "microphone_gain"; 36 | public static final String MICROPHONE_GAIN_PATH = "/sys/kernel/sound_control/mic_gain"; 37 | 38 | private CustomSeekBarPreference mHeadphoneGain; 39 | private CustomSeekBarPreference mMicrophoneGain; 40 | 41 | @Override 42 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 43 | setPreferencesFromResource(R.xml.soundcontrol_settings, rootKey); 44 | 45 | mHeadphoneGain = (CustomSeekBarPreference) findPreference(PREF_HEADPHONE_GAIN); 46 | mHeadphoneGain.setOnPreferenceChangeListener(this); 47 | 48 | mMicrophoneGain = (CustomSeekBarPreference) findPreference(PREF_MICROPHONE_GAIN); 49 | mMicrophoneGain.setOnPreferenceChangeListener(this); 50 | } 51 | 52 | @Override 53 | public boolean onPreferenceChange(Preference preference, Object value) { 54 | final String key = preference.getKey(); 55 | switch (key) { 56 | case PREF_HEADPHONE_GAIN: 57 | SoundControlFileUtils.setValue(HEADPHONE_GAIN_PATH, value + " " + value); 58 | break; 59 | 60 | case PREF_MICROPHONE_GAIN: 61 | SoundControlFileUtils.setValue(MICROPHONE_GAIN_PATH, (int) value); 62 | break; 63 | 64 | default: 65 | break; 66 | } 67 | return true; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /interfaces/vendor/hardware/biometrics/fingerprint/2.1/types.hal: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package vendor.oplus.hardware.biometrics.fingerprint@2.1; 18 | 19 | enum RequestStatus : int32_t { 20 | SYS_UNKNOWN = 1, 21 | SYS_OK = 0, 22 | SYS_ENOENT = -2, 23 | SYS_EINTR = -4, 24 | SYS_EIO = -5, 25 | SYS_EAGAIN = -11, 26 | SYS_ENOMEM = -12, 27 | SYS_EACCES = -13, 28 | SYS_EFAULT = -14, 29 | SYS_EBUSY = -16, 30 | SYS_EINVAL = -22, 31 | SYS_ENOSPC = -28, 32 | SYS_ETIMEDOUT = -110, 33 | }; 34 | 35 | enum FingerprintError : int32_t { 36 | ERROR_NO_ERROR = 0, 37 | ERROR_HW_UNAVAILABLE = 1, 38 | ERROR_UNABLE_TO_PROCESS = 2, 39 | ERROR_TIMEOUT = 3, 40 | ERROR_NO_SPACE = 4, 41 | ERROR_CANCELED = 5, 42 | ERROR_UNABLE_TO_REMOVE = 6, 43 | ERROR_LOCKOUT = 7, 44 | ERROR_VENDOR = 8 45 | }; 46 | 47 | enum FingerprintAcquiredInfo : int32_t { 48 | ACQUIRED_GOOD = 0, 49 | ACQUIRED_PARTIAL = 1, 50 | ACQUIRED_INSUFFICIENT = 2, 51 | ACQUIRED_IMAGER_DIRTY = 3, 52 | ACQUIRED_TOO_SLOW = 4, 53 | ACQUIRED_TOO_FAST = 5, 54 | ACQUIRED_VENDOR = 6 55 | }; 56 | 57 | struct FingerprintFingerId { 58 | uint32_t gid; 59 | uint32_t fid; 60 | }; 61 | 62 | struct FingerprintEnroll { 63 | FingerprintFingerId finger; 64 | uint32_t samplesRemaining; uint64_t msg; 65 | }; 66 | 67 | struct FingerprintIterator { 68 | FingerprintFingerId finger; 69 | uint32_t remainingTemplates; 70 | }; 71 | 72 | typedef FingerprintIterator FingerprintEnumerated; 73 | typedef FingerprintIterator FingerprintRemoved; 74 | 75 | struct FingerprintAcquired { 76 | FingerprintAcquiredInfo acquiredInfo; 77 | }; 78 | 79 | struct FingerprintAuthenticated { 80 | FingerprintFingerId finger; 81 | uint8_t[69] hat; 82 | }; 83 | 84 | enum FingerprintMsgType : int32_t { 85 | ERROR = -1, 86 | ACQUIRED = 1, 87 | TEMPLATE_ENROLLING = 3, 88 | TEMPLATE_REMOVED = 4, 89 | AUTHENTICATED = 5, 90 | TEMPLATE_ENUMERATING = 6, 91 | }; 92 | 93 | enum FingerprintScreenState : int32_t { 94 | FINGERPRINT_SCREEN_OFF = 0, 95 | FINGERPRINT_SCREEN_ON = 1, 96 | }; 97 | 98 | enum FingerprintAuthType : int32_t { 99 | TYPE_KEYGUARD = 1, 100 | TYPE_PAY = 2, 101 | TYPE_OTHER = 3, 102 | }; 103 | 104 | -------------------------------------------------------------------------------- /RealmeParts/src/org/device/RealmeParts/audio/SoundControlFileUtils.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 org.device.RealmeParts.audio; 18 | 19 | import java.io.File; 20 | import java.io.FileOutputStream; 21 | import java.io.IOException; 22 | 23 | public final class SoundControlFileUtils { 24 | 25 | public static boolean fileWritable(String filename) { 26 | return fileExists(filename) && new File(filename).canWrite(); 27 | } 28 | 29 | public static boolean fileExists(String filename) { 30 | if (filename == null) { 31 | return false; 32 | } 33 | return new File(filename).exists(); 34 | } 35 | 36 | public static void setValue(String path, int value) { 37 | if (fileWritable(path)) { 38 | if (path == null) { 39 | return; 40 | } 41 | try { 42 | FileOutputStream fos = new FileOutputStream(new File(path)); 43 | fos.write(Integer.toString(value).getBytes()); 44 | fos.flush(); 45 | fos.close(); 46 | } catch (IOException e) { 47 | e.printStackTrace(); 48 | } 49 | } 50 | } 51 | 52 | public static void setValue(String path, double value) { 53 | if (fileWritable(path)) { 54 | if (path == null) { 55 | return; 56 | } 57 | try { 58 | FileOutputStream fos = new FileOutputStream(new File(path)); 59 | fos.write(Long.toString(Math.round(value)).getBytes()); 60 | fos.flush(); 61 | fos.close(); 62 | } catch (IOException e) { 63 | e.printStackTrace(); 64 | } 65 | } 66 | } 67 | 68 | public static void setValue(String path, String value) { 69 | if (fileWritable(path)) { 70 | if (path == null) { 71 | return; 72 | } 73 | try { 74 | FileOutputStream fos = new FileOutputStream(new File(path)); 75 | fos.write(value.getBytes()); 76 | fos.flush(); 77 | fos.close(); 78 | } catch (IOException e) { 79 | e.printStackTrace(); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.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 | # 31 | # Make modem config folder and copy firmware config to that folder for RIL 32 | # 33 | if [ -f /data/vendor/modem_config/ver_info.txt ]; then 34 | prev_version_info=`cat /data/vendor/modem_config/ver_info.txt` 35 | else 36 | prev_version_info="" 37 | fi 38 | 39 | cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt` 40 | if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then 41 | # add W for group recursively before delete 42 | chmod g+w -R /data/vendor/modem_config/* 43 | rm -rf /data/vendor/modem_config/* 44 | # preserve the read only mode for all subdir and files 45 | cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config 46 | cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/ 47 | cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/ 48 | # the group must be root, otherwise this script could not add "W" for group recursively 49 | chown -hR radio.root /data/vendor/modem_config/* 50 | fi 51 | chmod g-w /data/vendor/modem_config 52 | setprop ro.vendor.ril.mbn_copy_completed 1 53 | --------------------------------------------------------------------------------