├── Android.mk ├── AndroidBoard.mk ├── BoardConfigCommon.mk ├── README ├── android_filesystem_config.h ├── audio ├── aanc_tuning_mixer.txt ├── audio_effects.conf ├── audio_output_policy.conf ├── audio_platform_info.xml ├── audio_policy_configuration.xml ├── sound_trigger_mixer_paths.xml ├── sound_trigger_mixer_paths_wcd9306.xml ├── sound_trigger_mixer_paths_wcd9330.xml ├── sound_trigger_mixer_paths_wcd9335.xml └── sound_trigger_platform_info.xml ├── camera ├── Android.mk ├── CleanSpec.mk ├── MODULE_LICENSE_BSD ├── QCamera2 │ ├── Android.mk │ ├── HAL │ │ ├── QCamera2HWI.cpp │ │ ├── QCamera2HWI.h │ │ ├── QCamera2HWICallbacks.cpp │ │ ├── QCameraAllocator.h │ │ ├── QCameraChannel.cpp │ │ ├── QCameraChannel.h │ │ ├── QCameraMem.cpp │ │ ├── QCameraMem.h │ │ ├── QCameraMuxer.cpp │ │ ├── QCameraMuxer.h │ │ ├── QCameraParameters.cpp │ │ ├── QCameraParameters.h │ │ ├── QCameraPostProc.cpp │ │ ├── QCameraPostProc.h │ │ ├── QCameraStateMachine.cpp │ │ ├── QCameraStateMachine.h │ │ ├── QCameraStream.cpp │ │ ├── QCameraStream.h │ │ ├── QCameraThermalAdapter.cpp │ │ ├── QCameraThermalAdapter.h │ │ ├── test │ │ │ ├── Android.mk │ │ │ ├── qcamera_test.cpp │ │ │ └── qcamera_test.h │ │ ├── tsMakeuplib │ │ │ └── include │ │ │ │ ├── ts_detectface_engine.h │ │ │ │ ├── ts_makeup_data.h │ │ │ │ ├── ts_makeup_engine.h │ │ │ │ └── ts_makeup_image.h │ │ └── wrapper │ │ │ ├── QualcommCamera.cpp │ │ │ └── QualcommCamera.h │ ├── HAL3 │ │ ├── QCamera3Channel.cpp │ │ ├── QCamera3Channel.h │ │ ├── QCamera3CropRegionMapper.cpp │ │ ├── QCamera3CropRegionMapper.h │ │ ├── QCamera3HALHeader.h │ │ ├── QCamera3HWI.cpp │ │ ├── QCamera3HWI.h │ │ ├── QCamera3Mem.cpp │ │ ├── QCamera3Mem.h │ │ ├── QCamera3PostProc.cpp │ │ ├── QCamera3PostProc.h │ │ ├── QCamera3Stream.cpp │ │ ├── QCamera3Stream.h │ │ ├── QCamera3VendorTags.cpp │ │ └── QCamera3VendorTags.h │ ├── QCamera2Factory.cpp │ ├── QCamera2Factory.h │ ├── QCamera2Hal.cpp │ ├── QCameraFormat.h │ ├── stack │ │ ├── Android.mk │ │ ├── common │ │ │ ├── cam_intf.h │ │ │ ├── cam_list.h │ │ │ ├── cam_queue.h │ │ │ ├── cam_semaphore.h │ │ │ ├── cam_types.h │ │ │ ├── mm_camera_interface.h │ │ │ └── mm_jpeg_interface.h │ │ ├── mm-camera-interface │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ │ ├── mm_camera.h │ │ │ │ ├── mm_camera_dbg.h │ │ │ │ └── mm_camera_sock.h │ │ │ └── src │ │ │ │ ├── mm_camera.c │ │ │ │ ├── mm_camera_channel.c │ │ │ │ ├── mm_camera_interface.c │ │ │ │ ├── mm_camera_sock.c │ │ │ │ ├── mm_camera_stream.c │ │ │ │ └── mm_camera_thread.c │ │ ├── mm-camera-test │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ │ ├── mm_qcamera_app.h │ │ │ │ ├── mm_qcamera_commands.h │ │ │ │ ├── mm_qcamera_dbg.h │ │ │ │ ├── mm_qcamera_main_menu.h │ │ │ │ └── mm_qcamera_socket.h │ │ │ └── src │ │ │ │ ├── mm_qcamera_app.c │ │ │ │ ├── mm_qcamera_commands.c │ │ │ │ ├── mm_qcamera_dual_test.c │ │ │ │ ├── mm_qcamera_main_menu.c │ │ │ │ ├── mm_qcamera_preview.c │ │ │ │ ├── mm_qcamera_queue.c │ │ │ │ ├── mm_qcamera_rdi.c │ │ │ │ ├── mm_qcamera_reprocess.c │ │ │ │ ├── mm_qcamera_snapshot.c │ │ │ │ ├── mm_qcamera_socket.c │ │ │ │ ├── mm_qcamera_unit_test.c │ │ │ │ └── mm_qcamera_video.c │ │ └── mm-jpeg-interface │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ ├── mm_jpeg.h │ │ │ ├── mm_jpeg_dbg.h │ │ │ ├── mm_jpeg_inlines.h │ │ │ ├── mm_jpeg_ionbuf.h │ │ │ └── mm_jpeg_mpo.h │ │ │ ├── src │ │ │ ├── mm_jpeg.c │ │ │ ├── mm_jpeg_exif.c │ │ │ ├── mm_jpeg_interface.c │ │ │ ├── mm_jpeg_ionbuf.c │ │ │ ├── mm_jpeg_mpo_composer.c │ │ │ ├── mm_jpeg_queue.c │ │ │ ├── mm_jpegdec.c │ │ │ └── mm_jpegdec_interface.c │ │ │ └── test │ │ │ ├── Android.mk │ │ │ ├── mm_jpeg_test.c │ │ │ └── mm_jpegdec_test.c │ └── util │ │ ├── QCameraBufferMaps.cpp │ │ ├── QCameraBufferMaps.h │ │ ├── QCameraCmdThread.cpp │ │ ├── QCameraCmdThread.h │ │ ├── QCameraQueue.cpp │ │ ├── QCameraQueue.h │ │ └── QCameraTrace.h ├── QCameraParameters.h ├── QCamera_Intf.h ├── common.mk ├── mm-image-codec │ ├── Android.mk │ ├── qexif │ │ ├── qexif.h │ │ └── qmpo.h │ └── qomx_core │ │ ├── Android.mk │ │ ├── QOMX_JpegExtensions.h │ │ ├── qomx_core.c │ │ └── qomx_core.h └── usbcamcore │ ├── inc │ ├── QCameraMjpegDecode.h │ ├── QCameraUsbParm.h │ ├── QCameraUsbPriv.h │ └── QualcommUsbCamera.h │ └── src │ ├── QCameraMjpegDecode.cpp │ ├── QCameraUsbParm.cpp │ └── QualcommUsbCamera.cpp ├── cmhw └── org │ └── cyanogenmod │ └── hardware │ └── KeyDisabler.java ├── configs ├── media_codecs.xml ├── media_codecs_performance.xml ├── media_profiles.xml ├── msm_irqbalance_little_big.conf └── sec_config ├── consumerir ├── Android.mk └── consumerir.c ├── data-ipa-cfg-mgr ├── Android.mk ├── Makefile.am ├── configure.ac ├── ipacm │ ├── Android.mk │ ├── inc │ │ ├── IPACM_CmdQueue.h │ │ ├── IPACM_Config.h │ │ ├── IPACM_ConntrackClient.h │ │ ├── IPACM_ConntrackListener.h │ │ ├── IPACM_Conntrack_NATApp.h │ │ ├── IPACM_Defs.h │ │ ├── IPACM_EvtDispatcher.h │ │ ├── IPACM_Filtering.h │ │ ├── IPACM_Header.h │ │ ├── IPACM_Iface.h │ │ ├── IPACM_IfaceManager.h │ │ ├── IPACM_Lan.h │ │ ├── IPACM_LanToLan.h │ │ ├── IPACM_Listener.h │ │ ├── IPACM_Log.h │ │ ├── IPACM_Neighbor.h │ │ ├── IPACM_Netlink.h │ │ ├── IPACM_Routing.h │ │ ├── IPACM_Wan.h │ │ ├── IPACM_Wlan.h │ │ └── IPACM_Xml.h │ └── src │ │ ├── Android.mk │ │ ├── IPACM_CmdQueue.cpp │ │ ├── IPACM_Config.cpp │ │ ├── IPACM_ConntrackClient.cpp │ │ ├── IPACM_ConntrackListener.cpp │ │ ├── IPACM_Conntrack_NATApp.cpp │ │ ├── IPACM_EvtDispatcher.cpp │ │ ├── IPACM_Filtering.cpp │ │ ├── IPACM_Header.cpp │ │ ├── IPACM_Iface.cpp │ │ ├── IPACM_IfaceManager.cpp │ │ ├── IPACM_Lan.cpp │ │ ├── IPACM_LanToLan.cpp │ │ ├── IPACM_Log.cpp │ │ ├── IPACM_Main.cpp │ │ ├── IPACM_Neighbor.cpp │ │ ├── IPACM_Netlink.cpp │ │ ├── IPACM_Routing.cpp │ │ ├── IPACM_Wan.cpp │ │ ├── IPACM_Wlan.cpp │ │ ├── IPACM_Xml.cpp │ │ ├── IPACM_cfg.xml │ │ ├── Makefile.am │ │ ├── mobileap_firewall.xml │ │ └── start_ipacm_le └── ipanat │ ├── Android.mk │ ├── inc │ ├── ipa_nat_drv.h │ ├── ipa_nat_drvi.h │ └── ipa_nat_logi.h │ ├── src │ ├── Android.mk │ ├── Makefile.am │ ├── ipa_nat_drv.c │ ├── ipa_nat_drvi.c │ └── ipa_nat_logi.c │ └── test │ ├── Android.mk │ ├── Makefile.am │ ├── README.txt │ ├── ipa_nat_test.h │ ├── ipa_nat_test000.c │ ├── ipa_nat_test001.c │ ├── ipa_nat_test002.c │ ├── ipa_nat_test003.c │ ├── ipa_nat_test004.c │ ├── ipa_nat_test005.c │ ├── ipa_nat_test006.c │ ├── ipa_nat_test007.c │ ├── ipa_nat_test008.c │ ├── ipa_nat_test009.c │ ├── ipa_nat_test010.c │ ├── ipa_nat_test011.c │ ├── ipa_nat_test012.c │ ├── ipa_nat_test013.c │ ├── ipa_nat_test014.c │ ├── ipa_nat_test015.c │ ├── ipa_nat_test016.c │ ├── ipa_nat_test017.c │ ├── ipa_nat_test018.c │ ├── ipa_nat_test019.c │ ├── ipa_nat_test020.c │ ├── ipa_nat_test021.c │ ├── ipa_nat_test022.c │ └── main.c ├── doze ├── Android.mk ├── AndroidManifest.xml ├── proguard.flags ├── res │ ├── drawable │ │ ├── ic_settings_doze.xml │ │ └── switchbar_background.xml │ ├── layout │ │ ├── doze.xml │ │ └── switch_bar.xml │ ├── values │ │ ├── colors.xml │ │ └── styles.xml │ └── xml │ │ └── doze_settings.xml └── src │ └── com │ └── cyanogenmod │ └── settings │ └── doze │ ├── BootCompletedReceiver.java │ ├── DozeReceiver.java │ ├── DozeService.java │ ├── DozeSettings.java │ ├── DozeSettingsFragment.java │ ├── ProximitySensor.java │ ├── TiltSensor.java │ └── Utils.java ├── extract-files.sh ├── gps ├── Android.mk ├── CleanSpec.mk ├── Makefile.am ├── configure.ac ├── core │ ├── Android.mk │ ├── ContextBase.cpp │ ├── ContextBase.h │ ├── LBSProxyBase.h │ ├── LocAdapterBase.cpp │ ├── LocAdapterBase.h │ ├── LocAdapterProxyBase.h │ ├── LocApiBase.cpp │ ├── LocApiBase.h │ ├── LocDualContext.cpp │ ├── LocDualContext.h │ ├── UlpProxyBase.h │ ├── gps_extended.h │ ├── gps_extended_c.h │ ├── loc_core_log.cpp │ └── loc_core_log.h ├── etc │ ├── Android.mk │ ├── flp.conf │ ├── gps.conf │ ├── izat.conf │ ├── lowi.conf │ ├── sap.conf │ └── xtwifi.conf ├── loc-api.pc.in ├── loc_api │ ├── Android.mk │ ├── libloc_api-rpc-50001 │ │ ├── Android.mk │ │ ├── libloc_api-rpc-glue │ │ │ ├── Android.mk │ │ │ ├── Makefile.am │ │ │ ├── rpc_inc │ │ │ │ ├── LocApiRpc.h │ │ │ │ ├── debug.h │ │ │ │ ├── loc_api_fixup.h │ │ │ │ ├── loc_api_log.h │ │ │ │ ├── loc_api_rpc_glue.h │ │ │ │ ├── loc_api_sync_call.h │ │ │ │ └── loc_apicb_appinit.h │ │ │ └── src │ │ │ │ ├── LocApiRpc.cpp │ │ │ │ ├── loc_api_fixup.c │ │ │ │ ├── loc_api_log.c │ │ │ │ ├── loc_api_rpc_glue.c │ │ │ │ ├── loc_api_sync_call.c │ │ │ │ └── loc_apicb_appinit.c │ │ └── libloc_api-rpc-stub │ │ │ ├── Android.mk │ │ │ ├── Makefile.am │ │ │ ├── inc │ │ │ ├── loc_api_rpcgen_cb_rpc.h │ │ │ ├── loc_api_rpcgen_common_rpc.h │ │ │ ├── loc_api_rpcgen_rpc.h │ │ │ └── loc_apicb_appinit.h │ │ │ ├── src │ │ │ ├── loc_api_rpcgen_cb_svc.c │ │ │ ├── loc_api_rpcgen_cb_xdr.c │ │ │ ├── loc_api_rpcgen_clnt.c │ │ │ ├── loc_api_rpcgen_common_xdr.c │ │ │ ├── loc_api_rpcgen_xdr.c │ │ │ └── loc_apicb_appinit.c │ │ │ └── xdr │ │ │ ├── loc_api.xdr │ │ │ ├── loc_api_cb.xdr │ │ │ └── loc_api_common.xdr │ └── libloc_api_50001 │ │ ├── Android.mk │ │ ├── LocEngAdapter.cpp │ │ ├── LocEngAdapter.h │ │ ├── Makefile.am │ │ ├── gps.c │ │ ├── loc.cpp │ │ ├── loc.h │ │ ├── loc_eng.cpp │ │ ├── loc_eng.h │ │ ├── loc_eng_agps.cpp │ │ ├── loc_eng_agps.h │ │ ├── loc_eng_dmn_conn.cpp │ │ ├── loc_eng_dmn_conn.h │ │ ├── loc_eng_dmn_conn_glue_msg.c │ │ ├── loc_eng_dmn_conn_glue_msg.h │ │ ├── loc_eng_dmn_conn_glue_pipe.c │ │ ├── loc_eng_dmn_conn_glue_pipe.h │ │ ├── loc_eng_dmn_conn_handler.cpp │ │ ├── loc_eng_dmn_conn_handler.h │ │ ├── loc_eng_dmn_conn_thread_helper.c │ │ ├── loc_eng_dmn_conn_thread_helper.h │ │ ├── loc_eng_log.cpp │ │ ├── loc_eng_log.h │ │ ├── loc_eng_msg.h │ │ ├── loc_eng_ni.cpp │ │ ├── loc_eng_ni.h │ │ ├── loc_eng_nmea.cpp │ │ ├── loc_eng_nmea.h │ │ ├── loc_eng_xtra.cpp │ │ └── loc_eng_xtra.h └── utils │ ├── Android.mk │ ├── LocHeap.cpp │ ├── LocHeap.h │ ├── LocSharedLock.h │ ├── LocThread.cpp │ ├── LocThread.h │ ├── LocTimer.cpp │ ├── LocTimer.h │ ├── Makefile.am │ ├── MsgTask.cpp │ ├── MsgTask.h │ ├── linked_list.c │ ├── linked_list.h │ ├── loc_cfg.cpp │ ├── loc_cfg.h │ ├── loc_log.cpp │ ├── loc_log.h │ ├── loc_misc_utils.cpp │ ├── loc_misc_utils.h │ ├── loc_target.cpp │ ├── loc_target.h │ ├── loc_timer.h │ ├── log_util.h │ ├── msg_q.c │ ├── msg_q.h │ └── platform_lib_abstractions │ ├── elapsed_millis_since_boot.cpp │ ├── platform_lib_includes.h │ ├── platform_lib_macros.h │ └── platform_lib_time.h ├── init ├── Android.mk └── init_msm.cpp ├── lineage.dependencies ├── msm8956.mk ├── overlay ├── frameworks │ └── base │ │ ├── core │ │ └── res │ │ │ └── res │ │ │ ├── values-mcc234-mnc15 │ │ │ └── config.xml │ │ │ ├── values-mcc262-mnc02 │ │ │ └── config.xml │ │ │ ├── values-mcc262-mnc04 │ │ │ └── config.xml │ │ │ ├── values-mcc262-mnc09 │ │ │ └── config.xml │ │ │ ├── values-mcc310-mnc004 │ │ │ └── config.xml │ │ │ ├── values-mcc310-mnc120 │ │ │ └── config.xml │ │ │ ├── values-mcc310-mnc260 │ │ │ └── config.xml │ │ │ ├── values-mcc310-mnc410 │ │ │ └── config.xml │ │ │ ├── values-mcc311-mnc480 │ │ │ └── config.xml │ │ │ ├── values-mcc311-mnc490 │ │ │ └── config.xml │ │ │ ├── values-mcc311-mnc870 │ │ │ └── config.xml │ │ │ ├── values-mcc311-mnc940 │ │ │ └── config.xml │ │ │ ├── values-mcc460-mnc03 │ │ │ └── config.xml │ │ │ ├── values-mcc460-mnc11 │ │ │ └── config.xml │ │ │ └── values │ │ │ └── config.xml │ │ └── packages │ │ ├── SettingsLib │ │ └── res │ │ │ └── values │ │ │ └── arrays.xml │ │ └── SystemUI │ │ └── res │ │ └── values │ │ └── config.xml ├── packages │ ├── apps │ │ ├── Bluetooth │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ ├── CarrierConfig │ │ │ └── res │ │ │ │ └── xml │ │ │ │ └── vendor.xml │ │ ├── CellBroadcastReceiver │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ ├── Dialer │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ ├── Phone │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ └── Settings │ │ │ └── res │ │ │ ├── values-mcc222-mnc01 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc840 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc854 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc855 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc856 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc857 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc858 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc859 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc860 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc861 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc862 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc863 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc864 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc865 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc866 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc867 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc868 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc869 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc870 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc871 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc872 │ │ │ └── config.xml │ │ │ ├── values-mcc405-mnc873 │ │ │ └── config.xml │ │ │ └── values-mcc405-mnc874 │ │ │ └── config.xml │ └── services │ │ ├── Telecomm │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── Telephony │ │ └── res │ │ └── values │ │ └── config.xml └── vendor │ └── cmsdk │ └── cm │ └── res │ └── res │ └── values │ └── config.xml ├── proprietary-files.txt ├── rootdir ├── Android.mk └── etc │ ├── fstab.qcom │ ├── init.qcom.bt.sh │ ├── init.qcom.power.rc │ ├── init.qcom.rc │ ├── init.qcom.sh │ ├── init.qcom.usb.rc │ └── ueventd.qcom.rc ├── sepolicy ├── audioserver.te ├── device.te ├── file.te ├── file_contexts ├── fingerprintd.te ├── fsck.te ├── genfs_contexts ├── healthd.te ├── hostapd.te ├── init.te ├── kernel.te ├── location.te ├── mediacodec.te ├── mm-pp-daemon.te ├── netd.te ├── netmgrd.te ├── per_mgr.te ├── platform_app.te ├── priv_app.te ├── qmuxd.te ├── qti_init_shell.te ├── radio.te ├── rfs_access.te ├── rild.te ├── rmt_storage.te ├── sgdisk.te ├── system_server.te ├── untrusted_app.te ├── vold.te └── wcnss_service.te ├── setup-makefiles.sh ├── system.prop └── wifi ├── WCNSS_cfg.dat ├── WCNSS_qcom_cfg.ini ├── WCNSS_wlan_dictionary.dat ├── hostapd.accept ├── hostapd.deny ├── hostapd_default.conf ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf /AndroidBoard.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Shared device tree for Xiaomi msm8956 devices 2 | -------------------------------------------------------------------------------- /android_filesystem_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | # Copyright (c) 2016, The Linux Foundation. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are 6 | # met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above 10 | # copyright notice, this list of conditions and the following 11 | # disclaimer in the documentation and/or other materials provided 12 | # with the distribution. 13 | # * Neither the name of The Linux Foundation nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #define NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS 33 | const struct fs_path_config android_device_files[] = { 34 | // { 00755, AID_UID, AID_GID, (1ULL << CAPABILITY), "PATH_TO_BINARY" }, 35 | { 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/pm-service"}, 36 | { 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/imsdatadaemon" }, 37 | { 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/cnss-daemon"}, 38 | { 00755, AID_SYSTEM, AID_RADIO, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/ims_rtp_daemon" }, 39 | }; 40 | -------------------------------------------------------------------------------- /camera/Android.mk: -------------------------------------------------------------------------------- 1 | MM_V4L2_DRIVER_LIST += msm8960 2 | MM_V4L2_DRIVER_LIST += msm8974 3 | MM_V4L2_DRIVER_LIST += msm8916 4 | MM_V4L2_DRIVER_LIST += msm8226 5 | MM_V4L2_DRIVER_LIST += msm8610 6 | MM_V4L2_DRIVER_LIST += apq8084 7 | MM_V4L2_DRIVER_LIST += mpq8092 8 | MM_V4L2_DRIVER_LIST += msm_bronze 9 | MM_V4L2_DRIVER_LIST += msm8916 10 | MM_V4L2_DRIVER_LIST += msm8994 11 | MM_V4L2_DRIVER_LIST += msm8084 12 | MM_V4L2_DRIVER_LIST += msm8909 13 | MM_V4L2_DRIVER_LIST += msm8952 14 | MM_V4L2_DRIVER_LIST += msm8996 15 | MM_V4L2_DRIVER_LIST += msm8992 16 | 17 | ifneq (,$(filter $(MM_V4L2_DRIVER_LIST),$(TARGET_BOARD_PLATFORM))) 18 | ifneq ($(strip $(USE_CAMERA_STUB)),true) 19 | ifneq ($(BUILD_TINY_ANDROID),true) 20 | include $(call all-subdir-makefiles) 21 | endif 22 | endif 23 | endif 24 | -------------------------------------------------------------------------------- /camera/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | $(call add-clean-step, find $(OUT_DIR) -name "camera.msm8952*" -print0 | xargs -0 rm -rf) 48 | -------------------------------------------------------------------------------- /camera/MODULE_LICENSE_BSD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineageOS/android_device_xiaomi_msm8956-common/0faefd87cf4ee65cf88db239da13371e0be97763/camera/MODULE_LICENSE_BSD -------------------------------------------------------------------------------- /camera/QCamera2/HAL/test/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_SRC_FILES:= \ 6 | qcamera_test.cpp \ 7 | 8 | LOCAL_SHARED_LIBRARIES:= \ 9 | libdl \ 10 | libui \ 11 | libutils \ 12 | libcutils \ 13 | libbinder \ 14 | libmedia \ 15 | libui \ 16 | libgui \ 17 | libcamera_client \ 18 | libskia \ 19 | libstagefright \ 20 | libstagefright_foundation \ 21 | 22 | ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" ))) 23 | 24 | LOCAL_SHARED_LIBRARIES += \ 25 | libmedia_native \ 26 | 27 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 28 | LOCAL_CFLAGS += -DUSE_JB_MR1 29 | 30 | endif 31 | 32 | LOCAL_C_INCLUDES += \ 33 | frameworks/base/include/ui \ 34 | frameworks/base/include/surfaceflinger \ 35 | frameworks/base/include/camera \ 36 | frameworks/base/include/media \ 37 | external/skia/include/core \ 38 | external/skia/include/images \ 39 | $(TARGET_OUT_HEADERS)/qcom/display \ 40 | device/xiaomi/msm8956-common/camera/QCamera2/stack/common \ 41 | frameworks/av/include/media/stagefright \ 42 | frameworks/native/include/media/openmax \ 43 | $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 44 | 45 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 46 | LOCAL_MODULE:= camera_test 47 | LOCAL_MODULE_TAGS:= tests 48 | 49 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 50 | LOCAL_CFLAGS += -O0 51 | LOCAL_CLANG := false 52 | 53 | ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 20 ))" ))) 54 | 55 | LOCAL_CFLAGS += -DUSE_SDK_20_OR_HIGHER 56 | 57 | endif 58 | 59 | ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) <= 22 ))" ))) 60 | LOCAL_CFLAGS += -DUSE_L_MR1 61 | endif 62 | 63 | include $(BUILD_EXECUTABLE) 64 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/tsMakeuplib/include/ts_makeup_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014,2015 Thundersoft Corporation 3 | * All rights Reserved 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 | #ifndef __TS_MAKEUP_DATA_H__ 19 | #define __TS_MAKEUP_DATA_H__ 20 | 21 | #define TS_OK (0x00000000) //Successful 22 | #define TS_ERROR_PARAM (0x00000001) //Parameters error 23 | #define TS_ERROR_IO (0x00000002) //Input or output error 24 | #define TS_ERROR_INTERNAL (0x00000003) //Internal error 25 | #define TS_NO_MEMORY (0x00000004) //No memory error 26 | 27 | 28 | /* 29 | * Data struct : rectangle 30 | */ 31 | typedef struct __tag_tsrect 32 | { 33 | long left; 34 | long top; 35 | long right; 36 | long bottom; 37 | } TSRect; 38 | 39 | /* 40 | * Data struct : point 41 | */ 42 | typedef struct __tag_tsmakeuppoint 43 | { 44 | long x; 45 | long y; 46 | } TSPoint; 47 | 48 | 49 | #endif // __TS_MAKEUP_DATA_H__ 50 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/tsMakeuplib/include/ts_makeup_image.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014,2015 Thundersoft Corporation 3 | * All rights Reserved 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 | #ifndef __TS_MAKEUP_IMGAGE_H__ 19 | #define __TS_MAKEUP_IMGAGE_H__ 20 | 21 | /* 22 | * Data struct : TSMakeupData 23 | */ 24 | typedef struct __tag_tsmakeupdata 25 | { 26 | int frameWidth; //NV21 Frame width.MUST > 0. 27 | int frameHeight; //NV21 Frame height. MUST > 0. 28 | unsigned char *yBuf; //NV21 Y buffer pointer.MUST not null. 29 | unsigned char *uvBuf; //NV21 UV buffer pointer.MUST not null. 30 | }TSMakeupData; 31 | 32 | /* 33 | * Data struct : TSMakeupDataEx 34 | */ 35 | typedef struct __tag_tsmakeupdataEx 36 | { 37 | int frameWidth; //NV21 Frame width.MUST > 0. 38 | int frameHeight; //NV21 Frame height. MUST > 0. 39 | unsigned char *yBuf; //NV21 Y buffer pointer.MUST not null. 40 | unsigned char *uvBuf; //NV21 UV buffer pointer.MUST not null. 41 | int yStride; //NV21 Y buffer stride len 42 | int uvStride; //NV21 uv buffer stride len 43 | }TSMakeupDataEx; 44 | 45 | 46 | #endif // __TS_MAKEUP_IMGAGE_H__ 47 | -------------------------------------------------------------------------------- /camera/QCamera2/QCameraFormat.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2016, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | 31 | /* Macros exposed to gralloc to query camera HAL for gralloc format to be 32 | used for vedor specific camera formats. */ 33 | 34 | #define PREFERRED_IMPLEMENTATION_DEFINED_CAMERA_FORMAT HAL_PIXEL_FORMAT_YCrCb_420_SP 35 | #define PREFERRED_YCBCR_420_888_CAMERA_FORMAT HAL_PIXEL_FORMAT_YCrCb_420_SP 36 | 37 | /* Macros exposed to camera HAL to get the preview and callback stream 38 | formats. Please ensure that if the macros below are changed then the 39 | corresponding change should be done in the above macros and vice versa 40 | to prevent format mismatch between Gralloc and Camera HAL for stream 41 | buffers */ 42 | 43 | #define PREVIEW_STREAM_FORMAT CAM_FORMAT_YUV_420_NV21 44 | #define CALLBACK_STREAM_FORMAT CAM_FORMAT_YUV_420_NV21 45 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(LOCAL_PATH)/mm-camera-interface/Android.mk 3 | include $(LOCAL_PATH)/mm-jpeg-interface/Android.mk 4 | include $(LOCAL_PATH)/mm-jpeg-interface/test/Android.mk 5 | include $(LOCAL_PATH)/mm-camera-test/Android.mk 6 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-camera-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(LOCAL_PATH)/../../../common.mk 5 | include $(CLEAR_VARS) 6 | 7 | MM_CAM_FILES := \ 8 | src/mm_camera_interface.c \ 9 | src/mm_camera.c \ 10 | src/mm_camera_channel.c \ 11 | src/mm_camera_stream.c \ 12 | src/mm_camera_thread.c \ 13 | src/mm_camera_sock.c 14 | 15 | ifeq ($(strip $(TARGET_USES_ION)),true) 16 | LOCAL_CFLAGS += -DUSE_ION 17 | endif 18 | 19 | ifneq (,$(filter msm8974 msm8916 msm8226 msm8610 msm8916 apq8084 msm8084 msm8994 msm8992 msm8952 msm8996,$(TARGET_BOARD_PLATFORM))) 20 | LOCAL_CFLAGS += -DVENUS_PRESENT 21 | endif 22 | 23 | ifneq (,$(filter msm8996,$(TARGET_BOARD_PLATFORM))) 24 | LOCAL_CFLAGS += -DUBWC_PRESENT 25 | endif 26 | 27 | LOCAL_CFLAGS += -D_ANDROID_ 28 | LOCAL_COPY_HEADERS_TO := mm-camera-interface 29 | LOCAL_COPY_HEADERS += ../common/cam_intf.h 30 | LOCAL_COPY_HEADERS += ../common/cam_types.h 31 | 32 | LOCAL_C_INCLUDES := \ 33 | $(LOCAL_PATH)/inc \ 34 | $(LOCAL_PATH)/../common \ 35 | system/media/camera/include 36 | 37 | LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 38 | LOCAL_C_INCLUDES+= $(kernel_includes) 39 | LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 40 | 41 | LOCAL_C_INCLUDES += hardware/qcom/media-caf/msm8952/mm-core/inc 42 | 43 | ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 17 ))" ))) 44 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h 45 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/un.h 46 | endif 47 | 48 | LOCAL_CFLAGS += -Wall -Wextra -Werror 49 | LOCAL_CLANG := false 50 | 51 | LOCAL_SRC_FILES := $(MM_CAM_FILES) 52 | 53 | LOCAL_MODULE := libmmcamera_interface 54 | LOCAL_PRELINK_MODULE := false 55 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libutils 56 | LOCAL_MODULE_TAGS := optional 57 | 58 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 59 | include $(BUILD_SHARED_LIBRARY) 60 | 61 | LOCAL_PATH := $(OLD_LOCAL_PATH) 62 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(LOCAL_PATH)/../../../common.mk 5 | include $(CLEAR_VARS) 6 | 7 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 8 | LOCAL_CFLAGS+= -D_ANDROID_ 9 | 10 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 11 | 12 | LOCAL_C_INCLUDES+= $(kernel_includes) 13 | LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 14 | 15 | LOCAL_C_INCLUDES += \ 16 | frameworks/native/include/media/openmax \ 17 | $(LOCAL_PATH)/inc \ 18 | $(LOCAL_PATH)/../common \ 19 | $(LOCAL_PATH)/../../../ \ 20 | $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 21 | $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 22 | 23 | ifeq ($(strip $(TARGET_USES_ION)),true) 24 | LOCAL_CFLAGS += -DUSE_ION 25 | endif 26 | 27 | ifneq (,$(filter msm8610,$(TARGET_BOARD_PLATFORM))) 28 | LOCAL_CFLAGS+= -DLOAD_ADSP_RPC_LIB 29 | endif 30 | 31 | DUAL_JPEG_TARGET_LIST := msm8974 32 | DUAL_JPEG_TARGET_LIST += msm8994 33 | 34 | ifneq (,$(filter $(DUAL_JPEG_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 35 | LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=2 36 | else 37 | LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=1 38 | endif 39 | 40 | JPEG_PIPELINE_TARGET_LIST := msm8994 41 | JPEG_PIPELINE_TARGET_LIST += msm8992 42 | JPEG_PIPELINE_TARGET_LIST += msm8996 43 | 44 | ifneq (,$(filter $(JPEG_PIPELINE_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 45 | LOCAL_CFLAGS+= -DMM_JPEG_USE_PIPELINE 46 | endif 47 | 48 | LOCAL_SRC_FILES := \ 49 | src/mm_jpeg_queue.c \ 50 | src/mm_jpeg_exif.c \ 51 | src/mm_jpeg.c \ 52 | src/mm_jpeg_interface.c \ 53 | src/mm_jpeg_ionbuf.c \ 54 | src/mm_jpegdec_interface.c \ 55 | src/mm_jpegdec.c \ 56 | src/mm_jpeg_mpo_composer.c 57 | 58 | LOCAL_MODULE := libmmjpeg_interface 59 | LOCAL_PRELINK_MODULE := false 60 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libqomx_core 61 | LOCAL_MODULE_TAGS := optional 62 | 63 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 64 | include $(BUILD_SHARED_LIBRARY) 65 | 66 | LOCAL_PATH := $(OLD_LOCAL_PATH) 67 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_mpo.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef MM_JPEG_MPO_H_ 31 | #define MM_JPEG_MPO_H_ 32 | 33 | #include 34 | #include "mm_jpeg_interface.h" 35 | #include 36 | 37 | #define TRUE 1 38 | #define FALSE 0 39 | 40 | extern int mm_jpeg_mpo_compose(mm_jpeg_mpo_info_t *mpo_info); 41 | 42 | extern int get_mpo_size(mm_jpeg_output_t jpeg_buffer[MM_JPEG_MAX_MPO_IMAGES], 43 | int num_of_images); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/test/Android.mk: -------------------------------------------------------------------------------- 1 | #encoder int test 2 | OLD_LOCAL_PATH := $(LOCAL_PATH) 3 | MM_JPEG_TEST_PATH := $(call my-dir) 4 | 5 | include $(LOCAL_PATH)/../../common.mk 6 | include $(CLEAR_VARS) 7 | LOCAL_PATH := $(MM_JPEG_TEST_PATH) 8 | LOCAL_MODULE_TAGS := optional 9 | 10 | LOCAL_CFLAGS := -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 11 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 12 | LOCAL_CFLAGS += -D_ANDROID_ 13 | 14 | ifeq ($(strip $(TARGET_USES_ION)),true) 15 | LOCAL_CFLAGS += -DUSE_ION 16 | endif 17 | 18 | OMX_HEADER_DIR := frameworks/native/include/media/openmax 19 | OMX_CORE_DIR := device/xiaomi/msm8956-common/camera/mm-image-codec 20 | 21 | LOCAL_C_INCLUDES := $(MM_JPEG_TEST_PATH) 22 | LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../inc 23 | LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../../common 24 | LOCAL_C_INCLUDES += $(OMX_HEADER_DIR) 25 | LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qexif 26 | LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qomx_core 27 | 28 | LOCAL_C_INCLUDES+= $(kernel_includes) 29 | LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 30 | 31 | LOCAL_SRC_FILES := mm_jpeg_test.c 32 | 33 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 34 | LOCAL_MODULE := mm-jpeg-interface-test 35 | LOCAL_PRELINK_MODULE := false 36 | LOCAL_SHARED_LIBRARIES := libcutils libdl libmmjpeg_interface 37 | 38 | include $(BUILD_EXECUTABLE) 39 | 40 | 41 | 42 | #decoder int test 43 | 44 | include $(CLEAR_VARS) 45 | LOCAL_PATH := $(MM_JPEG_TEST_PATH) 46 | LOCAL_MODULE_TAGS := optional 47 | 48 | LOCAL_CFLAGS := -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 49 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 50 | 51 | LOCAL_CFLAGS += -D_ANDROID_ 52 | 53 | ifeq ($(strip $(TARGET_USES_ION)),true) 54 | LOCAL_CFLAGS += -DUSE_ION 55 | endif 56 | 57 | OMX_HEADER_DIR := frameworks/native/include/media/openmax 58 | OMX_CORE_DIR := device/xiaomi/msm8956-common/camera/mm-image-codec 59 | 60 | LOCAL_C_INCLUDES := $(MM_JPEG_TEST_PATH) 61 | LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../inc 62 | LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../../common 63 | LOCAL_C_INCLUDES += $(OMX_HEADER_DIR) 64 | LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qexif 65 | LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qomx_core 66 | 67 | LOCAL_C_INCLUDES+= $(kernel_includes) 68 | LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) 69 | 70 | LOCAL_SRC_FILES := mm_jpegdec_test.c 71 | 72 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 73 | LOCAL_MODULE := mm-jpegdec-interface-test 74 | LOCAL_PRELINK_MODULE := false 75 | LOCAL_SHARED_LIBRARIES := libcutils libdl libmmjpeg_interface 76 | 77 | include $(BUILD_EXECUTABLE) 78 | 79 | LOCAL_PATH := $(OLD_LOCAL_PATH) 80 | -------------------------------------------------------------------------------- /camera/common.mk: -------------------------------------------------------------------------------- 1 | common_deps := 2 | kernel_includes := 3 | 4 | ifeq ($(call is-vendor-board-platform,QCOM),true) 5 | ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 6 | common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 7 | kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 8 | endif 9 | endif 10 | -------------------------------------------------------------------------------- /camera/mm-image-codec/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64)) 2 | include $(call all-subdir-makefiles) 3 | endif 4 | -------------------------------------------------------------------------------- /camera/mm-image-codec/qomx_core/Android.mk: -------------------------------------------------------------------------------- 1 | OMX_CORE_PATH := $(call my-dir) 2 | 3 | # ------------------------------------------------------------------------------ 4 | # Make the shared library (libqomx_core) 5 | # ------------------------------------------------------------------------------ 6 | 7 | include $(CLEAR_VARS) 8 | LOCAL_PATH := $(OMX_CORE_PATH) 9 | LOCAL_MODULE_TAGS := optional 10 | 11 | omx_core_defines:= -Werror \ 12 | -g -O0 13 | 14 | LOCAL_CFLAGS := $(omx_core_defines) 15 | 16 | OMX_HEADER_DIR := frameworks/native/include/media/openmax 17 | 18 | LOCAL_C_INCLUDES := $(OMX_HEADER_DIR) 19 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../qexif 20 | 21 | LOCAL_SRC_FILES := qomx_core.c 22 | 23 | LOCAL_MODULE := libqomx_core 24 | LOCAL_PRELINK_MODULE := false 25 | LOCAL_SHARED_LIBRARIES := libcutils libdl 26 | 27 | LOCAL_32_BIT_ONLY := true 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /camera/usbcamcore/inc/QCameraMjpegDecode.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef __QCAMERA_MJPEG_DECODE_H 30 | #define __QCAMERA_MJPEG_DECODE_H 31 | 32 | typedef int MJPEGD_ERR; 33 | #define MJPEGD_NO_ERROR 0 34 | #define MJPEGD_ERROR -1 35 | #define MJPEGD_INSUFFICIENT_MEM -2 36 | 37 | MJPEGD_ERR mjpegDecoderInit(void**); 38 | 39 | MJPEGD_ERR mjpegDecoderDestroy(void* mjpegd); 40 | 41 | MJPEGD_ERR mjpegDecode( 42 | void* mjpegd, 43 | char* mjpegBuffer, 44 | int mjpegBufferSize, 45 | char* outputYptr, 46 | char* outputUVptr, 47 | int outputFormat); 48 | 49 | #endif /* __QCAMERA_MJPEG_DECODE_H */ 50 | -------------------------------------------------------------------------------- /cmhw/org/cyanogenmod/hardware/KeyDisabler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.cyanogenmod.hardware; 18 | 19 | import org.cyanogenmod.internal.util.FileUtils; 20 | 21 | /* 22 | * Disable capacitive keys 23 | * 24 | * This is intended for use on devices in which the capacitive keys 25 | * can be fully disabled for replacement with a soft navbar. You 26 | * really should not be using this on a device with mechanical or 27 | * otherwise visible-when-inactive keys 28 | */ 29 | 30 | public class KeyDisabler { 31 | 32 | private static String CONTROL_PATH = "/proc/touchpanel/capacitive_keys_enable"; 33 | 34 | public static boolean isSupported() { 35 | return FileUtils.isFileWritable(CONTROL_PATH); 36 | } 37 | 38 | public static boolean isActive() { 39 | return FileUtils.readOneLine(CONTROL_PATH).equals("0"); 40 | } 41 | 42 | public static boolean setActive(boolean state) { 43 | return FileUtils.writeLine(CONTROL_PATH, (state ? "0" : "1")); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /configs/msm_irqbalance_little_big.conf: -------------------------------------------------------------------------------- 1 | PRIO=1,1,1,1,0,0,0,0 2 | IGNORED_IRQ=20,39 3 | -------------------------------------------------------------------------------- /consumerir/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | include $(CLEAR_VARS) 18 | 19 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 20 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 21 | 22 | LOCAL_MODULE := consumerir.$(TARGET_BOARD_PLATFORM) 23 | LOCAL_MODULE_RELATIVE_PATH := hw 24 | LOCAL_SRC_FILES := consumerir.c 25 | LOCAL_SHARED_LIBRARIES := liblog libcutils 26 | LOCAL_MODULE_TAGS := optional 27 | 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | AUTOMAKE_OPTIONS = foreign 3 | SUBDIRS = ipanat/src ipacm/src/ 4 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.65]) 5 | AC_INIT(data-ipa, 1.0.0) 6 | AM_INIT_AUTOMAKE(data-ipa, 1.0.0) 7 | AC_OUTPUT(Makefile ipanat/src/Makefile ipacm/src/Makefile) 8 | AC_CONFIG_SRCDIR([ipanat/src/ipa_nat_drv.c]) 9 | AC_CONFIG_HEADERS([config.h]) 10 | AC_CONFIG_MACRO_DIR([m4]) 11 | 12 | # Checks for programs. 13 | AC_PROG_CC 14 | AC_PROG_LIBTOOL 15 | AC_PROG_CXX 16 | 17 | PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) 18 | AC_SUBST([LIBXML_CFLAGS]) 19 | AC_SUBST([LIBXML_LIBS]) 20 | 21 | # Checks for libraries. 22 | 23 | AC_ARG_WITH(sanitized-headers, 24 | AS_HELP_STRING([--with-sanitized-headers=DIR], 25 | [Specify the location of the sanitized Linux headers]), 26 | [CPPFLAGS="$CPPFLAGS -idirafter $withval"]) 27 | 28 | AC_ARG_WITH([glib], 29 | AC_HELP_STRING([--with-glib], 30 | [enable glib, building HLOS systems which use glib])) 31 | 32 | if (test "x${with_glib}" = "xyes"); then 33 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 34 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 35 | AC_MSG_ERROR(GThread >= 2.16 is required)) 36 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 37 | AC_MSG_ERROR(GLib >= 2.16 is required)) 38 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 39 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 40 | AC_SUBST(GLIB_CFLAGS) 41 | AC_SUBST(GLIB_LIBS) 42 | fi 43 | 44 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 45 | 46 | # Checks for header files. 47 | AC_CHECK_HEADERS([fcntl.h netinet/in.h sys/ioctl.h unistd.h]) 48 | 49 | # Checks for typedefs, structures, and compiler characteristics. 50 | AC_TYPE_OFF_T 51 | 52 | # Checks for library functions. 53 | AC_FUNC_MALLOC 54 | AC_FUNC_MMAP 55 | AC_CHECK_FUNCS([memset munmap]) 56 | 57 | AC_OUTPUT 58 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/inc/IPACM_EvtDispatcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /*! 31 | @file 32 | IPACM_EvtDispatcher.h 33 | 34 | @brief 35 | This file implements the IPAM event dispatcher definitions 36 | 37 | @Author 38 | 39 | */ 40 | #ifndef IPACM_EvtDispatcher_H 41 | #define IPACM_EvtDispatcher_H 42 | 43 | #include 44 | #include 45 | #include "IPACM_Defs.h" 46 | #include "IPACM_Listener.h" 47 | 48 | /* queue */ 49 | typedef struct _cmd_evts 50 | { 51 | ipa_cm_event_id event; 52 | IPACM_Listener *obj; 53 | //int ipa_interface_index; 54 | _cmd_evts *next; 55 | } cmd_evts; 56 | 57 | 58 | 59 | class IPACM_EvtDispatcher 60 | { 61 | public: 62 | 63 | /* api for all iface instances to register events */ 64 | static int registr(ipa_cm_event_id event, IPACM_Listener *obj); 65 | 66 | /* api for all iface instances to de-register events */ 67 | static int deregistr(IPACM_Listener *obj); 68 | 69 | static int PostEvt(ipacm_cmd_q_data *); 70 | static void ProcessEvt(ipacm_cmd_q_data *); 71 | 72 | private: 73 | static cmd_evts *head; 74 | }; 75 | 76 | #endif /* IPACM_EvtDispatcher_H */ 77 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/inc/IPACM_Header.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /* 31 | * IPACM_Header.h 32 | * 33 | * Created on: Jun 20, 2012 34 | * Author: tatias 35 | */ 36 | 37 | ////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef IPACM_HEADER_H 40 | #define IPACM_HEADER_H 41 | 42 | #include 43 | #include "linux/msm_ipa.h" 44 | 45 | ////////////////////////////////////////////////////////////////////////////////// 46 | 47 | class IPACM_Header 48 | { 49 | private: 50 | int m_fd; 51 | public: 52 | bool AddHeader(struct ipa_ioc_add_hdr *pHeaderTable); 53 | bool DeleteHeader(struct ipa_ioc_del_hdr *pHeaderTable); 54 | bool GetHeaderHandle(struct ipa_ioc_get_hdr *pHeaderStruct); 55 | bool CopyHeader(struct ipa_ioc_copy_hdr *pCopyHeaderStruct); 56 | bool Commit(); 57 | bool Reset(); 58 | bool DeleteHeaderHdl(uint32_t hdr_hdl); 59 | bool AddHeaderProcCtx(struct ipa_ioc_add_hdr_proc_ctx* pHeader); 60 | bool DeleteHeaderProcCtx(uint32_t hdl); 61 | 62 | IPACM_Header(); 63 | ~IPACM_Header(); 64 | bool DeviceNodeIsOpened(); 65 | }; 66 | 67 | 68 | #endif 69 | 70 | 71 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/inc/IPACM_Listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /*! 30 | @file 31 | IPACM_Listener.h 32 | 33 | @brief 34 | This file implements the abstract class notifier. 35 | 36 | @Author 37 | Skylar Chang 38 | 39 | */ 40 | #ifndef IPACM_LISTENER_H 41 | #define IPACM_LISTENER_H 42 | 43 | #include "IPACM_Defs.h" 44 | #include "IPACM_CmdQueue.h" 45 | 46 | /* abstract class notifier */ 47 | class IPACM_Listener 48 | { 49 | public: 50 | virtual void event_callback(ipa_cm_event_id event, void *data) = 0; 51 | virtual ~IPACM_Listener(void) {}; 52 | }; 53 | 54 | #endif /* IPACM_LISTENER_H */ 55 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/src/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I./../inc \ 2 | -I$(top_srcdir)/ipanat/inc \ 3 | ${LIBXML_CFLAGS} 4 | AM_CPPFLAGS += -Wall -Wundef -Wno-trigraphs 5 | AM_CPPFLAGS += -DDEBUG -g -DFEATURE_ETH_BRIDGE_LE 6 | AM_CPPFLAGS += -DFEATURE_IPA_V3 7 | 8 | ipacm_SOURCES = IPACM_Main.cpp \ 9 | IPACM_Conntrack_NATApp.cpp\ 10 | IPACM_ConntrackClient.cpp \ 11 | IPACM_ConntrackListener.cpp \ 12 | IPACM_EvtDispatcher.cpp \ 13 | IPACM_Config.cpp \ 14 | IPACM_CmdQueue.cpp \ 15 | IPACM_Log.cpp \ 16 | IPACM_Filtering.cpp \ 17 | IPACM_Routing.cpp \ 18 | IPACM_Header.cpp \ 19 | IPACM_Lan.cpp \ 20 | IPACM_Iface.cpp \ 21 | IPACM_Wlan.cpp \ 22 | IPACM_Wan.cpp \ 23 | IPACM_IfaceManager.cpp \ 24 | IPACM_Neighbor.cpp \ 25 | IPACM_Netlink.cpp \ 26 | IPACM_Xml.cpp \ 27 | IPACM_LanToLan.cpp 28 | 29 | bin_PROGRAMS = ipacm 30 | 31 | requiredlibs = ${LIBXML_LIB} -lxml2 -lpthread -lnetfilter_conntrack -lnfnetlink\ 32 | ../../ipanat/src/libipanat.la 33 | 34 | AM_CPPFLAGS += "-std=c++0x" 35 | 36 | if USE_GLIB 37 | ipacm_CFLAGS = $(AM_CFLAGS) -DUSE_GLIB @GLIB_CFLAGS@ 38 | ipacm_LDFLAGS = -lpthread @GLIB_LIBS@ 39 | ipacm_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 40 | else 41 | ipacm_CFLAGS = $(AM_CFLAGS) 42 | ipacm_LDFLAGS = -lpthread 43 | ipacm_CPPFLAGS = $(AM_CPPFLAGS) 44 | endif 45 | ipacm_LDADD = $(requiredlibs) 46 | 47 | LOCAL_MODULE := libipanat 48 | LOCAL_PRELINK_MODULE := false 49 | include $(BUILD_SHARED_LIBRARY) 50 | 51 | etcdir = ${sysconfdir} 52 | etc_SCRIPTS = IPACM_cfg.xml 53 | 54 | init_ddir = ${sysconfdir}/init.d 55 | init_d_SCRIPTS = start_ipacm_le 56 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/src/mobileap_firewall.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 0 6 | 7 | 8 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/src/start_ipacm_le: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | ################################ 4 | # Copyright (c) 2013, The Linux Foundation. All rights reserved. 5 | 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above 12 | # copyright notice, this list of conditions and the following 13 | # disclaimer in the documentation and/or other materials provided 14 | # with the distribution. 15 | # * Neither the name of The Linux Foundation nor the names of its 16 | # contributors may be used to endorse or promote products derived 17 | # from this software without specific prior written permission. 18 | 19 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 20 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 22 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 23 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 26 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 28 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 29 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | ################################ 31 | 32 | # ipacm init.d script to start the data-ipa Software's ipacm daemon 33 | 34 | set -e 35 | 36 | case "$1" in 37 | start) 38 | echo -n "Starting ipacm: " 39 | start-stop-daemon -S -b -a ipacm 40 | echo "done" 41 | ;; 42 | stop) 43 | echo -n "Stopping ipacm: " 44 | start-stop-daemon -K -n ipacm 45 | echo "done" 46 | ;; 47 | restart) 48 | $0 stop 49 | $0 start 50 | ;; 51 | *) 52 | echo "Usage ipacm { start | stop | restart}" >&2 53 | exit 1 54 | ;; 55 | esac 56 | 57 | exit 0 58 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/inc/ipa_nat_logi.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /*! 30 | @file 31 | ipa_nat_logi.h 32 | 33 | @brief 34 | This file implements the IPAM log functionality. 35 | 36 | @Author 37 | 38 | 39 | */ 40 | 41 | #ifndef IPA_NAT_LOGI_H 42 | #define IPA_NAT_LOGI_H 43 | 44 | #ifdef __cplusplus 45 | extern "C" 46 | { 47 | #endif 48 | 49 | #include 50 | #include 51 | #include 52 | 53 | #define PERROR(fmt) printf("%s:%d %s()", __FILE__, __LINE__, __FUNCTION__);\ 54 | perror(fmt); 55 | 56 | #define IPAERR(fmt, ...) printf("ERR: %s:%d %s() " fmt, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); 57 | 58 | #ifdef DEBUG 59 | #define IPADBG(fmt, ...) printf("%s:%d %s() " fmt, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); 60 | 61 | #define IPADUMP(fmt, ...) printf(fmt, ##__VA_ARGS__); 62 | 63 | #else 64 | #define IPADBG(fmt, ...) 65 | #define IPADUMP(fmt, ...) 66 | #endif 67 | 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif /* IPA_NAT_LOGI_H */ 74 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/src/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc 6 | LOCAL_C_INCLUDES += $(LOCAL_PATH) 7 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 8 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 9 | 10 | LOCAL_SRC_FILES := ipa_nat_drv.c \ 11 | ipa_nat_drvi.c 12 | 13 | LOCAL_CFLAGS := -DDEBUG 14 | LOCAL_MODULE := libipanat 15 | LOCAL_MODULE_TAGS := optional 16 | LOCAL_PRELINK_MODULE := false 17 | LOCAL_CLANG := true 18 | include $(BUILD_SHARED_LIBRARY) 19 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/src/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 2 | AM_CFLAGS += -I./../inc 3 | #AM_CFLAGS += -DDEBUG -g 4 | 5 | common_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ 6 | common_LDFLAGS = -lrt @GLIB_LIBS@ 7 | 8 | c_sources = ipa_nat_drv.c \ 9 | ipa_nat_drvi.c \ 10 | ipa_nat_logi.c 11 | 12 | library_includedir = $(pkgincludedir) 13 | library_include_HEADERS = ./../inc/ipa_nat_drvi.h \ 14 | ./../inc/ipa_nat_drv.h \ 15 | ./../inc/ipa_nat_logi.h 16 | 17 | lib_LTLIBRARIES = libipanat.la 18 | libipanat_la_C = @C@ 19 | libipanat_la_SOURCES = $(c_sources) 20 | libipanat_la_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS) 21 | libipanat_la_LDFLAGS = -shared $(common_LDFLAGS) -version-info 1:0:0 22 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/src/ipa_nat_logi.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /*! 30 | @file 31 | IPACM_log.cpp 32 | 33 | @brief 34 | This file implements the IPAM log functionality. 35 | 36 | @Author 37 | Skylar Chang 38 | 39 | */ 40 | #include "ipa_nat_logi.h" 41 | #include 42 | #include 43 | 44 | void log_nat_message(char *msg) 45 | { 46 | return; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/test/Android.mk: -------------------------------------------------------------------------------- 1 | BOARD_PLATFORM_LIST := msm8916 2 | BOARD_PLATFORM_LIST += msm8909 3 | ifneq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true) 4 | ifneq (,$(filter $(QCOM_BOARD_PLATFORMS),$(TARGET_BOARD_PLATFORM))) 5 | ifneq (, $(filter aarch64 arm arm64, $(TARGET_ARCH))) 6 | 7 | LOCAL_PATH := $(call my-dir) 8 | 9 | include $(CLEAR_VARS) 10 | 11 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/ 12 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ipanat/inc 13 | 14 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 15 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 16 | 17 | LOCAL_MODULE := ipa_nat_test 18 | LOCAL_SRC_FILES := ipa_nat_test000.c \ 19 | ipa_nat_test001.c \ 20 | ipa_nat_test002.c \ 21 | ipa_nat_test003.c \ 22 | ipa_nat_test004.c \ 23 | ipa_nat_test005.c \ 24 | ipa_nat_test006.c \ 25 | ipa_nat_test007.c \ 26 | ipa_nat_test008.c \ 27 | ipa_nat_test009.c \ 28 | ipa_nat_test010.c \ 29 | ipa_nat_test011.c \ 30 | ipa_nat_test012.c \ 31 | ipa_nat_test013.c \ 32 | ipa_nat_test014.c \ 33 | ipa_nat_test015.c \ 34 | ipa_nat_test016.c \ 35 | ipa_nat_test017.c \ 36 | ipa_nat_test018.c \ 37 | ipa_nat_test019.c \ 38 | ipa_nat_test020.c \ 39 | ipa_nat_test021.c \ 40 | ipa_nat_test022.c \ 41 | main.c 42 | 43 | 44 | LOCAL_SHARED_LIBRARIES := libipanat 45 | 46 | LOCAL_MODULE_TAGS := debug 47 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/kernel-tests/ip_accelerator 48 | 49 | include $(BUILD_EXECUTABLE) 50 | 51 | endif # $(TARGET_ARCH) 52 | endif 53 | endif -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/test/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I./../inc \ 2 | -I$(top_srcdir)/ipanat/inc 3 | 4 | AM_CPPFLAGS += -Wall -Wundef -Wno-trigraphs 5 | AM_CPPFLAGS += -g 6 | 7 | ipanattest_SOURCES = ipa_nat_test000.c \ 8 | ipa_nat_test001.c \ 9 | ipa_nat_test002.c \ 10 | ipa_nat_test003.c \ 11 | ipa_nat_test004.c \ 12 | ipa_nat_test005.c \ 13 | ipa_nat_test006.c \ 14 | ipa_nat_test007.c \ 15 | ipa_nat_test008.c \ 16 | ipa_nat_test009.c \ 17 | ipa_nat_test010.c \ 18 | ipa_nat_test011.c \ 19 | ipa_nat_test012.c \ 20 | ipa_nat_test013.c \ 21 | ipa_nat_test014.c \ 22 | ipa_nat_test015.c \ 23 | ipa_nat_test016.c \ 24 | ipa_nat_test017.c \ 25 | ipa_nat_test018.c \ 26 | ipa_nat_test019.c \ 27 | ipa_nat_test020.c \ 28 | ipa_nat_test021.c \ 29 | ipa_nat_test022.c \ 30 | main.c 31 | 32 | 33 | bin_PROGRAMS = ipanattest 34 | 35 | requiredlibs = ../src/libipanat.la 36 | 37 | ipanattest_LDADD = $(requiredlibs) 38 | 39 | LOCAL_MODULE := libipanat 40 | LOCAL_PRELINK_MODULE := false 41 | include $(BUILD_SHARED_LIBRARY) 42 | 43 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/test/README.txt: -------------------------------------------------------------------------------- 1 | 1 To run this suite separately(each test case creates table and delete table) use below command 2 | - To execute test suite nt times with n entries, command "ipanatest sep nt n" 3 | 4 | Example: To execute test suite 1 time with 100 entries, command "ipanattest sep 100" 5 | 6 | 7 | 2. To run test suite not separately(creates table and delete table only once) use below command 8 | - To execute test suite nt times with n entries, command "ipanatest reg nt n" 9 | 10 | Example: To execute test suite 5 times with 32 entries, command "ipanattest reg 5 32" 11 | 12 | 13 | 3. To run inotify regression test use command, "ipanattest inotify nt" 14 | 15 | Example: To execute inotify 5 times, command "ipanattest inotify 5" 16 | 17 | 18 | 4. if we just give command "ipanattest", runs test suite 1 time with 100 entries (non separate) 19 | -------------------------------------------------------------------------------- /doze/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := optional 5 | 6 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 7 | 8 | LOCAL_PACKAGE_NAME := XiaomiDoze 9 | LOCAL_CERTIFICATE := platform 10 | LOCAL_PRIVILEGED_MODULE := true 11 | LOCAL_STATIC_JAVA_LIBRARIES := \ 12 | android-support-v4 \ 13 | android-support-v13 \ 14 | android-support-v7-recyclerview \ 15 | android-support-v7-preference \ 16 | android-support-v7-appcompat \ 17 | android-support-v14-preference \ 18 | org.cyanogenmod.platform.internal 19 | 20 | LOCAL_RESOURCE_DIR := \ 21 | $(LOCAL_PATH)/res \ 22 | $(LOCAL_PATH)/../../../../packages/resources/devicesettings/res \ 23 | frameworks/support/v7/preference/res \ 24 | frameworks/support/v14/preference/res \ 25 | frameworks/support/v7/appcompat/res \ 26 | frameworks/support/v7/recyclerview/res 27 | 28 | LOCAL_AAPT_FLAGS := --auto-add-overlay \ 29 | --extra-packages android.support.v7.preference:android.support.v14.preference:android.support.v17.preference:android.support.v7.appcompat:android.support.v7.recyclerview 30 | 31 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 32 | 33 | include frameworks/base/packages/SettingsLib/common.mk 34 | 35 | include $(BUILD_PACKAGE) 36 | 37 | include $(call all-makefiles-under,$(LOCAL_PATH)) 38 | -------------------------------------------------------------------------------- /doze/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 36 | 37 | 38 | 39 | 40 | 43 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /doze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keepclasseswithmembers class * { 2 | public (android.content.Context, android.util.AttributeSet); 3 | } 4 | 5 | -keep class ** extends android.support.v14.preference.PreferenceFragment 6 | -keep class com.cyanogenmod.settings.doze.* { 7 | *; 8 | } 9 | -------------------------------------------------------------------------------- /doze/res/drawable/switchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /doze/res/layout/doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /doze/res/layout/switch_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 26 | 27 | 39 | 40 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /doze/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | #ff37474f 21 | #ff7fcac3 22 | #ff37474F 23 | 24 | -------------------------------------------------------------------------------- /doze/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 25 | 26 | 29 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /doze/res/xml/doze_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | 23 | 28 | 29 | 30 | 31 | 34 | 35 | 40 | 41 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/doze/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.cyanogenmod.settings.doze; 18 | 19 | import android.content.BroadcastReceiver; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | import android.util.Log; 23 | 24 | public class BootCompletedReceiver extends BroadcastReceiver { 25 | 26 | private static final boolean DEBUG = false; 27 | private static final String TAG = "XiaomiDoze"; 28 | 29 | @Override 30 | public void onReceive(final Context context, Intent intent) { 31 | if (Utils.isDozeEnabled(context) && Utils.sensorsEnabled(context)) { 32 | if (DEBUG) Log.d(TAG, "Starting service"); 33 | Utils.startService(context); 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/doze/DozeReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.cyanogenmod.settings.doze; 17 | 18 | import android.content.Context; 19 | import android.content.Intent; 20 | import android.util.Log; 21 | 22 | import cyanogenmod.preference.RemotePreferenceUpdater; 23 | 24 | public class DozeReceiver extends RemotePreferenceUpdater { 25 | 26 | private static final boolean DEBUG = false; 27 | private static final String TAG = "XiaomiDoze"; 28 | 29 | private static final String DOZE_CATEGORY_KEY = "doze_device_settings"; 30 | 31 | @Override 32 | public void onReceive(Context context, Intent intent) { 33 | super.onReceive(context, intent); 34 | 35 | if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { 36 | if (Utils.isDozeEnabled(context) && Utils.sensorsEnabled(context)) { 37 | if (DEBUG) Log.d(TAG, "Starting service"); 38 | Utils.startService(context); 39 | } 40 | } 41 | } 42 | 43 | @Override 44 | public String getSummary(Context context, String key) { 45 | if (DOZE_CATEGORY_KEY.equals(key)) { 46 | return DozeSettingsFragment.getDozeSummary(context); 47 | } 48 | return null; 49 | } 50 | 51 | static void notifyChanged(Context context) { 52 | notifyChanged(context, DOZE_CATEGORY_KEY); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/doze/DozeSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.cyanogenmod.settings.doze; 17 | 18 | import android.app.Activity; 19 | import android.os.Bundle; 20 | import android.view.MenuItem; 21 | 22 | import com.android.settingslib.drawer.SettingsDrawerActivity; 23 | 24 | /** 25 | * Created by shade on 10/14/16. 26 | */ 27 | 28 | public class DozeSettings extends SettingsDrawerActivity { 29 | 30 | private static final String TAG_DOZE = "doze"; 31 | 32 | @Override 33 | protected void onCreate(Bundle savedInstanceState) { 34 | super.onCreate(savedInstanceState); 35 | 36 | setContentView(R.layout.doze); 37 | 38 | getFragmentManager().beginTransaction().replace(R.id.content_frame, 39 | new DozeSettingsFragment(), TAG_DOZE).commit(); 40 | } 41 | 42 | @Override 43 | public boolean onOptionsItemSelected(MenuItem item) { 44 | if (item.getItemId() == android.R.id.home) { 45 | onBackPressed(); 46 | return true; 47 | } 48 | return false; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /extract-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | set -e 20 | 21 | # Load extract_utils and do some sanity checks 22 | MY_DIR="${BASH_SOURCE%/*}" 23 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 24 | 25 | CM_ROOT="$MY_DIR"/../../.. 26 | 27 | HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh 28 | if [ ! -f "$HELPER" ]; then 29 | echo "Unable to find helper script at $HELPER" 30 | exit 1 31 | fi 32 | . "$HELPER" 33 | 34 | # Default to sanitizing the vendor folder before extraction 35 | CLEAN_VENDOR=true 36 | 37 | while [ "$1" != "" ]; do 38 | case $1 in 39 | -n | --no-cleanup ) CLEAN_VENDOR=false 40 | ;; 41 | -s | --section ) shift 42 | SECTION=$1 43 | CLEAN_VENDOR=false 44 | ;; 45 | * ) SRC=$1 46 | ;; 47 | esac 48 | shift 49 | done 50 | 51 | if [ -z "$SRC" ]; then 52 | SRC=adb 53 | fi 54 | 55 | # Initialize the helper for common device 56 | setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true "$CLEAN_VENDOR" 57 | 58 | extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION" 59 | 60 | if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then 61 | # Reinitialize the helper for device 62 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" false "$CLEAN_VENDOR" 63 | 64 | extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" "$SECTION" 65 | fi 66 | 67 | "$MY_DIR"/setup-makefiles.sh 68 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH := $(call my-dir) 18 | 19 | include $(call all-subdir-makefiles,$(LOCAL_PATH)) 20 | -------------------------------------------------------------------------------- /gps/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | # ************************************************ 48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 49 | # ************************************************ 50 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libloc_api*) 51 | -------------------------------------------------------------------------------- /gps/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Automake script for gps loc_api 2 | # 3 | 4 | ACLOCAL_AMFLAGS = -I m4 5 | 6 | SUBDIRS = utils loc_api/libloc_api_50001 loc_api/loc_api_v02 7 | 8 | pkgconfigdir = $(libdir)/pkgconfig 9 | pkgconfig_DATA = loc-api.pc 10 | EXTRA_DIST = $(pkgconfig_DATA) 11 | -------------------------------------------------------------------------------- /gps/core/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BUILD_TINY_ANDROID),true) 2 | 3 | LOCAL_PATH := $(call my-dir) 4 | 5 | include $(CLEAR_VARS) 6 | 7 | LOCAL_MODULE := libloc_core 8 | LOCAL_MODULE_OWNER := qcom 9 | 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | ifeq ($(TARGET_DEVICE),apq8026_lw) 13 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 14 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) 15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 16 | endif 17 | 18 | LOCAL_SHARED_LIBRARIES := \ 19 | libutils \ 20 | libcutils \ 21 | libgps.utils \ 22 | libdl 23 | 24 | LOCAL_SRC_FILES += \ 25 | LocApiBase.cpp \ 26 | LocAdapterBase.cpp \ 27 | ContextBase.cpp \ 28 | LocDualContext.cpp \ 29 | loc_core_log.cpp 30 | 31 | LOCAL_CFLAGS += \ 32 | -fno-short-enums \ 33 | -D_ANDROID_ 34 | 35 | LOCAL_C_INCLUDES:= \ 36 | $(TARGET_OUT_HEADERS)/gps.utils \ 37 | $(TARGET_OUT_HEADERS)/libflp 38 | 39 | LOCAL_COPY_HEADERS_TO:= libloc_core/ 40 | LOCAL_COPY_HEADERS:= \ 41 | LocApiBase.h \ 42 | LocAdapterBase.h \ 43 | ContextBase.h \ 44 | LocDualContext.h \ 45 | LBSProxyBase.h \ 46 | UlpProxyBase.h \ 47 | gps_extended_c.h \ 48 | gps_extended.h \ 49 | loc_core_log.h \ 50 | LocAdapterProxyBase.h 51 | 52 | LOCAL_PRELINK_MODULE := false 53 | 54 | include $(BUILD_SHARED_LIBRARY) 55 | 56 | endif # not BUILD_TINY_ANDROID 57 | -------------------------------------------------------------------------------- /gps/etc/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH:= $(call my-dir) 18 | 19 | include $(CLEAR_VARS) 20 | LOCAL_MODULE := flp.conf 21 | LOCAL_MODULE_TAGS := optional 22 | LOCAL_MODULE_CLASS := ETC 23 | LOCAL_SRC_FILES := flp.conf 24 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) 25 | include $(BUILD_PREBUILT) 26 | 27 | include $(CLEAR_VARS) 28 | LOCAL_MODULE := gps.conf 29 | LOCAL_MODULE_TAGS := optional 30 | LOCAL_MODULE_CLASS := ETC 31 | LOCAL_SRC_FILES := gps.conf 32 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) 33 | include $(BUILD_PREBUILT) 34 | 35 | include $(CLEAR_VARS) 36 | LOCAL_MODULE := izat.conf 37 | LOCAL_MODULE_TAGS := optional 38 | LOCAL_MODULE_CLASS := ETC 39 | LOCAL_SRC_FILES := izat.conf 40 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) 41 | include $(BUILD_PREBUILT) 42 | 43 | include $(CLEAR_VARS) 44 | LOCAL_MODULE := lowi.conf 45 | LOCAL_MODULE_TAGS := optional 46 | LOCAL_MODULE_CLASS := ETC 47 | LOCAL_SRC_FILES := lowi.conf 48 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) 49 | include $(BUILD_PREBUILT) 50 | 51 | include $(CLEAR_VARS) 52 | LOCAL_MODULE := sap.conf 53 | LOCAL_MODULE_TAGS := optional 54 | LOCAL_MODULE_CLASS := ETC 55 | LOCAL_SRC_FILES := sap.conf 56 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) 57 | include $(BUILD_PREBUILT) 58 | 59 | include $(CLEAR_VARS) 60 | LOCAL_MODULE := xtwifi.conf 61 | LOCAL_MODULE_TAGS := optional 62 | LOCAL_MODULE_CLASS := ETC 63 | LOCAL_SRC_FILES := xtwifi.conf 64 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) 65 | include $(BUILD_PREBUILT) 66 | -------------------------------------------------------------------------------- /gps/etc/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCHING 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 BATCHING SESSION TIMEOUT 19 | ################################### 20 | # Duration with which batch session timeout 21 | # happens in milliseconds. If not specified 22 | # or set to zero, batching session timeout 23 | # defaults to 20 seconds by the modem. 24 | # BATCH_SESSION_TIMEOUT=20000 25 | 26 | ################################### 27 | # FLP CAPABILITIES BIT MASK 28 | ################################### 29 | # GEOFENCE = 0x01 30 | # BATCHING = 0x02 31 | # default = GEOFENCE | BATCHING 32 | CAPABILITIES=0x03 33 | 34 | ################################### 35 | # FLP BATCHING ACCURACY 36 | ################################### 37 | # Set to one of the defined values below 38 | # to define the accuracy of batching. 39 | # If not specified, accuracy defaults 40 | # to LOW. 41 | # FLP BATCHING ACCURACY values: 42 | # Low accuracy = 0 43 | # Medium accuracy = 1 44 | # High accuracy = 2 45 | ACCURACY=1 46 | 47 | ################################### 48 | # FLP GEOFENCE RESPONSIVENESS 49 | ################################### 50 | # If set to one of the defined values below, 51 | # it will override the responsiveness for 52 | # FLP geofence, which implements the fused 53 | # location API. If not set to a value defined 54 | # below, which is default, it will not 55 | # override the responsivness. 56 | # FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE Values: 57 | # 1: LOW responsiveness 58 | # 2: MEDIUM responsiveness 59 | # 3: HIGH responsiveness 60 | FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE = 0 61 | -------------------------------------------------------------------------------- /gps/etc/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2012-2013 Qualcomm Atheros, Inc. 9 | # All Rights Reserved. 10 | # Qualcomm Atheros Confidential and Proprietary. 11 | # 12 | # Export of this technology or software is regulated by the U.S. Government. 13 | # Diversion contrary to U.S. law prohibited. 14 | #=============================================================================*/ 15 | 16 | # X86 ONLY - UBUNTU: 17 | # Copy this file in the same directory where the executable is 18 | 19 | # The RSSI threshold used in the RTT outlier detection in half decibels. Default value recommended by the 20 | # system team currently is -140 (corresponding to -70 dB). 21 | LOWI_RSSI_THRESHOLD_FOR_RTT = -140 22 | 23 | # Number of measurment per AP for RTS/CTS 24 | LOWI_RTS_CTS_NUM_MEAS = 5 25 | 26 | # Maximum Number of Outstanding Requests supported 27 | LOWI_MAX_OUTSTANDING_REQUEST = 255 28 | 29 | # Maximum number of records in Cache 30 | LOWI_MAX_NUM_CACHE_RECORDS = 200 31 | 32 | # Default threshold before issuing another fresh scan (ms) 33 | LOWI_FRESH_SCAN_THRESHOLD = 500 34 | 35 | # Timeout in case no result is reported by the driver (seconds) 36 | LOWI_NO_RESULT_WAIT_TOLERANCE = 10 37 | 38 | # Use Fake Wifi driver. Only valid for engineering builds 39 | LOWI_USE_FAKE_WIFI_DRIVER = 0 40 | 41 | # Use ROME Wifi driver. Only valid for engineering builds 42 | # Will be removed later only for development support 43 | LOWI_USE_ROME_WIFI_DRIVER = 0 44 | 45 | # Use LOWI LP. 46 | # When enabled the Discovery Request will be routed to LOWI-LP 47 | LOWI_USE_LOWI_LP = 1 48 | 49 | # Log level 50 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 51 | LOWI_LOG_LEVEL = 2 52 | -------------------------------------------------------------------------------- /gps/etc/sap.conf: -------------------------------------------------------------------------------- 1 | ################################ 2 | # Sensor Settings 3 | ################################ 4 | #The following parameters are optional. 5 | #Internal defaults support MEMS sensors 6 | #native to most handset devices. 7 | #Device specific sensor characterization 8 | #for improved performance is possible as 9 | #described in SAP application notes. 10 | #GYRO_BIAS_RANDOM_WALK= 11 | #ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= 12 | #ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= 13 | #RATE_RANDOM_WALK_SPECTRAL_DENSITY= 14 | #VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= 15 | 16 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) 17 | # used in loc_eng_reinit 18 | SENSOR_ACCEL_BATCHES_PER_SEC=2 19 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5 20 | SENSOR_GYRO_BATCHES_PER_SEC=2 21 | SENSOR_GYRO_SAMPLES_PER_BATCH=5 22 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) 23 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 24 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 25 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 26 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 27 | 28 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON) 29 | # used in loc_eng_reinit 30 | SENSOR_CONTROL_MODE=1 31 | 32 | # Enable or Disable Sensors for GPS use (0=Enable, 1=Disable) 33 | # used in loc_eng_reinit 34 | SENSOR_USAGE=0 35 | 36 | # Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK) 37 | SENSOR_PROVIDER=1 38 | 39 | # Bit mask used to define which sensor algorithms are used. 40 | # Setting each bit has the following definition: 41 | # 0x1 - DISABLE_INS_POSITIONING_FILTER 42 | # 0x0 - ENABLE_INS_POSITIONING_FILTER 43 | SENSOR_ALGORITHM_CONFIG_MASK=0x0 44 | 45 | # Time source used by Sensor HAL 46 | # Setting this value controls accuracy of location sensor services. 47 | # 0 - Unknown 48 | # 1 - CLOCK_BOOTTIME 49 | # 2 - CLOCK_MONOTONIC 50 | # 3 - CLOCK_REALTIME 51 | # 4 - CLOCK_BOOTTIME using Alarm timer interface 52 | NDK_PROVIDER_TIME_SOURCE=1 53 | -------------------------------------------------------------------------------- /gps/loc-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-api 7 | Description: Qualcomm GPS Location API 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lgps_utils_so -lloc_adapter_so -lloc_eng_so -lgps_default_so -lloc_api 10 | Cflags: -I${includedir}/loc-api/libloc_api_50001 -I${includedir}/loc-api/utils -I${includedir}/ -I${includedir}/loc-api 11 | -------------------------------------------------------------------------------- /gps/loc_api/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # add RPC dirs if RPC is available 4 | ifneq ($(TARGET_NO_RPC),true) 5 | 6 | GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api-rpc-50001/ 7 | 8 | endif #TARGET_NO_RPC 9 | 10 | GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api_50001/ 11 | 12 | #call the subfolders 13 | include $(addsuffix Android.mk, $(GPS_DIR_LIST)) 14 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION),50001) 2 | include $(call all-subdir-makefiles) 3 | endif 4 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | RPC_INC:=rpc_inc 5 | 6 | source_files:= \ 7 | src/loc_api_rpc_glue.c \ 8 | src/loc_api_sync_call.c \ 9 | src/loc_apicb_appinit.c \ 10 | src/loc_api_fixup.c \ 11 | src/loc_api_log.c \ 12 | src/LocApiRpc.cpp 13 | 14 | LOCAL_SRC_FILES:= $(source_files) 15 | 16 | LOCAL_CFLAGS:=-fno-short-enums 17 | LOCAL_CFLAGS+=-DDEBUG -DUSE_QCOM_AUTO_RPC -DUSE_QCOM_AUTO_RPC 18 | LOCAL_CFLAGS+=$(GPS_FEATURES) 19 | 20 | # for loc_api_fixup.c 21 | LOCAL_CFLAGS+=-DADD_XDR_FLOAT -DADD_XDR_BOOL 22 | 23 | LOCAL_SHARED_LIBRARIES:= \ 24 | librpc \ 25 | libutils \ 26 | libcutils \ 27 | libcommondefs \ 28 | libgps.utils \ 29 | libloc_core 30 | 31 | LOCAL_STATIC_LIBRARIES := \ 32 | libloc_api_rpcgen 33 | 34 | LOCAL_PRELINK_MODULE:= false 35 | 36 | LOCAL_C_INCLUDES:= \ 37 | $(LOCAL_PATH) \ 38 | $(LOCAL_PATH)/rpc_inc \ 39 | $(TARGET_OUT_HEADERS)/gps.utils \ 40 | $(TARGET_OUT_HEADERS)/libloc_core \ 41 | $(TARGET_OUT_HEADERS)/loc_api/rpcgen/inc \ 42 | $(TARGET_OUT_HEADERS)/libcommondefs/rpcgen/inc \ 43 | $(TARGET_OUT_HEADERS)/librpc \ 44 | $(TARGET_OUT_HEADERS)/libloc-rpc/rpc_inc \ 45 | $(TOP)/hardware/msm7k/librpc 46 | 47 | LOCAL_COPY_HEADERS_TO:= libloc_api-rpc-qc/$(RPC_INC) 48 | LOCAL_COPY_HEADERS:= \ 49 | $(RPC_INC)/loc_api_rpc_glue.h \ 50 | $(RPC_INC)/loc_api_fixup.h \ 51 | $(RPC_INC)/loc_api_sync_call.h \ 52 | $(RPC_INC)/loc_apicb_appinit.h \ 53 | $(RPC_INC)/LocApiRpc.h 54 | 55 | LOCAL_MODULE:= libloc_api-rpc-qc 56 | LOCAL_MODULE_OWNER := qcom 57 | 58 | LOCAL_MODULE_TAGS := optional 59 | 60 | include $(BUILD_SHARED_LIBRARY) 61 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | -I../../../utils \ 3 | -I../../../platform_lib_abstractions \ 4 | -I./rpc_inc \ 5 | -I../libloc_api-rpc-stub/inc \ 6 | -I../../libloc_api_50001 \ 7 | $(MSM7K_CFLAGS) \ 8 | -DUSE_QCOM_AUTO_RPC 9 | 10 | requiredlibs = \ 11 | ../../../utils/libgps_utils_so.la \ 12 | $(MSM7K_LIBS) 13 | 14 | h_sources = \ 15 | rpc_inc/loc_api_rpc_glue.h \ 16 | rpc_inc/loc_api_fixup.h \ 17 | rpc_inc/loc_api_sync_call.h \ 18 | rpc_inc/loc_apicb_appinit.h \ 19 | 20 | c_sources = \ 21 | src/loc_api_rpc_glue.c \ 22 | src/loc_api_sync_call.c \ 23 | src/loc_apicb_appinit.c \ 24 | src/loc_api_fixup.c \ 25 | src/loc_api_log.c \ 26 | src/LocApiRpcAdapter.cpp \ 27 | 28 | 29 | library_includedir = $(pkgincludedir)/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc 30 | library_include_HEADERS = $(h_sources) 31 | libloc_api_rpc_qc_la_SOURCES = $(c_sources) $(h_sources) 32 | 33 | if USE_GLIB 34 | libloc_api_rpc_qc_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 35 | libloc_api_rpc_qc_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 36 | libloc_api_rpc_qc_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 37 | else 38 | libloc_api_rpc_qc_la_CFLAGS = $(AM_CFLAGS) 39 | libloc_api_rpc_qc_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 40 | libloc_api_rpc_qc_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 41 | endif 42 | 43 | libloc_api_rpc_qc_la_LIBADD = $(requiredlibs) -lstdc++ 44 | 45 | #Create and Install Libraries 46 | lib_LTLIBRARIES = libloc_api_rpc_qc.la 47 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_apicb_appinit.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef LOC_APICB_APPINIT_H 30 | #define LOC_APICB_APPINIT_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" 34 | { 35 | #endif 36 | 37 | /* Initialization function for callbacks */ 38 | extern int loc_apicb_app_init(); 39 | extern void loc_apicb_app_deinit(); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif /* LOC_APICB_APPINIT_H */ 46 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_fixup.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | 31 | #include "loc_api_fixup.h" 32 | 33 | #ifdef ADD_XDR_FLOAT 34 | 35 | int 36 | xdr_float(xdrp, fp) 37 | XDR *xdrp; 38 | float *fp; 39 | { 40 | return xdr_long(xdrp, (long*)fp); 41 | } 42 | 43 | int 44 | xdr_double(xdrp, dp) 45 | XDR *xdrp; 46 | double *dp; 47 | { 48 | return xdr_long(xdrp, (long*)dp + 1) 49 | && xdr_long(xdrp, (long*)dp); 50 | } 51 | 52 | #endif /* ADD_XDR_FLOAT */ 53 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | # functions 6 | LOC_RPCGEN_APIS_PATH := $(TARGET_OUT_INTERMEDIATES)/loc_api/libloc_api_rpcgen_intermediates 7 | LOC_RPCGEN_APIS_PATH_FL := ../../../../../$(TARGET_OUT_INTERMEDIATES)/loc_api/libloc_api_rpcgen_intermediates 8 | 9 | LOCAL_MODULE := libloc_api_rpcgen 10 | LOCAL_MODULE_OWNER := qcom 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | librpc \ 14 | libcommondefs 15 | 16 | LOCAL_SRC_FILES += \ 17 | src/loc_api_rpcgen_cb_xdr.c \ 18 | src/loc_api_rpcgen_common_xdr.c \ 19 | src/loc_api_rpcgen_cb_svc.c \ 20 | src/loc_api_rpcgen_clnt.c \ 21 | src/loc_api_rpcgen_xdr.c 22 | 23 | LOCAL_C_INCLUDES += hardware/msm7k/librpc 24 | LOCAL_C_INCLUDES += $(LOC_RPCGEN_APIS_PATH)/../../SHARED_LIBRARIES/libcommondefs_intermediates/inc 25 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/inc 26 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libcommondefs/rpcgen/inc 27 | 28 | LOCAL_COPY_HEADERS_TO := loc_api/rpcgen/inc 29 | LOCAL_COPY_HEADERS := inc/loc_api_rpcgen_rpc.h 30 | LOCAL_COPY_HEADERS += inc/loc_api_rpcgen_common_rpc.h 31 | LOCAL_COPY_HEADERS += inc/loc_api_rpcgen_cb_rpc.h 32 | LOCAL_COPY_HEADERS += inc/loc_apicb_appinit.h 33 | 34 | LOCAL_LDLIBS += -lpthread 35 | LOCAL_PRELINK_MODULE := false 36 | include $(BUILD_STATIC_LIBRARY) 37 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | -I../../../utils \ 3 | -I./inc \ 4 | $(MSM7K_CFLAGS) 5 | 6 | requiredlibs = \ 7 | ../../../utils/libgps_utils_so.la \ 8 | $(MSM7K_LIBS) 9 | 10 | h_sources = \ 11 | inc/loc_api_rpcgen_rpc.h \ 12 | inc/loc_api_rpcgen_common_rpc.h \ 13 | inc/loc_api_rpcgen_cb_rpc.h \ 14 | inc/loc_apicb_appinit.h 15 | 16 | c_sources = \ 17 | src/loc_api_rpcgen_cb_xdr.c \ 18 | src/loc_api_rpcgen_common_xdr.c \ 19 | src/loc_api_rpcgen_cb_svc.c \ 20 | src/loc_api_rpcgen_clnt.c \ 21 | src/loc_api_rpcgen_xdr.c 22 | 23 | 24 | 25 | library_includedir = $(pkgincludedir)/libloc_api-rpc-50001/libloc_api-rpc-stub/inc 26 | library_include_HEADERS = $(h_sources) 27 | libloc_api_rpcgen_la_SOURCES = $(c_sources) $(h_sources) 28 | 29 | if USE_GLIB 30 | libloc_api_rpcgen_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 31 | libloc_api_rpcgen_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 32 | libloc_api_rpcgen_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 33 | else 34 | libloc_api_rpcgen_la_CFLAGS = $(AM_CFLAGS) 35 | libloc_api_rpcgen_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 36 | libloc_api_rpcgen_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 37 | endif 38 | 39 | libloc_api_rpcgen_la_LIBADD = $(requiredlibs) -lstdc++ 40 | 41 | #Create and Install Libraries 42 | lib_LTLIBRARIES = libloc_api_rpcgen.la 43 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_apicb_appinit.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | /* Initialization function for callbacks */ 31 | int loc_apicb_app_init(); 32 | 33 | void loc_apicb_app_deinit(); 34 | 35 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef LOC_ENG_DMN_CONN_GLUE_MSG_H 30 | #define LOC_ENG_DMN_CONN_GLUE_MSG_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | 37 | #include 38 | #include "loc_eng_dmn_conn_glue_pipe.h" 39 | 40 | int loc_eng_dmn_conn_glue_msgget(const char * q_path, int mode); 41 | int loc_eng_dmn_conn_glue_msgremove(const char * q_path, int msgqid); 42 | int loc_eng_dmn_conn_glue_msgsnd(int msgqid, const void * msgp, size_t msgsz); 43 | int loc_eng_dmn_conn_glue_msgrcv(int msgqid, void *msgp, size_t msgsz); 44 | int loc_eng_dmn_conn_glue_msgflush(int msgqid); 45 | int loc_eng_dmn_conn_glue_msgunblock(int msgqid); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif /* __cplusplus */ 50 | 51 | #endif /* LOC_ENG_DMN_CONN_GLUE_MSG_H */ 52 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef LOC_ENG_DMN_CONN_GLUE_PIPE_H 30 | #define LOC_ENG_DMN_CONN_GLUE_PIPE_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | #include 37 | 38 | int loc_eng_dmn_conn_glue_pipeget(const char * pipe_name, int mode); 39 | int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd); 40 | int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz); 41 | int loc_eng_dmn_conn_glue_piperead(int fd, void * buf, size_t sz); 42 | 43 | int loc_eng_dmn_conn_glue_pipeflush(int fd); 44 | int loc_eng_dmn_conn_glue_pipeunblock(int fd); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif /* __cplusplus */ 49 | 50 | #endif /* LOC_ENG_DMN_CONN_GLUE_PIPE_H */ 51 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_log.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-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 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #define LOG_NDDEBUG 0 31 | #define LOG_TAG "LocSvc_eng" 32 | 33 | #include "loc_log.h" 34 | #include "loc_eng_log.h" 35 | 36 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-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 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_ENG_LOG_H 31 | #define LOC_ENG_LOG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" 35 | { 36 | #endif 37 | 38 | #include 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* LOC_ENG_LOG_H */ 45 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_nmea.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_ENG_NMEA_H 31 | #define LOC_ENG_NMEA_H 32 | 33 | #include 34 | #include 35 | 36 | #define NMEA_SENTENCE_MAX_LENGTH 200 37 | 38 | void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p); 39 | int loc_eng_nmea_put_checksum(char *pNmea, int maxSize); 40 | void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GnssSvStatus &svStatus, const GpsLocationExtended &locationExtended); 41 | void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, const UlpLocation &location, const GpsLocationExtended &locationExtended, unsigned char generate_nmea); 42 | 43 | #endif // LOC_ENG_NMEA_H 44 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_xtra.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009,2011 The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_ENG_XTRA_H 31 | #define LOC_ENG_XTRA_H 32 | 33 | #include 34 | 35 | // Module data 36 | typedef struct 37 | { 38 | // loc_eng_ioctl_cb_data_s_type ioctl_cb_data; 39 | gps_xtra_download_request download_request_cb; 40 | report_xtra_server report_xtra_server_cb; 41 | 42 | // XTRA data buffer 43 | char *xtra_data_for_injection; // NULL if no pending data 44 | int xtra_data_len; 45 | } loc_eng_xtra_data_s_type; 46 | 47 | #endif // LOC_ENG_XTRA_H 48 | -------------------------------------------------------------------------------- /gps/utils/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BUILD_TINY_ANDROID),true) 2 | #Compile this library only for builds with the latest modem image 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | ## Libs 9 | LOCAL_SHARED_LIBRARIES := \ 10 | libutils \ 11 | libcutils \ 12 | liblog 13 | 14 | LOCAL_SRC_FILES += \ 15 | loc_log.cpp \ 16 | loc_cfg.cpp \ 17 | msg_q.c \ 18 | linked_list.c \ 19 | loc_target.cpp \ 20 | platform_lib_abstractions/elapsed_millis_since_boot.cpp \ 21 | LocHeap.cpp \ 22 | LocTimer.cpp \ 23 | LocThread.cpp \ 24 | MsgTask.cpp \ 25 | loc_misc_utils.cpp 26 | 27 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 28 | LOCAL_CFLAGS += \ 29 | -fno-short-enums \ 30 | -D_ANDROID_ 31 | 32 | ifeq ($(TARGET_BUILD_VARIANT),user) 33 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 34 | endif 35 | 36 | LOCAL_LDFLAGS += -Wl,--export-dynamic 37 | 38 | ## Includes 39 | LOCAL_C_INCLUDES:= \ 40 | $(LOCAL_PATH)/platform_lib_abstractions 41 | 42 | LOCAL_COPY_HEADERS_TO:= gps.utils/ 43 | LOCAL_COPY_HEADERS:= \ 44 | loc_log.h \ 45 | loc_cfg.h \ 46 | log_util.h \ 47 | linked_list.h \ 48 | msg_q.h \ 49 | MsgTask.h \ 50 | LocHeap.h \ 51 | LocThread.h \ 52 | LocTimer.h \ 53 | loc_target.h \ 54 | loc_timer.h \ 55 | LocSharedLock.h \ 56 | platform_lib_abstractions/platform_lib_includes.h \ 57 | platform_lib_abstractions/platform_lib_time.h \ 58 | platform_lib_abstractions/platform_lib_macros.h \ 59 | loc_misc_utils.h 60 | 61 | LOCAL_MODULE := libgps.utils 62 | 63 | LOCAL_MODULE_TAGS := optional 64 | 65 | LOCAL_PRELINK_MODULE := false 66 | 67 | include $(BUILD_SHARED_LIBRARY) 68 | endif # not BUILD_TINY_ANDROID 69 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wundef \ 2 | -MD \ 3 | -Wno-trigraphs \ 4 | -g -O0 \ 5 | -fno-inline \ 6 | -fno-short-enums \ 7 | -fpic \ 8 | -I../platform_lib_abstractions 9 | 10 | libgps_utils_so_la_h_sources = log_util.h \ 11 | msg_q.h \ 12 | linked_list.h \ 13 | loc_cfg.h \ 14 | loc_log.h \ 15 | ../platform_lib_abstractions/platform_lib_includes.h \ 16 | ../platform_lib_abstractions/platform_lib_time.h \ 17 | ../platform_lib_abstractions/platform_lib_macros.h 18 | 19 | libgps_utils_so_la_c_sources = linked_list.c \ 20 | msg_q.c \ 21 | loc_cfg.cpp \ 22 | loc_log.cpp \ 23 | ../platform_lib_abstractions/elapsed_millis_since_boot.cpp 24 | 25 | library_includedir = $(pkgincludedir)/utils 26 | 27 | library_include_HEADERS = $(libgps_utils_so_la_h_sources) 28 | 29 | libgps_utils_so_la_SOURCES = $(libgps_utils_so_la_c_sources) 30 | 31 | if USE_GLIB 32 | libgps_utils_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 33 | libgps_utils_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 34 | libgps_utils_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 35 | else 36 | libgps_utils_so_la_CFLAGS = $(AM_CFLAGS) 37 | libgps_utils_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 38 | libgps_utils_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 39 | endif 40 | 41 | libgps_utils_so_la_LIBADD = -lstdc++ -lcutils 42 | 43 | #Create and Install libraries 44 | lib_LTLIBRARIES = libgps_utils_so.la 45 | -------------------------------------------------------------------------------- /gps/utils/platform_lib_abstractions/elapsed_millis_since_boot.cpp: -------------------------------------------------------------------------------- 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 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | #include 31 | #include "platform_lib_time.h" 32 | 33 | int64_t systemTime(int clock) 34 | { 35 | struct timeval t; 36 | t.tv_sec = t.tv_usec = 0; 37 | gettimeofday(&t, NULL); 38 | return t.tv_sec*1000000LL + t.tv_usec; 39 | } 40 | 41 | 42 | int64_t elapsedMillisSinceBoot() 43 | { 44 | int64_t t_us = systemTime(0); 45 | return (int64_t) t_us / 1000LL; 46 | } 47 | -------------------------------------------------------------------------------- /gps/utils/platform_lib_abstractions/platform_lib_includes.h: -------------------------------------------------------------------------------- 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 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef _PLATFORM_LIB_INCLUDES_H_ 30 | #define _PLATFORM_LIB_INCLUDES_H_ 31 | 32 | #include "platform_lib_time.h" 33 | #include "platform_lib_macros.h" 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /gps/utils/platform_lib_abstractions/platform_lib_time.h: -------------------------------------------------------------------------------- 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 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef _PLATFORM_LIB_TIME_H_ 30 | #define _PLATFORM_LIB_TIME_H_ 31 | 32 | int64_t systemTime(int clock); 33 | int64_t elapsedMillisSinceBoot(); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /init/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | LOCAL_PATH := $(call my-dir) 17 | 18 | include $(CLEAR_VARS) 19 | 20 | LOCAL_MODULE_TAGS := optional 21 | LOCAL_C_INCLUDES := system/core/init 22 | LOCAL_SRC_FILES := init_msm.cpp 23 | LOCAL_MODULE := libinit_msm 24 | 25 | include $(BUILD_STATIC_LIBRARY) 26 | -------------------------------------------------------------------------------- /lineage.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_device_qcom_common", 4 | "target_path": "device/qcom/common" 5 | }, 6 | { 7 | "repository": "android_kernel_xiaomi_msm8956", 8 | "target_path": "kernel/xiaomi/msm8956" 9 | }, 10 | { 11 | "repository": "android_packages_resources_devicesettings", 12 | "target_path": "packages/resources/devicesettings" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 41 | 6 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc490/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc870/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc940/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc460-mnc03/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc460-mnc11/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 24 | 25 | 0 26 | -1 27 | -1 28 | 29 | 30 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 24 | 25 | 26 | 28 | true 29 | 30 | 31 | true 32 | 33 | 34 | 10s,30s,60s,180s 35 | 36 | 37 | true 38 | 39 | 40 | 0 41 | 42 | 43 | -------------------------------------------------------------------------------- /overlay/packages/apps/Bluetooth/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 32 | 33 | true 34 | true 35 | true 36 | true 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | true 23 | 24 | true 25 | 26 | true 27 | 28 | true 29 | 30 | -------------------------------------------------------------------------------- /overlay/packages/apps/Dialer/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | true 20 | 4 21 | 22 | -------------------------------------------------------------------------------- /overlay/packages/apps/Phone/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | true 25 | 26 | 29 | true 30 | 31 | 32 | true 33 | 34 | 35 | true 36 | 37 | 39 | 1 40 | 41 | 45 | true 46 | 47 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc222-mnc01/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | true 39 | 40 | 41 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc840/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc854/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc855/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc856/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc857/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc858/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc859/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc860/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc861/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc862/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc863/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc864/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc865/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc866/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc867/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc868/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc869/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc870/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc871/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc872/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc873/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values-mcc405-mnc874/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | false 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/services/Telecomm/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | true 22 | 23 | 24 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | 24 | true 25 | 26 | 28 | 1 29 | 30 | 31 | true 32 | 33 | 34 | true 35 | 36 | 39 | true 40 | 41 | 45 | true 46 | 47 | 48 | true 49 | 50 | -------------------------------------------------------------------------------- /overlay/vendor/cmsdk/cm/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 32 | 11 33 | 34 | 35 | -------------------------------------------------------------------------------- /rootdir/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # Device init scripts 4 | 5 | include $(CLEAR_VARS) 6 | LOCAL_MODULE := fstab.qcom 7 | LOCAL_MODULE_TAGS := optional eng 8 | LOCAL_MODULE_CLASS := ETC 9 | LOCAL_SRC_FILES := etc/fstab.qcom 10 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 11 | include $(BUILD_PREBUILT) 12 | 13 | include $(CLEAR_VARS) 14 | LOCAL_MODULE := init.qcom.rc 15 | LOCAL_MODULE_TAGS := optional eng 16 | LOCAL_MODULE_CLASS := ETC 17 | LOCAL_SRC_FILES := etc/init.qcom.rc 18 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 19 | include $(BUILD_PREBUILT) 20 | 21 | include $(CLEAR_VARS) 22 | LOCAL_MODULE := init.qcom.sh 23 | LOCAL_MODULE_TAGS := optional eng 24 | LOCAL_MODULE_CLASS := ETC 25 | LOCAL_SRC_FILES := etc/init.qcom.sh 26 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 27 | include $(BUILD_PREBUILT) 28 | 29 | include $(CLEAR_VARS) 30 | LOCAL_MODULE := init.qcom.power.rc 31 | LOCAL_MODULE_TAGS := optional eng 32 | LOCAL_MODULE_CLASS := ETC 33 | LOCAL_SRC_FILES := etc/init.qcom.power.rc 34 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 35 | include $(BUILD_PREBUILT) 36 | 37 | include $(CLEAR_VARS) 38 | LOCAL_MODULE := init.qcom.usb.rc 39 | LOCAL_MODULE_TAGS := optional eng 40 | LOCAL_MODULE_CLASS := ETC 41 | LOCAL_SRC_FILES := etc/init.qcom.usb.rc 42 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 43 | include $(BUILD_PREBUILT) 44 | 45 | include $(CLEAR_VARS) 46 | LOCAL_MODULE := ueventd.qcom.rc 47 | LOCAL_MODULE_TAGS := optional eng 48 | LOCAL_MODULE_CLASS := ETC 49 | LOCAL_SRC_FILES := etc/ueventd.qcom.rc 50 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 51 | include $(BUILD_PREBUILT) 52 | 53 | # Configuration scripts 54 | 55 | include $(CLEAR_VARS) 56 | LOCAL_MODULE := init.qcom.bt.sh 57 | LOCAL_MODULE_TAGS := optional eng 58 | LOCAL_MODULE_CLASS := ETC 59 | LOCAL_SRC_FILES := etc/init.qcom.bt.sh 60 | include $(BUILD_PREBUILT) 61 | -------------------------------------------------------------------------------- /sepolicy/audioserver.te: -------------------------------------------------------------------------------- 1 | r_dir_file(audioserver, sysfs) 2 | -------------------------------------------------------------------------------- /sepolicy/device.te: -------------------------------------------------------------------------------- 1 | type lirc_device, dev_type; 2 | -------------------------------------------------------------------------------- /sepolicy/file.te: -------------------------------------------------------------------------------- 1 | type proc_touchpanel, fs_type; 2 | -------------------------------------------------------------------------------- /sepolicy/file_contexts: -------------------------------------------------------------------------------- 1 | # Cache 2 | /dev/block/platform/soc.0/7824900.sdhci/by-name/cache u:object_r:cache_block_device:s0 3 | 4 | # DSP 5 | /dev/block/platform/soc.0/7824900.sdhci/by-name/dsp u:object_r:dsp_block_device:s0 6 | 7 | # IR Blaster 8 | /dev/lirc[0-9]* u:object_r:lirc_device:s0 9 | -------------------------------------------------------------------------------- /sepolicy/fingerprintd.te: -------------------------------------------------------------------------------- 1 | r_dir_file(fingerprintd, firmware_file) 2 | allow fingerprintd fpc_data_file:dir rw_dir_perms; 3 | allow fingerprintd fpc_data_file:sock_file { create unlink }; 4 | allow fingerprintd fpc_sysfs:file rw_file_perms; 5 | allow fingerprintd storage_file:dir search; 6 | allow fingerprintd tee_device:chr_file rw_file_perms; 7 | allow fingerprintd uhid_device:chr_file rw_file_perms; 8 | -------------------------------------------------------------------------------- /sepolicy/fsck.te: -------------------------------------------------------------------------------- 1 | type dsp_block_device, dev_type; 2 | allow fsck dsp_block_device:blk_file rw_file_perms; 3 | allow fsck cache_block_device:blk_file rw_file_perms; 4 | allow fsck persist_block_device:blk_file rw_file_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/genfs_contexts: -------------------------------------------------------------------------------- 1 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0 2 | -------------------------------------------------------------------------------- /sepolicy/healthd.te: -------------------------------------------------------------------------------- 1 | allow healthd device:dir r_dir_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/hostapd.te: -------------------------------------------------------------------------------- 1 | allow hostapd cnd:unix_dgram_socket rw_socket_perms; 2 | allow hostapd diag_device:chr_file rw_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/init.te: -------------------------------------------------------------------------------- 1 | allow init debugfs:file write; 2 | -------------------------------------------------------------------------------- /sepolicy/kernel.te: -------------------------------------------------------------------------------- 1 | allow kernel domain:process setsched; 2 | -------------------------------------------------------------------------------- /sepolicy/location.te: -------------------------------------------------------------------------------- 1 | allow location self:capability net_raw; 2 | -------------------------------------------------------------------------------- /sepolicy/mediacodec.te: -------------------------------------------------------------------------------- 1 | allow mediacodec firmware_file:dir search; 2 | allow mediacodec mpctl_socket:dir search; 3 | -------------------------------------------------------------------------------- /sepolicy/mm-pp-daemon.te: -------------------------------------------------------------------------------- 1 | allow mm-pp-daemon diag_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/netd.te: -------------------------------------------------------------------------------- 1 | allow netd firmware_file:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/netmgrd.te: -------------------------------------------------------------------------------- 1 | allow netmgrd self:capability dac_override; 2 | -------------------------------------------------------------------------------- /sepolicy/per_mgr.te: -------------------------------------------------------------------------------- 1 | allow per_mgr self:capability net_raw; 2 | -------------------------------------------------------------------------------- /sepolicy/platform_app.te: -------------------------------------------------------------------------------- 1 | allow platform_app fuseblk:dir rw_dir_perms; 2 | allow platform_app fuseblk:file create_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/priv_app.te: -------------------------------------------------------------------------------- 1 | allow priv_app device:dir r_dir_perms; 2 | allow priv_app fuseblk:dir search; 3 | allow priv_app fuseblk:file r_file_perms; 4 | -------------------------------------------------------------------------------- /sepolicy/qmuxd.te: -------------------------------------------------------------------------------- 1 | allow qmuxd diag_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/qti_init_shell.te: -------------------------------------------------------------------------------- 1 | allow qti_init_shell bluetooth_data_file:file r_file_perms; 2 | allow qti_init_shell bluetooth_loader_exec:file { read open }; 3 | allow qti_init_shell ctl_default_prop:property_service set; 4 | allow qti_init_shell hci_attach_dev:chr_file rw_file_perms; 5 | allow qti_init_shell proc_touchpanel:dir { rw_dir_perms setattr }; 6 | allow qti_init_shell qmuxd:unix_stream_socket connectto; 7 | allow qti_init_shell qmuxd_socket:dir w_dir_perms; 8 | allow qti_init_shell qmuxd_socket:sock_file create_file_perms; 9 | -------------------------------------------------------------------------------- /sepolicy/radio.te: -------------------------------------------------------------------------------- 1 | allow radio system_app_data_file:dir getattr; 2 | -------------------------------------------------------------------------------- /sepolicy/rfs_access.te: -------------------------------------------------------------------------------- 1 | allow rfs_access self:capability net_raw; 2 | -------------------------------------------------------------------------------- /sepolicy/rild.te: -------------------------------------------------------------------------------- 1 | allow rild system_prop:property_service set; 2 | -------------------------------------------------------------------------------- /sepolicy/rmt_storage.te: -------------------------------------------------------------------------------- 1 | allow rmt_storage self:capability { dac_override net_raw }; 2 | -------------------------------------------------------------------------------- /sepolicy/sgdisk.te: -------------------------------------------------------------------------------- 1 | allow sgdisk userdata_block_device:blk_file read; 2 | -------------------------------------------------------------------------------- /sepolicy/system_server.te: -------------------------------------------------------------------------------- 1 | allow system_server lirc_device:chr_file rw_file_perms; 2 | allow system_server proc_touchpanel:dir search; 3 | allow system_server proc_touchpanel:file rw_file_perms; 4 | -------------------------------------------------------------------------------- /sepolicy/untrusted_app.te: -------------------------------------------------------------------------------- 1 | allow untrusted_app fuseblk:file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vold.te: -------------------------------------------------------------------------------- 1 | allow vold adsprpcd_file:dir r_dir_perms; 2 | allow vold proc_touchpanel:dir r_dir_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/wcnss_service.te: -------------------------------------------------------------------------------- 1 | allow wcnss_service self:capability { setuid setgid }; 2 | allow wcnss_service media_rw_data_file:dir rw_dir_perms; 3 | allow wcnss_service media_rw_data_file:file rw_file_perms; 4 | allow wcnss_service sdcardfs:dir rw_dir_perms; 5 | allow wcnss_service sdcardfs:file create_file_perms; 6 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | set -e 20 | 21 | INITIAL_COPYRIGHT_YEAR=2017 22 | 23 | # Load extract_utils and do some sanity checks 24 | MY_DIR="${BASH_SOURCE%/*}" 25 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 26 | 27 | CM_ROOT="$MY_DIR"/../../.. 28 | 29 | HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh 30 | if [ ! -f "$HELPER" ]; then 31 | echo "Unable to find helper script at $HELPER" 32 | exit 1 33 | fi 34 | . "$HELPER" 35 | 36 | # Initialize the helper for common 37 | setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true 38 | 39 | # Copyright headers and guards 40 | write_headers "kenzo hydrogen" 41 | 42 | # The standard common blobs 43 | write_makefiles "$MY_DIR"/proprietary-files.txt 44 | 45 | # We are done! 46 | write_footers 47 | 48 | if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then 49 | # Reinitialize the helper for device 50 | INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR" 51 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" false 52 | 53 | # Copyright headers and guards 54 | write_headers 55 | 56 | # The standard device blobs 57 | write_makefiles "$MY_DIR"/../$DEVICE/proprietary-files.txt 58 | 59 | # We are done! 60 | write_footers 61 | fi 62 | -------------------------------------------------------------------------------- /wifi/WCNSS_cfg.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineageOS/android_device_xiaomi_msm8956-common/0faefd87cf4ee65cf88db239da13371e0be97763/wifi/WCNSS_cfg.dat -------------------------------------------------------------------------------- /wifi/hostapd.accept: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are allowed to authenticate (IEEE 802.11) 2 | # with the AP. Optional VLAN ID can be assigned for clients based on the 3 | # MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used. 4 | -------------------------------------------------------------------------------- /wifi/hostapd.deny: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are not allowed to authenticate (IEEE 802.11) 2 | # with the AP. 3 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | --------------------------------------------------------------------------------