anestisb / android-prepare-vendor

Set of scripts to automate AOSP compatible vendor blobs generation from factory images
348 stars 155 forks source link

Verizon visual voicemail #79

Closed thestinger closed 7 years ago

thestinger commented 7 years ago

There's an xml property that needs to be changed to get Verizon visual voicemail working: https://github.com/CopperheadOS/platform_packages_services_Telephony/commit/f16b6a9782f63bca6ec093f1bf2de20c56cdf37d. This could be set by android-prepare-vendor with an overlay which must be what Google is doing. It doesn't seem to require any proprietary code, just the standard Dialer. It's possible to set this per-carrier rather than globally but setting it globally doesn't seem to cause any harm since it only makes it available for carriers already set to use it. Could check the resources on stock to figure out what exactly they're doing with their overlays.

There are going to be more differences like this so it's probably a Google idea to figure out where these telephony resources end up (maybe one of the frameworks jars, haven't looked for it yet) and diff the xml from stock with an AOSP build.

thestinger commented 7 years ago

Here's where they added this boolean:

https://android.googlesource.com/platform/packages/services/Telephony.git/+/eb6ee5f75d09e7ac6fe5dad3b3be0dccec6310fa

AFAICT, the issue is that it can break with OEM Dialer apps. On Nexus / Pixel devices, it should be set to true via an overlay. Since we only support those I just changed the central value but it makes more sense to have it in android-prepare-vendor.

anestisb commented 7 years ago

I agree with your comments. Adding some additional logic in vendor script to generate PRODUCT_PACKAGE_OVERLAYS based on some config values seems optimal. Specially considering all the other VoLTE / VoWiFi xml config changes you spotted.

I'll add some logic as soon as I'm done with naked Oreo configs for 6p & 5x and finish testing with AOSP builds for all basic device features.

anestisb commented 7 years ago

It should be fixed with https://github.com/anestisb/android-prepare-vendor/commit/3f396391b9efb32617111ada7ba6c89f9d1e9224

anestisb commented 7 years ago

Damn spoke too soon.

build/core/tasks/vendor_module_check.mk:81: error: Error: Product "aosp_sailfish" cannot have overlay in vendor tree: vendor/google_devices/sailfish/overlay.
17:26:10 ckati failed with: exit status 1

Need to find a workaround

anestisb commented 7 years ago

The obvious one is to set PRODUCT_RESTRICT_VENDOR_FILES to false, although there is no straight forward way to achieve this without modifying files under /device

I'm looking for alternatives.

anestisb commented 7 years ago

Generating a new directory (e.g. vendor_overlay) under AOSP SRC root is one alternative. I've implemented via the generated makefile in vendor_overlay branch (see https://github.com/anestisb/android-prepare-vendor/commit/cd9a229e165d6cf230f0aa81075fafb19df0eb50).

It seems to work, although I have mixed feelings about this hack. I don't like polluting AOSP SRC ROOT beyond the vendor directory.

thestinger commented 7 years ago

How about generating another directory with android-prepare-vendor at a different path?

anestisb commented 7 years ago

That path has to be under AOSP and not under /vendor. That is effectively what the current workaround (https://github.com/anestisb/android-prepare-vendor/commit/cd9a229e165d6cf230f0aa81075fafb19df0eb50) does. It creates /vendor_overlay directory and include the overlays from there.

Having everything under /vendor was convenient and clean. But I guess since no decent alternative exists that might be the way.

I'm still thinking which is better, having the directory being regenerated from a makefile located under /vendor (the current case) or generate a completely new directory from the scripts and let the user be responsible to copy across two updated directories instead of one (assuming that output path is not directly set to AOSP src root).

anestisb commented 7 years ago

The shell commands inside the makefile are really ugly and hard to trace back when debugging. Ended-up generating a new output directory for the vendor overlays that need to copied under AOSP src root dir (https://github.com/anestisb/android-prepare-vendor/commit/5d4fb57852c150ff74cfb3877cd29722e02dd82b)

This issue should be fixed now for all Oreo supported devices. If required we can backport it to Nougat APIs too.