mojira.dev
MCPE-241708

.mcpack ACTION_VIEW does not resolve Minecraft for MediaStore content:// URIs

Summary

On my device, valid .mcpack files downloaded with Google Chrome Beta cannot be imported through the normal Android "Open with" flow because Minecraft is not offered as a matching app.

Environment

- Minecraft Bedrock v26.40

- Package: com.mojang.minecraftpe

- Google Play installation

- Samsung Galaxy S25 Ultra (SM-S938B)

- Android 16

- Google Chrome Beta

- Test file: /storage/emulated/0/Download/JavaAspects(6.5.0).mcpack

- File size: 9,665,265 bytes

Steps to reproduce

1. Download a valid .mcpack in Google Chrome Beta.

2. Open Chrome Beta Downloads.

3. Tap the .mcpack.

4. Android opens the system "Open with" resolver.

5. Minecraft is not listed.

Actual result

Minecraft cannot be selected, so the pack cannot be imported.

Expected result

Minecraft should appear as a handler for .mcpack files. Selecting it should import the pack.

Reproducibility

I have only tested my own device/setup, so I cannot confirm whether this affects other devices, Android versions or browsers.

Technical investigation

I investigated this using Android shell commands via Shizuku/aShell.

1) Actual intent from Chrome Beta

Logcat while tapping the downloaded file shows Chrome Beta starting ResolverActivity with:

act=android.intent.action.VIEW

dat=content://media/...

typ=application/octet-stream

cmp=android/com.android.internal.app.ResolverActivity

caller=com.android.chrome

The resolver contained seven matching apps, but Minecraft was not one of them.

2) MediaStore-style URI does not resolve to Minecraft

This query returns no com.mojang.minecraftpe activity:

cmd package query-activities --brief \

-a android.intent.action.VIEW \

-c android.intent.category.DEFAULT \

-d "content://media/external/file/12345" \

-t "application/octet-stream"

3) Minecraft's installed ACTION_VIEW filter

dumpsys package com.mojang.minecraftpe shows com.mojang.minecraftpe/.MainActivity registering:

Action: android.intent.action.VIEW

Category: android.intent.category.DEFAULT

Scheme: file

Scheme: content

Authority: wildcard

MIME type: wildcard

The same filter contains extension-based path patterns including:

.*\.mcworld

.*\.mcpack

.*\.mcaddon

.*\.mctemplate

(with multiple variants)

A MediaStore URI such as:

content://media/external/file/33012

contains no ".mcpack" in its URI path, although the underlying file/display name is JavaAspects(6.5.0).mcpack.

4) MIME type alone does not appear to be the cause

I tested:

file:///sdcard/Download/JavaAspects(6.5.0).mcpack

with:

application/octet-stream

application/zip

application/x-zip-compressed

application/mcpack

application/x-mcpack

For every type, PackageManager returns:

com.mojang.minecraftpe/.MainActivity

So application/octet-stream itself does not prevent matching when the URI path contains .mcpack.

5) Content URI with .mcpack in the URI path DOES resolve

I tested:

content://com.android.externalstorage.documents/document/primary%3ADownload%2FJavaAspects%286.5.0%29.mcpack

with ACTION_VIEW and application/octet-stream. PackageManager returned eight matching activities, including:

com.mojang.minecraftpe/.MainActivity

This was only an intent-matching test. The shell itself could not read this DocumentsProvider URI (SecurityException: ACTION_OPEN_DOCUMENT access required), so I am not claiming that this test proves import access.

A/B result:

content://media/external/file/12345

-> Minecraft does NOT resolve

content://.../JavaAspects(6.5.0).mcpack

-> Minecraft DOES resolve

6) Positive control: exact same pack imports successfully

I copied the same 9,665,265-byte file to:

/storage/emulated/0/Android/data/com.mojang.minecraftpe/files/JavaAspects.mcpack

Then launched Minecraft explicitly with:

ACTION_VIEW

file:///storage/emulated/0/Android/data/com.mojang.minecraftpe/files/JavaAspects.mcpack

application/octet-stream

Minecraft displayed:

"Java Aspects" successfully imported

This confirms on my device that the .mcpack is valid, Minecraft's importer works, and application/octet-stream is not inherently a problem. The failure is consistent with Android filtering Minecraft out before the normal import flow.

Suspected root cause

Based on these A/B tests, I suspect Minecraft's Android ACTION_VIEW filter relies on the supported extension being present in Uri.getPath().

Modern MediaStore/content-provider URIs can identify files using numeric IDs rather than embedding the original filename in the URI path. In my case Chrome Beta uses a URI like:

content://media/external/file/33012

The actual filename ends in .mcpack, but that extension is absent from the URI path. Because Minecraft's filter contains extension-based path patterns, Minecraft appears to be excluded before it receives the URI and can inspect provider metadata.

Suggested area to investigate

Please review the Android ACTION_VIEW intent filters/content-URI handling for:

.mcpack, .mcaddon, .mcworld, .mctemplate

If feasible, Minecraft should not rely solely on the supported extension being present in the content URI path. For content:// resources, Minecraft could receive the URI and validate the provider's display-name/type metadata through ContentResolver/OpenableColumns before deciding whether it is a supported Minecraft package.

I am describing this as a suspected root cause, not a confirmed source-code bug, but the PackageManager A/B tests strongly point to URI path matching as the failing step.

Impact

On my device the expected workflow:

download .mcpack -> tap file -> choose Minecraft -> import

cannot be completed because Minecraft is absent from Android's resolver.

Linked issues

Comments 0

No comments.

DBMexes

(Unassigned)

Unconfirmed

Android

Android 16

26.40

Retrieved