Commit Graph

174 Commits

Author SHA1 Message Date
Lalit Kansara
dbafdacb41 msm8974-common: Prefix AID with VENDOR_
Change-Id: I560eb0fb5ca248b20765fe564139c1f7cc1dbc93
2018-08-27 22:18:46 -06:00
Hung-ying Tyan
2e7e451227 msm8974-common: manifest: Uprev configstore (1.0 -> 1.1)
Bug: 69691076
Test: Built and tested on device
Change-Id: I16f06827ef83711c9e29698540ffcec658081fda
2018-08-21 21:44:04 -06:00
Hashbang173
5e3b3ba5e3 msm8974-common: Enable HWC2on1 adapter
* This fixes display (see: d265c42386)

Change-Id: Ic749a38828563be7dacd005aeb91dbce3121ae07
2018-08-20 17:53:16 -06: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
LuK1337
3b6f6bb075 msm8974-common: sensors: Adjust for our usecase
* Rename hals.conf -> _hals.conf so legitimate
  MultiHAL won't attempt to load our HALs.
* Rename multihal -> multihal-samsung8974 so soong
  doesn't complain about duplicate package names.
* Remove USE_SENSOR_MULTI_HAL flag requirement so
  we can actually build it.
* Use TARGET_BOARD_PLATFORM variable in package
  name because it's a common tree.

Change-Id: Ifa8c20747e3f0bf9bae8b42dd4c499cf6d770e27
2018-08-05 08:34:09 -06:00
LuK1337
e0db06fff8 msm8974-common: Import sensors MultiHAL
Change-Id: I8dbe13560d74f88109b7265d1c511ad3beab731e
2018-08-05 08:22:14 -06:00
D. Andrei Măceș
289c1006ef libril: Protect against NULL unsolicited response function
Upstream change I732234a22328a1bfcb603bb020547f543b6fd766 makes
RIL_UNSOL_DC_RT_INFO_CHANGED's responseFunction() NULL, without
protecting against it in RIL_onUnsolicitedResponse(), thus crash-
ing at least hammerhead's RIL stack upon mobile data connection.

https://android-review.googlesource.com/#/c/platform/hardware/ril/+/345950/

Change-Id: I6567019cb6daf6492a29e04cc9872e69b2ba456d
Signed-off-by: D. Andrei Măceș <Andrei.Maces@alumni.nd.edu>
(cherry picked from commit e73eafff8695ab28201acbc03a362d5b177047aa)
2018-07-24 06:17:08 -06:00
Gareth Kitchen
d3810f950a Localise NTP to improve GPS TTFF
Testing response times to time.android.com from around the globe reveals
in ms:-

Europe			 <30
Middle East		 <68
North America		<150
Johannesburg		 183
Buenos Aires		 220
Tokyo			 226
Sydney			 276
Hong Kong		 285
Brisbane		 295
Mumbai			 349
Beijing			4691
Shanghai		4906
Russia			 n/a

Whilst time.android.com is NOT used for GPS NTP, North American time servers
are, by specifying north-america.pool.ntp.org as default in the framework,
to align with pixel devices.  I am assuming similar response times to these
servers from around the world.

Great for North America and it appears Europe but it does not address the
global issue. Also, the pool.ntp.org project forbids both hardware and
software vendors from using these default zone names.
http://www.pool.ntp.org/en/vendors.html

It makes sense, therefore, to leverage the ntp.org's existing 'android' vendor
name to make the default ntp server for GPS purposes:
1.android.pool.ntp.org this will return a random but accurate NTP server in
close geopraphic proximity to the device.

Testing on my own build in the UK seems to improve hot and cold TTFF
considerably.

Change-Id: I144af45757efa35b32daf034eece6e046d2bde79
2018-07-17 19:28:25 -06:00
Paul Keith
cf7ed4588b msm8974-common: Correct MCC code for Verizon CarrierConfig
* Verizon's operator numeric is 311480 not 310480

Change-Id: I0732fc277f412c151a235a4abdc27011d7ba10c7
2018-07-03 07:24:08 -06:00
Paul Keith
754d229086 msm8974-common: Add comments to explain carrier hackery
Change-Id: Id414b2daa08186f2f426f450391a8d2c0b695397
2018-07-03 07:24:08 -06:00
Paul Keith
b1352d7bec msm8974-common: Don't mess with APN or CDMA CarrierConfig options
* These should be set appropriately by carrier, and should already be
  at the correct values by default in packages/apps/CarrierConfig

Change-Id: I433b110570c2b79b15076dadf58777e0289e347a
2018-07-03 07:24:05 -06:00
Paul Keith
8e587068f7 msm8974-common: Move sprint_mwi_quirk overlay to CarrerConfig
[javelinanddart]: msm8974-common never had sprint_mwi_quirk

Change-Id: I65cbdb8cb0305f41735ddcafe275250c678dda55
2018-07-02 18:32:34 -06:00
Paul Keith
1d79ff94da msm8974-common: Import CarrierConfig overlay
* From LineageOS/android_device_samsung_klte@3ea5d5050b

Change-Id: Ifcb775aa6a1893dd3e2ad93c81b338493cd9337a
2018-07-02 18:32:33 -06:00
Paul Keith
86e492652d msm8974-common: libril: Use libril way of freeing strings for nitz hack
Change-Id: I7addc27abb3730873799518ea2ac6ec51a280bd9
2018-07-02 18:32:28 -06:00
Kevin F. Haggerty
8f6082f460 msm8974-common: libril: Build non-inlined android_atomic methods
* All of the libsec-ril*.so libraries reference these symbols, but
  Google finally dropped the non-inlined versions from libcutils with
  Android 8.0. This could be handled with shims in numerous device
  trees, but shim semantics and implementation aren't exactly stable
  and we can handle it more cleanly here in one place.
* See LineageOS/android_system_core@103e8f560

Change-Id: I787372b739f3ace0d9cbbc33e4bffafa6876665e
2018-06-15 15:03:03 -06:00
Kevin F. Haggerty
f7e78593f9 msm8974-common: proprietary-files: Drop libuiblur.so
* This isn't a thing on 15.1

Change-Id: Id6cf006a263c0d1a2e13e540b4b4825d0d67e097
2018-06-14 18:24:58 -06:00
Bruno Martins
56a46f0d66 msm8974-common: Inform Trust about legacy encryption support
* Encryption causes noticeable performances loss, because HW crypto
   is not suported.

Change-Id: I4336c0cd050584020780d8ff97f454e40c7e6125
2018-06-13 07:30:43 -06:00
Zhao Wei Liew
855591ca38 msm8974-common: Enable legacy mediaserver
Change-Id: I4881ce7a0342b0dc9a9c50d6870f1b072b45af82
2018-04-24 17:33:25 -06:00
Kevin F. Haggerty
245828cf0c msm8974-common: No tenemos HWC2
Change-Id: I56932ab5ed3ae6ab930f40a549fdcf7b3806c5e2
2018-04-04 18:38:42 -06:00
Bruno Martins
73f591dd82 msm8974-common: libinit: Handle overriding system and vendor props
* Up until now, vendor build properties were added into /system/build.prop
   when property split isn't enabled. However, Google realised that
   either /vendor/build.prop or /system/vendor/build.prop can always exist,
   and decided to clean up code and always install vendor build props
   into $(TARGET_OUT_VENDOR)/build.prop.

 * For this reason, the unified devices that used to override build props
   such as build fingerprint, will need to override the matching vendor
   build props.

Change-Id: Iacdd8eb67543daff5a46b92dbaf17cd094ce462b
2018-04-02 06:32:31 -06:00
Kevin F. Haggerty
d766a7e028 msm8974-common: sepolicy: Resolve misc denials
avc: denied { chown } for capability=0 scontext=u:r:thermal-engine:s0
tcontext=u:r:thermal-engine:s0 tclass=capability permissive=0

avc: denied  { find } for interface=android.hardware.camera.provider::ICameraProvider
pid=1315 scontext=u:r:mediaserver:s0 tcontext=u:object_r:hal_camera_hwservice:s0
tclass=hwservice_manager permissive=0

avc: denied { getattr } for pid=1940 comm="mount.ntfs"
path="/dev/block/mmcblk0p23" dev="tmpfs" ino=6957 scontext=u:r:vold:s0
tcontext=u:object_r:system_block_device:s0 tclass=blk_file permissive=0

avc: denied { read write } for pid=1370 comm="mm-qcamera-daem" name="rear_corever"
dev="sysfs" ino=24696 scontext=u:r:mm-qcamerad:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=0

avc: denied { search } for pid=561 comm="mm-qcamera-daem" name="camera"
dev="sysfs" ino=24680 scontext=u:r:mm-qcamerad:s0
tcontext=u:object_r:sysfs_camera:s0 tclass=dir permissive=0

avc: denied { getattr } for pid=1950 comm="mount.ntfs"
path="/dev/block/mmcblk0p24" dev="tmpfs" ino=8134 scontext=u:r:vold:s0
tcontext=u:object_r:cache_block_device:s0 tclass=blk_file permissive=0

avc: denied { getattr } for pid=1926 comm="fsck.ntfs" path="/dev/block"
dev="tmpfs" ino=6956 scontext=u:r:fsck_untrusted:s0
tcontext=u:object_r:block_device:s0 tclass=dir permissive=0

avc: denied { getattr } for pid=1948 comm="mount.ntfs"
path="/dev/block/mmcblk0p12" dev="tmpfs" ino=8090 scontext=u:r:vold:s0
tcontext=u:object_r:efs_block_device:s0 tclass=blk_file permissive=0

avc: denied { read } for pid=339 comm="mediaserver" name="rear_camfw_load"
dev="sysfs" ino=24694 scontext=u:r:mediaserver:s0
tcontext=u:object_r:sysfs_camera:s0 tclass=file permissive=0

Change-Id: Ieb941d135d9f245f4a2bb9abb78e1b84bbef4b38
2018-03-31 09:25:48 -06:00
Kevin F. Haggerty
e405ae831d msm8974-common: sepolicy: Allow mediaextractor r_file_perms to fuse:file
* This is necessary for the built-in music player to play files off
  of fuse (NTFS, in our case, for the most part) volumes

Change-Id: Ib6fffb5c2b5c8c514979a7aabce949d82902b2d1
2018-03-18 17:23:30 -06:00
Kevin F. Haggerty
399e9af90a msm8974-common: Move XTRA_SERVER entries to overlays
* XTRA_SERVERs are important, right? Like to get the almanac data
  necessary for aGPS. Without the XTRA download, the chip needs to
  collect sufficient navigation messages from the birds to compute
  where they are in order to make sense of the ranging signals.
* Well, it seems that O doesn't like reading these entries from the
  gps.conf file.

  When in gps.conf:
  GpsXtraDownloader: No XTRA servers were specified in the GPS configuration

  When in overlay:
  <that noise doesn't exist>

* This seems to, finally, return GPS fix performance to what we had
  in N.

Change-Id: I70679835ec5dea053c5aa3750acee628906d6390
2018-03-07 06:44:43 -07:00
Paul Keith
306c353400 msm8974-common: Allow overriding full dex preopt
* This is wonderful for users, but I want to override this

Change-Id: I12b0cd7620b4615f8f3ba945fbae8a332d4ea203
2018-03-03 05:39:35 +01:00
Paul Keith
da14a8d88a msm8974-common: libril: Fix RIL_Call struct for 64-bit platforms
* While msm8974 is not 64 bit, certain users of this libril will be
* A previous revision of this libril had 16 bytes of padding in this
  struct for 64-bit platforms (due to word size and struct alignment),
  but a change by me to use a long instead of a pointer and an int
  broke this padding for 64-bit platforms because a long is still
  just 8 bytes on 64-bit platforms, where 16 bytes is necessary
* Use two pointers as padding instead to make 64-bit great again

Change-Id: If599bdb625f7a45e083f5b30df512d12810be79b
2018-03-01 19:48:48 +00:00
Kevin F. Haggerty
778c310204 msm8974-common: sepolicy: Add policy statements for power HAL
Change-Id: I5fbf737a2dddf4e70a1a51e23b2e06a153a6f769
2018-02-28 07:17:50 -07:00
Kevin F. Haggerty
993b723e0b Revert "Revert "msm8974-common: Use QTI HIDL power HAL""
This reverts commit 24d70a1aec.

* The new HIDL power HAL seems to be appropriately riced^Wfixed for
  8974 now.

Change-Id: I629ab2314dec4698a0d4d45d77cdc48bf92a4d74
2018-02-27 20:37:50 -07:00
Paul Keith
f159447f74 msm8974-common: Remove exfat and ntfs sepolicies
* They are labelled as vfat now

Change-Id: I1f1df3b7c1c294b2efb5ce9417838b9932eb08f1
2018-02-22 23:27:10 +01:00
Paul Keith
a6a77f987c msm8974-common: Wire up mDNIe features
Change-Id: Ib5d2825bb50c90b6743157bd624e7156c6d5ad01
2018-02-22 23:27:10 +01:00
Zhao Wei Liew
e05835ea4d msm8974-common: Enable HBM for outdoor mode
Add a device-specific SunlightEnhancement CMHW class.

In addition to enabling outdoor mode, crank the display brightness
up, allowing for much better visibility in bright sunlight.

Change-Id: I6a87d438a0aecd9e068de932d4133e69e0563cf8
2018-02-22 23:25:57 +01:00
razorloves
6279ca895c msm8974-common: update dexpreopt option
The recent change we made in the build repo makes all
builds dexpreopt only boot img and system server.
This changes angler builds back to full dexpreopt.

Change-Id: I0cf03634ee7bbc93b18b49d3f1efe82a6302b447
2018-02-17 22:54:08 +00:00
Paul Keith
d5d83cb89e msm8974-common: Remove noatsecure
* Shims have been moved to a board flag, so we no longer need
  noatsecure to make LD_SHIM_LIBS persist through services

Change-Id: I94b8c30e28e6dd297e0020ddfb46b2af21068721
2018-02-17 13:20:49 +00:00
Kevin F. Haggerty
4bb6449aad msm8974-common: sepolicy: Allow hostapd to read wifi rfkill dev
avc: denied { read } for name="rfkill" dev="tmpfs" ino=8177
  scontext=u:r:hostapd:s0 tcontext=u:object_r:wlan_device:s0
  tclass=chr_file permissive=0

Change-Id: Iea5deec2736f0eac50aa30858889d51b86e58788
2018-02-16 17:15:39 -07:00
Kevin F. Haggerty
6e24e03dd3 msm8974-common: Set TARGET_BOOTANIMATION_HALF_RES to true
* No apparent resolution difference
* Much smoother animation
* Much faster boot
* What's not to like?

Change-Id: I2119fe826146a3103da50b4862ad88f5950a97ec
2018-02-10 17:38:46 +00:00
Paul Keith
71900d444e msm8974-common: libril: Add hacks for spliting of index
* This is based on how it was done in cm-14.1, but redone
  because the old code completely ignored signedness
* Samsung, in their stock RIL.java, reads index as an int,
  sets the first 8 bits to index, the next 8 bits to call_id,
  and ignores the upper 16 bytes of the int parcelled up
* This emulates that behavior here, except it only sends the
  first 8 bits so that AOSP's RIL.java doesn't get confused

Change-Id: I5c78447fdef7d5fd7fc39addb970300ee1188cd1
2018-02-08 03:48:38 +01:00
Paul Keith
dc5d57cf0a msm8974-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-02-06 04:29:30 +00:00
Paul Keith
6f2f2902ee msm8974-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
* Check if there's *enough* data rather than the *exact amount*
  to fix a bunch of invalid response errors

Change-Id: I14bc37240e5760b4629fcb74b64f25ad95d4fdfc
2018-02-06 04:26:37 +00:00
Paul Keith
2d9467684d msm8974-common: libril: Add workaround for "ring of death" bug
[javelinanddart]: Forward port to ril-caf on lineage-15.1

Change-Id: Ifeeee11ee83deddb8eff565847641c45a105378f
2018-02-06 04:25:39 +00:00
Martin Bouchet
e384dfb0f8 msm8974-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-02-06 04:25:17 +00:00
Kevin F. Haggerty
8c30fb5d12 msm8974-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-02-06 04:24:32 +00:00
Paul Keith
9a9121b070 msm8974-common: libril: Add Samsung changes
***** SIGNAL STRENGTH HACKS NOT PORTED YET *****

[javelinanddart]: Redo this code from 14.1 to include
  the proper RIL_Call fixes, no Samsung unsol/request
  handling as it was unnecessary, and a extensible way
  to remap RIL unsols if necessary for the device

Change-Id: I59bad9925d141e6cefbc24d4eefdc0c79017852a
2018-02-06 04:24:06 +00:00
Kevin F. Haggerty
47a0f43fd5 msm8974-common: ril: Makefile maintenance
* Add top-level Android.mk
* Invert libril/Android.mk build guard (build if BOARD_PROVIDES_LIBRIL
  is true)

Change-Id: I4eb6c2316d268c2f8045dbb909322b731df47d8c
2018-02-06 04:22:25 +00:00
Kevin F. Haggerty
54fdadc48b msm8974-common: ril: Import libril from hardware/ril-caf
* LineageOS/android_hardware_ril@1375242 (staging/lineage-15.1-caf)

Change-Id: Id1b4abe64f6b8f65cc88555ff4799f71f3264f6b
2018-02-06 04:22:04 +00:00
Kevin F. Haggerty
24d70a1aec Revert "msm8974-common: Use QTI HIDL power HAL"
This reverts commit e955914336.

* As it turns out, the brand new HIDL power HAL isn't ready, at
  least not for legacy devices like msm8974. Symptoms were that
  after waking from sleep, cores 1-3 are not brought back online
  consistently.
* Let's go back to the old thing, at least for now.

Change-Id: Ica2ddbeb42635662167efe0b48f0fe4051591b26
2018-02-06 00:32:32 +00:00
Kevin F. Haggerty
68b75f9105 msm8974-common: sepolicy: Import common sepolicy from klte-common
* The bulk of the device family policy was common and applicable
  to all Samsung msm8974-devices. Move that common stuff here to
  ease maintenance.

Change-Id: I86516adfb1b9c55a6959a7faf4ee424a4b3385c8
2018-02-03 15:07:03 -07:00
Michael Bestas
635b864067 msm8974-common: Move permissions to vendor
Change-Id: Idf4022e03ba376f7971d02be973444e70dbc4521
2018-02-03 15:07:03 -07:00
Paul Keith
f0aad1c584 msm8974: Enable full dex preopt
* So, uh, it turns out we need to disable booting with all
  but 1 CPU core to fix CDMA RIL on klte (and hlte?), so
  let's enable full dex preopt so that we don't need to
  dex opt after system updates

Change-Id: I6fe57f9dcd1da8245eebd51d61055d6de7ffe6cd
2018-01-26 07:55:57 -07:00