Commit graph

317 commits

Author SHA1 Message Date
Kevin F. Haggerty
e38fc5cd87 msm8226-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
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
88813355e5 msm8226-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
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
204b419f28 msm8226-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
2019-10-12 10:26:47 +02:00
Francescodario Cuzzocrea
0c1635f670 msm8226-common: remove init.tefor P bringup 2019-10-12 10:26:47 +02:00
Shaikh Shadul
d030676d7b msm8226-common: sensors: Tune binder buffer for sensors HIDL
Setting custom binder buffer size for sensors HIDL service.

Change-Id: I83ebdc77ed7aec0e25a975097358440681ca5f11
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
7e00ac6293 msm8226-common: sepolicy: Sort sysfs block of file_contexts sanely
Change-Id: I421f1c97db0f5c2919d99293d75d3f6e09f52340
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
2b530f0d8a msm8226-common: sepolicy: Drop our mediaextractor additions
* LineageOS/android_system_sepolicy@2a67349574 covers this for us

Change-Id: I55a92c1580d4943f72f17ba8991fcbb5c8167c8d
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
5a72893d64 msm8226-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
2019-10-12 10:26:47 +02:00
Daniel Jarai
20b981f328 msm8226-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>
2019-10-12 10:26:47 +02:00
Bruno Martins
88de547668 msm8226-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
2019-10-12 10:26:47 +02:00
Ruthwar Ambeer
0430dd3864 msm8226-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]
2019-10-12 10:26:47 +02:00
Gohulan Balachandran
40fd3574d4 msm8226-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
2019-10-12 10:26:47 +02:00
Sanket Padawe
2d737f8c49 msm8226-common: libril: Add SIM_ABSENT error
Bug: b/62926561
Test: N/A
Change-Id: I27e86be7ee4a0b8a23c99fe28636f26b289c51b5
2019-10-12 10:26:47 +02:00
terrycrhuang
66f90a9d4a msm8226-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
2019-10-12 10:26:47 +02:00
Steven Moreland
5dc9bd58a7 msm8226-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
2019-10-12 10:26:47 +02:00
Amit Mahajan
e2dac4d042 msm8226-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
2019-10-12 10:26:47 +02:00
Gohulan Balachandran
261e599152 msm8226-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
2019-10-12 10:26:47 +02:00
Pengquan Meng
a6e40bc989 msm8226-common: libril: Remove unused code
Bug: 62249769
Test: manually

Change-Id: Ibeae8537ee87dc9c3481538df0fcdb4f3d50f50c
2019-10-12 10:26:47 +02:00
Nathan Harold
fb7e3f63d3 msm8226-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
2019-10-12 10:26:47 +02:00
Lennart Wieboldt
c0ced3124a msm8226-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>
2019-10-12 10:26:47 +02:00
Michael Bestas
e9e6c437f8 msm8226-common: Switch to 1.1 power HAL
Change-Id: I4690a5b913141427a828d6a3a4af407d35a10775
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
86e0737857 msm8226-common: Build binderized samsung8974 sensors service
Change-Id: I85010c4ab26c771c585e0dc65d14552853f147c2
2019-10-12 10:26:47 +02:00
Michael Bestas
fb79d2de72 msm8226-common: sensors: Add input group to sensor service
* Fixes light and proximity sensor in hwbinder mode

Change-Id: I1dadda8c68043f97190d85763405058cc1761b0e
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
5a8d7797df msm8226-common: sensors: Convert to samsung8226 target
Change-Id: Ic897c67c4caf9ba07dc770f19226e016ae9a5d77
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
35e52a6371 msm8226-common: sensors: Import default service and impl from hardware/interfaces
* Source: LineageOS/android_hardware_interfaces@ef97157

Change-Id: Id12ceb1bca1578a0c8a9e048562a224ec74d93fb
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
a6b44992f2 msm8226-common: sensors: Update multihal with P changes
Change-Id: Iee33e9043e5f4eb9b5ff8af562800e0392c041b5
2019-10-12 10:26:47 +02:00
Kevin F. Haggerty
39f1b3c1b0 msm8226-common: sensors: Resolve unused parameter warnings
* Change dce39f8a86 ("msm8974-common: sensors: Disable batching")
  resulted in unused parameters. Fix that.

Change-Id: If6590e6e7c2e14dbb4f7141c69c6bd71900fe896
2019-10-12 10:26:47 +02:00
Bruno Martins
21539ef30b msm8226-common: Remove no longer needed Android Blueprints
* Soong now finds all Android.bp and Blueprints files in the source tree

Change-Id: I2b7b22ecec7efb439d4c20c9d579ed9ceed5b20d
2019-10-12 10:26:31 +02:00
Kevin F. Haggerty
fe350bddf2 msm8226-common: Commonize camera packages and manifest entries
Change-Id: I348680ccf6541b13289d1470c7e91111be4992c0
2019-10-12 10:26:31 +02:00
Kevin F. Haggerty
94a4e4d021 msm8226-common: Allow additional gralloc 1.0 buffer usage bits
* Our platform requires 0x02000000U (USAGE_PRIVATE_UNCACHED) for
  camera, video, and various other functionality

Change-Id: Ie5a8a46fef1c0f28ebd2cd3b3d29cc19763bc2a3
2019-10-12 10:26:31 +02:00
Bruno Martins
09375ef369 msm8226-common: Explicitly set all used audio features
* These features have long been enabled by default in the audio HAL,
   but things changed since the unification of the audio policy HAL.
   Set all of them here, also to make it easily clear what is used.

Change-Id: I5bdb5fda3b9d5add5b9bac1f6980607761fbd692
2019-10-12 10:26:31 +02:00
Roshan Pius
e749ff8784 msm8226-common: Add hostapd HIDL interface
Bug: 36646171
Test: Manual softap toggle
Change-Id: Ia7ef8bf3da8adc3491c4dac4096e4297cbd5bf5b
2019-10-12 10:26:31 +02:00
Roshan Pius
fccbdf70a4 msm8226-common: Uprev to supplicant 1.1
Bug: 65673412
Test: Device boots up and connects to wifi networks.
Change-Id: I2e51291b30fd242edbeae2c69ef9545383895bb3
2019-10-12 10:26:31 +02:00
Etan Cohen
740ca2aad5 msm8226-common: Uprev Wi-Fi HAL to 1.2
New HAL APIs are planned. This requires a HAL uprev.

Bug: 65647646
Test: builds and Wi-Fi runs
Change-Id: Ib7efd3d5263e73d1ad40e1a5a687bdb6c133c812
2019-10-12 10:26:31 +02:00
Bruno Martins
909db34365 msm8226-common: Switch to common basic USB HAL
Change-Id: I0e0809a2338f006063c5160bb7aec36a555cebab
2019-10-12 10:26:31 +02:00
Lalit Kansara
6778f54561 msm8226-common: Prefix AID with VENDOR_
Change-Id: I560eb0fb5ca248b20765fe564139c1f7cc1dbc93
2019-10-12 10:26:31 +02:00
Hung-ying Tyan
c843bb730f msm8226-common: manifest: Uprev configstore (1.0 -> 1.1)
Bug: 69691076
Test: Built and tested on device
Change-Id: I16f06827ef83711c9e29698540ffcec658081fda
2019-10-12 10:26:31 +02:00
Hashbang173
d7d0d90d0f msm8226-common: Enable HWC2on1 adapter
* This fixes display (see: d265c42386)

Change-Id: Ic749a38828563be7dacd005aeb91dbce3121ae07
2019-10-12 10:26:31 +02:00
pythonlimited
ba0a20ffe8 msm8226-common: give input3 correct permissions 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
dc2ae1397b msm8226-common: add media_codec quirks found on G800H CRJ1 package 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
5b0d6c9004 msm8226-common: rootdir: update power profile to be in line with stock 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
66fd4b19e9 msm8226-common: remove duplicate entries from media_codecs.xml 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
b77e4e988d msm8226-common: move media configurations to /vendor 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
075ed3f103 msm8226-common: add MALLOC_SVELTE and TARGET_USES_NON_TREBLE_CAMERA to BoardConfigCommon.mk 2019-10-12 10:26:31 +02:00
Francescodario Cuzzocrea
f89d1e5ca3 [SQUASH]: initial bringup of samsung msm8226-common repo from msm8974-common
* Rename msm8974-common -> msm8226-common
 * Import the old msm8226-common camera wrapper and apply :
	- 45e3438b26 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- 737bd8c396 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- a79e72b246 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- d4dadbaff0 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- c2eb30c314 (diff-dd6d2dcc679d12b9430a9787bab45b33)
	- 9ac995b901 (diff-dd6d2dcc679d12b9430a9787bab45b33)
 * Remove msm8974 keylayout in favour of msm8226 ones
 * Add wifi/prima relate configs for Qualcomm WIFI
 * Import libwncss from our old msm8226-common branch
 * Remove AvancedDisplay overlay as our panel does not support mDNIe
 * Import rootdir files from stock SM-G800H release, rework it taking as
 example klte one and import stock ondemand governor parameters
 * Adapt seccomp policy for msm8226
 * Adapt sensor multihal for msm8226
 * Adapt sepolicy for msm8226-common
2019-10-12 10:17:42 +02:00
Wayne Lin
96eaf0aaba
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-06 06:36:41 -07:00
Kevin F. Haggerty
96aaef5008 msm8974-common: Use TARGET_COPY_OUT_VENDOR instead of explicit path
Change-Id: I5a35a481fcdee8b1f85e0b9aa9a5c726909b928f
2018-08-20 06:30:23 -06:00
Michael Bestas
e0e8272585 msm8974-common: Remove device/qcom/common dependency
Change-Id: Iad029259b1fcf1e3e38bef575bf65238f1c834b5
2018-08-19 10:30:27 -06:00
Kevin F. Haggerty
55cf3f11c6 msm8974-common: Set TARGET_NEEDS_LEGACY_CAMERA_HAL1_DYN_NATIVE_HANDLE
* This is required to enable our legacy HAL1 camera recording
  following OMX hardening in Ief2d2d4d0445074c0ecdc723b1b25997a7631389

Change-Id: Ide8dad10bf72fbd1acefec2f8ef4a90b0e3c0a4b
2018-08-14 04:08:15 -06:00
T H
dce39f8a86 msm8974-common: sensors: Disable batching
* Set FIFO values to 0 for all sensors to disable batching.
* Only change the delay for batch calls.

Change-Id: I8e8384e63a24122e02f3c6c7e09311561c180c17
2018-08-05 08:34:09 -06:00