🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mobile.android
Article #499

Re: FAQ: PSA: Tutorial: Walk-Thru etc. Random examples of using adb with Android

#499
From: Maria Sophia
Date: Sat, 31 Oct 2026 15:54
282 lines
6644 bytes
Below is a post I just made to check WHY Firefox does
not show up in my WA OpenWith menu, and with adb I was
able to conclusively prove it's IMPOSSIBLE for it to show.

Newsgroups: comp.mobile.android
Subject: Re: What do you prefer for reading & saving PDFs on Android?
Date: Sat, 31 Oct 2026 11:52:49 -0400
Message-ID: <11c52sh$bsl$1@nnrp.usenet.blueworldhosting.com>

>> Do you see any web browsers in that Android WhatsApp PDF OpenWith menu?
>> I don't.
> 
> I do. I said, days ago, that I used FFx to read a PDF directly from 
> wasap, in Android. And FFx allows to download or share the file, and the 
> latter allows to save via file browsers like Cx.

Hmmmmm..... 

Thanks for checking that out for the team as that's not what I see when I 
long press on a PDF attachment and then look at the Android OpenWith sheet.

Clearly I have Firefox & just as clearly it doesn't show and neither do 
any of the other web browsers (on my Samsung A32-5G on Android 13 anyway).
 <https://i.postimg.cc/59qhZRmR/openwithpdf.jpg>

The first question to affirm is whether you used "ShareTo" or "OpenWith" 
(although browsers don't show up in my ShareTo either). 

And of course a direct file:// open from internal storage should work:
 Android > media > com.whatsapp > WhatsApp > Media > WhatsApp Documents

When WhatsApp generates an "Open With" sheet for a file ending in .pdf, 
Android queries the system for apps that have explicitly registered 
themselves to handle the application/pdf MIME type and support viewing 
local file URIs/content URIs from external apps.

To see what app handles local PDF views I ran
 c:\> adb shell cmd package resolve-activity --brief -t application/pdf -d content://com.whatsapp.provider.media/item/123
      priority=100 preferredOrder=0 match=0x608000 specificIndex=-1 
      isDefault=true com.google.android.documentsui/
      com.android.documentsui.picker.PickActivity

This told me Android's package manager checked the system resolution 
table and found DocumentsUI (PickActivity) as the only registered
handler for local content URIs with an application/pdf MIME type.

My web browsers, including Firefox, omit local PDF intent filters 
from their manifests, so they do not appear in this resolution 
table. 

That explains why Android strips them from WA's "Open With" menu.

To further see only the package names of apps registered for local
PDF viewing I used adb to reveal my Firefox does not register any 
intent filter for application/pdf under ACTION_VIEW. 

 c:\> adb shell dumpsys package org.mozilla.firefox | grep -i -E "pdf|mime|intent" -C 2

My Firefox only registers handlers for web schemes (http/https) and 
specific text types (text/plain, application/xhtml+xml), alongside a 
generic share receiver (ACTION_SEND).

adb shell dumpsys package org.mozilla.firefox | grep -A 15 "MIME Typed Actions:"
  MIME Typed Actions:
      android.intent.action.SEND:
        2900abb org.mozilla.firefox/org.mozilla.fenix.IntentReceiverActivity filter 59cbd84
          Action: "android.intent.action.SEND"
          Category: "android.intent.category.DEFAULT"
          StaticType: "text/plain"
      android.intent.action.VIEW:
        2900abb org.mozilla.firefox/org.mozilla.fenix.IntentReceiverActivity filter 1aa9797
          Action: "android.intent.action.VIEW"
          Category: "android.intent.category.BROWSABLE"
          Category: "android.intent.category.DEFAULT"
          Scheme: "http"
          Scheme: "https"
          StaticType: "text/html"
          StaticType: "text/plain"
          StaticType: "application/xhtml+xml"

Notice that ACTION_VIEW is strictly limited to web schemes (http/https) 
and specific web mime types (text/html, text/plain, application/xhtml+xml).

Notice the absence of any local document types like application/pdf 
or local file schemes under ACTION_VIEW.

This confirms why my Android system resolver omits Firefox from 
WhatsApp's direct document "Open With" menu.

So I'm confused why/how Firefox shows up for you, but it's
impossible for it to show up for me given that data above.

But maybe it's due to a difference in systems and versions?
 C:\> adb shell getprop ro.build.version.release
 C:\> adb shell cat /system/build.prop | grep -E "ro.build.version.release|ro.build.version.sdk|ro.product.model"
 C:\> adb shell dumpsys package org.mozilla.firefox | grep -E "versionName|versionCode"

Here is an all-in-one echo code to get both at once:
 C:\> echo "=== SYSTEM INFO ===" && adb shell getprop ro.product.model && adb shell getprop ro.build.version.release && echo "=== FIREFOX VERSION ===" && adb shell dumpsys package org.mozilla.firefox | grep versionName
      "=== SYSTEM INFO ==="
      SM-A326U
      13
      "=== FIREFOX VERSION ==="
      versionName=117.1.0
-- 
On Usenet, we improve our knowledge by sharing & discussing solutions.















































































































































































Technical Details
Message-ID: <11c530g$d07$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-02.vpngate.v4.open.ad.jp!not-for-mail
References: <11a96gn$b36$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-02.vpngate.v4.open.ad.jp!not-for-mail
From: Maria Sophia <mariasophia@comprehension.com>
Newsgroups: comp.mobile.android
Subject: Re: FAQ: PSA: Tutorial: Walk-Thru etc. Random examples of using adb with Android
Date: Sat, 31 Oct 2026 11:54:56 -0400
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <11c530g$d07$1@nnrp.usenet.blueworldhosting.com>
References: <11a96gn$b36$1@nnrp.usenet.blueworldhosting.com>
Reply-To: pusvul@getTjewytR4so+mqe2.invalid
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 31 Oct 2026 15:54:56 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="l//KxG3Ge2LojWvwJg0Igv8F0ChK8RUC9RtOxMPUo3U"; posting-host="IfCZz72xNNlHXBkfV9B6WJEa9xVhaehMJfhAC6fCwnM";
	logging-data="13319"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Mojibake 1p3
Cancel-Lock: sha1:zxcnF+X1FbAUQmXuK02JdiAioF4= sha256:F+pIirUkVPCOvBO4YYvLPijbQIeddDVi0Wq5t+1haQM=
	sha1:Xms429Pv4fXFxTO3HfiwcWD1s/g= sha256:8e3fUNFhPvCVFXRJ13LOw6dnSUA85Al0Hu4zRdJbeLU=
Content-Language: en-GB