Commit Graph

874 Commits

Author SHA1 Message Date
Paul Keith c8d45dba1c klte-common: Transition to TARGET_LD_SHIM_LIBS
* Limits security exposure from shims

Change-Id: I877192422062f3e59c81a7130ad1a2b4be5d1647
2018-02-16 16:44:53 +01:00
Kevin F. Haggerty 9da1285c16 klte-common: init: restorecon .wifiver.info on boot
* We're messing with ownership and permissions here, so let's go
  ahead and fix the context of this near worthless thing.
* The kernel will create it, we also write it here which will create
  if it doesn't exist, so this is more manageable than chasing the
  type_transition path
* The file is already labeled as a wifi_data_file, so fix this to
  eliminate the below denial

avc: denied { read } for name=".wifiver.info" dev="mmcblk0p26"
  ino=12 scontext=u:r:hal_wifi_default:s0
  tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0

Change-Id: Ie736b68f7d4d8559237b5cce072c6bf26f7ac4e7
2018-02-16 07:21:09 -07:00
Kevin F. Haggerty 01ebfad97a klte-common: sepolicy: Allow FP HAL more privs for vcs_data_file
avc: denied { read } for name="validity" dev="mmcblk0p26"
  ino=219889 scontext=u:r:hal_fingerprint_default:s0
  tcontext=u:object_r:vcs_data_file:s0 tclass=dir permissive=0
avc: denied { write } for name="validity" dev="mmcblk0p26"
  ino=219889 scontext=u:r:hal_fingerprint_default:s0
  tcontext=u:object_r:vcs_data_file:s0 tclass=dir permissive=0
avc: denied { create } for name="finger.db"
  scontext=u:r:hal_fingerprint_default:s0
  tcontext=u:object_r:vcs_data_file:s0 tclass=file permissive=0

Change-Id: I2e0caa8b3763b8cdcd19b40d174f1a8fc3dc332e
2018-02-15 21:45:17 -07:00
Kevin F. Haggerty 61eedfac83 klte-common: sepolicy: Allow tee more privs for vcs_data_file
avc: denied { add_name } for name="5dsokxEEDXgQhkN50bp-Z2K5InM_"
  scontext=u:r:tee:s0 tcontext=u:object_r:vcs_data_file:s0 tclass=dir
  permissive=0
avc: denied { create } for name="5dsokxEEDXgQhkN50bp-Z2K5InM_"
  scontext=u:r:tee:s0 tcontext=u:object_r:vcs_data_file:s0 tclass=dir
  permissive=0
avc: denied { write } for name="validity" dev="mmcblk0p26" ino=81441
  scontext=u:r:tee:s0 tcontext=u:object_r:vcs_data_file:s0 tclass=dir
  permissive=0
avc: denied { create } for name="AdVIudLPitjpV7ZB04m7UvhkKdg_"
  scontext=u:r:tee:s0 tcontext=u:object_r:vcs_data_file:s0 tclass=file
  permissive=0

Change-Id: I4798dd5cff58b7948222124b6879d8303c36af27
2018-02-15 21:44:53 -07:00
Kevin F. Haggerty b4fa870ac0 klte-common: Move acdbdata files to vendor/etc/acdbdata
* Updated libacdbloader.so kanged from hlte-common

Change-Id: I6fbe98759b94be483d26d9f1b353e3ea9bbe176a
2018-02-12 06:35:08 -07:00
Kevin F. Haggerty 3f95d688fb klte-common: proprietary-files: Update source package note
* G900FXXU1CRA2_G900FOXA1CRA2_BTU

Change-Id: Idb93067673aa1861db44125b9953be0312a0101e
2018-02-10 17:40:02 +00:00
Paul Keith 4f9a109870 Revert "klte-common: Set TARGET_BOOTANIMATION_HALF_RES to true"
* Moved up to msm8974-common

This reverts commit 458617d999.

Change-Id: I88a23580a482eba2b56e88caca8b0d954a20903b
2018-02-10 17:01:57 +01:00
Kevin F. Haggerty 817309ffc5 klte-common: bluetooth: Sort vnd_hlte.txt alphabetically
* For great sanity

Change-Id: I27ff1355e6bf668200d98bee09d0ad85631e6330
2018-02-09 10:55:41 -07:00
Paul Keith c453c83a25 klte-common: Update ril.h to be inline with msm8974-common
Change-Id: I736f34d0acd1428bb7a78417c4c35bf5bccc5cec
2018-02-08 03:57:56 +01:00
Kevin F. Haggerty 8153e77961 klte-common: Drop libril
* We're going to use the shared version from msm8974-common now

Change-Id: Ie4e6336209a5fb6881cd52807082ea2acffd1c8c
2018-02-05 21:30:06 -07:00
Kevin F. Haggerty b056056922 klte-common: power: Add legacy qcom HAL compat code
* msm8974-common may end up going back and forth between legacy
  and HIDL HALs, so let's be compatible with both for the time
  being.

Change-Id: I5067fc474d7878a0f68e25c70b723de0e813d7c1
2018-02-06 00:33:30 +00:00
Kevin F. Haggerty 96de9ccf0d klte-common: sepolicy: Move common items to msm8974-common
* The bulk of this policy isn't specific to klte, so let's move
  it somewhere that allows the maintenace of it to help other
  impacted devices.

Change-Id: I57b0d24d25e5871c5aa69d415b94ca21f89c1794
2018-02-03 15:15:57 -07:00
Michael Bestas 16c0928bde klte-common: Move permissions to vendor
Change-Id: Idf4022e03ba376f7971d02be973444e70dbc4521
2018-02-03 15:15:57 -07:00
Kevin F. Haggerty 98a8598e79 Revert "klte-common: Add AID_QCOM_DIAG, AID_RFS, and AID_RFS_SHARED to config.fs"
This reverts commit c4a708a54f.

* Move this to msm8974-common

Change-Id: I43c92dfad3ba55b344572afaed5c1dbeca5969c1
2018-01-26 06:29:43 -07:00
Kevin F. Haggerty ea4c5a7d12 Revert "klte-common: ril: add squash of OSS libsecnativefeature"
This reverts commit a52ac565ce.

* Every Samsung msm8974 device needs this, so to -common it goes

Change-Id: I44219d49128c356a6f18ebf3462ced427d78c960
2018-01-23 06:42:08 -07:00
Kevin F. Haggerty d2dd4bd21e Revert "klte-common: Use 64-bit binder API"
This reverts commit aae26bb6aa.

* Moving this to msm8974-common

Change-Id: Iae09793d796e96d4724d10dace0eca819b3e3d81
2018-01-20 06:46:35 +00:00
Kevin F. Haggerty 669f00e706 klte-common: sepolicy: Clean up previous commit
* Some idiot did a 'git push lineage HEAD;refs/for/lineage-15.1'
  instead of a 'git push lineage HEAD:refs/for/lineage-15.1'.
  Do you see the difference?
* Delete all of the old policy items and commented-out lines like
  the previous commit promised.

Change-Id: I6cd8a8cffc76661b6de486e6b8550bafa83f5de9
2018-01-19 16:18:46 -07:00
Kevin F. Haggerty 5045387dec [DO NOT MERGE] klte-common: sepolicy: Rewrite for O
* WIP
* KILL that sepolicy/old/ before merging
* KILL the dontaudits before merging

Change-Id: I6694567fa1c834b262941b9be362c96cbd16625e
2018-01-19 16:07:35 -07:00
Paul Keith 31509201c1 klte-common: HAXX: "Fix" race condition in init
* In particular, the RIL on CDMA variants seems to only work reliably
  on first boot after flash, when things are all slowed down while
  dexopting. After that first boot, it's hit and miss whether a
  particular boot will have function RIL
* Slow things down by limiting ourselves to a single CPU on boot,
  bringing the rest online when boot has completed

Change-Id: Ie194740cf0487268dc0dbd3377bbb790cdd1b04d
2018-01-19 16:07:35 -07:00
Paul Keith a466cb6ca6 klte-common: libril: Get off my back
* Checking numInts and numStrings for strict equality when
  we're not looping is dumb, because Samsung is notorious
  for sending extra information in their RIL (mostly VZW)
* Check if there's *enough* data rather than the *exact amount*
  to fix a bunch of invalid response errors for Verizon

Change-Id: I14bc37240e5760b4629fcb74b64f25ad95d4fdfc
2018-01-19 16:07:35 -07:00
Paul Keith ae4dd1ba1a klte-common: Fixup RIL_Call structure
* Because of how structure alignment works,
  adding these unused chars here is unneeded
* This makes this structure more understandable
  when looking at the stock RIL java class
* Move Samsung call details as the 8 bytes before
  the RIL_UUS_Info pointer, to match stock

Change-Id: I2e62be0b1774209c0165ece90588ecb7aeb042e3
2018-01-19 16:07:35 -07:00
Paul Keith b22d8dd773 klte-common: libril: Fix RIL_UNSOL_NITZ_TIME_RECEIVED Parcel
* Sometimes, the modem is sending 1-2 extra fields with
  the country mcc, which confuses ServiceStateTracker
* Drop the extra data here, instead of in our RIL class

[haggertk]: Forward port to ril-caf on lineage-15.

Change-Id: Ifbec67bb0dac271226bd8b5471deaf6a2ef33f2b
2018-01-19 16:07:35 -07:00
Paul Keith 71545f0b74 klte-common: libril: Add workaround for "ring of death" bug
[javelinanddart]: Forward port to ril-caf on lineage-15.1

Change-Id: Ifeeee11ee83deddb8eff565847641c45a105378f
2018-01-19 16:07:35 -07:00
Kevin F. Haggerty b3441fb51c klte-common: Update RIL_REQUEST_QUERY_AVAILABLE_NETWORKS response prop
* mQANElements never made tremendous sense, the response strings
  are not part of an object, just a text string making up a parcel.
* ro.ril.telephony.mqanelements -> ro.ril.telephony.qan_resp_strings
  for consistency with some of the other new RIL props.

Change-Id: I6f941f5177852454a4d4b9494077329814d884f1
2018-01-19 16:07:35 -07:00
Martin Bouchet 5d5a569ee6 klte-common: libril: fix network operator search
* For search, the number of strings returned for
  RIL_REQUEST_QUERY_AVAILABLE_NETWORKS should be defined in the system
  prop ro.ril.telephony.qan_resp_strings

Change-Id: Ie5bb8ba80c5ac93b7502da3b1bb3d2b4404ecd5e
2018-01-19 16:07:35 -07:00
Kevin F. Haggerty 345ceb6a2c klte-common: libril: Fix SMS on certain variants
* Samsung added an int to the end of the RIL_SMS_Response
  struct in some of the variants (like vzw) but not all
* The presence of this field was discovered by examining
  the stock RIL.java, which conditionally read an extra
  int from the parcel, based on the device specific
  CscFeature_RIL_SmsErrorClassRetry feature
* This causes SMS messages to show as "failed to send"
  in the app, when they actually suceeded in sending
* Allow Samsung's custom struct and AOSP's to fix it

* Forward port to ril-caf on lineage-15.1

Change-Id: I6b3e545c2c42ab2de2ac11e93dfdf9546248080a
2018-01-19 16:07:35 -07:00
solk2 613d3fdea2 klte-common: libril: Fix RIL_Call structure
* Samsung added call_id as the second byte of index
* Split index to avoid a workaround in RIL subclass
* Add Samsung call detail fields, reorganize to fix
  incorrect structure, to avoid hacks in RIL class

Change-Id: I023228c05165c0cef9b698846a96484a6d318092
2018-01-19 16:07:35 -07:00
Paul Keith 1bafc74e01 [DO NOT MERGE] klte-common: libril: Add Samsung changes
* Changes in ril.cpp based off of hardware/samsung/libril

[haggertk]: Forward port to ril-caf on lineage-15.1 by
            remapping all the samsung unsol responses
            to NULL with the old response in a comment,
            and all the samsung requests to NULL with
            the old request mapping in a comment.
            This is safe because nothing in AOSP knows
            about any of Samsung's requests/responses

***** SIGNAL STRENGTH HACKS NOT PORTED YET *****

Change-Id: I59bad9925d141e6cefbc24d4eefdc0c79017852a
2018-01-19 16:07:35 -07:00
Kevin F. Haggerty bcc9a6c694 [DO NOT MERGE] klte-common: import libril from hardware/ril-caf
* Branch LineageOS/android_hardware_ril@55fb07ad (staging/lineage-15.1-caf)
  + https://review.lineageos.org/#/c/199884/

Change-Id: Ic2095f4da30a599cf25a51e286a5b9ce9096dc82
2018-01-19 16:07:35 -07:00
Kevin F. Haggerty 09d3880491 klte-common: Update DSDS init script handling
* Importing this in init.qcom.rc, especially when not all builds
  have it is hacky. We'll have those devices install the script
  into vendor/etc/init and let init handle it automatically, just
  like the primary rild.rc script.
* Update the package name to align with the new name of the script.

Change-Id: I8eaf76c5c4f0aa590ebb1a396afa837597ebc26d
2018-01-19 21:41:18 +00:00
Paul Keith fb7006f016 klte-common: power: Update power hal extension for new qti hal
* And fix the LOG_TAG while we're at it

Change-Id: I81678e10385fef4c6881c17813f8ffa89caa2629
2018-01-19 20:08:28 +00:00
Paul Keith 26ec92cc67 klte-common: Cleanup symlink code
* Remove compat symlink migration
* Fix comment about symlinking

Change-Id: Id92408bdcbdbe7f8331563750ba645445138ff80
2018-01-19 20:05:03 +00:00
Paul Keith f1fa05ecd0 klte-common: Fix nfcee_access.xml copying
* The Nfc package still expects this in /etc

Change-Id: Id8e9714f96ad1ff145f90838be8e2670a26eb342
2018-01-18 22:07:35 +01:00
Kevin F. Haggerty b01f551ffa klte-common: Drop GPS HAL source
* This has moved to msm8974-common

Change-Id: Ie6e09145d26ad7e32e073fd64ec497c7bb72a9f4
2018-01-18 11:56:24 +00:00
Kevin F. Haggerty 48aebf6ac7 klte-common: Drop GPS configs/PRODUCT_PACKAGES/blobs
* These have moved to msm8974-common

Change-Id: Ib4cd06549a862f098da692b3a9bd111fd9e9eab7
2018-01-18 04:54:37 -07:00
Kevin F. Haggerty 22b58b4cc9 klte-common: Drop GPS overlays
* These have moved to msm8974-common

Change-Id: Idd45ab56f93b6391e6111933b2cf551910acd6b0
2018-01-18 04:53:43 -07:00
Kevin F. Haggerty a4695ab180 Revert "klte-common: Add bootdevice to kernel cmdline"
This reverts commit 6daa361afe.

* We're out of cmdline space and we don't even make use of the symlink
  that this used to automatically create.
* If we ever want to use the bootdevice symlink, just create it
  explicitly (without prop) in init.qcom.rc

Change-Id: I1c45c3ed3605f4020d824be2775639c04ba8b60d
2018-01-16 00:21:55 -07:00
Kevin F. Haggerty cf10d879d0 klte-common: Drop the hacky deferred initcalls trigger script
* Yes, I could do the sepolicy that lets this run correctly, but why?
  Even if the phone takes 0.5s longer to boot, will you really even
  notice? We are going to disable the deferred initcalls in the
  kernel and let it do its thing the more "normal" way.

Change-Id: I2a9c50f12f4309923f3cdf6e646cad8edf717560
2018-01-15 21:12:19 +00:00
Kevin F. Haggerty 18cd7a3e13 klte-common: Move charger service into the charger domain
* O split charger and healthd into different processes, with healthd
  running only in an full Android environment and charger running in
  charge-only and recovery. It also updated the healthd sepolicy and
  created a separate charger one.
* We've been using the charger symlink for ages, but the healthd
  domain is no longer appropriate.
* See for details:
  LineageOS/android_system_sepolicy@dc08245c
  LineageOS/android_system_core@526f8cf3

Change-Id: I6f528ffdcb7b14f9a51fd4246770ceecf8fb968b
2018-01-14 22:15:04 +00:00
Kevin F. Haggerty fb15556b51 klte-common: Kill blur overlay
* Not ported to lineage-15.x (yet!?!?)

Change-Id: I741dc74d1e374edd8f1cf6a7fdddd9fa6c4f7fdf
2018-01-14 11:55:16 +00:00
Bruno Martins db7b5ef06a klte-common: overlay: Update for moved hardware key overlays
* These have now been moved to the SDK

Change-Id: Iff6c01ac3313928b79e5575064dce6070c23c114
2018-01-13 01:34:14 -07:00
Kevin F. Haggerty e692c8cfed klte-common: Fragment NFC support based on chip type
* Configs and board/product makefiles are split into discrete
  directories based on NFC chip. These chain to truly common
  makefiles that add permissions and shared PRODUCT_PACKAGES.
* Relocate libpn547_fw under the nfc/pn547 directory.

Change-Id: Ie9e87fc0566eac76fc411b3e5669564c5fa54123
2018-01-08 06:40:16 +00:00
Luca Stefani b75813297e klte-common: fstab: Update ZRAM comp streams flag
* AOSP now support it as max_comp_streams

Change-Id: I094f1e15f386cb7aa7909df2f7c91b93148eb840
2018-01-08 05:50:58 +00:00
Bruno Martins acf40073dd klte-common: Enable radio service 1.1
Change-Id: Ie3cb5f7075c66f6870961415b1096ca6eeb50d0e
2018-01-05 18:47:35 +00:00
Kevin F. Haggerty cbbf8571ad klte-common: Chain extract-files and setup-makefiles to msm8974-common
* This is necessary to fully-execute both of these processes

Change-Id: I6f7a5542541ae30b999e617fe84aa6c0e9cab563
2018-01-02 13:58:27 +00:00
Kevin F. Haggerty 507b5e013d klte-common: Drop shared blobs from proprietary files list
* These come from msm8974-common now

Change-Id: If14f618c9dad2c2bb19b0a806f85fb19b2b97318
2018-01-02 13:57:58 +00:00
Kevin F. Haggerty 7915dc24f9 klte-common: Enable single/dual SIM support with fragments
* klte-common has to support both single- and dual-SIM devices, and
  there are multiple devices of each kind. It makes most sense to
  provide fragments in the -common tree that these devices can inherit
  to configure HIDL manifest, system properties, audio support, and
  any additional services necessary for MSIM support.

Change-Id: Ic3b04fa500615c33cef9b0f0a999209150969123
2017-12-30 15:07:32 -07:00
Christopher R. Palmer 1dbfdd79c5 klte-common: gps: Unlock the GPS
[haggertk]:
 * During bring-up of O, GPS was exhibiting different behavior from
   N -- an appropriate number of satellites would immediately lock,
   but a fix would not resolve for 30-90 seconds. Digging up this
   change from the L-era allows GPS to resolve a fix in a nominal
   amount of time.

Change-Id: If9fd67483fedee915d46f7b9d2a7e0851400de3c
2017-12-30 04:41:02 +00:00
Kevin F. Haggerty 6a8a736148 klte-common: Move common things to msm8974-common
* All of these are/can/will be shared by this, hlte, lt03lte for
  O and beyond

Change-Id: I096948538dcf14d6070bb6cc2102e7b7586fd0c7
2017-12-29 14:45:54 -07:00
Paul Keith f999621c0c klte-common: Split out fingerprint support
* kltesprsports doesn't have a fingerprint scanner, so variants
  supporting one can include fingerprint/board.mk in BoardConfig.mk,
  and fingerprint/product.mk in device.mk to avoid polluting the
  kltesprsports build with fingerprint-related items.

Change-Id: I2fb1652d771740d05c3ec083054960fbe326bea4
2017-12-28 20:19:21 -07:00