getsentry / getsentry/sentry-java

isSideLoaded issue tag on Android not working as expected

Offen
#1,906 17 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Android Errors Improvement
Vorherrschende Sprache
Kotlin
Sterne
1.4k
Forks
478
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
67

Beschreibung

The `isSideLoaded` tag for Android displays `false` even for sideloaded apps (apps installed directly from the APK):

![image](https://user-images.githubusercontent.com/11064768/153629916-df6aa7ae-9e6d-4461-af43-6819246a1871.png)

Here the `installerStore` tag shows the app was installed by `com.android.packageinstaller`, which is the system app used when installing an APK manually, and yet `isSideLoaded` shows `false`.

@marandaneto identified the Android documentation is misleading here: https://developer.android.com/reference/android/content/pm/PackageManager#getInstallerPackageName(java.lang.String)
It says "Retrieve the package name of the application that installed a package. This identifies which market the package came from."
The first sentence is true, the second is not, since not all installer apps are "markets".

Ultimately I don't think the `isSideLoaded` tag is useful even with this fixed, since it's not really defined what "sideloaded" means. Even when the app is actually installed from a market, there are shady market apps that rehost apps copied from Google Play. And apps installed from them are definitely "installed from a store/market", but the information useful for the app developer is that it was installed from an unofficial source, even though it was not technically "sideloaded" (or was it? where is the line?).

What I would propose as the actual fix:
- Remove the `isSideLoaded` tag: it doesn't provide any information not already visible in the `installerStore` tag
- Rename `installerStore` to `installer`: it's not always a store
- Use the red highlight (as visible in `isSideLoaded: false` on the screenshot) on the `installer` tag, when it doesn't contain one of the reputable stores (Google Play, Samsung Galaxy Store, Amazon Appstore)
- Show the `installer` as `none` when none

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.