Commit Graph

230 Commits

Author SHA1 Message Date
Kevin F. Haggerty
afa0af84d6 msm8974-common: sepolicy: Clean up
* Group policy statements better
* Nuke unneeded allows

Change-Id: Ibc1fd4debe8c95005a6dd54e1428d6365248bd80
2018-12-26 22:06:35 +01:00
Wayne Lin
cb2941d541
Changing SUPL_ES=1 for SUPL end point control
SUPL_ES=1 ensures the GnssLocationProvider and related framework code
accepts incoming SMS SUPL_INIT messages with ES-bit=1
(which allow redirection of the ESLP
end-point e.g. to the current local emergency services provider when
you are travelling) only during an emergency call

Bug: 115331218
Bug: 112159033
Test: Build pass
Change-Id: I5075f7887a184ce18bb1815b35a2ce7acd8bca10
2018-12-16 07:59:22 -07:00
Kevin F. Haggerty
7e3f9a566d
msm8974-common: sepolicy: Resolve init denials
* avc: denied { write } for name="enable_adaptive_lmk" dev="sysfs"
  ino=6724 scontext=u:r:init:s0
  tcontext=u:object_r:sysfs_lowmemorykiller:s0 tclass=file permissive=1
* avc: denied { open } for name="enable_adaptive_lmk" dev="sysfs"
  ino=6724 scontext=u:r:init:s0
  tcontext=u:object_r:sysfs_lowmemorykiller:s0 tclass=file
  permissive=1
* avc: denied { setattr } for name="firmware_path" dev="sysfs"
  ino=6423 scontext=u:r:init:s0
  tcontext=u:object_r:sysfs_wifi_writeable:s0 tclass=file
  permissive=1
* avc: denied { write } for name="l2" dev="sysfs" ino=29063
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_msm_power:s0
  tclass=file permissive=1
* avc: denied { open } for name="l2" dev="sysfs" ino=29063
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_msm_power:s0
  tclass=file permissive=1
* avc: denied { write } for name="enabled" dev="sysfs" ino=29716
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_thermal:s0
  tclass=file permissive=1
* avc: denied { write } for name="online" dev="sysfs" ino=5871
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0
  tclass=file permissive=1
* avc: denied { write } for name="boost_ms" dev="sysfs" ino=6652
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_cpu_boost:s0
  tclass=file permissive=1
* avc: denied { open } for name="boost_ms" dev="sysfs" ino=6652
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_cpu_boost:s0
  tclass=file permissive=1
* avc: denied { setattr } for name="min_pwrlevel" dev="sysfs"
  ino=19546 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_kgsl:s0
  tclass=file permissive=0
* avc: denied { setattr } for name="enabled" dev="sysfs" ino=23417
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_hal_pwr:s0
  tclass=file permissive=1
* avc: denied { setattr } for name="rear_camfw" dev="sysfs" ino=24404
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_camera:s0
  tclass=file permissive=1
* avc: denied { check_context } for scontext=u:r:init:s0
  tcontext=u:object_r:kernel:s0 tclass=security permissive=0

Change-Id: Id7f78abedea2209f84527b1b83259574d06a0900
2018-11-30 14:29:49 -07:00
Kevin F. Haggerty
7fb5a8c6cb
msm8974-common: sepolicy: Label sysfs_usb_storage_gadget, resolve denials
* avc: denied { setattr } for name="file" dev="sysfs" ino=23591
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_usb_storage_gadget:s0
  tclass=file permissive=1

Change-Id: Ia96e3634cbe1a85bb7da3f24ecfa3fbaaa55baad
2018-11-30 14:14:59 -07:00
Kevin F. Haggerty
58cf5da15e
msm8974-common: sepolicy: Label sysfs_usb_otg, resolve denials
* avc: denied { setattr } for name="booster" dev="sysfs" ino=23129
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_usb_otg:s0
  tclass=file permissive=1

Change-Id: Iffb33bd7647026107473fb63e82d942ad027f9f9
2018-11-30 14:10:55 -07:00
Kevin F. Haggerty
a0c32871a9
msm8974-common: sepolicy: Broaden sysfs_bluetooth_writable, resolve denials
Change-Id: Iff3645e36ece2126f3697bb0389394415be16529
2018-11-29 21:58:43 -07:00
Kevin F. Haggerty
5c15bb5833
msm8974-common: sepolicy: Label sysfs_msmuart_file, resolve denials
* avc: denied { setattr } for name="clock" dev="sysfs" ino=18914
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_msmuart_file:s0
  tclass=file permissive=1

Change-Id: Iaf5fe6791344dcf419242599eb6c9272c61cd707
2018-11-29 21:58:43 -07:00
Kevin F. Haggerty
5d817ed103
msm8974-common: sepolicy: Label sysfs_mmc_host, resolve denials
* avc: denied { write } for name="control" dev="sysfs" ino=25383
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_mmc_host:s0
  tclass=file permissive=1
* avc: denied { open } for name="control" dev="sysfs" ino=25383
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_mmc_host:s0
  tclass=file permissive=1

Change-Id: I876d025db9cf1fe67faeccca830ffd53dbf92904
2018-11-29 21:58:43 -07:00
Kevin F. Haggerty
6189adadd4
msm8974-common: sepolicy: Label sysfs_socinfo, resolve denials
* avc: denied { setattr } for name="soc_iddq" dev="sysfs" ino=5543
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_socinfo:s0 tclass=file
  permissive=0

Change-Id: Ife248a9cccea19b09b931525606cf4c34344fd9f
2018-11-29 21:58:42 -07:00
Kevin F. Haggerty
b98cef71f1
msm8974-common: sepolicy: Label additional sysfs_io_sched_tuneable node
Change-Id: I2b416123c7d925443df20f518cb2a0bd02935229
2018-11-29 21:58:42 -07:00
Kevin F. Haggerty
dbcc41c888
msm8974-common: sepolicy: Resolve additional sensors HAL denials
* avc: denied { search } for name="sec-thermistor" dev="sysfs"
  ino=5485 scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_sec_thermistor:s0 tclass=dir permissive=0

Change-Id: I4d77e87b2662bca081cc5b934161347fed6a157d
2018-11-29 21:58:42 -07:00
Kevin F. Haggerty
1f52307ccb
msm8974-common: sepolicy: Label sysfs_sensors, resolve denials
* avc: denied { read } for name="ssp_sensor" dev="sysfs" ino=27809
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sensors:s0
  tclass=lnk_file permissive=1
* avc: denied { setattr } for name="temperature" dev="sysfs" ino=10861
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sensors:s0
  tclass=file permissive=0

Change-Id: I2e4a436704ed019af153da880d7becbde4b0ab11
2018-11-29 21:57:48 -07:00
Kevin F. Haggerty
c39a735ab5
msm8974-common: sepolicy: Label sysfs_msm_perf, resolve denials
* avc: denied { write } for name="suspend_enabled" dev="sysfs"
  ino=10567 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_msm_perf:s0
  tclass=file permissive=1
* avc: denied { open } for name="suspend_enabled" dev="sysfs"
  ino=10567 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_msm_perf:s0
  tclass=file permissive=1

Change-Id: I23d69f0442d126b2a6ac3aaeda5032856a4483f2
2018-11-29 19:17:53 -07:00
Kevin F. Haggerty
27afbf1dc6
msm8974-common: sepolicy: Label sysfs_disk_stat nodes
* avc: denied { read } for name="stat" dev="sysfs" ino=26461
  scontext=u:r:storaged:s0 tcontext=u:object_r:sysfs:s0 tclass=file
  permissive=1

Change-Id: I4b7258d069801f542da8c7f5ca8242ea32f12bca
2018-11-29 19:17:52 -07:00
Kevin F. Haggerty
97ff0e6d32
msm8974-common: sepolicy: Label sysfs_net, resolve denials
* avc: denied { getattr } for path="/sys/devices/msm_sdcc.2/mmc_host/
  mmc0/mmc0:0001/mmc0:0001:2/net/wlan0/phy80211" dev="sysfs"
  ino=29873 scontext=u:r:hal_wifi_hostapd_default:s0
  tcontext=u:object_r:sysfs_net:s0 tclass=lnk_file permissive=0
* avc: denied { read } for name="phy80211" dev="sysfs" ino=29823
  scontext=u:r:hal_wifi_hostapd_default:s0
  tcontext=u:object_r:sysfs_net:s0 tclass=lnk_file permissive=0

Change-Id: I6f40b8bdac2537b7000c02af6fac8277acb2a718
2018-11-29 19:17:52 -07:00
Kevin F. Haggerty
a7c4bcc98e
msm8974-common: sepolicy: Label our custom sensors service
Change-Id: I331abeac851cd92b32990ff797dff506dd67e503
2018-11-27 08:12:35 -07:00
Kevin F. Haggerty
4b1a3c2134
msm8974-common: sepolicy: Resolve hal_sensors_default denials
* avc: denied { read } for name="name" dev="sysfs" ino=26468i
  scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs:s0
  tclass=file permissive=0
* avc: denied { read } for name="iio:device1" dev="tmpfs" ino=7276
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:iio_device:s0 tclass=chr_file permissive=0
* avc: denied { open } for name="iio:device0" dev="tmpfs" ino=7275
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:iio_device:s0 tclass=chr_file permissive=0
* avc: denied { search } for name="/" dev="mmcblk0p12" ino=2
  scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:efs_file:s0
  tclass=dir permissive=0
* avc: denied { read } for name="gyro_cal_data" dev="mmcblk0p12"
  ino=41 scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:efs_file:s0 tclass=file permissive=0
* avc: denied { read } for name="shtc1_sensor" dev="tmpfs" ino=8378
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sensors_device:s0 tclass=chr_file permissive=1
* avc: denied { open } for name="shtc1_sensor" dev="tmpfs" ino=8378
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sensors_device:s0 tclass=chr_file permissive=1

Change-Id: Iad7e41e5e250eb1511d5838bd42b2b07843d220b
2018-11-27 08:12:35 -07:00
Kevin F. Haggerty
071111d64d
msm8974-common: sepolicy: Label sysfs_sec_* types, resolve denials
* Rename sysfs_sec type to sysfs_sec_key
* Add additional sysfs_sec_* types as appropriate

* avc: denied { read } for name="temp_adc" dev="sysfs" ino=10538
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_sec_thermistor:s0 tclass=file permissive=1
* avc: denied { open } for name="temp_adc" dev="sysfs" ino=10538
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_sec_thermistor:s0 tclass=file permissive=1
* avc: denied { write } for name="ir_send" dev="sysfs" ino=21339
  scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_sec_ir:s0
  tclass=file permissive=1
* avc: denied { write } for name="led_blink" dev="sysfs" ino=25722
  scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_sec_led:s0
  tclass=file permissive=1
* avc: denied { write } for name="brightness" dev="sysfs" ino=23467
  scontext=u:r:system_server:s0
  tcontext=u:object_r:sysfs_sec_touchkey:s0 tclass=file permissive=1
* avc: denied { setattr } for name="ir_send" dev="sysfs" ino=21339
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_ir:s0 tclass=file
  permissive=1
* avc: denied { setattr } for name="hall_irq_ctrl" dev="sysfs"
  ino=29565 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_key:s0
  tclass=file permissive=1
* avc: denied { setattr } for name="epen_firm_update" dev="sysfs"
  ino=23585 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_epen:s0
  tclass=file permissive=1
* avc: denied { setattr } for name="cmd" dev="sysfs" ino=23756
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_tsp:s0
  tclass=file permissive=1
* avc: denied { write } for name="wakeup_keys" dev="sysfs" ino=29568
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_key:s0
  tclass=file permissive=1
* avc: denied { open } for name="wakeup_keys" dev="sysfs" ino=29568
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_key:s0
  tclass=file permissive=1
* avc: denied { read } for name="input" dev="sysfs" ino=24012
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_tsp:s0
  tclass=lnk_file permissive=0
* avc: denied { setattr } for name="waketime" dev="sysfs" ino=29035
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_bamdmux:s0
  tclass=file permissive=0
* avc: denied { setattr } for name="led_r" dev="sysfs" ino=25719
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_led:s0
  tclass=file permissive=0
* avc: denied { setattr } for name="usb_sel" dev="sysfs" ino=28162
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_switch:s0
  tclass=file permissive=0
* avc: denied { setattr } for name="brightness" dev="sysfs" ino=23468
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_sec_touchkey:s0
  tclass=file permissive=0
* avc: denied { setattr } for name="temperature" dev="sysfs"
  ino=10538 scontext=u:r:init:s0
  tcontext=u:object_r:sysfs_sec_thermistor:s0 tclass=file
  permissive=0
* avc: denied { setattr } for name="barcode_send" dev="sysfs"
  ino=19231 scontext=u:r:init:s0
  tcontext=u:object_r:sysfs_sec_barcode_emul:s0 tclass=file
  permissive=0

Change-Id: I66b6d2aab875a2706f2730be9755e8d9805ffb6e
2018-11-27 08:12:28 -07:00
Kevin F. Haggerty
bb196ad94b
msm8974-common: sepolicy: Label sysfs_leds, resolve denials
* avc: denied { search } for name="leds" dev="sysfs" ino=7437
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_leds:s0 tclass=dir permissive=1
* avc: denied { setattr } for name="led_r" dev="sysfs" ino=25718
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=file
  permissive=1

Change-Id: I8840e28b3aa72e60d5c15cad66f043a36a15c771
2018-11-27 07:00:57 -07:00
Kevin F. Haggerty
0e66ee2593
msm8974-common: sepolicy: Label sysfs_batteryinfo, resolve denials
* avc: denied { setattr } for name="siop_level" dev="sysfs" ino=29912
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_batteryinfo:s0
  tclass=file permissive=1
* avc: denied { search } for name="battery.95" dev="sysfs" ino=3264
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=1
* avc: denied { read } for name="batt_temp_adc" dev="sysfs" ino=28739
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=file permissive=1
* avc: denied { open } for name="batt_temp_adc" dev="sysfs" ino=28739
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=file permissive=1

Change-Id: Ie3098da96eeed27a9403e3c311fe011c1f359561
2018-11-27 06:50:04 -07:00
Kevin F. Haggerty
1357777a0f
msm8974-common: sepolicy: Label sysfs_input, resolve denials
* avc: denied { read write } for name="poll_delay" dev="sysfs"
  ino=27687 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_input:s0
  tclass=file permissive=1
* avc: denied { open } for name="poll_delay" dev="sysfs" ino=27687
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_input:s0 tclass=file
  permissive=1
* avc: denied { search } for name="input" dev="sysfs" ino=13030
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_input:s0 tclass=dir permissive=0
* avc: denied { read } for name="input6" dev="sysfs" ino=26725
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_input:s0 tclass=dir permissive=0
* avc: denied { read } for name="device" dev="sysfs" ino=26717
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_input:s0 tclass=lnk_file permissive=0
* avc: denied { read write } for name="poll_delay" dev="sysfs"
  ino=26946 scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_input:s0 tclass=file permissive=0

Change-Id: Id46a02a44e773b99ff61f9a8ff18394c74c80f90
2018-11-27 06:41:19 -07:00
Kevin F. Haggerty
8d6d6a1f00
msm8974-common: sepolicy: Label sysfs_iio, resolve denials
* avc: denied { read } for name="devices" dev="sysfs" ino=7783
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_iio:s0 tclass=dir permissive=0
* avc: denied { open } for name="devices" dev="sysfs" ino=7783
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_iio:s0 tclass=dir permissive=0
* avc: denied { write } for name="length" dev="sysfs" ino=26482
  scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs_iio:s0
  tclass=file permissive=0
* avc: denied { read } for name="iio:device1" dev="sysfs" ino=26489
  scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs_iio:s0
  tclass=lnk_file permissive=0
* avc: denied { read } for name="iio:device0" dev="sysfs" ino=26350
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_iio:s0
  tclass=lnk_file permissive=1
* avc: denied { setattr } for name="length" dev="sysfs" ino=26343
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_iio:s0 tclass=file
  permissive=1

Change-Id: If9b3e9efe4f7c6eec3faf973e0b7aebd96d76ef3
2018-11-27 06:40:47 -07:00
Kevin F. Haggerty
4cea2fcca2
msm8974-common: sepolicy: More sysfs_graphics, resolve denials
* avc: denied { setattr } for name="brightness" dev="sysfs" ino=12913
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_graphics:s0
  tclass=file permissive=1
* avc: denied { read } for name="window_type" dev="sysfs" ino=12710
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_graphics:s0 tclass=file
  permissive=1
* avc: denied { read } for name="window_type" dev="sysfs" ino=12710
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_graphics:s0 tclass=file permissive=0
* avc: denied { search } for name="panel" dev="sysfs" ino=12358
  scontext=u:r:hal_sensors_default:s0
  tcontext=u:object_r:sysfs_graphics:s0 tclass=dir permissive=0

Change-Id: I8597d7be6217816924a8fee854341e4f2fb18562
2018-11-26 22:18:08 -07:00
Kevin F. Haggerty
241d260828
msm8974-common: sepolicy: Update sysfs_mdnie, resolve denials
* avc: denied { setattr } for name="scenario" dev="sysfs" ino=12753
  scontext=u:r:init:s0 tcontext=u:object_r:sysfs_mdnie:s0 tclass=file
  permissive=0
* avc: denied { search } for name="mdnie" dev="sysfs" ino=12743i
  scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_mdnie:s0
  tclass=dir permissive=0

Change-Id: I4a0530136d7d1e6ee8ede0733e70de813382372b
2018-11-26 21:00:04 -07:00
dianlujitao
828c5416ba
msm8974-common: Remove power-off alarm stuff from init extension
* Samsung msm8974 devices never supported this to begin with, even
  with the stock OS

Change-Id: Ie4d30358314337c229a66a16195f675198ef7d52
2018-11-25 14:05:14 -07:00
Shaikh Shadul
eb5a728efa
msm8974-common: sensors: Tune binder buffer for sensors HIDL
Setting custom binder buffer size for sensors HIDL service.

Change-Id: I83ebdc77ed7aec0e25a975097358440681ca5f11
2018-11-21 23:10:10 -07:00
Kevin F. Haggerty
b14c7f0152
msm8974-common: sepolicy: Sort sysfs block of file_contexts sanely
Change-Id: I421f1c97db0f5c2919d99293d75d3f6e09f52340
2018-11-21 23:10:10 -07:00
Kevin F. Haggerty
a60dc07555
msm8974-common: sepolicy: Drop our mediaextractor additions
* LineageOS/android_system_sepolicy@2a67349574 covers this for us

Change-Id: I55a92c1580d4943f72f17ba8991fcbb5c8167c8d
2018-11-21 23:10:09 -07:00
Kevin F. Haggerty
c80f349acc
msm8974-common: Set TARGET_NEEDS_NETD_DIRECT_CONNECT_RULE to true
* Due to "specialness" in our RIL library, ConnectivityService
  doesn't seem to appropriately add the relevant directly-
  connected routes, meaning that IPv4 mobile data is inoperable
  due to lack of a default route. Let's reenable the legacy netd
  behavior to get our connectivity back.

Change-Id: I59f8476ab36db0fb79856f74346e62e0dd4abae0
2018-11-21 20:16:40 -07:00
Daniel Jarai
cf207232cb
msm8974-common: Make the external camera provider ignore internal cameras
* The external camera provider occupies our camera v4l2 nodes,
  potentially crashing the kernel driver and blocking the camera HAL.
  Unfortunately, there's no easy way to just disable it, so let's just
  tell it to ignore the internal video devices.

Change-Id: I00c67de1b94a1f7eca1bf458d1d0e4de3507aa81
Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com>
2018-11-12 20:35:01 -07:00
Bruno Martins
7bf8dd9506
msm8974-common: Only include legacy QC sepolicy
* This has now turned into a separate repository (maintained only
   for legacy devices, those that never got official Orea updates).

Change-Id: I981b452b697bc3610d7aa97b74ed182c6b70ca30
2018-10-21 08:25:19 -06:00
Ruthwar Ambeer
f7449aa3b0
msm8974-common: libril: FR51015: Tuning of Binder buffer for rild.
Tuned the Binder buffer to 500KB as it is not
going to use the default allocated 1MB which
saves RAM for 32 bit processors.

Change-Id: Ifea2720f8e853643a37912c3459e923168677b1e
CRs-Fixed: 2283052
[haggertk: This is just the libril side up the upstream change]
2018-10-09 06:25:58 -06:00
Gohulan Balachandran
76992cefda
msm8974-common: libril: Replace strncpy with strlcpy.
Use strlcpy instead of strncpy when copying strings to make sure
the copy is always null-terminated.

Change-Id: I12d4883c22a180e2136dc8c85bc0394ddcdcb706
2018-10-09 06:25:57 -06:00
Sanket Padawe
92a361dc59
msm8974-common: libril: Add SIM_ABSENT error
Bug: b/62926561
Test: N/A
Change-Id: I27e86be7ee4a0b8a23c99fe28636f26b289c51b5
2018-10-09 06:25:56 -06:00
terrycrhuang
ab269b9cd4
msm8974-common: libril: Change rild initial sequence to guarantee non-null function pointer before rild register its hidl service
Test: Build and local test
Bug: 78886552
Change-Id: I1137cc0f4f09f0304662a2227b84c2b5b228d45d
2018-10-09 06:25:55 -06:00
Steven Moreland
7e86bb0923
msm8974-common: libril: Add DISABLE_RILD_OEM_HOOK.
OEM hook is deprecated, so adding a way to disable it to
this radio implementation.

Bug: 75322118
Test: boot device w/ DISABLE_RILD_OEM_HOOK works, lshal
Change-Id: Ie7ade48476d2c330df608e9cc8dab805f84dd81d
2018-10-09 06:25:55 -06:00
Amit Mahajan
6762d13586
msm8974-common: libril: Store the system time when NITZ is received.
If cached value for NITZ is used, the time at which it was
received needs to be cached too.

Test: Basic telephony sanity
Bug: 72283604
Change-Id: I8f443171c4583e3eab9be7973d7714ae6c7ab6af
2018-10-09 06:25:54 -06:00
Gohulan Balachandran
7113220c88
msm8974-common: libril: Fix double freeing of memory in SAP service and add null-checks.
The payload of a SAP request could be freed twice in certain scenarios.
Also, add null-checks to prevent dereferencing of null pointers.

Bug: 64729356
Test: Manually run the fuzz tests and ensure that there is no crash in
      rild

Change-Id: Ib7ae269fa5297d6acea267337b220b8858c82bae
2018-10-09 06:25:53 -06:00
Pengquan Meng
7d4e0308a2
msm8974-common: libril: Remove unused code
Bug: 62249769
Test: manually

Change-Id: Ibeae8537ee87dc9c3481538df0fcdb4f3d50f50c
2018-10-09 06:25:52 -06:00
Nathan Harold
f174e36781
msm8974-common: libril: Fix Const-Correctness for RIL_RadioFunctions
Re-add constant for function pointer table to
RIL_RadioFunctions. Const was accidentally removed
during a warnings cleanup.

Bug: 64231560
Test: compilation
Change-Id: I93675980c51d9162f624495d12fe3c97f1da8031
2018-10-09 06:25:51 -06:00
Lennart Wieboldt
900794d8b2
msm8974-common: libril: Remove LOCAL_CLANG
clang is the default compiler since Android nougat

Change-Id: I0555fa8067352fd43b47aabe80be1224597da17e
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2018-10-09 06:25:44 -06:00
Michael Bestas
482de62af8
msm8974-common: Switch to 1.1 power HAL
Change-Id: I4690a5b913141427a828d6a3a4af407d35a10775
2018-10-06 08:34:19 -06:00
Kevin F. Haggerty
e1b8705691
msm8974-common: Build binderized samsung8974 sensors service
Change-Id: I85010c4ab26c771c585e0dc65d14552853f147c2
2018-09-21 16:02:05 -06:00
Michael Bestas
32d31a6be7
msm8974-common: sensors: Add input group to sensor service
* Fixes light and proximity sensor in hwbinder mode

Change-Id: I1dadda8c68043f97190d85763405058cc1761b0e
2018-09-21 16:02:05 -06:00
Kevin F. Haggerty
36f23a1b47
msm8974-common: sensors: Convert to samsung8974 target
Change-Id: Ic897c67c4caf9ba07dc770f19226e016ae9a5d77
2018-09-21 16:02:05 -06:00
Kevin F. Haggerty
3fe9c310d1
msm8974-common: sensors: Import default service and impl from hardware/interfaces
* Source: LineageOS/android_hardware_interfaces@ef97157

Change-Id: Id12ceb1bca1578a0c8a9e048562a224ec74d93fb
2018-09-21 16:02:05 -06:00
Kevin F. Haggerty
d6c5ae5030
msm8974-common: sensors: Update multihal with P changes
Change-Id: Iee33e9043e5f4eb9b5ff8af562800e0392c041b5
2018-09-21 16:02:05 -06:00
Kevin F. Haggerty
2bd8da39b5 msm8974-common: sensors: Resolve unused parameter warnings
* Change dce39f8a86 ("msm8974-common: sensors: Disable batching")
  resulted in unused parameters. Fix that.

Change-Id: If6590e6e7c2e14dbb4f7141c69c6bd71900fe896
2018-09-22 00:01:01 +02:00
Bruno Martins
11152c4794
msm8974-common: Remove no longer needed Android Blueprints
* Soong now finds all Android.bp and Blueprints files in the source tree

Change-Id: I2b7b22ecec7efb439d4c20c9d579ed9ceed5b20d
2018-09-21 11:53:48 -06:00
Kevin F. Haggerty
68ef2d47da
msm8974-common: Commonize camera packages and manifest entries
Change-Id: I348680ccf6541b13289d1470c7e91111be4992c0
2018-09-15 11:52:02 -06:00