Commit Graph

414 Commits

Author SHA1 Message Date
Kevin F. Haggerty
3111569cd9
msm8974-common: Ship libcutils-v29.so for use by libsec-ril*.so
* libsec-ril*.so files need strdup8to16, which is is dropped in the API
  30 library, but can be found in the API 29 prebuilt.

Change-Id: Iaa54b061048a00f832d18396a82212905af0fd7e
2020-12-12 09:06:36 -07:00
Kevin F. Haggerty
b59ddb8101
msm8974-common: Use libprotobuf-cpp-lite-v29.so for libwvdrmengine.so
* libwvdrmengine.so needs _ZN6google8protobuf8internal13empty_string_E
  which is dropped in the API 30 library, but can be found in the
  API 29 prebuilt

Change-Id: I39e3251d53b14f3325282b12e6a6bf741ebcf63a
2020-12-12 09:06:36 -07:00
Arne Coucheron
8a56039c7d
msm8974-common: Set TARGET_DISABLE_POSTRENDER_CLEANUP := true
To fix the bad UI lag we are experiencing.

Change-Id: I3edb25f93c58b87431a1802726f31123200f75d3
2020-12-04 08:42:40 -07:00
Quallenauge
81028f988c
msm8974-common: Force build scudo free 32 bit variant of libc.
We have issues with camera blobs which doesn't play
well with scudo allocation/deallocation tracking.
Scudo reports corrupted header when stopping a
video recording.
Because we aren't alone with this (also upstream seems
to have trouble with camera modules) use the 32 libc
which is used only by a few components, like camera
and audio.

Because docs states, that libc with the svelte take less RSS,
but is a little bit slower.
https://android.googlesource.com/platform/bionic/+/master/docs/native_allocator.md
This is the reason to not enable this target wide.

Change-Id: Ic0d950817238a227218f59b95e5fd2ffd66e786a
2020-12-04 08:42:39 -07:00
LuK1337
77c7d91b39
msm8974-common: Enforce vintf manifest override
* Apparently this is now required on all non full treble devices since
  google added a sleep(1) in libhidl...

Change-Id: I6d8492dd7c56bfdb2ca00f3477634a46fa55b1c0
2020-11-30 22:21:22 -07:00
Bruno Martins
ae581bc02d
msm8974-common: Build 2.1 health HAL
The devices fail to boot otherwise.

Change-Id: I5bc6ae361a5319224b87ef6a4d7127b6b5bc9a97
2020-11-30 22:21:22 -07:00
Ahmed ElArabawy
ba9f5728e6
msm8974-common: Wifi: Remove hostapd hidl entry from manifest.xml
This CL removes the definition for the hostapd hidl interface from
manifest.xml and rely on vint-fragements entry.
This is to avoid the need to modify the revision in future

Bug: 145780363
Test: builds and wifi softap works
Change-Id: I2a9cb25209efc94f6306f38d89cb5e1ff6f72bed
2020-11-27 17:14:35 -07:00
Jimmy Chen
bd39672919
msm8974-common: wifi: move wpa_supplicant VINTF definition to wpa_supplicant module
Bug: 36505680
Test: atest FrameworksNetTests
Test: atest VtsHalWifiSupplicantV1_3TargetTest
Test: connect EAP access point and verify PMK cache works correctly.
Change-Id: I2c382765b8e84951fc17bb9f1c3785dcd66e7b51
2020-11-27 17:14:35 -07:00
Ahmed ElArabawy
5b1348d5e2
msm8974-common: Wifi: Remove IWifi hidl entry from manifest.xml
This CL removes the definition for the IWifi hidl interface from
manifest.xml and rely on vint-fragements entry.
This is to avoid the need to modify the revision in future

Bug: 138243400
Test: builds and wifi works
Change-Id: Icaff93193e10d4953d9947d2739b05959ece79f1
2020-11-27 17:14:35 -07:00
Sarah Chin
bb7c1788d1
msm8974-common: libril: Fix OOB vulnerability in setGsm/CdmaSmsBroadcastConfigInfo
Error if length > 25

Test: lunch cf_x86_phone-userdebug && mm
Bug: 144046782
Change-Id: I18f9745174762a52fc20bfc7273c6b3fd2118da5
2020-11-27 17:14:35 -07:00
terrycrhuang
725f9e8f33
msm8974-common: libril: Encode MCC with 3 digit in CellIdentity
Bug: 145809537
Test: ril::util::mcc::test

Change-Id: Ie0b9d0a56530cc7a2146e9955d392867634d2b8b
2020-11-27 17:14:35 -07:00
Taesu Lee
4f09b93962
msm8974-common: libril: Fix typo
Test: build

Change-Id: I729888834881386d52f072e0444d50b480f85928
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-11-27 17:14:35 -07:00
Elliott Hughes
8a32750c24
msm8974-common: libril: Remove unused includes.
Test: treehugger
Change-Id: Id6ee53aa0e2a83ef40ce9219092f8a0f519b3471
2020-11-27 17:14:34 -07:00
Lucchetto
a968e9600c
msm8974-common: Adapt libinit to Android 11
Change-Id: Ia6b6f753891b639dad4e380bdba6b594faf2a550
2020-11-27 17:14:34 -07:00
Steven Moreland
72fb75e332
msm8974-common: Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iba2cd20b8b20fac3e7564de6b853b475fd4ebd2a
2020-10-29 15:43:06 -06:00
Wang Han
b9a1d97191
msm8974-common: Switch to TimeKeep
* SE policies are imported and modified from
   https://github.com/sonyxperiadev/device-sony-sepolicy.
   Modifications are needed because qcom legacy policy
   contains conflicting labels and rules.

Change-Id: Id04a824dea69976f6fc9d48bef77859cc82971ed
2020-09-07 05:28:51 -06:00
Kevin F. Haggerty
5e12cb3926
msm8974-common: Commonize libtime_genoff.so
Change-Id: Ie63e6864de5ae66e7058f140170f6081317690a7
2020-09-07 04:14:32 -06:00
Kevin F. Haggerty
16a190dd28
msm8974-common: sepolicy: Allow system_app to access storaged via IPC
avc: denied { call } for comm=4173796E635461736B202333
scontext=u:r:system_app:s0 tcontext=u:r:storaged:s0 tclass=binder
permissive=t0

Change-Id: I933dcebf2f5960d639ce47be379f62636e4ddd69
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
9f313b3cee
msm8974-common: sepolicy: Allow system_app to access wificond via IPC
avc: denied { call } for comm=4173796E635461736B202334
scontext=u:r:system_app:s0 tcontext=u:r:wificond:s0 tclass=binder
permissive=0

Change-Id: I5fed7bfa2362bce7fa26d22618b2584a145f5385
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
b17d75621e
msm8974-common: sepolicy: Allow mediaswcodec to use binder IPC
Change-Id: I866c7b0843cd0e64f9f0f2e743b571c87281b086
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
8326e1562c
msm8974-common: sepolicy: Allow system_app to read /proc/pagetypeinfo
avc: denied { read } for name="pagetypeinfo" dev="proc" ino=4026543033
scontext=u:r:system_app:s0 tcontext=u:object_r:proc_pagetypeinfo:s0
tclass=file permissive=0

Change-Id: I16465eb9acca9ff64a755d47f86f4ff424ebe4de
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
5404fa9536
msm8974-common: sepolicy: Quiet system_app attempts to find disallowed services
Change-Id: I6a17bef88c3b9fe9f075dc0ef3de5e203f5d9ce3
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
d6e781307f
msm8974-common: sepolicy: Quiet priv_app opening sysfs_android_usb files
* Reading these is disallowed globally, no need to see logspam of
  open attempts

Change-Id: I4c0094097d39456c65720cbdfb949d14439ce5f4
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
3377f79b53
msm8974-common: sepolicy: Allow system_app to access zram sysfs nodes
avc: denied { search } for name="zram0" dev="sysfs" ino=20744
scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir
permissive=0

avc: denied { open } for name="mem_used_total" dev="sysfs" ino=20804
scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file
permissive=0

avc: denied { read } for name="mem_used_total" dev="sysfs" ino=20804
scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file
permissive=0

Change-Id: Ide9b1a9488b26fa69e7a2c8e73a8e657c8b28beb
2020-09-06 04:12:10 -06:00
Kevin F. Haggerty
a586ba7d50
msm8974-common: sepolicy: Quiet vold finding the bootctl hwservice
* We don't have this

Change-Id: I879f9b30e94c153dfec30ef369ae0ca31e3ab3d7
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
135f55810f
msm8974-common: sepolicy: Quiet zygote reading cmdline
Change-Id: I3fad2a7a3a7e2200453fd40ef325a9f98bce5506
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
39c71a0276
msm8974-common: sepolicy: Allow platform_app to getattr radio_data_file
avc: denied { getattr } for path="/data/user_de/0/com.android.phone"
dev="dm-0" ino=1545357 scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:radio_data_file:s0 tclass=dir permissive=0
app=com.android.systemui

Change-Id: I74744dde2a3af01a4f30e0898889cad13f95d563
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
98dd537e3c
msm8974-common: sepolicy: Allow the BT HAL to read /efs
avc: denied { search } for name="/" dev="mmcblk0p11" ino=2
scontext=u:r:hal_bluetooth_default:s0 tcontext=u:object_r:efs_file:s0
tclass=dir permissive=0

Change-Id: I1a8abfb3d02c5cb3c63c93ff20a2974ff70ecb87
2020-09-06 04:12:09 -06:00
Arne Coucheron
8462d2ec5b
msm8974-common: sepolicy: Allow ueventd to set sys_nice capability
avc: denied { sys_nice } for capability=23 scontext=u:r:ueventd:s0 tcontext=u:r:ueventd:s0 tclass=capability permissive=0

Change-Id: Icfa56283a9b4c67456bd4e714aa3922fece59436
2020-09-06 04:12:09 -06:00
Arne Coucheron
66dcc79709
msm8974-common: sepolicy: Allow gpuservice to read opengles_prop
avc: denied { read } for name="u:object_r:opengles_prop:s0" dev="tmpfs" ino=6353 scontext=u:r:gpuservice:s0 tcontext=u:object_r:opengles_prop:s0 tclass=file permissive=0

Change-Id: I455c5d681e301451ad11210e91d0a71b4b80239a
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
065046fd6d
msm8974-common: sepolicy: Allow fsck_untrusted appropriate access to sysfs_dm
avc: denied { search } for name="dm-0" dev="sysfs" ino=33209
scontext=u:r:fsck_untrusted:s0 tcontext=u:object_r:sysfs_dm:s0
tclass=dir permissive=0

avc: denied { read } for name="name" dev="sysfs" ino=33374
scontext=u:r:fsck_untrusted:s0 tcontext=u:object_r:sysfs_dm:s0
tclass=file permissive=0

Change-Id: I38d74974d23f94ddac4c45f1d5470288d4ee8a6f
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
7bfaa1d75f
msm8974-common: sepolicy: Allow ioctls necessary for physical sdcard operations
* Note: 0x1271 is note defined in system/sepolicy/public/ioctl_defines

avc: denied { ioctl } for path="/dev/block/vold/public:179,65"
dev="tmpfs" ino=19222 ioctlcmd=125e scontext=u:r:vold:s0
tcontext=u:object_r:vold_device:s0 tclass=blk_file permissive=0

avc: denied { ioctl } for path="/dev/block/vold/public:179,65"
dev="tmpfs" ino=20176 ioctlcmd=1271 scontext=u:r:vold:s0
tcontext=u:object_r:vold_device:s0 tclass=blk_file permissive=0

avc: denied { ioctl } for path="/dev/block/vold/public:179,65"
dev="tmpfs" ino=27110 ioctlcmd=125e scontext=u:r:fsck_untrusted:s0
tcontext=u:object_r:vold_device:s0 tclass=blk_file permissive=0

avc: denied { ioctl } for path="/dev/block/vold/public:179,65"
dev="tmpfs" ino=27110 ioctlcmd=1271 scontext=u:r:fsck_untrusted:s0
tcontext=u:object_r:vold_device:s0 tclass=blk_file permissive=0

Change-Id: I7bf2346b9517196160e4dde51baa550fb343bfdf
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
61d3a4eafa
msm8974-common: sepolicy: Allow untrusted fsck to getattr block_device dirs
avc: denied { getattr } for path="/dev/block" dev="tmpfs" ino=6914
scontext=u:r:fsck_untrusted:s0 tcontext=u:object_r:block_device:s0
tclass=dir permissive=0

Change-Id: I03c1086a21edba4e193f81b473e6785aac890364
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
631007d58c
msm8974-common: sepolicy: Update for move of init.{qcom,target}.rc to /vendor
Change-Id: Ic0042ed52e7aeb3faba856411fd0a1b298446125
2020-09-06 04:12:09 -06:00
Kevin F. Haggerty
d9fdcde7d2
Revert "msm8974-common: Make the external camera provider ignore internal cameras"
* Even though camera.device@3.4-external-impl still will look for the
  file, this is seemingly no longer required in Q due to changes
  elsewhere in the stack.

This reverts commit cf207232cb.

Change-Id: Ibd19f4d7abeafb7f4d8af1ca6226d6065058538c
2020-09-06 04:12:07 -06:00
Marc Bourgoin
85c6a473c4
msm8974-common: Symlink bootdevice for Lineage Recovery
* It is needed by OpenGApps install script.

Change-Id: Idb90a6ecaae541e74a9878c1ca93459cc2fdd949
2020-09-02 04:07:16 -06:00
Kevin F. Haggerty
c85904857b
Merge branch 'lineage-16.0' of http://www.github.com/LineageOS/android_device_samsung_msm8974-common into lineage-17.1
* 'lineage-16.0' of http://www.github.com/LineageOS/android_device_samsung_msm8974-common:
  msm8974-common: Build common legacy gnss hal
  msm8974-common: Switch to GNSS HIDL HAL
  msm8974-common: gps: Fix for buffer overrun crash at copying nmea string
  msm8974-common: gps: Replacing copy headers with header libraries
  msm8974-common: gps: Don't rely on transitively included headers
  msm8974-common: gps: Remove nmea log
  msm8974-common: gps: Return the correct length of nmea sentence
  msm8974-common: gps: Default apn ip type to ipv4
  msm8974-common: gps: Suppress unused-parameter warnings
  msm8974-common: gps: Remove owner of gps hal modules

Change-Id: I910806396d54c33727ef3b807404d71786aa74e6
2020-06-28 08:57:55 -06:00
Arne Coucheron
d7a9d16a0f
msm8974-common: Build common legacy gnss hal
Change-Id: I56095b9c3bba065779c90b6aeb61ebfed6af7e77
2020-06-27 16:45:22 -06:00
Kevin F. Haggerty
8e016489ce
msm8974-common: Switch to GNSS HIDL HAL
Change-Id: I881206bed97e700d0022080ec5785fa3756c39bd
2020-06-27 16:44:17 -06:00
Katz Yamada
b3094b1fb9
msm8974-common: gps: Fix for buffer overrun crash at copying nmea string
Add zero clearing of allocated nmea buffer to ensure
the nmea string is null terminated.

Change-Id: Ie36010a7d3eca16dabb3067ae891a94e4b63b10c
CRs-Fixed: 2041933
2020-06-26 18:45:34 -06:00
Vijay Venkatraman
98f5543b46
msm8974-common: gps: Replacing copy headers with header libraries
Bug: 33241851
Test: Build target and pass CTS location tests
Change-Id: I75db5e6de3c4194a6a46e0d37fcd899ea1d1db04
2020-06-26 18:33:09 -06:00
Jiyong Park
2d0c543adb
msm8974-common: gps: Don't rely on transitively included headers
One must explicitly include what it need.
time.h for struct tm.

Bug: 37629934
Test: build

Merged-In: Iacd5317d958f61df062fca40fbf2e8992c7fbb44
Change-Id: I19e1043f23dbe85836b73714a4f1440159ebe419
2020-06-26 18:33:09 -06:00
Dante Russo
1647e1d120
msm8974-common: gps: Remove nmea log
Nmea log print is removed, as it can be
excessive during gps tracking.

Bugs: 29499503 29272976
Change-Id: Ia60295207b6bbbcb24bbede4f1802c0c7a2f2544
2020-06-26 18:33:09 -06:00
Dante Russo
9af0ec4c51
msm8974-common: gps: Return the correct length of nmea sentence
Return the correct length of nmea sentence in the
function loc_eng_nmea_put_checksum(). The correct
length is length of NMEA string including ‘$’
character alongwith length of checksum.

CRs-Fixed: 1020044
Change-Id: I50d80b9c4492de4664bb3ccb7295b0eb4fee15a9
2020-06-26 18:33:09 -06:00
Dante Russo
8483bcb6c9
msm8974-common: gps: Default apn ip type to ipv4
If a apn ip type is not found for a agps
data connection, default to using ipv4
instead of invalid.

CRs-fixed: 1007417

Bug: 28986221

Change-Id: Icc71de1fab3fd5967901c39a5c11eaea17b7766c
Signed-off-by: D. Andrei Măceș <Andrei.Maces@alumni.nd.edu>
2020-06-26 18:33:09 -06:00
Aurimas Liutikas
9f30bd7912
msm8974-common: gps: Suppress unused-parameter warnings
Bug: 26936282
Change-Id: I7fdf58d232a59c0ba0d5f52c0f958f6eab0c4514
2020-06-26 18:33:09 -06:00
Dante Russo
0830f02f9e
msm8974-common: gps: Remove owner of gps hal modules
Owner does not need to be specified for
this project.

Change-Id: I918a767ed3b83e134c5e63ded5b25070b3399ac8
2020-06-26 18:23:52 -06:00
Gary Jian
1f78746f18
msm8974-common: libril: Add RIL_UNSOL_KEEPALIVE_STATUS in ril_unsol_commands.h
Bug: 134048171
Test: 1. Build Pass
      2. Running atest android.net.cts.ConnectivityManagerTest
         #testSocketKeepaliveLimitTelephony and make sure the
         Telephony FWK can receive RIL_UNSOL_KEEPALIVE_STATUS.

Change-Id: I98f8d4a95a6c9c3c078a02aa9fd8722779623f12
2020-06-26 18:11:46 -06:00
Yu Shan
5c0cc31e7c
msm8974-common: libril: Use 32BIT nanopb library.
Test: None
Bug: 122292884
[haggertk: This is only the libril side of this change. We quite
 obviously do not carry our own librilutils]

Change-Id: Idb0d56749e41aa97a760dfed5246330041c3da3a
2020-06-26 18:11:46 -06:00
Gohulan Balachandran
672b247a16
msm8974-common: libril: Handle MCC/MNC in data registration state provided by legacy vendor RILs
Include MCC/MNC provided by legacy (versions 14 and older) vendor RIL
implementations as part of data registration state, in data registration
state reported to clients of the radio HAL service.

Bug: 119904357
Test: local build and did the local test on Marlin device,
      the mcc/mnc value are correct (not -1 and empty string value).

[haggertk: This purposely omits updating the numStrings check in
 getDataRegistrationStateResponse(), given that we purposely changed
 that check in our libril]

Change-Id: I5a26939402b86d889133e16f3508ab76b8bedddc
2020-06-26 18:11:46 -06:00