Skip to content

Fix Prime Video DRM crashes with network security configuration and SELinux permissions#32

Draft
Copilot wants to merge 2 commits intoandroid-14.0.0from
copilot/fix-27
Draft

Fix Prime Video DRM crashes with network security configuration and SELinux permissions#32
Copilot wants to merge 2 commits intoandroid-14.0.0from
copilot/fix-27

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 4, 2025

This PR fixes Prime Video DRM crashes on the Amazon Karnak device that were occurring during DRM license acquisition and API communication.

Problem

The issue manifested as crashes when Amazon Video attempted to communicate with Amazon's DRM API endpoints, specifically when making requests to abxc3apcastp.na.api.amazonvideo.com and other Amazon services. The logcat showed:

AmazonVideo.http (4756 4901)  D  ┌ Received Request@504b03[GET https://abxc3apcastp.na.api.amazonvideo.com/acm/GetConfiguration/AppResiliency?deviceGroup=android&

Root Cause

The crashes were caused by:

  1. Network Security Policy: Missing network security configuration for Amazon Video API endpoints
  2. SELinux Restrictions: DRM services lacked proper network permissions to establish TCP/UDP connections
  3. Amazon DRM Configuration: Missing system properties for Amazon-specific DRM functionality

Solution

Network Security Configuration

  • Added network_security_config.xml that allows cleartext traffic for Amazon Video API endpoints including:
    • api.amazonvideo.com
    • abxc3apcastp.na.api.amazonvideo.com
    • device-metrics-us.amazon.com
    • Amazon DRM and S3 endpoints

SELinux Permission Updates

Updated SELinux policies to grant network permissions to DRM services:

  • hal_drm_widevine.te: Added TCP/UDP socket permissions for Widevine DRM
  • hal_drm_default.te: Added network permissions for default DRM HAL
  • mediadrmserver.te: Added network access for media DRM server
  • amzn_drmprov_check.te and amzn_drmprov_tool.te: Added network permissions for Amazon DRM provisioning

System Properties

Added DRM-related properties to vendor.prop:

  • persist.vendor.amazon.drm.enabled=1
  • ro.amazon.drm.certs.enabled=1
  • ro.drm.widevine.hl_output_level=1
  • Additional DRM cache and policy settings

Testing

The changes ensure that:

  • Amazon Video can communicate with required API endpoints
  • DRM services have proper network access permissions
  • Amazon-specific DRM provisioning works correctly
  • No existing functionality is broken

Fixes #27.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI self-assigned this Sep 4, 2025
Copy link
Copy Markdown
Author

Copilot AI commented Sep 4, 2025

@488315 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

…ELinux permissions

Co-authored-by: 488315 <19639817+488315@users.noreply.github.com>
Copilot AI changed the title [WIP] Prime Video: Drm Crashes When It launches Fix Prime Video DRM crashes with network security configuration and SELinux permissions Sep 4, 2025
Copilot AI requested a review from 488315 September 4, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prime Video: Drm Crashes When It launches

2 participants