Miracast #497

Closed
Cj-Malone opened this Issue Nov 22, 2016 · 13 comments

Comments

Projects
None yet
6 participants
@Cj-Malone

This isn't a security issue, and it's not really relevant in the context in of Copperhead OS, but I thought I'd ask.

It seems Google has disabled Miracast on devices released after the Nexus 5, and it appears to only have been done as a way to promote the propriety ChromeCast/GoogleCast. Not a technical reason.

I would appreciate it being enabled, see this commit. It is just a value in the overlay, or if enabling for all devices by default this value.

I am running the signed builds on my flounder and bullhead devices, so even if I downloaded and built myself I still couldn't test, but as it is in CyanogenMod I can't see their being an issue.

I know it's not the scope of Copperhead OS, but it is a small patch and I'd really appreciate it.

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 4, 2016

Contributor

I need someone to try enabling this and test it to confirm that it works without other changes.

Contributor

thestinger commented Dec 4, 2016

I need someone to try enabling this and test it to confirm that it works without other changes.

@BenBaltz

This comment has been minimized.

Show comment Hide comment
@BenBaltz

BenBaltz Dec 8, 2016

@Cj-Malone You could try adding persist.debug.wfd.enable=1 to your build.prop since it does the same as switching that bool.

BenBaltz commented Dec 8, 2016

@Cj-Malone You could try adding persist.debug.wfd.enable=1 to your build.prop since it does the same as switching that bool.

@Cj-Malone

This comment has been minimized.

Show comment Hide comment
@Cj-Malone

Cj-Malone Dec 9, 2016

If someone could post a signed bullhead build with either the commit or the build prop change I could test it.

If someone could post a signed bullhead build with either the commit or the build prop change I could test it.

@ksala

This comment has been minimized.

Show comment Hide comment
@ksala

ksala Dec 30, 2016

I've tested it with my Nexus 5x and a Sony KD-49X8308C, and it's not working.
The phone and the TV can connect, but then mediaserver seems to crash on the phone, and the TV errors out (just a generic "couldn't connect, retry).

This is the adb logcat taken during the connection: https://hastebin.com/raw/zanokunuhu

Edit:
The problem seems a missing permission (I think):

12-31 00:12:52.245   531  7045 W ServiceManager: Permission failure: android.permission.CAPTURE_AUDIO_OUTPUT from uid=1013 pid=15403
12-31 00:12:52.245   531  7045 E         : Request requires android.permission.CAPTURE_AUDIO_OUTPUT

From a quick search it seems that stock Android on the Pixel get the same error, so it's probably a bug upstream.

ksala commented Dec 30, 2016

I've tested it with my Nexus 5x and a Sony KD-49X8308C, and it's not working.
The phone and the TV can connect, but then mediaserver seems to crash on the phone, and the TV errors out (just a generic "couldn't connect, retry).

This is the adb logcat taken during the connection: https://hastebin.com/raw/zanokunuhu

Edit:
The problem seems a missing permission (I think):

12-31 00:12:52.245   531  7045 W ServiceManager: Permission failure: android.permission.CAPTURE_AUDIO_OUTPUT from uid=1013 pid=15403
12-31 00:12:52.245   531  7045 E         : Request requires android.permission.CAPTURE_AUDIO_OUTPUT

From a quick search it seems that stock Android on the Pixel get the same error, so it's probably a bug upstream.

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 31, 2016

Contributor

I'm unwilling to enable a major feature that Google is not testing upstream unless there are people willing to step up to properly maintain it. It's not going to be enough to work around the issues that are uncovered until it works. It needs proper maintenance. Until there are people willing to step up to devote multiple hours a week to maintaining components like this, it won't be happening. CopperheadOS has a single full time developer, myself, and there isn't enough time to take on the responsibility of maintaining new components not used / tested by Google for stock Android.

Contributor

thestinger commented Dec 31, 2016

I'm unwilling to enable a major feature that Google is not testing upstream unless there are people willing to step up to properly maintain it. It's not going to be enough to work around the issues that are uncovered until it works. It needs proper maintenance. Until there are people willing to step up to devote multiple hours a week to maintaining components like this, it won't be happening. CopperheadOS has a single full time developer, myself, and there isn't enough time to take on the responsibility of maintaining new components not used / tested by Google for stock Android.

@thestinger thestinger closed this Dec 31, 2016

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 31, 2016

Contributor

This will only be reconsidered when there are people contributing substantially to either CopperheadOS or a separate project aiming to maintain production quality AOSP releases for Nexus/Pixel. A lot of help is needed with the existing scope of the project before it can be expanded.

Contributor

thestinger commented Dec 31, 2016

This will only be reconsidered when there are people contributing substantially to either CopperheadOS or a separate project aiming to maintain production quality AOSP releases for Nexus/Pixel. A lot of help is needed with the existing scope of the project before it can be expanded.

@b52

This comment has been minimized.

Show comment Hide comment
@b52

b52 Jan 5, 2017

Out of curiosity, what is the reason that chromecast is not working with copperhead? Is there a fix/workaround for it?

b52 commented Jan 5, 2017

Out of curiosity, what is the reason that chromecast is not working with copperhead? Is there a fix/workaround for it?

@Cj-Malone

This comment has been minimized.

Show comment Hide comment
@Cj-Malone

Cj-Malone Jan 5, 2017

@b52 Chromecast uses a proprietary protocol, and the API is in Google Play Services which aren't a part of Copperhead OS.

@b52 Chromecast uses a proprietary protocol, and the API is in Google Play Services which aren't a part of Copperhead OS.

@b52

This comment has been minimized.

Show comment Hide comment
@b52

b52 Jan 5, 2017

So there is effectively no way to make this work without the Google Services? I used to use Plex to stream stuff from my server to my TV using the chromecast, I kinda miss this setup

b52 commented Jan 5, 2017

So there is effectively no way to make this work without the Google Services? I used to use Plex to stream stuff from my server to my TV using the chromecast, I kinda miss this setup

@thelifeofjay

This comment has been minimized.

Show comment Hide comment
@thelifeofjay

thelifeofjay Jan 6, 2017

Contributor

@b52 there may be a way to do it, however, media player services is not in the scope of CopperheadOS and thus won't have resources pulled to it

please note: this issue is considered closed

Contributor

thelifeofjay commented Jan 6, 2017

@b52 there may be a way to do it, however, media player services is not in the scope of CopperheadOS and thus won't have resources pulled to it

please note: this issue is considered closed

@b52

This comment has been minimized.

Show comment Hide comment
@b52

b52 Jan 6, 2017

@darknetj I do understand that this is not in scope of CopperheadOS, yet I wondered if someone has some pointers how one can achieve it on his own.

b52 commented Jan 6, 2017

@darknetj I do understand that this is not in scope of CopperheadOS, yet I wondered if someone has some pointers how one can achieve it on his own.

@ksala

This comment has been minimized.

Show comment Hide comment
@ksala

ksala Jan 6, 2017

As far as I know, the ChromeCast API is part of the Google Play Services. This mean that you can't really do much about it without installing them, for which you need to build your own custom build of CopperheadOS or unlock the bootloader and flash something like opengapps (both not officially supported by Copperhead, obviously).

The only applications that supports Chromecast without the Play Services are old build of YouTube and BubbleUPnP (which allow you to cast local files, might be enough for your needs).

ksala commented Jan 6, 2017

As far as I know, the ChromeCast API is part of the Google Play Services. This mean that you can't really do much about it without installing them, for which you need to build your own custom build of CopperheadOS or unlock the bootloader and flash something like opengapps (both not officially supported by Copperhead, obviously).

The only applications that supports Chromecast without the Play Services are old build of YouTube and BubbleUPnP (which allow you to cast local files, might be enough for your needs).

@ksala

This comment has been minimized.

Show comment Hide comment
@ksala

ksala Jun 7, 2017

For future reference, this patch fixes Miracast on my nexus 5x: VanillaNexusSource/android_frameworks_av@7fcba07

I understand that it likely won't get merged with COS as the Miracast code is not maintained anymore, but it might be helpful for anyone compiling it himself.

ksala commented Jun 7, 2017

For future reference, this patch fixes Miracast on my nexus 5x: VanillaNexusSource/android_frameworks_av@7fcba07

I understand that it likely won't get merged with COS as the Miracast code is not maintained anymore, but it might be helpful for anyone compiling it himself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment